This is the mail archive of the
libc-alpha@sourceware.org
mailing list for the glibc project.
[PATCH 0/3] Don't include libio.h from stdio.h.
- From: Zack Weinberg <zackw at panix dot com>
- To: libc-alpha at sourceware dot org
- Cc: fweimer at redhat dot com
- Date: Tue, 26 Dec 2017 01:10:49 -0500
- Subject: [PATCH 0/3] Don't include libio.h from stdio.h.
- Authentication-results: sourceware.org; auth=none
It occurred to me that deprecating direct inclusion of libio.h is
insufficient to flush out any remaining programs that are using it,
because it's indirectly included by stdio.h anyway. So this patchset,
which I hope can still be considered for 2.27, makes us stop doing
that. The bulk of it is actually internal cleanup; there are a lot of
files inside glibc that are using _IO_ symbols but shouldn't (and
still more could be done in that vein).
This patch _should_ be very safe, perhaps even meeting the criterion
of no change to installed stripped libraries (that test is in
progress, as is a build-many-glibcs run) but I'd appreciate careful
review anyway, as I have not attempted to do quite so much with PLT
bypassing before.
Zack Weinberg (3):
Reduce use of libioP.h and iolibio.h outside the stdio implementation.
Minimize use of _IO_ and _G_ symbols in public headers.
Don't include libio.h from stdio.h.
NEWS | 17 ++-
argp/argp-fmtstream.c | 6 +-
argp/argp-help.c | 11 +-
assert/assert.c | 6 +-
bits/_G_config.h | 17 +--
csu/init.c | 2 +-
grp/fgetgrent_r.c | 4 -
grp/putgrent.c | 3 -
gshadow/fgetsgent_r.c | 8 +-
gshadow/putsgent.c | 4 +-
iconv/gconv_conf.c | 3 -
include/bits/libio.h | 37 +-----
include/bits/types/__fpos64_t.h | 1 +
include/bits/types/__fpos_t.h | 1 +
include/bits/types/cookie_io_functions_t.h | 1 +
include/bits/types/struct_FILE.h | 1 +
include/stdio.h | 107 +++++++++++----
include/stdio_ext.h | 2 +
include/wchar.h | 6 +
libio/Makefile | 4 +-
libio/__fbufsize.c | 1 +
libio/__flbf.c | 1 +
libio/__fpending.c | 1 +
libio/__freadable.c | 1 +
libio/__freading.c | 1 +
libio/__fwritable.c | 1 +
libio/__fwriting.c | 1 +
libio/bits/libio.h | 203 +++++------------------------
libio/bits/stdio.h | 35 +++--
libio/bits/stdio2.h | 35 ++---
libio/bits/types/__fpos64_t.h | 13 ++
libio/bits/types/__fpos_t.h | 13 ++
libio/bits/types/cookie_io_functions_t.h | 41 ++++++
libio/bits/types/struct_FILE.h | 97 ++++++++++++++
libio/fwide.c | 2 +
libio/iofread.c | 1 +
libio/ioftell.c | 1 +
libio/iogetdelim.c | 1 +
libio/iosetvbuf.c | 1 +
libio/iovsprintf.c | 1 +
libio/iovsscanf.c | 1 +
libio/libioP.h | 8 +-
libio/stdio.h | 103 +++++++--------
libio/strfile.h | 1 +
libio/vasprintf.c | 1 +
libio/vsnprintf.c | 1 +
malloc/malloc.c | 5 +-
malloc/mtrace.c | 5 -
malloc/obstack.c | 4 -
misc/err.c | 9 +-
misc/error.c | 17 +--
misc/getpass.c | 3 -
misc/getttyent.c | 3 -
misc/mntent_r.c | 3 -
misc/syslog.c | 3 -
posix/getopt.c | 10 +-
pwd/fgetpwent_r.c | 3 -
resolv/res_init.c | 2 +-
shadow/fgetspent_r.c | 3 -
shadow/putspent.c | 3 -
stdio-common/asprintf.c | 4 +-
stdio-common/flockfile.c | 9 +-
stdio-common/fprintf.c | 1 -
stdio-common/fscanf.c | 1 -
stdio-common/ftrylockfile.c | 9 +-
stdio-common/funlockfile.c | 10 +-
stdio-common/getline.c | 5 -
stdio-common/getw.c | 3 -
stdio-common/isoc99_sscanf.c | 1 -
stdio-common/perror.c | 3 +-
stdio-common/printf.c | 1 -
stdio-common/putw.c | 2 -
stdio-common/scanf.c | 4 +-
stdio-common/snprintf.c | 2 -
stdio-common/sprintf.c | 2 -
stdio-common/sscanf.c | 2 -
stdio-common/tmpfile.c | 4 +-
stdio-common/tstgetln.c | 3 +-
stdio-common/vfprintf.c | 7 +-
stdio-common/vprintf.c | 1 -
stdlib/strfmon_l.c | 4 +-
sunrpc/clnt_perr.c | 1 -
sunrpc/openchild.c | 8 +-
sunrpc/svc_simple.c | 2 -
sunrpc/svc_tcp.c | 2 -
sunrpc/svc_udp.c | 1 -
sunrpc/xdr_rec.c | 1 -
sunrpc/xdr_ref.c | 1 -
sunrpc/xdr_stdio.c | 6 -
sysdeps/ieee754/ldbl-opt/nldbl-compat.c | 1 -
sysdeps/mach/hurd/tmpfile.c | 1 -
sysdeps/pthread/flockfile.c | 7 +-
sysdeps/pthread/ftrylockfile.c | 8 +-
sysdeps/pthread/funlockfile.c | 7 +-
sysdeps/unix/sysv/linux/bits/_G_config.h | 16 +--
sysdeps/unix/sysv/linux/readonly-area.c | 3 +-
96 files changed, 517 insertions(+), 506 deletions(-)
create mode 100644 include/bits/types/__fpos64_t.h
create mode 100644 include/bits/types/__fpos_t.h
create mode 100644 include/bits/types/cookie_io_functions_t.h
create mode 100644 include/bits/types/struct_FILE.h
create mode 100644 libio/bits/types/__fpos64_t.h
create mode 100644 libio/bits/types/__fpos_t.h
create mode 100644 libio/bits/types/cookie_io_functions_t.h
create mode 100644 libio/bits/types/struct_FILE.h
--
2.15.1