[Fontconfig] [PATCH] Fix compilation on Mac OS X 10.4

Jeremy Huddleston Sequoia jeremyhu at freedesktop.org
Mon May 13 19:12:02 PDT 2013


This is the wrong approach.  You should not be basing it on the existence of the MAC_OS_X_VERSION_10_5 macro.  You need to check the deployment target.

eg:

#if MAC_OS_X_VERSION_MIN_REQUIRED >= 1050
# define fc_atomic_ptr_cmpexch(P,O,N) OSAtomicCompareAndSwapPtrBarrier ((void *) (O), (void *) (N), (void **) (P))
#else
# if __LP64__
#  define fc_atomic_ptr_cmpexch(P,O,N)  OSAtomicCompareAndSwap64Barrier((void *) (O), (void *) (N), (void **) (P))
# else
#  define fc_atomic_ptr_cmpexch(P,O,N)  OSAtomicCompareAndSwap32Barrier((void *) (O), (void *) (N), (void **) (P))
# endif
#endif

--Jeremy

On May 13, 2013, at 5:21 PM, Misty De Meo <misty at brew.sh> wrote:

> Sorry, linebreaks munged the patch. I've attached it. Thank you!
> 
> On Tue, May 7, 2013 at 9:15 PM, Akira TAGOH <akira at tagoh.org> wrote:
>> Okay. BTW that patch seems broken. can you attach it instead?
>> 
>> On Wed, May 8, 2013 at 1:14 AM, Misty De Meo <misty at brew.sh> wrote:
>>> On Tue, May 7, 2013 at 3:39 AM, Akira TAGOH <akira at tagoh.org> wrote:
>>>> Thanks for the patch. BTW was MAC_OS_X_VERSION_X_Y available in 10.4?
>>>> will it work on 10.5+ too?
>>> 
>>> The MAC_OS_X_VERSION_10_X macro is only defined on version X and
>>> newer. So, the MAC_OS_X_VERSION_10_5 macro won't be defined on 10.4,
>>> but it will be on 10.5 and all newer versions.
>>> 
>>> Misty
>> 
>> 
>> 
>> --
>> Akira TAGOH
> <0001-Fix-fc_atomic_ptr_cmpexch-on-Mac-OS-X-10.4.patch>_______________________________________________
> Fontconfig mailing list
> Fontconfig at lists.freedesktop.org
> http://lists.freedesktop.org/mailman/listinfo/fontconfig

-------------- next part --------------
A non-text attachment was scrubbed...
Name: smime.p7s
Type: application/pkcs7-signature
Size: 4154 bytes
Desc: not available
URL: <http://lists.freedesktop.org/archives/fontconfig/attachments/20130513/5c824c74/attachment.bin>


More information about the Fontconfig mailing list