summaryrefslogtreecommitdiffstats
path: root/src/3rdparty/harfbuzz-ng
diff options
context:
space:
mode:
Diffstat (limited to 'src/3rdparty/harfbuzz-ng')
-rw-r--r--src/3rdparty/harfbuzz-ng/src/hb-common.cc4
-rw-r--r--src/3rdparty/harfbuzz-ng/src/hb-mutex-private.hh4
-rw-r--r--src/3rdparty/harfbuzz-ng/src/hb-private.hh8
3 files changed, 16 insertions, 0 deletions
diff --git a/src/3rdparty/harfbuzz-ng/src/hb-common.cc b/src/3rdparty/harfbuzz-ng/src/hb-common.cc
index a089e52cd2..416d082a6b 100644
--- a/src/3rdparty/harfbuzz-ng/src/hb-common.cc
+++ b/src/3rdparty/harfbuzz-ng/src/hb-common.cc
@@ -33,6 +33,10 @@
#include <locale.h>
+#ifdef _WIN32_WCE
+#define strdup(x) _strdup(x)
+#endif
+
/* hb_options_t */
diff --git a/src/3rdparty/harfbuzz-ng/src/hb-mutex-private.hh b/src/3rdparty/harfbuzz-ng/src/hb-mutex-private.hh
index 0fb21c2e86..e2ee78b290 100644
--- a/src/3rdparty/harfbuzz-ng/src/hb-mutex-private.hh
+++ b/src/3rdparty/harfbuzz-ng/src/hb-mutex-private.hh
@@ -47,7 +47,11 @@
#define WIN32_LEAN_AND_MEAN
#include <windows.h>
typedef CRITICAL_SECTION hb_mutex_impl_t;
+#ifdef _WIN32_WCE
+#define HB_MUTEX_IMPL_INIT { 0, 0, NULL, NULL, 0 }
+#else
#define HB_MUTEX_IMPL_INIT { NULL, 0, 0, NULL, NULL, 0 }
+#endif
#define hb_mutex_impl_init(M) InitializeCriticalSection (M)
#define hb_mutex_impl_lock(M) EnterCriticalSection (M)
#define hb_mutex_impl_unlock(M) LeaveCriticalSection (M)
diff --git a/src/3rdparty/harfbuzz-ng/src/hb-private.hh b/src/3rdparty/harfbuzz-ng/src/hb-private.hh
index a451d164f9..58d766c85c 100644
--- a/src/3rdparty/harfbuzz-ng/src/hb-private.hh
+++ b/src/3rdparty/harfbuzz-ng/src/hb-private.hh
@@ -116,6 +116,14 @@
#define HB_FUNC __func__
#endif
+// Take from https://github.com/behdad/harfbuzz/commit/26a963b9cb4af3119177f277a2d48a5d537458fb
+#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? */
+#endif
/* Basics */