autoconf
[Top][All Lists]
Advanced

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

Re: alloca redefinition on freebsd


From: Vincent Torri
Subject: Re: alloca redefinition on freebsd
Date: Wed, 29 Jul 2009 09:15:29 +0200 (CEST)


Hey Ralf,

* Vincent Torri wrote on Tue, Jul 28, 2009 at 10:53:42AM CEST:
if one uses AC_FUNC_ALLOCA, the autoconf documentation gives the way
to correctly define alloca.

On FreeBSD, alloca is already defined in stdlib.h. So if stdlib.h is
included before that piece of code, a warning is displayed by gcc.

Shouldn't a guard be added in the piece of code of the docmentation
of AC_FUNC_ALLOCA in order to avoid that warning (like #ifndef
alloca etc...) ?

Well, there is already a guard, but it is in text not in code:

    Source files that use `alloca' should start with a piece of code
    like the following, to declare it properly.

ok, so i should anyway always put that piece of code before any other standard header files

Or do you also get an error if you move that piece of code before the
stdlib.h include?

currently, it's just a warning, not an error.

The guy just told me that, with freebsd 7.2, putting stdlib.h after removes the warning. With freebsd 8 (which is not stable yet), there is the warning, but that OS is not released yet, so it's not very important for now.

thank you

Vincent Torri




reply via email to

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