fix baseline build (old cairo) - 'cairo_rectangle_int_t' does not name a type
[LibreOffice.git] / external / hunspell / hunspell-fdo48017-wfopen.patch
blob14f1db7260205df0059f0c329e7c4e68116b39a9
1 diff -ru hunspell/src/hunspell/csutil.cxx build/hunspell/src/hunspell/csutil.cxx
2 --- hunspell/src/hunspell/csutil.cxx 2011-02-02 11:35:43.000000000 +0100
3 +++ build/hunspell/src/hunspell/csutil.cxx 2014-04-24 19:42:01.373285409 +0200
4 @@ -57,9 +57,14 @@
5 if (strncmp(path, WIN32_LONG_PATH_PREFIX, 4) == 0) {
6 int len = MultiByteToWideChar(CP_UTF8, 0, path, -1, NULL, 0);
7 wchar_t *buff = (wchar_t *) malloc(len * sizeof(wchar_t));
8 + wchar_t *buff2 = (wchar_t *) malloc(len * sizeof(wchar_t));
9 + FILE * f = NULL;
10 MultiByteToWideChar(CP_UTF8, 0, path, -1, buff, len);
11 - FILE * f = _wfopen(buff, (strcmp(mode, "r") == 0) ? L"r" : L"rb");
12 + if (_wfullpath( buff2, buff, len ) != NULL) {
13 + f = _wfopen(buff2, (strcmp(mode, "r") == 0) ? L"r" : L"rb");
14 + }
15 free(buff);
16 + free(buff2);
17 return f;
19 #endif