Harfbuzz-NG: Compile on WinRT
There is no environment (like WinCE) and the basic version of InitializeCriticalSection is unsupported. Change-Id: I7c5038115f0dbfdc616bce89a9be166b5f2a1dcc Reviewed-by: Andrew Knight <andrew.knight@digia.com> Reviewed-by: Konstantin Ritt <ritt.ks@gmail.com>
This commit is contained in:
parent
c73fe94285
commit
c26d5cf6ef
@ -52,7 +52,13 @@ typedef CRITICAL_SECTION hb_mutex_impl_t;
|
||||
#else
|
||||
#define HB_MUTEX_IMPL_INIT { NULL, 0, 0, NULL, NULL, 0 }
|
||||
#endif
|
||||
|
||||
#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)
|
||||
|
5
src/3rdparty/harfbuzz-ng/src/hb-private.hh
vendored
5
src/3rdparty/harfbuzz-ng/src/hb-private.hh
vendored
@ -117,15 +117,16 @@
|
||||
#endif
|
||||
|
||||
// Take from https://github.com/behdad/harfbuzz/commit/26a963b9cb4af3119177f277a2d48a5d537458fb
|
||||
#ifdef _WIN32_WCE
|
||||
#if defined(_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? */
|
||||
#elif defined(WINAPI_FAMILY) && (WINAPI_FAMILY==WINAPI_FAMILY_PC_APP || WINAPI_FAMILY==WINAPI_FAMILY_PHONE_APP)
|
||||
#define getenv(Name) NULL
|
||||
#endif
|
||||
|
||||
|
||||
/* Basics */
|
||||
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user