2 //===-----------------------------------------------------------------------===//
4 // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
5 // See https://llvm.org/LICENSE.txt for license information.
6 // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
8 //===----------------------------------------------------------------------===//
9 // These are reimplementations of some extended locale functions ( *_l ) that
10 // aren't part of POSIX. They are widely available though (GLIBC, BSD, maybe
11 // others). The unifying aspect in this case is that all of these functions
12 // convert strings to some numeric type.
13 //===----------------------------------------------------------------------===//
15 #ifndef _LIBCPP___SUPPORT_XLOCALE_STRTONUM_FALLBACK_H
16 #define _LIBCPP___SUPPORT_XLOCALE_STRTONUM_FALLBACK_H
21 #if _LIBCPP_HAS_WIDE_CHARACTERS
25 inline _LIBCPP_HIDE_FROM_ABI
float strtof_l(const char* __nptr
, char** __endptr
, locale_t
) {
26 return ::strtof(__nptr
, __endptr
);
29 inline _LIBCPP_HIDE_FROM_ABI
double strtod_l(const char* __nptr
, char** __endptr
, locale_t
) {
30 return ::strtod(__nptr
, __endptr
);
33 inline _LIBCPP_HIDE_FROM_ABI
long double strtold_l(const char* __nptr
, char** __endptr
, locale_t
) {
34 return ::strtold(__nptr
, __endptr
);
37 inline _LIBCPP_HIDE_FROM_ABI
long long strtoll_l(const char* __nptr
, char** __endptr
, int __base
, locale_t
) {
38 return ::strtoll(__nptr
, __endptr
, __base
);
41 inline _LIBCPP_HIDE_FROM_ABI
unsigned long long strtoull_l(const char* __nptr
, char** __endptr
, int __base
, locale_t
) {
42 return ::strtoull(__nptr
, __endptr
, __base
);
45 #endif // _LIBCPP___SUPPORT_XLOCALE_STRTONUM_FALLBACK_H