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