Kaydet (Commit) e21cb524 authored tarafından Stephan Bergmann's avatar Stephan Bergmann

external/hypen: Fix for pre-C99

Change-Id: Iff0692768cbcaa68f79404a9a933044fe8bb9096
üst a8df8e31
...@@ -18,6 +18,7 @@ $(eval $(call gb_UnpackedTarball_add_patches,hyphen,\ ...@@ -18,6 +18,7 @@ $(eval $(call gb_UnpackedTarball_add_patches,hyphen,\
external/hyphen/hyphen-rhmin.patch \ external/hyphen/hyphen-rhmin.patch \
external/hyphen/hyphen-build.patch \ external/hyphen/hyphen-build.patch \
external/hyphen/hyphen-fdo48017-wfopen.patch \ external/hyphen/hyphen-fdo48017-wfopen.patch \
external/hyphen/hyphen-c99.patch.0 \
)) ))
# vim: set noet sw=4 ts=4: # vim: set noet sw=4 ts=4:
--- hyphen.c
+++ hyphen.c
@@ -382,8 +382,9 @@
if (strncmp(path, WIN32_LONG_PATH_PREFIX, 4) == 0) {
int len = MultiByteToWideChar(CP_UTF8, 0, path, -1, NULL, 0);
wchar_t *buff = (wchar_t *) malloc(len * sizeof(wchar_t));
+ FILE * f;
MultiByteToWideChar(CP_UTF8, 0, path, -1, buff, len);
- FILE * f = _wfopen(buff, (strcmp(mode, "r") == 0) ? L"r" : L"rb");
+ f = _wfopen(buff, (strcmp(mode, "r") == 0) ? L"r" : L"rb");
free(buff);
return f;
}
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment