From: Paul Eggert Date: Wed, 2 Jan 2013 00:05:43 +0000 (-0800) Subject: regex: support Gawk, which never uses alloca X-Git-Tag: v0.1~272 X-Git-Url: https://gitweb.git.savannah.gnu.org/gitweb/?a=commitdiff_plain;h=eba68811dda2e91520de62b4f717b745edee64ae;p=gnulib.git regex: support Gawk, which never uses alloca * lib/regex_internal.h [!_LIBC && !HAVE_ALLOCA]: Do not include in this case. Gawk doesn't supply a substitute alloca.h and doesn't need one. --- diff --git a/ChangeLog b/ChangeLog index cab9521474..cbbc5b43fc 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,5 +1,10 @@ 2013-01-01 Paul Eggert + regex: support Gawk, which never uses alloca + * lib/regex_internal.h [!_LIBC && !HAVE_ALLOCA]: + Do not include in this case. Gawk doesn't supply a substitute + alloca.h and doesn't need one. + regex: port __libc_lock_define usage to C89 * lib/regex_internal.h (__libc_lock_define) [!_LIBC]: Remove. (struct re_dfa_t): Use #ifdef instead. '__libc_lock_define (, lock)' diff --git a/lib/regex_internal.h b/lib/regex_internal.h index 43fae40eeb..fa93382562 100644 --- a/lib/regex_internal.h +++ b/lib/regex_internal.h @@ -445,7 +445,9 @@ static unsigned int re_string_context_at (const re_string_t *input, Idx idx, #define re_string_skip_bytes(pstr,idx) ((pstr)->cur_idx += (idx)) #define re_string_set_index(pstr,idx) ((pstr)->cur_idx = (idx)) -#include +#if defined _LIBC || HAVE_ALLOCA +# include +#endif #ifndef _LIBC # if HAVE_ALLOCA