On Wed, Apr 9, 2014 at 2:48 PM, Kirill Smelkov <kirr@xxxxxxxxxx> wrote: > On Thu, Mar 27, 2014 at 06:22:50PM +0400, Kirill Smelkov wrote: >> On Mon, Mar 24, 2014 at 02:47:24PM -0700, Junio C Hamano wrote: >> > Kirill Smelkov <kirr@xxxxxxxxxx> writes: >> > >> > > On Fri, Feb 28, 2014 at 06:19:58PM +0100, Erik Faye-Lund wrote: >> > >> On Fri, Feb 28, 2014 at 6:00 PM, Kirill Smelkov <kirr@xxxxxxxxxx> wrote: >> > >> ... >> > >> > In fact that would be maybe preferred, for maintainers to enable alloca >> > >> > with knowledge and testing, as one person can't have them all at hand. >> > >> >> > >> Yeah, you're probably right. >> > > >> > > Erik, the patch has been merged into pu today. Would you please >> > > follow-up with tested MINGW change? >> > >> > Sooo.... I lost track but this discussion seems to have petered out >> > around here. I think the copy we have had for a while on 'pu' is >> > basically sound, and can easily built on by platform folks by adding >> > or removing the -DHAVE_ALLOCA_H from the Makefile. >> >> Yes, that is all correct - that version works and we can improve it in >> the future with platform-specific follow-up patches, if needed. > > Junio, thanks for merging this and other diff-tree patches to next. It > so happened that I'm wrestling with MSysGit today, so please also find > alloca-for-mingw patch attached below. > > Thanks, > Kirill > > ---- 8< ---- > 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 <kirr@xxxxxxxxxx> Looks good to me! -- To unsubscribe from this list: send the line "unsubscribe git" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html