Skip to content
Snippets Groups Projects
Commit d621f28c authored by Deucе's avatar Deucе :ok_hand_tone4:
Browse files

Reverse logic on GCC/Win32 detection for alloca/malloc.h

Mingw32 is _WIN32 and GCC, and we need some way to get the free()
prototype. :D
parent bc525acf
No related branches found
No related tags found
No related merge requests found
Pipeline #5634 passed
......@@ -71,11 +71,11 @@ extern "C" {
* On platforms where alloca() is not in libc, programs which use
* it will fail to link when compiled with non-GNU compilers.
*/
#if __GNUC__ >= 2 || defined(__INTEL_COMPILER)
#if defined(_WIN32)
#include <malloc.h>
#elif __GNUC__ >= 2 || defined(__INTEL_COMPILER)
#undef alloca /* some GNU bits try to get cute and define this on their own */
#define alloca(sz) __builtin_alloca(sz)
#elif defined(_WIN32)
#include <malloc.h>
#endif
/*********************/
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment