From: Jim Meyering Date: Sat, 24 Apr 2010 15:38:13 +0000 (+0200) Subject: maint: remove now-unnecessary #if HAVE_header_H tests. X-Git-Tag: v8.6~196 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=2191fe8f8d84e39f8c4b861cde28d395639393e1;p=thirdparty%2Fcoreutils.git maint: remove now-unnecessary #if HAVE_header_H tests. * .x-sc_prohibit_always_true_header_tests: New file. * Makefile.am (syntax_check_exceptions): Add it. * src/cat.c: Remove #if HAVE_SYS_IOCTL_H test. * src/copy.c: Likewise. * src/ls.c: Likewise. * src/stty.c: Likewise. * src/install.c: Remove #if HAVE_SYS_WAIT_H test. * src/kill.c: Likewise. * src/operand2sig.c: Likewise. * src/timeout.c: Likewise. * src/pathchk.c: Remove #if HAVE_WCHAR_H test. * src/stat.c: Remove #if HAVE_NETINET_IN_H test. --- diff --git a/.x-sc_prohibit_always_true_header_tests b/.x-sc_prohibit_always_true_header_tests new file mode 100644 index 0000000000..732d9ecded --- /dev/null +++ b/.x-sc_prohibit_always_true_header_tests @@ -0,0 +1,2 @@ +^m4/stat-prog\.m4$ +ChangeLog diff --git a/Makefile.am b/Makefile.am index 9a7f45c661..83c28b336a 100644 --- a/Makefile.am +++ b/Makefile.am @@ -59,6 +59,7 @@ syntax_check_exceptions = \ .x-sc_sun_os_names \ .x-sc_system_h_headers \ .x-sc_trailing_blank \ + .x-sc_prohibit_always_true_header_tests \ .x-sc_unmarked_diagnostics \ .x-sc_useless_cpp_parens diff --git a/src/cat.c b/src/cat.c index c33e0b3798..8740e0e4ff 100644 --- a/src/cat.c +++ b/src/cat.c @@ -30,9 +30,7 @@ #if HAVE_STROPTS_H # include #endif -#if HAVE_SYS_IOCTL_H -# include -#endif +#include #include "system.h" #include "error.h" diff --git a/src/copy.c b/src/copy.c index d18fd45abf..c16cef62ba 100644 --- a/src/copy.c +++ b/src/copy.c @@ -61,9 +61,7 @@ # include "verror.h" #endif -#if HAVE_SYS_IOCTL_H -# include -#endif +#include #ifndef HAVE_FCHOWN # define HAVE_FCHOWN false diff --git a/src/install.c b/src/install.c index bac5c7c390..038e86976e 100644 --- a/src/install.c +++ b/src/install.c @@ -48,9 +48,7 @@ #define AUTHORS proper_name ("David MacKenzie") -#if HAVE_SYS_WAIT_H -# include -#endif +#include static int selinux_enabled = 0; static bool use_default_selinux_context = true; diff --git a/src/kill.c b/src/kill.c index dab4fa834e..09d280822b 100644 --- a/src/kill.c +++ b/src/kill.c @@ -22,9 +22,7 @@ #include #include -#if HAVE_SYS_WAIT_H -# include -#endif +#include #ifndef WIFSIGNALED # define WIFSIGNALED(s) (((s) & 0xFFFF) - 1 < (unsigned int) 0xFF) #endif diff --git a/src/ls.c b/src/ls.c index 6bd680e15b..ca09ead8d0 100644 --- a/src/ls.c +++ b/src/ls.c @@ -45,9 +45,7 @@ #if HAVE_STROPTS_H # include #endif -#if HAVE_SYS_IOCTL_H -# include -#endif +#include #ifdef WINSIZE_IN_PTEM # include diff --git a/src/operand2sig.c b/src/operand2sig.c index 5b26a75fb1..d0500cdac2 100644 --- a/src/operand2sig.c +++ b/src/operand2sig.c @@ -25,9 +25,7 @@ #include #include -#if HAVE_SYS_WAIT_H -# include -#endif +#include #ifndef WIFSIGNALED # define WIFSIGNALED(s) (((s) & 0xFFFF) - 1 < (unsigned int) 0xFF) #endif diff --git a/src/pathchk.c b/src/pathchk.c index d9f6c0a64d..62c20941c1 100644 --- a/src/pathchk.c +++ b/src/pathchk.c @@ -18,9 +18,7 @@ #include #include #include -#if HAVE_WCHAR_H -# include -#endif +#include #include "system.h" #include "error.h" diff --git a/src/stat.c b/src/stat.c index 5063e70865..e6de541e2d 100644 --- a/src/stat.c +++ b/src/stat.c @@ -44,7 +44,7 @@ /* NetBSD 1.5.2 needs these, for the declaration of struct statfs. */ # include # include -# if HAVE_NETINET_IN_H && HAVE_NFS_NFS_CLNT_H && HAVE_NFS_VFS_H +# if HAVE_NFS_NFS_CLNT_H && HAVE_NFS_VFS_H /* Ultrix 4.4 needs these for the declaration of struct statfs. */ # include # include diff --git a/src/stty.c b/src/stty.c index 8c6920fe1a..71045c2813 100644 --- a/src/stty.c +++ b/src/stty.c @@ -42,9 +42,7 @@ #if HAVE_STROPTS_H # include #endif -#ifdef HAVE_SYS_IOCTL_H -# include -#endif +#include #ifdef WINSIZE_IN_PTEM # include diff --git a/src/timeout.c b/src/timeout.c index d1ea06d83f..c6f65258bf 100644 --- a/src/timeout.c +++ b/src/timeout.c @@ -49,10 +49,8 @@ #include #include #include +#include -#if HAVE_SYS_WAIT_H -# include -#endif #ifndef WIFSIGNALED # define WIFSIGNALED(s) (((s) & 0xFFFF) - 1 < (unsigned int) 0xFF) #endif