Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(155)

Unified Diff: third_party/harfbuzz-ng/src/hb-mutex-private.hh

Issue 10915172: harfbuzz-ng roll (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 8 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « third_party/harfbuzz-ng/src/hb-icu-le.cc ('k') | third_party/harfbuzz-ng/src/hb-object-private.hh » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: third_party/harfbuzz-ng/src/hb-mutex-private.hh
diff --git a/third_party/harfbuzz-ng/src/hb-mutex-private.hh b/third_party/harfbuzz-ng/src/hb-mutex-private.hh
index f9bd679f20b5cf5acc8f1d9c3afe171871fc3f21..fc8ef4959951b6250e3ca5871d5b9bf4164ed4a4 100644
--- a/third_party/harfbuzz-ng/src/hb-mutex-private.hh
+++ b/third_party/harfbuzz-ng/src/hb-mutex-private.hh
@@ -44,6 +44,7 @@
#elif !defined(HB_NO_MT) && defined(_MSC_VER) || defined(__MINGW32__)
+#define WIN32_LEAN_AND_MEAN
#include <windows.h>
typedef CRITICAL_SECTION hb_mutex_impl_t;
#define HB_MUTEX_IMPL_INIT { NULL, 0, 0, NULL, NULL, 0 }
@@ -67,12 +68,21 @@ typedef pthread_mutex_t hb_mutex_impl_t;
#elif !defined(HB_NO_MT) && defined(HAVE_GLIB)
#include <glib.h>
+#if !GLIB_CHECK_VERSION(2,32,0)
typedef GStaticMutex hb_mutex_impl_t;
#define HB_MUTEX_IMPL_INIT G_STATIC_MUTEX_INIT
#define hb_mutex_impl_init(M) g_static_mutex_init (M)
#define hb_mutex_impl_lock(M) g_static_mutex_lock (M)
#define hb_mutex_impl_unlock(M) g_static_mutex_unlock (M)
#define hb_mutex_impl_finish(M) g_static_mutex_free (M)
+#else
+typedef GMutex hb_mutex_impl_t;
+#define HB_MUTEX_IMPL_INIT {0}
+#define hb_mutex_impl_init(M) g_mutex_init (M)
+#define hb_mutex_impl_lock(M) g_mutex_lock (M)
+#define hb_mutex_impl_unlock(M) g_mutex_unlock (M)
+#define hb_mutex_impl_finish(M) g_mutex_clear (M)
+#endif
#elif !defined(HB_NO_MT) && defined(HAVE_INTEL_ATOMIC_PRIMITIVES)
« no previous file with comments | « third_party/harfbuzz-ng/src/hb-icu-le.cc ('k') | third_party/harfbuzz-ng/src/hb-object-private.hh » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698