findutils-patches
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Findutils-patches] [PATCH] Include <fcntl.h> unconditionally.


From: James Youngman
Subject: [Findutils-patches] [PATCH] Include <fcntl.h> unconditionally.
Date: Sun, 1 Jul 2007 23:47:17 +0100

2007-07-01  James Youngman  <address@hidden>

        Include <fcntl.h> unconditionally.
        * import-gnulib.config (modules): Also use the fcntl module.
        * find/find.c: #include <fcntl.h> unconditionally, since
        gnulib provides it if it is absent.
        * find/fstype.c: Ditto
        * find/ftsfind.c: Ditto
        * find/parser.c: Ditto
        * find/util.c: Ditto.
        * locate/locate.c: Ditto.
---
 find/find.c          |    4 ----
 find/fstype.c        |    4 +---
 find/ftsfind.c       |    4 ----
 find/parser.c        |    5 +----
 find/util.c          |    4 ----
 import-gnulib.config |    1 +
 locate/locate.c      |    3 ---
 7 files changed, 3 insertions(+), 22 deletions(-)

diff --git a/find/find.c b/find/find.c
index aa12950..8dcf001 100644
--- a/find/find.c
+++ b/find/find.c
@@ -36,11 +36,7 @@
 #include <assert.h>
 
 #include <sys/stat.h>
-#ifdef HAVE_FCNTL_H
 #include <fcntl.h>
-#else
-#include <sys/file.h>
-#endif
 #include <openat.h>
 
 #include "xalloc.h"
diff --git a/find/fstype.c b/find/fstype.c
index e448e9e..75b3371 100644
--- a/find/fstype.c
+++ b/find/fstype.c
@@ -36,10 +36,8 @@
  */
 #include <unistd.h>
 
-#ifdef HAVE_SYS_MNTIO_H
-#ifdef HAVE_FCNTL_H
 #include <fcntl.h>
-#endif
+#ifdef HAVE_SYS_MNTIO_H
 #include <sys/mntio.h>
 #endif
 #ifdef HAVE_SYS_MKDEV_H
diff --git a/find/ftsfind.c b/find/ftsfind.c
index e50896a..7f882a6 100644
--- a/find/ftsfind.c
+++ b/find/ftsfind.c
@@ -38,11 +38,7 @@
 #include <errno.h>
 #include <assert.h>
 
-#ifdef HAVE_FCNTL_H
 #include <fcntl.h>
-#else
-#include <sys/file.h>
-#endif
 #include <sys/stat.h>
 
 #include <unistd.h>
diff --git a/find/parser.c b/find/parser.c
index c085c2d..4ecef66 100644
--- a/find/parser.c
+++ b/find/parser.c
@@ -43,11 +43,8 @@
 #include "error.h"
 #include "gnulib-version.h"
 
-#ifdef HAVE_FCNTL_H
 #include <fcntl.h>
-#else
-#include <sys/file.h>
-#endif
+
 
 /* The presence of unistd.h is assumed by gnulib these days, so we 
  * might as well assume it too. 
diff --git a/find/util.c b/find/util.c
index 0ec37b3..8cd7ef9 100644
--- a/find/util.c
+++ b/find/util.c
@@ -18,11 +18,7 @@
 #include <config.h>
 #include "defs.h"
 
-#ifdef HAVE_FCNTL_H
 #include <fcntl.h>
-#else
-#include <sys/file.h>
-#endif
 #ifdef HAVE_SYS_UTSNAME_H
 #include <sys/utsname.h>
 #endif
diff --git a/import-gnulib.config b/import-gnulib.config
index 4d394df..b52aa03 100644
--- a/import-gnulib.config
+++ b/import-gnulib.config
@@ -38,6 +38,7 @@ closeout
 dirname
 error
 fchdir
+fcntl
 fileblocks
 filemode
 fnmatch-gnu
diff --git a/locate/locate.c b/locate/locate.c
index 1f7bab4..71e0265 100644
--- a/locate/locate.c
+++ b/locate/locate.c
@@ -79,10 +79,7 @@
 /* We need <unistd.h> for isatty(). */
 #include <unistd.h>
 
-#if HAVE_FCNTL_H
-/* We use fcntl() */
 #include <fcntl.h>
-#endif
 
 #define NDEBUG
 #include <assert.h>
-- 
1.5.2.1





reply via email to

[Prev in Thread] Current Thread [Next in Thread]