diff configure.in @ 108857:8fccefed04ac

Fix alloca definition when using gcc on non-gnu systems. * configure.in: Use the code sequence indicated by "info autoconf" for alloca (bug#6170).
author Dan Nicolaescu <dann@ics.uci.edu>
date Tue, 01 Jun 2010 19:32:43 -0700
parents 0e4f9a46ab2b
children 4e8dcb0d6fe0
line wrap: on
line diff
--- a/configure.in	Wed Jun 02 00:11:49 2010 +0000
+++ b/configure.in	Tue Jun 01 19:32:43 2010 -0700
@@ -3604,15 +3604,19 @@
 #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