[HarfBuzz] harfbuzz: Branch 'master' - 4 commits
Behdad Esfahbod
behdad at kemper.freedesktop.org
Sun Jan 25 13:06:21 PST 2015
src/hb-mutex-private.hh | 4 ++++
src/hb-private.hh | 24 ++++++++++++------------
2 files changed, 16 insertions(+), 12 deletions(-)
New commits:
commit 70c25ee215635db23eb0757641bd372940c0d85d
Merge: 28f5e0b f3537b6
Author: Behdad Esfahbod <behdad at behdad.org>
Date: Sun Jan 25 13:06:03 2015 -0800
Merge pull request #81 from KonstantinRitt/fixes/build/win8phone
winrt_buildfixes
commit f3537b620b0a7392ea27f01f465c5ba79459c858
Author: Konstantin Ritt <ritt.ks at gmail.com>
Date: Sun Jan 25 09:50:51 2015 +0400
Move some code around
Just to keep Windows specific workarounds in a single place.
diff --git a/src/hb-private.hh b/src/hb-private.hh
index c316c01..45b7712 100644
--- a/src/hb-private.hh
+++ b/src/hb-private.hh
@@ -94,12 +94,6 @@
# endif
#endif
-#if (defined(__WIN32__) && !defined(__WINE__)) || defined(_MSC_VER)
-#define snprintf _snprintf
-/* Windows CE only has _strdup, while rest of Windows has both. */
-#define strdup _strdup
-#endif
-
#ifdef _MSC_VER
#undef inline
#define inline __inline
@@ -134,15 +128,20 @@
# ifndef STRICT
# define STRICT 1
# endif
-#endif
-#ifdef _WIN32_WCE
-/* Some things not defined on Windows CE. */
-#define getenv(Name) NULL
-#define setlocale(Category, Locale) "C"
+# if defined(_WIN32_WCE)
+ /* Some things not defined on Windows CE. */
+# define getenv(Name) NULL
+# define setlocale(Category, Locale) "C"
static int errno = 0; /* Use something better? */
-#elif defined(WINAPI_FAMILY) && (WINAPI_FAMILY==WINAPI_FAMILY_PC_APP || WINAPI_FAMILY==WINAPI_FAMILY_PHONE_APP)
-#define getenv(Name) NULL
+# elif defined(WINAPI_FAMILY) && (WINAPI_FAMILY==WINAPI_FAMILY_PC_APP || WINAPI_FAMILY==WINAPI_FAMILY_PHONE_APP)
+# define getenv(Name) NULL
+# endif
+# if (defined(__WIN32__) && !defined(__WINE__)) || defined(_MSC_VER)
+# define snprintf _snprintf
+ /* Windows CE only has _strdup, while rest of Windows has both. */
+# define strdup _strdup
+# endif
#endif
#if HAVE_ATEXIT
commit afb62d88d78cacb6b881aaf329a654fd32f5ae29
Author: Konstantin Ritt <ritt.ks at gmail.com>
Date: Sun Jan 25 08:16:26 2015 +0400
Do not define MemoryBarrier on WinCE
There is a _HBMemoryBarrier() wrapper function that emulates
MemoryBarrier() behavior when it is not defined.
diff --git a/src/hb-private.hh b/src/hb-private.hh
index 8438fae..c316c01 100644
--- a/src/hb-private.hh
+++ b/src/hb-private.hh
@@ -138,7 +138,6 @@
#ifdef _WIN32_WCE
/* Some things not defined on Windows CE. */
-#define MemoryBarrier()
#define getenv(Name) NULL
#define setlocale(Category, Locale) "C"
static int errno = 0; /* Use something better? */
commit 7db326a15b173c0d101adc608bf551a628c65dcd
Author: Konstantin Ritt <ritt.ks at gmail.com>
Date: Sun Jan 25 08:13:24 2015 +0400
Fix build on WinRT
There is no environment (like WinCE) and the basic version
of InitializeCriticalSection is unsupported.
https://codereview.qt-project.org/#/c/92496/
diff --git a/src/hb-mutex-private.hh b/src/hb-mutex-private.hh
index 6281201..a8ea39c 100644
--- a/src/hb-mutex-private.hh
+++ b/src/hb-mutex-private.hh
@@ -47,7 +47,11 @@
#include <windows.h>
typedef CRITICAL_SECTION hb_mutex_impl_t;
#define HB_MUTEX_IMPL_INIT {0}
+#if defined(WINAPI_FAMILY) && (WINAPI_FAMILY==WINAPI_FAMILY_PC_APP || WINAPI_FAMILY==WINAPI_FAMILY_PHONE_APP)
+#define hb_mutex_impl_init(M) InitializeCriticalSectionEx (M, 0, 0)
+#else
#define hb_mutex_impl_init(M) InitializeCriticalSection (M)
+#endif
#define hb_mutex_impl_lock(M) EnterCriticalSection (M)
#define hb_mutex_impl_unlock(M) LeaveCriticalSection (M)
#define hb_mutex_impl_finish(M) DeleteCriticalSection (M)
diff --git a/src/hb-private.hh b/src/hb-private.hh
index c92cdec..8438fae 100644
--- a/src/hb-private.hh
+++ b/src/hb-private.hh
@@ -142,6 +142,8 @@
#define getenv(Name) NULL
#define setlocale(Category, Locale) "C"
static int errno = 0; /* Use something better? */
+#elif defined(WINAPI_FAMILY) && (WINAPI_FAMILY==WINAPI_FAMILY_PC_APP || WINAPI_FAMILY==WINAPI_FAMILY_PHONE_APP)
+#define getenv(Name) NULL
#endif
#if HAVE_ATEXIT
More information about the HarfBuzz
mailing list