diff options
author | Joseph Myers <joseph@codesourcery.com> | 2015-06-17 20:14:18 +0000 |
---|---|---|
committer | Joseph Myers <joseph@codesourcery.com> | 2015-06-17 20:14:18 +0000 |
commit | eb1fae6a450b3cce5a75c1ed1a734520c56a6457 (patch) | |
tree | 9cfa82af5f55596737e54409cc328a4ee03c5396 /libio/iofflush.c | |
parent | 68f1ba4ba4b9cb4661ca3ed446d0967ca79c2a47 (diff) | |
download | glibc-eb1fae6a450b3cce5a75c1ed1a734520c56a6457.tar.gz glibc-eb1fae6a450b3cce5a75c1ed1a734520c56a6457.tar.xz glibc-eb1fae6a450b3cce5a75c1ed1a734520c56a6457.zip |
Fix getpass fflush_unlocked namespace (bug 18540).
The getpass function (XPG3 / XPG4 / UNIX98) calls fflush_unlocked (not in any of those standards). This patch fixes this by making fflush_unlocked into a weak alias for __fflush_unlocked and calling __fflush_unlocked from getpass. Tested for x86_64 and x86 (testsuite, and that disassembly of installed stripped shared libraries is unchanged by the patch). [BZ #18540] * libio/iofflush.c [!_IO_MTSAFE_IO] (__fflush_unlocked): Define as strong alias of _IO_fflush. Use libc_hidden_def. * libio/iofflush_u.c (fflush_unlocked): Rename to __fflush_unlocked and define as weak alias of __fflush_unlocked. Use libc_hidden_weak. * include/stdio.h (__fflush_unlocked): Declare. Use libc_hidden_proto. * misc/getpass.c (getpass): Call __fflush_unlocked instead of fflush_unlocked. * conform/Makefile (test-xfail-UNIX98/unistd.h/linknamespace): Remove variable.
Diffstat (limited to 'libio/iofflush.c')
-rw-r--r-- | libio/iofflush.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/libio/iofflush.c b/libio/iofflush.c index 106f55fd2c..236e145a91 100644 --- a/libio/iofflush.c +++ b/libio/iofflush.c @@ -50,6 +50,8 @@ weak_alias (_IO_fflush, fflush) libc_hidden_weak (fflush) #ifndef _IO_MTSAFE_IO +strong_alias (_IO_fflush, __fflush_unlocked) +libc_hidden_def (__fflush_unlocked) weak_alias (_IO_fflush, fflush_unlocked) libc_hidden_weak (fflush_unlocked) #endif |