Re: [PATCH 17/19] Portable alloca for Git
- From
Erik Faye-Lund <kusmabite@gmail.com>
- Date
- Feb 28, 2014, 13:44 UTC
- Message-ID
- <CABPQNSaVQuXBEnSrs6hdHwEbaBKFr-NjKpuBRNnbkM+HtfJ4Ag@mail.gmail.com>
- In-Reply-To
- <f08867ee212e27074dbb4cbb06af408b16dba0a1.1393257006.git.kirr@mns.spb.ru>
On Mon, Feb 24, 2014 at 5:21 PM, Kirill Smelkov <kirr@mns.spb.ru> wrote:
Show 12 quoted lines
> diff --git a/Makefile b/Makefile > index dddaf4f..0334806 100644 > --- a/Makefile > +++ b/Makefile > @@ -316,6 +321,7 @@ endif > ifeq ($(uname_S),Windows) > GIT_VERSION := $(GIT_VERSION).MSVC > pathsep = ; > + HAVE_ALLOCA_H = YesPlease > NO_PREAD = YesPlease > NEEDS_CRYPTO_WITH_SSL = YesPlease > NO_LIBGEN_H = YesPlease
In MSVC, alloca is defined in in malloc.h, not alloca.h:
http://msdn.microsoft.com/en-us/library/wb1s57t5.aspx
In fact, it has no alloca.h at all. But we don't have malloca.h in mingw either, so creating a compat/win32/alloca.h that includes malloc.h is probably sufficient.