]> git.sur5r.net Git - openldap/blob - include/ac/unistd.h
f0d9c1ad7265fd0b215ee36e6bb295a02b68b7e0
[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 /* getopt() defines may be in separate include file */
31 #if HAVE_GETOPT_H
32 #       include <getopt.h>
33
34 #elif !defined(HAVE_GETOPT)
35         /* no getopt, assume we need getopt-compat.h */
36 #       include <getopt-compat.h>
37
38 #else
39         /* assume we need to declare these externs */
40         extern char *optarg;
41         extern int optind, opterr, optopt;
42 #endif
43
44 #ifndef HAVE_TEMPNAM
45         extern char *tempnam(const char *tmpdir, const char *prefix);
46 #endif
47 #ifndef HAVE_MKTEMP
48         extern char *mktemp(char *);
49 #endif
50
51 /* use _POSIX_VERSION for POSIX.1 code */
52
53 #endif /* _AC_UNISTD_H */