[opus] non-standard alloca.h

LRN lrn1986 at gmail.com
Tue Nov 26 22:58:01 PST 2013


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

On 27.11.2013 10:40, Gregory Maxwell wrote:
> On Tue, Nov 26, 2013 at 10:35 PM, LRN wrote:
>> 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().
> 
> This whole path is only triggered when the compiler is unable to
> use C99 var arrays. Did you actually bump into this with something
> that can use configure? (e.g. do we have a problem with the var
> array test someplace)
> 
I do understand that C99 var-arrays are preferred (and are available).
However, i don't really remember whether alloca.h trips or doesn't
trip the configure process. I came up with this patch some time ago,
but didn't submit it.
I also don't have a non-C99-var-array-compliant toolchain at hand to
test the alloca path (well, i did try to patch configure.ac to pretend
that var-arrays are not available; results were as expected - opus
failed to build since [it thought] it had neither var-arrays, nor
alloca()), and i don't know at which point gcc started to support
var-arrays by default (without a --std=*99). [1] says it's been there
since 0.9, or maybe 4.5...

[1] http://gcc.gnu.org/c99status.html

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

iQEcBAEBAgAGBQJSlZf5AAoJEOs4Jb6SI2CwgOsH/impg4olyM54AZRSeuYxSSuO
aMdYENNi3ofFOOin9Mp6LzPe1cCKwyE9+CVfDOb9KtoKo8Jm8FLGZdc4do2iBru6
EYSaGCRXNEDtqDqLL4k25y+KT+XDOO+OrbhbqdwZXMmFEDwlz5CRo9geET5KMD4l
3H8HAvEtV3U54RXKp+lil93SdubuZCVGCfWZFryUvB/3aco7byik091kSEDqgQqa
J2XEc3rBrebOQCL0+hkfo9YKXxY2fPd+ybMdJw37n2x52cvGVyNJh0DEeOB2WCXn
RrnkuQsPsdSiZ1UywRWdshWi+VHjYpAL2m4acXFnk6AnPllUpY5+p+Gr90P/s6c=
=VoE9
-----END PGP SIGNATURE-----


More information about the opus mailing list