File tree Expand file tree Collapse file tree 5 files changed +5
-42
lines changed Expand file tree Collapse file tree 5 files changed +5
-42
lines changed Original file line number Diff line number Diff line change 1
1
//! Hermit C type definitions
2
2
3
+ pub use crate :: arch:: c_char_def as c_char;
3
4
use crate :: prelude:: * ;
4
5
5
- cfg_if ! {
6
- if #[ cfg( any( target_arch = "aarch64" , target_arch = "riscv64" ) ) ] {
7
- pub type c_char = u8 ;
8
- } else {
9
- pub type c_char = i8 ;
10
- }
11
- }
12
-
13
6
pub type c_schar = i8 ;
14
7
pub type c_uchar = u8 ;
15
8
pub type c_short = i16 ;
Original file line number Diff line number Diff line change
1
+ pub use crate :: arch:: c_char_def as c_char;
1
2
use crate :: prelude:: * ;
2
-
3
3
pub type size_t = usize ;
4
4
pub type ssize_t = isize ;
5
5
6
6
pub type off_t = i64 ;
7
7
8
- cfg_if ! {
9
- if #[ cfg( any( target_arch = "aarch64" , target_arch = "arm" ) ) ] {
10
- pub type c_char = u8 ;
11
- } else if #[ cfg( target_arch = "x86_64" ) ] {
12
- pub type c_char = i8 ;
13
- }
14
- }
15
-
16
8
pub type c_schar = i8 ;
17
9
pub type c_uchar = u8 ;
18
10
pub type c_short = i16 ;
Original file line number Diff line number Diff line change
1
+ pub use crate :: arch:: c_char_def as c_char;
1
2
use crate :: prelude:: * ;
2
3
use crate :: { in6_addr, in_addr_t, timespec, DIR } ;
3
4
4
5
pub type nlink_t = u16 ;
5
6
pub type ino_t = u16 ;
6
7
pub type blkcnt_t = u64 ;
7
8
pub type blksize_t = i16 ;
8
- cfg_if ! {
9
- if #[ cfg( any(
10
- target_arch = "arm" ,
11
- target_arch = "riscv32" ,
12
- target_arch = "riscv64" ,
13
- ) ) ] {
14
- pub type c_char = u8 ;
15
- } else {
16
- pub type c_char = i8 ;
17
- }
18
- }
19
9
pub type c_long = isize ;
20
10
pub type c_ulong = usize ;
21
11
pub type cc_t = u8 ;
Original file line number Diff line number Diff line change
1
+ pub use crate :: arch:: c_char_def as c_char;
1
2
use crate :: prelude:: * ;
2
3
3
- cfg_if ! {
4
- if #[ cfg( target_arch = "aarch64" ) ] {
5
- pub type c_char = u8 ;
6
- } else {
7
- pub type c_char = i8 ;
8
- }
9
- }
10
4
pub type wchar_t = i32 ;
11
5
12
6
cfg_if ! {
Original file line number Diff line number Diff line change 1
1
use core:: mem:: size_of;
2
2
3
+ pub use crate :: arch:: c_char_def as c_char;
3
4
use crate :: prelude:: * ;
4
5
5
- cfg_if ! {
6
- if #[ cfg( target_arch = "aarch64" ) ] {
7
- pub type c_char = u8 ;
8
- } else {
9
- pub type c_char = i8 ;
10
- }
11
- }
12
6
pub type c_long = i64 ;
13
7
pub type c_ulong = u64 ;
14
8
pub type caddr_t = * mut c_char ;
You can’t perform that action at this time.
0 commit comments