From 01cad84e1996a6f20bf19609d0554c73f2ee33d5 Mon Sep 17 00:00:00 2001 From: Joseph Myers Date: Wed, 12 Nov 2014 22:38:11 +0000 Subject: Fix __printf_fp wmemset namespace (bug 17574). __printf_fp calls wmemset, but that is not an ISO C90 function. This patch fixes it to call a new __wmemset name instead (with wmemset being a weak alias). Tested for x86_64 (testsuite, and that disassembly of installed shared libraries is unchanged by the patch). [BZ #17574] * wcsmbs/wmemset.c (wmemset): Rename to __wmemset and define as weak alias of __wmemset. Use libc_hidden_weak. (__wmemset): Use libc_hidden_def. * include/wchar.h (__wmemset): Declare. Use libc_hidden_proto. * stdio-common/printf_fp.c (___printf_fp): Call __wmemset instead of wmemset. --- wcsmbs/wmemset.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'wcsmbs') diff --git a/wcsmbs/wmemset.c b/wcsmbs/wmemset.c index c499545..a80b815 100644 --- a/wcsmbs/wmemset.c +++ b/wcsmbs/wmemset.c @@ -20,7 +20,7 @@ wchar_t * -wmemset (s, c, n) +__wmemset (s, c, n) wchar_t *s; wchar_t c; size_t n; @@ -52,4 +52,6 @@ wmemset (s, c, n) return s; } -libc_hidden_def (wmemset) +libc_hidden_def (__wmemset) +weak_alias (__wmemset, wmemset) +libc_hidden_weak (wmemset) -- cgit v1.1