[HarfBuzz] harfbuzz: Branch 'master' - 2 commits

Behdad Esfahbod behdad at kemper.freedesktop.org
Mon Dec 10 13:24:42 PST 2012


 configure.ac             |    2 +-
 src/hb-atomic-private.hh |    8 +++++---
 2 files changed, 6 insertions(+), 4 deletions(-)

New commits:
commit c48a04e5ea899b82465a0f3f2cfdcffb3bf38f61
Author: John Ralls <jralls at ceridwen.fremont.ca.us>
Date:   Mon Dec 10 16:24:24 2012 -0500

    [coretext] Better test for CoreText
    
    Instead of checking for ApplicationServices.h, which is present in all
    versions of MacOSX, check for CTFontRef, a CoreText basic type.

diff --git a/configure.ac b/configure.ac
index cda103b..49accd7 100644
--- a/configure.ac
+++ b/configure.ac
@@ -220,7 +220,7 @@ AM_CONDITIONAL(HAVE_UNISCRIBE, $have_uniscribe)
 
 dnl ===========================================================================
 
-AC_CHECK_HEADERS(ApplicationServices/ApplicationServices.h, have_coretext=true, have_coretext=false)
+AC_CHECK_TYPE(CTFontRef, have_coretext=true, have_coretext=false, [#include <ApplicationServices/ApplicationServices.h>])
 if $have_coretext; then
 	CORETEXT_CFLAGS=
 	CORETEXT_LIBS="-framework ApplicationServices"
commit 0e9f0f3e5f16a45951423a1229af42dc2fd798c3
Author: Behdad Esfahbod <behdad at behdad.org>
Date:   Mon Dec 10 15:25:21 2012 -0500

    Fix atomic ops on iOS
    
    Patch from John Ralls.

diff --git a/src/hb-atomic-private.hh b/src/hb-atomic-private.hh
index a4d6cbe..111d7a0 100644
--- a/src/hb-atomic-private.hh
+++ b/src/hb-atomic-private.hh
@@ -69,15 +69,17 @@ typedef long hb_atomic_int_t;
 #elif !defined(HB_NO_MT) && defined(__APPLE__)
 
 #include <libkern/OSAtomic.h>
+#ifdef __MAC_OS_X_MIN_REQUIRED
 #include <AvailabilityMacros.h>
+#elif defined(__IPHONE_OS_MIN_REQUIRED)
+#include <Availability.h>
+#endif
 
 typedef int32_t hb_atomic_int_t;
 #define hb_atomic_int_add(AI, V)	(OSAtomicAdd32Barrier ((V), &(AI)) - (V))
 
 #define hb_atomic_ptr_get(P)		(OSMemoryBarrier (), (void *) *(P))
-#if (MAX_OS_X_VERSION_MAX_ALLOWED >= MAX_OS_X_VERSION_10_5)
-/* XXX We should expand the above check to also allow iPhone OS >= 2.0, but I can't find any info re
- * AvailabilityMacros.h for iOS.  Is it even available there? */
+#if (MAC_OS_X_VERSION_MIN_REQUIRED > MAC_OS_X_VERSION_10_4 || __IPHONE_VERSION_MIN_REQUIRED >= 20100)
 #define hb_atomic_ptr_cmpexch(P,O,N)	OSAtomicCompareAndSwapPtrBarrier ((void *) (O), (void *) (N), (void **) (P))
 #else
 #if __ppc64__ || __x86_64__



More information about the HarfBuzz mailing list