Disable stack-protector for mingw32 and remove win32 restrict define.
authorGregory Maxwell <greg@xiph.org>
Thu, 9 Aug 2012 12:39:15 +0000 (08:39 -0400)
committerGregory Maxwell <greg@xiph.org>
Thu, 9 Aug 2012 12:39:15 +0000 (08:39 -0400)
configure.ac
win32/config.h

index 44710d5..9bd1518 100644 (file)
@@ -49,6 +49,7 @@ AM_INIT_AUTOMAKE($PACKAGE, $VERSION, no-define)
 AM_MAINTAINER_MODE
 
 AC_CANONICAL_HOST
+AC_MINGW32
 AM_PROG_LIBTOOL
 AM_PROG_CC_C_O
 
@@ -209,7 +210,8 @@ AC_COMPILE_IFELSE([AC_LANG_SOURCE([char foo;])],
 CFLAGS="$saved_CFLAGS $SYMBOL_VISIBILITY"
 AC_SUBST(SYMBOL_VISIBILITY)
 
-ac_build_stack_protector=yes
+ac_build_stack_protector=no
+if test "x$ac_cv_c_compiler_gnu" = "xyes" && test "x$MINGW32" != "xyes" ; then
 AC_ARG_ENABLE(stack-protector,
      AS_HELP_STRING([--disable-stack-protector],[Disable compiler stack hardening]),
      [
@@ -231,6 +233,7 @@ AC_LINK_IFELSE([AC_LANG_SOURCE([void main(void){char foo;}])],
 CFLAGS="$saved_CFLAGS $STACK_PROTECTOR"
 fi
 fi
+fi
 
 CFLAGS="$CFLAGS -W"
 
index 4b8cb6d..6d32620 100644 (file)
@@ -3,7 +3,6 @@
 
 #define CELT_BUILD            1
 
-#define restrict
 #define inline __inline
 #define getpid _getpid