Skip to content

Commit

Permalink
Fixed a include build issue for Cygwin in non-POSIX (Win32) mode. (#1917
Browse files Browse the repository at this point in the history
  • Loading branch information
ocornut committed Jul 1, 2018
1 parent c4e34aa commit 645ab66
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.txt
Original file line number Diff line number Diff line change
Expand Up @@ -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.

-----------------------------------------------------------------------
Expand Down
6 changes: 3 additions & 3 deletions imgui_draw.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -19,13 +19,13 @@

#include <stdio.h> // vsnprintf, sscanf, printf
#if !defined(alloca)
#ifdef _WIN32
#if defined(__GLIBC__) || defined(__sun) || defined(__CYGWIN__)
#include <alloca.h> // alloca (glibc uses <alloca.h>. Note that Cygwin may have _WIN32 defined, so the order matters here)
#elif defined(_WIN32)
#include <malloc.h> // alloca
#if !defined(alloca)
#define alloca _alloca // for clang with MS Codegen
#endif
#elif defined(__GLIBC__) || defined(__sun)
#include <alloca.h> // alloca
#else
#include <stdlib.h> // alloca
#endif
Expand Down

0 comments on commit 645ab66

Please sign in to comment.