Eric Blake wrote: > Furthermore, I'm considering writing a proposal for the next version of > POSIX to standardize several of the stdio functions currently provided > by gnulib, along with rationale why they are useful and how they can be > used to speed up programs. The fact that gnulib is an existing > implementation on top of multiple stdio implementations should be reason > enough to treat it as something worth making standard.
This would be excellent. In the beginning, gnulib's stdioext functions were an attempt at making the similarly named glibc functions portable, and it was unsure whether we would succeed. Meanwhile, it has turned out that these functions could be ported to all possible libc flavours. Please let me know when you have a draft proposal. I may contribute to the rationale. Also please note that the spec of freading and fwriting is intentionally vague in the case there is no "current read operation" or "current write operation" since the last fopen or fflush call on this stream. If the spec would require a certain behaviour in these cases, some implementations would have major problems. Bruno