From ed56e79b5373a3fb7dbabc5b56eaae2ac898ce05 Mon Sep 17 00:00:00 2001 From: Konstantin Ritt Date: Sun, 25 Jan 2015 10:34:06 +0400 Subject: [HarfBuzz-NG] Fix build on WinRT This adopts c26d5cf6ef50ea102cfb18eb2109f60bcdfdafb6 and moves some code around. Change-Id: Icbc1f4e0cfa6c6b994c3e5096cf1cc66bc0b32f9 Reviewed-by: Konstantin Ritt --- src/3rdparty/harfbuzz-ng/src/hb-mutex-private.hh | 4 ++++ src/3rdparty/harfbuzz-ng/src/hb-private.hh | 24 ++++++++++++------------ 2 files changed, 16 insertions(+), 12 deletions(-) (limited to 'src/3rdparty/harfbuzz-ng') diff --git a/src/3rdparty/harfbuzz-ng/src/hb-mutex-private.hh b/src/3rdparty/harfbuzz-ng/src/hb-mutex-private.hh index 6281201958..a8ea39ccfd 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 @@ #include 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/3rdparty/harfbuzz-ng/src/hb-private.hh b/src/3rdparty/harfbuzz-ng/src/hb-private.hh index c92cdec516..45b7712ce8 100644 --- a/src/3rdparty/harfbuzz-ng/src/hb-private.hh +++ b/src/3rdparty/harfbuzz-ng/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,14 +128,20 @@ # ifndef STRICT # define STRICT 1 # endif -#endif -#ifdef _WIN32_WCE -/* Some things not defined on Windows CE. */ -#define MemoryBarrier() -#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 +# 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 -- cgit v1.2.3