1
0
mirror of https://sourceware.org/git/glibc.git synced 2025-07-30 22:43:12 +03:00

Fix ecvt_r, fcvt_r namespace (bug 18522).

The functions ecvt, fcvt and gcvt, in some standards, bring in
references to ecvt_r and fcvt_r, which aren't in any of those
standards.  The calls are correctly to __ecvt_r and __fcvt_r, but then
the names ecvt_r and fcvt_r are defined as strong aliases; this patch
changes them to weak aliases.

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

	[BZ #18522]
	* misc/efgcvt_r.c
	[LONG_DOUBLE_COMPAT (libc, GLIBC_2_0) && !LONG_DOUBLE_CVT]
	(cvt_symbol): Use weak_alias instead of strong_alias.
	[LONG_DOUBLE_COMPAT (libc, GLIBC_2_0)] (cvt_symbol): Likewise.
	* conform/Makefile (test-xfail-XPG4/stdlib.h/linknamespace):
	Remove variable.
	(test-xfail-UNIX98/stdlib.h/linknamespace): Likewise.
	(test-xfail-XOPEN2K/stdlib.h/linknamespace): Likewise.
This commit is contained in:
Joseph Myers
2015-06-12 10:11:35 +00:00
parent 9acacaa02f
commit 498c1f6a7c
4 changed files with 13 additions and 6 deletions

View File

@ -251,13 +251,13 @@ __APPEND (FUNC_PREFIX, ecvt_r) (value, ndigit, decpt, sign, buf, len)
# define cvt_symbol(symbol) \
cvt_symbol_1 (libc, __APPEND (FUNC_PREFIX, symbol), \
APPEND (q, symbol), GLIBC_2_0); \
strong_alias (__APPEND (FUNC_PREFIX, symbol), APPEND (FUNC_PREFIX, symbol))
weak_alias (__APPEND (FUNC_PREFIX, symbol), APPEND (FUNC_PREFIX, symbol))
# define cvt_symbol_1(lib, local, symbol, version) \
compat_symbol (lib, local, symbol, version)
# endif
#else
# define cvt_symbol(symbol) \
strong_alias (__APPEND (FUNC_PREFIX, symbol), APPEND (FUNC_PREFIX, symbol))
weak_alias (__APPEND (FUNC_PREFIX, symbol), APPEND (FUNC_PREFIX, symbol))
#endif
cvt_symbol(fcvt_r);
cvt_symbol(ecvt_r);