From 22f4c27e68f448d5fce316a73ea3f7bab6aa1268 Mon Sep 17 00:00:00 2001 From: Kirill Smelkov Date: Wed, 9 Apr 2014 16:48:27 +0400 Subject: [PATCH] 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/{vcbuild/include => win32}/alloca.h | 0 config.mak.uname | 1 + 2 files changed, 1 insertion(+) rename compat/{vcbuild/include => win32}/alloca.h (100%) diff --git a/compat/vcbuild/include/alloca.h b/compat/win32/alloca.h similarity index 100% rename from compat/vcbuild/include/alloca.h rename to compat/win32/alloca.h diff --git a/config.mak.uname b/config.mak.uname index 71602ee9a1..9967de66a2 100644 --- a/config.mak.uname +++ b/config.mak.uname @@ -480,6 +480,7 @@ ifeq ($(uname_S),NONSTOP_KERNEL) endif ifneq (,$(findstring MINGW,$(uname_S))) pathsep = ; + HAVE_ALLOCA_H = YesPlease NO_PREAD = YesPlease NEEDS_CRYPTO_WITH_SSL = YesPlease NO_LIBGEN_H = YesPlease -- 2.11.4.GIT