[Top][All Lists]

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

Re: [PATCH] use unlocked io in getdelim

From: Simon Josefsson
Subject: Re: [PATCH] use unlocked io in getdelim
Date: Mon, 08 Sep 2008 12:29:49 +0200
User-agent: Gnus/5.110011 (No Gnus v0.11) Emacs/22.2 (gnu/linux)

Bruno Haible <address@hidden> writes:

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


>> 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
> The same argument would hold for any program that uses freadptr and freadseek
> (like, possibly in the future, 'm4'). Therefore I think such conditionals
> belong into freadptr and freadseek proper. I'm applying the patch below.

It helps, but having the ability to compile a getline replacement from
portable code can be useful in some situations.  However, gnulib's
getline/getdelim doesn't use getndelim2, so this is fine from my point
of view.

>> 3) Stack size usage, freadseek uses a 4kb large buffer
> So what? Even in multithreaded situations, the minimum stack size usually
> is at least 16 KB. Below the freadseek call, there's only stdio calls, which
> will hardly need more than 2 KB of stack.

I was thinking embedded systems, but problems like that can be corrected
on a case-by-case basis if it turns out this buffer is a real problem.
If there are many hard coded buffers it becomes tiresome though.

Neither 2 or 3 are strong concerns for me, and doesn't affect any
platform I'm concerned with today, though.


reply via email to

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