From f3537b620b0a7392ea27f01f465c5ba79459c858 Mon Sep 17 00:00:00 2001 From: Konstantin Ritt Date: Sun, 25 Jan 2015 09:50:51 +0400 Subject: [PATCH] Move some code around Just to keep Windows specific workarounds in a single place. --- src/hb-private.hh | 25 ++++++++++++------------- 1 file changed, 12 insertions(+), 13 deletions(-) diff --git a/src/hb-private.hh b/src/hb-private.hh index c316c01a1..45b7712ce 100644 --- a/src/hb-private.hh +++ b/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,15 +128,20 @@ # ifndef STRICT # define STRICT 1 # endif -#endif -#ifdef _WIN32_WCE -/* Some things not defined on Windows CE. */ -#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 +# 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