]>
Commit | Line | Data |
---|---|---|
bfff8b1b | 1 | /* Copyright (C) 1999-2017 Free Software Foundation, Inc. |
c6251f03 RM |
2 | This file is part of the GNU C Library. |
3 | ||
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. | |
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 | |
12 | Lesser General Public License for more details. | |
13 | ||
14 | You should have received a copy of the GNU Lesser General Public | |
59ba27a6 PE |
15 | License along with the GNU C Library; if not, see |
16 | <http://www.gnu.org/licenses/>. */ | |
c6251f03 RM |
17 | |
18 | #include <math.h> | |
19 | #include <stdlib.h> | |
20 | #include <wchar.h> | |
c6251f03 RM |
21 | |
22 | /* The actual implementation for all floating point sizes is in strtod.c. | |
23 | These macros tell it to produce the `long double' version, `strtold'. */ | |
24 | ||
25 | #define FLOAT long double | |
26 | #define FLT LDBL | |
27 | #ifdef USE_WIDE_CHAR | |
af85385f | 28 | extern long double ____new_wcstold_l (const wchar_t *, wchar_t **, locale_t); |
c6251f03 RM |
29 | # define STRTOF __new_wcstold_l |
30 | # define __STRTOF ____new_wcstold_l | |
31 | # define ____STRTOF_INTERNAL ____wcstold_l_internal | |
e02cabec | 32 | # define STRTOF_NAN __wcstold_nan |
c6251f03 | 33 | #else |
af85385f | 34 | extern long double ____new_strtold_l (const char *, char **, locale_t); |
c6251f03 RM |
35 | # define STRTOF __new_strtold_l |
36 | # define __STRTOF ____new_strtold_l | |
37 | # define ____STRTOF_INTERNAL ____strtold_l_internal | |
e02cabec | 38 | # define STRTOF_NAN __strtold_nan |
c6251f03 | 39 | #endif |
702a9414 JJ |
40 | extern __typeof (__STRTOF) STRTOF; |
41 | libc_hidden_proto (__STRTOF) | |
42 | libc_hidden_proto (STRTOF) | |
c6251f03 RM |
43 | #define MPN2FLOAT __mpn_construct_long_double |
44 | #define FLOAT_HUGE_VAL HUGE_VALL | |
c6251f03 RM |
45 | |
46 | #include <strtod_l.c> | |
47 | ||
48 | #ifdef __LONG_DOUBLE_MATH_OPTIONAL | |
49 | # include <math_ldbl_opt.h> | |
50 | # ifdef USE_WIDE_CHAR | |
702a9414 JJ |
51 | weak_alias (____new_wcstold_l, ___new_wcstold_l); |
52 | long_double_symbol (libc, ___new_wcstold_l, wcstold_l); | |
c6251f03 RM |
53 | long_double_symbol (libc, ____new_wcstold_l, __wcstold_l); |
54 | # else | |
702a9414 JJ |
55 | weak_alias (____new_strtold_l, ___new_strtold_l); |
56 | long_double_symbol (libc, ___new_strtold_l, strtold_l); | |
c6251f03 RM |
57 | long_double_symbol (libc, ____new_strtold_l, __strtold_l); |
58 | # endif | |
59 | #endif |