From a2454f2a45ea016443411fcf69a971e9b1d650f6 Mon Sep 17 00:00:00 2001 From: Clownacy Date: Tue, 28 Apr 2020 15:15:00 +0100 Subject: [PATCH] Use __NEWLIB__ instead of __SWITCH__ and __CYGWIN__ for alloca.h-detection (#3070) Cygwin uses newlib, so it's covered by the __NEWLIB__ check. You can see how it defines __NEWLIB__ here: https://cygwin.com/git/?p=newlib-cygwin.git;a=blob;f=newlib/configure.in#l453 --- imgui_draw.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/imgui_draw.cpp b/imgui_draw.cpp index 954c5536..1df83d12 100644 --- a/imgui_draw.cpp +++ b/imgui_draw.cpp @@ -36,7 +36,7 @@ Index of this file: #include // vsnprintf, sscanf, printf #if !defined(alloca) -#if defined(__GLIBC__) || defined(__sun) || defined(__CYGWIN__) || defined(__APPLE__) || defined(__SWITCH__) +#if defined(__GLIBC__) || defined(__sun) || defined(__APPLE__) || defined(__NEWLIB__) #include // alloca (glibc uses . Note that Cygwin may have _WIN32 defined, so the order matters here) #elif defined(_WIN32) #include // alloca