summaryrefslogtreecommitdiff
path: root/lib/alloca_.h
diff options
context:
space:
mode:
Diffstat (limited to 'lib/alloca_.h')
-rw-r--r--lib/alloca_.h40
1 files changed, 20 insertions, 20 deletions
diff --git a/lib/alloca_.h b/lib/alloca_.h
index 10995510e252..af274b9e7538 100644
--- a/lib/alloca_.h
+++ b/lib/alloca_.h
@@ -1,6 +1,6 @@
/* Memory allocation on the stack.
- Copyright (C) 1995, 1999, 2001, 2002, 2003, 2004 Free Software
+ Copyright (C) 1995, 1999, 2001-2004, 2006-2007 Free Software
Foundation, Inc.
This program is free software; you can redistribute it and/or modify it
@@ -15,15 +15,13 @@
You should have received a copy of the GNU General Public
License along with this program; if not, write to the Free Software
- Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307,
+ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301,
USA. */
-/* When this file is included, it may be preceded only by preprocessor
- declarations. Thanks to AIX. Therefore we include it right after
- "config.h", not later. */
-
-#ifndef _ALLOCA_H
-# define _ALLOCA_H
+/* Avoid using the symbol _ALLOCA_H here, as Bison assumes _ALLOCA_H
+ means there is a real alloca function. */
+#ifndef _GL_ALLOCA_H
+#define _GL_ALLOCA_H
/* alloca (N) returns a pointer to N bytes of memory
allocated on the stack, which will last until the function returns.
@@ -36,19 +34,21 @@
request, the program just crashes.
*/
-#ifdef __GNUC__
-# define alloca __builtin_alloca
-#elif defined _AIX
-# define alloca __alloca
-#elif defined _MSC_VER
-# include <malloc.h>
-# define alloca _alloca
-#else
-# include <stddef.h>
-# ifdef __cplusplus
+#ifndef alloca
+# ifdef __GNUC__
+# define alloca __builtin_alloca
+# elif defined _AIX
+# define alloca __alloca
+# elif defined _MSC_VER
+# include <malloc.h>
+# define alloca _alloca
+# else
+# include <stddef.h>
+# ifdef __cplusplus
extern "C"
-# endif
+# endif
void *alloca (size_t);
+# endif
#endif
-#endif /* _ALLOCA_H */
+#endif /* _GL_ALLOCA_H */