Hrvoje Niksic <[EMAIL PROTECTED]> writes:

> Paul Eggert <[EMAIL PROTECTED]> writes:
>> This doesn't look right to me, because if _MSC_VER is defined, it
>> includes <malloc.h> without the "# define alloca _alloca" line that
>> other people seem to have needed.
>
> I haven't needed that line in Wget.  Maybe it was needed in older
> versions of Visual C?

More likely it's the other way around.
<http://msdn2.microsoft.com/library/wb1s57t5(en-us,vs.80).aspx>
indicates that Visual Studio 2005 doesn't define alloca.  And
<http://sourceforge.net/mailarchive/forum.php?forum_id=5120&max_rows=25&style=nested&viewmonth=200403>
suggests that a #define for alloca was removed from mingw last year.

>> Also, what is the difference between _MSC_VER, __BORLANDC__, and
>> __MINGW32__?  Are these different compilers?
>
> They are different compilers.  What they have in common is that they
> (these days) run in the Win32 environment,

Is there a single symbol that all three define?  I'd rather not have
to maintain a list of Microsoft Windows 32 compilers.  (And please
don't call it "Win32", as it's not a win.  A better name is "32-bit
Windows operating environment", or "Woe32".)

For example, <http://megapov.inetart.net/manual-1.2/binaries.html>
talks about __BORLANDC__, __DJGPP__, __MINGW32__, __CYGWIN__, __DMC__,
and __WATCOMC__.  I doubt whether even this list is exhaustive.  Nor
do I know which of these compilers require <malloc.h>.

This sounds like a job for an Autoconf test rather than for trying to
guess from predefined macros.  But someone with some Woe32 expertise
will be needed to write the test.


Reply via email to