[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: alloca redeclaration warning on MinGW

From: Paul Eggert
Subject: Re: alloca redeclaration warning on MinGW
Date: Fri, 01 Jul 2005 23:03:14 -0700
User-agent: Gnus/5.1007 (Gnus v5.10.7) Emacs/21.4 (gnu/linux)

Hrvoje Niksic <address@hidden> writes:

> I'm now using this:
> # include <alloca.h>
> #elif defined _MSC_VER || defined __BORLANDC__ || defined __MINGW32__
> # include <malloc.h>
> #elif defined __GNUC__
> # define alloca __builtin_alloca
> #elif defined _AIX
> # define alloca __alloca
> #else
> # include <stddef.h>
> # ifdef  __cplusplus
> extern "C"
> # endif
> void *alloca (size_t);
> #endif

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.

What's the story on alloca versus _alloca in <malloc.h>?

Also, what is the difference between _MSC_VER, __BORLANDC__, and
__MINGW32__?  Are these different compilers?  If so, shouldn't we be
testing for the presence of <malloc.h> rather than listing every
compiler that could possibly be used on DOS-related platforms?

(Please bear in mind that I don't use DOS-related platforms so you'll
have to explain obvious things.)

reply via email to

[Prev in Thread] Current Thread [Next in Thread]