Set the C standard we use for compiling userland to gnu99.
authorSascha Wildner <saw@online.de>
Sun, 16 Jan 2011 04:55:31 +0000 (05:55 +0100)
committerSascha Wildner <saw@online.de>
Sun, 16 Jan 2011 08:27:24 +0000 (09:27 +0100)
share/mk/bsd.sys.mk

index bced454..5f4e0f4 100644 (file)
@@ -4,18 +4,18 @@
 # This file contains common settings used for building DragonFly
 # sources.
 
-.if defined(CSTD)
-. if ${CSTD} == "k&r"
+CSTD?= gnu99
+
+.if ${CSTD} == "k&r"
 CFLAGS         += -traditional
-. elif ${CSTD} == "c89" || ${CSTD} == "c90"
+.elif ${CSTD} == "c89" || ${CSTD} == "c90"
 CFLAGS         += -std=iso9899:1990
-. elif ${CSTD} == "c94" || ${CSTD} == "c95"
+.elif ${CSTD} == "c94" || ${CSTD} == "c95"
 CFLAGS         += -std=iso9899:199409
-. elif ${CSTD} == "c99"
+.elif ${CSTD} == "c99"
 CFLAGS         += -std=iso9899:1999
-. else
+.else
 CFLAGS         += -std=${CSTD}
-. endif
 .endif
 
 # Enable various levels of compiler warning checks.  These may be