diff options
author | Joseph Myers <joseph@codesourcery.com> | 2018-02-21 18:02:24 +0000 |
---|---|---|
committer | Joseph Myers <joseph@codesourcery.com> | 2018-02-21 18:02:24 +0000 |
commit | 039c721a30392790be50dba53b4c72dbcd65be67 (patch) | |
tree | a8be73b53e7fce5e920e40bd2ac212719441f614 /misc/syslog.c | |
parent | 30ac923dbe7d0c16df8a368150ecd736557508f4 (diff) | |
download | glibc-039c721a30392790be50dba53b4c72dbcd65be67.zip glibc-039c721a30392790be50dba53b4c72dbcd65be67.tar.gz glibc-039c721a30392790be50dba53b4c72dbcd65be67.tar.bz2 |
Fix -Os putc_unlocked, fputc_unlocked linknamespace, localplt issues (bug 15105, bug 19463).
Continuing the fixes for linknamespace and localplt test failures with
-Os that arise from functions not being inlined in that case, this
patch fixes such failures for putc_unlocked and fputc_unlocked.
libc_hidden_* are used for both functions, while namespace issues are
addressed by making putc_unlocked a weak alias of hidden
__putc_unlocked, which is called in the one place where namespace
issues arise (and defined as an inline function in include/stdio.h).
Tested for x86_64 (both without -Os to make sure that case continues
to work, and with -Os to make sure all the relevant linknamespace and
localplt test failures are resolved). This completes fixing the -Os
linknamespace failures (at least for x86_64); localplt failures remain
after this patch.
2018-02-19 Joseph Myers <joseph@codesourcery.com>
[BZ #15105]
[BZ #19463]
* libio/fputc_u.c (fputc_unlocked): Use libc_hidden_def.
* libio/putc_u.c (putc_unlocked): Rename to __putc_unlocked and
define as weak alias of __putc_unlocked. Use libc_hidden_weak.
* include/stdio.h [!_ISOMAC] (fputc_unlocked): Use
libc_hidden_proto.
[!_ISOMAC] (putc_unlocked): Likewise.
[!_ISOMAC] (__putc_unlocked): Declare as hidden function, and
define inline if [__USE_EXTERN_INLINES].
* misc/syslog.c (__vsyslog_chk): Call __putc_unlocked instead of
putc_unlocked.
Diffstat (limited to 'misc/syslog.c')
-rw-r--r-- | misc/syslog.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/misc/syslog.c b/misc/syslog.c index 2b6bd37..644dbe8 100644 --- a/misc/syslog.c +++ b/misc/syslog.c @@ -207,8 +207,8 @@ __vsyslog_chk(int pri, int flag, const char *fmt, va_list ap) fprintf (f, "[%d]", (int) __getpid ()); if (LogTag != NULL) { - putc_unlocked (':', f); - putc_unlocked (' ', f); + __putc_unlocked (':', f); + __putc_unlocked (' ', f); } /* Restore errno for %m format. */ |