From 1acf1d83cc771d05ff00fd6ed5a4095e44265f9d Mon Sep 17 00:00:00 2001 From: Wildan M Date: Tue, 27 Jan 2026 15:27:45 +0700 Subject: [PATCH] Temporarily enable wcsftime and wcsxfrm --- src/header/wchar/cbindgen.toml | 12 +++++++++++- src/header/wchar/mod.rs | 12 +++++++----- 2 files changed, 18 insertions(+), 6 deletions(-) diff --git a/src/header/wchar/cbindgen.toml b/src/header/wchar/cbindgen.toml index f4d1e4893f..4a37b7e3d8 100644 --- a/src/header/wchar/cbindgen.toml +++ b/src/header/wchar/cbindgen.toml @@ -1,9 +1,19 @@ -sys_includes = ["stddef.h", "stdint.h", "stdio.h", "time.h", "bits/wchar.h", "features.h"] +sys_includes = [ + "stddef.h", + "stdint.h", + "stdio.h", + "time.h", + "bits/wchar.h", + "features.h", +] include_guard = "_RELIBC_WCHAR_H" language = "C" style = "Type" no_includes = true cpp_compat = true +[export.rename] +"tm" = "struct tm" + [enum] prefix_with_name = true diff --git a/src/header/wchar/mod.rs b/src/header/wchar/mod.rs index 04217e88ff..83df3c5525 100644 --- a/src/header/wchar/mod.rs +++ b/src/header/wchar/mod.rs @@ -550,14 +550,15 @@ pub unsafe extern "C" fn wcscspn(wcs: *const wchar_t, set: *const wchar_t) -> si } /// See . -// #[unsafe(no_mangle)] +#[unsafe(no_mangle)] pub extern "C" fn wcsftime( wcs: *mut wchar_t, maxsize: size_t, format: *const wchar_t, - timptr: *mut tm, + timptr: *const tm, ) -> size_t { - unimplemented!(); + todo_skip!(0, "wcsftime is not implemented"); + 0 } /// See . @@ -1014,9 +1015,10 @@ pub unsafe extern "C" fn wcswidth(pwcs: *const wchar_t, n: size_t) -> c_int { } /// See . -// #[unsafe(no_mangle)] +#[unsafe(no_mangle)] pub extern "C" fn wcsxfrm(ws1: *mut wchar_t, ws2: *const wchar_t, n: size_t) -> size_t { - unimplemented!(); + todo_skip!(0, "wcsxfrm is not implemented"); + 0 } /// See .