hb-private.h: Fix compilation on newer GLib versions
authorChun-wei Fan <fanchunwei@src.gnome.org>
Fri, 16 Sep 2011 08:00:51 +0000 (16:00 +0800)
committerChun-wei Fan <fanchunwei@src.gnome.org>
Fri, 16 Sep 2011 16:40:09 +0000 (00:40 +0800)
g_atomic_int_exchange_and_add was deprecated in the GLib gatomic.c rewrite,
for GLib 2.29.6, so use g_atomic_int_add for GLib versions 2.29.5+.

pango/opentype/hb-private.h

index 92e514f..2791b05 100644 (file)
 #define hb_be_int32(v)         GINT32_FROM_BE (v)
 
 typedef int hb_atomic_int_t;
+#if !GLIB_CHECK_VERSION(2,29,5)
 #define hb_atomic_int_fetch_and_add(AI, V)     g_atomic_int_exchange_and_add (&(AI), V)
+#else
+#define hb_atomic_int_fetch_and_add(AI, V)     g_atomic_int_add (&(AI), V)
+#endif
 #define hb_atomic_int_get(AI)                  g_atomic_int_get (&(AI))
 #define hb_atomic_int_set(AI, V)               g_atomic_int_set (&(AI), V)