[opus] non-standard alloca.h

LRN lrn1986 at gmail.com
Tue Nov 26 22:35:43 PST 2013


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

AFAIK, alloca.h is not POSIX. Here's a patch that includes alloca.h
only when it's really there.
It also includes malloc.h, which is where mingw-w64 defines the
alloca() macro, mapping it to gcc __builtin_alloca() or to msvcrt
_alloca().

- -- 
O< ascii ribbon - stop html email! - www.asciiribbon.org
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.11 (MingW32)

iQEcBAEBAgAGBQJSlZK/AAoJEOs4Jb6SI2CwQDcIAKGk45RjPmcu4zwgZslFATk8
0vRxrdNmmfO+kOfd+ugh7AYkxUnD94uWVYn3uIxMu1hBXPAo1H74ItFP9TX9D3qg
ELJzCN4DpZt8HlICRmCxwW9ATGop3jK8m+UPsmC2HS6QknS2rRIZOY9G5XO/O1nA
yblTn6fe+avVjrGz172fAMDWtCai/UNfYL+am1MEX5nP8hHvctfZd9k+JsRMFeW9
GT9WPOuv7V7B0+AUgZB2Y5oCBkLNYUjo7Q/jsH3lESAH/lWWs/1ZLjNjQzx8f+0B
CK5tRUo0k1WlGe5oPHEuIBce3spqdeR5Npsj/A1cz5sxpwxINyAfPgjJB7QiysU=
=Zjgt
-----END PGP SIGNATURE-----
-------------- next part --------------
--- opus-1.1-beta/configure.ac.orig	2013-07-31 06:27:54.930255200 +0000
+++ opus-1.1-beta/configure.ac	2013-07-31 06:28:56.746104800 +0000
@@ -99,9 +99,13 @@
 
 AS_IF([test "$has_var_arrays" = "no"],
   [
    AC_CHECK_HEADERS([alloca.h])
+   AC_CHECK_HEADERS([malloc.h])
    AC_MSG_CHECKING(for alloca)
-   AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[#include <alloca.h>]],
+   AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[#ifdef HAVE_ALLOCA_H
+                                        #include <alloca.h>
+                                        #endif
+                                        #include <malloc.h>]],
                                       [[int foo=10; int *array = alloca(foo);]])],
      [ use_alloca=yes;
        AC_DEFINE([USE_ALLOCA], [], [Make use of alloca])


More information about the opus mailing list