]> git.ipfire.org Git - thirdparty/glibc.git/blame - sysdeps/ieee754/ldbl-64-128/strtold_l.c
Update copyright dates with scripts/update-copyrights.
[thirdparty/glibc.git] / sysdeps / ieee754 / ldbl-64-128 / strtold_l.c
CommitLineData
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>
21#include <xlocale.h>
22
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'. */
25
26#define FLOAT long double
27#define FLT LDBL
28#ifdef USE_WIDE_CHAR
29extern 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
e02cabec 33# define STRTOF_NAN __wcstold_nan
c6251f03
RM
34#else
35extern long double ____new_strtold_l (const char *, char **, __locale_t);
36# define STRTOF __new_strtold_l
37# define __STRTOF ____new_strtold_l
38# define ____STRTOF_INTERNAL ____strtold_l_internal
e02cabec 39# define STRTOF_NAN __strtold_nan
c6251f03 40#endif
702a9414
JJ
41extern __typeof (__STRTOF) STRTOF;
42libc_hidden_proto (__STRTOF)
43libc_hidden_proto (STRTOF)
c6251f03
RM
44#define MPN2FLOAT __mpn_construct_long_double
45#define FLOAT_HUGE_VAL HUGE_VALL
c6251f03
RM
46
47#include <strtod_l.c>
48
49#ifdef __LONG_DOUBLE_MATH_OPTIONAL
50# include <math_ldbl_opt.h>
51# ifdef USE_WIDE_CHAR
702a9414
JJ
52weak_alias (____new_wcstold_l, ___new_wcstold_l);
53long_double_symbol (libc, ___new_wcstold_l, wcstold_l);
c6251f03
RM
54long_double_symbol (libc, ____new_wcstold_l, __wcstold_l);
55# else
702a9414
JJ
56weak_alias (____new_strtold_l, ___new_strtold_l);
57long_double_symbol (libc, ___new_strtold_l, strtold_l);
c6251f03
RM
58long_double_symbol (libc, ____new_strtold_l, __strtold_l);
59# endif
60#endif