Mercurial > mxe-octave
comparison src/fontconfig-1-fixes.patch @ 2575:499e50dda1fa
update package fontconfig
author | Mark Brand <mabrand@mabrand.nl> |
---|---|
date | Mon, 11 Jun 2012 13:04:34 +0200 |
parents | |
children |
comparison
equal
deleted
inserted
replaced
2574:e790818b1d97 | 2575:499e50dda1fa |
---|---|
1 This file is part of MXE. | |
2 See index.html for further information. | |
3 | |
4 From a92a1d2fb38398601fedf1a29d4c9d9afde5cbf2 Mon Sep 17 00:00:00 2001 | |
5 From: Mark Brand <mabrand@mabrand.nl> | |
6 Date: Mon, 11 Jun 2012 12:38:33 +0200 | |
7 Subject: [PATCH] fix building for WIN32 | |
8 | |
9 8c255fb185d5651b57380b0a9443001e8051b29d moved some code out of switch | |
10 but did not declare 'buffer'. Also, replacing the "break" with | |
11 "goto bail" neglected the WIN32 specific code. | |
12 | |
13 taken from | |
14 http://lists.freedesktop.org/archives/fontconfig/2012-June/004113.html | |
15 --- | |
16 src/fcxml.c | 9 ++++++--- | |
17 1 file changed, 6 insertions(+), 3 deletions(-) | |
18 | |
19 diff --git a/src/fcxml.c b/src/fcxml.c | |
20 index 5201b3c..be1a555 100644 | |
21 --- a/src/fcxml.c | |
22 +++ b/src/fcxml.c | |
23 @@ -1850,6 +1850,9 @@ FcParseDir (FcConfigParse *parse) | |
24 { | |
25 const FcChar8 *attr, *data; | |
26 FcChar8 *prefix = NULL; | |
27 +#ifdef _WIN32 | |
28 + FcChar8 buffer[1000]; | |
29 +#endif | |
30 | |
31 attr = FcConfigGetAttribute (parse, "prefix"); | |
32 if (attr && FcStrCmp (attr, (const FcChar8 *)"xdg") == 0) | |
33 @@ -1886,7 +1889,7 @@ FcParseDir (FcConfigParse *parse) | |
34 if (!GetModuleFileName (NULL, buffer, sizeof (buffer) - 20)) | |
35 { | |
36 FcConfigMessage (parse, FcSevereError, "GetModuleFileName failed"); | |
37 - break; | |
38 + goto bail; | |
39 } | |
40 /* | |
41 * Must use the multi-byte aware function to search | |
42 @@ -1905,7 +1908,7 @@ FcParseDir (FcConfigParse *parse) | |
43 if (!GetModuleFileName (NULL, buffer, sizeof (buffer) - 20)) | |
44 { | |
45 FcConfigMessage (parse, FcSevereError, "GetModuleFileName failed"); | |
46 - break; | |
47 + goto bail; | |
48 } | |
49 p = _mbsrchr (data, '\\'); | |
50 if (p) *p = '\0'; | |
51 @@ -1919,7 +1922,7 @@ FcParseDir (FcConfigParse *parse) | |
52 if (rc == 0 || rc > sizeof (buffer) - 20) | |
53 { | |
54 FcConfigMessage (parse, FcSevereError, "GetSystemWindowsDirectory failed"); | |
55 - break; | |
56 + goto bail; | |
57 } | |
58 if (data [strlen (data) - 1] != '\\') | |
59 strcat (data, "\\"); | |
60 -- | |
61 1.7.10.3 | |
62 |