From 68158953145b55f4aece809554b29cfd6b809555 Mon Sep 17 00:00:00 2001 From: wanzixuan Date: Mon, 11 Mar 2024 09:50:10 +0000 Subject: [PATCH] add new interface for locale issue:https://gitee.com/openharmony/interface_sdk_c/issues/I97KGA?from=project-issue Signed-off-by: wanzixuan --- third_party/musl/ndk_musl_include/wchar.h | 10 ++++++++++ third_party/musl/ndk_script/adapter/libc.ndk.json | 4 ++++ 2 files changed, 14 insertions(+) diff --git a/third_party/musl/ndk_musl_include/wchar.h b/third_party/musl/ndk_musl_include/wchar.h index e8826200e..9e6eb00db 100644 --- a/third_party/musl/ndk_musl_include/wchar.h +++ b/third_party/musl/ndk_musl_include/wchar.h @@ -142,6 +142,16 @@ size_t wcsftime (wchar_t *__restrict, size_t, const wchar_t *__restrict, const s #if defined(_GNU_SOURCE) || defined(_BSD_SOURCE) size_t wcsftime_l (wchar_t *__restrict, size_t, const wchar_t *__restrict, const struct tm *__restrict, locale_t); + +/** + * @brief converts the input string const wchar_t * to a double-precision value + * @param const wchar_t * Null-terminated string to convert + * @param wchar_t ** Pointer to character that stops scan + * @param locale_t The locale to use + * @return double-precision value converted from the input string + * @since 12 + */ +double wcstod_l (const wchar_t *__restrict, wchar_t **__restrict, locale_t); #endif #if defined(_POSIX_SOURCE) || defined(_POSIX_C_SOURCE) \ diff --git a/third_party/musl/ndk_script/adapter/libc.ndk.json b/third_party/musl/ndk_script/adapter/libc.ndk.json index e72f5997b..0334e2a0a 100644 --- a/third_party/musl/ndk_script/adapter/libc.ndk.json +++ b/third_party/musl/ndk_script/adapter/libc.ndk.json @@ -1428,6 +1428,10 @@ { "name": "wcsspn" }, { "name": "wcsstr" }, { "name": "wcstod" }, + { + "first_introduced": "12", + "name": "wcstod_l" + }, { "name": "wcstof" }, { "name": "wcstoimax" }, { "name": "wcstok" }, -- Gitee