Hello,

On Mon, Jun 27, 2005 at 12:30:53PM +0200, Hrvoje Niksic wrote:
> A tester tells me that the alloca declaration from the latest (CVS)
> Autoconf manual, now installed in Wget, warns about symbol
> redeclaration on MinGW:
> 
> #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?

Stepan
2005-06-27  Stepan Kasal  <[EMAIL PROTECTED]>

        * doc/autoconf.texi (Particular Functions) <AC_FUNC_ALLOCA>:
        With GNU C, define alloca only if it wasn't defined yet.

Index: doc/autoconf.texi
===================================================================
RCS file: /cvsroot/autoconf/autoconf/doc/autoconf.texi,v
retrieving revision 1.918
diff -u -r1.918 autoconf.texi
--- doc/autoconf.texi   24 Jun 2005 00:54:01 -0000      1.918
+++ doc/autoconf.texi   27 Jun 2005 11:14:48 -0000
@@ -4021,7 +4021,9 @@
 #if HAVE_ALLOCA_H
 # include <alloca.h>
 #elif defined __GNUC__
-# define alloca __builtin_alloca
+# ifndef alloca
+#  define alloca __builtin_alloca
+# endif
 #elif defined _AIX
 # define alloca __alloca
 #elif defined _MSC_VER

Reply via email to