]> git.sur5r.net Git - openldap/blobdiff - libraries/liblutil/setproctitle.c
Reverse unintended commit
[openldap] / libraries / liblutil / setproctitle.c
index 4c13eb95d16dc5fc49036f8ad02b91719c49f5e0..8a095e2c5d16eacf271743d7db3906fda16a9dcb 100644 (file)
@@ -1,9 +1,11 @@
+/* $OpenLDAP$ */
 #include "portable.h"
 
 #ifndef HAVE_SETPROCTITLE
 
 #include <stdio.h>
-#include <stdlib.h>
+
+#include <ac/stdlib.h>
 
 #include <ac/setproctitle.h>
 #include <ac/string.h>
@@ -30,13 +32,7 @@ int  Argc;           /* original argc */
  */
 
 /* VARARGS */
-void setproctitle
-#if defined( HAVE_STDARG )
-       ( const char *fmt, ... )
-#else
-       ( va_alist )
-va_dcl
-#endif
+void setproctitle( const char *fmt, ... )
 {
        static char *endargv = (char *)0;
        char    *s;
@@ -44,24 +40,10 @@ va_dcl
        char    buf[ 1024 ];
        va_list ap;
 
-#if defined( HAVE_STDARG )
        va_start(ap, fmt);
-#else
-       const char *fmt;
-
-       va_start(ap);
-       fmt = va_arg(ap, const char *);
-#endif
 
-#ifdef HAVE_VSNPRINTF
        buf[sizeof(buf) - 1] = '\0';
        vsnprintf( buf, sizeof(buf)-1, fmt, ap );
-#elif HAVE_VPRINTF
-       vsprintf( buf, fmt, ap ); /* hope it's not too long */
-#else
-       /* use doprnt() */
-       chokeme = "choke me!  I don't have a doprnt() manual handy";
-#endif
 
        va_end(ap);