diff options
author | Benjamin Peterson <benjamin@python.org> | 2016-09-09 10:22:45 -0700 |
---|---|---|
committer | Benjamin Peterson <benjamin@python.org> | 2016-09-09 10:22:45 -0700 |
commit | 4b988b10a7941afcac8cb0e5f31c7aad5157592e (patch) | |
tree | e0d4b1476475422113106f3ff6b02f0aad11ca50 /configure.ac | |
parent | deeb0cfebc9d0e8a20f56111cba7d1e9fc57a3ea (diff) | |
download | cpython-4b988b10a7941afcac8cb0e5f31c7aad5157592e.tar.gz |
compile with -std=c99 instead of -std=gnu99; use kiddie-gloves with bluetooth/bluetooh.h (#28017)
Diffstat (limited to 'configure.ac')
-rw-r--r-- | configure.ac | 13 |
1 files changed, 9 insertions, 4 deletions
diff --git a/configure.ac b/configure.ac index 06e6841d79..67d3aefa61 100644 --- a/configure.ac +++ b/configure.ac @@ -1520,9 +1520,7 @@ AC_SUBST(UNIVERSAL_ARCH_FLAGS) # tweak BASECFLAGS based on compiler and platform case $GCC in yes) - # GNU dialect of C99, enables GNU extensions like __attribute__. GNU99 - # is required by bluetooth.h on big endian machines. - CFLAGS_NODIST="$CFLAGS_NODIST -std=gnu99" + CFLAGS_NODIST="$CFLAGS_NODIST -std=c99" # Python doesn't violate C99 aliasing rules, but older versions of # GCC produce warnings for legal Python code. Enable @@ -1991,11 +1989,18 @@ sys/param.h sys/select.h sys/sendfile.h sys/socket.h sys/statvfs.h \ sys/stat.h sys/syscall.h sys/sys_domain.h sys/termio.h sys/time.h \ sys/times.h sys/types.h sys/uio.h sys/un.h sys/utsname.h sys/wait.h pty.h \ libutil.h sys/resource.h netpacket/packet.h sysexits.h bluetooth.h \ -bluetooth/bluetooth.h linux/tipc.h linux/random.h spawn.h util.h alloca.h endian.h \ +linux/tipc.h linux/random.h spawn.h util.h alloca.h endian.h \ sys/endian.h) AC_HEADER_DIRENT AC_HEADER_MAJOR +# bluetooth/bluetooth.h has been known to not compile with -std=c99. +# http://permalink.gmane.org/gmane.linux.bluez.kernel/22294 +SAVE_CFLAGS=$CFLAGS +CFLAGS="-std=c99 $CFLAGS" +AC_CHECK_HEADERS(bluetooth/bluetooth.h) +CFLAGS=$SAVE_CFLAGS + # On Darwin (OS X) net/if.h requires sys/socket.h to be imported first. AC_CHECK_HEADERS([net/if.h], [], [], [#include <stdio.h> |