4 * Copyright 1998-2002 The OpenLDAP Foundation, Redwood City, California, USA
7 * Redistribution and use in source and binary forms, with or without
8 * modification, are permitted only as authorized by the OpenLDAP
9 * Public License. A copy of this license is available at
10 * http://www.OpenLDAP.org/license.html or in file LICENSE in the
11 * top-level directory of the distribution.
18 # include <sys/types.h>
29 /* note: callers of crypt(3) should include <ac/crypt.h> */
31 #if defined(HAVE_GETPASSPHRASE)
32 LDAP_LIBC_F(char*)(getpassphrase)();
34 #elif defined(HAVE_GETPASS)
35 #define getpassphrase(p) getpass(p)
36 LDAP_LIBC_F(char*)(getpass)();
39 #define NEED_GETPASSPHRASE 1
40 #define getpassphrase(p) lutil_getpass(p)
41 LDAP_LUTIL_F(char*)(lutil_getpass) LDAP_P((const char *getpass));
44 /* getopt() defines may be in separate include file */
48 #elif !defined(HAVE_GETOPT)
49 /* no getopt, assume we need getopt-compat.h */
50 # include <getopt-compat.h>
53 /* assume we need to declare these externs */
54 LDAP_LIBC_V (char *) optarg;
55 LDAP_LIBC_V (int) optind, opterr, optopt;
58 /* use lutil file locking */
59 #define ldap_lockf(x) lutil_lockf(x)
60 #define ldap_unlockf(x) lutil_unlockf(x)
61 #include <lutil_lockf.h>
64 * Windows: although sleep() will be resolved by both MSVC and Mingw GCC
65 * linkers, the function is not declared in header files. This is
66 * because Windows' version of the function is called _sleep(), and it
67 * is declared in stdlib.h
74 #endif /* _AC_UNISTD_H */