From 22f4c27e68f448d5fce316a73ea3f7bab6aa1268 Mon Sep 17 00:00:00 2001 From: Kirill Smelkov Date: Wed, 9 Apr 2014 16:48:27 +0400 Subject: mingw: activate alloca Both MSVC and MINGW have alloca(3) definitions in malloc.h, so by moving win32-compat alloca.h from compat/vcbuild/include/ to compat/win32/ , which is included by both MSVC and MINGW CFLAGS, we can make alloca() work on both those Windows environments. In MINGW, malloc.h has explicit check for GNUC and if it is so, defines alloca to __builtin_alloca, so it looks like we don't need to add any code to here-shipped alloca.h to get optimum performance. Compile-tested on Windows in MSysGit. Signed-off-by: Kirill Smelkov Acked-by: Erik Faye-Lund Signed-off-by: Junio C Hamano --- compat/win32/alloca.h | 1 + 1 file changed, 1 insertion(+) create mode 100644 compat/win32/alloca.h (limited to 'compat/win32/alloca.h') diff --git a/compat/win32/alloca.h b/compat/win32/alloca.h new file mode 100644 index 000000000..c0d7985b7 --- /dev/null +++ b/compat/win32/alloca.h @@ -0,0 +1 @@ +#include -- cgit v1.2.1