From: Paul Eggert Date: Fri, 24 Jan 2020 08:32:32 +0000 (-0800) Subject: regex: port to Gawk on nonstandard platforms X-Git-Tag: v1.0~4329 X-Git-Url: https://gitweb.git.savannah.gnu.org/gitweb/?a=commitdiff_plain;h=535ba3b016977db08b76bb5ebed84ede88d032a5;p=gnulib.git regex: port to Gawk on nonstandard platforms * lib/regex_internal.h (ULONG_WIDTH): Define if not already defined. This is useful for Gawk, which does not use the Gnulib stdlib-h module. Problem reported by Arnold Robbins in: https://lists.gnu.org/r/bug-gnulib/2020-01/msg00138.html --- diff --git a/ChangeLog b/ChangeLog index 2336126b09..3b4d32dc63 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,11 @@ +2020-01-24 Paul Eggert + + regex: port to Gawk on nonstandard platforms + * lib/regex_internal.h (ULONG_WIDTH): Define if not already defined. + This is useful for Gawk, which does not use the Gnulib stdlib-h + module. Problem reported by Arnold Robbins in: + https://lists.gnu.org/r/bug-gnulib/2020-01/msg00138.html + 2020-01-21 Paul Eggert regex: fix bug with >=16 subexpressions diff --git a/lib/regex_internal.h b/lib/regex_internal.h index 13e15e21ec..6d436fde1e 100644 --- a/lib/regex_internal.h +++ b/lib/regex_internal.h @@ -141,6 +141,9 @@ #ifndef SSIZE_MAX # define SSIZE_MAX ((ssize_t) (SIZE_MAX / 2)) #endif +#ifndef ULONG_WIDTH +# define ULONG_WIDTH (CHAR_BIT * sizeof (unsigned long int)) +#endif /* The type of indexes into strings. This is signed, not size_t, since the API requires indexes to fit in regoff_t anyway, and using