From 1e19ffdc01a94b485b61b824ce2fa9e440e36ae7 Mon Sep 17 00:00:00 2001 From: Xavier Leroy Date: Fri, 10 Apr 2015 14:39:12 +0200 Subject: When using gcc as a preprocessor, put it in C99 mode. As opposed to the default "gnu99" mode, the C99 mode turns off a number of GNU-isms in standard header files like those of glibc. --- configure | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/configure b/configure index 53d43832..46dc98da 100755 --- a/configure +++ b/configure @@ -94,7 +94,7 @@ case "$target" in esac system="linux" cc="${toolprefix}gcc" - cprepro="${toolprefix}gcc -U__GNUC__ -E" + cprepro="${toolprefix}gcc -std=c99 -U__GNUC__ -E" casm="${toolprefix}gcc -c" casmruntime="${toolprefix}gcc -c -Wa,-mregnames" clinker="${toolprefix}gcc" @@ -138,7 +138,7 @@ case "$target" in struct_return="int1-4" system="linux" cc="${toolprefix}gcc" - cprepro="${toolprefix}gcc -U__GNUC__ '-D__REDIRECT(name,proto,alias)=name proto' '-D__REDIRECT_NTH(name,proto,alias)=name proto' -E" + cprepro="${toolprefix}gcc -std=c99 -U__GNUC__ '-D__REDIRECT(name,proto,alias)=name proto' '-D__REDIRECT_NTH(name,proto,alias)=name proto' -E" casm="${toolprefix}gcc -c" clinker="${toolprefix}gcc" libmath="-lm";; @@ -150,7 +150,7 @@ case "$target" in struct_return="ref" system="linux" cc="${toolprefix}gcc -m32" - cprepro="${toolprefix}gcc -m32 -U__GNUC__ -E" + cprepro="${toolprefix}gcc -std=c99 -m32 -U__GNUC__ -E" casm="${toolprefix}gcc -m32 -c" clinker="${toolprefix}gcc -m32" libmath="-lm";; @@ -162,7 +162,7 @@ case "$target" in struct_return="int1248" # to check! system="bsd" cc="${toolprefix}gcc -m32" - cprepro="${toolprefix}gcc -m32 -U__GNUC__ -E" + cprepro="${toolprefix}gcc -std=c99 -m32 -U__GNUC__ -E" casm="${toolprefix}gcc -m32 -c" clinker="${toolprefix}gcc -m32" libmath="-lm";; @@ -174,7 +174,7 @@ case "$target" in struct_return="int1248" system="macosx" cc="${toolprefix}gcc -arch i386" - cprepro="${toolprefix}gcc -arch i386 -U__GNUC__ -U__clang__ -U__BLOCKS__ '-D__attribute__(x)=' '-D__asm(x)=' -E" + cprepro="${toolprefix}gcc -std=c99 -arch i386 -U__GNUC__ -U__clang__ -U__BLOCKS__ '-D__attribute__(x)=' '-D__asm(x)=' -E" casm="${toolprefix}gcc -arch i386 -c" case `uname -r` in [1-9].*|10.*|11.*) # up to MacOS 10.7 included @@ -191,7 +191,7 @@ case "$target" in struct_return="ref" system="cygwin" cc="${toolprefix}gcc -m32" - cprepro="${toolprefix}gcc -m32 -U__GNUC__ -E" + cprepro="${toolprefix}gcc -std=c99 -m32 -U__GNUC__ -E" casm="${toolprefix}gcc -m32 -c" clinker="${toolprefix}gcc -m32" libmath="-lm";; -- cgit