Mercurial > hg > octave-kai > gnulib-hg
changeset 17257:83362ee4d224
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.
author | Paul Eggert <eggert@cs.ucla.edu> |
---|---|
date | Tue, 01 Jan 2013 16:05:43 -0800 |
parents | 12cc1647eb5b |
children | 28b073aabf32 |
files | ChangeLog lib/regex_internal.h |
diffstat | 2 files changed, 8 insertions(+), 1 deletions(-) [+] |
line wrap: on
line diff
--- a/ChangeLog +++ b/ChangeLog @@ -1,5 +1,10 @@ 2013-01-01 Paul Eggert <eggert@cs.ucla.edu> + 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)'
--- 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 <alloca.h> +#if defined _LIBC || HAVE_ALLOCA +# include <alloca.h> +#endif #ifndef _LIBC # if HAVE_ALLOCA