about summary refs log tree commit diff
path: root/include
diff options
context:
space:
mode:
authorJoseph Myers <joseph@codesourcery.com>2015-06-17 20:15:22 +0000
committerJoseph Myers <joseph@codesourcery.com>2015-06-17 20:15:22 +0000
commit45dcd79f6eb37ad4e9e6967f1d459ffc3629eb1f (patch)
treebbe261f04108b8145b0f72eca98e6ae18bc549d2 /include
parenteb1fae6a450b3cce5a75c1ed1a734520c56a6457 (diff)
downloadglibc-45dcd79f6eb37ad4e9e6967f1d459ffc3629eb1f.tar.gz
glibc-45dcd79f6eb37ad4e9e6967f1d459ffc3629eb1f.tar.xz
glibc-45dcd79f6eb37ad4e9e6967f1d459ffc3629eb1f.zip
Fix swscanf vswscanf namespace (bug 18542).
swscanf (added in C90 Amendment 1, present in UNIX98) calls vswscanf
(added in C99, not in C90 Amendment 1 or UNIX98).  This patch fixes
this by using __vswscanf instead and making vswscanf into a weak
alias.

(I intend to add conform/ test support for C90 Amendment 1 - and
various other standard versions supported by glibc but not yet by
conform/ tests - at some point, once the results for currently tested
standards are cleaner.)

Tested for x86_64 and x86 (testsuite, and that installed stripped
shared libraries are unchanged by the patch).

	[BZ #18542]
	* libio/iovswscanf.c (__vswscanf): Use libc_hidden_def.
	(vswscanf): Use ldbl_weak_alias instead of ldbl_strong_alias
	* include/wchar.h (__vswscanf): Declare.  Use libc_hidden_proto.
	* libio/swscanf.c (__swscanf): Call __vswscanf instead of
	vswscanf.
	* conform/Makefile (test-xfail-UNIX98/wchar.h/linknamespace):
	Remove variable.
Diffstat (limited to 'include')
-rw-r--r--include/wchar.h4
1 files changed, 4 insertions, 0 deletions
diff --git a/include/wchar.h b/include/wchar.h
index 449ad1d685..67d0248f00 100644
--- a/include/wchar.h
+++ b/include/wchar.h
@@ -197,7 +197,11 @@ extern int __isoc99_vwscanf (const wchar_t *__restrict __format,
 extern int __isoc99_vswscanf (const wchar_t *__restrict __s,
 			      const wchar_t *__restrict __format,
 			      __gnuc_va_list __arg) __THROW;
+extern int __vswscanf (const wchar_t *__restrict __s,
+		       const wchar_t *__restrict __format,
+		       __gnuc_va_list __arg) __THROW;
 libc_hidden_proto (__isoc99_vswscanf)
+libc_hidden_proto (__vswscanf)
 libc_hidden_proto (__isoc99_vfwscanf)
 
 /* Internal functions.  */