+/* $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>
*/
/* 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;
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';