diff options
author | Dan Nicolaescu <dann@ics.uci.edu> | 2010-06-01 19:32:43 -0700 |
---|---|---|
committer | Dan Nicolaescu <dann@ics.uci.edu> | 2010-06-01 19:32:43 -0700 |
commit | 8923d6176b785c2d800d27960d55a7dec3fed71b (patch) | |
tree | ce5f502a781c7e2d1d86d5055ddc748ae2099828 /configure.in | |
parent | 3aeb940248b61c5506e855bc7c4d57e115d4160d (diff) | |
download | emacs-8923d6176b785c2d800d27960d55a7dec3fed71b.tar.gz |
Fix alloca definition when using gcc on non-gnu systems.
* configure.in: Use the code sequence indicated by "info autoconf"
for alloca (bug#6170).
Diffstat (limited to 'configure.in')
-rw-r--r-- | configure.in | 22 |
1 files changed, 13 insertions, 9 deletions
diff --git a/configure.in b/configure.in index 9694a91739f..2e31641f25f 100644 --- a/configure.in +++ b/configure.in @@ -3604,15 +3604,19 @@ extern char *getenv (); #ifdef HAVE_STDLIB_H #include <stdlib.h> #endif -#ifndef __GNUC__ -# ifdef HAVE_ALLOCA_H -# include <alloca.h> -# else /* AIX files deal with #pragma. */ -# ifndef alloca /* predefined by HP cc +Olibcalls */ -char *alloca (); -# endif -# endif /* HAVE_ALLOCA_H */ -#endif /* __GNUC__ */ +#ifdef HAVE_ALLOCA_H +# include <alloca.h> +#elif defined __GNUC__ +# define alloca __builtin_alloca +#elif defined _AIX +# define alloca __alloca +#else +# include <stddef.h> +# ifdef __cplusplus +extern "C" +# endif +void *alloca (size_t); +#endif #ifndef HAVE_SIZE_T typedef unsigned size_t; #endif |