From e21cb524274c6719fe953001a19ba2124f1e8385 Mon Sep 17 00:00:00 2001 From: Stephan Bergmann Date: Fri, 23 May 2014 09:37:23 +0200 Subject: external/hypen: Fix for pre-C99 Change-Id: Iff0692768cbcaa68f79404a9a933044fe8bb9096 --- external/hyphen/UnpackedTarball_hyphen.mk | 1 + external/hyphen/hyphen-c99.patch.0 | 13 +++++++++++++ 2 files changed, 14 insertions(+) create mode 100644 external/hyphen/hyphen-c99.patch.0 (limited to 'external') diff --git a/external/hyphen/UnpackedTarball_hyphen.mk b/external/hyphen/UnpackedTarball_hyphen.mk index c112b3597338..72d54fd5a928 100644 --- a/external/hyphen/UnpackedTarball_hyphen.mk +++ b/external/hyphen/UnpackedTarball_hyphen.mk @@ -18,6 +18,7 @@ $(eval $(call gb_UnpackedTarball_add_patches,hyphen,\ external/hyphen/hyphen-rhmin.patch \ external/hyphen/hyphen-build.patch \ external/hyphen/hyphen-fdo48017-wfopen.patch \ + external/hyphen/hyphen-c99.patch.0 \ )) # vim: set noet sw=4 ts=4: diff --git a/external/hyphen/hyphen-c99.patch.0 b/external/hyphen/hyphen-c99.patch.0 new file mode 100644 index 000000000000..83930cb09e00 --- /dev/null +++ b/external/hyphen/hyphen-c99.patch.0 @@ -0,0 +1,13 @@ +--- 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; + } -- cgit