From 645ab6633c10b34313f733c910765f03610ee258 Mon Sep 17 00:00:00 2001 From: omar Date: Sun, 1 Jul 2018 12:25:37 +0200 Subject: [PATCH] Fixed a include build issue for Cygwin in non-POSIX (Win32) mode. (#1917, #1319, #276) --- CHANGELOG.txt | 1 + imgui_draw.cpp | 6 +++--- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/CHANGELOG.txt b/CHANGELOG.txt index 636adce5..64f399ca 100644 --- a/CHANGELOG.txt +++ b/CHANGELOG.txt @@ -40,6 +40,7 @@ Other Changes: - Window: Allow menu windows from ignoring the style.WindowMinSize values so short menus are not padded. (#1909) - Misc: Added ImGuiMouseCursor_Hand cursor enum + corresponding software cursor. (#1913, 1914) [@aiekick, @ocornut] - Misc: Tweaked software mouse cursor offset to match the offset of the corresponding Windows 10 cursors. + - Fixed a include build issue for Cygwin in non-POSIX (Win32) mode. (#1917, #1319, #276) - Examples: Win32, Glfw, SDL: Added support for the ImGuiMouseCursor_Hand cursor. ----------------------------------------------------------------------- diff --git a/imgui_draw.cpp b/imgui_draw.cpp index 74330e4b..5ab40ac9 100644 --- a/imgui_draw.cpp +++ b/imgui_draw.cpp @@ -19,13 +19,13 @@ #include // vsnprintf, sscanf, printf #if !defined(alloca) -#ifdef _WIN32 +#if defined(__GLIBC__) || defined(__sun) || defined(__CYGWIN__) +#include // alloca (glibc uses . Note that Cygwin may have _WIN32 defined, so the order matters here) +#elif defined(_WIN32) #include // alloca #if !defined(alloca) #define alloca _alloca // for clang with MS Codegen #endif -#elif defined(__GLIBC__) || defined(__sun) -#include // alloca #else #include // alloca #endif