summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKirill Smelkov <kirr@mns.spb.ru>2014-04-09 16:48:27 +0400
committerJunio C Hamano <gitster@pobox.com>2014-04-09 10:08:35 -0700
commit22f4c27e68f448d5fce316a73ea3f7bab6aa1268 (patch)
treed63ccf7b1a113cb06187b64c8fee86e3b04fd713
parent7195fbfaf5a539b8e8358097e02b63991e78a565 (diff)
downloadgit-ks/tree-diff-nway.tar.gz
mingw: activate allocaks/tree-diff-nway
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 <kirr@mns.spb.ru> Acked-by: Erik Faye-Lund <kusmabite@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
-rw-r--r--compat/win32/alloca.h (renamed from compat/vcbuild/include/alloca.h)0
-rw-r--r--config.mak.uname1
2 files changed, 1 insertions, 0 deletions
diff --git a/compat/vcbuild/include/alloca.h b/compat/win32/alloca.h
index c0d7985b7e..c0d7985b7e 100644
--- a/compat/vcbuild/include/alloca.h
+++ b/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