From: Paul Eggert Date: Mon, 14 Apr 2025 03:47:54 +0000 (-0700) Subject: regex: make RE_* usable in #if X-Git-Url: https://gitweb.git.savannah.gnu.org/gitweb/?a=commitdiff_plain;h=23c09f69c9d6e43d614934c4de94c294a811fdf0;p=gnulib.git regex: make RE_* usable in #if * lib/regex.h (RE_BACKSLASH_ESCAPE_IN_LISTS): Define to 1ul so that the RE_* macros can be used in #if. --- diff --git a/ChangeLog b/ChangeLog index e202b14530..210be85262 100644 --- a/ChangeLog +++ b/ChangeLog @@ -3,6 +3,8 @@ regex: pacify gcc -Wcalloc-transposed-args * lib/regcomp.c (init_dfa, parse_bracket_exp) (build_charclass_op): + * lib/regex.h (RE_BACKSLASH_ESCAPE_IN_LISTS): + Define to 1ul so that the RE_* macros can be used in #if. * lib/regex_internal.c (create_ci_newstate, create_cd_newstate): * lib/regexec.c (get_subexp, build_trtable): When calling calloc, put size argument last. diff --git a/lib/regex.h b/lib/regex.h index c4c6089a8c..ff7e43b534 100644 --- a/lib/regex.h +++ b/lib/regex.h @@ -73,7 +73,7 @@ typedef unsigned long int reg_syntax_t; #ifdef __USE_GNU /* If this bit is not set, then \ inside a bracket expression is literal. If set, then such a \ quotes the following character. */ -# define RE_BACKSLASH_ESCAPE_IN_LISTS ((unsigned long int) 1) +# define RE_BACKSLASH_ESCAPE_IN_LISTS 1ul /* If this bit is not set, then + and ? are operators, and \+ and \? are literals.