]> git.proxmox.com Git - rustc.git/blame - src/vendor/libc/src/unix/notbsd/android/mod.rs
New upstream version 1.20.0+dfsg1
[rustc.git] / src / vendor / libc / src / unix / notbsd / android / mod.rs
CommitLineData
476ff2be
SL
1//! Android-specific definitions for linux-like values
2
3use dox::mem;
4
476ff2be
SL
5pub type clock_t = ::c_long;
6pub type time_t = ::c_long;
7pub type suseconds_t = ::c_long;
476ff2be
SL
8pub type off_t = ::c_long;
9pub type blkcnt_t = ::c_ulong;
10pub type blksize_t = ::c_ulong;
11pub type nlink_t = u32;
12pub type useconds_t = u32;
476ff2be
SL
13pub type pthread_t = ::c_long;
14pub type pthread_mutexattr_t = ::c_long;
041b39d2 15pub type pthread_rwlockattr_t = ::c_long;
476ff2be 16pub type pthread_condattr_t = ::c_long;
476ff2be
SL
17pub type fsfilcnt_t = ::c_ulong;
18pub type fsblkcnt_t = ::c_ulong;
19pub type nfds_t = ::c_uint;
20pub type rlim_t = ::c_ulong;
21pub type dev_t = ::c_ulong;
22pub type ino_t = ::c_ulong;
23pub type __CPU_BITTYPE = ::c_ulong;
8bb4bdeb 24pub type idtype_t = ::c_int;
476ff2be
SL
25
26s! {
27 pub struct dirent {
28 pub d_ino: u64,
29 pub d_off: i64,
30 pub d_reclen: ::c_ushort,
31 pub d_type: ::c_uchar,
32 pub d_name: [::c_char; 256],
33 }
34
35 pub struct dirent64 {
36 pub d_ino: u64,
37 pub d_off: i64,
38 pub d_reclen: ::c_ushort,
39 pub d_type: ::c_uchar,
40 pub d_name: [::c_char; 256],
41 }
42
476ff2be
SL
43 pub struct stack_t {
44 pub ss_sp: *mut ::c_void,
45 pub ss_flags: ::c_int,
46 pub ss_size: ::size_t
47 }
48
49 pub struct siginfo_t {
50 pub si_signo: ::c_int,
51 pub si_errno: ::c_int,
52 pub si_code: ::c_int,
53 pub _pad: [::c_int; 29],
8bb4bdeb 54 _align: [usize; 0],
476ff2be
SL
55 }
56
57 pub struct __fsid_t {
58 __val: [::c_int; 2],
59 }
60
61 pub struct msghdr {
62 pub msg_name: *mut ::c_void,
8bb4bdeb 63 pub msg_namelen: ::socklen_t,
476ff2be
SL
64 pub msg_iov: *mut ::iovec,
65 pub msg_iovlen: ::size_t,
66 pub msg_control: *mut ::c_void,
67 pub msg_controllen: ::size_t,
68 pub msg_flags: ::c_int,
69 }
70
8bb4bdeb
XL
71 pub struct cmsghdr {
72 pub cmsg_len: ::size_t,
73 pub cmsg_level: ::c_int,
74 pub cmsg_type: ::c_int,
75 }
76
476ff2be
SL
77 pub struct termios {
78 pub c_iflag: ::tcflag_t,
79 pub c_oflag: ::tcflag_t,
80 pub c_cflag: ::tcflag_t,
81 pub c_lflag: ::tcflag_t,
82 pub c_line: ::cc_t,
83 pub c_cc: [::cc_t; ::NCCS],
84 }
85
86 pub struct flock {
87 pub l_type: ::c_short,
88 pub l_whence: ::c_short,
89 pub l_start: ::off_t,
90 pub l_len: ::off_t,
91 pub l_pid: ::pid_t,
92 }
93
94 pub struct cpu_set_t {
95 #[cfg(target_pointer_width = "64")]
96 __bits: [__CPU_BITTYPE; 16],
97 #[cfg(target_pointer_width = "32")]
98 __bits: [__CPU_BITTYPE; 1],
99 }
100
101 pub struct sem_t {
102 count: ::c_uint,
8bb4bdeb
XL
103 #[cfg(target_pointer_width = "64")]
104 __reserved: [::c_int; 3],
476ff2be
SL
105 }
106
107 pub struct lastlog {
108 ll_time: ::time_t,
109 ll_line: [::c_char; UT_LINESIZE],
110 ll_host: [::c_char; UT_HOSTSIZE],
111 }
112
113 pub struct exit_status {
114 pub e_termination: ::c_short,
115 pub e_exit: ::c_short,
116 }
117
118 pub struct utmp {
119 pub ut_type: ::c_short,
120 pub ut_pid: ::pid_t,
121 pub ut_line: [::c_char; UT_LINESIZE],
122 pub ut_id: [::c_char; 4],
123
124 pub ut_user: [::c_char; UT_NAMESIZE],
125 pub ut_host: [::c_char; UT_HOSTSIZE],
126 pub ut_exit: exit_status,
127 pub ut_session: ::c_long,
128 pub ut_tv: ::timeval,
129
130 pub ut_addr_v6: [::int32_t; 4],
131 unused: [::c_char; 20],
132 }
8bb4bdeb
XL
133
134 pub struct statvfs {
135 pub f_bsize: ::c_ulong,
136 pub f_frsize: ::c_ulong,
137 pub f_blocks: ::fsblkcnt_t,
138 pub f_bfree: ::fsblkcnt_t,
139 pub f_bavail: ::fsblkcnt_t,
140 pub f_files: ::fsfilcnt_t,
141 pub f_ffree: ::fsfilcnt_t,
142 pub f_favail: ::fsfilcnt_t,
143 pub f_fsid: ::c_ulong,
144 pub f_flag: ::c_ulong,
145 pub f_namemax: ::c_ulong,
146 #[cfg(target_pointer_width = "64")]
147 __f_reserved: [u32; 6],
148 }
476ff2be
SL
149}
150
8bb4bdeb
XL
151pub const O_TRUNC: ::c_int = 512;
152
153pub const O_CLOEXEC: ::c_int = 0x80000;
154
155pub const EBFONT: ::c_int = 59;
156pub const ENOSTR: ::c_int = 60;
157pub const ENODATA: ::c_int = 61;
158pub const ETIME: ::c_int = 62;
159pub const ENOSR: ::c_int = 63;
160pub const ENONET: ::c_int = 64;
161pub const ENOPKG: ::c_int = 65;
162pub const EREMOTE: ::c_int = 66;
163pub const ENOLINK: ::c_int = 67;
164pub const EADV: ::c_int = 68;
165pub const ESRMNT: ::c_int = 69;
166pub const ECOMM: ::c_int = 70;
167pub const EPROTO: ::c_int = 71;
168pub const EDOTDOT: ::c_int = 73;
169
170pub const SA_NODEFER: ::c_int = 0x40000000;
171pub const SA_RESETHAND: ::c_int = 0x80000000;
172pub const SA_RESTART: ::c_int = 0x10000000;
173pub const SA_NOCLDSTOP: ::c_int = 0x00000001;
174
175pub const EPOLL_CLOEXEC: ::c_int = 0x80000;
041b39d2
XL
176pub const EPOLLONESHOT: ::c_int = 0x40000000;
177pub const EPOLLRDHUP: ::c_int = 0x00002000;
178pub const EPOLLWAKEUP: ::c_int = 0x20000000;
8bb4bdeb
XL
179
180pub const EFD_CLOEXEC: ::c_int = 0x80000;
181
476ff2be
SL
182pub const USER_PROCESS: ::c_short = 7;
183
184pub const BUFSIZ: ::c_uint = 1024;
185pub const FILENAME_MAX: ::c_uint = 1024;
186pub const FOPEN_MAX: ::c_uint = 20;
187pub const POSIX_FADV_DONTNEED: ::c_int = 4;
188pub const POSIX_FADV_NOREUSE: ::c_int = 5;
189pub const L_tmpnam: ::c_uint = 1024;
190pub const TMP_MAX: ::c_uint = 308915776;
191pub const _PC_LINK_MAX: ::c_int = 1;
192pub const _PC_MAX_CANON: ::c_int = 2;
193pub const _PC_MAX_INPUT: ::c_int = 3;
194pub const _PC_NAME_MAX: ::c_int = 4;
195pub const _PC_PATH_MAX: ::c_int = 5;
196pub const _PC_PIPE_BUF: ::c_int = 6;
041b39d2
XL
197pub const _PC_2_SYMLINKS: ::c_int = 7;
198pub const _PC_ALLOC_SIZE_MIN: ::c_int = 8;
199pub const _PC_REC_INCR_XFER_SIZE: ::c_int = 9;
200pub const _PC_REC_MAX_XFER_SIZE: ::c_int = 10;
201pub const _PC_REC_MIN_XFER_SIZE: ::c_int = 11;
202pub const _PC_REC_XFER_ALIGN: ::c_int = 12;
203pub const _PC_SYMLINK_MAX: ::c_int = 13;
476ff2be
SL
204pub const _PC_CHOWN_RESTRICTED: ::c_int = 14;
205pub const _PC_NO_TRUNC: ::c_int = 15;
206pub const _PC_VDISABLE: ::c_int = 16;
041b39d2
XL
207pub const _PC_ASYNC_IO: ::c_int = 17;
208pub const _PC_PRIO_IO: ::c_int = 18;
209pub const _PC_SYNC_IO: ::c_int = 19;
476ff2be
SL
210
211pub const FIONBIO: ::c_int = 0x5421;
212
213pub const _SC_ARG_MAX: ::c_int = 0;
214pub const _SC_BC_BASE_MAX: ::c_int = 1;
215pub const _SC_BC_DIM_MAX: ::c_int = 2;
216pub const _SC_BC_SCALE_MAX: ::c_int = 3;
217pub const _SC_BC_STRING_MAX: ::c_int = 4;
218pub const _SC_CHILD_MAX: ::c_int = 5;
219pub const _SC_CLK_TCK: ::c_int = 6;
220pub const _SC_COLL_WEIGHTS_MAX: ::c_int = 7;
221pub const _SC_EXPR_NEST_MAX: ::c_int = 8;
222pub const _SC_LINE_MAX: ::c_int = 9;
223pub const _SC_NGROUPS_MAX: ::c_int = 10;
224pub const _SC_OPEN_MAX: ::c_int = 11;
041b39d2 225pub const _SC_PASS_MAX: ::c_int = 12;
476ff2be
SL
226pub const _SC_2_C_BIND: ::c_int = 13;
227pub const _SC_2_C_DEV: ::c_int = 14;
228pub const _SC_2_C_VERSION: ::c_int = 15;
229pub const _SC_2_CHAR_TERM: ::c_int = 16;
230pub const _SC_2_FORT_DEV: ::c_int = 17;
231pub const _SC_2_FORT_RUN: ::c_int = 18;
232pub const _SC_2_LOCALEDEF: ::c_int = 19;
233pub const _SC_2_SW_DEV: ::c_int = 20;
234pub const _SC_2_UPE: ::c_int = 21;
235pub const _SC_2_VERSION: ::c_int = 22;
236pub const _SC_JOB_CONTROL: ::c_int = 23;
237pub const _SC_SAVED_IDS: ::c_int = 24;
238pub const _SC_VERSION: ::c_int = 25;
239pub const _SC_RE_DUP_MAX: ::c_int = 26;
240pub const _SC_STREAM_MAX: ::c_int = 27;
241pub const _SC_TZNAME_MAX: ::c_int = 28;
242pub const _SC_XOPEN_CRYPT: ::c_int = 29;
243pub const _SC_XOPEN_ENH_I18N: ::c_int = 30;
244pub const _SC_XOPEN_SHM: ::c_int = 31;
245pub const _SC_XOPEN_VERSION: ::c_int = 32;
246pub const _SC_XOPEN_XCU_VERSION: ::c_int = 33;
247pub const _SC_XOPEN_REALTIME: ::c_int = 34;
248pub const _SC_XOPEN_REALTIME_THREADS: ::c_int = 35;
249pub const _SC_XOPEN_LEGACY: ::c_int = 36;
250pub const _SC_ATEXIT_MAX: ::c_int = 37;
251pub const _SC_IOV_MAX: ::c_int = 38;
252pub const _SC_PAGESIZE: ::c_int = 39;
253pub const _SC_PAGE_SIZE: ::c_int = 40;
254pub const _SC_XOPEN_UNIX: ::c_int = 41;
041b39d2
XL
255pub const _SC_XBS5_ILP32_OFF32: ::c_int = 42;
256pub const _SC_XBS5_ILP32_OFFBIG: ::c_int = 43;
257pub const _SC_XBS5_LP64_OFF64: ::c_int = 44;
258pub const _SC_XBS5_LPBIG_OFFBIG: ::c_int = 45;
259pub const _SC_AIO_LISTIO_MAX: ::c_int = 46;
260pub const _SC_AIO_MAX: ::c_int = 47;
261pub const _SC_AIO_PRIO_DELTA_MAX: ::c_int = 48;
262pub const _SC_DELAYTIMER_MAX: ::c_int = 49;
263pub const _SC_MQ_OPEN_MAX: ::c_int = 50;
476ff2be 264pub const _SC_MQ_PRIO_MAX: ::c_int = 51;
041b39d2
XL
265pub const _SC_RTSIG_MAX: ::c_int = 52;
266pub const _SC_SEM_NSEMS_MAX: ::c_int = 53;
267pub const _SC_SEM_VALUE_MAX: ::c_int = 54;
268pub const _SC_SIGQUEUE_MAX: ::c_int = 55;
269pub const _SC_TIMER_MAX: ::c_int = 56;
270pub const _SC_ASYNCHRONOUS_IO: ::c_int = 57;
271pub const _SC_FSYNC: ::c_int = 58;
272pub const _SC_MAPPED_FILES: ::c_int = 59;
273pub const _SC_MEMLOCK: ::c_int = 60;
274pub const _SC_MEMLOCK_RANGE: ::c_int = 61;
275pub const _SC_MEMORY_PROTECTION: ::c_int = 62;
276pub const _SC_MESSAGE_PASSING: ::c_int = 63;
277pub const _SC_PRIORITIZED_IO: ::c_int = 64;
278pub const _SC_PRIORITY_SCHEDULING: ::c_int = 65;
279pub const _SC_REALTIME_SIGNALS: ::c_int = 66;
280pub const _SC_SEMAPHORES: ::c_int = 67;
281pub const _SC_SHARED_MEMORY_OBJECTS: ::c_int = 68;
282pub const _SC_SYNCHRONIZED_IO: ::c_int = 69;
283pub const _SC_TIMERS: ::c_int = 70;
476ff2be
SL
284pub const _SC_GETGR_R_SIZE_MAX: ::c_int = 71;
285pub const _SC_GETPW_R_SIZE_MAX: ::c_int = 72;
286pub const _SC_LOGIN_NAME_MAX: ::c_int = 73;
287pub const _SC_THREAD_DESTRUCTOR_ITERATIONS: ::c_int = 74;
288pub const _SC_THREAD_KEYS_MAX: ::c_int = 75;
289pub const _SC_THREAD_STACK_MIN: ::c_int = 76;
290pub const _SC_THREAD_THREADS_MAX: ::c_int = 77;
291pub const _SC_TTY_NAME_MAX: ::c_int = 78;
292pub const _SC_THREADS: ::c_int = 79;
293pub const _SC_THREAD_ATTR_STACKADDR: ::c_int = 80;
294pub const _SC_THREAD_ATTR_STACKSIZE: ::c_int = 81;
295pub const _SC_THREAD_PRIORITY_SCHEDULING: ::c_int = 82;
296pub const _SC_THREAD_PRIO_INHERIT: ::c_int = 83;
297pub const _SC_THREAD_PRIO_PROTECT: ::c_int = 84;
298pub const _SC_THREAD_SAFE_FUNCTIONS: ::c_int = 85;
041b39d2 299pub const _SC_NPROCESSORS_CONF: ::c_int = 96;
476ff2be 300pub const _SC_NPROCESSORS_ONLN: ::c_int = 97;
041b39d2
XL
301pub const _SC_PHYS_PAGES: ::c_int = 98;
302pub const _SC_AVPHYS_PAGES: ::c_int = 99;
303pub const _SC_MONOTONIC_CLOCK: ::c_int = 100;
476ff2be
SL
304
305pub const PTHREAD_MUTEX_NORMAL: ::c_int = 0;
306pub const PTHREAD_MUTEX_RECURSIVE: ::c_int = 1;
307pub const PTHREAD_MUTEX_ERRORCHECK: ::c_int = 2;
308pub const PTHREAD_MUTEX_DEFAULT: ::c_int = PTHREAD_MUTEX_NORMAL;
309
310pub const FIOCLEX: ::c_int = 0x5451;
311
312pub const SA_ONSTACK: ::c_ulong = 0x08000000;
313pub const SA_SIGINFO: ::c_ulong = 0x00000004;
314pub const SA_NOCLDWAIT: ::c_ulong = 0x00000002;
476ff2be
SL
315pub const SIGCHLD: ::c_int = 17;
316pub const SIGBUS: ::c_int = 7;
317pub const SIGUSR1: ::c_int = 10;
318pub const SIGUSR2: ::c_int = 12;
319pub const SIGCONT: ::c_int = 18;
320pub const SIGSTOP: ::c_int = 19;
321pub const SIGTSTP: ::c_int = 20;
322pub const SIGURG: ::c_int = 23;
323pub const SIGIO: ::c_int = 29;
324pub const SIGSYS: ::c_int = 31;
325pub const SIGSTKFLT: ::c_int = 16;
326pub const SIGUNUSED: ::c_int = 31;
327pub const SIGTTIN: ::c_int = 21;
328pub const SIGTTOU: ::c_int = 22;
329pub const SIGXCPU: ::c_int = 24;
330pub const SIGXFSZ: ::c_int = 25;
331pub const SIGVTALRM: ::c_int = 26;
332pub const SIGPROF: ::c_int = 27;
333pub const SIGWINCH: ::c_int = 28;
334pub const SIGPOLL: ::c_int = 29;
335pub const SIGPWR: ::c_int = 30;
336pub const SIG_SETMASK: ::c_int = 2;
337pub const SIG_BLOCK: ::c_int = 0x000000;
338pub const SIG_UNBLOCK: ::c_int = 0x01;
339
340pub const RUSAGE_CHILDREN: ::c_int = -1;
341
342pub const LC_PAPER: ::c_int = 7;
343pub const LC_NAME: ::c_int = 8;
344pub const LC_ADDRESS: ::c_int = 9;
345pub const LC_TELEPHONE: ::c_int = 10;
346pub const LC_MEASUREMENT: ::c_int = 11;
347pub const LC_IDENTIFICATION: ::c_int = 12;
348pub const LC_PAPER_MASK: ::c_int = (1 << LC_PAPER);
349pub const LC_NAME_MASK: ::c_int = (1 << LC_NAME);
350pub const LC_ADDRESS_MASK: ::c_int = (1 << LC_ADDRESS);
351pub const LC_TELEPHONE_MASK: ::c_int = (1 << LC_TELEPHONE);
352pub const LC_MEASUREMENT_MASK: ::c_int = (1 << LC_MEASUREMENT);
353pub const LC_IDENTIFICATION_MASK: ::c_int = (1 << LC_IDENTIFICATION);
354pub const LC_ALL_MASK: ::c_int = ::LC_CTYPE_MASK
355 | ::LC_NUMERIC_MASK
356 | ::LC_TIME_MASK
357 | ::LC_COLLATE_MASK
358 | ::LC_MONETARY_MASK
359 | ::LC_MESSAGES_MASK
360 | LC_PAPER_MASK
361 | LC_NAME_MASK
362 | LC_ADDRESS_MASK
363 | LC_TELEPHONE_MASK
364 | LC_MEASUREMENT_MASK
365 | LC_IDENTIFICATION_MASK;
366
367pub const MAP_ANON: ::c_int = 0x0020;
368pub const MAP_ANONYMOUS: ::c_int = 0x0020;
369pub const MAP_GROWSDOWN: ::c_int = 0x0100;
370pub const MAP_DENYWRITE: ::c_int = 0x0800;
371pub const MAP_EXECUTABLE: ::c_int = 0x01000;
372pub const MAP_LOCKED: ::c_int = 0x02000;
373pub const MAP_NORESERVE: ::c_int = 0x04000;
374pub const MAP_POPULATE: ::c_int = 0x08000;
375pub const MAP_NONBLOCK: ::c_int = 0x010000;
376pub const MAP_STACK: ::c_int = 0x020000;
377
378pub const EDEADLK: ::c_int = 35;
379pub const ENAMETOOLONG: ::c_int = 36;
380pub const ENOLCK: ::c_int = 37;
381pub const ENOSYS: ::c_int = 38;
382pub const ENOTEMPTY: ::c_int = 39;
383pub const ELOOP: ::c_int = 40;
384pub const ENOMSG: ::c_int = 42;
385pub const EIDRM: ::c_int = 43;
386pub const ECHRNG: ::c_int = 44;
387pub const EL2NSYNC: ::c_int = 45;
388pub const EL3HLT: ::c_int = 46;
389pub const EL3RST: ::c_int = 47;
390pub const ELNRNG: ::c_int = 48;
391pub const EUNATCH: ::c_int = 49;
392pub const ENOCSI: ::c_int = 50;
393pub const EL2HLT: ::c_int = 51;
394pub const EBADE: ::c_int = 52;
395pub const EBADR: ::c_int = 53;
396pub const EXFULL: ::c_int = 54;
397pub const ENOANO: ::c_int = 55;
398pub const EBADRQC: ::c_int = 56;
399pub const EBADSLT: ::c_int = 57;
400
401pub const EMULTIHOP: ::c_int = 72;
402pub const EBADMSG: ::c_int = 74;
403pub const EOVERFLOW: ::c_int = 75;
404pub const ENOTUNIQ: ::c_int = 76;
405pub const EBADFD: ::c_int = 77;
406pub const EREMCHG: ::c_int = 78;
407pub const ELIBACC: ::c_int = 79;
408pub const ELIBBAD: ::c_int = 80;
409pub const ELIBSCN: ::c_int = 81;
410pub const ELIBMAX: ::c_int = 82;
411pub const ELIBEXEC: ::c_int = 83;
412pub const EILSEQ: ::c_int = 84;
413pub const ERESTART: ::c_int = 85;
414pub const ESTRPIPE: ::c_int = 86;
415pub const EUSERS: ::c_int = 87;
416pub const ENOTSOCK: ::c_int = 88;
417pub const EDESTADDRREQ: ::c_int = 89;
418pub const EMSGSIZE: ::c_int = 90;
419pub const EPROTOTYPE: ::c_int = 91;
420pub const ENOPROTOOPT: ::c_int = 92;
421pub const EPROTONOSUPPORT: ::c_int = 93;
422pub const ESOCKTNOSUPPORT: ::c_int = 94;
423pub const EOPNOTSUPP: ::c_int = 95;
8bb4bdeb 424pub const ENOTSUP: ::c_int = EOPNOTSUPP;
476ff2be
SL
425pub const EPFNOSUPPORT: ::c_int = 96;
426pub const EAFNOSUPPORT: ::c_int = 97;
427pub const EADDRINUSE: ::c_int = 98;
428pub const EADDRNOTAVAIL: ::c_int = 99;
429pub const ENETDOWN: ::c_int = 100;
430pub const ENETUNREACH: ::c_int = 101;
431pub const ENETRESET: ::c_int = 102;
432pub const ECONNABORTED: ::c_int = 103;
433pub const ECONNRESET: ::c_int = 104;
434pub const ENOBUFS: ::c_int = 105;
435pub const EISCONN: ::c_int = 106;
436pub const ENOTCONN: ::c_int = 107;
437pub const ESHUTDOWN: ::c_int = 108;
438pub const ETOOMANYREFS: ::c_int = 109;
439pub const ETIMEDOUT: ::c_int = 110;
440pub const ECONNREFUSED: ::c_int = 111;
441pub const EHOSTDOWN: ::c_int = 112;
442pub const EHOSTUNREACH: ::c_int = 113;
443pub const EALREADY: ::c_int = 114;
444pub const EINPROGRESS: ::c_int = 115;
445pub const ESTALE: ::c_int = 116;
446pub const EUCLEAN: ::c_int = 117;
447pub const ENOTNAM: ::c_int = 118;
448pub const ENAVAIL: ::c_int = 119;
449pub const EISNAM: ::c_int = 120;
450pub const EREMOTEIO: ::c_int = 121;
451pub const EDQUOT: ::c_int = 122;
452pub const ENOMEDIUM: ::c_int = 123;
453pub const EMEDIUMTYPE: ::c_int = 124;
454pub const ECANCELED: ::c_int = 125;
455pub const ENOKEY: ::c_int = 126;
456pub const EKEYEXPIRED: ::c_int = 127;
457pub const EKEYREVOKED: ::c_int = 128;
458pub const EKEYREJECTED: ::c_int = 129;
459pub const EOWNERDEAD: ::c_int = 130;
460pub const ENOTRECOVERABLE: ::c_int = 131;
461
462pub const SOCK_STREAM: ::c_int = 1;
463pub const SOCK_DGRAM: ::c_int = 2;
464pub const SOCK_SEQPACKET: ::c_int = 5;
465
466pub const SOL_SOCKET: ::c_int = 1;
8bb4bdeb
XL
467pub const SOL_UDP: ::c_int = 17;
468pub const SOL_SCTP: ::c_int = 132;
469pub const SOL_IPX: ::c_int = 256;
470pub const SOL_AX25: ::c_int = 257;
471pub const SOL_ATALK: ::c_int = 258;
472pub const SOL_NETROM: ::c_int = 259;
473pub const SOL_ROSE: ::c_int = 260;
474
475#[doc(hidden)]
041b39d2 476pub const AF_MAX: ::c_int = 43;
8bb4bdeb
XL
477#[doc(hidden)]
478pub const PF_MAX: ::c_int = AF_MAX;
476ff2be
SL
479
480pub const SO_REUSEADDR: ::c_int = 2;
481pub const SO_TYPE: ::c_int = 3;
482pub const SO_ERROR: ::c_int = 4;
483pub const SO_DONTROUTE: ::c_int = 5;
484pub const SO_BROADCAST: ::c_int = 6;
485pub const SO_SNDBUF: ::c_int = 7;
486pub const SO_RCVBUF: ::c_int = 8;
487pub const SO_KEEPALIVE: ::c_int = 9;
488pub const SO_OOBINLINE: ::c_int = 10;
041b39d2 489pub const SO_PRIORITY: ::c_int = 12;
476ff2be 490pub const SO_LINGER: ::c_int = 13;
041b39d2 491pub const SO_BSDCOMPAT: ::c_int = 14;
476ff2be 492pub const SO_REUSEPORT: ::c_int = 15;
041b39d2
XL
493pub const SO_PASSCRED: ::c_int = 16;
494pub const SO_PEERCRED: ::c_int = 17;
476ff2be
SL
495pub const SO_RCVLOWAT: ::c_int = 18;
496pub const SO_SNDLOWAT: ::c_int = 19;
497pub const SO_RCVTIMEO: ::c_int = 20;
498pub const SO_SNDTIMEO: ::c_int = 21;
041b39d2
XL
499pub const SO_BINDTODEVICE: ::c_int = 25;
500pub const SO_TIMESTAMP: ::c_int = 29;
476ff2be 501pub const SO_ACCEPTCONN: ::c_int = 30;
041b39d2
XL
502pub const SO_SNDBUFFORCE: ::c_int = 32;
503pub const SO_MARK: ::c_int = 36;
504pub const SO_PROTOCOL: ::c_int = 38;
505pub const SO_DOMAIN: ::c_int = 39;
506pub const SO_RXQ_OVFL: ::c_int = 40;
507pub const SO_PEEK_OFF: ::c_int = 42;
508pub const SO_BUSY_POLL: ::c_int = 46;
476ff2be
SL
509
510pub const O_ACCMODE: ::c_int = 3;
511pub const O_APPEND: ::c_int = 1024;
512pub const O_CREAT: ::c_int = 64;
513pub const O_EXCL: ::c_int = 128;
514pub const O_NOCTTY: ::c_int = 256;
515pub const O_NONBLOCK: ::c_int = 2048;
516pub const O_SYNC: ::c_int = 0x101000;
476ff2be
SL
517pub const O_ASYNC: ::c_int = 0x2000;
518pub const O_NDELAY: ::c_int = 0x800;
041b39d2 519pub const O_DSYNC: ::c_int = 4096;
476ff2be
SL
520
521pub const NI_MAXHOST: ::size_t = 1025;
522
523pub const NCCS: usize = 19;
524pub const TCSBRKP: ::c_int = 0x5425;
525pub const TCSANOW: ::c_int = 0;
526pub const TCSADRAIN: ::c_int = 0x1;
527pub const TCSAFLUSH: ::c_int = 0x2;
476ff2be
SL
528pub const VEOF: usize = 4;
529pub const VEOL: usize = 11;
530pub const VEOL2: usize = 16;
531pub const VMIN: usize = 6;
532pub const IEXTEN: ::tcflag_t = 0x00008000;
533pub const TOSTOP: ::tcflag_t = 0x00000100;
534pub const FLUSHO: ::tcflag_t = 0x00001000;
041b39d2 535pub const EXTPROC: ::tcflag_t = 0o200000;
476ff2be
SL
536
537pub const ADFS_SUPER_MAGIC: ::c_long = 0x0000adf5;
538pub const AFFS_SUPER_MAGIC: ::c_long = 0x0000adff;
539pub const CODA_SUPER_MAGIC: ::c_long = 0x73757245;
540pub const CRAMFS_MAGIC: ::c_long = 0x28cd3d45;
541pub const EFS_SUPER_MAGIC: ::c_long = 0x00414a53;
542pub const EXT2_SUPER_MAGIC: ::c_long = 0x0000ef53;
543pub const EXT3_SUPER_MAGIC: ::c_long = 0x0000ef53;
544pub const EXT4_SUPER_MAGIC: ::c_long = 0x0000ef53;
545pub const HPFS_SUPER_MAGIC: ::c_long = 0xf995e849;
546pub const HUGETLBFS_MAGIC: ::c_long = 0x958458f6;
547pub const ISOFS_SUPER_MAGIC: ::c_long = 0x00009660;
548pub const JFFS2_SUPER_MAGIC: ::c_long = 0x000072b6;
549pub const MINIX_SUPER_MAGIC: ::c_long = 0x0000137f;
550pub const MINIX_SUPER_MAGIC2: ::c_long = 0x0000138f;
551pub const MINIX2_SUPER_MAGIC: ::c_long = 0x00002468;
552pub const MINIX2_SUPER_MAGIC2: ::c_long = 0x00002478;
553pub const MSDOS_SUPER_MAGIC: ::c_long = 0x00004d44;
554pub const NCP_SUPER_MAGIC: ::c_long = 0x0000564c;
555pub const NFS_SUPER_MAGIC: ::c_long = 0x00006969;
556pub const OPENPROM_SUPER_MAGIC: ::c_long = 0x00009fa1;
557pub const PROC_SUPER_MAGIC: ::c_long = 0x00009fa0;
558pub const QNX4_SUPER_MAGIC: ::c_long = 0x0000002f;
559pub const REISERFS_SUPER_MAGIC: ::c_long = 0x52654973;
560pub const SMB_SUPER_MAGIC: ::c_long = 0x0000517b;
561pub const TMPFS_MAGIC: ::c_long = 0x01021994;
562pub const USBDEVICE_SUPER_MAGIC: ::c_long = 0x00009fa2;
563
564pub const MADV_HUGEPAGE: ::c_int = 14;
565pub const MADV_NOHUGEPAGE: ::c_int = 15;
566pub const MAP_HUGETLB: ::c_int = 0x040000;
567
568pub const PTRACE_TRACEME: ::c_int = 0;
569pub const PTRACE_PEEKTEXT: ::c_int = 1;
570pub const PTRACE_PEEKDATA: ::c_int = 2;
571pub const PTRACE_PEEKUSER: ::c_int = 3;
572pub const PTRACE_POKETEXT: ::c_int = 4;
573pub const PTRACE_POKEDATA: ::c_int = 5;
574pub const PTRACE_POKEUSER: ::c_int = 6;
575pub const PTRACE_CONT: ::c_int = 7;
576pub const PTRACE_KILL: ::c_int = 8;
577pub const PTRACE_SINGLESTEP: ::c_int = 9;
578pub const PTRACE_ATTACH: ::c_int = 16;
579pub const PTRACE_DETACH: ::c_int = 17;
580pub const PTRACE_SYSCALL: ::c_int = 24;
581pub const PTRACE_SETOPTIONS: ::c_int = 0x4200;
582pub const PTRACE_GETEVENTMSG: ::c_int = 0x4201;
583pub const PTRACE_GETSIGINFO: ::c_int = 0x4202;
584pub const PTRACE_SETSIGINFO: ::c_int = 0x4203;
476ff2be
SL
585
586pub const EFD_NONBLOCK: ::c_int = 0x800;
587
588pub const F_GETLK: ::c_int = 5;
589pub const F_GETOWN: ::c_int = 9;
590pub const F_SETOWN: ::c_int = 8;
591pub const F_SETLK: ::c_int = 6;
592pub const F_SETLKW: ::c_int = 7;
593
594pub const TCGETS: ::c_int = 0x5401;
595pub const TCSETS: ::c_int = 0x5402;
596pub const TCSETSW: ::c_int = 0x5403;
597pub const TCSETSF: ::c_int = 0x5404;
598pub const TCGETA: ::c_int = 0x5405;
599pub const TCSETA: ::c_int = 0x5406;
600pub const TCSETAW: ::c_int = 0x5407;
601pub const TCSETAF: ::c_int = 0x5408;
602pub const TCSBRK: ::c_int = 0x5409;
603pub const TCXONC: ::c_int = 0x540A;
604pub const TCFLSH: ::c_int = 0x540B;
605pub const TIOCGSOFTCAR: ::c_int = 0x5419;
606pub const TIOCSSOFTCAR: ::c_int = 0x541A;
607pub const TIOCINQ: ::c_int = 0x541B;
608pub const TIOCLINUX: ::c_int = 0x541C;
609pub const TIOCGSERIAL: ::c_int = 0x541E;
610pub const TIOCEXCL: ::c_int = 0x540C;
611pub const TIOCNXCL: ::c_int = 0x540D;
612pub const TIOCSCTTY: ::c_int = 0x540E;
613pub const TIOCGPGRP: ::c_int = 0x540F;
614pub const TIOCSPGRP: ::c_int = 0x5410;
615pub const TIOCOUTQ: ::c_int = 0x5411;
616pub const TIOCSTI: ::c_int = 0x5412;
617pub const TIOCGWINSZ: ::c_int = 0x5413;
618pub const TIOCSWINSZ: ::c_int = 0x5414;
619pub const TIOCMGET: ::c_int = 0x5415;
620pub const TIOCMBIS: ::c_int = 0x5416;
621pub const TIOCMBIC: ::c_int = 0x5417;
622pub const TIOCMSET: ::c_int = 0x5418;
623pub const FIONREAD: ::c_int = 0x541B;
624pub const TIOCCONS: ::c_int = 0x541D;
625
476ff2be 626pub const RTLD_NOLOAD: ::c_int = 0x4;
476ff2be
SL
627
628pub const SEM_FAILED: *mut sem_t = 0 as *mut sem_t;
629
630pub const LINUX_REBOOT_MAGIC1: ::c_int = 0xfee1dead;
631pub const LINUX_REBOOT_MAGIC2: ::c_int = 672274793;
632pub const LINUX_REBOOT_MAGIC2A: ::c_int = 85072278;
633pub const LINUX_REBOOT_MAGIC2B: ::c_int = 369367448;
634pub const LINUX_REBOOT_MAGIC2C: ::c_int = 537993216;
635
636pub const LINUX_REBOOT_CMD_RESTART: ::c_int = 0x01234567;
637pub const LINUX_REBOOT_CMD_HALT: ::c_int = 0xCDEF0123;
638pub const LINUX_REBOOT_CMD_CAD_ON: ::c_int = 0x89ABCDEF;
639pub const LINUX_REBOOT_CMD_CAD_OFF: ::c_int = 0x00000000;
640pub const LINUX_REBOOT_CMD_POWER_OFF: ::c_int = 0x4321FEDC;
641pub const LINUX_REBOOT_CMD_RESTART2: ::c_int = 0xA1B2C3D4;
642pub const LINUX_REBOOT_CMD_SW_SUSPEND: ::c_int = 0xD000FCE2;
643pub const LINUX_REBOOT_CMD_KEXEC: ::c_int = 0x45584543;
644
645pub const MCL_CURRENT: ::c_int = 0x0001;
646pub const MCL_FUTURE: ::c_int = 0x0002;
647
476ff2be
SL
648pub const CBAUD: ::tcflag_t = 0o0010017;
649pub const TAB1: ::c_int = 0x00000800;
650pub const TAB2: ::c_int = 0x00001000;
651pub const TAB3: ::c_int = 0x00001800;
652pub const CR1: ::c_int = 0x00000200;
653pub const CR2: ::c_int = 0x00000400;
654pub const CR3: ::c_int = 0x00000600;
655pub const FF1: ::c_int = 0x00008000;
656pub const BS1: ::c_int = 0x00002000;
657pub const VT1: ::c_int = 0x00004000;
658pub const VWERASE: usize = 14;
659pub const VREPRINT: usize = 12;
660pub const VSUSP: usize = 10;
661pub const VSTART: usize = 8;
662pub const VSTOP: usize = 9;
663pub const VDISCARD: usize = 13;
664pub const VTIME: usize = 5;
665pub const IXON: ::tcflag_t = 0x00000400;
666pub const IXOFF: ::tcflag_t = 0x00001000;
667pub const ONLCR: ::tcflag_t = 0x4;
668pub const CSIZE: ::tcflag_t = 0x00000030;
669pub const CS6: ::tcflag_t = 0x00000010;
670pub const CS7: ::tcflag_t = 0x00000020;
671pub const CS8: ::tcflag_t = 0x00000030;
672pub const CSTOPB: ::tcflag_t = 0x00000040;
673pub const CREAD: ::tcflag_t = 0x00000080;
674pub const PARENB: ::tcflag_t = 0x00000100;
675pub const PARODD: ::tcflag_t = 0x00000200;
676pub const HUPCL: ::tcflag_t = 0x00000400;
677pub const CLOCAL: ::tcflag_t = 0x00000800;
678pub const ECHOKE: ::tcflag_t = 0x00000800;
679pub const ECHOE: ::tcflag_t = 0x00000010;
680pub const ECHOK: ::tcflag_t = 0x00000020;
681pub const ECHONL: ::tcflag_t = 0x00000040;
682pub const ECHOPRT: ::tcflag_t = 0x00000400;
683pub const ECHOCTL: ::tcflag_t = 0x00000200;
684pub const ISIG: ::tcflag_t = 0x00000001;
685pub const ICANON: ::tcflag_t = 0x00000002;
686pub const PENDIN: ::tcflag_t = 0x00004000;
687pub const NOFLSH: ::tcflag_t = 0x00000080;
041b39d2
XL
688pub const VSWTC: usize = 7;
689pub const OLCUC: ::tcflag_t = 0o000002;
690pub const NLDLY: ::tcflag_t = 0o000400;
691pub const CRDLY: ::tcflag_t = 0o003000;
692pub const TABDLY: ::tcflag_t = 0o014000;
693pub const BSDLY: ::tcflag_t = 0o020000;
694pub const FFDLY: ::tcflag_t = 0o100000;
695pub const VTDLY: ::tcflag_t = 0o040000;
696pub const XTABS: ::tcflag_t = 0o014000;
476ff2be 697
8bb4bdeb
XL
698pub const B0: ::speed_t = 0o000000;
699pub const B50: ::speed_t = 0o000001;
700pub const B75: ::speed_t = 0o000002;
701pub const B110: ::speed_t = 0o000003;
702pub const B134: ::speed_t = 0o000004;
703pub const B150: ::speed_t = 0o000005;
704pub const B200: ::speed_t = 0o000006;
705pub const B300: ::speed_t = 0o000007;
706pub const B600: ::speed_t = 0o000010;
707pub const B1200: ::speed_t = 0o000011;
708pub const B1800: ::speed_t = 0o000012;
709pub const B2400: ::speed_t = 0o000013;
710pub const B4800: ::speed_t = 0o000014;
711pub const B9600: ::speed_t = 0o000015;
712pub const B19200: ::speed_t = 0o000016;
713pub const B38400: ::speed_t = 0o000017;
714pub const EXTA: ::speed_t = B19200;
715pub const EXTB: ::speed_t = B38400;
716pub const B57600: ::speed_t = 0o010001;
717pub const B115200: ::speed_t = 0o010002;
718pub const B230400: ::speed_t = 0o010003;
719pub const B460800: ::speed_t = 0o010004;
720pub const B500000: ::speed_t = 0o010005;
721pub const B576000: ::speed_t = 0o010006;
722pub const B921600: ::speed_t = 0o010007;
723pub const B1000000: ::speed_t = 0o010010;
724pub const B1152000: ::speed_t = 0o010011;
725pub const B1500000: ::speed_t = 0o010012;
726pub const B2000000: ::speed_t = 0o010013;
727pub const B2500000: ::speed_t = 0o010014;
728pub const B3000000: ::speed_t = 0o010015;
729pub const B3500000: ::speed_t = 0o010016;
730pub const B4000000: ::speed_t = 0o010017;
731
476ff2be
SL
732pub const EAI_SYSTEM: ::c_int = 11;
733
734pub const NETLINK_ROUTE: ::c_int = 0;
735pub const NETLINK_UNUSED: ::c_int = 1;
736pub const NETLINK_USERSOCK: ::c_int = 2;
737pub const NETLINK_FIREWALL: ::c_int = 3;
738pub const NETLINK_SOCK_DIAG: ::c_int = 4;
739pub const NETLINK_NFLOG: ::c_int = 5;
740pub const NETLINK_XFRM: ::c_int = 6;
741pub const NETLINK_SELINUX: ::c_int = 7;
742pub const NETLINK_ISCSI: ::c_int = 8;
743pub const NETLINK_AUDIT: ::c_int = 9;
744pub const NETLINK_FIB_LOOKUP: ::c_int = 10;
745pub const NETLINK_CONNECTOR: ::c_int = 11;
746pub const NETLINK_NETFILTER: ::c_int = 12;
747pub const NETLINK_IP6_FW: ::c_int = 13;
748pub const NETLINK_DNRTMSG: ::c_int = 14;
749pub const NETLINK_KOBJECT_UEVENT: ::c_int = 15;
750pub const NETLINK_GENERIC: ::c_int = 16;
751pub const NETLINK_SCSITRANSPORT: ::c_int = 18;
752pub const NETLINK_ECRYPTFS: ::c_int = 19;
753pub const NETLINK_RDMA: ::c_int = 20;
754pub const NETLINK_CRYPTO: ::c_int = 21;
755pub const NETLINK_INET_DIAG: ::c_int = NETLINK_SOCK_DIAG;
756
757pub const MAX_LINKS: ::c_int = 32;
758
759pub const NLM_F_REQUEST: ::c_int = 1;
760pub const NLM_F_MULTI: ::c_int = 2;
761pub const NLM_F_ACK: ::c_int = 4;
762pub const NLM_F_ECHO: ::c_int = 8;
763pub const NLM_F_DUMP_INTR: ::c_int = 16;
764
765pub const NLM_F_ROOT: ::c_int = 0x100;
766pub const NLM_F_MATCH: ::c_int = 0x200;
767pub const NLM_F_ATOMIC: ::c_int = 0x400;
768pub const NLM_F_DUMP: ::c_int = NLM_F_ROOT | NLM_F_MATCH;
769
770pub const NLM_F_REPLACE: ::c_int = 0x100;
771pub const NLM_F_EXCL: ::c_int = 0x200;
772pub const NLM_F_CREATE: ::c_int = 0x400;
773pub const NLM_F_APPEND: ::c_int = 0x800;
774
775pub const NLMSG_NOOP: ::c_int = 0x1;
776pub const NLMSG_ERROR: ::c_int = 0x2;
777pub const NLMSG_DONE: ::c_int = 0x3;
778pub const NLMSG_OVERRUN: ::c_int = 0x4;
779pub const NLMSG_MIN_TYPE: ::c_int = 0x10;
780
781pub const NETLINK_ADD_MEMBERSHIP: ::c_int = 1;
782pub const NETLINK_DROP_MEMBERSHIP: ::c_int = 2;
783pub const NETLINK_PKTINFO: ::c_int = 3;
784pub const NETLINK_BROADCAST_ERROR: ::c_int = 4;
785pub const NETLINK_NO_ENOBUFS: ::c_int = 5;
786pub const NETLINK_RX_RING: ::c_int = 6;
787pub const NETLINK_TX_RING: ::c_int = 7;
788
789pub const NLA_F_NESTED: ::c_int = 1 << 15;
790pub const NLA_F_NET_BYTEORDER: ::c_int = 1 << 14;
791pub const NLA_TYPE_MASK: ::c_int = !(NLA_F_NESTED | NLA_F_NET_BYTEORDER);
792
8bb4bdeb 793pub const SIGEV_THREAD_ID: ::c_int = 4;
476ff2be 794
041b39d2
XL
795pub const CMSPAR: ::tcflag_t = 0o10000000000;
796pub const CIBAUD: ::tcflag_t = 0o02003600000;
797pub const CBAUDEX: ::tcflag_t = 0o010000;
798
799pub const TIOCM_LE: ::c_int = 0x001;
800pub const TIOCM_DTR: ::c_int = 0x002;
801pub const TIOCM_RTS: ::c_int = 0x004;
802pub const TIOCM_ST: ::c_int = 0x008;
803pub const TIOCM_SR: ::c_int = 0x010;
804pub const TIOCM_CTS: ::c_int = 0x020;
805pub const TIOCM_CAR: ::c_int = 0x040;
806pub const TIOCM_RNG: ::c_int = 0x080;
807pub const TIOCM_DSR: ::c_int = 0x100;
808pub const TIOCM_CD: ::c_int = TIOCM_CAR;
809pub const TIOCM_RI: ::c_int = TIOCM_RNG;
810
8bb4bdeb 811f! {
476ff2be
SL
812 pub fn CPU_ZERO(cpuset: &mut cpu_set_t) -> () {
813 for slot in cpuset.__bits.iter_mut() {
814 *slot = 0;
815 }
816 }
817
818 pub fn CPU_SET(cpu: usize, cpuset: &mut cpu_set_t) -> () {
819 let size_in___bits = 8 * mem::size_of_val(&cpuset.__bits[0]);
820 let (idx, offset) = (cpu / size_in___bits, cpu % size_in___bits);
821 cpuset.__bits[idx] |= 1 << offset;
822 ()
823 }
824
825 pub fn CPU_CLR(cpu: usize, cpuset: &mut cpu_set_t) -> () {
826 let size_in___bits = 8 * mem::size_of_val(&cpuset.__bits[0]);
827 let (idx, offset) = (cpu / size_in___bits, cpu % size_in___bits);
828 cpuset.__bits[idx] &= !(1 << offset);
829 ()
830 }
831
832 pub fn CPU_ISSET(cpu: usize, cpuset: &cpu_set_t) -> bool {
833 let size_in___bits = 8 * mem::size_of_val(&cpuset.__bits[0]);
834 let (idx, offset) = (cpu / size_in___bits, cpu % size_in___bits);
835 0 != (cpuset.__bits[idx] & (1 << offset))
836 }
837
838 pub fn CPU_EQUAL(set1: &cpu_set_t, set2: &cpu_set_t) -> bool {
839 set1.__bits == set2.__bits
840 }
041b39d2
XL
841 pub fn major(dev: ::dev_t) -> ::c_int {
842 ((dev >> 8) & 0xfff) as ::c_int
843 }
844 pub fn minor(dev: ::dev_t) -> ::c_int {
845 ((dev & 0xff) | ((dev >> 12) & 0xfff00)) as ::c_int
846 }
847 pub fn makedev(ma: ::c_int, mi: ::c_int) -> ::dev_t {
848 let ma = ma as ::dev_t;
849 let mi = mi as ::dev_t;
850 ((ma & 0xfff) << 8) | (mi & 0xff) | ((mi & 0xfff00) << 12)
851 }
476ff2be
SL
852}
853
854extern {
855 static mut __progname: *mut ::c_char;
856}
857
858extern {
859 pub fn madvise(addr: *const ::c_void, len: ::size_t, advice: ::c_int)
860 -> ::c_int;
861 pub fn ioctl(fd: ::c_int, request: ::c_int, ...) -> ::c_int;
476ff2be
SL
862 pub fn msync(addr: *const ::c_void, len: ::size_t,
863 flags: ::c_int) -> ::c_int;
864 pub fn mprotect(addr: *const ::c_void, len: ::size_t, prot: ::c_int)
865 -> ::c_int;
476ff2be
SL
866 pub fn recvfrom(socket: ::c_int, buf: *mut ::c_void, len: ::size_t,
867 flags: ::c_int, addr: *const ::sockaddr,
868 addrlen: *mut ::socklen_t) -> ::ssize_t;
869 pub fn getnameinfo(sa: *const ::sockaddr,
870 salen: ::socklen_t,
871 host: *mut ::c_char,
872 hostlen: ::size_t,
873 serv: *mut ::c_char,
874 sevlen: ::size_t,
875 flags: ::c_int) -> ::c_int;
876 pub fn ptrace(request: ::c_int, ...) -> ::c_long;
877 pub fn getpriority(which: ::c_int, who: ::c_int) -> ::c_int;
878 pub fn setpriority(which: ::c_int, who: ::c_int, prio: ::c_int) -> ::c_int;
879 pub fn __sched_cpualloc(count: ::size_t) -> *mut ::cpu_set_t;
880 pub fn __sched_cpufree(set: *mut ::cpu_set_t);
881 pub fn __sched_cpucount(setsize: ::size_t, set: *mut cpu_set_t) -> ::c_int;
882 pub fn sched_getcpu() -> ::c_int;
883
884 pub fn utmpname(name: *const ::c_char) -> ::c_int;
885 pub fn setutent();
886 pub fn getutent() -> *mut utmp;
8bb4bdeb
XL
887
888 pub fn posix_fallocate(fd: ::c_int, offset: ::off_t,
889 len: ::off_t) -> ::c_int;
476ff2be
SL
890}
891
892cfg_if! {
893 if #[cfg(target_pointer_width = "32")] {
894 mod b32;
895 pub use self::b32::*;
896 } else if #[cfg(target_pointer_width = "64")] {
897 mod b64;
898 pub use self::b64::*;
899 } else {
900 // Unknown target_pointer_width
901 }
902}