Module Name:    src
Committed By:   christos
Date:           Tue May 17 01:12:34 UTC 2011

Modified Files:
        src/share/mk: bsd.kmodule.mk bsd.sys.mk

Log Message:
Enable c99 mode by default.

This has the side effect of complaining for missing prototypes
implicit type declarations and missing return statements.

NB:     I've only ran a build on amd64, so other platforms MI code might break.
        If you can't wait for me to fix them, revert this commit.


To generate a diff of this commit:
cvs rdiff -u -r1.28 -r1.29 src/share/mk/bsd.kmodule.mk
cvs rdiff -u -r1.193 -r1.194 src/share/mk/bsd.sys.mk

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/share/mk/bsd.kmodule.mk
diff -u src/share/mk/bsd.kmodule.mk:1.28 src/share/mk/bsd.kmodule.mk:1.29
--- src/share/mk/bsd.kmodule.mk:1.28	Sun Apr 17 05:47:40 2011
+++ src/share/mk/bsd.kmodule.mk	Mon May 16 21:12:34 2011
@@ -1,4 +1,4 @@
-#	$NetBSD: bsd.kmodule.mk,v 1.28 2011/04/17 09:47:40 mrg Exp $
+#	$NetBSD: bsd.kmodule.mk,v 1.29 2011/05/17 01:12:34 christos Exp $
 
 # We are not building this with PIE
 MKPIE=no
@@ -17,7 +17,6 @@
 CPPFLAGS+=	-nostdinc -I. -I${.CURDIR} -isystem $S -isystem $S/arch
 CPPFLAGS+=	-isystem ${S}/../common/include
 CPPFLAGS+=	-D_KERNEL -D_LKM -D_MODULE
-CPPFLAGS+=	-std=gnu99
 
 # XXX until the kernel is fixed again...
 .if (defined(HAVE_GCC) && ${HAVE_GCC} == 4) || defined(HAVE_PCC)

Index: src/share/mk/bsd.sys.mk
diff -u src/share/mk/bsd.sys.mk:1.193 src/share/mk/bsd.sys.mk:1.194
--- src/share/mk/bsd.sys.mk:1.193	Sat Dec 25 13:56:45 2010
+++ src/share/mk/bsd.sys.mk	Mon May 16 21:12:34 2011
@@ -1,4 +1,4 @@
-#	$NetBSD: bsd.sys.mk,v 1.193 2010/12/25 18:56:45 joerg Exp $
+#	$NetBSD: bsd.sys.mk,v 1.194 2011/05/17 01:12:34 christos Exp $
 #
 # Build definitions used for NetBSD source tree builds.
 
@@ -10,6 +10,13 @@
 CPPFLAGS+=	-Wp,-iremap,${DESTDIR}/:/
 .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) && ${HAVE_GCC} >= 3
+CFLAGS+=	-std=gnu99
+.endif
+
 .if defined(WARNS)
 .if ${WARNS} > 0
 CFLAGS+=	-Wall -Wstrict-prototypes -Wmissing-prototypes -Wpointer-arith
@@ -47,7 +54,6 @@
 .endif
 .if ${WARNS} > 3 && defined(HAVE_GCC) && ${HAVE_GCC} >= 3
 CFLAGS+=	-Wsign-compare
-CFLAGS+=	-std=gnu99
 .endif
 .endif
 

Reply via email to