Fix build on WinRT

There is no environment (like WinCE) and the basic version
of InitializeCriticalSection is unsupported.

https://codereview.qt-project.org/#/c/92496/
pull/81/head
Konstantin Ritt 10 years ago
parent 28f5e0b2f4
commit 7db326a15b
  1. 4
      src/hb-mutex-private.hh
  2. 2
      src/hb-private.hh

@ -47,7 +47,11 @@
#include <windows.h>
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)

@ -142,6 +142,8 @@
#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 HAVE_ATEXIT

Loading…
Cancel
Save