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 <kirr@mns.spb.ru> Acked-by: Erik Faye-Lund <kusmabite@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Kirill Smelkov committed
Apr 9, 2014 at 16:48 UTC
22f4c27e68f448d5fce316a73ea3f7bab6aa1268
2 files changed
+1
compat/win32/alloca.h
renamed
config.mak.uname
+1
@@ -480,6 +480,7 @@ ifeq ($(uname_S),NONSTOP_KERNEL)
480
endif
481
ifneq (,$(findstring MINGW,$(uname_S)))
482
pathsep = ;
483
+ HAVE_ALLOCA_H = YesPlease
484
NO_PREAD = YesPlease
485
NEEDS_CRYPTO_WITH_SSL = YesPlease
486
NO_LIBGEN_H = YesPlease