From a5406364ac949f91867352cb2ae867629f083c5b Mon Sep 17 00:00:00 2001 From: Florian Weimer Date: Mon, 18 Feb 2019 11:49:54 +0100 Subject: libio: Eliminate _IO_stdin, _IO_stdout, _IO_stderr These variables are only used to determine if a stdio stream is a pre-allocated stream, but it is possible to do so by comparing a FILE * to all pre-allocated stream objects. As a result, it is not necessary to keep those pointers in separate variables. Behavior with symbol interposition is unchanged because _IO_stdin_, _IO_stdout_, _IO_stderr_ are exported, and refer to objects outside of libc if symbol interposition or copy relocations are involved. (The removed variables _IO_stdin, _IO_stdout, _IO_stderr were not exported, of course.) --- libio/stdfiles.c | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) (limited to 'libio/stdfiles.c') diff --git a/libio/stdfiles.c b/libio/stdfiles.c index 605e006474..9c779b47eb 100644 --- a/libio/stdfiles.c +++ b/libio/stdfiles.c @@ -25,11 +25,10 @@ in files containing the exception. */ -/* This file provides definitions of _IO_stdin, _IO_stdout, and _IO_stderr - for C code. Compare stdstreams.cc. - (The difference is that here the vtable field is set to 0, - so the objects defined are not valid C++ objects. On the other - hand, we don't need a C++ compiler to build this file.) */ +/* This file provides definitions of _IO_2_1_stdin_, _IO_2_1_stdout_, + and _IO_2_1_stderr_, the default values of stdin, stdout, stderr. + See oldstdfiles.c for glibc 2.0 legacy definitions without wide + character support. */ #include "libioP.h" -- cgit 1.4.1