diff --git a/src/hb-config.hh b/src/hb-config.hh index 8bdce3598..bcce15941 100644 --- a/src/hb-config.hh +++ b/src/hb-config.hh @@ -61,6 +61,7 @@ #define HB_NO_LAYOUT_UNUSED #define HB_NO_MATH #define HB_NO_NAME +#define HB_NO_SETLOCALE #define HB_NO_SUBSET_LAYOUT #endif diff --git a/src/hb.hh b/src/hb.hh index 0ee8ff57d..bf547708f 100644 --- a/src/hb.hh +++ b/src/hb.hh @@ -359,7 +359,7 @@ extern "C" int hb_memalign_impl(void **memptr, size_t alignment, size_t size); # define HB_NO_GETENV # endif # if _WIN32_WCE < 0x800 -# define setlocale(Category, Locale) "C" +# define HB_NO_SETLOCALE static int errno = 0; /* Use something better? */ # endif # elif defined(WINAPI_FAMILY) && (WINAPI_FAMILY==WINAPI_FAMILY_PC_APP || WINAPI_FAMILY==WINAPI_FAMILY_PHONE_APP) @@ -372,6 +372,10 @@ static int errno = 0; /* Use something better? */ # endif #endif +#ifdef HB_NO_SETLOCALE +#define setlocale(Category, Locale) "C" +#endif + #ifdef HB_NO_GETENV #define getenv(Name) nullptr #endif