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

This commit is contained in:
Daniel Loffgren 2017-09-10 23:58:18 -07:00
parent cb2775ae54
commit cf6ba9dd2d

View File

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