소스 검색

Don't do a bunch of OS gymnastics. alloca.h is only for glibc, everyone else uses stdlib.h

Daniel Loffgren 8 년 전
부모
커밋
cf6ba9dd2d
1개의 변경된 파일3개의 추가작업 그리고 3개의 파일을 삭제
  1. 3 3
      imgui_draw.cpp

+ 3 - 3
imgui_draw.cpp

@@ -21,10 +21,10 @@
 #if !defined(alloca)
 #ifdef _WIN32
 #include <malloc.h>     // alloca
-#elif (defined(__FreeBSD__) || defined(FreeBSD_kernel) || defined(__DragonFly__)) && !defined(__GLIBC__)
-#include <stdlib.h>     // alloca. FreeBSD uses stdlib.h unless GLIBC
+#elif !defined(__GLIBC__)
+#include <stdlib.h>     // alloca
 #else
-#include <alloca.h>     // alloca
+#include <alloca.h>     // alloca. glibc has an alloca specific header
 #endif
 #endif