Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/include later versions of pcc may define __GNUC__ for compat...
details: https://anonhg.NetBSD.org/src/rev/12dd5db8d402
branches: trunk
changeset: 755317:12dd5db8d402
user: plunky <plunky%NetBSD.org@localhost>
date: Tue Jun 01 08:42:56 2010 +0000
description:
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:
include/stdlib.h | 4 ++--
1 files changed, 2 insertions(+), 2 deletions(-)
diffs (18 lines):
diff -r 20aaeebb366b -r 12dd5db8d402 include/stdlib.h
--- a/include/stdlib.h Tue Jun 01 06:07:56 2010 +0000
+++ b/include/stdlib.h Tue Jun 01 08:42:56 2010 +0000
@@ -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 @@
#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);
Home |
Main Index |
Thread Index |
Old Index