1 /* Copyright (C) 1999-2024 Free Software Foundation, Inc.
2 This file is part of the GNU C Library.
4 The GNU C Library is free software; you can redistribute it and/or
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.
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
12 Lesser General Public License for more details.
14 You should have received a copy of the GNU Lesser General Public
15 License along with the GNU C Library; if not, see
16 <https://www.gnu.org/licenses/>. */
18 #include <bits/floatn.h>
20 #if __HAVE_FLOAT128 && !__HAVE_DISTINCT_FLOAT128
21 # define strtof128_l __hide_strtof128_l
22 # define wcstof128_l __hide_wcstof128_l
25 #if __HAVE_FLOAT64X_LONG_DOUBLE
26 # define strtof64x_l __hide_strtof64x_l
27 # define wcstof64x_l __hide_wcstof64x_l
34 /* The actual implementation for all floating point sizes is in strtod.c.
35 These macros tell it to produce the `long double' version, `strtold'. */
37 #define FLOAT long double
40 extern long double ____new_wcstold_l (const wchar_t *, wchar_t **, locale_t
);
41 # define STRTOF __new_wcstold_l
42 # define __STRTOF ____new_wcstold_l
43 # define ____STRTOF_INTERNAL ____wcstold_l_internal
44 # define STRTOF_NAN __wcstold_nan
46 extern long double ____new_strtold_l (const char *, char **, locale_t
);
47 # define STRTOF __new_strtold_l
48 # define __STRTOF ____new_strtold_l
49 # define ____STRTOF_INTERNAL ____strtold_l_internal
50 # define STRTOF_NAN __strtold_nan
52 extern __typeof (__STRTOF
) STRTOF
;
53 libc_hidden_proto (__STRTOF
)
54 libc_hidden_proto (STRTOF
)
55 #define MPN2FLOAT __mpn_construct_long_double
56 #define FLOAT_HUGE_VAL HUGE_VALL
60 #ifdef __LONG_DOUBLE_MATH_OPTIONAL
61 # include <math_ldbl_opt.h>
63 weak_alias (____new_wcstold_l
, ___new_wcstold_l
);
64 long_double_symbol (libc
, ___new_wcstold_l
, wcstold_l
);
65 long_double_symbol (libc
, ____new_wcstold_l
, __wcstold_l
);
67 weak_alias (____new_strtold_l
, ___new_strtold_l
);
68 long_double_symbol (libc
, ___new_strtold_l
, strtold_l
);
69 long_double_symbol (libc
, ____new_strtold_l
, __strtold_l
);
73 #if __HAVE_FLOAT128 && !__HAVE_DISTINCT_FLOAT128
77 weak_alias (____new_wcstold_l
, wcstof128_l
)
79 weak_alias (____new_strtold_l
, strtof128_l
)
83 #if __HAVE_FLOAT64X_LONG_DOUBLE
87 weak_alias (____new_wcstold_l
, wcstof64x_l
)
89 weak_alias (____new_strtold_l
, strtof64x_l
)