Back to home page

EIC code displayed by LXR

 
 

    


File indexing completed on 2026-05-03 08:13:33

0001 // -*- C++ -*-
0002 //===-----------------------------------------------------------------------===//
0003 //
0004 // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
0005 // See https://llvm.org/LICENSE.txt for license information.
0006 // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
0007 //
0008 //===----------------------------------------------------------------------===//
0009 
0010 #ifndef _LIBCPP___CXX03___LOCALE_LOCALE_BASE_API_ANDROID_H
0011 #define _LIBCPP___CXX03___LOCALE_LOCALE_BASE_API_ANDROID_H
0012 
0013 #include <__cxx03/stdlib.h>
0014 
0015 // FIXME: Is this actually required?
0016 extern "C" {
0017 #include <xlocale.h>
0018 }
0019 
0020 #include <__cxx03/android/api-level.h>
0021 
0022 // If we do not have this header, we are in a platform build rather than an NDK
0023 // build, which will always be at least as new as the ToT NDK, in which case we
0024 // don't need any of the inlines below since libc provides them.
0025 #if __has_include(<android/ndk-version.h>)
0026 #  include <android/ndk-version.h>
0027 // In NDK versions later than 16, locale-aware functions are provided by
0028 // legacy_stdlib_inlines.h
0029 #  if __NDK_MAJOR__ <= 16
0030 #    if __ANDROID_API__ < 26
0031 
0032 inline _LIBCPP_HIDE_FROM_ABI float strtof_l(const char* __nptr, char** __endptr, locale_t) {
0033   return ::strtof(__nptr, __endptr);
0034 }
0035 
0036 inline _LIBCPP_HIDE_FROM_ABI double strtod_l(const char* __nptr, char** __endptr, locale_t) {
0037   return ::strtod(__nptr, __endptr);
0038 }
0039 
0040 #    endif // __ANDROID_API__ < 26
0041 
0042 #  endif // __NDK_MAJOR__ <= 16
0043 #endif   // __has_include(<android/ndk-version.h>)
0044 
0045 #endif // _LIBCPP___CXX03___LOCALE_LOCALE_BASE_API_ANDROID_H