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

Behdad Esfahbod behdad at kemper.freedesktop.org
Sun Jan 13 22:34:16 PST 2013


 configure.ac             |    2 ++
 src/Makefile.am          |    6 +++++-
 src/hb-atomic-private.hh |    8 ++++----
 src/hb-blob.cc           |    3 +++
 src/hb-warning.cc        |   33 ++++++++++++++++++++++++++++++---
 5 files changed, 44 insertions(+), 8 deletions(-)

New commits:
commit f88d3bd7e407d332bb04688344c54756d24128c9
Author: Behdad Esfahbod <behdad at behdad.org>
Date:   Mon Jan 14 00:33:58 2013 -0600

    Fix build with Sun compiler

diff --git a/src/hb-blob.cc b/src/hb-blob.cc
index b6e696b..bbbc936 100644
--- a/src/hb-blob.cc
+++ b/src/hb-blob.cc
@@ -24,6 +24,9 @@
  * Red Hat Author(s): Behdad Esfahbod
  */
 
+/* http://www.oracle.com/technetwork/articles/servers-storage-dev/standardheaderfiles-453865.html */
+#define _POSIX_C_SOURCE 3
+
 #include "hb-private.hh"
 
 #include "hb-blob.h"
commit 08b29c08094097f1c23ec53b10084bc390cea833
Author: Behdad Esfahbod <behdad at behdad.org>
Date:   Mon Jan 14 00:32:12 2013 -0600

    Revert "Minor"
    
    This reverts commit 0a492357016bc9a614d2a726f2006c10af68ca58.
    
    Enables code on more compilers.

diff --git a/src/hb-warning.cc b/src/hb-warning.cc
index 01adcea..4f1f65f 100644
--- a/src/hb-warning.cc
+++ b/src/hb-warning.cc
@@ -29,11 +29,38 @@
 
 
 #if defined(HB_ATOMIC_INT_NIL)
-#pragma message("Could not find any system to define atomic_int macros, library may NOT be thread-safe.")
+#ifdef _MSC_VER
+#pragma message("Could not find any system to define atomic_int macros, library may NOT be thread-safe")
+#else
+#warning "Could not find any system to define atomic_int macros, library may NOT be thread-safe"
 #endif
+#endif
+
 #if defined(HB_MUTEX_IMPL_NIL)
-#pragma message("Could not find any system to define mutex macros, library may NOT be thread-safe.")
+#ifdef _MSC_VER
+#pragma message("Could not find any system to define mutex macros, library may NOT be thread-safe")
+#else
+#warning "Could not find any system to define mutex macros, library may NOT be thread-safe"
+#endif
 #endif
+
 #if defined(HB_ATOMIC_INT_NIL) || defined(HB_MUTEX_IMPL_NIL)
-#pragma message("To suppress these warnings, define HB_NO_MT.")
+#ifdef _MSC_VER
+#pragma message("To suppress these warnings, define HB_NO_MT")
+#else
+#warning "To suppress these warnings, define HB_NO_MT"
+#endif
+#endif
+
+
+#include "hb-unicode-private.hh"
+
+#if !defined(HB_NO_UNICODE_FUNCS) && defined(HB_UNICODE_FUNCS_NIL)
+#ifdef _MSC_VER
+#pragma message("Could not find any Unicode functions implementation, you have to provide your own")
+#pragma message("To suppress this warnings, define HB_NO_UNICODE_FUNCS")
+#else
+#warning "Could not find any Unicode functions implementation, you have to provide your own"
+#warning "To suppress this warning, define HB_NO_UNICODE_FUNCS"
+#endif
 #endif
commit e78463211e7d85f237bd55afab7e8e5dae42346c
Author: Behdad Esfahbod <behdad at behdad.org>
Date:   Mon Jan 14 00:27:21 2013 -0600

    Fix linking with non-gcc compilers

diff --git a/configure.ac b/configure.ac
index afb0c5d..e95e48f 100644
--- a/configure.ac
+++ b/configure.ac
@@ -88,6 +88,8 @@ if test "x$GCC" = "xyes"; then
 	esac
 fi
 
+AM_CONDITIONAL(HAVE_GCC, test "x$GCC" = "xyes")
+
 hb_os_win32=no
 AC_MSG_CHECKING([for native Win32])
 case "$host" in
diff --git a/src/Makefile.am b/src/Makefile.am
index 558ce08..d72aa07 100644
--- a/src/Makefile.am
+++ b/src/Makefile.am
@@ -198,8 +198,12 @@ else
 if HAVE_ICU
 libharfbuzz_la_LINK = $(CXXLINK) $(libharfbuzz_la_LDFLAGS)
 else
-# Use a C linker, not C++; Don't link to libstdc++
+# Use a C linker for GCC, not C++; Don't link to libstdc++
+if HAVE_GCC
 libharfbuzz_la_LINK = $(LINK) $(libharfbuzz_la_LDFLAGS)
+else
+libharfbuzz_la_LINK = $(CXXLINK) $(libharfbuzz_la_LDFLAGS)
+endif
 endif
 endif
 
commit de649f07f1f8fdeb998a0b049759f4f7363e25d2
Author: Behdad Esfahbod <behdad at behdad.org>
Date:   Mon Jan 14 00:26:43 2013 -0600

    Fix residuals from fontconfig changes

diff --git a/src/hb-atomic-private.hh b/src/hb-atomic-private.hh
index 75fbcd6..b909bc8 100644
--- a/src/hb-atomic-private.hh
+++ b/src/hb-atomic-private.hh
@@ -104,11 +104,11 @@ typedef int hb_atomic_int_t;
 #include <atomic.h>
 #include <mbarrier.h>
 
-typedef unsigned int fc_atomic_int_t;
-#define fc_atomic_int_add(AI, V)	( ({__machine_rw_barrier ();}), atomic_add_int_nv (&(AI), (V)) - (V))
+typedef unsigned int hb_atomic_int_t;
+#define hb_atomic_int_add(AI, V)	( ({__machine_rw_barrier ();}), atomic_add_int_nv (&(AI), (V)) - (V))
 
-#define fc_atomic_ptr_get(P)		( ({__machine_rw_barrier ();}), (void *) *(P))
-#define fc_atomic_ptr_cmpexch(P,O,N)	( ({__machine_rw_barrier ();}), atomic_cas_ptr ((P), (O), (N)) == (void *) (O) ? FcTrue : FcFalse)
+#define hb_atomic_ptr_get(P)		( ({__machine_rw_barrier ();}), (void *) *(P))
+#define hb_atomic_ptr_cmpexch(P,O,N)	( ({__machine_rw_barrier ();}), atomic_cas_ptr ((void **) (P), (void *) (O), (void *) (N)) == (void *) (O) ? true : false)
 
 
 #elif !defined(HB_NO_MT)



More information about the HarfBuzz mailing list