slang-users mailing list

[2015 Date Index] [2015 Thread Index] [Other years]
[Thread Prev] [Thread Next]      [Date Prev] [Date Next]

[slang-users] [PATCH 2/3] Don't include <sys/fcntl.h>, use <fcntl.h>


As specified by POSIX, to call fcntl(), only the <fcntl.h> header
should be included:

  http://pubs.opengroup.org/onlinepubs/009695399/functions/fcntl.html

The <sys/fcntl.h> is an implementation detail of certain systems, and
should not be included directly. This commit fixes some warnings that
show up when building slang against the musl C library:

 #warning redirecting incorrect #include <sys/fcntl.h> to <fcntl.h>

Signed-off-by: Thomas Petazzoni <thomas.petazzoni@xxxxxxxxxxxxxxxxxx>
---
 autoconf/configure.ac | 1 -
 configure             | 1 -
 src/config.hin        | 3 ---
 src/slposdir.c        | 3 ---
 src/slposio.c         | 3 ---
 src/slstdio.c         | 3 ---
 6 files changed, 14 deletions(-)

diff --git a/autoconf/configure.ac b/autoconf/configure.ac
index 2d43ee2..81e030c 100644
--- a/autoconf/configure.ac
+++ b/autoconf/configure.ac
@@ -83,7 +83,6 @@ locale.h \
 xlocale.h \
 langinfo.h \
 fcntl.h \
-sys/fcntl.h \
 sys/types.h \
 sys/wait.h \
 sys/utsname.h \
diff --git a/configure b/configure
index 6b3c7c0..0f8e077 100755
--- a/configure
+++ b/configure
@@ -4952,7 +4952,6 @@ locale.h \
 xlocale.h \
 langinfo.h \
 fcntl.h \
-sys/fcntl.h \
 sys/types.h \
 sys/wait.h \
 sys/utsname.h \
diff --git a/src/config.hin b/src/config.hin
index 7840934..029b7d1 100644
--- a/src/config.hin
+++ b/src/config.hin
@@ -71,9 +71,6 @@
 #undef HAVE_VSNPRINTF
 #undef HAVE_SNPRINTF
 
-/* define if you have sys/fcntl.h */
-#undef HAVE_SYS_FCNTL_H
-
 #undef HAVE_SYS_STATVFS_H
 
 #undef HAVE_SYS_TYPES_H
diff --git a/src/slposdir.c b/src/slposdir.c
index 52d0756..6073216 100644
--- a/src/slposdir.c
+++ b/src/slposdir.c
@@ -47,9 +47,6 @@ USA.
 #ifdef HAVE_FCNTL_H
 # include <fcntl.h>
 #endif
-#ifdef HAVE_SYS_FCNTL_H
-# include <sys/fcntl.h>
-#endif
 
 #ifdef __unix__
 # include <sys/file.h>
diff --git a/src/slposio.c b/src/slposio.c
index 475e2c9..073461f 100644
--- a/src/slposio.c
+++ b/src/slposio.c
@@ -30,9 +30,6 @@ USA.
 #ifdef HAVE_FCNTL_H
 # include <fcntl.h>
 #endif
-#ifdef HAVE_SYS_FCNTL_H
-# include <sys/fcntl.h>
-#endif
 
 #ifdef __unix__
 # include <sys/file.h>
diff --git a/src/slstdio.c b/src/slstdio.c
index c347a30..226c784 100644
--- a/src/slstdio.c
+++ b/src/slstdio.c
@@ -29,9 +29,6 @@ USA.
 #ifdef HAVE_FCNTL_H
 # include <fcntl.h>
 #endif
-#ifdef HAVE_SYS_FCNTL_H
-# include <sys/fcntl.h>
-#endif
 
 #ifdef __unix__
 # include <sys/file.h>
-- 
2.6.3

_______________________________________________
For list information, visit <http://jedsoft.org/slang/mailinglists.html>.


[2015 date index] [2015 thread index]
[Thread Prev] [Thread Next]      [Date Prev] [Date Next]