]> Savannah Git Hosting - gnulib.git/commitdiff
regex: make RE_* usable in #if
authorPaul Eggert <eggert@cs.ucla.edu>
Mon, 14 Apr 2025 03:47:54 +0000 (20:47 -0700)
committerPaul Eggert <eggert@cs.ucla.edu>
Mon, 14 Apr 2025 03:48:30 +0000 (20:48 -0700)
* lib/regex.h (RE_BACKSLASH_ESCAPE_IN_LISTS):
Define to 1ul so that the RE_* macros can be used in #if.

ChangeLog
lib/regex.h

index e202b14530a665c69550b8b07bb35ed9807a4689..210be85262136a9080aa1064c99d34463be68edc 100644 (file)
--- 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.
index c4c6089a8c8a50e441496881c8506a87b0fb8c56..ff7e43b534a544e65d4e49ae2fc511ea5e4ddafb 100644 (file)
@@ -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.