bug-gnulib
[Top][All Lists]
Advanced

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

Re: [Bug-gnulib] getline bug?


From: Paul Eggert
Subject: Re: [Bug-gnulib] getline bug?
Date: Sat, 02 Oct 2004 22:17:12 -0700
User-agent: Gnus/5.1006 (Gnus v5.10.6) Emacs/21.3 (gnu/linux)

Simon Josefsson <address@hidden> writes:

> Isn't it a bug that the gnulib getline API is thread unsafe?

It hasn't been a bug so far, since nobody's wanted it in
a multithreaded app.  But I guess it's a bug now....

> Here's a proposed solution: Apply the following patch.  Then
> applications (coreutils?) that want the optimized getline version can
> put AC_DEFINE(USE_UNLOCKED_IO, 1) in their configure.ac.

This sort of thing should be done systematically, if it is done
at all.  I'd like Jim Meyering's opinion on it first, since he
contributed the unlocked-io stuff.

> Finally a question: do the gnulib getline differ in any other way from
> the glibc version?  It seems gnulib's getline call a getndelim2 which
> seem to be slightly different from getdelim, which is what glibc uses.
> If the interface is different, that seems bad as well.

Why would getline's users care how it's implemented?

getndelim2 has more power than getdelim, and some apps need the extra
power.

It'd be nice if someone took the time to integrate the extra power
into glibc.




reply via email to

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