]> git.ipfire.org Git - thirdparty/glibc.git/blame - sysdeps/ieee754/ldbl-128ibm/strtold_l.c
Update copyright dates with scripts/update-copyrights
[thirdparty/glibc.git] / sysdeps / ieee754 / ldbl-128ibm / strtold_l.c
CommitLineData
2b778ceb 1/* Copyright (C) 1999-2021 Free Software Foundation, Inc.
f964490f
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 15 License along with the GNU C Library; if not, see
5a82c748 16 <https://www.gnu.org/licenses/>. */
f964490f
RM
17
18#include <math.h>
19#include <stdlib.h>
20#include <wchar.h>
f964490f
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 28extern long double ____new_wcstold_l (const wchar_t *, wchar_t **, locale_t);
f964490f
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
f964490f 33#else
af85385f 34extern long double ____new_strtold_l (const char *, char **, locale_t);
f964490f
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
f964490f 39#endif
773e305e
RM
40extern __typeof (__STRTOF) STRTOF;
41libc_hidden_proto (__STRTOF)
42libc_hidden_proto (STRTOF)
f964490f
RM
43#define MPN2FLOAT __mpn_construct_long_double
44#define FLOAT_HUGE_VAL HUGE_VALL
f964490f
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
1e286653
JJ
51weak_alias (____new_wcstold_l, ___new_wcstold_l);
52long_double_symbol (libc, ___new_wcstold_l, wcstold_l);
f964490f
RM
53long_double_symbol (libc, ____new_wcstold_l, __wcstold_l);
54# else
1e286653
JJ
55weak_alias (____new_strtold_l, ___new_strtold_l);
56long_double_symbol (libc, ___new_strtold_l, strtold_l);
f964490f
RM
57long_double_symbol (libc, ____new_strtold_l, __strtold_l);
58# endif
59#endif