Skip to content

Commit f8a2c53

Browse files
committed
Auto merge of #1221 - MikaelUrankar:powerpc64-unknown-freebsd, r=gnzlbg
Add powerpc64-unknown-freebsd FreeBSD review: https://reviews.freebsd.org/D18367
2 parents 118c7ae + 69c9c54 commit f8a2c53

File tree

7 files changed

+43
-1
lines changed

7 files changed

+43
-1
lines changed

src/unix/bsd/freebsdlike/dragonfly/mod.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
pub type c_char = i8;
12
pub type clock_t = u64;
23
pub type ino_t = u64;
34
pub type lwpid_t = i32;

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

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
use dox::mem;
22

3+
pub type c_char = u8;
34
pub type c_long = i64;
45
pub type c_ulong = u64;
56
pub type time_t = i64;

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

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1222,6 +1222,9 @@ cfg_if! {
12221222
} else if #[cfg(target_arch = "arm")] {
12231223
mod arm;
12241224
pub use self::arm::*;
1225+
} else if #[cfg(target_arch = "powerpc64")] {
1226+
mod powerpc64;
1227+
pub use self::powerpc64::*;
12251228
} else {
12261229
// Unknown target_arch
12271230
}
Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,36 @@
1+
pub type c_char = u8;
2+
pub type c_long = i64;
3+
pub type c_ulong = u64;
4+
pub type time_t = i64;
5+
pub type suseconds_t = i64;
6+
7+
s! {
8+
pub struct stat {
9+
pub st_dev: ::dev_t,
10+
pub st_ino: ::ino_t,
11+
pub st_mode: ::mode_t,
12+
pub st_nlink: ::nlink_t,
13+
pub st_uid: ::uid_t,
14+
pub st_gid: ::gid_t,
15+
pub st_rdev: ::dev_t,
16+
pub st_atime: ::time_t,
17+
pub st_atime_nsec: ::c_long,
18+
pub st_mtime: ::time_t,
19+
pub st_mtime_nsec: ::c_long,
20+
pub st_ctime: ::time_t,
21+
pub st_ctime_nsec: ::c_long,
22+
pub st_size: ::off_t,
23+
pub st_blocks: ::blkcnt_t,
24+
pub st_blksize: ::blksize_t,
25+
pub st_flags: ::fflags_t,
26+
pub st_gen: ::uint32_t,
27+
pub st_lspare: ::int32_t,
28+
pub st_birthtime: ::time_t,
29+
pub st_birthtime_nsec: ::c_long,
30+
}
31+
}
32+
33+
// should be pub(crate), but that requires Rust 1.18.0
34+
#[doc(hidden)]
35+
pub const _ALIGNBYTES: usize = mem::size_of::<::c_long>() - 1;
36+
pub const MAP_32BIT: ::c_int = 0x00080000;

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

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
use dox::mem;
22

3+
pub type c_char = i8;
34
pub type c_long = i32;
45
pub type c_ulong = u32;
56
pub type time_t = i32;

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

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
use dox::mem;
22

3+
pub type c_char = i8;
34
pub type c_long = i64;
45
pub type c_ulong = u64;
56
pub type time_t = i64;

src/unix/bsd/freebsdlike/mod.rs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
pub type c_char = i8;
21
pub type dev_t = u32;
32
pub type mode_t = u16;
43
pub type pthread_attr_t = *mut ::c_void;

0 commit comments

Comments
 (0)