From 0caac6fe3dc6eba0cbb3b5e0127635006cb1e4c7 Mon Sep 17 00:00:00 2001 From: James Youngman Date: Mon, 20 Jun 2011 00:39:20 +0100 Subject: [PATCH] Take gnulib-tool's advice about which header files to include. * locate/locate.c: Include instead of "regex.h". Include "fnmatch.h" instead of (because we use fnmatch-gnu). Include "gettext.h". * lib/regexprops.c: Include instead of "regex.h". * find/tree.c: Include "gettext.h". Include "fnmatch.h" instead of (because we use fnmatch-gnu). * find/parser.c: Include "gettext.h" and . Include "fnmatch.h" instead of (because we use fnmatch-gnu). * find/pred.c: Likewise. * find/exec.c: Include "gettext.h". * find/find.c: Likewise. * find/fstype.c: Likewise. * find/ftsfind.c: Likewise. * find/print.c: Likewise. * lib/buildcmd.c: Likewise. * lib/fdleak.c: Likewise. * lib/findutils-version.c: Likewise. * lib/regextype.c: Likewise. * lib/safe-atoi.c: Likewise. * find/util.c: Likewise. * locate/bigram.c: Likewise. * locate/code.c: Likewise. * locate/frcode.c: Likewise. * locate/word_io.c: Likewise. * xargs/xargs.c: Likewise. * find/Makefile.am: Add a comment explaining why gnulib-tool advised us to use each library. --- ChangeLog | 31 +++++++++++++++++++++++++++++++ find/Makefile.am | 9 ++++++++- find/exec.c | 1 + find/find.c | 1 + find/fstype.c | 1 + find/ftsfind.c | 1 + find/parser.c | 4 +++- find/pred.c | 3 ++- find/print.c | 1 + find/tree.c | 3 ++- find/util.c | 1 + lib/buildcmd.c | 1 + lib/fdleak.c | 1 + lib/findutils-version.c | 2 ++ lib/regexprops.c | 2 +- lib/regextype.c | 1 + lib/safe-atoi.c | 1 + locate/bigram.c | 1 + locate/code.c | 1 + locate/frcode.c | 1 + locate/locate.c | 5 +++-- locate/word_io.c | 1 + xargs/xargs.c | 1 + 23 files changed, 67 insertions(+), 7 deletions(-) diff --git a/ChangeLog b/ChangeLog index 4caf0060..a5cb9783 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,34 @@ +2011-06-20 James Youngman + + Take gnulib-tool's advice about which header files to include. + * locate/locate.c: Include instead of "regex.h". + Include "fnmatch.h" instead of (because we use + fnmatch-gnu). Include "gettext.h". + * lib/regexprops.c: Include instead of "regex.h". + * find/tree.c: Include "gettext.h". Include "fnmatch.h" instead + of (because we use fnmatch-gnu). + * find/parser.c: Include "gettext.h" and . Include + "fnmatch.h" instead of (because we use fnmatch-gnu). + * find/pred.c: Likewise. + * find/exec.c: Include "gettext.h". + * find/find.c: Likewise. + * find/fstype.c: Likewise. + * find/ftsfind.c: Likewise. + * find/print.c: Likewise. + * lib/buildcmd.c: Likewise. + * lib/fdleak.c: Likewise. + * lib/findutils-version.c: Likewise. + * lib/regextype.c: Likewise. + * lib/safe-atoi.c: Likewise. + * find/util.c: Likewise. + * locate/bigram.c: Likewise. + * locate/code.c: Likewise. + * locate/frcode.c: Likewise. + * locate/word_io.c: Likewise. + * xargs/xargs.c: Likewise. + * find/Makefile.am: Add a comment explaining why gnulib-tool + advised us to use each library. + 2011-06-19 James Youngman Update gnulib. diff --git a/find/Makefile.am b/find/Makefile.am index 67fd682a..c0f7c3bb 100644 --- a/find/Makefile.am +++ b/find/Makefile.am @@ -31,7 +31,14 @@ endif # man_MANS is not always the same, we want to distribute all of those files. EXTRA_DIST = defs.h sharefile.h print.h find.1 ftsfind.1 oldfind.1 INCLUDES = -I../gl/lib -I$(top_srcdir)/lib -I$(top_srcdir)/gl/lib -I../intl -DLOCALEDIR=\"$(localedir)\" -LDADD = ./libfindtools.a ../lib/libfind.a ../gl/lib/libgnulib.a $(LIBINTL) $(LIB_CLOCK_GETTIME) $(LIB_EACCESS) $(LIB_SELINUX) $(LIB_CLOSE) $(MODF_LIBM) $(FINDLIBS) +LDADD = ./libfindtools.a ../lib/libfind.a ../gl/lib/libgnulib.a $(LIBINTL) $(LIB_CLOCK_GETTIME) $(LIB_EACCESS) $(LIB_SELINUX) $(LIB_CLOSE) $(MODF_LIBM) $(FINDLIBS) $(GETHOSTNAME_LIB) $(LIB_EACCESS) +# gnulib advises we link against because we use : +# $(GETHOSTNAME_LIB) uname +# $(LIB_CLOCK_GETTIME) (some inditrect dependency) +# $(LIB_EACCESS) faccessat +# $(LIB_SELINUX) selinux-h +# $(MODF_LIBM) modf + SUBDIRS = . testsuite #$(PROGRAMS): ../lib/libfind.a diff --git a/find/exec.c b/find/exec.c index 989f207a..927081a4 100644 --- a/find/exec.c +++ b/find/exec.c @@ -30,6 +30,7 @@ /* gnulib headers */ #include "error.h" #include "dirname.h" +#include "gettext.h" #include "xalloc.h" #include "cloexec.h" #include "save-cwd.h" diff --git a/find/find.c b/find/find.c index c1b57f22..c3e05c57 100644 --- a/find/find.c +++ b/find/find.c @@ -47,6 +47,7 @@ #include "savedirinfo.h" #include "buildcmd.h" #include "dirname.h" +#include "gettext.h" #include "xgetcwd.h" #include "error.h" #include "fdleak.h" diff --git a/find/fstype.c b/find/fstype.c index e9230fb9..32a557a4 100644 --- a/find/fstype.c +++ b/find/fstype.c @@ -59,6 +59,7 @@ extern int errno; #include "extendbuf.h" #include "mountlist.h" #include "error.h" +#include "gettext.h" diff --git a/find/ftsfind.c b/find/ftsfind.c index 51d5749c..dcb81ca6 100644 --- a/find/ftsfind.c +++ b/find/ftsfind.c @@ -54,6 +54,7 @@ #include "dircallback.h" #include "cloexec.h" #include "fdleak.h" +#include "gettext.h" #include "unused-result.h" #if ENABLE_NLS diff --git a/find/parser.c b/find/parser.c index d10e5ee5..6a04e517 100644 --- a/find/parser.c +++ b/find/parser.c @@ -26,8 +26,9 @@ #include #include #include -#include #include +#include +#include "fnmatch.h" #include "mountlist.h" #include "modechange.h" #include "xstrtol.h" @@ -40,6 +41,7 @@ #include "fts_.h" #include "parse-datetime.h" #include "error.h" +#include "gettext.h" #include "findutils-version.h" #include "safe-atoi.h" #include "fdleak.h" diff --git a/find/pred.c b/find/pred.c index b17c4f95..9f5b8a45 100644 --- a/find/pred.c +++ b/find/pred.c @@ -19,7 +19,6 @@ #include #include "defs.h" -#include #include #include #include @@ -42,6 +41,8 @@ #include "stat-size.h" #include "dircallback.h" #include "error.h" +#include "fnmatch.h" +#include "gettext.h" #include "areadlink.h" #include diff --git a/find/print.c b/find/print.c index b1f5d68a..0e15123d 100644 --- a/find/print.c +++ b/find/print.c @@ -37,6 +37,7 @@ #include "dirname.h" #include "error.h" #include "filemode.h" +#include "gettext.h" #include "human.h" #include "printquoted.h" #include "stat-size.h" diff --git a/find/tree.c b/find/tree.c index 0177aac5..d525b317 100644 --- a/find/tree.c +++ b/find/tree.c @@ -21,10 +21,11 @@ #include #include -#include #include "xalloc.h" #include "error.h" +#include "fnmatch.h" +#include "gettext.h" #if ENABLE_NLS diff --git a/find/util.c b/find/util.c index f639d0b3..b59e7030 100644 --- a/find/util.c +++ b/find/util.c @@ -33,6 +33,7 @@ #include "quotearg.h" #include "timespec.h" #include "error.h" +#include "gettext.h" #include "verify.h" #include "fdleak.h" #include "dircallback.h" diff --git a/lib/buildcmd.c b/lib/buildcmd.c index 785c093a..15bb91ff 100644 --- a/lib/buildcmd.c +++ b/lib/buildcmd.c @@ -25,6 +25,7 @@ #include #include +#include "gettext.h" #if ENABLE_NLS # include diff --git a/lib/fdleak.c b/lib/fdleak.c index fa3007a1..42ee7c22 100644 --- a/lib/fdleak.c +++ b/lib/fdleak.c @@ -33,6 +33,7 @@ #include "dirent-safer.h" #include "extendbuf.h" #include "cloexec.h" +#include "gettext.h" #include "safe-atoi.h" #include "fdleak.h" #include "error.h" diff --git a/lib/findutils-version.c b/lib/findutils-version.c index 7a9dca92..d37b247c 100644 --- a/lib/findutils-version.c +++ b/lib/findutils-version.c @@ -16,6 +16,8 @@ */ #include + +#include "gettext.h" #include "version-etc.h" #include "findutils-version.h" diff --git a/lib/regexprops.c b/lib/regexprops.c index ed7f17b5..c0a8e0cb 100644 --- a/lib/regexprops.c +++ b/lib/regexprops.c @@ -33,8 +33,8 @@ #include #include #include +#include -#include "regex.h" #include "regextype.h" #include "progname.h" diff --git a/lib/regextype.c b/lib/regextype.c index efc06099..35106e55 100644 --- a/lib/regextype.c +++ b/lib/regextype.c @@ -26,6 +26,7 @@ #include #include +#include "gettext.h" #include "regextype.h" #include "regex.h" #include "quote.h" diff --git a/lib/safe-atoi.c b/lib/safe-atoi.c index 5a68bd58..9e08ab2b 100644 --- a/lib/safe-atoi.c +++ b/lib/safe-atoi.c @@ -20,6 +20,7 @@ #include #include +#include "gettext.h" #include "safe-atoi.h" #include "quotearg.h" #include "error.h" diff --git a/locate/bigram.c b/locate/bigram.c index 477e3925..03bc47b4 100644 --- a/locate/bigram.c +++ b/locate/bigram.c @@ -40,6 +40,7 @@ #include #include +#include "gettext.h" #include "progname.h" #include "closeout.h" diff --git a/locate/code.c b/locate/code.c index d1c6ce5a..48cc5815 100644 --- a/locate/code.c +++ b/locate/code.c @@ -73,6 +73,7 @@ #include "locatedb.h" #include "closeout.h" +#include "gettext.h" #include "xalloc.h" #include "progname.h" #include "error.h" diff --git a/locate/frcode.c b/locate/frcode.c index c5084725..0cca9db5 100644 --- a/locate/frcode.c +++ b/locate/frcode.c @@ -98,6 +98,7 @@ #endif +#include "gettext.h" #include "locatedb.h" #include #include "error.h" diff --git a/locate/locate.c b/locate/locate.c index 611b18d4..a1a00784 100644 --- a/locate/locate.c +++ b/locate/locate.c @@ -67,7 +67,6 @@ #include /* for setgroups() */ #include #include -#include #include #include @@ -92,6 +91,7 @@ #include #include +#include #if ENABLE_NLS @@ -116,6 +116,8 @@ # define N_(String) String #endif +#include "fnmatch.h" +#include "gettext.h" #include "locatedb.h" #include "progname.h" #include "xalloc.h" @@ -123,7 +125,6 @@ #include "human.h" #include "dirname.h" #include "closeout.h" -#include "regex.h" #include "quotearg.h" #include "printquoted.h" #include "regextype.h" diff --git a/locate/word_io.c b/locate/word_io.c index 50dab36e..4bb297cc 100644 --- a/locate/word_io.c +++ b/locate/word_io.c @@ -25,6 +25,7 @@ #include #include "error.h" +#include "gettext.h" #include "quotearg.h" #include "byteswap.h" #include "locatedb.h" diff --git a/xargs/xargs.c b/xargs/xargs.c index eaa33e0f..0c59c6df 100644 --- a/xargs/xargs.c +++ b/xargs/xargs.c @@ -57,6 +57,7 @@ #include #include +#include "gettext.h" #include "verify.h" #include "progname.h" #include "quotearg.h"