diff --git a/c-gull/src/use_libc.rs b/c-gull/src/use_libc.rs index d370f5a..1f3d352 100644 --- a/c-gull/src/use_libc.rs +++ b/c-gull/src/use_libc.rs @@ -59,16 +59,14 @@ macro_rules! libc { #[cfg(all(feature = "take-charge", feature = "thread"))] macro_rules! libc_type { ($name:ident, $libc:ident) => { - #[cfg(test)] - static_assertions::const_assert_eq!( - core::mem::size_of::<$name>(), - core::mem::size_of::() - ); - #[cfg(test)] - static_assertions::const_assert_eq!( - core::mem::align_of::<$name>(), - core::mem::align_of::() - ); + const _: () = { + if core::mem::size_of::<$name>() != core::mem::size_of::() { + panic!(); + } + if core::mem::align_of::<$name>() != core::mem::align_of::() { + panic!(); + } + }; }; } diff --git a/c-scape/src/todo.rs b/c-scape/src/todo.rs index 2f1af33..92656d0 100644 --- a/c-scape/src/todo.rs +++ b/c-scape/src/todo.rs @@ -293,6 +293,10 @@ unsafe extern "C" fn strftime() { todo!("strftime") } #[no_mangle] +unsafe extern "C" fn wcsftime() { + todo!("wcsftime") +} +#[no_mangle] unsafe extern "C" fn __isoc99_scanf() { todo!("__isoc99_scanf") } @@ -1169,3 +1173,11 @@ unsafe extern "C" fn backtrace() { unsafe extern "C" fn backtrace_symbols() { todo!("backtrace_symbols") } +#[no_mangle] +unsafe extern "C" fn getwc() { + todo!("getwc") +} +#[no_mangle] +unsafe extern "C" fn putwc() { + todo!("putwc") +} diff --git a/c-scape/src/todo/locale.rs b/c-scape/src/todo/locale.rs index bdcf6c5..0002f59 100644 --- a/c-scape/src/todo/locale.rs +++ b/c-scape/src/todo/locale.rs @@ -40,3 +40,11 @@ unsafe extern "C" fn strtoll_l() { unsafe extern "C" fn strtoull_l() { todo!("strtoull_l") } +#[no_mangle] +unsafe extern "C" fn wcsxfrm() { + todo!("wcsxfrm") +} +#[no_mangle] +unsafe extern "C" fn wcscoll() { + todo!("wcscoll") +} diff --git a/c-scape/src/todo/wchar.rs b/c-scape/src/todo/wchar.rs index 1b620c0..1cba1b5 100644 --- a/c-scape/src/todo/wchar.rs +++ b/c-scape/src/todo/wchar.rs @@ -280,3 +280,11 @@ unsafe extern "C" fn iswupper() { unsafe extern "C" fn iswxdigit() { todo!("iswxdigit") } +#[no_mangle] +unsafe extern "C" fn towupper() { + todo!("towupper") +} +#[no_mangle] +unsafe extern "C" fn towlower() { + todo!("towlower") +} diff --git a/c-scape/src/use_libc.rs b/c-scape/src/use_libc.rs index d370f5a..1f3d352 100644 --- a/c-scape/src/use_libc.rs +++ b/c-scape/src/use_libc.rs @@ -59,16 +59,14 @@ macro_rules! libc { #[cfg(all(feature = "take-charge", feature = "thread"))] macro_rules! libc_type { ($name:ident, $libc:ident) => { - #[cfg(test)] - static_assertions::const_assert_eq!( - core::mem::size_of::<$name>(), - core::mem::size_of::() - ); - #[cfg(test)] - static_assertions::const_assert_eq!( - core::mem::align_of::<$name>(), - core::mem::align_of::() - ); + const _: () = { + if core::mem::size_of::<$name>() != core::mem::size_of::() { + panic!(); + } + if core::mem::align_of::<$name>() != core::mem::align_of::() { + panic!(); + } + }; }; }