From 232a8794293bf654fb61122adffa6a7aa2989cc0 Mon Sep 17 00:00:00 2001 From: Peter Wu Date: Wed, 31 Aug 2016 15:58:20 +0200 Subject: Allow a lot more C99 features Flexible array members are supported by gcc, clang and even MSVC2013. Note, so far it was only used in the Windows-specific airpcap.h. Trailing commas in enum declaration are already in use since for these dissectors (commit ID is the first occurrence): epan/dissectors/packet-gluster.h v2.1.0rc0-1070-g3b706ba epan/dissectors/packet-ipv6.c v2.1.2rc0-81-ge07b4aa epan/dissectors/packet-netlink.h v2.3.0rc0-389-gc0ab12b epan/dissectors/packet-netlink-netfilter.c v2.3.0rc0-239-g1767e08 epan/dissectors/packet-netlink-route.c v2.3.0rc0-233-g2a80b40 epan/dissectors/packet-quic.c v2.3.0rc0-457-gfa320f8 Inline functions using the "inline" keyword are supported via all glib versions we support (if it is missing, glib will define a suitable inline macro). Other c99 functions listed in the README.developer document were found to be compatible with GCC 4.4.7, Clang 3.4.2 and MSVC 2013. Change-Id: If5bab03bfd8577b15a24bedf08c03bdfbf34317a Reviewed-on: https://code.wireshark.org/review/17421 Reviewed-by: Guy Harris --- configure.ac | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) (limited to 'configure.ac') diff --git a/configure.ac b/configure.ac index fa8a4c220b..4527988511 100644 --- a/configure.ac +++ b/configure.ac @@ -69,10 +69,12 @@ AC_CONFIG_LIBOBJ_DIR([wsutil]) # # Checks for programs used in the main build process. # -AC_PROG_CC_STDC -if test "$ac_cv_prog_cc_stdc" = "no" +# See doc/README.developer for allowed C99 features +# +AC_PROG_CC_C99 +if test "$ac_cv_prog_cc_c99" = "no" then - AC_MSG_ERROR([The C compiler does not support standard C]) + AC_MSG_ERROR([The C compiler does not support C99]) fi AC_PROG_CPP @@ -690,9 +692,6 @@ then fi fi -#Clang only -AC_WIRESHARK_COMPILER_FLAGS_CHECK(-Wc99-extensions, C) - # # Try to add some additional checks to CFLAGS. # These are not enabled by default, because the warnings they produce -- cgit v1.2.1