diff options
author | obrien <obrien@FreeBSD.org> | 2003-06-01 18:31:25 +0000 |
---|---|---|
committer | obrien <obrien@FreeBSD.org> | 2003-06-01 18:31:25 +0000 |
commit | 07f2e845ae1ef66becffd2504c58a16e11ad79d1 (patch) | |
tree | aa438f8980cb9482f459c2d002e1355d316087fd | |
parent | ca49dec55833bc5e86bad5bb4676218495b9d97f (diff) | |
download | FreeBSD-src-07f2e845ae1ef66becffd2504c58a16e11ad79d1.zip FreeBSD-src-07f2e845ae1ef66becffd2504c58a16e11ad79d1.tar.gz |
Compile our code as C99 by default.
-rw-r--r-- | share/mk/bsd.sys.mk | 20 |
1 files changed, 11 insertions, 9 deletions
diff --git a/share/mk/bsd.sys.mk b/share/mk/bsd.sys.mk index 6d40e80..760155b 100644 --- a/share/mk/bsd.sys.mk +++ b/share/mk/bsd.sys.mk @@ -8,20 +8,20 @@ # for GCC: http://gcc.gnu.org/onlinedocs/gcc-3.0.4/gcc_3.html#IDX143 -.if !defined(NO_WARNS) -. if defined(CSTD) -. if ${CSTD} == "k&r" +CSTD ?= c99 +.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 +.endif + +.if !defined(NO_WARNS) . if defined(WARNS) . if ${WARNS} > 0 CFLAGS += -Wsystem-headers @@ -38,6 +38,8 @@ CFLAGS += -W -Wstrict-prototypes -Wmissing-prototypes -Wpointer-arith . if ${WARNS} > 3 CFLAGS += -Wreturn-type -Wcast-qual -Wwrite-strings -Wswitch -Wshadow -Wcast-align . endif +# XXX: the warning that was here became problematic. +#. if ${WARNS} > 4 # BDECFLAGS . if ${WARNS} > 5 . if defined(CSTD) |