From: Kirill Smelkov Date: Wed, 9 Apr 2014 12:48:27 +0000 (+0400) Subject: mingw: activate alloca X-Git-Tag: v2.1.0-rc0~201^2 X-Git-Url: https://git.lorimer.id.au/gitweb.git/diff_plain/22f4c27e68f448d5fce316a73ea3f7bab6aa1268?ds=sidebyside 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 --- diff --git a/compat/vcbuild/include/alloca.h b/compat/vcbuild/include/alloca.h deleted file mode 100644 index c0d7985b7e..0000000000 --- a/compat/vcbuild/include/alloca.h +++ /dev/null @@ -1 +0,0 @@ -#include diff --git a/compat/win32/alloca.h b/compat/win32/alloca.h new file mode 100644 index 0000000000..c0d7985b7e --- /dev/null +++ b/compat/win32/alloca.h @@ -0,0 +1 @@ +#include 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