+2005-07-02 Jim Meyering <jim@meyering.net>
+
+ * backupfile.c, canon-host.c, canonicalize.c, chown.c, cloexec.c:
+ * dup-safer.c, dup2.c, euidaccess.c, fd-safer.c, fileblocks.c:
+ * fopen-safer.c, fsusage.c, ftruncate.c, getcwd.c, getcwd.h:
+ * getloadavg.c, getopt_.h, getpagesize.h, getugroups.c, group-member.c:
+ * human.h, idcache.c, mkdir-p.c, mountlist.c, nanosleep.c, pathmax.h:
+ * physmem.c, posixver.c, putenv.c, raise.c, safe-read.c, same.c:
+ * save-cwd.c, setenv.c, settime.c, tempname.c, unlinkdir.c:
+ * unsetenv.c, userspec.c, xgethostname.c, xreadlink.c:
+ Assume HAVE_UNISTD_H, i.e., include <unistd.h> unconditionally.
+
2005-07-01 Jim Meyering <jim@meyering.net>
* chown.c, cloexec.c, dup-safer.c, dup2.c, fsusage.c, getcwd.c:
#include <limits.h>
-#if HAVE_UNISTD_H
-# include <unistd.h>
-#endif
+#include <unistd.h>
#if HAVE_DIRENT_H
# include <dirent.h>
#endif
#include <sys/types.h>
-#ifdef HAVE_UNISTD_H
-# include <unistd.h>
-#endif
+#include <unistd.h>
#include <stdlib.h>
#include <string.h>
#ifdef HAVE_NETDB_H
#include <sys/stat.h>
-#if HAVE_UNISTD_H
-# include <unistd.h>
-#endif
+#include <unistd.h>
#include <errno.h>
#include <stddef.h>
#include <sys/types.h>
#include <sys/stat.h>
-#if HAVE_UNISTD_H
-# include <unistd.h>
-#endif
+#include <unistd.h>
#include <fcntl.h>
#include <errno.h>
#include "cloexec.h"
-#if HAVE_UNISTD_H
-# include <unistd.h>
-#endif
+#include <unistd.h>
#include <fcntl.h>
#include <fcntl.h>
-#if HAVE_UNISTD_H
-# include <unistd.h>
-#endif
+#include <unistd.h>
#ifndef STDERR_FILENO
# define STDERR_FILENO 2
#endif
#include <fcntl.h>
-#if HAVE_UNISTD_H
-# include <unistd.h>
-#endif
+#include <unistd.h>
#ifndef F_DUPFD
static int
#include <sys/types.h>
#include <sys/stat.h>
-
-#if HAVE_UNISTD_H || defined _LIBC
-# include <unistd.h>
-#endif
+#include <unistd.h>
#if HAVE_LIBGEN_H
# include <libgen.h>
#include <errno.h>
-#if HAVE_UNISTD_H
-# include <unistd.h>
-#endif
+#include <unistd.h>
#ifndef STDIN_FILENO
# define STDIN_FILENO 0
#endif
#if !HAVE_STRUCT_STAT_ST_BLOCKS && !defined _POSIX_SOURCE && defined BSIZE
-# if HAVE_UNISTD_H
-# include <unistd.h>
-# endif
+# include <unistd.h>
# ifndef NINDIR
# include <config.h>
#endif
-#if HAVE_UNISTD_H
-# include <unistd.h>
-#endif
+#include <unistd.h>
#include <unistd-safer.h>
#ifndef STDERR_FILENO
#if HAVE_STDINT_H
# include <stdint.h>
#endif
-#if HAVE_UNISTD_H
-# include <unistd.h>
-#endif
+#include <unistd.h>
#ifndef UINTMAX_MAX
# define UINTMAX_MAX ((uintmax_t) -1)
#endif
# include <sys/stat.h>
# include <errno.h>
-# if HAVE_UNISTD_H
-# include <unistd.h>
-# endif
+# include <unistd.h>
int
ftruncate (int fd, off_t length)
# define _D_ALLOC_NAMLEN(d) (_D_EXACT_NAMLEN (d) + 1)
#endif
-#if HAVE_UNISTD_H || _LIBC
-# include <unistd.h>
-#endif
-
+#include <unistd.h>
#include <stdlib.h>
#include <string.h>
cause confusion if included after this file. */
#include <stdlib.h>
-#if HAVE_UNISTD_H
-# include <unistd.h>
-#endif
+#include <unistd.h>
/* If necessary, systematically rename identifiers so that they do not
collide with the system function. Renaming avoids problems with
# define LDAV_SYMBOL "avenrun"
# endif
-# ifdef HAVE_UNISTD_H
-# include <unistd.h>
-# endif
+# include <unistd.h>
/* LOAD_AVE_TYPE should only get defined if we're going to use the
nlist method. */
/* Emulate getpagesize on systems that lack it.
- Copyright (C) 1999, 2000, 2004 Free Software Foundation, Inc.
+ Copyright (C) 1999, 2000, 2004, 2005 Free Software Foundation, Inc.
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
#ifndef HAVE_GETPAGESIZE
-#ifdef HAVE_UNISTD_H
-# include <unistd.h>
-#endif
+#include <unistd.h>
#if !defined getpagesize && defined _SC_PAGESIZE
# if !(defined VMS && __VMS_VER < 70000000)
#include <stdio.h> /* grp.h on alpha OSF1 V2.0 uses "FILE *". */
#include <grp.h>
-#ifdef HAVE_UNISTD_H
-# include <unistd.h>
-#endif
+#include <unistd.h>
#include <errno.h>
#ifndef EOVERFLOW
#include <sys/types.h>
#include <stdlib.h>
-#if HAVE_UNISTD_H
-# include <unistd.h>
-#endif
+#include <unistd.h>
#include "xalloc.h"
# if HAVE_STDINT_H
# include <stdint.h>
# endif
-# if HAVE_UNISTD_H
-# include <unistd.h>
-# endif
+# include <unistd.h>
/* A conservative bound on the maximum length of a human-readable string.
The output can be the square of the largest uintmax_t, so double
#include <pwd.h>
#include <grp.h>
-#if HAVE_UNISTD_H
-# include <unistd.h>
-#endif
+#include <unistd.h>
#include "xalloc.h"
#include <stdio.h>
#include <sys/types.h>
#include <sys/stat.h>
-#if HAVE_UNISTD_H
-# include <unistd.h>
-#endif
+#include <unistd.h>
#include <stdlib.h>
#include <errno.h>
#include <fcntl.h>
-#ifdef HAVE_UNISTD_H
-# include <unistd.h>
-#endif
+#include <unistd.h>
#if HAVE_SYS_PARAM_H
# include <sys/param.h>
#include <errno.h>
-#if HAVE_UNISTD_H
-# include <unistd.h>
-#endif
+#include <unistd.h>
#include "timespec.h"
#ifndef _PATHMAX_H
# define _PATHMAX_H
-# if HAVE_UNISTD_H
-# include <unistd.h>
-# endif
+# include <unistd.h>
# include <limits.h>
#include "physmem.h"
-#if HAVE_UNISTD_H
-# include <unistd.h>
-#endif
+#include <unistd.h>
#if HAVE_SYS_PSTAT_H
# include <sys/pstat.h>
#include <limits.h>
#include <stdlib.h>
-#if HAVE_UNISTD_H
-# include <unistd.h>
-#endif
+#include <unistd.h>
#ifndef _POSIX2_VERSION
# define _POSIX2_VERSION 0
#endif
-/* Copyright (C) 1991, 1994, 1997, 1998, 2000, 2003, 2004 Free Software Foundation, Inc.
+/* Copyright (C) 1991, 1994, 1997, 1998, 2000, 2003, 2004, 2005 Free Software Foundation, Inc.
NOTE: The canonical source of this file is maintained with the GNU C
Library. Bugs can be reported to bug-glibc@prep.ai.mit.edu.
#include <string.h>
-#if defined (__GNU_LIBRARY__) || defined (HAVE_UNISTD_H)
-# include <unistd.h>
-#endif
+#include <unistd.h>
#if HAVE_GNU_LD
# define environ __environ
#include <sys/types.h>
#include <signal.h>
-#if HAVE_UNISTD_H
-# include <unistd.h>
-#endif
+#include <unistd.h>
int
raise (int sig)
/* Get ssize_t. */
#include <sys/types.h>
-#if HAVE_UNISTD_H
-# include <unistd.h>
-#endif
+#include <unistd.h>
#include <errno.h>
#include <stdbool.h>
#include <stdio.h>
-#ifdef HAVE_UNISTD_H
-# include <unistd.h>
-#endif
+#include <unistd.h>
#include <stdlib.h>
#include <sys/types.h>
#include <sys/stat.h>
#include <stdio.h>
#include <stdlib.h>
-#if HAVE_UNISTD_H
-# include <unistd.h>
-#endif
+#include <unistd.h>
#include <fcntl.h>
-/* Copyright (C) 1992,1995-1999,2000-2003 Free Software Foundation, Inc.
+/* Copyright (C) 1992,1995-1999,2000-2003,2005 Free Software Foundation, Inc.
This file is part of the GNU C Library.
This program is free software; you can redistribute it and/or modify
#include <stdlib.h>
#include <string.h>
-#if _LIBC || HAVE_UNISTD_H
-# include <unistd.h>
-#endif
+#include <unistd.h>
#if !_LIBC
# include "allocsa.h"
#include "timespec.h"
-#if HAVE_UNISTD_H
-# include <unistd.h>
-#endif
+#include <unistd.h>
#include <errno.h>
# include <inttypes.h>
#endif
-#if HAVE_UNISTD_H || _LIBC
-# include <unistd.h>
-#endif
+#include <unistd.h>
#include <sys/stat.h>
#if HAVE_PRIV_H
# include <priv.h>
#endif
-#if HAVE_UNISTD_H
-# include <unistd.h>
-#endif
+#include <unistd.h>
#if ! UNLINK_CANNOT_UNLINK_DIR
-/* Copyright (C) 1992,1995-1999,2000-2002 Free Software Foundation, Inc.
+/* Copyright (C) 1992,1995-1999,2000-2002,2005 Free Software Foundation, Inc.
This file is part of the GNU C Library.
This program is free software; you can redistribute it and/or modify
#include <stdlib.h>
#include <string.h>
-#if _LIBC || HAVE_UNISTD_H
-# include <unistd.h>
-#endif
+#include <unistd.h>
#if !_LIBC
# define __environ environ
#include <stdlib.h>
#include <string.h>
-#if HAVE_UNISTD_H
-# include <unistd.h>
-#endif
+#include <unistd.h>
#include "intprops.h"
#include "inttostr.h"
#include <stdlib.h>
#include <errno.h>
-#if HAVE_UNISTD_H
-# include <unistd.h>
-#endif
+#include <unistd.h>
#include "xalloc.h"
#include <limits.h>
#include <sys/types.h>
#include <stdlib.h>
-#if HAVE_UNISTD_H
-# include <unistd.h>
-#endif
+#include <unistd.h>
#ifndef SIZE_MAX
# define SIZE_MAX ((size_t) -1)