This is the mail archive of the
mailing list for the glibc project.
Re: What to do about gnulib libio dependencies?
On 08/21/2018 12:54 PM, Paul Eggert wrote:
Zack Weinberg wrote:
I think it would clarify this discussion if you gave concrete examples
of existing programs that use these functions, and described what they
are doing with them that can't be accomplished using the standard
No GNU utility cares about wide streams that I know of. Wide streams
were a mistake as far as I can tell.
Agreed; and libunistring actively documents against using wide functions:
As I recall, the most important user of the gnulib libio dependencies is
GNU m4, which uses freadptr and freadseek for efficiency. GNU 'cut' is
in the same camp, though it's less important.
GNU coreutils uses freadahead when deciding whether to fflush stdin,
although I think this is a relatively minor optimization and wouldn't be
a major loss if it went away.
I'll CC: this to Bruno Haible, who has more experience in this area.
Bruno, the proposal on the table is for glibc to remove the undocumented
features that let Gnulib implement fbufmode, freadahead, freadptr,
freadseek, and fseterr; or instead, for glibc to export these features
somehow in a way that Gnulib can access in a documented way. Please see
the thread starting here:
For historical comparison, DragonflyBSD exported __sreadahead as an
interface precisely so that they could make FILE* become more opaque,
while still providing the optimizations that gnulib relies on via these
Eric Blake, Principal Software Engineer
Red Hat, Inc. +1-919-301-3266
Virtualization: qemu.org | libvirt.org