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

Gerhard Haering gerhard.haering@gmx.de
Sat, 5 Oct 2002 03:30:32 +0200


* Christian Tismer <tismer@tismer.com> [2002-10-04 18:16 -0700]:
> Martin v. Loewis wrote:
> >Guido van Rossum <guido@python.org> writes:
> >
> >
> >>>Doesn't MSVC have alloca?
> >>
> >
> >>It seems that it does.
> >
> >
> >Without checking: It probably has this only if __STDC__ is not
> >defined. MSVC hides all non-standard symbols if __STDC__ is defined -
> >either by compiler switches, or in some application header.
> 
> Hmm. I had this problem (no alloca, no idea why) and defined
> it by a macro in this case.

I've now installed MSVC6SP4 and verified that with my patch Python still builds
ok. Obviously, Python's compiler options for MSVC don't define __STDC__.

> Is it cleaner to undefine __STDC__ instead?

It'd be cleaner to use either _alloca or alloca, but not both like the current
M$VC specific code does.

-- Gerhard