mirror of
https://sourceware.org/git/glibc.git
synced 2025-07-28 00:21:52 +03:00
Fix syslog dprintf namespace (bug 18534).
syslog functions bring in references to dprintf, which wasn't added to POSIX until the 2008 edition and so isn't in various standards containing the syslog functions. This patch fixes this by making dprintf into a weak alias of __dprintf and using __dprintf as appropriate. Tested for x86_64 and x86 (testsuite, and that installed stripped shared libraries are unchanged by the patch). [BZ #18534] * stdio-common/dprintf.c (__dprintf): Use libc_hidden_def. (dprintf): Define as a weak alias of __dprintf, not a strong alias. * include/stdio.h (__dprintf): Declare. Use libc_hidden_proto. * misc/syslog.c (__vsyslog_chk): Call __dprintf instead of dprintf. * conform/Makefile (test-xfail-XPG4/syslog.h/linknamespace): Remove variable. (test-xfail-UNIX98/syslog.h/linknamespace): Likewise. (test-xfail-XOPEN2K/syslog.h/linknamespace): Likewise.
This commit is contained in:
@ -135,6 +135,9 @@ extern int _IO_new_fgetpos (_IO_FILE *, _IO_fpos_t *);
|
||||
# endif
|
||||
|
||||
libc_hidden_proto (dprintf)
|
||||
extern __typeof (dprintf) __dprintf
|
||||
__attribute__ ((__format__ (__printf__, 2, 3)));
|
||||
libc_hidden_proto (__dprintf)
|
||||
libc_hidden_proto (fprintf)
|
||||
libc_hidden_proto (vfprintf)
|
||||
libc_hidden_proto (sprintf)
|
||||
|
Reference in New Issue
Block a user