bug-gnulib
[Top][All Lists]
Advanced

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

Re: [PATCH] use unlocked io in getdelim


From: Bruno Haible
Subject: Re: [PATCH] use unlocked io in getdelim
Date: Thu, 28 Aug 2008 09:37:58 +0200
User-agent: KMail/1.5.4

Simon Josefsson wrote:
> I'd like to see getndelim2 solve this problem:
> 
> 1) LGPL license compatibility

getndelim2 is currently GPL, because it inherits from a file getline.c that
was written by Jan Brittenson for gcc. To make it LGPL, you would have to
either rewrite getndelim2 from scratch (based on getdelim's LGPL code and
the existing unit test), or ask RMS to change the licene of getndelim2.c.

> 2) Portability: getndelim2 uses freadptr and freedseek which appears
>    non-portable by design (or?) -- having a getline that can be compiled
>    on any C89/POSIX system can be useful
> ...
> It could be moved to a 'getline-portable' module.

I don't think you need a separate module for this. Just keep the old code
around in an

   if (false)
     {
       /* portable, unoptimized code */
     }
   else
     {
       /* optimized code, relying on freadptr */
     }

idiom.

Bruno





reply via email to

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