# HG changeset patch # User Paul Eggert # Date 1357085143 28800 # Node ID 83362ee4d2246e54e5847ce0ce0cbf05da2133a8 # Parent 12cc1647eb5bee9d6da752a8d4311675fb941f07 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 --- 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 --- a/lib/regex_internal.h +++ b/lib/regex_internal.h @@ -445,7 +445,9 @@ #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