]> git.sur5r.net Git - openldap/blobdiff - libraries/liblutil/setproctitle.c
Add valx arg to config_parse_add - indicate which value in the current
[openldap] / libraries / liblutil / setproctitle.c
index 6d1ab6a032a83e5fd494917d1f562445ad915a9b..cb38054e98619026543c9f6c8d436591c378d05f 100644 (file)
@@ -1,4 +1,28 @@
 /* $OpenLDAP$ */
+/* This work is part of OpenLDAP Software <http://www.openldap.org/>.
+ *
+ * Copyright 1998-2006 The OpenLDAP Foundation.
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted only as authorized by the OpenLDAP
+ * Public License.
+ *
+ * A copy of this license is available in the file LICENSE in the
+ * top-level directory of the distribution or, alternatively, at
+ * <http://www.OpenLDAP.org/license.html>.
+ */
+/* Portions Copyright (c) 1990,1991 Regents of the University of Michigan.
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms are permitted
+ * provided that this notice is preserved and that due credit is given
+ * to the University of Michigan at Ann Arbor. The name of the University
+ * may not be used to endorse or promote products derived from this
+ * software without specific prior written permission. This software
+ * is provided ``as is'' without express or implied warranty.
+ */
+
 #include "portable.h"
 
 #ifndef HAVE_SETPROCTITLE
 #include <ac/string.h>
 #include <ac/stdarg.h>
 
-/*
- * Copyright (c) 1990,1991 Regents of the University of Michigan.
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms are permitted
- * provided that this notice is preserved and that due credit is given
- * to the University of Michigan at Ann Arbor. The name of the University
- * may not be used to endorse or promote products derived from this
- * software without specific prior written permission. This software
- * is provided ``as is'' without express or implied warranty.
- */
-
 char   **Argv;         /* pointer to original (main's) argv */
 int    Argc;           /* original argc */
 
@@ -42,15 +54,8 @@ void setproctitle( const char *fmt, ... )
 
        va_start(ap, fmt);
 
-#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);