bug-gnulib
[Top][All Lists]
Advanced

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

Re: [Bug-gnulib] vasnprintf: drop alloca dependency, tag xsize.h as LGP


From: Bruno Haible
Subject: Re: [Bug-gnulib] vasnprintf: drop alloca dependency, tag xsize.h as LGPL
Date: Wed, 29 Sep 2004 21:01:16 +0200
User-agent: KMail/1.5

Simon Josefsson wrote:
> I'm looking at the snprintf problem in GnuTLS.  vasnprintf is
> available under LGPL, but it depends on two non-LGPL modules:
>
> * xsize: the same file (xsize.h) appear to be available under LGPL in
>   gettext.  Is there a problem saying LGPL in modules/xsize in gnulib?

No problem. Done. It was an oversight.

> * alloca:  ...
>       * modules/vasnprintf (Depends-on): Remove alloca.

In the current state, this patch will break: vasnprintf.c does
   #include <alloca.h>
and this will not compile if the 'alloca' module is not provided.

But actually, in this case as well as in the 'allocsa' module, alloca()
is only used as a shortcut, if it's available. It makes no sense to use
the alloca() replacement function since the code is also prepared for
doing malloc() directly.

What we need is an "alloca if present" module that does the same autoconf
tests as the alloca module, and uses alloca_.h, but never needs alloca.c -
and therefore can be under LGPL. (Similar to the fnmatch-gnu / fnmatch-posix
construction.) Can we call this new module 'alloca-opt' (where 'opt' meant
"optional" or "optimization")?

Bruno





reply via email to

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