[prev in list] [next in list] [prev in thread] [next in thread] 

List:       freedesktop-xorg-devel
Subject:    Re: [PATCH libXt] asprintf needs _GNU_SOURCE on some platforms
From:       Alan Coopersmith <alan.coopersmith () oracle ! com>
Date:       2015-01-27 20:35:05
Message-ID: 54C7F679.3010203 () oracle ! com
[Download RAW message or body]

On 01/27/15 04:44 AM, Daniel Stone wrote:
> Hi,
>
> On 26 January 2015 at 16:51, Rob Clark <robdclark@gmail.com> wrote:
>> diff --git a/configure.ac b/configure.ac
>> index 3633ec6..e60e88d 100644
>> --- a/configure.ac
>> +++ b/configure.ac
>> @@ -66,7 +66,7 @@ fi
>>   AC_SUBST([CC_FOR_BUILD])
>>   DEFAULT_CPPFLAGS_FOR_BUILD="${CPPFLAGS}"
>>   AC_CHECK_FUNC(asprintf,
>> -  [DEFAULT_CPPFLAGS_FOR_BUILD="${DEFAULT_CPPFLAGS_FOR_BUILD} -DHAVE_ASPRINTF"])
>> +  [DEFAULT_CPPFLAGS_FOR_BUILD="${DEFAULT_CPPFLAGS_FOR_BUILD} -DHAVE_ASPRINTF -D_GNU_SOURCE"])
>>   CPPFLAGS_FOR_BUILD=${CPPFLAGS_FOR_BUILD-${DEFAULT_CPPFLAGS_FOR_BUILD}}
>>   AC_SUBST(CPPFLAGS_FOR_BUILD)
>>   DEFAULT_CFLAGS_FOR_BUILD="${CFLAGS} ${CWARNFLAGS}"
>
> AC_USE_SYSTEM_EXTENSIONS is the canonical way to switch on all
> GNU/BSD/POSIX/XOPEN/blah/etc extensions. This, somewhere, appears to
> set AC__GNU_SOURCE, so it might be good to check for that and switch
> it on where appropriate.

Yes, but that affects the target build, where this was needed in the host
build for cross-compiling, and I didn't see a simple way to transfer that
across.

-- 
	-Alan Coopersmith-              alan.coopersmith@oracle.com
	 Oracle Solaris Engineering - http://blogs.oracle.com/alanc
_______________________________________________
xorg-devel@lists.x.org: X.Org development
Archives: http://lists.x.org/archives/xorg-devel
Info: http://lists.x.org/mailman/listinfo/xorg-devel
[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic