Proposal: Deprecate direct access stdio internals (for future hard removal)

Florian Weimer fweimer@redhat.com
Fri Dec 22 13:01:00 GMT 2017


I would like to remove quite a few libio internals in a future glibc 
version.

Note that the symbol list does not include _IO_stdin &c, __uflow, 
__underflow, and other bits which were used by old inline 
implementations of the C interface (for things like getc_unlocked).  We 
can preserve support for those by keeping the layout of the start of 
_IO_FILE unchanged, always signaling empty read/write buffers, thus 
redirecting the old inline implementations into the slow path.

The immediate goal is to remove the vtables, marker support, streamline 
save area support (for an implementation of fgetln), and no longer 
depend on the _IO_stdin_used mechanism to detect that the 
stdin/stdout/stderr variables are in use.  Old library versions had 
macros for them, not variables, and did not support reassignment.  This 
still causes problems when linking new DSOs because you have to be 
careful to include _IO_stdin_used in the linker script, otherwise 
strange things will happen.

Thanks,
Florian
-------------- next part --------------
A non-text attachment was scrubbed...
Name: news.patch
Type: text/x-patch
Size: 2337 bytes
Desc: not available
URL: <http://sourceware.org/pipermail/libc-alpha/attachments/20171222/a0d21370/attachment.bin>


More information about the Libc-alpha mailing list