X-Git-Url: https://git.sur5r.net/?a=blobdiff_plain;f=libraries%2Fliblutil%2Fsetproctitle.c;h=8a095e2c5d16eacf271743d7db3906fda16a9dcb;hb=c0f8e30d2290b22718f3cfd6800679dfb4c253a9;hp=534a69bfe6b5e2f85d070f6f535da841c1b4044d;hpb=1494cf2a44182073ed628c5936645ee836c20dd6;p=openldap diff --git a/libraries/liblutil/setproctitle.c b/libraries/liblutil/setproctitle.c index 534a69bfe6..8a095e2c5d 100644 --- a/libraries/liblutil/setproctitle.c +++ b/libraries/liblutil/setproctitle.c @@ -1,9 +1,11 @@ +/* $OpenLDAP$ */ #include "portable.h" #ifndef HAVE_SETPROCTITLE #include -#include + +#include #include #include @@ -30,14 +32,7 @@ int Argc; /* original argc */ */ /* VARARGS */ -void setproctitle -#if defined( HAVE_STDARG ) - ( const char *fmt, ... ) -#else - ( fmt, va_alist ) -const char *fmt; -va_dcl -#endif +void setproctitle( const char *fmt, ... ) { static char *endargv = (char *)0; char *s; @@ -45,21 +40,10 @@ va_dcl char buf[ 1024 ]; va_list ap; -#if defined( HAVE_STDARG ) va_start(ap, fmt); -#else - va_start(ap); -#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);