Hrvoje Niksic <[EMAIL PROTECTED]> writes: > 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
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.)
