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.
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.
11 //! Android-specific raw type definitions
13 #![stable(feature = "raw_ext", since = "1.1.0")]
14 #![rustc_deprecated(since = "1.8.0",
15 reason = "these type aliases are no longer supported by \
16 the standard library, the `libc` crate on \
17 crates.io should be used instead for the correct \
23 #[stable(feature = "pthread_t", since = "1.8.0")]
24 pub type pthread_t = c_long;
27 #[stable(feature = "raw_ext", since = "1.1.0")]
28 pub use self::arch::{dev_t, mode_t, blkcnt_t, blksize_t, ino_t, nlink_t, off_t, stat, time_t};
30 #[cfg(any(target_arch = "arm", target_arch = "x86"))]
32 use os::raw::{c_uint, c_uchar, c_ulonglong, c_longlong, c_ulong};
33 use os::unix::raw::{uid_t, gid_t};
35 #[stable(feature = "raw_ext", since = "1.1.0")]
37 #[stable(feature = "raw_ext", since = "1.1.0")]
38 pub type mode_t = u32;
40 #[stable(feature = "raw_ext", since = "1.1.0")]
41 pub type blkcnt_t = u64;
42 #[stable(feature = "raw_ext", since = "1.1.0")]
43 pub type blksize_t = u64;
44 #[stable(feature = "raw_ext", since = "1.1.0")]
46 #[stable(feature = "raw_ext", since = "1.1.0")]
47 pub type nlink_t = u64;
48 #[stable(feature = "raw_ext", since = "1.1.0")]
50 #[stable(feature = "raw_ext", since = "1.1.0")]
51 pub type time_t = i64;
55 #[stable(feature = "raw_ext", since = "1.1.0")]
57 #[stable(feature = "raw_ext", since = "1.1.0")]
58 pub st_dev: c_ulonglong,
59 #[stable(feature = "raw_ext", since = "1.1.0")]
60 pub __pad0: [c_uchar; 4],
61 #[stable(feature = "raw_ext", since = "1.1.0")]
63 #[stable(feature = "raw_ext", since = "1.1.0")]
65 #[stable(feature = "raw_ext", since = "1.1.0")]
67 #[stable(feature = "raw_ext", since = "1.1.0")]
69 #[stable(feature = "raw_ext", since = "1.1.0")]
71 #[stable(feature = "raw_ext", since = "1.1.0")]
72 pub st_rdev: c_ulonglong,
73 #[stable(feature = "raw_ext", since = "1.1.0")]
74 pub __pad3: [c_uchar; 4],
75 #[stable(feature = "raw_ext", since = "1.1.0")]
76 pub st_size: c_longlong,
77 #[stable(feature = "raw_ext", since = "1.1.0")]
79 #[stable(feature = "raw_ext", since = "1.1.0")]
80 pub st_blocks: c_ulonglong,
81 #[stable(feature = "raw_ext", since = "1.1.0")]
82 pub st_atime: c_ulong,
83 #[stable(feature = "raw_ext", since = "1.1.0")]
84 pub st_atime_nsec: c_ulong,
85 #[stable(feature = "raw_ext", since = "1.1.0")]
86 pub st_mtime: c_ulong,
87 #[stable(feature = "raw_ext", since = "1.1.0")]
88 pub st_mtime_nsec: c_ulong,
89 #[stable(feature = "raw_ext", since = "1.1.0")]
90 pub st_ctime: c_ulong,
91 #[stable(feature = "raw_ext", since = "1.1.0")]
92 pub st_ctime_nsec: c_ulong,
93 #[stable(feature = "raw_ext", since = "1.1.0")]
94 pub st_ino: c_ulonglong,
100 #[cfg(target_arch = "aarch64")]
102 use os::raw::{c_uchar, c_ulong};
103 use os::unix::raw::{uid_t, gid_t};
105 #[stable(feature = "raw_ext", since = "1.1.0")]
106 pub type dev_t = u64;
107 #[stable(feature = "raw_ext", since = "1.1.0")]
108 pub type mode_t = u32;
110 #[stable(feature = "raw_ext", since = "1.1.0")]
111 pub type blkcnt_t = u64;
112 #[stable(feature = "raw_ext", since = "1.1.0")]
113 pub type blksize_t = u64;
114 #[stable(feature = "raw_ext", since = "1.1.0")]
115 pub type ino_t = u64;
116 #[stable(feature = "raw_ext", since = "1.1.0")]
117 pub type nlink_t = u64;
118 #[stable(feature = "raw_ext", since = "1.1.0")]
119 pub type off_t = u64;
120 #[stable(feature = "raw_ext", since = "1.1.0")]
121 pub type time_t = i64;
125 #[stable(feature = "raw_ext", since = "1.1.0")]
127 #[stable(feature = "raw_ext", since = "1.1.0")]
129 #[stable(feature = "raw_ext", since = "1.1.0")]
130 pub __pad0: [c_uchar; 4],
131 #[stable(feature = "raw_ext", since = "1.1.0")]
133 #[stable(feature = "raw_ext", since = "1.1.0")]
135 #[stable(feature = "raw_ext", since = "1.1.0")]
136 pub st_nlink: nlink_t,
137 #[stable(feature = "raw_ext", since = "1.1.0")]
139 #[stable(feature = "raw_ext", since = "1.1.0")]
141 #[stable(feature = "raw_ext", since = "1.1.0")]
143 #[stable(feature = "raw_ext", since = "1.1.0")]
144 pub __pad3: [c_uchar; 4],
145 #[stable(feature = "raw_ext", since = "1.1.0")]
147 #[stable(feature = "raw_ext", since = "1.1.0")]
148 pub st_blksize: blksize_t,
149 #[stable(feature = "raw_ext", since = "1.1.0")]
150 pub st_blocks: blkcnt_t,
151 #[stable(feature = "raw_ext", since = "1.1.0")]
152 pub st_atime: time_t,
153 #[stable(feature = "raw_ext", since = "1.1.0")]
154 pub st_atime_nsec: c_ulong,
155 #[stable(feature = "raw_ext", since = "1.1.0")]
156 pub st_mtime: time_t,
157 #[stable(feature = "raw_ext", since = "1.1.0")]
158 pub st_mtime_nsec: c_ulong,
159 #[stable(feature = "raw_ext", since = "1.1.0")]
160 pub st_ctime: time_t,
161 #[stable(feature = "raw_ext", since = "1.1.0")]
162 pub st_ctime_nsec: c_ulong,
163 #[stable(feature = "raw_ext", since = "1.1.0")]