Mercurial > hg > octave-lojdl > gnulib-hg
changeset 16386:bb8c8cc1050d
maint.mk: tell sc_prohibit_strcmp to ding "0 == strcmp (...)", too
* top/maint.mk (sc_prohibit_strcmp): Also prohibit uses of strcmp
uses with "==" *before* the call, e.g., 0 == strcmp (...)
Remove now-unnecessary str''cmp obfuscation.
Suggested by Akim Demaille.
author | Jim Meyering <meyering@redhat.com> |
---|---|
date | Fri, 24 Feb 2012 09:45:54 +0100 |
parents | a9e289a3a38d |
children | 53295e65981f |
files | ChangeLog top/maint.mk |
diffstat | 2 files changed, 11 insertions(+), 2 deletions(-) [+] |
line wrap: on
line diff
--- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,11 @@ +2012-02-24 Jim Meyering <meyering@redhat.com> + + maint.mk: tell sc_prohibit_strcmp to ding "0 == strcmp (...)", too + * top/maint.mk (sc_prohibit_strcmp): Also prohibit uses of strcmp + uses with "==" *before* the call, e.g., 0 == strcmp (...) + Remove now-unnecessary str''cmp obfuscation. + Suggested by Akim Demaille. + 2012-02-24 Bruno Haible <bruno@clisp.org> streq: Rename macro.
--- a/top/maint.mk +++ b/top/maint.mk @@ -303,11 +303,12 @@ $(_sc_search_regexp) # Use STREQ rather than comparing strcmp == 0, or != 0. +sp_ = strcmp *\(.+\) sc_prohibit_strcmp: - @grep -nE '! *str''cmp *\(|\<str''cmp *\(.+\) *[!=]=' \ + @grep -nE '! *strcmp *\(|\<$(sp_) *[!=]=|[!=]= *$(sp_)' \ $$($(VC_LIST_EXCEPT)) \ | grep -vE ':# *define STRN?EQ\(' && \ - { echo '$(ME): replace str''cmp calls above with STREQ/STRNEQ' \ + { echo '$(ME): replace strcmp calls above with STREQ/STRNEQ' \ 1>&2; exit 1; } || : # Pass EXIT_*, not number, to usage, exit, and error (when exiting)