]> git.sur5r.net Git - openldap/blob - include/ac/unistd.h
s/Id/OpenLDAP/ in RCSids
[openldap] / include / ac / unistd.h
1 /* Generic unistd.h */
2 /* $OpenLDAP$ */
3 /*
4  * Copyright 1998,1999 The OpenLDAP Foundation, Redwood City, California, USA
5  * All rights reserved.
6  *
7  * Redistribution and use in source and binary forms are permitted only
8  * as authorized by the OpenLDAP Public License.  A copy of this
9  * license is available at http://www.OpenLDAP.org/license.html or
10  * in file LICENSE in the top-level directory of the distribution.
11  */
12
13 #ifndef _AC_UNISTD_H
14 #define _AC_UNISTD_H
15
16 #if HAVE_SYS_TYPES_H
17 #       include <sys/types.h>
18 #endif
19
20 #if HAVE_UNISTD_H
21 #       include <unistd.h>
22 #endif
23
24 /* crypt() may be defined in a separate include file */
25 #if HAVE_CRYPT_H
26 #       include <crypt.h>
27 #else
28         extern char *(crypt)();
29 #endif
30
31 #ifndef HAVE_GETPASS
32 LDAP_F(char*)(getpass) LDAP_P((const char *getpass));
33 #else
34 LDAP_F(char*)(getpass)();
35 #endif
36
37 /* getopt() defines may be in separate include file */
38 #if HAVE_GETOPT_H
39 #       include <getopt.h>
40
41 #elif !defined(HAVE_GETOPT)
42         /* no getopt, assume we need getopt-compat.h */
43 #       include <getopt-compat.h>
44
45 #else
46         /* assume we need to declare these externs */
47         extern char *optarg;
48         extern int optind, opterr, optopt;
49 #endif
50
51 #ifndef HAVE_TEMPNAM
52         LDAP_F(char *)(tempnam) LDAP_P((
53                 const char *tmpdir,
54                 const char *prefix));
55 #endif
56 #ifndef HAVE_MKTEMP
57         LDAP_F(char *)(mktemp) LDAP_P((char *));
58 #endif
59
60 /* use lutil file locking */
61 #define ldap_lockf(x)   lutil_lockf(x)
62 #define ldap_unlockf(x) lutil_unlockf(x)
63 #include <lutil_lockf.h>
64
65 #endif /* _AC_UNISTD_H */