]> git.proxmox.com Git - rustc.git/blob - src/liblibc/src/unix/bsd/openbsdlike/bitrig.rs
Imported Upstream version 1.9.0+dfsg1
[rustc.git] / src / liblibc / src / unix / bsd / openbsdlike / bitrig.rs
1 pub type clock_t = i64;
2 pub type suseconds_t = i64;
3 pub type dev_t = i32;
4 pub type sigset_t = ::c_uint;
5 pub type blksize_t = ::uint32_t;
6 pub type fsblkcnt_t = ::c_uint;
7 pub type fsfilcnt_t = ::c_uint;
8 pub type pthread_attr_t = *mut ::c_void;
9 pub type pthread_mutex_t = *mut ::c_void;
10 pub type pthread_mutexattr_t = *mut ::c_void;
11 pub type pthread_cond_t = *mut ::c_void;
12 pub type pthread_rwlock_t = *mut ::c_void;
13
14 s! {
15 pub struct dirent {
16 pub d_fileno: ::ino_t,
17 pub d_off: ::off_t,
18 pub d_reclen: u16,
19 pub d_type: u8,
20 pub d_namlen: u8,
21 __d_padding: [u8; 4],
22 pub d_name: [::c_char; 256],
23 }
24
25 pub struct glob_t {
26 pub gl_pathc: ::c_int,
27 pub gl_matchc: ::c_int,
28 pub gl_offs: ::c_int,
29 pub gl_flags: ::c_int,
30 pub gl_pathv: *mut *mut ::c_char,
31 __unused1: *mut ::c_void,
32 __unused2: *mut ::c_void,
33 __unused3: *mut ::c_void,
34 __unused4: *mut ::c_void,
35 __unused5: *mut ::c_void,
36 __unused6: *mut ::c_void,
37 __unused7: *mut ::c_void,
38 }
39
40 pub struct stat {
41 pub st_mode: ::mode_t,
42 pub st_dev: ::dev_t,
43 pub st_ino: ::ino_t,
44 pub st_nlink: ::nlink_t,
45 pub st_uid: ::uid_t,
46 pub st_gid: ::gid_t,
47 pub st_rdev: ::dev_t,
48 pub st_atime: ::time_t,
49 pub st_atime_nsec: ::c_long,
50 pub st_mtime: ::time_t,
51 pub st_mtime_nsec: ::c_long,
52 pub st_ctime: ::time_t,
53 pub st_ctime_nsec: ::c_long,
54 pub st_size: ::off_t,
55 pub st_blocks: ::blkcnt_t,
56 pub st_blksize: ::blksize_t,
57 pub st_flags: ::uint32_t,
58 pub st_gen: ::uint32_t,
59 pub st_birthtime: ::time_t,
60 pub st_birthtime_nsec: ::c_long,
61 }
62
63 pub struct statvfs {
64 pub f_bsize: ::c_ulong,
65 pub f_frsize: ::c_ulong,
66 pub f_blocks: ::fsblkcnt_t,
67 pub f_bfree: ::fsblkcnt_t,
68 pub f_bavail: ::fsblkcnt_t,
69 pub f_files: ::fsfilcnt_t,
70 pub f_ffree: ::fsfilcnt_t,
71 pub f_favail: ::fsfilcnt_t,
72 pub f_fsid: ::c_ulong,
73 pub f_flag: ::c_ulong,
74 pub f_namemax: ::c_ulong,
75 }
76
77 pub struct addrinfo {
78 pub ai_flags: ::c_int,
79 pub ai_family: ::c_int,
80 pub ai_socktype: ::c_int,
81 pub ai_protocol: ::c_int,
82 pub ai_addrlen: ::socklen_t,
83 pub ai_addr: *mut ::sockaddr,
84 pub ai_canonname: *mut ::c_char,
85 pub ai_next: *mut ::addrinfo,
86 }
87
88 pub struct sockaddr_storage {
89 pub ss_len: u8,
90 pub ss_family: ::sa_family_t,
91 __ss_pad1: [u8; 6],
92 __ss_pad2: i64,
93 __ss_pad3: [u8; 240],
94 }
95
96 pub struct siginfo_t {
97 pub si_signo: ::c_int,
98 pub si_code: ::c_int,
99 pub si_errno: ::c_int,
100 pub si_addr: *mut ::c_void
101 }
102
103 pub struct Dl_info {
104 pub dli_fname: *const ::c_char,
105 pub dli_fbase: *mut ::c_void,
106 pub dli_sname: *const ::c_char,
107 pub dli_saddr: *mut ::c_void,
108 }
109
110 pub struct lconv {
111 pub decimal_point: *mut ::c_char,
112 pub thousands_sep: *mut ::c_char,
113 pub grouping: *mut ::c_char,
114 pub int_curr_symbol: *mut ::c_char,
115 pub currency_symbol: *mut ::c_char,
116 pub mon_decimal_point: *mut ::c_char,
117 pub mon_thousands_sep: *mut ::c_char,
118 pub mon_grouping: *mut ::c_char,
119 pub positive_sign: *mut ::c_char,
120 pub negative_sign: *mut ::c_char,
121 pub int_frac_digits: ::c_char,
122 pub frac_digits: ::c_char,
123 pub p_cs_precedes: ::c_char,
124 pub p_sep_by_space: ::c_char,
125 pub n_cs_precedes: ::c_char,
126 pub n_sep_by_space: ::c_char,
127 pub p_sign_posn: ::c_char,
128 pub n_sign_posn: ::c_char,
129 pub int_p_cs_precedes: ::c_char,
130 pub int_n_cs_precedes: ::c_char,
131 pub int_p_sep_by_space: ::c_char,
132 pub int_n_sep_by_space: ::c_char,
133 pub int_p_sign_posn: ::c_char,
134 pub int_n_sign_posn: ::c_char,
135 }
136 }
137
138 pub const O_CLOEXEC: ::c_int = 0x10000;
139
140 pub const MS_SYNC : ::c_int = 0x0002;
141 pub const MS_INVALIDATE : ::c_int = 0x0004;
142
143 pub const PTHREAD_STACK_MIN : ::size_t = 2048;
144
145 pub const ENOATTR : ::c_int = 83;
146 pub const EILSEQ : ::c_int = 84;
147 pub const EOVERFLOW : ::c_int = 87;
148 pub const ECANCELED : ::c_int = 88;
149 pub const EIDRM : ::c_int = 89;
150 pub const ENOMSG : ::c_int = 90;
151 pub const ENOTSUP : ::c_int = 91;
152 pub const ELAST : ::c_int = 91;
153
154 pub const F_DUPFD_CLOEXEC : ::c_int = 10;
155
156 pub const RLIM_NLIMITS: ::c_int = 9;
157
158 pub const SO_SNDTIMEO: ::c_int = 0x1005;
159 pub const SO_RCVTIMEO: ::c_int = 0x1006;
160
161 pub const KERN_PROC : ::c_int = 66;
162 pub const O_DSYNC : ::c_int = 128;
163
164 pub const MAP_RENAME : ::c_int = 0x0000;
165 pub const MAP_NORESERVE : ::c_int = 0x0000;
166 pub const MAP_HASSEMAPHORE : ::c_int = 0x0000;
167
168 pub const EIPSEC : ::c_int = 82;
169 pub const ENOMEDIUM : ::c_int = 85;
170 pub const EMEDIUMTYPE : ::c_int = 86;
171
172 pub const RUSAGE_THREAD: ::c_int = 1;
173
174 pub const IPV6_ADD_MEMBERSHIP: ::c_int = 12;
175 pub const IPV6_DROP_MEMBERSHIP: ::c_int = 13;
176
177 pub const MAP_COPY : ::c_int = 0x0002;
178 pub const MAP_NOEXTEND : ::c_int = 0x0000;
179
180 pub const _SC_IOV_MAX : ::c_int = 51;
181 pub const _SC_GETGR_R_SIZE_MAX : ::c_int = 100;
182 pub const _SC_GETPW_R_SIZE_MAX : ::c_int = 101;
183 pub const _SC_LOGIN_NAME_MAX : ::c_int = 102;
184 pub const _SC_MQ_PRIO_MAX : ::c_int = 59;
185 pub const _SC_NPROCESSORS_ONLN : ::c_int = 503;
186 pub const _SC_THREADS : ::c_int = 91;
187 pub const _SC_THREAD_ATTR_STACKADDR : ::c_int = 77;
188 pub const _SC_THREAD_ATTR_STACKSIZE : ::c_int = 78;
189 pub const _SC_THREAD_DESTRUCTOR_ITERATIONS : ::c_int = 80;
190 pub const _SC_THREAD_KEYS_MAX : ::c_int = 81;
191 pub const _SC_THREAD_PRIO_INHERIT : ::c_int = 82;
192 pub const _SC_THREAD_PRIO_PROTECT : ::c_int = 83;
193 pub const _SC_THREAD_PRIORITY_SCHEDULING : ::c_int = 84;
194 pub const _SC_THREAD_PROCESS_SHARED : ::c_int = 85;
195 pub const _SC_THREAD_SAFE_FUNCTIONS : ::c_int = 103;
196 pub const _SC_THREAD_STACK_MIN : ::c_int = 89;
197 pub const _SC_THREAD_THREADS_MAX : ::c_int = 90;
198 pub const _SC_TTY_NAME_MAX : ::c_int = 107;
199 pub const _SC_ATEXIT_MAX : ::c_int = 46;
200 pub const _SC_CLK_TCK : ::c_int = 3;
201 pub const _SC_AIO_LISTIO_MAX : ::c_int = 42;
202 pub const _SC_AIO_MAX : ::c_int = 43;
203 pub const _SC_ASYNCHRONOUS_IO : ::c_int = 45;
204 pub const _SC_MAPPED_FILES : ::c_int = 53;
205 pub const _SC_MEMLOCK : ::c_int = 54;
206 pub const _SC_MEMLOCK_RANGE : ::c_int = 55;
207 pub const _SC_MEMORY_PROTECTION : ::c_int = 56;
208 pub const _SC_MESSAGE_PASSING : ::c_int = 57;
209 pub const _SC_MQ_OPEN_MAX : ::c_int = 58;
210 pub const _SC_PRIORITY_SCHEDULING : ::c_int = 61;
211 pub const _SC_SEMAPHORES : ::c_int = 67;
212 pub const _SC_SHARED_MEMORY_OBJECTS : ::c_int = 68;
213 pub const _SC_SYNCHRONIZED_IO : ::c_int = 75;
214 pub const _SC_TIMERS : ::c_int = 94;
215 pub const _SC_XOPEN_CRYPT : ::c_int = 117;
216 pub const _SC_XOPEN_ENH_I18N : ::c_int = 118;
217 pub const _SC_XOPEN_LEGACY : ::c_int = 119;
218 pub const _SC_XOPEN_REALTIME : ::c_int = 120;
219 pub const _SC_XOPEN_REALTIME_THREADS : ::c_int = 121;
220 pub const _SC_XOPEN_UNIX : ::c_int = 123;
221 pub const _SC_XOPEN_VERSION : ::c_int = 125;
222 pub const _SC_SEM_NSEMS_MAX : ::c_int = 31;
223 pub const _SC_SEM_VALUE_MAX : ::c_int = 32;
224 pub const _SC_AIO_PRIO_DELTA_MAX : ::c_int = 44;
225 pub const _SC_DELAYTIMER_MAX : ::c_int = 50;
226 pub const _SC_PRIORITIZED_IO : ::c_int = 60;
227 pub const _SC_REALTIME_SIGNALS : ::c_int = 64;
228 pub const _SC_RTSIG_MAX : ::c_int = 66;
229 pub const _SC_SIGQUEUE_MAX : ::c_int = 70;
230 pub const _SC_TIMER_MAX : ::c_int = 93;
231
232 pub const FD_SETSIZE: usize = 1024;
233
234 pub const ST_NOSUID: ::c_ulong = 2;
235
236 pub const PTHREAD_MUTEX_INITIALIZER: pthread_mutex_t = 0 as *mut _;
237 pub const PTHREAD_COND_INITIALIZER: pthread_cond_t = 0 as *mut _;
238 pub const PTHREAD_RWLOCK_INITIALIZER: pthread_rwlock_t = 0 as *mut _;
239 pub const PTHREAD_MUTEX_RECURSIVE: ::c_int = 2;
240
241 pub const KERN_PROC_ARGS: ::c_int = 55;
242
243 pub const TMP_MAX : ::c_uint = 0x7fffffff;
244
245 pub const NI_MAXHOST: ::size_t = 256;
246
247 extern {
248 pub fn getnameinfo(sa: *const ::sockaddr,
249 salen: ::socklen_t,
250 host: *mut ::c_char,
251 hostlen: ::size_t,
252 serv: *mut ::c_char,
253 servlen: ::size_t,
254 flags: ::c_int) -> ::c_int;
255 pub fn mprotect(addr: *const ::c_void, len: ::size_t, prot: ::c_int)
256 -> ::c_int;
257 pub fn pthread_main_np() -> ::c_int;
258 pub fn pthread_set_name_np(tid: ::pthread_t, name: *const ::c_char);
259 pub fn pthread_stackseg_np(thread: ::pthread_t,
260 sinfo: *mut ::stack_t) -> ::c_int;
261 pub fn sysctl(name: *mut ::c_int,
262 namelen: ::c_uint,
263 oldp: *mut ::c_void,
264 oldlenp: *mut ::size_t,
265 newp: *mut ::c_void,
266 newlen: ::size_t)
267 -> ::c_int;
268 pub fn sysctlbyname(name: *const ::c_char,
269 oldp: *mut ::c_void,
270 oldlenp: *mut ::size_t,
271 newp: *mut ::c_void,
272 newlen: ::size_t)
273 -> ::c_int;
274 }