Skip to content

Commit f3152a3

Browse files
committed
Move DragonFly related stuff into dragonfly/*
Replicate x86_64.rs from FreeBSD. Need some twists.
1 parent 9fe3512 commit f3152a3

File tree

2 files changed

+39
-0
lines changed

2 files changed

+39
-0
lines changed

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

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,12 @@
1+
cfg_if! {
2+
if #[cfg(target_arch = "x86_64")] {
3+
mod x86_64;
4+
pub use self::x86_64::*;
5+
} else {
6+
// ...
7+
}
8+
}
9+
110
pub type fsblkcnt_t = ::c_uint;
211
pub type fsfilcnt_t = ::c_uint;
312

Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
pub type c_long = i64;
2+
pub type c_ulong = u64;
3+
pub type time_t = i64;
4+
pub type suseconds_t = i64;
5+
6+
s! {
7+
pub struct stat {
8+
pub st_dev: ::dev_t,
9+
pub st_ino: ::ino_t,
10+
pub st_mode: ::mode_t,
11+
pub st_nlink: ::nlink_t,
12+
pub st_uid: ::uid_t,
13+
pub st_gid: ::gid_t,
14+
pub st_rdev: ::dev_t,
15+
pub st_atime: ::time_t,
16+
pub st_atime_nsec: ::c_long,
17+
pub st_mtime: ::time_t,
18+
pub st_mtime_nsec: ::c_long,
19+
pub st_ctime: ::time_t,
20+
pub st_ctime_nsec: ::c_long,
21+
pub st_size: ::off_t,
22+
pub st_blocks: ::blkcnt_t,
23+
pub st_blksize: ::blksize_t,
24+
pub st_flags: ::fflags_t,
25+
pub st_gen: ::uint32_t,
26+
pub st_lspare: ::int32_t,
27+
pub st_birthtime: ::time_t,
28+
pub st_birthtime_nsec: ::c_long,
29+
}
30+
}

0 commit comments

Comments
 (0)