]> git.sur5r.net Git - openldap/blobdiff - include/ac/unistd.h
Use LDAP_F and LDAP_P macros.
[openldap] / include / ac / unistd.h
index 4c2d4ebd73b4d1eb198c4eafabc5f1fe4c48e5c2..44413ddb4155f52f895faaa4b793ae76df4c675b 100644 (file)
 #if HAVE_CRYPT_H
 #      include <crypt.h>
 #else
-       extern char *crypt();
+       extern char *(crypt)();
 #endif
 
 #ifndef HAVE_GETPASS
-extern char* getpass LDAP_P((const char *getpass));
+LDAP_F(char*)(getpass) LDAP_P((const char *getpass));
+#else
+LDAP_F(char*)(getpass)();
 #endif
 
 /* getopt() defines may be in separate include file */
@@ -46,12 +48,17 @@ extern char* getpass LDAP_P((const char *getpass));
 #endif
 
 #ifndef HAVE_TEMPNAM
-       extern char *tempnam(const char *tmpdir, const char *prefix);
+       LDAP_F(char *)(tempnam) LDAP_P((
+               const char *tmpdir,
+               const char *prefix));
 #endif
 #ifndef HAVE_MKTEMP
-       extern char *mktemp(char *);
+       LDAP_F(char *)(mktemp) LDAP_P((char *));
 #endif
 
-/* use _POSIX_VERSION for POSIX.1 code */
+/* use lutil file locking */
+#define ldap_lockf(x)  lutil_lockf(x)
+#define ldap_unlockf(x)        lutil_unlockf(x)
+#include <lutil_lockf.h>
 
 #endif /* _AC_UNISTD_H */