]> git.ipfire.org Git - thirdparty/glibc.git/blame - misc/efgcvt_r.c
Refactor *cvt functions implementation (2/2)
[thirdparty/glibc.git] / misc / efgcvt_r.c
CommitLineData
e18a3057 1/* Double versions of reentrant *cvt_r functions.
04277e02 2 Copyright (C) 1995-2019 Free Software Foundation, Inc.
19361cb7
UD
3 This file is part of the GNU C Library.
4
5 The GNU C Library is free software; you can redistribute it and/or
41bdb6e2
AJ
6 modify it under the terms of the GNU Lesser General Public
7 License as published by the Free Software Foundation; either
8 version 2.1 of the License, or (at your option) any later version.
19361cb7
UD
9
10 The GNU C Library is distributed in the hope that it will be useful,
11 but WITHOUT ANY WARRANTY; without even the implied warranty of
12 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
41bdb6e2 13 Lesser General Public License for more details.
19361cb7 14
41bdb6e2 15 You should have received a copy of the GNU Lesser General Public
59ba27a6 16 License along with the GNU C Library; if not, see
5a82c748 17 <https://www.gnu.org/licenses/>. */
60478656 18
dce42534
GG
19#define ECVT_R ecvt_r
20#define FCVT_R fcvt_r
21#define __ECVT_R __ecvt_r
22#define __FCVT_R __fcvt_r
e18a3057
GG
23#include <efgcvt-dbl-macros.h>
24#include <efgcvt_r-template.c>
c6251f03
RM
25
26#if LONG_DOUBLE_COMPAT (libc, GLIBC_2_0)
dce42534
GG
27# define cvt_symbol(local, symbol) \
28 cvt_symbol_1 (libc, local, APPEND (q, symbol), GLIBC_2_0); \
29 weak_alias (local, symbol)
e18a3057 30# define cvt_symbol_1(lib, local, symbol, version) \
8ed3b643 31 libc_hidden_def (local) \
c6251f03 32 compat_symbol (lib, local, symbol, version)
c6251f03 33#else
dce42534 34# define cvt_symbol(local, symbol) \
8ed3b643
L
35 libc_hidden_def (local) \
36 weak_alias (local, symbol)
c6251f03 37#endif
dce42534
GG
38cvt_symbol (__fcvt_r, fcvt_r);
39cvt_symbol (__ecvt_r, ecvt_r);