From dce425341171ec5784c87165e23883630971bd97 Mon Sep 17 00:00:00 2001 From: "Gabriel F. T. Gomes" Date: Tue, 26 Nov 2019 14:48:49 -0300 Subject: Refactor *cvt functions implementation (2/2) This patch refactors the *cvt functions implementation in a way that makes it easier to re-use them for implementing the IEEE long double on powerpc64le. By removing the macros that generate the function names (APPEND combined with FUNC_PREFIX), the new code makes it easier to define new function names, such as __qecvtieee128. Tested that installed stripped binaries for all build-many-glibcs targets remain identical before and after this patch. Also tested for powerpc64le and x86_64. Reviewed-by: Paul E. Murphy --- misc/efgcvt_r.c | 19 ++++++++++--------- 1 file changed, 10 insertions(+), 9 deletions(-) (limited to 'misc/efgcvt_r.c') diff --git a/misc/efgcvt_r.c b/misc/efgcvt_r.c index ad78f153ba..5dabcad3c7 100644 --- a/misc/efgcvt_r.c +++ b/misc/efgcvt_r.c @@ -16,23 +16,24 @@ License along with the GNU C Library; if not, see . */ +#define ECVT_R ecvt_r +#define FCVT_R fcvt_r +#define __ECVT_R __ecvt_r +#define __FCVT_R __fcvt_r #include #include #if LONG_DOUBLE_COMPAT (libc, GLIBC_2_0) -# define cvt_symbol(symbol) \ - cvt_symbol_1 (libc, __APPEND (FUNC_PREFIX, symbol), \ - APPEND (q, symbol), GLIBC_2_0); \ - weak_alias (__APPEND (FUNC_PREFIX, symbol), APPEND (FUNC_PREFIX, symbol)) +# define cvt_symbol(local, symbol) \ + cvt_symbol_1 (libc, local, APPEND (q, symbol), GLIBC_2_0); \ + weak_alias (local, symbol) # define cvt_symbol_1(lib, local, symbol, version) \ libc_hidden_def (local) \ compat_symbol (lib, local, symbol, version) #else -# define cvt_symbol(symbol) \ - cvt_symbol_1 (__APPEND (FUNC_PREFIX, symbol), APPEND (FUNC_PREFIX, symbol)) -# define cvt_symbol_1(local, symbol) \ +# define cvt_symbol(local, symbol) \ libc_hidden_def (local) \ weak_alias (local, symbol) #endif -cvt_symbol(fcvt_r); -cvt_symbol(ecvt_r); +cvt_symbol (__fcvt_r, fcvt_r); +cvt_symbol (__ecvt_r, ecvt_r); -- cgit 1.4.1