summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlan Coopersmith <alan.coopersmith@sun.com>2007-10-30 18:44:49 -0700
committerAlan Coopersmith <alan.coopersmith@sun.com>2007-10-30 18:45:01 -0700
commit5ae4d304ecb5fb4af0435c9f2efde3d2da5905d1 (patch)
treebe7b4f8438b8fb59097dd63603d633c43bfd97ea
parent5ccc71161283fdb2c42da1eeb4049650f6a2f429 (diff)
Make Xalloca.h work with Sun C++ compiler
-rw-r--r--Xalloca.h9
1 files changed, 4 insertions, 5 deletions
diff --git a/Xalloca.h b/Xalloca.h
index 67f2671..c561718 100644
--- a/Xalloca.h
+++ b/Xalloca.h
@@ -62,7 +62,8 @@ from The Open Group.
#define XALLOCA_H 1
#ifndef INCLUDE_ALLOCA_H
-# if defined(__SUNPRO_C) /* Need to add more here to match Imake *.cf's */
+/* Need to add more here to match Imake *.cf's */
+# if defined(HAVE_ALLOCA_H) || defined(__SUNPRO_C) || defined(__SUNPRO_CC)
# define INCLUDE_ALLOCA_H
# endif
#endif
@@ -111,16 +112,14 @@ from The Open Group.
* decide that you don't want to use alloca, you might want to fix it here.
*/
/* alloca might be a macro taking one arg (hi, Sun!), so give it one. */
-# ifndef __sgi /* IRIX 5/6 has definition */
-# ifndef __QNX__
+# if !defined(__sgi) && !defined(__QNX__) && !defined(__cplusplus)
# define __Xnullarg /* as nothing */
# ifndef X_NOT_STDC_ENV
extern void *alloca(__Xnullarg);
# else
extern char *alloca(__Xnullarg);
# endif
-# endif /* __QNX__ */
-# endif /* __sgi */
+# endif /* !__sgi && !__QNX && !__cplusplus */
# define ALLOCATE_LOCAL(size) alloca((int)(size))
# endif /* who does alloca */
# endif /* NCR */