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
