From: "Gabriel F. T. Gomes" <gabriel@inconstante.eti.br>
To: <libc-alpha@sourceware.org>
Subject: [PATCH v2 0/8] Use more flags parameters instead of global bits in stdio
Date: Mon, 29 Oct 2018 12:17:00 -0000 [thread overview]
Message-ID: <20181029121650.24544-1-gabriel@inconstante.eti.br> (raw)
In March, Zack Weinberg posted a patch set [1] that, among many other
improvements to code readability and symbol versioning, removed the TLS
variable __ldbl_is_dbl.
This patch set is very relevant in itself *and* it is very useful for
the long double work on powerpc64le. I have a special interest in
this patch set being approved and I worked on many of the comments that
were raised during the review of the first version, as well as I have
made other changes that were not mentioned at that time.
Each of the patches contains a "Changed since v1" section, where I
describe all (except for unintentional omissions, if any) changes,
anyhow, I mention some of them below, because I think they might require
additional attention:
- I removed some occurrences of libc_hidden_def and libc_hidden_proto
from function definitions that were not commented on in the previous
discussion. I removed them because I checked that such functions
are not called from within libc (although they could be called from
libnldbl_nonshared.a). There could be other occurrences in the
code, but before I work on a patch to get rid of them all, I thought
it would be best to get feedback.
- I added attribute_hidden to function declarations that were not
commented on in the previous discussion. I did it because I
understood that adding this attribute can lead to better code
generation on some architectures, e.g. 32-bits powerpc, thus I also
pasted the output of objdumps before and after the change. I hope
that helps with the review.
- I kept the definition of ldbl_compat_symbol based on my
understanding that it would be best to have this additional macro,
instead on relying on the implicit, suggested [2] semantics for
LONG_DOUBLE_COMPAT_VERSION (i.e.: on platforms where a long double
transition never occurred, we pretend that it occurred on GLIBC 2.0)
- I removed the declaration of many functions (e.g.: _IO_vfprintf)
from internal headers, because they are no longer called from within
libc, thus the internal declaration is only duplicating code.
[1] https://sourceware.org/ml/libc-alpha/2018-03/msg00185.html
[2] https://sourceware.org/ml/libc-alpha/2018-06/msg00980.html
Zack Weinberg (8):
Use STRFMON_LDBL_IS_DBL instead of __ldbl_is_dbl.
Add __vfscanf_internal and __vfwscanf_internal with flags arguments.
Use SCANF_ISOC99_A instead of _IO_FLAGS2_SCANF_STD.
Use SCANF_LDBL_IS_DBL instead of __ldbl_is_dbl.
Add __v*printf_internal with flags arguments.
Add __vsyslog_internal, with same flags as __v*printf_internal.
Use PRINTF_FORTIFY instead of _IO_FLAGS2_FORTIFY.
Use PRINTF_LDBL_IS_DBL instead of __ldbl_is_dbl.
argp/argp-fmtstream.c | 3 +-
argp/argp-help.c | 4 +-
argp/argp-namefrob.h | 2 -
debug/Makefile | 2 +-
debug/asprintf_chk.c | 20 +-
debug/dprintf_chk.c | 20 +-
debug/fprintf_chk.c | 20 +-
debug/fwprintf_chk.c | 20 +-
debug/obprintf_chk.c | 96 +-
debug/printf_chk.c | 20 +-
debug/snprintf_chk.c | 24 +-
debug/sprintf_chk.c | 25 +-
debug/swprintf_chk.c | 27 +-
debug/vasprintf_chk.c | 68 +-
debug/vdprintf_chk.c | 37 +-
debug/vfprintf_chk.c | 21 +-
debug/vfwprintf_chk.c | 21 +-
debug/vobprintf_chk.c | 32 +
debug/vprintf_chk.c | 20 +-
debug/vsnprintf_chk.c | 46 +-
debug/vsprintf_chk.c | 69 +-
debug/vswprintf_chk.c | 51 +-
debug/vwprintf_chk.c | 21 +-
debug/wprintf_chk.c | 21 +-
hurd/vpprintf.c | 2 +-
include/monetary.h | 12 +-
include/stdio.h | 8 -
include/sys/syslog.h | 19 +-
include/wchar.h | 12 -
libio/fwprintf.c | 2 +-
libio/iolibio.h | 8 -
libio/iovdprintf.c | 13 +-
libio/iovsprintf.c | 66 +-
libio/iovsscanf.c | 12 +-
libio/iovswscanf.c | 14 +-
libio/libio.h | 8 -
libio/libioP.h | 77 +-
libio/obprintf.c | 19 +-
libio/strfile.h | 33 +-
libio/swprintf.c | 2 +-
libio/swscanf.c | 10 +-
libio/vasprintf.c | 20 +-
libio/vscanf.c | 2 +-
libio/vsnprintf.c | 16 +-
libio/vswprintf.c | 16 +-
libio/vwprintf.c | 2 +-
libio/vwscanf.c | 2 +-
libio/wprintf.c | 2 +-
libio/wscanf.c | 2 +-
manual/locale.texi | 9 +-
misc/syslog.c | 36 +-
stdio-common/Makefile | 4 +-
stdio-common/Versions | 3 +
stdio-common/asprintf.c | 6 +-
stdio-common/dprintf.c | 5 +-
stdio-common/fprintf.c | 2 +-
stdio-common/fxprintf.c | 4 +-
stdio-common/iovfscanf.c | 38 +
stdio-common/iovfwscanf.c | 38 +
stdio-common/isoc99_fscanf.c | 7 +-
stdio-common/isoc99_scanf.c | 12 +-
stdio-common/isoc99_sscanf.c | 8 +-
stdio-common/isoc99_vfscanf.c | 9 +-
stdio-common/isoc99_vscanf.c | 9 +-
stdio-common/isoc99_vsscanf.c | 16 +-
stdio-common/printf.c | 3 +-
stdio-common/scanf.c | 2 +-
stdio-common/snprintf.c | 4 +-
stdio-common/sprintf.c | 4 +-
stdio-common/sscanf.c | 12 +-
stdio-common/vfprintf-internal.c | 2360 +++++++++++++++++++++++
stdio-common/vfprintf.c | 2351 +----------------------
stdio-common/vfscanf-internal.c | 3045 ++++++++++++++++++++++++++++++
stdio-common/vfscanf.c | 3042 +----------------------------
stdio-common/vfwprintf-internal.c | 2 +
stdio-common/vfwprintf.c | 28 +-
stdio-common/vfwscanf-internal.c | 2 +
stdio-common/vfwscanf.c | 28 +-
stdio-common/vprintf.c | 4 +-
stdlib/strfmon.c | 3 +-
stdlib/strfmon_l.c | 8 +-
stdlib/strfrom-skeleton.c | 2 +-
sysdeps/generic/math_ldbl_opt.h | 5 +-
sysdeps/generic/stdio-lock.h | 7 -
sysdeps/ieee754/ldbl-opt/Makefile | 2 +-
sysdeps/ieee754/ldbl-opt/math_ldbl_opt.h | 9 +-
sysdeps/ieee754/ldbl-opt/nldbl-compat.c | 807 ++++----
sysdeps/ieee754/ldbl-opt/nldbl-compat.h | 8 +-
sysdeps/nptl/stdio-lock.h | 7 -
wcsmbs/isoc99_fwscanf.c | 7 +-
wcsmbs/isoc99_swscanf.c | 11 +-
wcsmbs/isoc99_vfwscanf.c | 9 +-
wcsmbs/isoc99_vswscanf.c | 15 +-
wcsmbs/isoc99_vwscanf.c | 9 +-
wcsmbs/isoc99_wscanf.c | 7 +-
95 files changed, 6458 insertions(+), 6620 deletions(-)
create mode 100644 debug/vobprintf_chk.c
create mode 100644 stdio-common/iovfscanf.c
create mode 100644 stdio-common/iovfwscanf.c
create mode 100644 stdio-common/vfprintf-internal.c
create mode 100644 stdio-common/vfscanf-internal.c
create mode 100644 stdio-common/vfwprintf-internal.c
create mode 100644 stdio-common/vfwscanf-internal.c
--
2.14.5
next reply other threads:[~2018-10-29 12:17 UTC|newest]
Thread overview: 34+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-10-29 12:17 Gabriel F. T. Gomes [this message]
2018-10-29 12:17 ` [PATCH v2 3/8] Use SCANF_ISOC99_A instead of _IO_FLAGS2_SCANF_STD Gabriel F. T. Gomes
2018-11-07 17:50 ` Adhemerval Zanella
2018-10-29 12:17 ` [PATCH v2 8/8] Use PRINTF_LDBL_IS_DBL instead of __ldbl_is_dbl Gabriel F. T. Gomes
2018-11-08 13:39 ` Adhemerval Zanella
2018-10-29 12:17 ` [PATCH v2 7/8] Use PRINTF_FORTIFY instead of _IO_FLAGS2_FORTIFY Gabriel F. T. Gomes
2018-10-29 12:42 ` Gabriel F. T. Gomes
2018-11-08 17:22 ` Adhemerval Zanella
2018-11-08 11:47 ` Adhemerval Zanella
2018-11-15 15:08 ` Gabriel F. T. Gomes
2018-11-15 17:26 ` Adhemerval Zanella
2018-11-15 16:24 ` Florian Weimer
2018-11-15 17:25 ` Adhemerval Zanella
2018-10-29 12:17 ` [PATCH v2 2/8] Add __vfscanf_internal and __vfwscanf_internal with flags arguments Gabriel F. T. Gomes
2018-10-29 12:21 ` Gabriel F. T. Gomes
2018-11-07 18:42 ` Adhemerval Zanella
2018-11-14 15:18 ` Gabriel F. T. Gomes
2018-10-29 12:17 ` [PATCH v2 6/8] Add __vsyslog_internal, with same flags as __v*printf_internal Gabriel F. T. Gomes
2018-11-07 19:56 ` Adhemerval Zanella
2018-10-29 12:17 ` [PATCH v2 1/8] Use STRFMON_LDBL_IS_DBL instead of __ldbl_is_dbl Gabriel F. T. Gomes
2018-11-07 16:06 ` Adhemerval Zanella
2018-11-13 18:08 ` Gabriel F. T. Gomes
2018-11-15 17:23 ` Adhemerval Zanella
2018-11-16 13:31 ` Gabriel F. T. Gomes
2018-11-07 16:33 ` Florian Weimer
2018-10-29 12:17 ` [PATCH v2 5/8] Add __v*printf_internal with flags arguments Gabriel F. T. Gomes
2018-10-29 12:25 ` Gabriel F. T. Gomes
2018-11-07 18:53 ` Adhemerval Zanella
2018-11-08 17:24 ` Adhemerval Zanella
2018-11-15 16:28 ` Gabriel F. T. Gomes
2018-10-29 12:20 ` [PATCH v2 4/8] Use SCANF_LDBL_IS_DBL instead of __ldbl_is_dbl Gabriel F. T. Gomes
2018-11-07 18:18 ` Adhemerval Zanella
2018-10-29 15:15 ` [PATCH v2 0/8] Use more flags parameters instead of global bits in stdio Zack Weinberg
2018-10-31 13:12 ` Gabriel F. T. Gomes
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20181029121650.24544-1-gabriel@inconstante.eti.br \
--to=gabriel@inconstante.eti.br \
--cc=libc-alpha@sourceware.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).