Fix compile for harfbuzz-ng for wince
CRITICAL_SECTION has different members, so adjust that strdup is only there as _strdup so use that There is no MemoryBarrier() There is no environment so dont use getenv There is no locale so dont use it There is no errno so just fake it Change-Id: Ia7197c4f0df50513078c906ed503aec33ee42b82 Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@digia.com> Reviewed-by: Konstantin Ritt <ritt.ks@gmail.com>
This commit is contained in:
parent
8c864ac498
commit
2635b94607
4
src/3rdparty/harfbuzz-ng/src/hb-common.cc
vendored
4
src/3rdparty/harfbuzz-ng/src/hb-common.cc
vendored
@ -33,6 +33,10 @@
|
||||
|
||||
#include <locale.h>
|
||||
|
||||
#ifdef _WIN32_WCE
|
||||
#define strdup(x) _strdup(x)
|
||||
#endif
|
||||
|
||||
|
||||
/* hb_options_t */
|
||||
|
||||
|
@ -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)
|
||||
|
8
src/3rdparty/harfbuzz-ng/src/hb-private.hh
vendored
8
src/3rdparty/harfbuzz-ng/src/hb-private.hh
vendored
@ -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 */
|
||||
|
Loading…
x
Reference in New Issue
Block a user