]> git.sur5r.net Git - openldap/blob - include/ac/unistd.h
Back out K&Rification change; would only be needed in ldap.h and lber.h.
[openldap] / include / ac / unistd.h
1 /* Generic unistd.h */
2
3 #ifndef _AC_UNISTD_H
4 #define _AC_UNISTD_H
5
6 #if HAVE_SYS_TYPES_H
7 # include <sys/types.h>
8 #endif
9
10 #if HAVE_UNISTD_H
11 # include <unistd.h>
12 #else
13         /* we really should test for these */
14         char *crypt();
15         char *gethostname();
16         char *getenv();
17         long *random();
18         int flock();
19 #endif
20
21 /* getopt() defines may be in separate include file */
22 #if HAVE_GETOPT_H
23 #       include <getopt.h>
24
25 #elif !defined(HAVE_GETOPT)
26         /* no getopt, assume we need getopt-compat.h */
27 #       include <getopt-compat.h>
28
29 #else
30         /* assume we need to declare these externs */
31         extern char *optarg;
32         extern int optind, opterr, optopt;
33 #endif
34
35 #ifndef HAVE_TEMPNAM
36         extern char *tempnam(const char *tmpdir, const char *prefix);
37 #endif
38 #ifndef HAVE_MKTEMP
39         extern char *mktemp(char *);
40 #endif
41
42 /* use _POSIX_VERSION for POSIX.1 code */
43
44 #endif /* _AC_UNISTD_H */