]> git.saurik.com Git - bison.git/commitdiff
maint: address sc_prohibit_always-defined_macros.
authorAkim Demaille <demaille@gostai.com>
Sun, 19 Feb 2012 10:40:36 +0000 (11:40 +0100)
committerAkim Demaille <demaille@gostai.com>
Sun, 19 Feb 2012 17:25:24 +0000 (18:25 +0100)
* cfg.mk: No longer skip it, except where EXIT_SUCCESS is used
as a witness for stdlib.h.
Skip this test when appropriate.
* data/yacc.c: Drop a note about why EXIT_SUCCESS is defined here.

Conflicts:

cfg.mk

cfg.mk
data/yacc.c

diff --git a/cfg.mk b/cfg.mk
index d9221ee5678a94585b513ef457f0b91511fa8c88..358631d904e2c83172bdbf7cf469f11b6769d6fd 100644 (file)
--- a/cfg.mk
+++ b/cfg.mk
@@ -39,7 +39,6 @@ url_dir_list = \
 local-checks-to-skip = \
   changelog-check \
   sc_immutable_NEWS                    \
-  sc_prohibit_always-defined_macros    \
   sc_prohibit_always_true_header_tests \
   sc_prohibit_atoi_atof                        \
   sc_prohibit_doubled_word             \
@@ -60,12 +59,15 @@ update-copyright-env = \
   UPDATE_COPYRIGHT_FORCE=1 UPDATE_COPYRIGHT_USE_INTERVALS=1
 
 exclude = $(foreach a,$(1),$(eval exclude_file_name_regexp--sc_$(a)))
-$(call exclude,                                                        \
-  bindtextdomain=^lib/main.c$$                                 \
-  program_name=^lib/main.c$$                                   \
-  prohibit_empty_lines_at_EOF=^src/parse-gram.[ch]$$           \
-  require_config_h_first=^(lib/yyerror|data/(glr|yacc))\.c$$   \
-  space_tab=^tests/(input|c\+\+)\.at$$                         \
-  trailing_blank=^src/parse-gram.[ch]$$                                \
-  unmarked_diagnostics=^djgpp/                                 \
+$(call exclude,                                                                \
+  bindtextdomain=^lib/main.c$$                                         \
+  program_name=^lib/main.c$$                                           \
+  prohibit_always-defined_macros=^data/yacc.c|^djgpp/                  \
+  prohibit_always-defined_macros+=?|^src/(parse-gram.c|system.h)$$     \
+  prohibit_always-defined_macros+=?|^tests/regression.at$$             \
+  prohibit_empty_lines_at_EOF=^src/parse-gram.[ch]$$                   \
+  require_config_h_first=^(lib/yyerror|data/(glr|yacc))\.c$$           \
+  space_tab=^tests/(input|c\+\+)\.at$$                                 \
+  trailing_blank=^src/parse-gram.[ch]$$                                        \
+  unmarked_diagnostics=^djgpp/                                         \
 )
index 3d5350092e7d98ebc56660b256ab14be00118128..d18b2698912de1f469e25eb60d11768200d6ca1f 100644 (file)
@@ -437,6 +437,7 @@ b4_push_if([], [b4_lac_if([], [[
 #    define YYSTACK_ALLOC alloca
 #    if ! defined _ALLOCA_H && ! defined EXIT_SUCCESS && ]b4_c_modern[
 #     include <stdlib.h> /* INFRINGES ON USER NAME SPACE */
+      /* Use EXIT_SUCCESS as a witness for stdlib.h.  */
 #     ifndef EXIT_SUCCESS
 #      define EXIT_SUCCESS 0
 #     endif