std/os/haiku/
raw.rs

1//! Haiku-specific raw type definitions
2
3#![stable(feature = "raw_ext", since = "1.1.0")]
4#![deprecated(
5    since = "1.53.0",
6    note = "these type aliases are no longer supported by \
7            the standard library, the `libc` crate on \
8            crates.io should be used instead for the correct \
9            definitions"
10)]
11#![allow(deprecated)]
12
13use crate::os::raw::c_long;
14use crate::os::unix::raw::{gid_t, uid_t};
15
16// Use the direct definition of usize, instead of uintptr_t like in libc
17#[stable(feature = "pthread_t", since = "1.8.0")]
18pub type pthread_t = usize;
19
20#[stable(feature = "raw_ext", since = "1.1.0")]
21pub type blkcnt_t = i64;
22#[stable(feature = "raw_ext", since = "1.1.0")]
23pub type blksize_t = i32;
24#[stable(feature = "raw_ext", since = "1.1.0")]
25pub type dev_t = i32;
26#[stable(feature = "raw_ext", since = "1.1.0")]
27pub type ino_t = i64;
28#[stable(feature = "raw_ext", since = "1.1.0")]
29pub type mode_t = u32;
30#[stable(feature = "raw_ext", since = "1.1.0")]
31pub type nlink_t = i32;
32#[stable(feature = "raw_ext", since = "1.1.0")]
33pub type off_t = i64;
34#[stable(feature = "raw_ext", since = "1.1.0")]
35pub type time_t = i32;
36
37#[repr(C)]
38#[derive(Clone)]
39#[stable(feature = "raw_ext", since = "1.1.0")]
40pub struct stat {
41    #[stable(feature = "raw_ext", since = "1.1.0")]
42    pub st_dev: dev_t,
43    #[stable(feature = "raw_ext", since = "1.1.0")]
44    pub st_ino: ino_t,
45    #[stable(feature = "raw_ext", since = "1.1.0")]
46    pub st_mode: mode_t,
47    #[stable(feature = "raw_ext", since = "1.1.0")]
48    pub st_nlink: nlink_t,
49    #[stable(feature = "raw_ext", since = "1.1.0")]
50    pub st_uid: uid_t,
51    #[stable(feature = "raw_ext", since = "1.1.0")]
52    pub st_gid: gid_t,
53    #[stable(feature = "raw_ext", since = "1.1.0")]
54    pub st_size: off_t,
55    #[stable(feature = "raw_ext", since = "1.1.0")]
56    pub st_rdev: dev_t,
57    #[stable(feature = "raw_ext", since = "1.1.0")]
58    pub st_blksize: blksize_t,
59    #[stable(feature = "raw_ext", since = "1.1.0")]
60    pub st_atime: time_t,
61    #[stable(feature = "raw_ext", since = "1.1.0")]
62    pub st_atime_nsec: c_long,
63    #[stable(feature = "raw_ext", since = "1.1.0")]
64    pub st_mtime: time_t,
65    #[stable(feature = "raw_ext", since = "1.1.0")]
66    pub st_mtime_nsec: c_long,
67    #[stable(feature = "raw_ext", since = "1.1.0")]
68    pub st_ctime: time_t,
69    #[stable(feature = "raw_ext", since = "1.1.0")]
70    pub st_ctime_nsec: c_long,
71    #[stable(feature = "raw_ext", since = "1.1.0")]
72    pub st_crtime: time_t,
73    #[stable(feature = "raw_ext", since = "1.1.0")]
74    pub st_crtime_nsec: c_long,
75    #[stable(feature = "raw_ext", since = "1.1.0")]
76    pub st_type: u32,
77    #[stable(feature = "raw_ext", since = "1.1.0")]
78    pub st_blocks: blkcnt_t,
79}