]> git.lizzy.rs Git - rust.git/blob - src/libstd/os/openbsd/raw.rs
Auto merge of #25453 - jimblandy:FQA-fiasco-link, r=alexcrichton
[rust.git] / src / libstd / os / openbsd / raw.rs
1 // Copyright 2015 The Rust Project Developers. See the COPYRIGHT
2 // file at the top-level directory of this distribution and at
3 // http://rust-lang.org/COPYRIGHT.
4 //
5 // Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
6 // http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
7 // <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
8 // option. This file may not be copied, modified, or distributed
9 // except according to those terms.
10
11 //! OpenBSD-specific raw type definitions
12
13 use os::raw::c_long;
14 use os::unix::raw::{uid_t, gid_t};
15
16 pub type blkcnt_t = i64;
17 pub type blksize_t = u32;
18 pub type dev_t = i32;
19 pub type fflags_t = u32; // type not declared, but struct stat have u_int32_t
20 pub type ino_t = u64;
21 pub type mode_t = u32;
22 pub type nlink_t = u32;
23 pub type off_t = i64;
24 pub type time_t = i64;
25
26 #[repr(C)]
27 pub struct stat {
28     pub st_mode: mode_t,
29     pub st_dev: dev_t,
30     pub st_ino: ino_t,
31     pub st_nlink: nlink_t,
32     pub st_uid: uid_t,
33     pub st_gid: gid_t,
34     pub st_rdev: dev_t,
35     pub st_atime: time_t,
36     pub st_atime_nsec: c_long,
37     pub st_mtime: time_t,
38     pub st_mtime_nsec: c_long,
39     pub st_ctime: time_t,
40     pub st_ctime_nsec: c_long,
41     pub st_size: off_t,
42     pub st_blocks: blkcnt_t,
43     pub st_blksize: blksize_t,
44     pub st_flags: fflags_t,
45     pub st_gen: u32,
46     pub st_birthtime: time_t,
47     pub st_birthtime_nsec: c_long,
48 }