summaryrefslogtreecommitdiff
path: root/include/stdlib.h
diff options
context:
space:
mode:
authorplunky <plunky@NetBSD.org>2010-06-01 08:42:56 +0000
committerplunky <plunky@NetBSD.org>2010-06-01 08:42:56 +0000
commitbdbcfb0d2d0aab3c14186c5d34ead4c4fd5cab8e (patch)
tree15260044acaf5b6d7ba3661faa3b95f176aebae1 /include/stdlib.h
parentc1b0e8cc6be7390672d542e5bda8b6325d0627a7 (diff)
later versions of pcc may define __GNUC__ for compatibility reasons, so
having a system definition for alloca is counter productive as it seems fairly common to use #ifdef __GNUC__ #define alloca .. #endif in user-headers (eg see usr.sbin/gspa/gspa/gspa_ass.h) So, defang this definition as we don't otherwise provide alloca on NetBSD
Diffstat (limited to 'include/stdlib.h')
-rw-r--r--include/stdlib.h4
1 files changed, 2 insertions, 2 deletions
diff --git a/include/stdlib.h b/include/stdlib.h
index 7951802f7cf..a2ec46a99f7 100644
--- a/include/stdlib.h
+++ b/include/stdlib.h
@@ -1,4 +1,4 @@
-/* $NetBSD: stdlib.h,v 1.91 2010/02/25 18:37:12 joerg Exp $ */
+/* $NetBSD: stdlib.h,v 1.92 2010/06/01 08:42:56 plunky Exp $ */
/*-
* Copyright (c) 1990, 1993
@@ -242,7 +242,7 @@ int posix_memalign(void **, size_t, size_t);
#if defined(alloca) && (alloca == __builtin_alloca) && \
defined(__GNUC__) && (__GNUC__ < 2)
void *alloca(int); /* built-in for gcc */
-#elif defined(__PCC__)
+#elif defined(__PCC__) && !defined(__GNUC__)
#define alloca(size) __builtin_alloca(size)
#else
void *alloca(size_t);