Update copyright dates with scripts/update-copyrights
[glibc.git] / sysdeps / ieee754 / ldbl-128ibm-compat / ieee128-qefgcvt.c
blobe56e01ab2dee3a3afac8a15c296a48662bb8c3c2
1 /* IEEE binary128 versions of *cvt functions.
2 Copyright (C) 2018-2023 Free Software Foundation, Inc.
3 This file is part of the GNU C Library.
5 The GNU C Library is free software; you can redistribute it and/or
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.
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
13 Lesser General Public License for more details.
15 You should have received a copy of the GNU Lesser General Public
16 License along with the GNU C Library; if not, see
17 <https://www.gnu.org/licenses/>. */
19 /* When in IEEE long double mode, call ___ieee128_sprintf. */
20 #include <stdio.h>
21 typeof (sprintf) ___ieee128_sprintf attribute_hidden;
22 #define SPRINTF ___ieee128_sprintf
24 /* Declare internal functions: ___qecvtieee128_r and ___qfcvtieee128_r,
25 built from a different compiling unit, and called from here. */
26 #include <stdlib.h>
27 typeof (qecvt_r) ___qecvtieee128_r;
28 typeof (qfcvt_r) ___qfcvtieee128_r;
30 /* Rename the static buffers and pointer, otherwise the IEEE long double
31 variants of qecvt and qfcvt would reuse the same buffers and pointer
32 as their non-IEEE long double counterparts. */
33 #define qecvt_buffer qecvtieee128_buffer
34 #define qfcvt_buffer qfcvtieee128_buffer
35 #define qfcvt_bufptr qfcvtieee128_bufptr
37 #define ECVT __qecvtieee128
38 #define FCVT __qfcvtieee128
39 #define GCVT __qgcvtieee128
40 #define __ECVT ___qecvtieee128
41 #define __FCVT ___qfcvtieee128
42 #define __GCVT ___qgcvtieee128
43 #define __ECVT_R ___qecvtieee128_r
44 #define __FCVT_R ___qfcvtieee128_r
45 #include <efgcvt-ldbl-macros.h>
46 #include <efgcvt-template.c>
48 #define cvt_symbol(local, symbol) \
49 strong_alias (local, symbol)
50 cvt_symbol (___qfcvtieee128, __qfcvtieee128);
51 cvt_symbol (___qecvtieee128, __qecvtieee128);
52 cvt_symbol (___qgcvtieee128, __qgcvtieee128);