1 // -*- C++ -*- 2 //===-----------------------------------------------------------------------===// 3 // 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 7 // 8 //===----------------------------------------------------------------------===// 9 // This adds support for the extended locale functions that are currently 10 // missing from the Musl C library. 11 // 12 // This only works when the specified locale is "C" or "POSIX", but that's 13 // about as good as we can do without implementing full xlocale support 14 // in Musl. 15 //===----------------------------------------------------------------------===// 16 17 #ifndef _LIBCPP___LOCALE_DIR_LOCALE_BASE_API_MUSL_H 18 #define _LIBCPP___LOCALE_DIR_LOCALE_BASE_API_MUSL_H 19 20 #include <cstdlib> 21 #include <cwchar> 22 23 inline _LIBCPP_HIDE_FROM_ABI long long strtoll_l(const char* __nptr, char** __endptr, int __base, locale_t) { 24 return ::strtoll(__nptr, __endptr, __base); 25 } 26 27 inline _LIBCPP_HIDE_FROM_ABI unsigned long long strtoull_l(const char* __nptr, char** __endptr, int __base, locale_t) { 28 return ::strtoull(__nptr, __endptr, __base); 29 } 30 31 #endif // _LIBCPP___LOCALE_DIR_LOCALE_BASE_API_MUSL_H 32