]> git.proxmox.com Git - rustc.git/blob - src/vendor/libc/src/unix/bsd/netbsdlike/netbsd/mod.rs
New upstream version 1.17.0+dfsg1
[rustc.git] / src / vendor / libc / src / unix / bsd / netbsdlike / netbsd / mod.rs
1 pub type clock_t = ::c_uint;
2 pub type suseconds_t = ::c_int;
3 pub type dev_t = u64;
4 pub type blksize_t = ::int32_t;
5 pub type fsblkcnt_t = ::uint64_t;
6 pub type fsfilcnt_t = ::uint64_t;
7 pub type idtype_t = ::c_int;
8
9 s! {
10 pub struct aiocb {
11 pub aio_offset: ::off_t,
12 pub aio_buf: *mut ::c_void,
13 pub aio_nbytes: ::size_t,
14 pub aio_fildes: ::c_int,
15 pub aio_lio_opcode: ::c_int,
16 pub aio_reqprio: ::c_int,
17 pub aio_sigevent: ::sigevent,
18 _state: ::c_int,
19 _errno: ::c_int,
20 _retval: ::ssize_t
21 }
22
23 pub struct dirent {
24 pub d_fileno: ::ino_t,
25 pub d_reclen: u16,
26 pub d_namlen: u16,
27 pub d_type: u8,
28 pub d_name: [::c_char; 512],
29 }
30
31 pub struct glob_t {
32 pub gl_pathc: ::size_t,
33 pub gl_matchc: ::size_t,
34 pub gl_offs: ::size_t,
35 pub gl_flags: ::c_int,
36 pub gl_pathv: *mut *mut ::c_char,
37
38 __unused3: *mut ::c_void,
39
40 __unused4: *mut ::c_void,
41 __unused5: *mut ::c_void,
42 __unused6: *mut ::c_void,
43 __unused7: *mut ::c_void,
44 __unused8: *mut ::c_void,
45 }
46
47 pub struct sigevent {
48 pub sigev_notify: ::c_int,
49 pub sigev_signo: ::c_int,
50 pub sigev_value: ::sigval,
51 __unused1: *mut ::c_void, //actually a function pointer
52 pub sigev_notify_attributes: *mut ::c_void
53 }
54
55 pub struct sigset_t {
56 __bits: [u32; 4],
57 }
58
59 pub struct stat {
60 pub st_dev: ::dev_t,
61 pub st_mode: ::mode_t,
62 pub st_ino: ::ino_t,
63 pub st_nlink: ::nlink_t,
64 pub st_uid: ::uid_t,
65 pub st_gid: ::gid_t,
66 pub st_rdev: ::dev_t,
67 pub st_atime: ::time_t,
68 pub st_atimensec: ::c_long,
69 pub st_mtime: ::time_t,
70 pub st_mtimensec: ::c_long,
71 pub st_ctime: ::time_t,
72 pub st_ctimensec: ::c_long,
73 pub st_birthtime: ::time_t,
74 pub st_birthtimensec: ::c_long,
75 pub st_size: ::off_t,
76 pub st_blocks: ::blkcnt_t,
77 pub st_blksize: ::blksize_t,
78 pub st_flags: ::uint32_t,
79 pub st_gen: ::uint32_t,
80 pub st_spare: [::uint32_t; 2],
81 }
82
83 pub struct statvfs {
84 pub f_flag: ::c_ulong,
85 pub f_bsize: ::c_ulong,
86 pub f_frsize: ::c_ulong,
87 pub f_iosize: ::c_ulong,
88
89 pub f_blocks: ::fsblkcnt_t,
90 pub f_bfree: ::fsblkcnt_t,
91 pub f_bavail: ::fsblkcnt_t,
92 pub f_bresvd: ::fsblkcnt_t,
93
94 pub f_files: ::fsfilcnt_t,
95 pub f_ffree: ::fsfilcnt_t,
96 pub f_favail: ::fsfilcnt_t,
97 pub f_fresvd: ::fsfilcnt_t,
98
99 pub f_syncreads: ::uint64_t,
100 pub f_syncwrites: ::uint64_t,
101
102 pub f_asyncreads: ::uint64_t,
103 pub f_asyncwrites: ::uint64_t,
104
105 pub f_fsidx: ::fsid_t,
106 pub f_fsid: ::c_ulong,
107 pub f_namemax: ::c_ulong,
108 pub f_owner: ::uid_t,
109
110 pub f_spare: [::uint32_t; 4],
111
112 pub f_fstypename: [::c_char; 32],
113 pub f_mntonname: [::c_char; 1024],
114 pub f_mntfromname: [::c_char; 1024],
115 }
116
117 pub struct addrinfo {
118 pub ai_flags: ::c_int,
119 pub ai_family: ::c_int,
120 pub ai_socktype: ::c_int,
121 pub ai_protocol: ::c_int,
122 pub ai_addrlen: ::socklen_t,
123 pub ai_canonname: *mut ::c_char,
124 pub ai_addr: *mut ::sockaddr,
125 pub ai_next: *mut ::addrinfo,
126 }
127
128 pub struct sockaddr_storage {
129 pub ss_len: u8,
130 pub ss_family: ::sa_family_t,
131 __ss_pad1: [u8; 6],
132 __ss_pad2: i64,
133 __ss_pad3: [u8; 112],
134 }
135
136 pub struct siginfo_t {
137 pub si_signo: ::c_int,
138 pub si_code: ::c_int,
139 pub si_errno: ::c_int,
140 __pad1: ::c_int,
141 pub si_addr: *mut ::c_void,
142 __pad2: [u64; 13],
143 }
144
145 pub struct pthread_attr_t {
146 pta_magic: ::c_uint,
147 pta_flags: ::c_int,
148 pta_private: *mut ::c_void,
149 }
150
151 pub struct pthread_mutex_t {
152 ptm_magic: ::c_uint,
153 ptm_errorcheck: ::c_uchar,
154 ptm_pad1: [u8; 3],
155 ptm_interlock: ::c_uchar,
156 ptm_pad2: [u8; 3],
157 ptm_owner: ::pthread_t,
158 ptm_waiters: *mut u8,
159 ptm_recursed: ::c_uint,
160 ptm_spare2: *mut ::c_void,
161 }
162
163 pub struct pthread_mutexattr_t {
164 ptma_magic: ::c_uint,
165 ptma_private: *mut ::c_void,
166 }
167
168 pub struct pthread_cond_t {
169 ptc_magic: ::c_uint,
170 ptc_lock: ::c_uchar,
171 ptc_waiters_first: *mut u8,
172 ptc_waiters_last: *mut u8,
173 ptc_mutex: *mut ::pthread_mutex_t,
174 ptc_private: *mut ::c_void,
175 }
176
177 pub struct pthread_condattr_t {
178 ptca_magic: ::c_uint,
179 ptca_private: *mut ::c_void,
180 }
181
182 pub struct pthread_rwlock_t {
183 ptr_magic: ::c_uint,
184 ptr_interlock: ::c_uchar,
185 ptr_rblocked_first: *mut u8,
186 ptr_rblocked_last: *mut u8,
187 ptr_wblocked_first: *mut u8,
188 ptr_wblocked_last: *mut u8,
189 ptr_nreaders: ::c_uint,
190 ptr_owner: ::pthread_t,
191 ptr_private: *mut ::c_void,
192 }
193
194 pub struct kevent {
195 pub ident: ::uintptr_t,
196 pub filter: ::uint32_t,
197 pub flags: ::uint32_t,
198 pub fflags: ::uint32_t,
199 pub data: ::int64_t,
200 pub udata: ::intptr_t,
201 }
202
203 pub struct dqblk {
204 pub dqb_bhardlimit: ::uint32_t,
205 pub dqb_bsoftlimit: ::uint32_t,
206 pub dqb_curblocks: ::uint32_t,
207 pub dqb_ihardlimit: ::uint32_t,
208 pub dqb_isoftlimit: ::uint32_t,
209 pub dqb_curinodes: ::uint32_t,
210 pub dqb_btime: ::int32_t,
211 pub dqb_itime: ::int32_t,
212 }
213
214 pub struct Dl_info {
215 pub dli_fname: *const ::c_char,
216 pub dli_fbase: *mut ::c_void,
217 pub dli_sname: *const ::c_char,
218 pub dli_saddr: *const ::c_void,
219 }
220
221 pub struct lconv {
222 pub decimal_point: *mut ::c_char,
223 pub thousands_sep: *mut ::c_char,
224 pub grouping: *mut ::c_char,
225 pub int_curr_symbol: *mut ::c_char,
226 pub currency_symbol: *mut ::c_char,
227 pub mon_decimal_point: *mut ::c_char,
228 pub mon_thousands_sep: *mut ::c_char,
229 pub mon_grouping: *mut ::c_char,
230 pub positive_sign: *mut ::c_char,
231 pub negative_sign: *mut ::c_char,
232 pub int_frac_digits: ::c_char,
233 pub frac_digits: ::c_char,
234 pub p_cs_precedes: ::c_char,
235 pub p_sep_by_space: ::c_char,
236 pub n_cs_precedes: ::c_char,
237 pub n_sep_by_space: ::c_char,
238 pub p_sign_posn: ::c_char,
239 pub n_sign_posn: ::c_char,
240 pub int_p_cs_precedes: ::c_char,
241 pub int_n_cs_precedes: ::c_char,
242 pub int_p_sep_by_space: ::c_char,
243 pub int_n_sep_by_space: ::c_char,
244 pub int_p_sign_posn: ::c_char,
245 pub int_n_sign_posn: ::c_char,
246 }
247 }
248
249 pub const LC_COLLATE_MASK: ::c_int = (1 << ::LC_COLLATE);
250 pub const LC_CTYPE_MASK: ::c_int = (1 << ::LC_CTYPE);
251 pub const LC_MONETARY_MASK: ::c_int = (1 << ::LC_MONETARY);
252 pub const LC_NUMERIC_MASK: ::c_int = (1 << ::LC_NUMERIC);
253 pub const LC_TIME_MASK: ::c_int = (1 << ::LC_TIME);
254 pub const LC_MESSAGES_MASK: ::c_int = (1 << ::LC_MESSAGES);
255 pub const LC_ALL_MASK: ::c_int = !0;
256
257 pub const ERA: ::nl_item = 52;
258 pub const ERA_D_FMT: ::nl_item = 53;
259 pub const ERA_D_T_FMT: ::nl_item = 54;
260 pub const ERA_T_FMT: ::nl_item = 55;
261 pub const ALT_DIGITS: ::nl_item = 56;
262
263 pub const O_CLOEXEC: ::c_int = 0x400000;
264 pub const O_ALT_IO: ::c_int = 0x40000;
265 pub const O_NOSIGPIPE: ::c_int = 0x1000000;
266 pub const O_SEARCH: ::c_int = 0x800000;
267 pub const O_EXLOCK: ::c_int = 0x20;
268 pub const O_SHLOCK: ::c_int = 0x10;
269 pub const O_DIRECTORY: ::c_int = 0x200000;
270
271 pub const MS_SYNC : ::c_int = 0x4;
272 pub const MS_INVALIDATE : ::c_int = 0x2;
273
274 pub const RLIM_NLIMITS: ::c_int = 12;
275
276 pub const ENOATTR : ::c_int = 93;
277 pub const EILSEQ : ::c_int = 85;
278 pub const EOVERFLOW : ::c_int = 84;
279 pub const ECANCELED : ::c_int = 87;
280 pub const EIDRM : ::c_int = 82;
281 pub const ENOMSG : ::c_int = 83;
282 pub const ENOTSUP : ::c_int = 86;
283 pub const ELAST : ::c_int = 96;
284
285 pub const F_DUPFD_CLOEXEC : ::c_int = 12;
286 pub const F_CLOSEM: ::c_int = 10;
287 pub const F_GETNOSIGPIPE: ::c_int = 13;
288 pub const F_SETNOSIGPIPE: ::c_int = 14;
289 pub const F_MAXFD: ::c_int = 11;
290
291 pub const IPV6_JOIN_GROUP: ::c_int = 12;
292 pub const IPV6_LEAVE_GROUP: ::c_int = 13;
293
294 pub const SOCK_CONN_DGRAM: ::c_int = 6;
295 pub const SOCK_DCCP: ::c_int = SOCK_CONN_DGRAM;
296 pub const SOCK_NOSIGPIPE: ::c_int = 0x40000000;
297 pub const SOCK_FLAGS_MASK: ::c_int = 0xf0000000;
298
299 pub const SO_SNDTIMEO: ::c_int = 0x100b;
300 pub const SO_RCVTIMEO: ::c_int = 0x100c;
301 pub const SO_ACCEPTFILTER: ::c_int = 0x1000;
302 pub const SO_TIMESTAMP: ::c_int = 0x2000;
303 pub const SO_OVERFLOWED: ::c_int = 0x1009;
304 pub const SO_NOHEADER: ::c_int = 0x100a;
305
306 pub const AF_OROUTE: ::c_int = 17;
307 pub const AF_ARP: ::c_int = 28;
308 pub const pseudo_AF_KEY: ::c_int = 29;
309 pub const pseudo_AF_HDRCMPLT: ::c_int = 30;
310 pub const AF_BLUETOOTH: ::c_int = 31;
311 pub const AF_IEEE80211: ::c_int = 32;
312 pub const AF_MPLS: ::c_int = 33;
313 pub const AF_ROUTE: ::c_int = 34;
314 pub const AF_MAX: ::c_int = 35;
315
316 pub const NET_MAXID: ::c_int = AF_MAX;
317 pub const NET_RT_DUMP: ::c_int = 1;
318 pub const NET_RT_FLAGS: ::c_int = 2;
319 pub const NET_RT_OOIFLIST: ::c_int = 3;
320 pub const NET_RT_OIFLIST: ::c_int = 4;
321 pub const NET_RT_IFLIST: ::c_int = 5;
322 pub const NET_RT_MAXID: ::c_int = 6;
323
324 pub const PF_OROUTE: ::c_int = AF_OROUTE;
325 pub const PF_ARP: ::c_int = AF_ARP;
326 pub const PF_KEY: ::c_int = pseudo_AF_KEY;
327 pub const PF_BLUETOOTH: ::c_int = AF_BLUETOOTH;
328 pub const PF_MPLS: ::c_int = AF_MPLS;
329 pub const PF_ROUTE: ::c_int = AF_ROUTE;
330 pub const PF_MAX: ::c_int = AF_MAX;
331
332 pub const MSG_NBIO: ::c_int = 0x1000;
333 pub const MSG_WAITFORONE: ::c_int = 0x2000;
334 pub const MSG_NOTIFICATION: ::c_int = 0x4000;
335
336 pub const SCM_TIMESTAMP: ::c_int = 0x08;
337 pub const SCM_CREDS: ::c_int = 0x10;
338
339 pub const O_DSYNC : ::c_int = 0x10000;
340
341 pub const MAP_RENAME : ::c_int = 0x20;
342 pub const MAP_NORESERVE : ::c_int = 0x40;
343 pub const MAP_HASSEMAPHORE : ::c_int = 0x200;
344 pub const MAP_WIRED: ::c_int = 0x800;
345
346 pub const _SC_IOV_MAX : ::c_int = 32;
347 pub const _SC_GETGR_R_SIZE_MAX : ::c_int = 47;
348 pub const _SC_GETPW_R_SIZE_MAX : ::c_int = 48;
349 pub const _SC_LOGIN_NAME_MAX : ::c_int = 37;
350 pub const _SC_MQ_PRIO_MAX : ::c_int = 55;
351 pub const _SC_NPROCESSORS_ONLN : ::c_int = 1002;
352 pub const _SC_THREADS : ::c_int = 41;
353 pub const _SC_THREAD_ATTR_STACKADDR : ::c_int = 61;
354 pub const _SC_THREAD_ATTR_STACKSIZE : ::c_int = 62;
355 pub const _SC_THREAD_DESTRUCTOR_ITERATIONS : ::c_int = 57;
356 pub const _SC_THREAD_KEYS_MAX : ::c_int = 58;
357 pub const _SC_THREAD_PRIO_INHERIT : ::c_int = 64;
358 pub const _SC_THREAD_PRIO_PROTECT : ::c_int = 65;
359 pub const _SC_THREAD_PRIORITY_SCHEDULING : ::c_int = 63;
360 pub const _SC_THREAD_PROCESS_SHARED : ::c_int = 66;
361 pub const _SC_THREAD_SAFE_FUNCTIONS : ::c_int = 67;
362 pub const _SC_THREAD_STACK_MIN : ::c_int = 59;
363 pub const _SC_THREAD_THREADS_MAX : ::c_int = 60;
364 pub const _SC_TTY_NAME_MAX : ::c_int = 68;
365 pub const _SC_ATEXIT_MAX : ::c_int = 40;
366 pub const _SC_CLK_TCK : ::c_int = 39;
367 pub const _SC_AIO_LISTIO_MAX : ::c_int = 51;
368 pub const _SC_AIO_MAX : ::c_int = 52;
369 pub const _SC_ASYNCHRONOUS_IO : ::c_int = 50;
370 pub const _SC_MAPPED_FILES : ::c_int = 33;
371 pub const _SC_MEMLOCK : ::c_int = 34;
372 pub const _SC_MEMLOCK_RANGE : ::c_int = 35;
373 pub const _SC_MEMORY_PROTECTION : ::c_int = 36;
374 pub const _SC_MESSAGE_PASSING : ::c_int = 53;
375 pub const _SC_MQ_OPEN_MAX : ::c_int = 54;
376 pub const _SC_PRIORITY_SCHEDULING : ::c_int = 56;
377 pub const _SC_SEMAPHORES : ::c_int = 42;
378 pub const _SC_SHARED_MEMORY_OBJECTS : ::c_int = 87;
379 pub const _SC_SYNCHRONIZED_IO : ::c_int = 31;
380 pub const _SC_TIMERS : ::c_int = 44;
381 pub const _SC_HOST_NAME_MAX : ::c_int = 69;
382
383 pub const FD_SETSIZE: usize = 0x100;
384
385 pub const ST_NOSUID: ::c_ulong = 8;
386
387 pub const PTHREAD_MUTEX_INITIALIZER: pthread_mutex_t = pthread_mutex_t {
388 ptm_magic: 0x33330003,
389 ptm_errorcheck: 0,
390 ptm_interlock: 0,
391 ptm_waiters: 0 as *mut _,
392 ptm_owner: 0,
393 ptm_pad1: [0; 3],
394 ptm_pad2: [0; 3],
395 ptm_recursed: 0,
396 ptm_spare2: 0 as *mut _,
397 };
398 pub const PTHREAD_COND_INITIALIZER: pthread_cond_t = pthread_cond_t {
399 ptc_magic: 0x55550005,
400 ptc_lock: 0,
401 ptc_waiters_first: 0 as *mut _,
402 ptc_waiters_last: 0 as *mut _,
403 ptc_mutex: 0 as *mut _,
404 ptc_private: 0 as *mut _,
405 };
406 pub const PTHREAD_RWLOCK_INITIALIZER: pthread_rwlock_t = pthread_rwlock_t {
407 ptr_magic: 0x99990009,
408 ptr_interlock: 0,
409 ptr_rblocked_first: 0 as *mut _,
410 ptr_rblocked_last: 0 as *mut _,
411 ptr_wblocked_first: 0 as *mut _,
412 ptr_wblocked_last: 0 as *mut _,
413 ptr_nreaders: 0,
414 ptr_owner: 0,
415 ptr_private: 0 as *mut _,
416 };
417 pub const PTHREAD_MUTEX_NORMAL: ::c_int = 0;
418 pub const PTHREAD_MUTEX_ERRORCHECK: ::c_int = 1;
419 pub const PTHREAD_MUTEX_RECURSIVE: ::c_int = 2;
420 pub const PTHREAD_MUTEX_DEFAULT: ::c_int = PTHREAD_MUTEX_NORMAL;
421
422 pub const EVFILT_AIO: ::int32_t = 2;
423 pub const EVFILT_PROC: ::int32_t = 4;
424 pub const EVFILT_READ: ::int32_t = 0;
425 pub const EVFILT_SIGNAL: ::int32_t = 5;
426 pub const EVFILT_TIMER: ::int32_t = 6;
427 pub const EVFILT_VNODE: ::int32_t = 3;
428 pub const EVFILT_WRITE: ::int32_t = 1;
429
430 pub const EV_ADD: ::uint32_t = 0x1;
431 pub const EV_DELETE: ::uint32_t = 0x2;
432 pub const EV_ENABLE: ::uint32_t = 0x4;
433 pub const EV_DISABLE: ::uint32_t = 0x8;
434 pub const EV_ONESHOT: ::uint32_t = 0x10;
435 pub const EV_CLEAR: ::uint32_t = 0x20;
436 pub const EV_RECEIPT: ::uint32_t = 0x40;
437 pub const EV_DISPATCH: ::uint32_t = 0x80;
438 pub const EV_FLAG1: ::uint32_t = 0x2000;
439 pub const EV_ERROR: ::uint32_t = 0x4000;
440 pub const EV_EOF: ::uint32_t = 0x8000;
441 pub const EV_SYSFLAGS: ::uint32_t = 0xf000;
442
443 pub const NOTE_LOWAT: ::uint32_t = 0x00000001;
444 pub const NOTE_DELETE: ::uint32_t = 0x00000001;
445 pub const NOTE_WRITE: ::uint32_t = 0x00000002;
446 pub const NOTE_EXTEND: ::uint32_t = 0x00000004;
447 pub const NOTE_ATTRIB: ::uint32_t = 0x00000008;
448 pub const NOTE_LINK: ::uint32_t = 0x00000010;
449 pub const NOTE_RENAME: ::uint32_t = 0x00000020;
450 pub const NOTE_REVOKE: ::uint32_t = 0x00000040;
451 pub const NOTE_EXIT: ::uint32_t = 0x80000000;
452 pub const NOTE_FORK: ::uint32_t = 0x40000000;
453 pub const NOTE_EXEC: ::uint32_t = 0x20000000;
454 pub const NOTE_PDATAMASK: ::uint32_t = 0x000fffff;
455 pub const NOTE_PCTRLMASK: ::uint32_t = 0xf0000000;
456 pub const NOTE_TRACK: ::uint32_t = 0x00000001;
457 pub const NOTE_TRACKERR: ::uint32_t = 0x00000002;
458 pub const NOTE_CHILD: ::uint32_t = 0x00000004;
459
460 pub const CRTSCTS: ::tcflag_t = 0x00010000;
461
462 pub const TMP_MAX : ::c_uint = 308915776;
463
464 pub const NI_MAXHOST: ::socklen_t = 1025;
465
466 pub const RTLD_NOLOAD: ::c_int = 0x2000;
467 pub const RTLD_LOCAL: ::c_int = 0x200;
468
469 pub const CTL_MAXNAME: ::c_int = 12;
470 pub const SYSCTL_NAMELEN: ::c_int = 32;
471 pub const SYSCTL_DEFSIZE: ::c_int = 8;
472 pub const CTLTYPE_NODE: ::c_int = 1;
473 pub const CTLTYPE_INT: ::c_int = 2;
474 pub const CTLTYPE_STRING: ::c_int = 3;
475 pub const CTLTYPE_QUAD: ::c_int = 4;
476 pub const CTLTYPE_STRUCT: ::c_int = 5;
477 pub const CTLTYPE_BOOL: ::c_int = 6;
478 pub const CTLFLAG_READONLY: ::c_int = 0x00000000;
479 pub const CTLFLAG_READWRITE: ::c_int = 0x00000070;
480 pub const CTLFLAG_ANYWRITE: ::c_int = 0x00000080;
481 pub const CTLFLAG_PRIVATE: ::c_int = 0x00000100;
482 pub const CTLFLAG_PERMANENT: ::c_int = 0x00000200;
483 pub const CTLFLAG_OWNDATA: ::c_int = 0x00000400;
484 pub const CTLFLAG_IMMEDIATE: ::c_int = 0x00000800;
485 pub const CTLFLAG_HEX: ::c_int = 0x00001000;
486 pub const CTLFLAG_ROOT: ::c_int = 0x00002000;
487 pub const CTLFLAG_ANYNUMBER: ::c_int = 0x00004000;
488 pub const CTLFLAG_HIDDEN: ::c_int = 0x00008000;
489 pub const CTLFLAG_ALIAS: ::c_int = 0x00010000;
490 pub const CTLFLAG_MMAP: ::c_int = 0x00020000;
491 pub const CTLFLAG_OWNDESC: ::c_int = 0x00040000;
492 pub const CTLFLAG_UNSIGNED: ::c_int = 0x00080000;
493 pub const SYSCTL_VERS_MASK: ::c_int = 0xff000000;
494 pub const SYSCTL_VERS_0: ::c_int = 0x00000000;
495 pub const SYSCTL_VERS_1: ::c_int = 0x01000000;
496 pub const SYSCTL_VERSION: ::c_int = SYSCTL_VERS_1;
497 pub const CTL_EOL: ::c_int = -1;
498 pub const CTL_QUERY: ::c_int = -2;
499 pub const CTL_CREATE: ::c_int = -3;
500 pub const CTL_CREATESYM: ::c_int = -4;
501 pub const CTL_DESTROY: ::c_int = -5;
502 pub const CTL_MMAP: ::c_int = -6;
503 pub const CTL_DESCRIBE: ::c_int = -7;
504 pub const CTL_UNSPEC: ::c_int = 0;
505 pub const CTL_KERN: ::c_int = 1;
506 pub const CTL_VM: ::c_int = 2;
507 pub const CTL_VFS: ::c_int = 3;
508 pub const CTL_NET: ::c_int = 4;
509 pub const CTL_DEBUG: ::c_int = 5;
510 pub const CTL_HW: ::c_int = 6;
511 pub const CTL_MACHDEP: ::c_int = 7;
512 pub const CTL_USER: ::c_int = 8;
513 pub const CTL_DDB: ::c_int = 9;
514 pub const CTL_PROC: ::c_int = 10;
515 pub const CTL_VENDOR: ::c_int = 11;
516 pub const CTL_EMUL: ::c_int = 12;
517 pub const CTL_SECURITY: ::c_int = 13;
518 pub const CTL_MAXID: ::c_int = 14;
519 pub const KERN_OSTYPE: ::c_int = 1;
520 pub const KERN_OSRELEASE: ::c_int = 2;
521 pub const KERN_OSREV: ::c_int = 3;
522 pub const KERN_VERSION: ::c_int = 4;
523 pub const KERN_MAXVNODES: ::c_int = 5;
524 pub const KERN_MAXPROC: ::c_int = 6;
525 pub const KERN_MAXFILES: ::c_int = 7;
526 pub const KERN_ARGMAX: ::c_int = 8;
527 pub const KERN_SECURELVL: ::c_int = 9;
528 pub const KERN_HOSTNAME: ::c_int = 10;
529 pub const KERN_HOSTID: ::c_int = 11;
530 pub const KERN_CLOCKRATE: ::c_int = 12;
531 pub const KERN_VNODE: ::c_int = 13;
532 pub const KERN_PROC: ::c_int = 14;
533 pub const KERN_FILE: ::c_int = 15;
534 pub const KERN_PROF: ::c_int = 16;
535 pub const KERN_POSIX1: ::c_int = 17;
536 pub const KERN_NGROUPS: ::c_int = 18;
537 pub const KERN_JOB_CONTROL: ::c_int = 19;
538 pub const KERN_SAVED_IDS: ::c_int = 20;
539 pub const KERN_OBOOTTIME: ::c_int = 21;
540 pub const KERN_DOMAINNAME: ::c_int = 22;
541 pub const KERN_MAXPARTITIONS: ::c_int = 23;
542 pub const KERN_RAWPARTITION: ::c_int = 24;
543 pub const KERN_NTPTIME: ::c_int = 25;
544 pub const KERN_TIMEX: ::c_int = 26;
545 pub const KERN_AUTONICETIME: ::c_int = 27;
546 pub const KERN_AUTONICEVAL: ::c_int = 28;
547 pub const KERN_RTC_OFFSET: ::c_int = 29;
548 pub const KERN_ROOT_DEVICE: ::c_int = 30;
549 pub const KERN_MSGBUFSIZE: ::c_int = 31;
550 pub const KERN_FSYNC: ::c_int = 32;
551 pub const KERN_OLDSYSVMSG: ::c_int = 33;
552 pub const KERN_OLDSYSVSEM: ::c_int = 34;
553 pub const KERN_OLDSYSVSHM: ::c_int = 35;
554 pub const KERN_OLDSHORTCORENAME: ::c_int = 36;
555 pub const KERN_SYNCHRONIZED_IO: ::c_int = 37;
556 pub const KERN_IOV_MAX: ::c_int = 38;
557 pub const KERN_MBUF: ::c_int = 39;
558 pub const KERN_MAPPED_FILES: ::c_int = 40;
559 pub const KERN_MEMLOCK: ::c_int = 41;
560 pub const KERN_MEMLOCK_RANGE: ::c_int = 42;
561 pub const KERN_MEMORY_PROTECTION: ::c_int = 43;
562 pub const KERN_LOGIN_NAME_MAX: ::c_int = 44;
563 pub const KERN_DEFCORENAME: ::c_int = 45;
564 pub const KERN_LOGSIGEXIT: ::c_int = 46;
565 pub const KERN_PROC2: ::c_int = 47;
566 pub const KERN_PROC_ARGS: ::c_int = 48;
567 pub const KERN_FSCALE: ::c_int = 49;
568 pub const KERN_CCPU: ::c_int = 50;
569 pub const KERN_CP_TIME: ::c_int = 51;
570 pub const KERN_OLDSYSVIPC_INFO: ::c_int = 52;
571 pub const KERN_MSGBUF: ::c_int = 53;
572 pub const KERN_CONSDEV: ::c_int = 54;
573 pub const KERN_MAXPTYS: ::c_int = 55;
574 pub const KERN_PIPE: ::c_int = 56;
575 pub const KERN_MAXPHYS: ::c_int = 57;
576 pub const KERN_SBMAX: ::c_int = 58;
577 pub const KERN_TKSTAT: ::c_int = 59;
578 pub const KERN_MONOTONIC_CLOCK: ::c_int = 60;
579 pub const KERN_URND: ::c_int = 61;
580 pub const KERN_LABELSECTOR: ::c_int = 62;
581 pub const KERN_LABELOFFSET: ::c_int = 63;
582 pub const KERN_LWP: ::c_int = 64;
583 pub const KERN_FORKFSLEEP: ::c_int = 65;
584 pub const KERN_POSIX_THREADS: ::c_int = 66;
585 pub const KERN_POSIX_SEMAPHORES: ::c_int = 67;
586 pub const KERN_POSIX_BARRIERS: ::c_int = 68;
587 pub const KERN_POSIX_TIMERS: ::c_int = 69;
588 pub const KERN_POSIX_SPIN_LOCKS: ::c_int = 70;
589 pub const KERN_POSIX_READER_WRITER_LOCKS: ::c_int = 71;
590 pub const KERN_DUMP_ON_PANIC: ::c_int = 72;
591 pub const KERN_SOMAXKVA: ::c_int = 73;
592 pub const KERN_ROOT_PARTITION: ::c_int = 74;
593 pub const KERN_DRIVERS: ::c_int = 75;
594 pub const KERN_BUF: ::c_int = 76;
595 pub const KERN_FILE2: ::c_int = 77;
596 pub const KERN_VERIEXEC: ::c_int = 78;
597 pub const KERN_CP_ID: ::c_int = 79;
598 pub const KERN_HARDCLOCK_TICKS: ::c_int = 80;
599 pub const KERN_ARND: ::c_int = 81;
600 pub const KERN_SYSVIPC: ::c_int = 82;
601 pub const KERN_BOOTTIME: ::c_int = 83;
602 pub const KERN_EVCNT: ::c_int = 84;
603 pub const KERN_MAXID: ::c_int = 85;
604 pub const KERN_PROC_ALL: ::c_int = 0;
605 pub const KERN_PROC_PID: ::c_int = 1;
606 pub const KERN_PROC_PGRP: ::c_int = 2;
607 pub const KERN_PROC_SESSION: ::c_int = 3;
608 pub const KERN_PROC_TTY: ::c_int = 4;
609 pub const KERN_PROC_UID: ::c_int = 5;
610 pub const KERN_PROC_RUID: ::c_int = 6;
611 pub const KERN_PROC_GID: ::c_int = 7;
612 pub const KERN_PROC_RGID: ::c_int = 8;
613
614 pub const EAI_SYSTEM: ::c_int = 11;
615
616 pub const AIO_CANCELED: ::c_int = 1;
617 pub const AIO_NOTCANCELED: ::c_int = 2;
618 pub const AIO_ALLDONE: ::c_int = 3;
619 pub const LIO_NOP: ::c_int = 0;
620 pub const LIO_WRITE: ::c_int = 1;
621 pub const LIO_READ: ::c_int = 2;
622 pub const LIO_WAIT: ::c_int = 1;
623 pub const LIO_NOWAIT: ::c_int = 0;
624
625 pub const SIGEV_NONE: ::c_int = 0;
626 pub const SIGEV_SIGNAL: ::c_int = 1;
627 pub const SIGEV_THREAD: ::c_int = 2;
628
629 pub const WSTOPPED: ::c_int = 0x00000002; // same as WUNTRACED
630 pub const WCONTINUED: ::c_int = 0x00000010;
631 pub const WEXITED: ::c_int = 0x000000020;
632 pub const WNOWAIT: ::c_int = 0x00010000;
633
634 pub const P_ALL: idtype_t = 0;
635 pub const P_PID: idtype_t = 1;
636 pub const P_PGID: idtype_t = 4;
637
638 extern {
639 pub fn aio_read(aiocbp: *mut aiocb) -> ::c_int;
640 pub fn aio_write(aiocbp: *mut aiocb) -> ::c_int;
641 pub fn aio_fsync(op: ::c_int, aiocbp: *mut aiocb) -> ::c_int;
642 pub fn aio_error(aiocbp: *const aiocb) -> ::c_int;
643 pub fn aio_return(aiocbp: *mut aiocb) -> ::ssize_t;
644 #[link_name = "__aio_suspend50"]
645 pub fn aio_suspend(aiocb_list: *const *const aiocb, nitems: ::c_int,
646 timeout: *const ::timespec) -> ::c_int;
647 pub fn aio_cancel(fd: ::c_int, aiocbp: *mut aiocb) -> ::c_int;
648 pub fn lio_listio(mode: ::c_int, aiocb_list: *const *mut aiocb,
649 nitems: ::c_int, sevp: *mut sigevent) -> ::c_int;
650
651 pub fn lutimes(file: *const ::c_char, times: *const ::timeval) -> ::c_int;
652 pub fn getnameinfo(sa: *const ::sockaddr,
653 salen: ::socklen_t,
654 host: *mut ::c_char,
655 hostlen: ::socklen_t,
656 serv: *mut ::c_char,
657 sevlen: ::socklen_t,
658 flags: ::c_int) -> ::c_int;
659 pub fn mprotect(addr: *mut ::c_void, len: ::size_t, prot: ::c_int)
660 -> ::c_int;
661 pub fn sysctl(name: *const ::c_int,
662 namelen: ::c_uint,
663 oldp: *mut ::c_void,
664 oldlenp: *mut ::size_t,
665 newp: *const ::c_void,
666 newlen: ::size_t)
667 -> ::c_int;
668 pub fn sysctlbyname(name: *const ::c_char,
669 oldp: *mut ::c_void,
670 oldlenp: *mut ::size_t,
671 newp: *const ::c_void,
672 newlen: ::size_t)
673 -> ::c_int;
674 #[link_name = "__kevent50"]
675 pub fn kevent(kq: ::c_int,
676 changelist: *const ::kevent,
677 nchanges: ::size_t,
678 eventlist: *mut ::kevent,
679 nevents: ::size_t,
680 timeout: *const ::timespec) -> ::c_int;
681 #[link_name = "__mount50"]
682 pub fn mount(src: *const ::c_char,
683 target: *const ::c_char,
684 flags: ::c_int,
685 data: *mut ::c_void,
686 size: ::size_t) -> ::c_int;
687 pub fn ptrace(requeset: ::c_int,
688 pid: ::pid_t,
689 addr: *mut ::c_void,
690 data: ::c_int) -> ::c_int;
691 pub fn pthread_setname_np(t: ::pthread_t,
692 name: *const ::c_char,
693 arg: *mut ::c_void) -> ::c_int;
694 pub fn pthread_getattr_np(native: ::pthread_t,
695 attr: *mut ::pthread_attr_t) -> ::c_int;
696 pub fn pthread_attr_getguardsize(attr: *const ::pthread_attr_t,
697 guardsize: *mut ::size_t) -> ::c_int;
698 pub fn pthread_attr_getstack(attr: *const ::pthread_attr_t,
699 stackaddr: *mut *mut ::c_void,
700 stacksize: *mut ::size_t) -> ::c_int;
701 #[link_name = "__sigtimedwait50"]
702 pub fn sigtimedwait(set: *const sigset_t,
703 info: *mut siginfo_t,
704 timeout: *const ::timespec) -> ::c_int;
705 pub fn sigwaitinfo(set: *const sigset_t,
706 info: *mut siginfo_t) -> ::c_int;
707 pub fn duplocale(base: ::locale_t) -> ::locale_t;
708 pub fn freelocale(loc: ::locale_t);
709 pub fn localeconv_l(loc: ::locale_t) -> *mut lconv;
710 pub fn newlocale(mask: ::c_int,
711 locale: *const ::c_char,
712 base: ::locale_t) -> ::locale_t;
713 }
714
715 mod other;
716 pub use self::other::*;