Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/share/mk we use C99 syntax but with some GCC extensions, so ...



details:   https://anonhg.NetBSD.org/src/rev/2febff5809ce
branches:  trunk
changeset: 329506:2febff5809ce
user:      plunky <plunky%NetBSD.org@localhost>
date:      Tue May 27 16:14:03 2014 +0000

description:
we use C99 syntax but with some GCC extensions, so signal that depending
on the compiler in use

diffstat:

 share/mk/bsd.sys.mk |  12 +++++-------
 1 files changed, 5 insertions(+), 7 deletions(-)

diffs (26 lines):

diff -r 6dd5c7917e47 -r 2febff5809ce share/mk/bsd.sys.mk
--- a/share/mk/bsd.sys.mk       Tue May 27 16:10:33 2014 +0000
+++ b/share/mk/bsd.sys.mk       Tue May 27 16:14:03 2014 +0000
@@ -1,4 +1,4 @@
-#      $NetBSD: bsd.sys.mk,v 1.237 2014/01/28 19:41:52 martin Exp $
+#      $NetBSD: bsd.sys.mk,v 1.238 2014/05/27 16:14:03 plunky Exp $
 #
 # Build definitions used for NetBSD source tree builds.
 
@@ -20,12 +20,10 @@
 CPPFLAGS+=     -Wp,-iremap,${X11SRCDIR}:/usr/xsrc
 .endif
 
-# Enable c99 mode by default.
-# This has the side effect of complaining for missing prototypes
-# implicit type declarations and missing return statements.
-.if defined(HAVE_GCC) || defined(HAVE_LLVM)
-CFLAGS+=       -std=gnu99
-.endif
+# NetBSD sources use C99 style, with some GCC extensions.
+CFLAGS+=       ${${ACTIVE_CC} == "clang":? -std=gnu99 :}
+CFLAGS+=       ${${ACTIVE_CC} == "gcc":? -std=gnu99 :}
+CFLAGS+=       ${${ACTIVE_CC} == "pcc":? -std=gnu99 :}
 
 .if defined(WARNS)
 CFLAGS+=       ${${ACTIVE_CC} == "clang":? -Wno-sign-compare -Wno-pointer-sign :}



Home | Main Index | Thread Index | Old Index