1 /* Copyright (C) 1999-2013 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 <http://www.gnu.org/licenses/>. */
23 /* The actual implementation for all floating point sizes is in strtod.c.
24 These macros tell it to produce the `long double' version, `strtold'. */
26 #define FLOAT long double
29 extern long double ____new_wcstold_l (const wchar_t *, wchar_t **, __locale_t);
30 # define STRTOF __new_wcstold_l
31 # define __STRTOF ____new_wcstold_l
32 # define ____STRTOF_INTERNAL ____wcstold_l_internal
34 extern long double ____new_strtold_l (const char *, char **, __locale_t);
35 # define STRTOF __new_strtold_l
36 # define __STRTOF ____new_strtold_l
37 # define ____STRTOF_INTERNAL ____strtold_l_internal
39 extern __typeof (__STRTOF) STRTOF;
40 libc_hidden_proto (__STRTOF)
41 libc_hidden_proto (STRTOF)
42 #define MPN2FLOAT __mpn_construct_long_double
43 #define FLOAT_HUGE_VAL HUGE_VALL
44 #define SET_MANTISSA(flt, mant) \
45 do { union ieee854_long_double u; \
47 u.ieee.mantissa0 = 0x8000; \
48 u.ieee.mantissa1 = 0; \
49 u.ieee.mantissa2 = ((mant) >> 32); \
50 u.ieee.mantissa3 = (mant) & 0xffffffff; \
56 #ifdef __LONG_DOUBLE_MATH_OPTIONAL
57 # include <math_ldbl_opt.h>
59 weak_alias (____new_wcstold_l, ___new_wcstold_l);
60 long_double_symbol (libc, ___new_wcstold_l, wcstold_l);
61 long_double_symbol (libc, ____new_wcstold_l, __wcstold_l);
63 weak_alias (____new_strtold_l, ___new_strtold_l);
64 long_double_symbol (libc, ___new_strtold_l, strtold_l);
65 long_double_symbol (libc, ____new_strtold_l, __strtold_l);