shithub: opus

Download patch

ref: 417679c3e5c9ae6a01c3e14846eb0ec5c7d61798
parent: e852c3428080b3d083e6ef07dc2bea1644e5d5b4
author: Gregory Maxwell <[email protected]>
date: Thu Aug 9 04:39:15 EDT 2012

Disable stack-protector for mingw32 and remove win32 restrict define.

--- a/configure.ac
+++ b/configure.ac
@@ -49,6 +49,7 @@
 AM_MAINTAINER_MODE
 
 AC_CANONICAL_HOST
+AC_MINGW32
 AM_PROG_LIBTOOL
 AM_PROG_CC_C_O
 
@@ -209,7 +210,8 @@
 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]),
      [
@@ -229,6 +231,7 @@
         STACK_PROTECTOR="-fstack-protector-all" ],
         AC_MSG_RESULT([no]))
 CFLAGS="$saved_CFLAGS $STACK_PROTECTOR"
+fi
 fi
 fi
 
--- a/win32/config.h
+++ b/win32/config.h
@@ -3,7 +3,6 @@
 
 #define CELT_BUILD            1
 
-#define restrict
 #define inline __inline
 #define getpid _getpid