tech-userlevel archive

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

Re: Adding <alloca.h> ?

On Wed, 19 May 2021, nia wrote:

> I think there's several points of view:
> 1) Everything using alloca() is broken (valid, it's a nasty function)
> 2) Everything using extensions should properly declare it does so
>    (using eg. -std=gnu99 and so on), and not use standards mode. 
> 2) Software that makes certain assumptions about almost-universal
>    functions should compile cleanly on NetBSD without patching.
> In my mind, including <alloca.h> is a clear demonstration of _intent_,
> so should be equivalent to specifying e.g. -std=gnu99, i.e. it should
> be enough to get alloca to work properly.

If some software expects an <alloca.h> but the base OS does not provide 
it, then is it more useful to have a devel/alloca package which can be 
buildlinked which would provide it?

> The current situation in pkgsrc (where lots of software using alloca
> needs to be BUILDLINK_TRANSFORMED to use the -std=gnu... variant, or
> is patched to use the builtin directly) is not really one I'm happy
> with.

pkgsrc is used on more than just NetBSD; adding the file to NetBSD does 
not help on other operating systems..


Home | Main Index | Thread Index | Old Index