]> git.ipfire.org Git - thirdparty/glibc.git/blame - stdlib/strtold.c
aarch64: Fix DT_AARCH64_VARIANT_PCS handling [BZ #26798]
[thirdparty/glibc.git] / stdlib / strtold.c
CommitLineData
ccadf7b5 1/* Read decimal floating point numbers.
41bdb6e2 2 This file is part of the GNU C Library.
bfff8b1b 3 Copyright (C) 1995-2017 Free Software Foundation, Inc.
ccadf7b5 4 Contributed by Ulrich Drepper <drepper@gnu.org>, 1995.
abfbdde1
UD
5
6 The GNU C Library is free software; you can redistribute it and/or
41bdb6e2
AJ
7 modify it under the terms of the GNU Lesser General Public
8 License as published by the Free Software Foundation; either
9 version 2.1 of the License, or (at your option) any later version.
76235ed4 10
abfbdde1
UD
11 The GNU C Library is distributed in the hope that it will be useful,
12 but WITHOUT ANY WARRANTY; without even the implied warranty of
13 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
41bdb6e2 14 Lesser General Public License for more details.
28f540f4 15
41bdb6e2 16 You should have received a copy of the GNU Lesser General Public
59ba27a6
PE
17 License along with the GNU C Library; if not, see
18 <http://www.gnu.org/licenses/>. */
abfbdde1 19
ccadf7b5
UD
20/* The actual implementation for all floating point sizes is in strtod.c.
21 These macros tell it to produce the `float' version, `strtof'. */
28f540f4 22
0acb8a2a 23#include <bits/long-double.h>
c6251f03
RM
24
25#ifdef __LONG_DOUBLE_MATH_OPTIONAL
26# include <wchar.h>
27# define NEW(x) NEW1(x)
28# define NEW1(x) __new_##x
29long double ____new_strtold_internal (const char *, char **, int);
30long double __new_strtold (const char *, char **);
31long double ____new_wcstold_internal (const wchar_t *, wchar_t **, int);
32long double __new_wcstold (const wchar_t *, wchar_t **);
33libc_hidden_proto (____new_strtold_internal)
34libc_hidden_proto (____new_wcstold_internal)
773e305e
RM
35libc_hidden_proto (__new_strtold)
36libc_hidden_proto (__new_wcstold)
c6251f03
RM
37#else
38# define NEW(x) x
39#endif
40
ccadf7b5
UD
41#define FLOAT long double
42#define FLT LDBL
43#ifdef USE_WIDE_CHAR
c6251f03 44# define STRTOF NEW (wcstold)
ccadf7b5
UD
45# define STRTOF_L __wcstold_l
46#else
c6251f03 47# define STRTOF NEW (strtold)
ccadf7b5
UD
48# define STRTOF_L __strtold_l
49#endif
76235ed4 50
a334319f 51#include "strtod.c"
c6251f03
RM
52
53#ifdef __LONG_DOUBLE_MATH_OPTIONAL
54# include <math_ldbl_opt.h>
55# ifdef USE_WIDE_CHAR
56long_double_symbol (libc, __new_wcstold, wcstold);
57long_double_symbol (libc, ____new_wcstold_internal, __wcstold_internal);
58libc_hidden_ver (____new_wcstold_internal, __wcstold_internal)
59# else
60long_double_symbol (libc, __new_strtold, strtold);
61long_double_symbol (libc, ____new_strtold_internal, __strtold_internal);
62libc_hidden_ver (____new_strtold_internal, __strtold_internal)
63# endif
64#endif