| 1 |
//===-----------------------------------------------------------------------===// |
| 2 |
// |
| 3 |
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. |
| 4 |
// See https://llvm.org/LICENSE.txt for license information. |
| 5 |
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception |
| 6 |
// |
| 7 |
//===----------------------------------------------------------------------===// |
| 8 |
|
| 9 |
#ifndef _LIBCPP___LOCALE_DIR_SUPPORT_NO_LOCALE_STRTONUM_H |
| 10 |
#define _LIBCPP___LOCALE_DIR_SUPPORT_NO_LOCALE_STRTONUM_H |
| 11 |
|
| 12 |
#include <__config> |
| 13 |
#include <cstdlib> |
| 14 |
|
| 15 |
#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER) |
| 16 |
# pragma GCC system_header |
| 17 |
#endif |
| 18 |
|
| 19 |
_LIBCPP_BEGIN_NAMESPACE_STD |
| 20 |
namespace __locale { |
| 21 |
|
| 22 |
// |
| 23 |
// Strtonum functions |
| 24 |
// |
| 25 |
inline _LIBCPP_HIDE_FROM_ABI float __strtof(const char* __nptr, char** __endptr, __locale_t) { |
| 26 |
return std::strtof(__nptr, __endptr); |
| 27 |
} |
| 28 |
|
| 29 |
inline _LIBCPP_HIDE_FROM_ABI double __strtod(const char* __nptr, char** __endptr, __locale_t) { |
| 30 |
return std::strtod(__nptr, __endptr); |
| 31 |
} |
| 32 |
|
| 33 |
inline _LIBCPP_HIDE_FROM_ABI long double __strtold(const char* __nptr, char** __endptr, __locale_t) { |
| 34 |
return std::strtold(__nptr, __endptr); |
| 35 |
} |
| 36 |
|
| 37 |
inline _LIBCPP_HIDE_FROM_ABI long long __strtoll(const char* __nptr, char** __endptr, int __base, __locale_t) { |
| 38 |
return std::strtoll(__nptr, __endptr, __base); |
| 39 |
} |
| 40 |
|
| 41 |
inline _LIBCPP_HIDE_FROM_ABI unsigned long long |
| 42 |
__strtoull(const char* __nptr, char** __endptr, int __base, __locale_t) { |
| 43 |
return std::strtoull(__nptr, __endptr, __base); |
| 44 |
} |
| 45 |
|
| 46 |
} // namespace __locale |
| 47 |
_LIBCPP_END_NAMESPACE_STD |
| 48 |
|
| 49 |
#endif // _LIBCPP___LOCALE_DIR_SUPPORT_NO_LOCALE_STRTONUM_H |