17.14 Advanced functions on FILE streams

Gnulib provides a few functions that operate on FILE * streams and that go beyond what ISO C and POSIX specify.

Each such function is provided in a Gnulib module of the same name.

When Gnulib implemented them in 2007, some people considered them “unportable”, because they required digging in undocumented internals of the FILE structure. But Gnulib made them portable, by providing implementations for all platforms, from glibc to native Windows, and from Minix to QNX. Nowadays, new platforms already implement them in their libc; this has been seen for the Android libc and musl libc.

The stream argument of these functions must not be wide-character oriented. But this is not an actual restriction, since no programs use wide-character orientation on FILE streams anyway: no one uses the fwide function.