* top/maint.mk (sc_prohibit_strcmp): Detect strcmp()!=0, as
documented. Also, detect strcmp((expr),expr) == 0. Exempt the
definition of STRNEQ.
Signed-off-by: Eric Blake <eblake@redhat.com>
2011-01-06 Eric Blake <eblake@redhat.com>
+ maint.mk: improve sc_prohibit_strcmp regex
+ * top/maint.mk (sc_prohibit_strcmp): Detect strcmp()!=0, as
+ documented. Also, detect strcmp((expr),expr) == 0. Exempt the
+ definition of STRNEQ.
+
signal: work around Haiku issue with SIGBUS
* lib/siglist.h: Add comment.
* lib/sig2str.c (numname_table): Swap SIGBUS order, to match
# Use STREQ rather than comparing strcmp == 0, or != 0.
sc_prohibit_strcmp:
- @grep -nE '! *str''cmp *\(|\<str''cmp *\([^)]+\) *==' \
+ @grep -nE '! *str''cmp *\(|\<str''cmp *\(.+\) *[!=]=' \
$$($(VC_LIST_EXCEPT)) \
- | grep -vE ':# *define STREQ\(' && \
- { echo '$(ME): use STREQ in place of the above uses of str''cmp' \
+ | grep -vE ':# *define STRN?EQ\(' && \
+ { echo '$(ME): replace str''cmp calls above with STREQ/STRNEQ' \
1>&2; exit 1; } || :
# Pass EXIT_*, not number, to usage, exit, and error (when exiting)