mirror of
https://sourceware.org/git/glibc.git
synced 2024-11-10 07:10:06 +00:00
abccad04b4
ttyslot (XPG4) calls the non-XPG4 functions endttyent, getttyent and setttyent, which in turn bring in references to fgets_unlocked and getttynam. This patch fixes this by making these functions into weak aliases and calling the __* names as needed. Tested for x86_64 and x86 (testsuite, and that disassembly of installed stripped shared libraries is unchanged by the patch). [BZ #18547] * misc/getttyent.c (getttynam): Rename to __getttynam and define as weak alias of __getttynam. Use prototype function definition. Call __setttyent, __getttyent and __endttyent instead of setttyent, getttyent and endttyent. (getttyent): Rename to __getttyent and define as weak alias of __getttyent. Call __setttyent instead of setttyent. Call __fgets_unlocked instead of fgets_unlocked. (setttyent): Rename to __setttyent and define as weak alias of __setttyent. (endttyent): Rename to __endttyent and define as weak alias of __endttyent. * include/ttyent.h (__getttyent): Declare. Use libc_hidden_proto. (__setttyent): Likewise. (__endttyent): Likewise. (getttyent): Don't use libc_hidden_proto. (setttyent): Likewise. (endttyent): Likewise. * misc/ttyslot.c (ttyslot): Call __setttyent, __getttyent and __endttyent instead of setttyent, getttyent and endttyent. * conform/Makefile (test-xfail-XPG4/unistd.h/linknamespace): Remove variable.
12 lines
296 B
C
12 lines
296 B
C
#ifndef _TTYENT_H
|
|
# include <misc/ttyent.h>
|
|
|
|
extern __typeof (getttyent) __getttyent __THROW;
|
|
libc_hidden_proto (__getttyent)
|
|
extern __typeof (setttyent) __setttyent __THROW;
|
|
libc_hidden_proto (__setttyent)
|
|
extern __typeof (endttyent) __endttyent __THROW;
|
|
libc_hidden_proto (__endttyent)
|
|
|
|
#endif
|