Follow @Openwall on Twitter for new release announcements and other news
[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Date: Wed, 13 Apr 2022 00:00:26 -0400
From: Rich Felker <>
Subject: stdio_ext.h extensions for gnulib

Early on in musl's history, we added a set of further extensions in

size_t __freadahead(FILE *);
const char *__freadptr(FILE *, size_t *);
void __freadptrinc(FILE *, size_t);
void __fseterr(FILE *);

The purpose of these functions was to provide a way for gnulib to do
the things they already insisted on doing, but without having access
to the FILE representation internals (which is how they implemented
these things for every other system at the time).

The topic recently came up again via Toybox, where the author is not
using gnulib but was looking for some of the same functionality. I'm
told Bionic is on-board with adding these, and it might make sense to
coordinate this with glibc and other libc implementations/other
systems, or even propose these as some sort of standard. In the long
term, having these would allow systems to decouple gnulib from their
stdio internals, and eventually maybe even have the freedom to change
stdio internals if it ever makes sense to do so.


Powered by blists - more mailing lists

Confused about mailing lists and their use? Read about mailing lists on Wikipedia and check out these guidelines on proper formatting of your messages.