#include <stdio.h>
-#include <stdlib.h>
+#include <ac/stdlib.h>
#include <ac/stdarg.h>
#include <pwd.h>
if (( p = strdup( s )) == NULL ) {
debug_printf( "strdup failed\n" );
- exit( 1 );
+ exit( EXIT_FAILURE );
}
return( p );
if ( p == NULL ) {
debug_printf( "realloc( p, %d ) failed\n", size );
- exit( 1 );
+ exit( EXIT_FAILURE );
}
return( p );
if (( p = calloc( nelem, elsize )) == NULL ) {
debug_printf( "calloc( %d, %d ) failed\n", nelem, elsize );
- exit( 1 );
+ exit( EXIT_FAILURE );
}
return( p );
/* VARARGS */
void
debug_printf
-#ifdef STDC_HEADERS
+#if HAVE_STDARG
( char *fmt, ... )
#else
( va_alist )
#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 );