Skip to content

Commit

Permalink
fix style issue
Browse files Browse the repository at this point in the history
  • Loading branch information
maminrayej committed Sep 12, 2024
1 parent 58c6400 commit bf77c82
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 11 deletions.
17 changes: 15 additions & 2 deletions src/wasi/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -31,8 +31,21 @@ pub type time_t = c_longlong;
pub type c_double = f64;
pub type c_float = f32;
pub type ino_t = u64;
#[cfg(not(target_vendor = "wasmer"))]
pub type sigset_t = c_uchar;
cfg_if! {
if #[cfg(target_vendor = "wasmer")] {
s! {
#[repr(C)]
pub struct sigset_t {
#[cfg(target_pointer_width = "32")]
__val: [u32; 2],
#[cfg(target_pointer_width = "64")]
__val: [u64; 1],
}
}
} else {
pub type sigset_t = c_uchar;
}
}
pub type suseconds_t = c_longlong;
pub type mode_t = u32;
pub type dev_t = u64;
Expand Down
10 changes: 1 addition & 9 deletions src/wasi/wasix.rs
Original file line number Diff line number Diff line change
Expand Up @@ -209,14 +209,6 @@ s! {
__size: [u64; 7],
}

#[repr(C)]
pub struct sigset_t {
#[cfg(target_pointer_width = "32")]
__val: [u32; 2],
#[cfg(target_pointer_width = "64")]
__val: [u64; 1],
}

#[repr(C)]
pub struct siginfo_t {
pub si_signo: ::c_int,
Expand Down Expand Up @@ -1031,4 +1023,4 @@ pub fn W_STOPCODE(sig: ::c_int) -> ::c_int {

pub fn QCMD(cmd: ::c_int, type_: ::c_int) -> ::c_int {
(cmd << 8) | (type_ & 0x00ff)
}
}

0 comments on commit bf77c82

Please sign in to comment.