summaryrefslogtreecommitdiff
path: root/Xalloca.h
diff options
context:
space:
mode:
authorKaleb Keithley <kaleb@freedesktop.org>2003-11-14 16:48:42 +0000
committerKaleb Keithley <kaleb@freedesktop.org>2003-11-14 16:48:42 +0000
commit5ec315b967cb1ae519f514896f0b48fb5407f863 (patch)
treee4e72bdbe972af362cebc19b9e1b02a4767a04ee /Xalloca.h
parentf2001f5bd5316842106a98b23f09400688575fa3 (diff)
Diffstat (limited to 'Xalloca.h')
-rw-r--r--Xalloca.h14
1 files changed, 9 insertions, 5 deletions
diff --git a/Xalloca.h b/Xalloca.h
index 4eb3d28..f010006 100644
--- a/Xalloca.h
+++ b/Xalloca.h
@@ -27,6 +27,7 @@ other dealings in this Software without prior written authorization
from The Open Group.
*/
+/* $XFree86: xc/include/Xalloca.h,v 3.11 2002/12/01 20:08:41 tsi Exp $ */
/*
* The purpose of this header is to define the macros ALLOCATE_LOCAL and
@@ -82,7 +83,6 @@ from The Open Group.
# else /* NCR */
# define ALLOCATE_LOCAL(size) alloca(size)
# endif
-# define DEALLOCATE_LOCAL(ptr) /* as nothing */
# endif /* defined(__HIGHC__) */
@@ -91,7 +91,6 @@ from The Open Group.
# define alloca __builtin_alloca
# endif /* !alloca */
# define ALLOCATE_LOCAL(size) alloca((int)(size))
-# define DEALLOCATE_LOCAL(ptr) /* as nothing */
# else /* ! __GNUC__ */
/*
@@ -100,22 +99,23 @@ from The Open Group.
* from alloca.h which #defines alloca.
*/
# ifndef NCR
-# if defined(vax) || defined(sun) || defined(apollo) || defined(stellar) || defined(USL) || defined(alloca)
+# if defined(vax) || defined(sun) || defined(apollo) || defined(stellar) || defined(alloca)
/*
* Some System V boxes extract alloca.o from /lib/libPW.a; if you
* 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__
# define __Xnullarg /* as nothing */
# ifndef X_NOT_STDC_ENV
extern void *alloca(__Xnullarg);
# else
extern char *alloca(__Xnullarg);
# endif
+# endif /* __QNX__ */
# endif /* __sgi */
# define ALLOCATE_LOCAL(size) alloca((int)(size))
-# define DEALLOCATE_LOCAL(ptr) /* as nothing */
# endif /* who does alloca */
# endif /* NCR */
# endif /* __GNUC__ */
@@ -130,6 +130,10 @@ from The Open Group.
# define ALLOCATE_LOCAL(_size) ALLOCATE_LOCAL_FALLBACK undefined!
# define DEALLOCATE_LOCAL(_ptr) DEALLOCATE_LOCAL_FALLBACK undefined!
# endif /* defined(ALLOCATE_LOCAL_FALLBACK && DEALLOCATE_LOCAL_FALLBACK) */
-#endif /* !defined(ALLOCATE_LOCAL) */
+#else
+# if !defined(DEALLOCATE_LOCAL)
+# define DEALLOCATE_LOCAL(_ptr) do {} while(0)
+# endif
+#endif /* defined(ALLOCATE_LOCAL) */
#endif /* XALLOCA_H */