]> git.sur5r.net Git - openldap/blob - include/ac/unistd.h
1c5a82ba8230c6a2e53e4e0b646ba1208a68ceae
[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 #else
26 #  if !defined(HAVE_GETOPT)
27         /* no getopt, assume we need getopt-compat.h */
28 #       include <getopt-compat.h>
29
30 #  else
31         /* assume we need to declare these externs */
32         extern char *optarg;
33         extern int optind, opterr, optopt;
34 #  endif
35 #endif /* HAVE_GETOPT_H */
36
37 #ifndef HAVE_TEMPNAM
38         extern char *tempnam(const char *tmpdir, const char *prefix);
39 #endif
40 #ifndef HAVE_MKTEMP
41         extern char *mktemp(char *);
42 #endif
43
44 /* use _POSIX_VERSION for POSIX.1 code */
45
46 #endif /* _AC_UNISTD_H */