]> git.sur5r.net Git - openldap/blobdiff - servers/slapd/shell-backends/shellutil.c
Modified to use libtool's ltdl instead of gmodule
[openldap] / servers / slapd / shell-backends / shellutil.c
index 8fb7ddea44e30a4dbf66d34087b78797b34f0e34..4ba1213fa2fa11e833df5abb1671ce401de9b4d4 100644 (file)
@@ -18,7 +18,7 @@
 
 #include <stdio.h>
 
-#include <stdlib.h>
+#include <ac/stdlib.h>
 #include <ac/stdarg.h>
 
 #include <pwd.h>
@@ -275,7 +275,7 @@ estrdup( char *s )
 
     if (( p = strdup( s )) == NULL ) {
        debug_printf( "strdup failed\n" );
-       exit( 1 );
+       exit( EXIT_FAILURE );
     }
 
     return( p );
@@ -295,7 +295,7 @@ erealloc( void *s, unsigned size )
 
     if ( p == NULL ) {
        debug_printf( "realloc( p, %d ) failed\n", size );
-       exit( 1 );
+       exit( EXIT_FAILURE );
     }
 
     return( p );
@@ -309,7 +309,7 @@ ecalloc( unsigned nelem, unsigned elsize )
 
     if (( p = calloc( nelem, elsize )) == NULL ) {
        debug_printf( "calloc( %d, %d ) failed\n", nelem, elsize );
-       exit( 1 );
+       exit( EXIT_FAILURE );
     }
 
     return( p );
@@ -321,7 +321,7 @@ ecalloc( unsigned nelem, unsigned elsize )
 /* VARARGS */
 void
 debug_printf
-#ifdef STDC_HEADERS
+#if HAVE_STDARG
        ( char *fmt, ... )
 #else
        ( va_alist )
@@ -329,12 +329,12 @@ debug_printf
 #endif
 {
     va_list    ap;
-#ifndef STDC_HEADERS
+#if !HAVE_STDARG
     char       *fmt;
 #endif
 
        if ( debugflg ) {
-#ifdef STDC_HEADERS
+#if HAVE_STDARG
                va_start( ap, fmt );
 #else
                va_start( ap );