diff options
author | Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@digia.com> | 2014-08-18 14:18:48 +0200 |
---|---|---|
committer | Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@digia.com> | 2014-08-19 09:30:12 +0200 |
commit | c26d5cf6ef50ea102cfb18eb2109f60bcdfdafb6 (patch) | |
tree | 62cdb730ad4635e2a5c8599a0e257883f1b7e2f3 /src/3rdparty/harfbuzz-ng | |
parent | c73fe9428575a2da384f7954486f1a620f7e0bce (diff) |
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>
Diffstat (limited to 'src/3rdparty/harfbuzz-ng')
-rw-r--r-- | src/3rdparty/harfbuzz-ng/src/hb-mutex-private.hh | 6 | ||||
-rw-r--r-- | src/3rdparty/harfbuzz-ng/src/hb-private.hh | 5 |
2 files changed, 9 insertions, 2 deletions
diff --git a/src/3rdparty/harfbuzz-ng/src/hb-mutex-private.hh b/src/3rdparty/harfbuzz-ng/src/hb-mutex-private.hh index e2ee78b290..40f2e3d152 100644 --- a/src/3rdparty/harfbuzz-ng/src/hb-mutex-private.hh +++ b/src/3rdparty/harfbuzz-ng/src/hb-mutex-private.hh @@ -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) diff --git a/src/3rdparty/harfbuzz-ng/src/hb-private.hh b/src/3rdparty/harfbuzz-ng/src/hb-private.hh index 58d766c85c..3f70d74c26 100644 --- a/src/3rdparty/harfbuzz-ng/src/hb-private.hh +++ b/src/3rdparty/harfbuzz-ng/src/hb-private.hh @@ -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 */ |