[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: |
Thu, 28 Aug 2008 14:52:36 +0200 |
User-agent: |
Gnus/5.110011 (No Gnus v0.11) Emacs/22.2 (gnu/linux) |
Bruno Haible <address@hidden> 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
- Re: [PATCH] use unlocked io in getdelim, (continued)
- Re: [PATCH] use unlocked io in getdelim, Simon Josefsson, 2008/08/27
- Re: [PATCH] use unlocked io in getdelim, Paolo Bonzini, 2008/08/27
- Re: [PATCH] use unlocked io in getdelim, Simon Josefsson, 2008/08/27
- Re: [PATCH] use unlocked io in getdelim, Paolo Bonzini, 2008/08/27
- Re: [PATCH] use unlocked io in getdelim, Simon Josefsson, 2008/08/27
- Re: [PATCH] use unlocked io in getdelim, Bruno Haible, 2008/08/28
- Re: [PATCH] use unlocked io in getdelim,
Simon Josefsson <=
- Re: [PATCH] use unlocked io in getdelim, Bruno Haible, 2008/08/29
- Re: [PATCH] use unlocked io in getdelim, Simon Josefsson, 2008/08/29