Bruno Haible <[EMAIL PROTECTED]> writes: > Simon Josefsson wrote: >> I'd like to see getndelim2 solve this problem: >> >> 1) LGPL license compatibility > > Done.
Thanks. >> 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. /Simon
