diff options
author | Ulrich Drepper <drepper@redhat.com> | 2004-01-14 04:11:30 +0000 |
---|---|---|
committer | Ulrich Drepper <drepper@redhat.com> | 2004-01-14 04:11:30 +0000 |
commit | 82e2ba9a036d0a8a01344271ebd2db69f3b20cc7 (patch) | |
tree | 42f4c0aedfcbf1e2d38d12a311bf8a68ebab90d0 /posix/regex.c | |
parent | 10677727e24ccda9f364aa1f043a97a9204947a9 (diff) | |
download | glibc-82e2ba9a036d0a8a01344271ebd2db69f3b20cc7.tar.gz glibc-82e2ba9a036d0a8a01344271ebd2db69f3b20cc7.tar.xz glibc-82e2ba9a036d0a8a01344271ebd2db69f3b20cc7.zip |
Update.
2004-01-13 Ulrich Drepper <drepper@redhat.com> * posix/regex.c: Support crappy compilers and platforms which have problems with alloca. * posix/regex_internal.h: Likewise. Patch by Paolo Bonzini.
Diffstat (limited to 'posix/regex.c')
-rw-r--r-- | posix/regex.c | 28 |
1 files changed, 28 insertions, 0 deletions
diff --git a/posix/regex.c b/posix/regex.c index f18178a479..4c3826238b 100644 --- a/posix/regex.c +++ b/posix/regex.c @@ -18,6 +18,34 @@ Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA. */ +#ifdef HAVE_CONFIG_H +#include "config.h" +#endif + +#ifdef _AIX +#pragma alloca +#else +# ifndef allocax /* predefined by HP cc +Olibcalls */ +# ifdef __GNUC__ +# define alloca(size) __builtin_alloca (size) +# else +# if HAVE_ALLOCA_H +# include <alloca.h> +# else +# ifdef __hpux + void *alloca (); +# else +# if !defined __OS2__ && !defined WIN32 + char *alloca (); +# else +# include <malloc.h> /* OS/2 defines alloca in here */ +# endif +# endif +# endif +# endif +# endif +#endif + #ifdef _LIBC /* We have to keep the namespace clean. */ # define regfree(preg) __regfree (preg) |