From: Bruno Haible Date: Mon, 24 May 2010 10:23:03 +0000 (+0200) Subject: regex: Don't require alloca. X-Git-Url: https://pintos-os.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=5a4965c01c8b2aca03846238596c0b9f0ed3ce85;p=pspp regex: Don't require alloca. --- diff --git a/ChangeLog b/ChangeLog index 39a7215b48..1b37e94cdb 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,10 @@ +2010-05-24 Bruno Haible + + regex: Don't require alloca. + * modules/regex (Depends-on): Remove alloca. Add alloca-opt. + * lib/regex_internal.h (alloca): Ensure it's defined even if we call it + only inside if (0). + 2010-05-23 Jim Meyering test-renameat.c: include diff --git a/lib/regex_internal.h b/lib/regex_internal.h index e1b4c61b36..dc94e2cbcb 100644 --- a/lib/regex_internal.h +++ b/lib/regex_internal.h @@ -467,6 +467,8 @@ static unsigned int re_string_context_at (const re_string_t *input, Idx idx, # else /* alloca is implemented with malloc, so just use malloc. */ # define __libc_use_alloca(n) 0 +# undef alloca +# define alloca(n) malloc (n) # endif #endif diff --git a/modules/regex b/modules/regex index f51640621c..36ad446390 100644 --- a/modules/regex +++ b/modules/regex @@ -12,7 +12,7 @@ m4/regex.m4 m4/mbstate_t.m4 Depends-on: -alloca +alloca-opt btowc extensions gettext-h