summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJames Youngman <jay@gnu.org>2011-06-07 23:33:54 +0100
committerJames Youngman <jay@gnu.org>2011-06-07 23:33:54 +0100
commite338e2c9db2a2e6bc45688c6b06fec4928da229e (patch)
tree02be1f09df5adf8552e88785b16a5a4d0be9c032
parentc6370aa424afc1373cf64f7bd5bc4c6f49f11b26 (diff)
downloadfindutils-e338e2c9db2a2e6bc45688c6b06fec4928da229e.tar.gz
Don't include sys/param.h where we don't need it.
* xargs/xargs.c: Don't include sys/param.h, we don't use it.
-rw-r--r--ChangeLog3
-rw-r--r--lib/buildcmd.c14
-rw-r--r--lib/listfile.c1
-rw-r--r--xargs/xargs.c1
4 files changed, 11 insertions, 8 deletions
diff --git a/ChangeLog b/ChangeLog
index f1c03d70..70d8cd4b 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,8 @@
2011-06-05 James Youngman <jay@gnu.org>
+ Don't include sys/param.h where we don't need it.
+ * xargs/xargs.c: Don't include sys/param.h, we don't use it.
+
Don't include "stdio-safer.h" where it is not used.
* find/parser.c: Don't include stdio-safer.h, it's not used.
* lib/findutils-version.c: Likewise.
diff --git a/lib/buildcmd.c b/lib/buildcmd.c
index 93b72e05..160e7091 100644
--- a/lib/buildcmd.c
+++ b/lib/buildcmd.c
@@ -41,27 +41,27 @@
# define N_(String) String
#endif
-#ifndef _POSIX_SOURCE
-#include <sys/param.h>
-#endif
-
/* The presence of unistd.h is assumed by gnulib these days, so we
* might as well assume it too.
*/
/* for sysconf() */
#include <unistd.h>
-
#include <assert.h>
/* COMPAT: SYSV version defaults size (and has a max value of) to 470.
We try to make it as large as possible. See bc_get_arg_max() below. */
+
+
+#ifndef _POSIX_SOURCE
+#include <sys/param.h>
+#endif
#if !defined(ARG_MAX) && defined(NCARGS)
-#error "You have an unusual system. Once you remove this error message from buildcmd.c, it should work, but please make sure that DejaGnu is installed on your system and that 'make check' passes before using the findutils programs"
+/* We include sys/param.h in order to detect this case. */
+#error "You have an unusual system. Once you remove this error message from buildcmd.c, it should work, but please make sure that DejaGnu is installed on your system and that 'make check' passes before using the findutils programs. Please mail bug-findutils@gnu.org to tell us about your system."
#define ARG_MAX NCARGS
#endif
-
#include <xalloc.h>
#include <errno.h>
#include <error.h>
diff --git a/lib/listfile.c b/lib/listfile.c
index 81a26326..e7780c92 100644
--- a/lib/listfile.c
+++ b/lib/listfile.c
@@ -57,6 +57,7 @@
/* Get or fake the disk device blocksize.
Usually defined by sys/param.h (if at all). */
+#include <sys/param.h>
#ifndef DEV_BSIZE
# ifdef BSIZE
# define DEV_BSIZE BSIZE
diff --git a/xargs/xargs.c b/xargs/xargs.c
index fa3fc621..2907fc50 100644
--- a/xargs/xargs.c
+++ b/xargs/xargs.c
@@ -37,7 +37,6 @@
#include <fcntl.h>
#include <assert.h>
#include <string.h>
-#include <sys/param.h>
#ifndef LONG_MAX
#define LONG_MAX (~(1 << (sizeof (long) * 8 - 1)))