summaryrefslogtreecommitdiff
path: root/include/libiberty.h
diff options
context:
space:
mode:
authorghazi <ghazi@138bc75d-0d04-0410-961f-82ee72b054a4>2001-03-31 18:59:56 +0000
committerghazi <ghazi@138bc75d-0d04-0410-961f-82ee72b054a4>2001-03-31 18:59:56 +0000
commita735a1410598023274d56c3636d61bffd8d3fb42 (patch)
tree68ea74209b9d94ef6a9ffafe09d4fb89a5bfce2e /include/libiberty.h
parentfdda3fb9a0d8a3ea3dc15f7fc1decf0b8fc7756b (diff)
downloadgcc-a735a1410598023274d56c3636d61bffd8d3fb42.tar.gz
* libiberty.h (alloca): Handle setting C_ALLOCA.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@40978 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'include/libiberty.h')
-rw-r--r--include/libiberty.h7
1 files changed, 6 insertions, 1 deletions
diff --git a/include/libiberty.h b/include/libiberty.h
index c7a4d060c11..effe5f628cc 100644
--- a/include/libiberty.h
+++ b/include/libiberty.h
@@ -238,15 +238,20 @@ extern int vasprintf PARAMS ((char **, const char *, va_list))
/* Drastically simplified alloca configurator. If we're using GCC,
we use __builtin_alloca; otherwise we use the C alloca. The C
alloca is always available. You can override GCC by defining
- USE_C_ALLOCA yourself. */
+ USE_C_ALLOCA yourself. The canonical autoconf macro C_ALLOCA is
+ also set/unset as it is often used to indicate whether code needs
+ to call alloca(0). */
extern PTR C_alloca PARAMS((size_t));
#undef alloca
#if GCC_VERSION >= 2000 && !defined USE_C_ALLOCA
# define alloca(x) __builtin_alloca(x)
+# undef C_ALLOCA
#else
# define alloca(x) C_alloca(x)
# undef USE_C_ALLOCA
# define USE_C_ALLOCA 1
+# undef C_ALLOCA
+# define C_ALLOCA 1
#endif
#ifdef __cplusplus