diff options
author | Jim Meyering <meyering@redhat.com> | 2008-06-03 08:34:09 +0200 |
---|---|---|
committer | Jim Meyering <meyering@redhat.com> | 2008-06-03 09:15:00 +0200 |
commit | 896b672499d6a31a6caf85411bcbdde6edc57668 (patch) | |
tree | 27683a9e32614e6ea09de5e06d7967164593bbd7 /maint.mk | |
parent | 1b0b6c8d08785bf9b05931371259ac710a806e51 (diff) | |
download | coreutils-896b672499d6a31a6caf85411bcbdde6edc57668.tar.xz |
use gnulib's progname module
* bootstrap.conf (gnulib_modules): Add progname.
* src/*.c (program_name): Remove declaration.
* (main): Call set_program_name rather than setting program_name.
* src/nice.c (main): Cast program_name to "(char *)".
* src/prog-fprintf.c: Include "system.h"
* src/system.h: Include "progname.h".
* maint.mk (sc_program_name): Adjust rule.
Suggestion from Eric Blake.
Diffstat (limited to 'maint.mk')
-rw-r--r-- | maint.mk | 6 |
1 files changed, 3 insertions, 3 deletions
@@ -342,13 +342,13 @@ sc_system_h_headers: .re-list fi # Ensure that each .c file containing a "main" function also -# declares "char *program_name", with or without "const". +# calls set_program_name. sc_program_name: @if $(VC_LIST_EXCEPT) | grep '\.c$$' > /dev/null; then \ files=$$(grep -l '^main *(' $$($(VC_LIST_EXCEPT) | grep '\.c$$')); \ - grep -EL '^(char const|(const )?char) \*program_name;' $$files \ + grep -LE 'set_program_name *\(m?argv\[0\]\);' $$files \ | grep . && \ - { echo '$(ME): the above files do not declare program_name' \ + { echo '$(ME): the above files do not call set_program_name' \ 1>&2; exit 1; } || :; \ else :; \ fi |