autoconf
[Top][All Lists]
Advanced

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

Re: documentation of AC_FUNC_ALLOCA and mingw-w64 compilers


From: Vincent Torri
Subject: Re: documentation of AC_FUNC_ALLOCA and mingw-w64 compilers
Date: Sun, 22 Jan 2012 21:56:56 +0100 (CET)



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

Vincent Torri



reply via email to

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