]> git.proxmox.com Git - rustc.git/blame - src/vendor/libc/src/unix/bsd/netbsdlike/netbsd/mod.rs
New upstream version 1.23.0+dfsg1
[rustc.git] / src / vendor / libc / src / unix / bsd / netbsdlike / netbsd / mod.rs
CommitLineData
476ff2be
SL
1pub type clock_t = ::c_uint;
2pub type suseconds_t = ::c_int;
3pub type dev_t = u64;
4pub type blksize_t = ::int32_t;
5pub type fsblkcnt_t = ::uint64_t;
6pub type fsfilcnt_t = ::uint64_t;
8bb4bdeb 7pub type idtype_t = ::c_int;
476ff2be
SL
8
9s! {
8bb4bdeb
XL
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
476ff2be
SL
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
8bb4bdeb
XL
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
476ff2be
SL
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
041b39d2
XL
168 pub struct pthread_rwlockattr_t {
169 ptra_magic: ::c_uint,
170 ptra_private: *mut ::c_void,
171 }
172
476ff2be
SL
173 pub struct pthread_cond_t {
174 ptc_magic: ::c_uint,
175 ptc_lock: ::c_uchar,
176 ptc_waiters_first: *mut u8,
177 ptc_waiters_last: *mut u8,
178 ptc_mutex: *mut ::pthread_mutex_t,
179 ptc_private: *mut ::c_void,
180 }
181
182 pub struct pthread_condattr_t {
183 ptca_magic: ::c_uint,
184 ptca_private: *mut ::c_void,
185 }
186
187 pub struct pthread_rwlock_t {
188 ptr_magic: ::c_uint,
189 ptr_interlock: ::c_uchar,
190 ptr_rblocked_first: *mut u8,
191 ptr_rblocked_last: *mut u8,
192 ptr_wblocked_first: *mut u8,
193 ptr_wblocked_last: *mut u8,
194 ptr_nreaders: ::c_uint,
195 ptr_owner: ::pthread_t,
196 ptr_private: *mut ::c_void,
197 }
198
199 pub struct kevent {
200 pub ident: ::uintptr_t,
201 pub filter: ::uint32_t,
202 pub flags: ::uint32_t,
203 pub fflags: ::uint32_t,
204 pub data: ::int64_t,
205 pub udata: ::intptr_t,
206 }
207
208 pub struct dqblk {
209 pub dqb_bhardlimit: ::uint32_t,
210 pub dqb_bsoftlimit: ::uint32_t,
211 pub dqb_curblocks: ::uint32_t,
212 pub dqb_ihardlimit: ::uint32_t,
213 pub dqb_isoftlimit: ::uint32_t,
214 pub dqb_curinodes: ::uint32_t,
215 pub dqb_btime: ::int32_t,
216 pub dqb_itime: ::int32_t,
217 }
218
219 pub struct Dl_info {
220 pub dli_fname: *const ::c_char,
221 pub dli_fbase: *mut ::c_void,
222 pub dli_sname: *const ::c_char,
223 pub dli_saddr: *const ::c_void,
224 }
225
226 pub struct lconv {
227 pub decimal_point: *mut ::c_char,
228 pub thousands_sep: *mut ::c_char,
229 pub grouping: *mut ::c_char,
230 pub int_curr_symbol: *mut ::c_char,
231 pub currency_symbol: *mut ::c_char,
232 pub mon_decimal_point: *mut ::c_char,
233 pub mon_thousands_sep: *mut ::c_char,
234 pub mon_grouping: *mut ::c_char,
235 pub positive_sign: *mut ::c_char,
236 pub negative_sign: *mut ::c_char,
237 pub int_frac_digits: ::c_char,
238 pub frac_digits: ::c_char,
239 pub p_cs_precedes: ::c_char,
240 pub p_sep_by_space: ::c_char,
241 pub n_cs_precedes: ::c_char,
242 pub n_sep_by_space: ::c_char,
243 pub p_sign_posn: ::c_char,
244 pub n_sign_posn: ::c_char,
245 pub int_p_cs_precedes: ::c_char,
246 pub int_n_cs_precedes: ::c_char,
247 pub int_p_sep_by_space: ::c_char,
248 pub int_n_sep_by_space: ::c_char,
249 pub int_p_sign_posn: ::c_char,
250 pub int_n_sign_posn: ::c_char,
251 }
3b2f2976
XL
252
253 pub struct if_data {
254 pub ifi_type: ::c_uchar,
255 pub ifi_addrlen: ::c_uchar,
256 pub ifi_hdrlen: ::c_uchar,
257 pub ifi_link_state: ::c_int,
258 pub ifi_mtu: u64,
259 pub ifi_metric: u64,
260 pub ifi_baudrate: u64,
261 pub ifi_ipackets: u64,
262 pub ifi_ierrors: u64,
263 pub ifi_opackets: u64,
264 pub ifi_oerrors: u64,
265 pub ifi_collisions: u64,
266 pub ifi_ibytes: u64,
267 pub ifi_obytes: u64,
268 pub ifi_imcasts: u64,
269 pub ifi_omcasts: u64,
270 pub ifi_iqdrops: u64,
271 pub ifi_noproto: u64,
272 pub ifi_lastchange: ::timespec,
273 }
274
275 pub struct if_msghdr {
276 pub ifm_msglen: ::c_ushort,
277 pub ifm_version: ::c_uchar,
278 pub ifm_type: ::c_uchar,
279 pub ifm_addrs: ::c_int,
280 pub ifm_flags: ::c_int,
281 pub ifm_index: ::c_ushort,
282 pub ifm_data: if_data,
283 }
476ff2be
SL
284}
285
7cac9316
XL
286pub const AT_FDCWD: ::c_int = -100;
287pub const AT_EACCESS: ::c_int = 0x100;
288pub const AT_SYMLINK_NOFOLLOW: ::c_int = 0x200;
289pub const AT_SYMLINK_FOLLOW: ::c_int = 0x400;
290pub const AT_REMOVEDIR: ::c_int = 0x800;
291
476ff2be
SL
292pub const LC_COLLATE_MASK: ::c_int = (1 << ::LC_COLLATE);
293pub const LC_CTYPE_MASK: ::c_int = (1 << ::LC_CTYPE);
294pub const LC_MONETARY_MASK: ::c_int = (1 << ::LC_MONETARY);
295pub const LC_NUMERIC_MASK: ::c_int = (1 << ::LC_NUMERIC);
296pub const LC_TIME_MASK: ::c_int = (1 << ::LC_TIME);
297pub const LC_MESSAGES_MASK: ::c_int = (1 << ::LC_MESSAGES);
298pub const LC_ALL_MASK: ::c_int = !0;
299
300pub const ERA: ::nl_item = 52;
301pub const ERA_D_FMT: ::nl_item = 53;
302pub const ERA_D_T_FMT: ::nl_item = 54;
303pub const ERA_T_FMT: ::nl_item = 55;
304pub const ALT_DIGITS: ::nl_item = 56;
305
306pub const O_CLOEXEC: ::c_int = 0x400000;
307pub const O_ALT_IO: ::c_int = 0x40000;
308pub const O_NOSIGPIPE: ::c_int = 0x1000000;
309pub const O_SEARCH: ::c_int = 0x800000;
476ff2be 310pub const O_DIRECTORY: ::c_int = 0x200000;
041b39d2
XL
311pub const O_DIRECT : ::c_int = 0x00080000;
312pub const O_RSYNC : ::c_int = 0x00020000;
476ff2be
SL
313
314pub const MS_SYNC : ::c_int = 0x4;
315pub const MS_INVALIDATE : ::c_int = 0x2;
316
317pub const RLIM_NLIMITS: ::c_int = 12;
318
319pub const ENOATTR : ::c_int = 93;
320pub const EILSEQ : ::c_int = 85;
321pub const EOVERFLOW : ::c_int = 84;
322pub const ECANCELED : ::c_int = 87;
323pub const EIDRM : ::c_int = 82;
324pub const ENOMSG : ::c_int = 83;
325pub const ENOTSUP : ::c_int = 86;
326pub const ELAST : ::c_int = 96;
327
328pub const F_DUPFD_CLOEXEC : ::c_int = 12;
329pub const F_CLOSEM: ::c_int = 10;
330pub const F_GETNOSIGPIPE: ::c_int = 13;
331pub const F_SETNOSIGPIPE: ::c_int = 14;
332pub const F_MAXFD: ::c_int = 11;
333
334pub const IPV6_JOIN_GROUP: ::c_int = 12;
335pub const IPV6_LEAVE_GROUP: ::c_int = 13;
336
8bb4bdeb
XL
337pub const SOCK_CONN_DGRAM: ::c_int = 6;
338pub const SOCK_DCCP: ::c_int = SOCK_CONN_DGRAM;
339pub const SOCK_NOSIGPIPE: ::c_int = 0x40000000;
340pub const SOCK_FLAGS_MASK: ::c_int = 0xf0000000;
341
476ff2be
SL
342pub const SO_SNDTIMEO: ::c_int = 0x100b;
343pub const SO_RCVTIMEO: ::c_int = 0x100c;
8bb4bdeb
XL
344pub const SO_ACCEPTFILTER: ::c_int = 0x1000;
345pub const SO_TIMESTAMP: ::c_int = 0x2000;
346pub const SO_OVERFLOWED: ::c_int = 0x1009;
347pub const SO_NOHEADER: ::c_int = 0x100a;
348
ea8adc8c
XL
349// sys/netinet/in.h
350// Protocols (RFC 1700)
351// NOTE: These are in addition to the constants defined in src/unix/mod.rs
352
353// IPPROTO_IP defined in src/unix/mod.rs
354/// Hop-by-hop option header
355pub const IPPROTO_HOPOPTS: ::c_int = 0;
356// IPPROTO_ICMP defined in src/unix/mod.rs
357/// group mgmt protocol
358pub const IPPROTO_IGMP: ::c_int = 2;
359/// gateway^2 (deprecated)
360pub const IPPROTO_GGP: ::c_int = 3;
361/// for compatibility
362pub const IPPROTO_IPIP: ::c_int = 4;
363// IPPROTO_TCP defined in src/unix/mod.rs
364/// exterior gateway protocol
365pub const IPPROTO_EGP: ::c_int = 8;
366/// pup
367pub const IPPROTO_PUP: ::c_int = 12;
368// IPPROTO_UDP defined in src/unix/mod.rs
369/// xns idp
370pub const IPPROTO_IDP: ::c_int = 22;
371/// tp-4 w/ class negotiation
372pub const IPPROTO_TP: ::c_int = 29;
373/// DCCP
374pub const IPPROTO_DCCP: ::c_int = 33;
375// IPPROTO_IPV6 defined in src/unix/mod.rs
376/// IP6 routing header
377pub const IPPROTO_ROUTING: ::c_int = 43;
378/// IP6 fragmentation header
379pub const IPPROTO_FRAGMENT: ::c_int = 44;
380/// resource reservation
381pub const IPPROTO_RSVP: ::c_int = 46;
382/// General Routing Encap.
383pub const IPPROTO_GRE: ::c_int = 47;
384/// IP6 Encap Sec. Payload
385pub const IPPROTO_ESP: ::c_int = 50;
386/// IP6 Auth Header
387pub const IPPROTO_AH: ::c_int = 51;
388/// IP Mobility RFC 2004
389pub const IPPROTO_MOBILE: ::c_int = 55;
390/// IPv6 ICMP
391pub const IPPROTO_IPV6_ICMP: ::c_int = 58;
392// IPPROTO_ICMPV6 defined in src/unix/mod.rs
393/// IP6 no next header
394pub const IPPROTO_NONE: ::c_int = 59;
395/// IP6 destination option
396pub const IPPROTO_DSTOPTS: ::c_int = 60;
397/// ISO cnlp
398pub const IPPROTO_EON: ::c_int = 80;
399/// Ethernet-in-IP
400pub const IPPROTO_ETHERIP: ::c_int = 97;
401/// encapsulation header
402pub const IPPROTO_ENCAP: ::c_int = 98;
403/// Protocol indep. multicast
404pub const IPPROTO_PIM: ::c_int = 103;
405/// IP Payload Comp. Protocol
406pub const IPPROTO_IPCOMP: ::c_int = 108;
407/// VRRP RFC 2338
408pub const IPPROTO_VRRP: ::c_int = 112;
409/// Common Address Resolution Protocol
410pub const IPPROTO_CARP: ::c_int = 112;
411/// L2TPv3
412// TEMP: Disabled for now; this constant was added to NetBSD on 2017-02-16,
413// but isn't yet supported by the NetBSD rumprun kernel image used for
414// libc testing.
415//pub const IPPROTO_L2TP: ::c_int = 115;
416/// SCTP
417pub const IPPROTO_SCTP: ::c_int = 132;
418/// PFSYNC
419pub const IPPROTO_PFSYNC: ::c_int = 240;
420pub const IPPROTO_MAX: ::c_int = 256;
421
422/// last return value of *_input(), meaning "all job for this pkt is done".
423pub const IPPROTO_DONE: ::c_int = 257;
424
425/// sysctl placeholder for (FAST_)IPSEC
426pub const CTL_IPPROTO_IPSEC: ::c_int = 258;
427
8bb4bdeb
XL
428pub const AF_OROUTE: ::c_int = 17;
429pub const AF_ARP: ::c_int = 28;
430pub const pseudo_AF_KEY: ::c_int = 29;
431pub const pseudo_AF_HDRCMPLT: ::c_int = 30;
432pub const AF_BLUETOOTH: ::c_int = 31;
433pub const AF_IEEE80211: ::c_int = 32;
434pub const AF_MPLS: ::c_int = 33;
435pub const AF_ROUTE: ::c_int = 34;
436pub const AF_MAX: ::c_int = 35;
437
438pub const NET_MAXID: ::c_int = AF_MAX;
439pub const NET_RT_DUMP: ::c_int = 1;
440pub const NET_RT_FLAGS: ::c_int = 2;
441pub const NET_RT_OOIFLIST: ::c_int = 3;
442pub const NET_RT_OIFLIST: ::c_int = 4;
443pub const NET_RT_IFLIST: ::c_int = 5;
444pub const NET_RT_MAXID: ::c_int = 6;
445
446pub const PF_OROUTE: ::c_int = AF_OROUTE;
447pub const PF_ARP: ::c_int = AF_ARP;
448pub const PF_KEY: ::c_int = pseudo_AF_KEY;
449pub const PF_BLUETOOTH: ::c_int = AF_BLUETOOTH;
450pub const PF_MPLS: ::c_int = AF_MPLS;
451pub const PF_ROUTE: ::c_int = AF_ROUTE;
452pub const PF_MAX: ::c_int = AF_MAX;
453
454pub const MSG_NBIO: ::c_int = 0x1000;
455pub const MSG_WAITFORONE: ::c_int = 0x2000;
456pub const MSG_NOTIFICATION: ::c_int = 0x4000;
457
458pub const SCM_TIMESTAMP: ::c_int = 0x08;
459pub const SCM_CREDS: ::c_int = 0x10;
476ff2be
SL
460
461pub const O_DSYNC : ::c_int = 0x10000;
462
463pub const MAP_RENAME : ::c_int = 0x20;
464pub const MAP_NORESERVE : ::c_int = 0x40;
465pub const MAP_HASSEMAPHORE : ::c_int = 0x200;
466pub const MAP_WIRED: ::c_int = 0x800;
467
abe05a73
XL
468pub const DCCP_TYPE_REQUEST: ::c_int = 0;
469pub const DCCP_TYPE_RESPONSE: ::c_int = 1;
470pub const DCCP_TYPE_DATA: ::c_int = 2;
471pub const DCCP_TYPE_ACK: ::c_int = 3;
472pub const DCCP_TYPE_DATAACK: ::c_int = 4;
473pub const DCCP_TYPE_CLOSEREQ: ::c_int = 5;
474pub const DCCP_TYPE_CLOSE: ::c_int = 6;
475pub const DCCP_TYPE_RESET: ::c_int = 7;
476pub const DCCP_TYPE_MOVE: ::c_int = 8;
477
478pub const DCCP_FEATURE_CC: ::c_int = 1;
479pub const DCCP_FEATURE_ECN: ::c_int = 2;
480pub const DCCP_FEATURE_ACKRATIO: ::c_int = 3;
481pub const DCCP_FEATURE_ACKVECTOR: ::c_int = 4;
482pub const DCCP_FEATURE_MOBILITY: ::c_int = 5;
483pub const DCCP_FEATURE_LOSSWINDOW: ::c_int = 6;
484pub const DCCP_FEATURE_CONN_NONCE: ::c_int = 8;
485pub const DCCP_FEATURE_IDENTREG: ::c_int = 7;
486
487pub const DCCP_OPT_PADDING: ::c_int = 0;
488pub const DCCP_OPT_DATA_DISCARD: ::c_int = 1;
489pub const DCCP_OPT_SLOW_RECV: ::c_int = 2;
490pub const DCCP_OPT_BUF_CLOSED: ::c_int = 3;
491pub const DCCP_OPT_CHANGE_L: ::c_int = 32;
492pub const DCCP_OPT_CONFIRM_L: ::c_int = 33;
493pub const DCCP_OPT_CHANGE_R: ::c_int = 34;
494pub const DCCP_OPT_CONFIRM_R: ::c_int = 35;
495pub const DCCP_OPT_INIT_COOKIE: ::c_int = 36;
496pub const DCCP_OPT_NDP_COUNT: ::c_int = 37;
497pub const DCCP_OPT_ACK_VECTOR0: ::c_int = 38;
498pub const DCCP_OPT_ACK_VECTOR1: ::c_int = 39;
499pub const DCCP_OPT_RECV_BUF_DROPS: ::c_int = 40;
500pub const DCCP_OPT_TIMESTAMP: ::c_int = 41;
501pub const DCCP_OPT_TIMESTAMP_ECHO: ::c_int = 42;
502pub const DCCP_OPT_ELAPSEDTIME: ::c_int = 43;
503pub const DCCP_OPT_DATACHECKSUM: ::c_int = 44;
504
505pub const DCCP_REASON_UNSPEC: ::c_int = 0;
506pub const DCCP_REASON_CLOSED: ::c_int = 1;
507pub const DCCP_REASON_INVALID: ::c_int = 2;
508pub const DCCP_REASON_OPTION_ERR: ::c_int = 3;
509pub const DCCP_REASON_FEA_ERR: ::c_int = 4;
510pub const DCCP_REASON_CONN_REF: ::c_int = 5;
511pub const DCCP_REASON_BAD_SNAME: ::c_int = 6;
512pub const DCCP_REASON_BAD_COOKIE: ::c_int = 7;
513pub const DCCP_REASON_INV_MOVE: ::c_int = 8;
514pub const DCCP_REASON_UNANSW_CH: ::c_int = 10;
515pub const DCCP_REASON_FRUITLESS_NEG: ::c_int = 11;
516
517pub const DCCP_CCID: ::c_int = 1;
518pub const DCCP_CSLEN: ::c_int = 2;
519pub const DCCP_MAXSEG: ::c_int = 4;
520pub const DCCP_SERVICE: ::c_int = 8;
521
522pub const DCCP_NDP_LIMIT: ::c_int = 16;
523pub const DCCP_SEQ_NUM_LIMIT: ::c_int = 16777216;
524pub const DCCP_MAX_OPTIONS: ::c_int = 32;
525pub const DCCP_MAX_PKTS: ::c_int = 100;
526
041b39d2
XL
527pub const _PC_LINK_MAX : ::c_int = 1;
528pub const _PC_MAX_CANON : ::c_int = 2;
529pub const _PC_MAX_INPUT : ::c_int = 3;
530pub const _PC_NAME_MAX : ::c_int = 4;
531pub const _PC_PATH_MAX : ::c_int = 5;
532pub const _PC_PIPE_BUF : ::c_int = 6;
533pub const _PC_CHOWN_RESTRICTED : ::c_int = 7;
534pub const _PC_NO_TRUNC : ::c_int = 8;
535pub const _PC_VDISABLE : ::c_int = 9;
536pub const _PC_SYNC_IO : ::c_int = 10;
537pub const _PC_FILESIZEBITS : ::c_int = 11;
538pub const _PC_SYMLINK_MAX : ::c_int = 12;
539pub const _PC_2_SYMLINKS : ::c_int = 13;
540pub const _PC_ACL_EXTENDED : ::c_int = 14;
541pub const _PC_MIN_HOLE_SIZE : ::c_int = 15;
542
543pub const _SC_SYNCHRONIZED_IO : ::c_int = 31;
476ff2be 544pub const _SC_IOV_MAX : ::c_int = 32;
041b39d2
XL
545pub const _SC_MAPPED_FILES : ::c_int = 33;
546pub const _SC_MEMLOCK : ::c_int = 34;
547pub const _SC_MEMLOCK_RANGE : ::c_int = 35;
548pub const _SC_MEMORY_PROTECTION : ::c_int = 36;
549pub const _SC_LOGIN_NAME_MAX : ::c_int = 37;
550pub const _SC_MONOTONIC_CLOCK : ::c_int = 38;
551pub const _SC_CLK_TCK : ::c_int = 39;
552pub const _SC_ATEXIT_MAX : ::c_int = 40;
553pub const _SC_THREADS : ::c_int = 41;
554pub const _SC_SEMAPHORES : ::c_int = 42;
555pub const _SC_BARRIERS : ::c_int = 43;
556pub const _SC_TIMERS : ::c_int = 44;
557pub const _SC_SPIN_LOCKS : ::c_int = 45;
558pub const _SC_READER_WRITER_LOCKS : ::c_int = 46;
476ff2be
SL
559pub const _SC_GETGR_R_SIZE_MAX : ::c_int = 47;
560pub const _SC_GETPW_R_SIZE_MAX : ::c_int = 48;
041b39d2
XL
561pub const _SC_CLOCK_SELECTION : ::c_int = 49;
562pub const _SC_ASYNCHRONOUS_IO : ::c_int = 50;
563pub const _SC_AIO_LISTIO_MAX : ::c_int = 51;
564pub const _SC_AIO_MAX : ::c_int = 52;
565pub const _SC_MESSAGE_PASSING : ::c_int = 53;
566pub const _SC_MQ_OPEN_MAX : ::c_int = 54;
476ff2be 567pub const _SC_MQ_PRIO_MAX : ::c_int = 55;
041b39d2 568pub const _SC_PRIORITY_SCHEDULING : ::c_int = 56;
476ff2be
SL
569pub const _SC_THREAD_DESTRUCTOR_ITERATIONS : ::c_int = 57;
570pub const _SC_THREAD_KEYS_MAX : ::c_int = 58;
041b39d2
XL
571pub const _SC_THREAD_STACK_MIN : ::c_int = 59;
572pub const _SC_THREAD_THREADS_MAX : ::c_int = 60;
573pub const _SC_THREAD_ATTR_STACKADDR : ::c_int = 61;
574pub const _SC_THREAD_ATTR_STACKSIZE : ::c_int = 62;
575pub const _SC_THREAD_PRIORITY_SCHEDULING : ::c_int = 63;
476ff2be
SL
576pub const _SC_THREAD_PRIO_INHERIT : ::c_int = 64;
577pub const _SC_THREAD_PRIO_PROTECT : ::c_int = 65;
476ff2be
SL
578pub const _SC_THREAD_PROCESS_SHARED : ::c_int = 66;
579pub const _SC_THREAD_SAFE_FUNCTIONS : ::c_int = 67;
476ff2be 580pub const _SC_TTY_NAME_MAX : ::c_int = 68;
476ff2be 581pub const _SC_HOST_NAME_MAX : ::c_int = 69;
041b39d2
XL
582pub const _SC_PASS_MAX : ::c_int = 70;
583pub const _SC_REGEXP : ::c_int = 71;
584pub const _SC_SHELL : ::c_int = 72;
585pub const _SC_SYMLOOP_MAX : ::c_int = 73;
586pub const _SC_V6_ILP32_OFF32 : ::c_int = 74;
587pub const _SC_V6_ILP32_OFFBIG : ::c_int = 75;
588pub const _SC_V6_LP64_OFF64 : ::c_int = 76;
589pub const _SC_V6_LPBIG_OFFBIG : ::c_int = 77;
590pub const _SC_2_PBS : ::c_int = 80;
591pub const _SC_2_PBS_ACCOUNTING : ::c_int = 81;
592pub const _SC_2_PBS_CHECKPOINT : ::c_int = 82;
593pub const _SC_2_PBS_LOCATE : ::c_int = 83;
594pub const _SC_2_PBS_MESSAGE : ::c_int = 84;
595pub const _SC_2_PBS_TRACK : ::c_int = 85;
596pub const _SC_SPAWN : ::c_int = 86;
597pub const _SC_SHARED_MEMORY_OBJECTS : ::c_int = 87;
598pub const _SC_TIMER_MAX : ::c_int = 88;
599pub const _SC_SEM_NSEMS_MAX : ::c_int = 89;
600pub const _SC_CPUTIME : ::c_int = 90;
601pub const _SC_THREAD_CPUTIME : ::c_int = 91;
602pub const _SC_DELAYTIMER_MAX : ::c_int = 92;
603// These two variables will be supported in NetBSD 8.0
604// pub const _SC_SIGQUEUE_MAX : ::c_int = 93;
605// pub const _SC_REALTIME_SIGNALS : ::c_int = 94;
606pub const _SC_PHYS_PAGES : ::c_int = 121;
607pub const _SC_NPROCESSORS_CONF : ::c_int = 1001;
608pub const _SC_NPROCESSORS_ONLN : ::c_int = 1002;
609pub const _SC_SCHED_RT_TS : ::c_int = 2001;
610pub const _SC_SCHED_PRI_MIN : ::c_int = 2002;
611pub const _SC_SCHED_PRI_MAX : ::c_int = 2003;
476ff2be
SL
612
613pub const FD_SETSIZE: usize = 0x100;
614
615pub const ST_NOSUID: ::c_ulong = 8;
616
617pub const PTHREAD_MUTEX_INITIALIZER: pthread_mutex_t = pthread_mutex_t {
618 ptm_magic: 0x33330003,
619 ptm_errorcheck: 0,
620 ptm_interlock: 0,
621 ptm_waiters: 0 as *mut _,
622 ptm_owner: 0,
623 ptm_pad1: [0; 3],
624 ptm_pad2: [0; 3],
625 ptm_recursed: 0,
626 ptm_spare2: 0 as *mut _,
627};
628pub const PTHREAD_COND_INITIALIZER: pthread_cond_t = pthread_cond_t {
629 ptc_magic: 0x55550005,
630 ptc_lock: 0,
631 ptc_waiters_first: 0 as *mut _,
632 ptc_waiters_last: 0 as *mut _,
633 ptc_mutex: 0 as *mut _,
634 ptc_private: 0 as *mut _,
635};
636pub const PTHREAD_RWLOCK_INITIALIZER: pthread_rwlock_t = pthread_rwlock_t {
637 ptr_magic: 0x99990009,
638 ptr_interlock: 0,
639 ptr_rblocked_first: 0 as *mut _,
640 ptr_rblocked_last: 0 as *mut _,
641 ptr_wblocked_first: 0 as *mut _,
642 ptr_wblocked_last: 0 as *mut _,
643 ptr_nreaders: 0,
644 ptr_owner: 0,
645 ptr_private: 0 as *mut _,
646};
647pub const PTHREAD_MUTEX_NORMAL: ::c_int = 0;
648pub const PTHREAD_MUTEX_ERRORCHECK: ::c_int = 1;
649pub const PTHREAD_MUTEX_RECURSIVE: ::c_int = 2;
650pub const PTHREAD_MUTEX_DEFAULT: ::c_int = PTHREAD_MUTEX_NORMAL;
651
abe05a73
XL
652pub const EVFILT_AIO: ::uint32_t = 2;
653pub const EVFILT_PROC: ::uint32_t = 4;
654pub const EVFILT_READ: ::uint32_t = 0;
655pub const EVFILT_SIGNAL: ::uint32_t = 5;
656pub const EVFILT_TIMER: ::uint32_t = 6;
657pub const EVFILT_VNODE: ::uint32_t = 3;
658pub const EVFILT_WRITE: ::uint32_t = 1;
476ff2be
SL
659
660pub const EV_ADD: ::uint32_t = 0x1;
661pub const EV_DELETE: ::uint32_t = 0x2;
662pub const EV_ENABLE: ::uint32_t = 0x4;
663pub const EV_DISABLE: ::uint32_t = 0x8;
664pub const EV_ONESHOT: ::uint32_t = 0x10;
665pub const EV_CLEAR: ::uint32_t = 0x20;
666pub const EV_RECEIPT: ::uint32_t = 0x40;
667pub const EV_DISPATCH: ::uint32_t = 0x80;
668pub const EV_FLAG1: ::uint32_t = 0x2000;
669pub const EV_ERROR: ::uint32_t = 0x4000;
670pub const EV_EOF: ::uint32_t = 0x8000;
671pub const EV_SYSFLAGS: ::uint32_t = 0xf000;
672
673pub const NOTE_LOWAT: ::uint32_t = 0x00000001;
674pub const NOTE_DELETE: ::uint32_t = 0x00000001;
675pub const NOTE_WRITE: ::uint32_t = 0x00000002;
676pub const NOTE_EXTEND: ::uint32_t = 0x00000004;
677pub const NOTE_ATTRIB: ::uint32_t = 0x00000008;
678pub const NOTE_LINK: ::uint32_t = 0x00000010;
679pub const NOTE_RENAME: ::uint32_t = 0x00000020;
680pub const NOTE_REVOKE: ::uint32_t = 0x00000040;
681pub const NOTE_EXIT: ::uint32_t = 0x80000000;
682pub const NOTE_FORK: ::uint32_t = 0x40000000;
683pub const NOTE_EXEC: ::uint32_t = 0x20000000;
684pub const NOTE_PDATAMASK: ::uint32_t = 0x000fffff;
685pub const NOTE_PCTRLMASK: ::uint32_t = 0xf0000000;
686pub const NOTE_TRACK: ::uint32_t = 0x00000001;
687pub const NOTE_TRACKERR: ::uint32_t = 0x00000002;
688pub const NOTE_CHILD: ::uint32_t = 0x00000004;
689
476ff2be
SL
690pub const TMP_MAX : ::c_uint = 308915776;
691
692pub const NI_MAXHOST: ::socklen_t = 1025;
693
694pub const RTLD_NOLOAD: ::c_int = 0x2000;
695pub const RTLD_LOCAL: ::c_int = 0x200;
696
697pub const CTL_MAXNAME: ::c_int = 12;
698pub const SYSCTL_NAMELEN: ::c_int = 32;
699pub const SYSCTL_DEFSIZE: ::c_int = 8;
700pub const CTLTYPE_NODE: ::c_int = 1;
701pub const CTLTYPE_INT: ::c_int = 2;
702pub const CTLTYPE_STRING: ::c_int = 3;
703pub const CTLTYPE_QUAD: ::c_int = 4;
704pub const CTLTYPE_STRUCT: ::c_int = 5;
705pub const CTLTYPE_BOOL: ::c_int = 6;
706pub const CTLFLAG_READONLY: ::c_int = 0x00000000;
707pub const CTLFLAG_READWRITE: ::c_int = 0x00000070;
708pub const CTLFLAG_ANYWRITE: ::c_int = 0x00000080;
709pub const CTLFLAG_PRIVATE: ::c_int = 0x00000100;
710pub const CTLFLAG_PERMANENT: ::c_int = 0x00000200;
711pub const CTLFLAG_OWNDATA: ::c_int = 0x00000400;
712pub const CTLFLAG_IMMEDIATE: ::c_int = 0x00000800;
713pub const CTLFLAG_HEX: ::c_int = 0x00001000;
714pub const CTLFLAG_ROOT: ::c_int = 0x00002000;
715pub const CTLFLAG_ANYNUMBER: ::c_int = 0x00004000;
716pub const CTLFLAG_HIDDEN: ::c_int = 0x00008000;
717pub const CTLFLAG_ALIAS: ::c_int = 0x00010000;
718pub const CTLFLAG_MMAP: ::c_int = 0x00020000;
719pub const CTLFLAG_OWNDESC: ::c_int = 0x00040000;
720pub const CTLFLAG_UNSIGNED: ::c_int = 0x00080000;
721pub const SYSCTL_VERS_MASK: ::c_int = 0xff000000;
722pub const SYSCTL_VERS_0: ::c_int = 0x00000000;
723pub const SYSCTL_VERS_1: ::c_int = 0x01000000;
724pub const SYSCTL_VERSION: ::c_int = SYSCTL_VERS_1;
725pub const CTL_EOL: ::c_int = -1;
726pub const CTL_QUERY: ::c_int = -2;
727pub const CTL_CREATE: ::c_int = -3;
728pub const CTL_CREATESYM: ::c_int = -4;
729pub const CTL_DESTROY: ::c_int = -5;
730pub const CTL_MMAP: ::c_int = -6;
731pub const CTL_DESCRIBE: ::c_int = -7;
732pub const CTL_UNSPEC: ::c_int = 0;
733pub const CTL_KERN: ::c_int = 1;
734pub const CTL_VM: ::c_int = 2;
735pub const CTL_VFS: ::c_int = 3;
736pub const CTL_NET: ::c_int = 4;
737pub const CTL_DEBUG: ::c_int = 5;
738pub const CTL_HW: ::c_int = 6;
739pub const CTL_MACHDEP: ::c_int = 7;
740pub const CTL_USER: ::c_int = 8;
741pub const CTL_DDB: ::c_int = 9;
742pub const CTL_PROC: ::c_int = 10;
743pub const CTL_VENDOR: ::c_int = 11;
744pub const CTL_EMUL: ::c_int = 12;
745pub const CTL_SECURITY: ::c_int = 13;
746pub const CTL_MAXID: ::c_int = 14;
747pub const KERN_OSTYPE: ::c_int = 1;
748pub const KERN_OSRELEASE: ::c_int = 2;
749pub const KERN_OSREV: ::c_int = 3;
750pub const KERN_VERSION: ::c_int = 4;
751pub const KERN_MAXVNODES: ::c_int = 5;
752pub const KERN_MAXPROC: ::c_int = 6;
753pub const KERN_MAXFILES: ::c_int = 7;
754pub const KERN_ARGMAX: ::c_int = 8;
755pub const KERN_SECURELVL: ::c_int = 9;
756pub const KERN_HOSTNAME: ::c_int = 10;
757pub const KERN_HOSTID: ::c_int = 11;
758pub const KERN_CLOCKRATE: ::c_int = 12;
759pub const KERN_VNODE: ::c_int = 13;
760pub const KERN_PROC: ::c_int = 14;
761pub const KERN_FILE: ::c_int = 15;
762pub const KERN_PROF: ::c_int = 16;
763pub const KERN_POSIX1: ::c_int = 17;
764pub const KERN_NGROUPS: ::c_int = 18;
765pub const KERN_JOB_CONTROL: ::c_int = 19;
766pub const KERN_SAVED_IDS: ::c_int = 20;
767pub const KERN_OBOOTTIME: ::c_int = 21;
768pub const KERN_DOMAINNAME: ::c_int = 22;
769pub const KERN_MAXPARTITIONS: ::c_int = 23;
770pub const KERN_RAWPARTITION: ::c_int = 24;
771pub const KERN_NTPTIME: ::c_int = 25;
772pub const KERN_TIMEX: ::c_int = 26;
773pub const KERN_AUTONICETIME: ::c_int = 27;
774pub const KERN_AUTONICEVAL: ::c_int = 28;
775pub const KERN_RTC_OFFSET: ::c_int = 29;
776pub const KERN_ROOT_DEVICE: ::c_int = 30;
777pub const KERN_MSGBUFSIZE: ::c_int = 31;
778pub const KERN_FSYNC: ::c_int = 32;
779pub const KERN_OLDSYSVMSG: ::c_int = 33;
780pub const KERN_OLDSYSVSEM: ::c_int = 34;
781pub const KERN_OLDSYSVSHM: ::c_int = 35;
782pub const KERN_OLDSHORTCORENAME: ::c_int = 36;
783pub const KERN_SYNCHRONIZED_IO: ::c_int = 37;
784pub const KERN_IOV_MAX: ::c_int = 38;
785pub const KERN_MBUF: ::c_int = 39;
786pub const KERN_MAPPED_FILES: ::c_int = 40;
787pub const KERN_MEMLOCK: ::c_int = 41;
788pub const KERN_MEMLOCK_RANGE: ::c_int = 42;
789pub const KERN_MEMORY_PROTECTION: ::c_int = 43;
790pub const KERN_LOGIN_NAME_MAX: ::c_int = 44;
791pub const KERN_DEFCORENAME: ::c_int = 45;
792pub const KERN_LOGSIGEXIT: ::c_int = 46;
793pub const KERN_PROC2: ::c_int = 47;
794pub const KERN_PROC_ARGS: ::c_int = 48;
795pub const KERN_FSCALE: ::c_int = 49;
796pub const KERN_CCPU: ::c_int = 50;
797pub const KERN_CP_TIME: ::c_int = 51;
798pub const KERN_OLDSYSVIPC_INFO: ::c_int = 52;
799pub const KERN_MSGBUF: ::c_int = 53;
800pub const KERN_CONSDEV: ::c_int = 54;
801pub const KERN_MAXPTYS: ::c_int = 55;
802pub const KERN_PIPE: ::c_int = 56;
803pub const KERN_MAXPHYS: ::c_int = 57;
804pub const KERN_SBMAX: ::c_int = 58;
805pub const KERN_TKSTAT: ::c_int = 59;
806pub const KERN_MONOTONIC_CLOCK: ::c_int = 60;
807pub const KERN_URND: ::c_int = 61;
808pub const KERN_LABELSECTOR: ::c_int = 62;
809pub const KERN_LABELOFFSET: ::c_int = 63;
810pub const KERN_LWP: ::c_int = 64;
811pub const KERN_FORKFSLEEP: ::c_int = 65;
812pub const KERN_POSIX_THREADS: ::c_int = 66;
813pub const KERN_POSIX_SEMAPHORES: ::c_int = 67;
814pub const KERN_POSIX_BARRIERS: ::c_int = 68;
815pub const KERN_POSIX_TIMERS: ::c_int = 69;
816pub const KERN_POSIX_SPIN_LOCKS: ::c_int = 70;
817pub const KERN_POSIX_READER_WRITER_LOCKS: ::c_int = 71;
818pub const KERN_DUMP_ON_PANIC: ::c_int = 72;
819pub const KERN_SOMAXKVA: ::c_int = 73;
820pub const KERN_ROOT_PARTITION: ::c_int = 74;
821pub const KERN_DRIVERS: ::c_int = 75;
822pub const KERN_BUF: ::c_int = 76;
823pub const KERN_FILE2: ::c_int = 77;
824pub const KERN_VERIEXEC: ::c_int = 78;
825pub const KERN_CP_ID: ::c_int = 79;
826pub const KERN_HARDCLOCK_TICKS: ::c_int = 80;
827pub const KERN_ARND: ::c_int = 81;
828pub const KERN_SYSVIPC: ::c_int = 82;
829pub const KERN_BOOTTIME: ::c_int = 83;
830pub const KERN_EVCNT: ::c_int = 84;
831pub const KERN_MAXID: ::c_int = 85;
832pub const KERN_PROC_ALL: ::c_int = 0;
833pub const KERN_PROC_PID: ::c_int = 1;
834pub const KERN_PROC_PGRP: ::c_int = 2;
835pub const KERN_PROC_SESSION: ::c_int = 3;
836pub const KERN_PROC_TTY: ::c_int = 4;
837pub const KERN_PROC_UID: ::c_int = 5;
838pub const KERN_PROC_RUID: ::c_int = 6;
839pub const KERN_PROC_GID: ::c_int = 7;
840pub const KERN_PROC_RGID: ::c_int = 8;
abe05a73
XL
841pub const KERN_PROC_ARGV: ::c_int = 1;
842pub const KERN_PROC_NARGV: ::c_int = 2;
843pub const KERN_PROC_ENV: ::c_int = 3;
844pub const KERN_PROC_NENV: ::c_int = 4;
845pub const KERN_PROC_PATHNAME: ::c_int = 5;
476ff2be
SL
846
847pub const EAI_SYSTEM: ::c_int = 11;
848
8bb4bdeb
XL
849pub const AIO_CANCELED: ::c_int = 1;
850pub const AIO_NOTCANCELED: ::c_int = 2;
851pub const AIO_ALLDONE: ::c_int = 3;
852pub const LIO_NOP: ::c_int = 0;
853pub const LIO_WRITE: ::c_int = 1;
854pub const LIO_READ: ::c_int = 2;
855pub const LIO_WAIT: ::c_int = 1;
856pub const LIO_NOWAIT: ::c_int = 0;
857
858pub const SIGEV_NONE: ::c_int = 0;
859pub const SIGEV_SIGNAL: ::c_int = 1;
860pub const SIGEV_THREAD: ::c_int = 2;
861
862pub const WSTOPPED: ::c_int = 0x00000002; // same as WUNTRACED
863pub const WCONTINUED: ::c_int = 0x00000010;
864pub const WEXITED: ::c_int = 0x000000020;
865pub const WNOWAIT: ::c_int = 0x00010000;
866
867pub const P_ALL: idtype_t = 0;
868pub const P_PID: idtype_t = 1;
869pub const P_PGID: idtype_t = 4;
870
7cac9316
XL
871pub const B460800: ::speed_t = 460800;
872pub const B921600: ::speed_t = 921600;
873
041b39d2
XL
874pub const ONOCR: ::tcflag_t = 0x20;
875pub const ONLRET: ::tcflag_t = 0x40;
876pub const CDTRCTS: ::tcflag_t = 0x00020000;
877pub const CHWFLOW: ::tcflag_t = ::MDMBUF | ::CRTSCTS | ::CDTRCTS;
878
ea8adc8c
XL
879pub const SOCK_CLOEXEC: ::c_int = 0x10000000;
880pub const SOCK_NONBLOCK: ::c_int = 0x20000000;
881
041b39d2
XL
882// dirfd() is a macro on netbsd to access
883// the first field of the struct where dirp points to:
884// http://cvsweb.netbsd.org/bsdweb.cgi/src/include/dirent.h?rev=1.36
885f! {
886 pub fn dirfd(dirp: *mut ::DIR) -> ::c_int {
887 unsafe { *(dirp as *const ::c_int) }
888 }
ea8adc8c
XL
889
890 pub fn WIFCONTINUED(status: ::c_int) -> bool {
891 status == 0xffff
892 }
041b39d2
XL
893}
894
476ff2be 895extern {
8bb4bdeb
XL
896 pub fn aio_read(aiocbp: *mut aiocb) -> ::c_int;
897 pub fn aio_write(aiocbp: *mut aiocb) -> ::c_int;
898 pub fn aio_fsync(op: ::c_int, aiocbp: *mut aiocb) -> ::c_int;
899 pub fn aio_error(aiocbp: *const aiocb) -> ::c_int;
900 pub fn aio_return(aiocbp: *mut aiocb) -> ::ssize_t;
901 #[link_name = "__aio_suspend50"]
902 pub fn aio_suspend(aiocb_list: *const *const aiocb, nitems: ::c_int,
903 timeout: *const ::timespec) -> ::c_int;
904 pub fn aio_cancel(fd: ::c_int, aiocbp: *mut aiocb) -> ::c_int;
905 pub fn lio_listio(mode: ::c_int, aiocb_list: *const *mut aiocb,
906 nitems: ::c_int, sevp: *mut sigevent) -> ::c_int;
907
476ff2be
SL
908 pub fn lutimes(file: *const ::c_char, times: *const ::timeval) -> ::c_int;
909 pub fn getnameinfo(sa: *const ::sockaddr,
910 salen: ::socklen_t,
911 host: *mut ::c_char,
912 hostlen: ::socklen_t,
913 serv: *mut ::c_char,
914 sevlen: ::socklen_t,
915 flags: ::c_int) -> ::c_int;
916 pub fn mprotect(addr: *mut ::c_void, len: ::size_t, prot: ::c_int)
917 -> ::c_int;
918 pub fn sysctl(name: *const ::c_int,
919 namelen: ::c_uint,
920 oldp: *mut ::c_void,
921 oldlenp: *mut ::size_t,
922 newp: *const ::c_void,
923 newlen: ::size_t)
924 -> ::c_int;
925 pub fn sysctlbyname(name: *const ::c_char,
926 oldp: *mut ::c_void,
927 oldlenp: *mut ::size_t,
928 newp: *const ::c_void,
929 newlen: ::size_t)
930 -> ::c_int;
931 #[link_name = "__kevent50"]
932 pub fn kevent(kq: ::c_int,
933 changelist: *const ::kevent,
934 nchanges: ::size_t,
935 eventlist: *mut ::kevent,
936 nevents: ::size_t,
937 timeout: *const ::timespec) -> ::c_int;
938 #[link_name = "__mount50"]
939 pub fn mount(src: *const ::c_char,
940 target: *const ::c_char,
941 flags: ::c_int,
942 data: *mut ::c_void,
943 size: ::size_t) -> ::c_int;
ea8adc8c 944 pub fn ptrace(request: ::c_int,
476ff2be
SL
945 pid: ::pid_t,
946 addr: *mut ::c_void,
947 data: ::c_int) -> ::c_int;
948 pub fn pthread_setname_np(t: ::pthread_t,
949 name: *const ::c_char,
950 arg: *mut ::c_void) -> ::c_int;
951 pub fn pthread_getattr_np(native: ::pthread_t,
952 attr: *mut ::pthread_attr_t) -> ::c_int;
953 pub fn pthread_attr_getguardsize(attr: *const ::pthread_attr_t,
954 guardsize: *mut ::size_t) -> ::c_int;
955 pub fn pthread_attr_getstack(attr: *const ::pthread_attr_t,
956 stackaddr: *mut *mut ::c_void,
957 stacksize: *mut ::size_t) -> ::c_int;
958 #[link_name = "__sigtimedwait50"]
959 pub fn sigtimedwait(set: *const sigset_t,
960 info: *mut siginfo_t,
961 timeout: *const ::timespec) -> ::c_int;
962 pub fn sigwaitinfo(set: *const sigset_t,
963 info: *mut siginfo_t) -> ::c_int;
964 pub fn duplocale(base: ::locale_t) -> ::locale_t;
965 pub fn freelocale(loc: ::locale_t);
966 pub fn localeconv_l(loc: ::locale_t) -> *mut lconv;
967 pub fn newlocale(mask: ::c_int,
968 locale: *const ::c_char,
969 base: ::locale_t) -> ::locale_t;
041b39d2
XL
970 #[link_name = "__settimeofday50"]
971 pub fn settimeofday(tv: *const ::timeval, tz: *const ::c_void) -> ::c_int;
476ff2be
SL
972}
973
974mod other;
975pub use self::other::*;