|
From: | Bob Friesenhahn |
Subject: | Re: documentation of AC_FUNC_ALLOCA and mingw-w64 compilers |
Date: | Sun, 22 Jan 2012 09:21:35 -0600 (CST) |
User-agent: | Alpine 2.01 (GSO 1266 2009-07-14) |
On Sun, 22 Jan 2012, Vincent Torri wrote:
when using AC_FUNC_ALLOCA, the autoconf documentation says that one should paste some code. That code generates a warning because:1) the doc says to paste #elif defined __GNUC__ # define alloca __builtin_alloca2) the MinGW-w64 compiler already defines alloca in malloc.h, that header files being included by stdlib.h because STDC_HEADERS is defined.I don't know how to properly fix the doc. One solution would be: #elif defined __GNUC__ # ifndef alloca # define alloca __builtin_alloca # endif what do you think ?
I think that your work-around is the safe approach and that the docs should be fixed.
Other build environments (e.g. Solaris 10) also use a similar macro definition and it becomes enabled by the compiler:
#define alloca(x) __builtin_alloca(x) Bob -- Bob Friesenhahn address@hidden, http://www.simplesystems.org/users/bfriesen/ GraphicsMagick Maintainer, http://www.GraphicsMagick.org/
[Prev in Thread] | Current Thread | [Next in Thread] |