Bruno Haible <[EMAIL PROTECTED]> writes:
>> 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.
Sure, that work. I'd prefer to solve it by having m4 code check whether
the non-portable code works or not, and then AC_SUBST in the proper
replacement function, either getline-fast.c or getline-slow.c. This
allows a gnulib module 'getline-slow' for when people prefer a small and
simple implementation over a faster but more complex.
However, it seems Paolo's was satisfied with the simpler initial patch
so maybe nobody wants to work on this.
/Simon