summaryrefslogtreecommitdiffstats
path: root/share/mk/bsd.sys.mk
diff options
context:
space:
mode:
Diffstat (limited to 'share/mk/bsd.sys.mk')
-rw-r--r--share/mk/bsd.sys.mk13
1 files changed, 12 insertions, 1 deletions
diff --git a/share/mk/bsd.sys.mk b/share/mk/bsd.sys.mk
index 0b164a9..65d8e6f 100644
--- a/share/mk/bsd.sys.mk
+++ b/share/mk/bsd.sys.mk
@@ -9,6 +9,17 @@
# 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"
+CFLAGS += -traditional
+. elif ${CSTD} == "c89" || ${CSTD} == "c90"
+CFLAGS += -std=iso9899:1990
+. elif ${CSTD} == "c94" || ${CSTD} == "c95"
+CFLAGS += -std=iso9899:199409
+. elif ${CSTD} == "c99"
+CFLAGS += -std=iso9899:1999
+. endif
+. endif
. if defined(WARNS)
. if ${WARNS} > 0
CFLAGS += -Wsystem-headers
@@ -27,7 +38,7 @@ CFLAGS += -Wreturn-type -Wcast-qual -Wwrite-strings -Wswitch -Wshadow -Wcast-al
. endif
# BDECFLAGS
. if ${WARNS} > 5
-CFLAGS += -ansi -pedantic -Wbad-function-cast -Wchar-subscripts -Winline -Wnested-externs -Wredundant-decls
+CFLAGS += -pedantic -Wno-long-long -Wbad-function-cast -Wchar-subscripts -Winline -Wnested-externs -Wredundant-decls
. endif
. if ${WARNS} > 1 && ${WARNS} < 5
# XXX Delete -Wuninitialized by default for now -- the compiler doesn't
OpenPOWER on IntegriCloud