Commit f4a064c5 authored by Matthias Braun's avatar Matthias Braun
Browse files

use gnu alloca builtin or malloc.h on windows

This should make the system to find/use alloca more robust.
parent aacb30df
......@@ -18,11 +18,12 @@
#include <string.h>
/* Includes for alloca() */
#ifdef _WIN32
#if defined(__GNUC__) && !defined(alloca)
#define alloca(x) __builtin_alloca(x)
#elif defined(__WIN32)
#include <malloc.h>
#endif
#if defined(__linux__) || defined(__APPLE__)
#include <alloca.h>
#else
#error do not know how to get alloca
#endif
#include "../begin.h"
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment