1998-10-25 09:41:42 +08:00
|
|
|
/* Generic unistd.h */
|
1999-08-30 04:35:22 +08:00
|
|
|
/* $Id$ */
|
1998-12-29 03:51:35 +08:00
|
|
|
/*
|
|
|
|
* Copyright 1998,1999 The OpenLDAP Foundation, Redwood City, California, USA
|
|
|
|
* All rights reserved.
|
|
|
|
*
|
|
|
|
* Redistribution and use in source and binary forms are permitted only
|
|
|
|
* as authorized by the OpenLDAP Public License. A copy of this
|
|
|
|
* license is available at http://www.OpenLDAP.org/license.html or
|
|
|
|
* in file LICENSE in the top-level directory of the distribution.
|
|
|
|
*/
|
1998-10-25 09:41:42 +08:00
|
|
|
|
|
|
|
#ifndef _AC_UNISTD_H
|
|
|
|
#define _AC_UNISTD_H
|
|
|
|
|
|
|
|
#if HAVE_SYS_TYPES_H
|
1998-11-18 03:08:29 +08:00
|
|
|
# include <sys/types.h>
|
1998-10-25 09:41:42 +08:00
|
|
|
#endif
|
|
|
|
|
|
|
|
#if HAVE_UNISTD_H
|
1998-11-18 03:08:29 +08:00
|
|
|
# include <unistd.h>
|
|
|
|
#endif
|
|
|
|
|
|
|
|
/* crypt() may be defined in a separate include file */
|
|
|
|
#if HAVE_CRYPT_H
|
|
|
|
# include <crypt.h>
|
1998-11-23 16:14:40 +08:00
|
|
|
#else
|
1999-05-19 04:52:36 +08:00
|
|
|
extern char *(crypt)();
|
1998-10-25 09:41:42 +08:00
|
|
|
#endif
|
|
|
|
|
1999-02-12 05:16:03 +08:00
|
|
|
#ifndef HAVE_GETPASS
|
1999-06-08 02:35:30 +08:00
|
|
|
LDAP_F(char*)(getpass) LDAP_P((const char *getpass));
|
|
|
|
#else
|
|
|
|
LDAP_F(char*)(getpass)();
|
1999-02-12 05:16:03 +08:00
|
|
|
#endif
|
|
|
|
|
1998-10-25 09:41:42 +08:00
|
|
|
/* getopt() defines may be in separate include file */
|
|
|
|
#if HAVE_GETOPT_H
|
1998-11-16 13:07:27 +08:00
|
|
|
# include <getopt.h>
|
|
|
|
|
1998-11-17 12:07:31 +08:00
|
|
|
#elif !defined(HAVE_GETOPT)
|
1998-11-16 13:07:27 +08:00
|
|
|
/* no getopt, assume we need getopt-compat.h */
|
|
|
|
# include <getopt-compat.h>
|
|
|
|
|
1998-11-17 12:07:31 +08:00
|
|
|
#else
|
1998-11-16 13:07:27 +08:00
|
|
|
/* assume we need to declare these externs */
|
|
|
|
extern char *optarg;
|
|
|
|
extern int optind, opterr, optopt;
|
1998-11-17 12:07:31 +08:00
|
|
|
#endif
|
1998-10-25 09:41:42 +08:00
|
|
|
|
1998-11-16 13:07:27 +08:00
|
|
|
#ifndef HAVE_TEMPNAM
|
1999-06-08 02:35:30 +08:00
|
|
|
LDAP_F(char *)(tempnam) LDAP_P((
|
|
|
|
const char *tmpdir,
|
|
|
|
const char *prefix));
|
1998-11-16 13:07:27 +08:00
|
|
|
#endif
|
|
|
|
#ifndef HAVE_MKTEMP
|
1999-06-08 02:35:30 +08:00
|
|
|
LDAP_F(char *)(mktemp) LDAP_P((char *));
|
1998-10-25 09:41:42 +08:00
|
|
|
#endif
|
|
|
|
|
1999-03-29 05:39:02 +08:00
|
|
|
/* use lutil file locking */
|
|
|
|
#define ldap_lockf(x) lutil_lockf(x)
|
|
|
|
#define ldap_unlockf(x) lutil_unlockf(x)
|
|
|
|
#include <lutil_lockf.h>
|
1999-03-14 04:31:55 +08:00
|
|
|
|
1998-10-25 09:41:42 +08:00
|
|
|
#endif /* _AC_UNISTD_H */
|