diff options
author | Jim Meyering <meyering@redhat.com> | 2008-03-19 15:52:26 +0100 |
---|---|---|
committer | Jim Meyering <meyering@redhat.com> | 2008-03-19 16:48:32 +0100 |
commit | 092239c608efa6e266599a5d0117bda9cfb60221 (patch) | |
tree | d5cadcc080db95b8a846f70aa07de9a5ce3daf4b /Makefile.maint | |
parent | 116f832b45bd2c751e8ddf30ad33fb79eab81153 (diff) | |
download | coreutils-092239c608efa6e266599a5d0117bda9cfb60221.tar.xz |
Check for -- and remove -- some unnecessarily included header files.
* Makefile.maint: Add checks for a handful of additional header files.
* src/mktemp.c: Don't include "long-options.h". Not used.
* src/pr.c: Don't include "inttostr.h". Not used.
* src/printenv.c: Don't include "error.h". Not used.
* src/test.c: Don't include "error.h". Not used.
* src/touch.c: Don't include "safe-read.h". Not used.
Diffstat (limited to 'Makefile.maint')
-rw-r--r-- | Makefile.maint | 30 |
1 files changed, 30 insertions, 0 deletions
diff --git a/Makefile.maint b/Makefile.maint index 9f9401b5d..c866cbad7 100644 --- a/Makefile.maint +++ b/Makefile.maint @@ -196,6 +196,36 @@ sc_prohibit_quotearg_without_use: sc_prohibit_quote_without_use: @h='"quote.h"' re='\<quote(_n)? *\(' $(_header_without_use) +# Don't include this header unless you use one of its functions. +sc_prohibit_long_options_without_use: + @h='"long-options.h"' re='\<parse_long_options *\(' \ + $(_header_without_use) + +# Don't include this header unless you use one of its functions. +sc_prohibit_inttostr_without_use: + @h='"inttostr.h"' re='\<(off|[iu]max|uint)tostr *\(' \ + $(_header_without_use) + +# Don't include this header unless you use one of its functions. +sc_prohibit_error_without_use: + @h='"error.h"' \ + re='\<error(_at_line|_print_progname|_one_per_line|_message_count)? *\('\ + $(_header_without_use) + +sc_prohibit_safe_read_without_use: + @h='"safe-read.h"' re='(\<SAFE_READ_ERROR\>|\<safe_read *\()' \ + $(_header_without_use) + +sc_prohibit_argmatch_without_use: + @h='"argmatch.h"' \ + re='(\<(ARRAY_CARDINALITY|X?ARGMATCH(|_TO_ARGUMENT|_VERIFY))\>|\<argmatch(_exit_fn|_(in)?valid) *\()' \ + $(_header_without_use) + +sc_prohibit_root_dev_ino_without_use: + @h='"root-dev-ino.h"' \ + re='(\<ROOT_DEV_INO_(CHECK|WARN)\>|\<get_root_dev_ino *\()' \ + $(_header_without_use) + sc_obsolete_symbols: @grep -nE '\<(HAVE''_FCNTL_H|O''_NDELAY)\>' \ $$($(VC_LIST_EXCEPT)) && \ |