[Mesa-dev] [PATCH] c99_alloca.h: Include stdlib.h on all non-Windows.

Jon TURNEY jon.turney at dronecode.org.uk
Thu Mar 5 07:56:14 PST 2015


On 01/03/2015 21:00, Alan Coopersmith wrote:
> On 03/ 1/15 12:52 PM, Vinson Lee wrote:
>> Fix build on FreeBSD.
>>
>> Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=89364
>> Signed-off-by: Vinson Lee <vlee at freedesktop.org>
>> ---
>>   include/c99_alloca.h | 6 +-----
>>   1 file changed, 1 insertion(+), 5 deletions(-)
>>
>> diff --git a/include/c99_alloca.h b/include/c99_alloca.h
>> index 7a81c50..575f719 100644
>> --- a/include/c99_alloca.h
>> +++ b/include/c99_alloca.h
>> @@ -35,13 +35,9 @@
>>
>>   #  define alloca _alloca
>>
>> -#elif defined(__MINGW32__)
>> -
>> -#  include <malloc.h>
>> -
>>   #else /* !defined(_MSC_VER) */
>>
>> -#  include <alloca.h>
>> +#  include <stdlib.h>
>>
>>   #endif /* !defined(_MSC_VER) */
>
> Solaris defines alloca() in <alloca.h>, not <stdlib.h>

Same on Cygwin.

http://tinderbox.x.org/builds/2015-03-05-0008/logs/mesa-mesa/#build

-------------- next part --------------
From 699e450a2f5b39a68bf239a41e99ecc8240ceed7 Mon Sep 17 00:00:00 2001
From: Jon TURNEY <jon.turney at dronecode.org.uk>
Date: Thu, 5 Mar 2015 15:29:32 +0000
Subject: [PATCH] Also use <alloca.h> for cygwin

Signed-off-by: Jon TURNEY <jon.turney at dronecode.org.uk>
---
 include/c99_alloca.h | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/include/c99_alloca.h b/include/c99_alloca.h
index ed66fda..5a3b8c1 100644
--- a/include/c99_alloca.h
+++ b/include/c99_alloca.h
@@ -35,7 +35,7 @@
 
 #  define alloca _alloca
 
-#elif defined(__sun)
+#elif defined(__sun) || defined(__CYGWIN__)
 
 #  include <alloca.h>
 
-- 
2.1.4



More information about the mesa-dev mailing list