Assume unistd.h is present - avoid using HAVE_UNISTD_H

This commit is contained in:
James Youngman 2005-07-02 09:54:34 +00:00
parent 92dd7816dc
commit bc60093b97
10 changed files with 33 additions and 23 deletions

View File

@ -80,7 +80,8 @@ AC_CHECK_FUNC(getpwnam, [],
dnl Checks for header files.
AC_HEADER_STDC
AC_CHECK_HEADERS(fcntl.h string.h limits.h unistd.h errno.h stdlib.h stddef.h)
dnl Assume unistd.h is present - coreutils does too.
AC_CHECK_HEADERS(fcntl.h string.h limits.h errno.h stdlib.h stddef.h)
AC_CHECK_HEADERS(unistd.h sys/types.h inttypes.h fcntl.h locale.h stdint.h)
AC_CHECK_HEADERS(sys/param.h mntent.h sys/mnttab.h sys/mntio.h sys/mkdev.h)
dnl find.c needs sys/utsname.h because it calls uname(2).

View File

@ -45,9 +45,10 @@ extern int errno;
#include <stdlib.h>
#endif
#ifdef HAVE_UNISTD_H
/* The presence of unistd.h is assumed by gnulib these days, so we
* might as well assume it too.
*/
#include <unistd.h>
#endif
#include <time.h>

View File

@ -34,9 +34,10 @@
#include <sys/types.h>
#endif
#ifdef HAVE_UNISTD_H
/* The presence of unistd.h is assumed by gnulib these days, so we
* might as well assume it too.
*/
#include <unistd.h>
#endif
#ifdef HAVE_SYS_MNTIO_H
#ifdef HAVE_FCNTL_H

View File

@ -40,11 +40,11 @@
#include <sys/file.h>
#endif
#ifdef HAVE_UNISTD_H
/* The presence of unistd.h is assumed by gnulib these days, so we
* might as well assume it too.
*/
/* We need <unistd.h> for isatty(). */
#include <unistd.h>
#endif
#include <unistd.h>
#if ENABLE_NLS
# include <libintl.h>

View File

@ -63,9 +63,10 @@ extern int errno;
# endif
#endif
#if defined HAVE_UNISTD_H || defined _LIBC
# include <unistd.h>
#endif
/* The presence of unistd.h is assumed by gnulib these days, so we
* might as well assume it too.
*/
#include <unistd.h>
#include <locale.h>

View File

@ -68,10 +68,11 @@
#include <limits.h>
#endif
#ifdef HAVE_UNISTD_H
/* The presence of unistd.h is assumed by gnulib these days, so we
* might as well assume it too.
*/
/* for sysconf() */
#include <unistd.h>
#endif
/* COMPAT: SYSV version defaults size (and has a max value of) to 470.
We try to make it as large as possible. */

View File

@ -62,9 +62,11 @@ char *alloca ();
#endif
#ifdef HAVE_UNISTD_H
/* The presence of unistd.h is assumed by gnulib these days, so we
* might as well assume it too.
*/
#include <unistd.h> /* for readlink() */
#endif
#if STDC_HEADERS
# include <stdlib.h>

View File

@ -32,9 +32,10 @@
# include <sys/types.h>
#endif
#if HAVE_UNISTD_H
# include <unistd.h>
#endif
/* The presence of unistd.h is assumed by gnulib these days, so we
* might as well assume it too.
*/
#include <unistd.h>
#include <errno.h>

View File

@ -70,10 +70,11 @@
#include <getopt.h>
#include <xstrtol.h>
#ifdef HAVE_UNISTD_H
/* The presence of unistd.h is assumed by gnulib these days, so we
* might as well assume it too.
*/
/* We need <unistd.h> for isatty(). */
#include <unistd.h>
#endif
#define NDEBUG

View File

@ -84,9 +84,10 @@
#define LONG_MAX (~(1 << (sizeof (long) * 8 - 1)))
#endif
#ifdef HAVE_UNISTD_H
/* The presence of unistd.h is assumed by gnulib these days, so we
* might as well assume it too.
*/
#include <unistd.h>
#endif
#include <signal.h>