This is the mail archive of the
libc-alpha@sourceware.org
mailing list for the glibc project.
Proposal: Deprecate direct access stdio internals (for future hard removal)
- From: Florian Weimer <fweimer at redhat dot com>
- To: GNU C Library <libc-alpha at sourceware dot org>
- Date: Fri, 22 Dec 2017 14:01:43 +0100
- Subject: Proposal: Deprecate direct access stdio internals (for future hard removal)
- Authentication-results: sourceware.org; auth=none
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
commit 5127ac1e7b4276eebe06ac5d6c427c848d3d7871
Author: Florian Weimer <fweimer@redhat.com>
Date: Fri Dec 22 13:44:21 2017 +0100
NEWS: Deprecate direct access libio internals
diff --git a/NEWS b/NEWS
index 2a1a4bfd85..0a162f6643 100644
--- a/NEWS
+++ b/NEWS
@@ -71,6 +71,33 @@ Major new features:
Deprecated and removed features, and other changes affecting compatibility:
+* Support for old programs which use internal stdio data structures and
+ functions is deprecated. This includes programs which use the C++ streams
+ provided by libstdc++ in GCC 2.95. Programs which use the internal
+ symbols _IO_adjust_wcolumn, _IO_default_doallocate, _IO_default_finish,
+ _IO_default_pbackfail, _IO_default_uflow, _IO_default_xsgetn,
+ _IO_default_xsputn, _IO_doallocbuf, _IO_do_write, _IO_file_attach,
+ _IO_file_close, _IO_file_close_it, _IO_file_doallocate, _IO_file_fopen,
+ _IO_file_init, _IO_file_jumps, _IO_fileno, _IO_file_open,
+ _IO_file_overflow, _IO_file_read, _IO_file_seek, _IO_file_seekoff,
+ _IO_file_setbuf, _IO_file_stat, _IO_file_sync, _IO_file_underflow,
+ _IO_file_write, _IO_file_xsputn, _IO_flockfile, _IO_flush_all,
+ _IO_flush_all_linebuffered, _IO_free_backup_area, _IO_free_wbackup_area,
+ _IO_init, _IO_init_marker, _IO_init_wmarker, _IO_iter_begin, _IO_iter_end,
+ _IO_iter_file, _IO_iter_next, _IO_least_wmarker, _IO_link_in,
+ _IO_list_all, _IO_list_lock, _IO_list_resetlock, _IO_list_unlock,
+ _IO_marker_delta, _IO_marker_difference, _IO_remove_marker, _IO_seekmark,
+ _IO_seekwmark, _IO_str_init_readonly, _IO_str_init_static,
+ _IO_str_overflow, _IO_str_pbackfail, _IO_str_seekoff, _IO_str_underflow,
+ _IO_switch_to_main_wget_area, _IO_switch_to_wget_mode,
+ _IO_unsave_wmarkers, _IO_wdefault_doallocate, _IO_wdefault_finish,
+ _IO_wdefault_pbackfail, _IO_wdefault_setbuf, _IO_wdefault_uflow,
+ _IO_wdefault_xsgetn, _IO_wdefault_xsputn, _IO_wdoallocbuf, _IO_wdo_write,
+ _IO_wfile_jumps, _IO_wfile_overflow, _IO_wfile_sync, _IO_wfile_underflow,
+ _IO_wfile_xsputn, _IO_wmarker_delta, or _IO_wsetb may stop working with a
+ future version of glibc. Unlike other symbol removals, these old
+ applications will not be supported using compatibility symbols.
+
* On GNU/Linux, the obsolete Linux constant PTRACE_SEIZE_DEVEL is no longer
defined by <sys/ptrace.h>.