Only in fontconfig-2.8.0.orig/fc-case: fccase.h Only in fontconfig-2.8.0.orig: fontconfig.spec diff -urp fontconfig-2.8.0.orig/src/fccache.c fontconfig-2.8.0/src/fccache.c --- fontconfig-2.8.0.orig/src/fccache.c 2009-11-16 18:24:52 +0100 +++ fontconfig-2.8.0/src/fccache.c 2010-04-08 00:01:55 +0200 @@ -32,9 +32,6 @@ #if defined(HAVE_MMAP) || defined(__CYGWIN__) # include # include -#elif defined(_WIN32) -# define _WIN32_WINNT 0x0500 -# include #endif #ifndef O_BINARY diff -urp fontconfig-2.8.0.orig/src/fcint.h fontconfig-2.8.0/src/fcint.h --- fontconfig-2.8.0.orig/src/fcint.h 2009-11-16 23:46:18 +0100 +++ fontconfig-2.8.0/src/fcint.h 2010-04-08 00:01:55 +0200 @@ -55,6 +55,12 @@ #endif #ifdef _WIN32 +#define _WIN32_WINNT 0x0500 +#define WIN32_LEAN_AND_MEAN +#define STRICT +#include +#undef STRICT +#include #define FC_SEARCH_PATH_SEPARATOR ';' #else #define FC_SEARCH_PATH_SEPARATOR ':' @@ -535,6 +541,9 @@ FcDirCacheReference (FcCache *cache, int #ifdef _WIN32 FcPrivate int FcStat (const char *file, struct stat *statb); + +typedef UINT (WINAPI *pfnGetSystemWindowsDirectory)(LPSTR lpBuffer, UINT uSize); +extern pfnGetSystemWindowsDirectory pGetSystemWindowsDirectory; #else #define FcStat stat #endif diff -urp fontconfig-2.8.0.orig/src/fcxml.c fontconfig-2.8.0/src/fcxml.c --- fontconfig-2.8.0.orig/src/fcxml.c 2009-11-16 23:46:18 +0100 +++ fontconfig-2.8.0/src/fcxml.c 2010-04-08 00:41:35 +0200 @@ -52,14 +52,6 @@ #endif /* ENABLE_LIBXML2 */ -#ifdef _WIN32 -#define _WIN32_WINNT 0x0500 -#define STRICT -#include -#undef STRICT -#include -#endif - static void FcExprDestroy (FcExpr *e); @@ -2075,11 +2067,7 @@ FcEndElement(void *userData, const XML_C { int rc; data = buffer; -#if _WIN32_WINNT >= 0x0500 - rc = GetSystemWindowsDirectory (buffer, sizeof (buffer) - 20); -#else - rc = GetWindowsDirectory (buffer, sizeof (buffer) - 20); -#endif + rc = pGetSystemWindowsDirectory (buffer, sizeof (buffer) - 20); if (rc == 0 || rc > sizeof (buffer) - 20) { FcConfigMessage (parse, FcSevereError, "GetSystemWindowsDirectory failed"); @@ -2436,6 +2424,10 @@ bail0: return ret || !complain; } +#ifdef _WIN32 +pfnGetSystemWindowsDirectory pGetSystemWindowsDirectory = NULL; +#endif + FcBool FcConfigParseAndLoad (FcConfig *config, const FcChar8 *name, @@ -2455,6 +2447,15 @@ FcConfigParseAndLoad (FcConfig *conf #else void *buf; #endif + +#ifdef _WIN32 + if (!pGetSystemWindowsDirectory) + { + HMODULE hk32 = GetModuleHandleA("kernel32.dll"); + if (!(pGetSystemWindowsDirectory = (pfnGetSystemWindowsDirectory) GetProcAddress(hk32, "GetSystemWindowsDirectoryA"))) + pGetSystemWindowsDirectory = (pfnGetSystemWindowsDirectory) GetWindowsDirectory; + } +#endif filename = FcConfigFilename (name); if (!filename) Only in fontconfig-2.8.0/src: fontconfig.def