Restore -std=gnu99 instead of -std=c99
authorEric Biggers <ebiggers3@gmail.com>
Tue, 30 Dec 2014 03:31:51 +0000 (21:31 -0600)
committerEric Biggers <ebiggers3@gmail.com>
Tue, 30 Dec 2014 03:31:51 +0000 (21:31 -0600)
Makefile.am

index 0893ef66aa29a826995729b64c293e24ced2ec6a..96878d476bc56a5895f4dcef0a89e28f42f5e61e 100644 (file)
@@ -8,7 +8,10 @@ ACLOCAL_AMFLAGS = -I m4
 AM_CPPFLAGS    = -I$(top_srcdir)/include $(PLATFORM_CPPFLAGS)  \
                  -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -D_GNU_SOURCE
 
-AM_CFLAGS      = -std=c99 $(PLATFORM_CFLAGS) -fno-common       \
+# Note: -std=gnu99 instead of -std=c99 is needed for unnamed structs and unions,
+# which are in C11 but not C99.  But we can't yet actually use -std=c11 because
+# we want to support older versions of gcc.
+AM_CFLAGS      = -std=gnu99 $(PLATFORM_CFLAGS) -fno-common     \
                  -Wmissing-prototypes -Wstrict-prototypes      \
                  -Wundef -Wno-pointer-sign