[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: alloca redeclaration warning on MinGW
From: |
Hrvoje Niksic |
Subject: |
Re: alloca redeclaration warning on MinGW |
Date: |
Fri, 01 Jul 2005 20:18:09 +0200 |
User-agent: |
Gnus/5.1007 (Gnus v5.10.7) XEmacs/21.4.17 (Jumbo Shrimp, linux) |
Stepan Kasal writes:
> > #if HAVE_ALLOCA_H
> > # include <alloca.h>
> > #elif defined __GNUC__
> > # define alloca __builtin_alloca
> >
> > The problem is that MinGW is using GNU C, but also #defines alloca to
> > __builtin_alloca in malloc.h, presumably to be compatible with MS VC.
>
> what about the following patch?
[...]
Won't make a difference because alloca is defined in malloc.h, which
(along with other system includes) is included after config.h, not
before. I'm now using this:
#if HAVE_ALLOCA_H
# 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
- Re: alloca redeclaration warning on MinGW,
Hrvoje Niksic <=