]>
Commit | Line | Data |
---|---|---|
04277e02 | 1 | /* Copyright (C) 1999-2019 Free Software Foundation, Inc. |
41bdb6e2 | 2 | This file is part of the GNU C Library. |
abfbdde1 UD |
3 | |
4 | The GNU C Library is free software; you can redistribute it and/or | |
41bdb6e2 AJ |
5 | modify it under the terms of the GNU Lesser General Public |
6 | License as published by the Free Software Foundation; either | |
7 | version 2.1 of the License, or (at your option) any later version. | |
abfbdde1 UD |
8 | |
9 | The GNU C Library is distributed in the hope that it will be useful, | |
10 | but WITHOUT ANY WARRANTY; without even the implied warranty of | |
11 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU | |
41bdb6e2 | 12 | Lesser General Public License for more details. |
abfbdde1 | 13 | |
41bdb6e2 | 14 | You should have received a copy of the GNU Lesser General Public |
59ba27a6 | 15 | License along with the GNU C Library; if not, see |
5a82c748 | 16 | <https://www.gnu.org/licenses/>. */ |
abfbdde1 UD |
17 | |
18 | #include <math.h> | |
19 | ||
20 | /* The actual implementation for all floating point sizes is in strtod.c. | |
21 | These macros tell it to produce the `long double' version, `strtold'. */ | |
22 | ||
ccadf7b5 UD |
23 | #define FLOAT long double |
24 | #define FLT LDBL | |
25 | #ifdef USE_WIDE_CHAR | |
26 | # define STRTOF wcstold_l | |
27 | # define __STRTOF __wcstold_l | |
e02cabec | 28 | # define STRTOF_NAN __wcstold_nan |
ccadf7b5 UD |
29 | #else |
30 | # define STRTOF strtold_l | |
31 | # define __STRTOF __strtold_l | |
e02cabec | 32 | # define STRTOF_NAN __strtold_nan |
ccadf7b5 UD |
33 | #endif |
34 | #define MPN2FLOAT __mpn_construct_long_double | |
35 | #define FLOAT_HUGE_VAL HUGE_VALL | |
abfbdde1 | 36 | |
02010e79 JM |
37 | #if __HAVE_FLOAT128 && !__HAVE_DISTINCT_FLOAT128 |
38 | # define strtof128_l __hide_strtof128_l | |
39 | # define wcstof128_l __hide_wcstof128_l | |
40 | #endif | |
41 | ||
0df4fe35 JM |
42 | #if __HAVE_FLOAT64X_LONG_DOUBLE |
43 | # define strtof64x_l __hide_strtof64x_l | |
44 | # define wcstof64x_l __hide_wcstof64x_l | |
45 | #endif | |
46 | ||
ccadf7b5 | 47 | #include <strtod_l.c> |
02010e79 JM |
48 | |
49 | #if __HAVE_FLOAT128 && !__HAVE_DISTINCT_FLOAT128 | |
50 | # undef strtof128_l | |
51 | # undef wcstof128_l | |
52 | # ifdef USE_WIDE_CHAR | |
53 | weak_alias (wcstold_l, wcstof128_l) | |
54 | # else | |
55 | weak_alias (strtold_l, strtof128_l) | |
56 | # endif | |
57 | #endif | |
0df4fe35 JM |
58 | |
59 | #if __HAVE_FLOAT64X_LONG_DOUBLE | |
60 | # undef strtof64x_l | |
61 | # undef wcstof64x_l | |
62 | # ifdef USE_WIDE_CHAR | |
63 | weak_alias (wcstold_l, wcstof64x_l) | |
64 | # else | |
65 | weak_alias (strtold_l, strtof64x_l) | |
66 | # endif | |
67 | #endif |