AC_FUNC_ALLOCA shouldn't define prototype

2010-08-04 Thread Thomas Klausner
Hi! Joerg Sonnenberger recently committed the attached patch to pkgsrc (for autoconf-2.66) prohibiting AC_FUNC_ALLOCA from defining a prototype on the BSDs. The reason was: Do not fall through to the implicit prototype as it conflicts with stdlib.h. Please include (something like) this in the ne

Re: AC_FUNC_ALLOCA shouldn't define prototype

2010-08-04 Thread Eric Blake
[adding bug-gnulib, as another interested party in alloca replacements] On 08/04/2010 03:59 PM, Thomas Klausner wrote: > Hi! > > Joerg Sonnenberger recently committed the attached patch to pkgsrc > (for autoconf-2.66) prohibiting AC_FUNC_ALLOCA from defining a > prototype on the BSDs. > > The re

Re: AC_FUNC_ALLOCA shouldn't define prototype

2010-08-05 Thread Bruno Haible
Eric Blake wrote: > Rather than hard-code the check based on platform-specific defines, it > would be more in the autoconf spirit to instead write a probe whether > declares alloca(), and if so, define a witness macro. Unfortunately, the code is also used in bison/data/yacc.c [1], that is, in the

Re: AC_FUNC_ALLOCA shouldn't define prototype

2010-08-05 Thread Bruno Haible
Joerg Sonnenberger wrote: > > So, I don't understand how you see a "conflict". > > The conflicting declarations are a result of the default namespace > containing _NETBSD_SOURCE if no (other) standard compliance macro is > set. Still, I don't see how you can get a conflict with if the test code

Re: AC_FUNC_ALLOCA shouldn't define prototype

2010-08-05 Thread Paul Eggert
On 08/05/10 04:26, Bruno Haible wrote: > -char *alloca (); > +void *alloca (); Thansks, I like this change too. Can you please install it?

Re: AC_FUNC_ALLOCA shouldn't define prototype

2010-08-05 Thread Eric Blake
On 08/05/2010 02:36 PM, Paul Eggert wrote: > On 08/05/10 04:26, Bruno Haible wrote: > >> -char *alloca (); >> +void *alloca (); > > Thansks, I like this change too. Can you please install it? I also added the size_t argument to the prototype, then applied it. -- Eric Blake ebl...@redhat.com

Re: AC_FUNC_ALLOCA shouldn't define prototype

2010-08-06 Thread Joerg Sonnenberger
On Thu, Aug 05, 2010 at 01:26:40PM +0200, Bruno Haible wrote: > So, I don't understand how you see a "conflict". The conflicting declarations are a result of the default namespace containing _NETBSD_SOURCE if no (other) standard compliance macro is set. > The test code in > AC_FUNC_ALLOCA does no

Re: AC_FUNC_ALLOCA shouldn't define prototype

2010-08-06 Thread Joerg Sonnenberger
On Thu, Aug 05, 2010 at 09:38:07PM +0200, Bruno Haible wrote: > Joerg Sonnenberger wrote: > > > So, I don't understand how you see a "conflict". > > > > The conflicting declarations are a result of the default namespace > > containing _NETBSD_SOURCE if no (other) standard compliance macro is > > s