summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJim Meyering <jim@meyering.net>2005-07-01 20:55:29 +0000
committerJim Meyering <jim@meyering.net>2005-07-01 20:55:29 +0000
commit58076430c3324600ef5dba5505fbb2e1c5e02e03 (patch)
tree6d6484331407705aea0a84fc1826d1fb9f44a8b9
parentceaa11b643fc2bfed8a57b3e1bc3f75a1ad3c7cd (diff)
downloadcoreutils-58076430c3324600ef5dba5505fbb2e1c5e02e03.tar.xz
Assume HAVE_FCNTL_H (i.e., include <fcntl.h> unconditionally,
and don't include <sys/file.h>).
-rw-r--r--lib/chown.c6
-rw-r--r--lib/cloexec.c4
-rw-r--r--lib/dup-safer.c4
-rw-r--r--lib/dup2.c4
-rw-r--r--lib/fsusage.c4
-rw-r--r--lib/getcwd.c4
-rw-r--r--lib/getloadavg.c6
-rw-r--r--lib/mountlist.c4
-rw-r--r--lib/openat.h4
-rw-r--r--lib/save-cwd.c6
-rw-r--r--lib/tempname.c4
11 files changed, 11 insertions, 39 deletions
diff --git a/lib/chown.c b/lib/chown.c
index ae6a504a7..2d97902e6 100644
--- a/lib/chown.c
+++ b/lib/chown.c
@@ -30,11 +30,7 @@
#if HAVE_UNISTD_H
# include <unistd.h>
#endif
-#if HAVE_FCNTL_H
-# include <fcntl.h>
-#else
-# include <sys/file.h>
-#endif
+#include <fcntl.h>
#include <errno.h>
/* Provide a more-closely POSIX-conforming version of chown on
diff --git a/lib/cloexec.c b/lib/cloexec.c
index bc55d7521..79d4ed0b8 100644
--- a/lib/cloexec.c
+++ b/lib/cloexec.c
@@ -27,9 +27,7 @@
# include <unistd.h>
#endif
-#if HAVE_FCNTL_H
-# include <fcntl.h>
-#endif
+#include <fcntl.h>
#ifndef FD_CLOEXEC
# define FD_CLOEXEC 1
diff --git a/lib/dup-safer.c b/lib/dup-safer.c
index e51a8d5f5..034297aa1 100644
--- a/lib/dup-safer.c
+++ b/lib/dup-safer.c
@@ -23,9 +23,7 @@
#include "unistd-safer.h"
-#if HAVE_FCNTL_H
-# include <fcntl.h>
-#endif
+#include <fcntl.h>
#if HAVE_UNISTD_H
# include <unistd.h>
diff --git a/lib/dup2.c b/lib/dup2.c
index c5d418f02..77deaf62d 100644
--- a/lib/dup2.c
+++ b/lib/dup2.c
@@ -23,9 +23,7 @@
#include <errno.h>
-#if HAVE_FCNTL_H
-# include <fcntl.h>
-#endif
+#include <fcntl.h>
#if HAVE_UNISTD_H
# include <unistd.h>
diff --git a/lib/fsusage.c b/lib/fsusage.c
index 972d88f12..83d26af88 100644
--- a/lib/fsusage.c
+++ b/lib/fsusage.c
@@ -60,9 +60,7 @@
# include <sys/filsys.h> /* SVR2 */
#endif
-#if HAVE_FCNTL_H
-# include <fcntl.h>
-#endif
+#include <fcntl.h>
#if HAVE_SYS_STATFS_H
# include <sys/statfs.h>
diff --git a/lib/getcwd.c b/lib/getcwd.c
index 94e5ba3b5..86070ead8 100644
--- a/lib/getcwd.c
+++ b/lib/getcwd.c
@@ -30,9 +30,7 @@
#include <stdbool.h>
#include <stddef.h>
-#if HAVE_FCNTL_H
-# include <fcntl.h> /* For AT_FDCWD on Solaris 9. */
-#endif
+#include <fcntl.h> /* For AT_FDCWD on Solaris 9. */
#ifndef __set_errno
# define __set_errno(val) (errno = (val))
diff --git a/lib/getloadavg.c b/lib/getloadavg.c
index 8fe542fbb..d1ed95af4 100644
--- a/lib/getloadavg.c
+++ b/lib/getloadavg.c
@@ -447,11 +447,7 @@
# include <sys/dg_sys_info.h>
# endif
-# if defined (HAVE_FCNTL_H) || defined (_POSIX_VERSION)
-# include <fcntl.h>
-# else
-# include <sys/file.h>
-# endif
+# include <fcntl.h>
# include "unistd-safer.h"
diff --git a/lib/mountlist.c b/lib/mountlist.c
index 129e0a438..a8ef87d8c 100644
--- a/lib/mountlist.c
+++ b/lib/mountlist.c
@@ -35,9 +35,7 @@ char *strstr ();
#include <errno.h>
-#ifdef HAVE_FCNTL_H
-# include <fcntl.h>
-#endif
+#include <fcntl.h>
#ifdef HAVE_UNISTD_H
# include <unistd.h>
diff --git a/lib/openat.h b/lib/openat.h
index 39b9bb919..d7e4efc53 100644
--- a/lib/openat.h
+++ b/lib/openat.h
@@ -17,9 +17,7 @@
/* written by Jim Meyering */
-#if HAVE_FCNTL_H
-# include <fcntl.h>
-#endif
+#include <fcntl.h>
#include <sys/types.h>
#include <sys/stat.h>
diff --git a/lib/save-cwd.c b/lib/save-cwd.c
index b3d09965d..5ad790a4d 100644
--- a/lib/save-cwd.c
+++ b/lib/save-cwd.c
@@ -33,11 +33,7 @@
# include <unistd.h>
#endif
-#if HAVE_FCNTL_H
-# include <fcntl.h>
-#else
-# include <sys/file.h>
-#endif
+#include <fcntl.h>
#include <errno.h>
diff --git a/lib/tempname.c b/lib/tempname.c
index eda6235ae..4b0fad3f8 100644
--- a/lib/tempname.c
+++ b/lib/tempname.c
@@ -47,9 +47,7 @@
#include <stdlib.h>
#include <string.h>
-#if HAVE_FCNTL_H || _LIBC
-# include <fcntl.h>
-#endif
+#include <fcntl.h>
#if HAVE_SYS_TIME_H || _LIBC
# include <sys/time.h>