Skip to content

Commit 60b655d

Browse files
committed
fix: Order of all s_*! macro calls
1 parent 31693b7 commit 60b655d

File tree

4 files changed

+47
-48
lines changed

4 files changed

+47
-48
lines changed

src/unix/bsd/freebsdlike/freebsd/aarch64.rs

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -6,17 +6,6 @@ pub type time_t = i64;
66
pub type suseconds_t = i64;
77
pub type register_t = i64;
88

9-
// should be pub(crate), but that requires Rust 1.18.0
10-
cfg_if! {
11-
if #[cfg(libc_const_size_of)] {
12-
#[doc(hidden)]
13-
pub const _ALIGNBYTES: usize = ::mem::size_of::<::c_longlong>() - 1;
14-
} else {
15-
#[doc(hidden)]
16-
pub const _ALIGNBYTES: usize = 8 - 1;
17-
}
18-
}
19-
209
s_no_extra_traits! {
2110
pub struct gpregs {
2211
pub gp_x: [::register_t; 30],
@@ -44,6 +33,17 @@ s_no_extra_traits! {
4433
}
4534
}
4635

36+
// should be pub(crate), but that requires Rust 1.18.0
37+
cfg_if! {
38+
if #[cfg(libc_const_size_of)] {
39+
#[doc(hidden)]
40+
pub const _ALIGNBYTES: usize = ::mem::size_of::<::c_longlong>() - 1;
41+
} else {
42+
#[doc(hidden)]
43+
pub const _ALIGNBYTES: usize = 8 - 1;
44+
}
45+
}
46+
4747
cfg_if! {
4848
if #[cfg(feature = "extra_traits")] {
4949
impl PartialEq for gpregs {

src/unix/bsd/freebsdlike/freebsd/riscv64.rs

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -6,17 +6,6 @@ pub type time_t = i64;
66
pub type suseconds_t = ::c_long;
77
pub type register_t = i64;
88

9-
// should be pub(crate), but that requires Rust 1.18.0
10-
cfg_if! {
11-
if #[cfg(libc_const_size_of)] {
12-
#[doc(hidden)]
13-
pub const _ALIGNBYTES: usize = ::mem::size_of::<::c_longlong>() - 1;
14-
} else {
15-
#[doc(hidden)]
16-
pub const _ALIGNBYTES: usize = 8 - 1;
17-
}
18-
}
19-
209
s_no_extra_traits! {
2110
pub struct gpregs {
2211
pub gp_ra: ::register_t,
@@ -46,6 +35,17 @@ s_no_extra_traits! {
4635
}
4736
}
4837

38+
// should be pub(crate), but that requires Rust 1.18.0
39+
cfg_if! {
40+
if #[cfg(libc_const_size_of)] {
41+
#[doc(hidden)]
42+
pub const _ALIGNBYTES: usize = ::mem::size_of::<::c_longlong>() - 1;
43+
} else {
44+
#[doc(hidden)]
45+
pub const _ALIGNBYTES: usize = 8 - 1;
46+
}
47+
}
48+
4949
cfg_if! {
5050
if #[cfg(feature = "extra_traits")] {
5151
impl PartialEq for gpregs {

src/unix/solarish/solaris.rs

Lines changed: 24 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,30 @@ s! {
2626
}
2727
}
2828

29+
s_no_extra_traits! {
30+
#[cfg_attr(feature = "extra_traits", allow(missing_debug_implementations))]
31+
pub union door_desc_t__d_data {
32+
pub d_desc: door_desc_t__d_data__d_desc,
33+
d_resv: [::c_int; 5], /* Check out /usr/include/sys/door.h */
34+
}
35+
36+
#[cfg_attr(feature = "extra_traits", allow(missing_debug_implementations))]
37+
pub struct door_desc_t {
38+
pub d_attributes: door_attr_t,
39+
pub d_data: door_desc_t__d_data,
40+
}
41+
42+
#[cfg_attr(feature = "extra_traits", allow(missing_debug_implementations))]
43+
pub struct door_arg_t {
44+
pub data_ptr: *const ::c_char,
45+
pub data_size: ::size_t,
46+
pub desc_ptr: *const door_desc_t,
47+
pub dec_num: ::c_uint,
48+
pub rbuf: *const ::c_char,
49+
pub rsize: ::size_t,
50+
}
51+
}
52+
2953
pub const PORT_SOURCE_POSTWAIT: ::c_int = 8;
3054
pub const PORT_SOURCE_SIGNAL: ::c_int = 9;
3155

@@ -75,27 +99,3 @@ extern "C" {
7599

76100
pub fn euidaccess(path: *const ::c_char, amode: ::c_int) -> ::c_int;
77101
}
78-
79-
s_no_extra_traits! {
80-
#[cfg_attr(feature = "extra_traits", allow(missing_debug_implementations))]
81-
pub union door_desc_t__d_data {
82-
pub d_desc: door_desc_t__d_data__d_desc,
83-
d_resv: [::c_int; 5], /* Check out /usr/include/sys/door.h */
84-
}
85-
86-
#[cfg_attr(feature = "extra_traits", allow(missing_debug_implementations))]
87-
pub struct door_desc_t {
88-
pub d_attributes: door_attr_t,
89-
pub d_data: door_desc_t__d_data,
90-
}
91-
92-
#[cfg_attr(feature = "extra_traits", allow(missing_debug_implementations))]
93-
pub struct door_arg_t {
94-
pub data_ptr: *const ::c_char,
95-
pub data_size: ::size_t,
96-
pub desc_ptr: *const door_desc_t,
97-
pub dec_num: ::c_uint,
98-
pub rbuf: *const ::c_char,
99-
pub rsize: ::size_t,
100-
}
101-
}

src/wasi.rs

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -39,6 +39,7 @@ pub type blkcnt_t = i64;
3939
pub type nfds_t = c_ulong;
4040
pub type wchar_t = i32;
4141
pub type nl_item = c_int;
42+
pub type __wasi_rights_t = u64;
4243

4344
s_no_extra_traits! {
4445
#[repr(align(16))]
@@ -48,8 +49,6 @@ s_no_extra_traits! {
4849
}
4950
}
5051

51-
pub type __wasi_rights_t = u64;
52-
5352
#[allow(missing_copy_implementations)]
5453
#[cfg_attr(feature = "extra_traits", derive(Debug))]
5554
pub enum FILE {}

0 commit comments

Comments
 (0)