Skip to contentSkip to conversation

Change --enable-pedantic to use -std=c99 and not -ansi (C90).

PATCH In review Gert Doering 2 participants 3 messages Jun 9, 2016

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 Change --enable-pedantic to use -std=c99 and not -ansi (C90).

There's quite a bit of our code that fails compilation with "gcc -pedantic -ansi" and should not be changed - like, LZ4 using "long long" variables which C90 does not have. Be pragmatic.

---
 configure.ac | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
configure.ac +1 -1
index d733023..4f14ebd 100644
@@ -1128,7 +1128,7 @@ fi
 if test "${enable_pedantic}" = "yes"; then
 	enable_strict="yes"
 	CFLAGS="${CFLAGS} -pedantic"
-	test "${WIN32}" != "yes" && CFLAGS="${CFLAGS} -ansi"
+	test "${WIN32}" != "yes" && CFLAGS="${CFLAGS} -std=c99"
 fi
 if test "${enable_strict}" = "yes"; then
 	CFLAGS="${CFLAGS} -Wall -Wno-unused-parameter -Wno-unused-function"
Signature · 1 line
2.7.3
#1 lore raw
Quoted 23 lines · Gert Doering

There's quite a bit of our code that fails compilation with "gcc -pedantic -ansi" and should not be changed - like, LZ4 using "long long" variables which C90 does not have. Be pragmatic.

---
 configure.ac | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
configure.ac +1 -2
index d733023..4f14ebd 100644
@@ -1128,7 +1128,7 @@ fi
 if test "${enable_pedantic}" = "yes"; then
        enable_strict="yes"
        CFLAGS="${CFLAGS} -pedantic"
-       test "${WIN32}" != "yes" && CFLAGS="${CFLAGS} -ansi"
+       test "${WIN32}" != "yes" && CFLAGS="${CFLAGS} -std=c99"
 fi
 if test "${enable_strict}" = "yes"; then
        CFLAGS="${CFLAGS} -Wall -Wno-unused-parameter -Wno-unused-function"
--
Quoted 1 line

2.7.3

Yes please! ACK.

-Steffan

#2 lore raw
In reply to Gert Doering

Your patch has been applied to the master branch.

commit d16072cf17ce8debcf796565841a54f1253a9923

Author: Gert Doering
Date:   Thu Jun 9 15:00:32 2016 +0200
     Change --enable-pedantic to use -std=c99 and not -ansi (C90).

     Signed-off-by: Gert Doering <[email protected]...>
     Acked-by: Gert Doering <[email protected]...>
     Message-Id: <[email protected]...>
     URL: http://article.gmane.org/gmane.network.openvpn.devel/11882
     Signed-off-by: Gert Doering <[email protected]...>

--
kind regards,

Gert Doering