]> git.sur5r.net Git - openldap/blobdiff - libraries/liblutil/tempnam.c
Change reporting of SASL username
[openldap] / libraries / liblutil / tempnam.c
index cdd5385a2e3fc3d57410a1bc2263a6cefb6a1eeb..fa455c0c75a87fdae4eda16e0db79cec07412b57 100644 (file)
@@ -1,21 +1,23 @@
+/* $OpenLDAP$ */
 #include "portable.h"
 
 #ifndef HAVE_TEMPNAM
 
-#include <stdlib.h>
-#include <stdlib.h>
+#include <stdio.h>
+
+#include <ac/stdlib.h>
 #include <ac/string.h>
-extern char *mktemp (char *);
+#include <ac/unistd.h>
 
 #include "lutil.h"
 
 char *
-tempnam( char *dir, char *pfx )
+(tempnam)( const char *dir, const char *pfx )
 {
     char       *s;
 
     if ( dir == NULL ) {
-       dir = "/tmp";
+       dir = LDAP_TMPDIR;
     }
 
 /*
@@ -41,4 +43,4 @@ tempnam( char *dir, char *pfx )
     return( s );
 }
 
-#endif /* nextstep */
+#endif /* TEMPNAM */