Re: [msysGit] Re: [PATCH 01/14] Fix non-constant array creation
- From
Janos Laube <janos.dev@gmail.com>
- Date
- Aug 21, 2009, 16:26 UTC
- Message-ID
- <9d6091530908210926p61aa5ea6ya6a7b71f940fdf5a@mail.gmail.com>
- In-Reply-To
- <4A8EA53B.9080809@gmail.com>
> MSVC compiles regex.c, so it must handle it. I'm fine with that.
msvc supports alloca, but regex.c doesn't make use of it per default (you must define HAVE_ALLOCA_H in order to use it). basically _alloca is fine for that task, but be aware that error handling on windows is a bit compilicated. when _alloca fails it throws a structured exception, you must reset the stack and use traditional memory allocation as fallback. see http://msdn.microsoft.com/en-us/library/wb1s57t5.aspx. :-)
janos