mirror of
https://git.openldap.org/openldap/openldap.git
synced 2024-12-15 03:01:09 +08:00
b5494457d8
This could cause problems on odd systems. The generic headers should be extended as needed to include necessary system headers or, if necessary, make explicit declarations. Extended ac/string.h header to look for string.h/strings.h if STDC_HEADERS is not defined. Also provide basic declarations for str*() functions. This could cause problems on odd systems. Extended ac/unistd.h header to define basic declaration for misc functions that might be missing from headers. This includes externs for getenv(), getopt(), mktemp(), tempname(). Protect fax500.h from multiple inclusion. Moved includes of system/generic headers back to source files. Made mail500 helper functions static. Fixed includes of ctype.h, signal.h, etc. to use generics. lutil/tempname.c: was including stdlib.h twice, one should stdio.h. Wrapped <sys/resource.h> with HAVE_SYS_RESOURCE_H. lber/io.c/ber_get_next(): Changed noctets back to signed. Used with BerRead which expects signed int as second arg and returns signed int.
45 lines
836 B
C
45 lines
836 B
C
/* Generic unistd.h */
|
|
|
|
#ifndef _AC_UNISTD_H
|
|
#define _AC_UNISTD_H
|
|
|
|
#if HAVE_SYS_TYPES_H
|
|
# include <sys/types.h>
|
|
#endif
|
|
|
|
#if HAVE_UNISTD_H
|
|
# include <unistd.h>
|
|
#else
|
|
/* we really should test for these */
|
|
char *crypt();
|
|
char *gethostname();
|
|
char *getenv();
|
|
long *random();
|
|
int flock();
|
|
#endif
|
|
|
|
/* getopt() defines may be in separate include file */
|
|
#if HAVE_GETOPT_H
|
|
# include <getopt.h>
|
|
|
|
#elif !defined(HAVE_GETOPT)
|
|
/* no getopt, assume we need getopt-compat.h */
|
|
# include <getopt-compat.h>
|
|
|
|
#else
|
|
/* assume we need to declare these externs */
|
|
extern char *optarg;
|
|
extern int optind, opterr, optopt;
|
|
#endif
|
|
|
|
#ifndef HAVE_TEMPNAM
|
|
extern char *tempnam(const char *tmpdir, const char *prefix);
|
|
#endif
|
|
#ifndef HAVE_MKTEMP
|
|
extern char *mktemp(char *);
|
|
#endif
|
|
|
|
/* use _POSIX_VERSION for POSIX.1 code */
|
|
|
|
#endif /* _AC_UNISTD_H */
|