[Python-Dev] [win32] Killing MSVC's _alloca

Guido van Rossum guido@python.org
Fri, 04 Oct 2002 15:40:50 -0400


> Trying to get around to my mingw32 port again. I currently don't
> have Visual C++ installed, but why is this nonstandard _alloca
> needed? Can't it simply be replaced by alloca? Doesn't MSVC have
> alloca?

It seems that it does.  But I guess _alloca is more politically
correct, since alloca is not standard C.

> For the moment, I'm as far as building posixmodule.c, which I
> succeeded by doing a
> 
> #define _alloca alloca
> 
> If there's a way to kill MSVC peculiarities, could this please be done?

I'd be happy to do a global subst of _alloca -> alloca.

Mark, do you see any reason why this might *not* work?

Could it break other compilers?

A conservative approach would be to add #ifdef CYGWIN around the
#define you propose.

--Guido van Rossum (home page: http://www.python.org/~guido/)