X-Git-Url: http://erislabs.net/gitweb/?a=blobdiff_plain;ds=inline;f=top%2Fmaint.mk;h=d364934549eb2efa3f1c535891a33388e521e81c;hb=8068b5d283630a295b2929b9dc6a65916b10f52f;hp=4408a4e5ea8a937fcaa9223903e4657685392213;hpb=ff3ad37f89f524e388101930e8bb3aaa1784ddaa;p=gnulib.git diff --git a/top/maint.mk b/top/maint.mk index 4408a4e5e..d36493454 100644 --- a/top/maint.mk +++ b/top/maint.mk @@ -405,11 +405,11 @@ sc_prohibit_HAVE_MBRTOWC: $(_sc_search_regexp) # To use this "command" macro, you must first define two shell variables: -# h: the header, enclosed in <> or "" +# h: the header name, with no enclosing <> or "" # re: a regular expression that matches IFF something provided by $h is used. define _sc_header_without_use dummy=; : so we do not need a semicolon before each use; \ - h_esc=`echo "$$h"|sed 's/\./\\\\./g'`; \ + h_esc=`echo '[<"]'"$$h"'[">]'|sed 's/\./\\\\./g'`; \ if $(VC_LIST_EXCEPT) | grep -l '\.c$$' > /dev/null; then \ files=$$(grep -l '^# *include '"$$h_esc" \ $$($(VC_LIST_EXCEPT) | grep '\.c$$')) && \ @@ -422,42 +422,42 @@ endef # Prohibit the inclusion of assert.h without an actual use of assert. sc_prohibit_assert_without_use: - @h='' re='\ sc_prohibit_hash_without_use: - @h='"hash.h"' \ + @h='hash.h' \ re='$(_hash_fn)|$(_hash_struct)'\ $(_sc_header_without_use) sc_prohibit_cloexec_without_use: - @h='"cloexec.h"' re='\<(set_cloexec_flag|dup_cloexec) *\(' \ + @h='cloexec.h' re='\<(set_cloexec_flag|dup_cloexec) *\(' \ $(_sc_header_without_use) sc_prohibit_posixver_without_use: - @h='"posixver.h"' re='\' \ @@ -740,7 +752,8 @@ gl_other_headers_ ?= \ gl_extract_significant_defines_ = \ /^\# *define ([^_ (][^ (]*)(\s*\(|\s+\w+)/\ && $$2 !~ /(?:rpl_|_used_without_)/\ - && $$1 !~ /^(?:NSIG|ATTRIBUTE_NORETURN)$$/\ + && $$1 !~ /^(?:NSIG)$$/\ + && $$1 !~ /^(?:SA_RESETHAND|SA_RESTART)$$/\ and print $$1 # Create a list of regular expressions matching the names @@ -752,7 +765,6 @@ define def_sym_regex perl -lne '$(gl_extract_significant_defines_)' $$f; \ done; \ ) | sort -u \ - | grep -Ev '^ATTRIBUTE_NORETURN' \ | sed 's/^/^ *# *(define|undef) */;s/$$/\\>/' endef @@ -1135,11 +1147,11 @@ sc_Wundef_boolean: $(_sc_search_regexp) # Even if you use pathmax.h to guarantee that PATH_MAX is defined, it might -# not be constant. In general, use PATH_MAX as a limit, not an array -# allocation bound. -sc_prohibit_path_max_array: - @prohibit='\[PATH''_MAX' \ - halt='Avoid arrays of size PATH_MAX' \ +# not be constant, or might overflow a stack. In general, use PATH_MAX as +# a limit, not an array or alloca size. +sc_prohibit_path_max_allocation: + @prohibit='(\balloca *\([^)]*|\[[^]]*)PATH_MAX' \ + halt='Avoid stack allocations of size PATH_MAX' \ $(_sc_search_regexp) sc_vulnerable_makefile_CVE-2009-4029: @@ -1415,7 +1427,7 @@ ifeq (a,b) # do not need to be marked. Symbols matching `__.*' are # reserved by the compiler, so are automatically excluded below. _gl_TS_unmarked_extern_functions ?= main usage -_gl_TS_function_match ?= /^(?:$(_gl_TS_extern)) +.*?(\S+) +\(/ +_gl_TS_function_match ?= /^(?:$(_gl_TS_extern)) +.*?(\S+) *\(/ # If your project uses a macro like "XTERN", then put # the following in cfg.mk to override this default: