File tree Expand file tree Collapse file tree 4 files changed +16
-18
lines changed Expand file tree Collapse file tree 4 files changed +16
-18
lines changed Original file line number Diff line number Diff line change @@ -51,9 +51,6 @@ pub type c_long = i64;
5151
5252pub type c_ulong = u64 ;
5353
54- #[ repr( align( 16 ) ) ]
55- pub struct _CLongDouble ( pub u128 ) ;
56-
5754// long double in C means A float point value, which has 128bit length.
5855// but some bit maybe not used, so the real length of long double could be 80(x86) or 128(power pc/IEEE)
5956// this is different from f128(not stable and not included default) in Rust, so we use u128 for FFI(Rust to C).
@@ -88,6 +85,9 @@ pub type wctype_t = c_ulong;
8885
8986pub type cmpfunc = extern "C" fn ( x : * const c_void , y : * const c_void ) -> c_int ;
9087
88+ #[ repr( align( 16 ) ) ]
89+ pub struct _CLongDouble ( pub u128 ) ;
90+
9191#[ repr( align( 8 ) ) ]
9292#[ repr( C ) ]
9393pub struct pthread_cond_t {
Original file line number Diff line number Diff line change @@ -2214,18 +2214,6 @@ cfg_if! {
22142214 }
22152215}
22162216
2217- cfg_if ! {
2218- if #[ cfg( all(
2219- any( target_env = "gnu" , target_env = "musl" , target_env = "ohos" ) ,
2220- any( target_arch = "x86_64" , target_arch = "x86" )
2221- ) ) ] {
2222- extern "C" {
2223- pub fn iopl( level: c_int) -> c_int;
2224- pub fn ioperm( from: c_ulong, num: c_ulong, turn_on: c_int) -> c_int;
2225- }
2226- }
2227- }
2228-
22292217cfg_if ! {
22302218 if #[ cfg( any(
22312219 target_env = "gnu" ,
@@ -6088,6 +6076,18 @@ safe_f! {
60886076 }
60896077}
60906078
6079+ cfg_if ! {
6080+ if #[ cfg( all(
6081+ any( target_env = "gnu" , target_env = "musl" , target_env = "ohos" ) ,
6082+ any( target_arch = "x86_64" , target_arch = "x86" )
6083+ ) ) ] {
6084+ extern "C" {
6085+ pub fn iopl( level: c_int) -> c_int;
6086+ pub fn ioperm( from: c_ulong, num: c_ulong, turn_on: c_int) -> c_int;
6087+ }
6088+ }
6089+ }
6090+
60916091cfg_if ! {
60926092 if #[ cfg( all( not( target_env = "uclibc" ) , not( target_env = "ohos" ) ) ) ] {
60936093 extern "C" {
Original file line number Diff line number Diff line change 2828 }
2929}
3030
31- #[ cfg( target_os = "l4re" ) ]
3231#[ allow( missing_debug_implementations) ]
3332pub struct pthread_attr_t {
3433 pub __detachstate : c_int ,
Original file line number Diff line number Diff line change @@ -44,6 +44,7 @@ pub type nfds_t = c_ulong;
4444pub type wchar_t = i32 ;
4545pub type nl_item = c_int ;
4646pub type __wasi_rights_t = u64 ;
47+ pub type locale_t = * mut __locale_struct ;
4748
4849s_no_extra_traits ! {
4950 #[ repr( align( 16 ) ) ]
@@ -63,8 +64,6 @@ pub enum DIR {}
6364#[ cfg_attr( feature = "extra_traits" , derive( Debug ) ) ]
6465pub enum __locale_struct { }
6566
66- pub type locale_t = * mut __locale_struct ;
67-
6867s_paren ! {
6968 // in wasi-libc clockid_t is const struct __clockid* (where __clockid is an opaque struct),
7069 // but that's an implementation detail that we don't want to have to deal with
You can’t perform that action at this time.
0 commit comments