On Sun, 22 Jan 2012, Vincent Torri wrote:
On Sun, 22 Jan 2012, Paul Eggert wrote:
On 01/22/2012 12:45 PM, Vincent Torri wrote:
and there was a redefinition because stdlib.h is included just above,
and stdlib.h includes malloc.h. And with mingw-w64 compilers, malloc.h
already defines alloca.
Is this the stdlib.h that comes with mingw-w64? Can you
show the code that does that inclusion? Is it a simple
#include <malloc.h>
or is it protected by an #if or #ifdef?
stdlib.h :
#ifndef _INC_STDLIB
#define _INC_STDLIB
/* content of stdlib.h */
#include <sec_api/stdlib_s.h>
#include <malloc.h>
#endif
that is, it's included just before the final #endif
Also, how does
malloc.h define alloca? Presumably it does not look like
this:
#define alloca __builtin_alloca
so what does it look like? And is it defined unconditionally,
or is it protected by an #if?
in malloc.h:
#ifdef __GNUC__
#undef _alloca
#define _alloca(x) __builtin_alloca((x))
#else
void *__cdecl _alloca(size_t _Size) __MINGW_ATTRIB_DEPRECATED_SEC_WARN;
#endif
A bit below in malloc.h :
#ifndef NO_OLDNAMES
#undef alloca
#ifdef __GNUC__
#define alloca(x) __builtin_alloca((x))
#else
#define alloca _alloca
#endif
#endif
Vincent Torri
_______________________________________________
Autoconf mailing list
Autoconf@gnu.org
https://lists.gnu.org/mailman/listinfo/autoconf