summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJim Meyering <meyering@redhat.com>2010-04-24 17:38:13 +0200
committerJim Meyering <meyering@redhat.com>2010-04-24 17:44:58 +0200
commit2191fe8f8d84e39f8c4b861cde28d395639393e1 (patch)
treecd6295499076cbfe87e359f1341edd6ebbb210a2
parenta4ab8d9c55f4e3c9aac7859e85545e769b43f256 (diff)
downloadcoreutils-2191fe8f8d84e39f8c4b861cde28d395639393e1.tar.xz
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.
-rw-r--r--.x-sc_prohibit_always_true_header_tests2
-rw-r--r--Makefile.am1
-rw-r--r--src/cat.c4
-rw-r--r--src/copy.c4
-rw-r--r--src/install.c4
-rw-r--r--src/kill.c4
-rw-r--r--src/ls.c4
-rw-r--r--src/operand2sig.c4
-rw-r--r--src/pathchk.c4
-rw-r--r--src/stat.c2
-rw-r--r--src/stty.c4
-rw-r--r--src/timeout.c4
12 files changed, 13 insertions, 28 deletions
diff --git a/.x-sc_prohibit_always_true_header_tests b/.x-sc_prohibit_always_true_header_tests
new file mode 100644
index 000000000..732d9ecde
--- /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 9a7f45c66..83c28b336 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 c33e0b379..8740e0e4f 100644
--- a/src/cat.c
+++ b/src/cat.c
@@ -30,9 +30,7 @@
#if HAVE_STROPTS_H
# include <stropts.h>
#endif
-#if HAVE_SYS_IOCTL_H
-# include <sys/ioctl.h>
-#endif
+#include <sys/ioctl.h>
#include "system.h"
#include "error.h"
diff --git a/src/copy.c b/src/copy.c
index d18fd45ab..c16cef62b 100644
--- a/src/copy.c
+++ b/src/copy.c
@@ -61,9 +61,7 @@
# include "verror.h"
#endif
-#if HAVE_SYS_IOCTL_H
-# include <sys/ioctl.h>
-#endif
+#include <sys/ioctl.h>
#ifndef HAVE_FCHOWN
# define HAVE_FCHOWN false
diff --git a/src/install.c b/src/install.c
index bac5c7c39..038e86976 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 <sys/wait.h>
-#endif
+#include <sys/wait.h>
static int selinux_enabled = 0;
static bool use_default_selinux_context = true;
diff --git a/src/kill.c b/src/kill.c
index dab4fa834..09d280822 100644
--- a/src/kill.c
+++ b/src/kill.c
@@ -22,9 +22,7 @@
#include <sys/types.h>
#include <signal.h>
-#if HAVE_SYS_WAIT_H
-# include <sys/wait.h>
-#endif
+#include <sys/wait.h>
#ifndef WIFSIGNALED
# define WIFSIGNALED(s) (((s) & 0xFFFF) - 1 < (unsigned int) 0xFF)
#endif
diff --git a/src/ls.c b/src/ls.c
index 6bd680e15..ca09ead8d 100644
--- a/src/ls.c
+++ b/src/ls.c
@@ -45,9 +45,7 @@
#if HAVE_STROPTS_H
# include <stropts.h>
#endif
-#if HAVE_SYS_IOCTL_H
-# include <sys/ioctl.h>
-#endif
+#include <sys/ioctl.h>
#ifdef WINSIZE_IN_PTEM
# include <sys/stream.h>
diff --git a/src/operand2sig.c b/src/operand2sig.c
index 5b26a75fb..d0500cdac 100644
--- a/src/operand2sig.c
+++ b/src/operand2sig.c
@@ -25,9 +25,7 @@
#include <stdio.h>
#include <sys/types.h>
-#if HAVE_SYS_WAIT_H
-# include <sys/wait.h>
-#endif
+#include <sys/wait.h>
#ifndef WIFSIGNALED
# define WIFSIGNALED(s) (((s) & 0xFFFF) - 1 < (unsigned int) 0xFF)
#endif
diff --git a/src/pathchk.c b/src/pathchk.c
index d9f6c0a64..62c20941c 100644
--- a/src/pathchk.c
+++ b/src/pathchk.c
@@ -18,9 +18,7 @@
#include <stdio.h>
#include <getopt.h>
#include <sys/types.h>
-#if HAVE_WCHAR_H
-# include <wchar.h>
-#endif
+#include <wchar.h>
#include "system.h"
#include "error.h"
diff --git a/src/stat.c b/src/stat.c
index 5063e7086..e6de541e2 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 <sys/param.h>
# include <sys/mount.h>
-# 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 <netinet/in.h>
# include <nfs/nfs_clnt.h>
diff --git a/src/stty.c b/src/stty.c
index 8c6920fe1..71045c281 100644
--- a/src/stty.c
+++ b/src/stty.c
@@ -42,9 +42,7 @@
#if HAVE_STROPTS_H
# include <stropts.h>
#endif
-#ifdef HAVE_SYS_IOCTL_H
-# include <sys/ioctl.h>
-#endif
+#include <sys/ioctl.h>
#ifdef WINSIZE_IN_PTEM
# include <sys/stream.h>
diff --git a/src/timeout.c b/src/timeout.c
index d1ea06d83..c6f65258b 100644
--- a/src/timeout.c
+++ b/src/timeout.c
@@ -49,10 +49,8 @@
#include <stdio.h>
#include <sys/types.h>
#include <signal.h>
+#include <sys/wait.h>
-#if HAVE_SYS_WAIT_H
-# include <sys/wait.h>
-#endif
#ifndef WIFSIGNALED
# define WIFSIGNALED(s) (((s) & 0xFFFF) - 1 < (unsigned int) 0xFF)
#endif