From 40db2ca098c517ef91a2236f3aeef5472f722b47 Mon Sep 17 00:00:00 2001 From: omar Date: Tue, 4 Sep 2018 18:58:20 +0200 Subject: [PATCH] Fixed a build issue with non-Cygwin GCC under Windows. --- docs/CHANGELOG.txt | 1 + imgui.cpp | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/docs/CHANGELOG.txt b/docs/CHANGELOG.txt index c6813ee98..c103379ff 100644 --- a/docs/CHANGELOG.txt +++ b/docs/CHANGELOG.txt @@ -34,6 +34,7 @@ HOW TO UPDATE? Other Changes: +- Fixed a build issue with non-Cygwin GCC under Windows. - Examples: OpenGL3: Fixed error condition when using the GLAD loader. (#2059, #2002). [@jiri] diff --git a/imgui.cpp b/imgui.cpp index 5642485bd..4af76043b 100644 --- a/imgui.cpp +++ b/imgui.cpp @@ -1506,7 +1506,7 @@ int ImTextCountUtf8BytesFromStr(const ImWchar* in_text, const ImWchar* in_text_e FILE* ImFileOpen(const char* filename, const char* mode) { -#if defined(_WIN32) && !defined(__CYGWIN__) +#if defined(_WIN32) && !defined(__CYGWIN__) && !defined(__GNUC__) // We need a fopen() wrapper because MSVC/Windows fopen doesn't handle UTF-8 filenames. Converting both strings from UTF-8 to wchar format (using a single allocation, because we can) const int filename_wsize = ImTextCountCharsFromUtf8(filename, NULL) + 1; const int mode_wsize = ImTextCountCharsFromUtf8(mode, NULL) + 1;