diff options
author | Gabriel F. T. Gomes <gabrielftg@linux.ibm.com> | 2019-11-26 14:48:49 -0300 |
---|---|---|
committer | Gabriel F. T. Gomes <gabrielftg@linux.ibm.com> | 2019-12-23 16:32:07 -0300 |
commit | dce425341171ec5784c87165e23883630971bd97 (patch) | |
tree | 455190e456492ae6d1afa0632157fec330df903b /misc/qefgcvt.c | |
parent | e18a305777adf60c2378ac864a350319269a29fa (diff) | |
download | glibc-dce425341171ec5784c87165e23883630971bd97.zip glibc-dce425341171ec5784c87165e23883630971bd97.tar.gz glibc-dce425341171ec5784c87165e23883630971bd97.tar.bz2 |
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 <murphyp@linux.ibm.com>
Diffstat (limited to 'misc/qefgcvt.c')
-rw-r--r-- | misc/qefgcvt.c | 25 |
1 files changed, 15 insertions, 10 deletions
diff --git a/misc/qefgcvt.c b/misc/qefgcvt.c index 8f1582a..903bf93 100644 --- a/misc/qefgcvt.c +++ b/misc/qefgcvt.c @@ -16,19 +16,24 @@ License along with the GNU C Library; if not, see <https://www.gnu.org/licenses/>. */ +#define ECVT qecvt +#define FCVT qfcvt +#define GCVT qgcvt +#define __ECVT __qecvt +#define __FCVT __qfcvt +#define __GCVT __qgcvt +#define __ECVT_R __qecvt_r +#define __FCVT_R __qfcvt_r #include <efgcvt-ldbl-macros.h> #include <efgcvt-template.c> #if LONG_DOUBLE_COMPAT (libc, GLIBC_2_0) -# define cvt_symbol(symbol) \ - cvt_symbol_1 (libc, __APPEND (FUNC_PREFIX, symbol), \ - APPEND (FUNC_PREFIX, symbol), GLIBC_2_4) -# define cvt_symbol_1(lib, local, symbol, version) \ - versioned_symbol (lib, local, symbol, version) +# define cvt_symbol(local, symbol) \ + versioned_symbol (libc, local, symbol, GLIBC_2_4) #else -# define cvt_symbol(symbol) \ - strong_alias (__APPEND (FUNC_PREFIX, symbol), APPEND (FUNC_PREFIX, symbol)) +# define cvt_symbol(local, symbol) \ + strong_alias (local, symbol) #endif -cvt_symbol(fcvt); -cvt_symbol(ecvt); -cvt_symbol(gcvt); +cvt_symbol (__qfcvt, qfcvt); +cvt_symbol (__qecvt, qecvt); +cvt_symbol (__qgcvt, qgcvt); |