diff options
Diffstat (limited to 'third_party/libc/src/unix/bsd/openbsdlike/bitrig.rs')
-rw-r--r-- | third_party/libc/src/unix/bsd/openbsdlike/bitrig.rs | 435 |
1 files changed, 435 insertions, 0 deletions
diff --git a/third_party/libc/src/unix/bsd/openbsdlike/bitrig.rs b/third_party/libc/src/unix/bsd/openbsdlike/bitrig.rs new file mode 100644 index 0000000..cb1eae8 --- /dev/null +++ b/third_party/libc/src/unix/bsd/openbsdlike/bitrig.rs | |||
@@ -0,0 +1,435 @@ | |||
1 | pub type clock_t = i64; | ||
2 | pub type suseconds_t = i64; | ||
3 | pub type dev_t = i32; | ||
4 | pub type sigset_t = ::c_uint; | ||
5 | pub type blksize_t = ::uint32_t; | ||
6 | pub type fsblkcnt_t = ::c_uint; | ||
7 | pub type fsfilcnt_t = ::c_uint; | ||
8 | pub type pthread_attr_t = *mut ::c_void; | ||
9 | pub type pthread_mutex_t = *mut ::c_void; | ||
10 | pub type pthread_mutexattr_t = *mut ::c_void; | ||
11 | pub type pthread_cond_t = *mut ::c_void; | ||
12 | pub type pthread_condattr_t = *mut ::c_void; | ||
13 | pub type pthread_rwlock_t = *mut ::c_void; | ||
14 | |||
15 | s! { | ||
16 | pub struct dirent { | ||
17 | pub d_fileno: ::ino_t, | ||
18 | pub d_off: ::off_t, | ||
19 | pub d_reclen: u16, | ||
20 | pub d_type: u8, | ||
21 | pub d_namlen: u8, | ||
22 | __d_padding: [u8; 4], | ||
23 | pub d_name: [::c_char; 256], | ||
24 | } | ||
25 | |||
26 | pub struct glob_t { | ||
27 | pub gl_pathc: ::c_int, | ||
28 | pub gl_matchc: ::c_int, | ||
29 | pub gl_offs: ::c_int, | ||
30 | pub gl_flags: ::c_int, | ||
31 | pub gl_pathv: *mut *mut ::c_char, | ||
32 | __unused1: *mut ::c_void, | ||
33 | __unused2: *mut ::c_void, | ||
34 | __unused3: *mut ::c_void, | ||
35 | __unused4: *mut ::c_void, | ||
36 | __unused5: *mut ::c_void, | ||
37 | __unused6: *mut ::c_void, | ||
38 | __unused7: *mut ::c_void, | ||
39 | } | ||
40 | |||
41 | pub struct stat { | ||
42 | pub st_mode: ::mode_t, | ||
43 | pub st_dev: ::dev_t, | ||
44 | pub st_ino: ::ino_t, | ||
45 | pub st_nlink: ::nlink_t, | ||
46 | pub st_uid: ::uid_t, | ||
47 | pub st_gid: ::gid_t, | ||
48 | pub st_rdev: ::dev_t, | ||
49 | pub st_atime: ::time_t, | ||
50 | pub st_atime_nsec: ::c_long, | ||
51 | pub st_mtime: ::time_t, | ||
52 | pub st_mtime_nsec: ::c_long, | ||
53 | pub st_ctime: ::time_t, | ||
54 | pub st_ctime_nsec: ::c_long, | ||
55 | pub st_size: ::off_t, | ||
56 | pub st_blocks: ::blkcnt_t, | ||
57 | pub st_blksize: ::blksize_t, | ||
58 | pub st_flags: ::uint32_t, | ||
59 | pub st_gen: ::uint32_t, | ||
60 | pub st_birthtime: ::time_t, | ||
61 | pub st_birthtime_nsec: ::c_long, | ||
62 | } | ||
63 | |||
64 | pub struct statvfs { | ||
65 | pub f_bsize: ::c_ulong, | ||
66 | pub f_frsize: ::c_ulong, | ||
67 | pub f_blocks: ::fsblkcnt_t, | ||
68 | pub f_bfree: ::fsblkcnt_t, | ||
69 | pub f_bavail: ::fsblkcnt_t, | ||
70 | pub f_files: ::fsfilcnt_t, | ||
71 | pub f_ffree: ::fsfilcnt_t, | ||
72 | pub f_favail: ::fsfilcnt_t, | ||
73 | pub f_fsid: ::c_ulong, | ||
74 | pub f_flag: ::c_ulong, | ||
75 | pub f_namemax: ::c_ulong, | ||
76 | } | ||
77 | |||
78 | pub struct addrinfo { | ||
79 | pub ai_flags: ::c_int, | ||
80 | pub ai_family: ::c_int, | ||
81 | pub ai_socktype: ::c_int, | ||
82 | pub ai_protocol: ::c_int, | ||
83 | pub ai_addrlen: ::socklen_t, | ||
84 | pub ai_addr: *mut ::sockaddr, | ||
85 | pub ai_canonname: *mut ::c_char, | ||
86 | pub ai_next: *mut ::addrinfo, | ||
87 | } | ||
88 | |||
89 | pub struct sockaddr_storage { | ||
90 | pub ss_len: u8, | ||
91 | pub ss_family: ::sa_family_t, | ||
92 | __ss_pad1: [u8; 6], | ||
93 | __ss_pad2: i64, | ||
94 | __ss_pad3: [u8; 240], | ||
95 | } | ||
96 | |||
97 | pub struct siginfo_t { | ||
98 | pub si_signo: ::c_int, | ||
99 | pub si_code: ::c_int, | ||
100 | pub si_errno: ::c_int, | ||
101 | pub si_addr: *mut ::c_void | ||
102 | } | ||
103 | |||
104 | pub struct Dl_info { | ||
105 | pub dli_fname: *const ::c_char, | ||
106 | pub dli_fbase: *mut ::c_void, | ||
107 | pub dli_sname: *const ::c_char, | ||
108 | pub dli_saddr: *mut ::c_void, | ||
109 | } | ||
110 | |||
111 | pub struct lconv { | ||
112 | pub decimal_point: *mut ::c_char, | ||
113 | pub thousands_sep: *mut ::c_char, | ||
114 | pub grouping: *mut ::c_char, | ||
115 | pub int_curr_symbol: *mut ::c_char, | ||
116 | pub currency_symbol: *mut ::c_char, | ||
117 | pub mon_decimal_point: *mut ::c_char, | ||
118 | pub mon_thousands_sep: *mut ::c_char, | ||
119 | pub mon_grouping: *mut ::c_char, | ||
120 | pub positive_sign: *mut ::c_char, | ||
121 | pub negative_sign: *mut ::c_char, | ||
122 | pub int_frac_digits: ::c_char, | ||
123 | pub frac_digits: ::c_char, | ||
124 | pub p_cs_precedes: ::c_char, | ||
125 | pub p_sep_by_space: ::c_char, | ||
126 | pub n_cs_precedes: ::c_char, | ||
127 | pub n_sep_by_space: ::c_char, | ||
128 | pub p_sign_posn: ::c_char, | ||
129 | pub n_sign_posn: ::c_char, | ||
130 | pub int_p_cs_precedes: ::c_char, | ||
131 | pub int_n_cs_precedes: ::c_char, | ||
132 | pub int_p_sep_by_space: ::c_char, | ||
133 | pub int_n_sep_by_space: ::c_char, | ||
134 | pub int_p_sign_posn: ::c_char, | ||
135 | pub int_n_sign_posn: ::c_char, | ||
136 | } | ||
137 | } | ||
138 | |||
139 | pub const LC_COLLATE_MASK: ::c_int = (1 << 0); | ||
140 | pub const LC_CTYPE_MASK: ::c_int = (1 << 1); | ||
141 | pub const LC_MESSAGES_MASK: ::c_int = (1 << 2); | ||
142 | pub const LC_MONETARY_MASK: ::c_int = (1 << 3); | ||
143 | pub const LC_NUMERIC_MASK: ::c_int = (1 << 4); | ||
144 | pub const LC_TIME_MASK: ::c_int = (1 << 5); | ||
145 | pub const LC_ALL_MASK: ::c_int = LC_COLLATE_MASK | ||
146 | | LC_CTYPE_MASK | ||
147 | | LC_MESSAGES_MASK | ||
148 | | LC_MONETARY_MASK | ||
149 | | LC_NUMERIC_MASK | ||
150 | | LC_TIME_MASK; | ||
151 | |||
152 | pub const ERA: ::nl_item = 52; | ||
153 | pub const ERA_D_FMT: ::nl_item = 53; | ||
154 | pub const ERA_D_T_FMT: ::nl_item = 54; | ||
155 | pub const ERA_T_FMT: ::nl_item = 55; | ||
156 | pub const ALT_DIGITS: ::nl_item = 56; | ||
157 | |||
158 | pub const D_MD_ORDER: ::nl_item = 57; | ||
159 | |||
160 | pub const ALTMON_1: ::nl_item = 58; | ||
161 | pub const ALTMON_2: ::nl_item = 59; | ||
162 | pub const ALTMON_3: ::nl_item = 60; | ||
163 | pub const ALTMON_4: ::nl_item = 61; | ||
164 | pub const ALTMON_5: ::nl_item = 62; | ||
165 | pub const ALTMON_6: ::nl_item = 63; | ||
166 | pub const ALTMON_7: ::nl_item = 64; | ||
167 | pub const ALTMON_8: ::nl_item = 65; | ||
168 | pub const ALTMON_9: ::nl_item = 66; | ||
169 | pub const ALTMON_10: ::nl_item = 67; | ||
170 | pub const ALTMON_11: ::nl_item = 68; | ||
171 | pub const ALTMON_12: ::nl_item = 69; | ||
172 | |||
173 | pub const O_CLOEXEC: ::c_int = 0x10000; | ||
174 | |||
175 | pub const MS_SYNC : ::c_int = 0x0002; | ||
176 | pub const MS_INVALIDATE : ::c_int = 0x0004; | ||
177 | |||
178 | pub const PTHREAD_STACK_MIN : ::size_t = 2048; | ||
179 | |||
180 | pub const ENOATTR : ::c_int = 83; | ||
181 | pub const EILSEQ : ::c_int = 84; | ||
182 | pub const EOVERFLOW : ::c_int = 87; | ||
183 | pub const ECANCELED : ::c_int = 88; | ||
184 | pub const EIDRM : ::c_int = 89; | ||
185 | pub const ENOMSG : ::c_int = 90; | ||
186 | pub const ENOTSUP : ::c_int = 91; | ||
187 | pub const ELAST : ::c_int = 91; | ||
188 | |||
189 | pub const F_DUPFD_CLOEXEC : ::c_int = 10; | ||
190 | |||
191 | pub const RLIM_NLIMITS: ::c_int = 9; | ||
192 | |||
193 | pub const SO_SNDTIMEO: ::c_int = 0x1005; | ||
194 | pub const SO_RCVTIMEO: ::c_int = 0x1006; | ||
195 | |||
196 | pub const O_DSYNC : ::c_int = 128; | ||
197 | |||
198 | pub const MAP_RENAME : ::c_int = 0x0000; | ||
199 | pub const MAP_NORESERVE : ::c_int = 0x0000; | ||
200 | pub const MAP_HASSEMAPHORE : ::c_int = 0x0000; | ||
201 | |||
202 | pub const EIPSEC : ::c_int = 82; | ||
203 | pub const ENOMEDIUM : ::c_int = 85; | ||
204 | pub const EMEDIUMTYPE : ::c_int = 86; | ||
205 | |||
206 | pub const RUSAGE_THREAD: ::c_int = 1; | ||
207 | |||
208 | pub const IPV6_ADD_MEMBERSHIP: ::c_int = 12; | ||
209 | pub const IPV6_DROP_MEMBERSHIP: ::c_int = 13; | ||
210 | |||
211 | pub const MAP_COPY : ::c_int = 0x0002; | ||
212 | pub const MAP_NOEXTEND : ::c_int = 0x0000; | ||
213 | |||
214 | pub const _SC_IOV_MAX : ::c_int = 51; | ||
215 | pub const _SC_GETGR_R_SIZE_MAX : ::c_int = 100; | ||
216 | pub const _SC_GETPW_R_SIZE_MAX : ::c_int = 101; | ||
217 | pub const _SC_LOGIN_NAME_MAX : ::c_int = 102; | ||
218 | pub const _SC_MQ_PRIO_MAX : ::c_int = 59; | ||
219 | pub const _SC_NPROCESSORS_ONLN : ::c_int = 503; | ||
220 | pub const _SC_THREADS : ::c_int = 91; | ||
221 | pub const _SC_THREAD_ATTR_STACKADDR : ::c_int = 77; | ||
222 | pub const _SC_THREAD_ATTR_STACKSIZE : ::c_int = 78; | ||
223 | pub const _SC_THREAD_DESTRUCTOR_ITERATIONS : ::c_int = 80; | ||
224 | pub const _SC_THREAD_KEYS_MAX : ::c_int = 81; | ||
225 | pub const _SC_THREAD_PRIO_INHERIT : ::c_int = 82; | ||
226 | pub const _SC_THREAD_PRIO_PROTECT : ::c_int = 83; | ||
227 | pub const _SC_THREAD_PRIORITY_SCHEDULING : ::c_int = 84; | ||
228 | pub const _SC_THREAD_PROCESS_SHARED : ::c_int = 85; | ||
229 | pub const _SC_THREAD_SAFE_FUNCTIONS : ::c_int = 103; | ||
230 | pub const _SC_THREAD_STACK_MIN : ::c_int = 89; | ||
231 | pub const _SC_THREAD_THREADS_MAX : ::c_int = 90; | ||
232 | pub const _SC_TTY_NAME_MAX : ::c_int = 107; | ||
233 | pub const _SC_ATEXIT_MAX : ::c_int = 46; | ||
234 | pub const _SC_CLK_TCK : ::c_int = 3; | ||
235 | pub const _SC_AIO_LISTIO_MAX : ::c_int = 42; | ||
236 | pub const _SC_AIO_MAX : ::c_int = 43; | ||
237 | pub const _SC_ASYNCHRONOUS_IO : ::c_int = 45; | ||
238 | pub const _SC_MAPPED_FILES : ::c_int = 53; | ||
239 | pub const _SC_MEMLOCK : ::c_int = 54; | ||
240 | pub const _SC_MEMLOCK_RANGE : ::c_int = 55; | ||
241 | pub const _SC_MEMORY_PROTECTION : ::c_int = 56; | ||
242 | pub const _SC_MESSAGE_PASSING : ::c_int = 57; | ||
243 | pub const _SC_MQ_OPEN_MAX : ::c_int = 58; | ||
244 | pub const _SC_PRIORITY_SCHEDULING : ::c_int = 61; | ||
245 | pub const _SC_SEMAPHORES : ::c_int = 67; | ||
246 | pub const _SC_SHARED_MEMORY_OBJECTS : ::c_int = 68; | ||
247 | pub const _SC_SYNCHRONIZED_IO : ::c_int = 75; | ||
248 | pub const _SC_TIMERS : ::c_int = 94; | ||
249 | pub const _SC_XOPEN_CRYPT : ::c_int = 117; | ||
250 | pub const _SC_XOPEN_ENH_I18N : ::c_int = 118; | ||
251 | pub const _SC_XOPEN_LEGACY : ::c_int = 119; | ||
252 | pub const _SC_XOPEN_REALTIME : ::c_int = 120; | ||
253 | pub const _SC_XOPEN_REALTIME_THREADS : ::c_int = 121; | ||
254 | pub const _SC_XOPEN_UNIX : ::c_int = 123; | ||
255 | pub const _SC_XOPEN_VERSION : ::c_int = 125; | ||
256 | pub const _SC_SEM_NSEMS_MAX : ::c_int = 31; | ||
257 | pub const _SC_SEM_VALUE_MAX : ::c_int = 32; | ||
258 | pub const _SC_AIO_PRIO_DELTA_MAX : ::c_int = 44; | ||
259 | pub const _SC_DELAYTIMER_MAX : ::c_int = 50; | ||
260 | pub const _SC_PRIORITIZED_IO : ::c_int = 60; | ||
261 | pub const _SC_REALTIME_SIGNALS : ::c_int = 64; | ||
262 | pub const _SC_RTSIG_MAX : ::c_int = 66; | ||
263 | pub const _SC_SIGQUEUE_MAX : ::c_int = 70; | ||
264 | pub const _SC_TIMER_MAX : ::c_int = 93; | ||
265 | pub const _SC_HOST_NAME_MAX: ::c_int = 33; | ||
266 | |||
267 | pub const FD_SETSIZE: usize = 1024; | ||
268 | |||
269 | pub const ST_NOSUID: ::c_ulong = 2; | ||
270 | |||
271 | pub const PTHREAD_MUTEX_INITIALIZER: pthread_mutex_t = 0 as *mut _; | ||
272 | pub const PTHREAD_COND_INITIALIZER: pthread_cond_t = 0 as *mut _; | ||
273 | pub const PTHREAD_RWLOCK_INITIALIZER: pthread_rwlock_t = 0 as *mut _; | ||
274 | |||
275 | pub const PTHREAD_MUTEX_ERRORCHECK: ::c_int = 1; | ||
276 | pub const PTHREAD_MUTEX_RECURSIVE: ::c_int = 2; | ||
277 | pub const PTHREAD_MUTEX_NORMAL: ::c_int = 3; | ||
278 | pub const PTHREAD_MUTEX_STRICT_NP: ::c_int = 4; | ||
279 | pub const PTHREAD_MUTEX_DEFAULT: ::c_int = PTHREAD_MUTEX_STRICT_NP; | ||
280 | |||
281 | pub const TMP_MAX : ::c_uint = 0x7fffffff; | ||
282 | |||
283 | pub const NI_MAXHOST: ::size_t = 256; | ||
284 | |||
285 | pub const CTL_MAXNAME: ::c_int = 12; | ||
286 | pub const CTLTYPE_NODE: ::c_int = 1; | ||
287 | pub const CTLTYPE_INT: ::c_int = 2; | ||
288 | pub const CTLTYPE_STRING: ::c_int = 3; | ||
289 | pub const CTLTYPE_QUAD: ::c_int = 4; | ||
290 | pub const CTLTYPE_STRUCT: ::c_int = 5; | ||
291 | pub const CTL_UNSPEC: ::c_int = 0; | ||
292 | pub const CTL_KERN: ::c_int = 1; | ||
293 | pub const CTL_VM: ::c_int = 2; | ||
294 | pub const CTL_FS: ::c_int = 3; | ||
295 | pub const CTL_NET: ::c_int = 4; | ||
296 | pub const CTL_DEBUG: ::c_int = 5; | ||
297 | pub const CTL_HW: ::c_int = 6; | ||
298 | pub const CTL_MACHDEP: ::c_int = 7; | ||
299 | pub const CTL_DDB: ::c_int = 9; | ||
300 | pub const CTL_VFS: ::c_int = 10; | ||
301 | pub const CTL_MAXID: ::c_int = 11; | ||
302 | pub const KERN_OSTYPE: ::c_int = 1; | ||
303 | pub const KERN_OSRELEASE: ::c_int = 2; | ||
304 | pub const KERN_OSREV: ::c_int = 3; | ||
305 | pub const KERN_VERSION: ::c_int = 4; | ||
306 | pub const KERN_MAXVNODES: ::c_int = 5; | ||
307 | pub const KERN_MAXPROC: ::c_int = 6; | ||
308 | pub const KERN_MAXFILES: ::c_int = 7; | ||
309 | pub const KERN_ARGMAX: ::c_int = 8; | ||
310 | pub const KERN_SECURELVL: ::c_int = 9; | ||
311 | pub const KERN_HOSTNAME: ::c_int = 10; | ||
312 | pub const KERN_HOSTID: ::c_int = 11; | ||
313 | pub const KERN_CLOCKRATE: ::c_int = 12; | ||
314 | pub const KERN_PROF: ::c_int = 16; | ||
315 | pub const KERN_POSIX1: ::c_int = 17; | ||
316 | pub const KERN_NGROUPS: ::c_int = 18; | ||
317 | pub const KERN_JOB_CONTROL: ::c_int = 19; | ||
318 | pub const KERN_SAVED_IDS: ::c_int = 20; | ||
319 | pub const KERN_BOOTTIME: ::c_int = 21; | ||
320 | pub const KERN_DOMAINNAME: ::c_int = 22; | ||
321 | pub const KERN_MAXPARTITIONS: ::c_int = 23; | ||
322 | pub const KERN_RAWPARTITION: ::c_int = 24; | ||
323 | pub const KERN_MAXTHREAD: ::c_int = 25; | ||
324 | pub const KERN_NTHREADS: ::c_int = 26; | ||
325 | pub const KERN_OSVERSION: ::c_int = 27; | ||
326 | pub const KERN_SOMAXCONN: ::c_int = 28; | ||
327 | pub const KERN_SOMINCONN: ::c_int = 29; | ||
328 | pub const KERN_USERMOUNT: ::c_int = 30; | ||
329 | pub const KERN_RND: ::c_int = 31; | ||
330 | pub const KERN_NOSUIDCOREDUMP: ::c_int = 32; | ||
331 | pub const KERN_FSYNC: ::c_int = 33; | ||
332 | pub const KERN_SYSVMSG: ::c_int = 34; | ||
333 | pub const KERN_SYSVSEM: ::c_int = 35; | ||
334 | pub const KERN_SYSVSHM: ::c_int = 36; | ||
335 | pub const KERN_ARND: ::c_int = 37; | ||
336 | pub const KERN_MSGBUFSIZE: ::c_int = 38; | ||
337 | pub const KERN_MALLOCSTATS: ::c_int = 39; | ||
338 | pub const KERN_CPTIME: ::c_int = 40; | ||
339 | pub const KERN_NCHSTATS: ::c_int = 41; | ||
340 | pub const KERN_FORKSTAT: ::c_int = 42; | ||
341 | pub const KERN_NSELCOLL: ::c_int = 43; | ||
342 | pub const KERN_TTY: ::c_int = 44; | ||
343 | pub const KERN_CCPU: ::c_int = 45; | ||
344 | pub const KERN_FSCALE: ::c_int = 46; | ||
345 | pub const KERN_NPROCS: ::c_int = 47; | ||
346 | pub const KERN_MSGBUF: ::c_int = 48; | ||
347 | pub const KERN_POOL: ::c_int = 49; | ||
348 | pub const KERN_STACKGAPRANDOM: ::c_int = 50; | ||
349 | pub const KERN_SYSVIPC_INFO: ::c_int = 51; | ||
350 | pub const KERN_SPLASSERT: ::c_int = 54; | ||
351 | pub const KERN_PROC_ARGS: ::c_int = 55; | ||
352 | pub const KERN_NFILES: ::c_int = 56; | ||
353 | pub const KERN_TTYCOUNT: ::c_int = 57; | ||
354 | pub const KERN_NUMVNODES: ::c_int = 58; | ||
355 | pub const KERN_MBSTAT: ::c_int = 59; | ||
356 | pub const KERN_SEMINFO: ::c_int = 61; | ||
357 | pub const KERN_SHMINFO: ::c_int = 62; | ||
358 | pub const KERN_INTRCNT: ::c_int = 63; | ||
359 | pub const KERN_WATCHDOG: ::c_int = 64; | ||
360 | pub const KERN_PROC: ::c_int = 66; | ||
361 | pub const KERN_MAXCLUSTERS: ::c_int = 67; | ||
362 | pub const KERN_EVCOUNT: ::c_int = 68; | ||
363 | pub const KERN_TIMECOUNTER: ::c_int = 69; | ||
364 | pub const KERN_MAXLOCKSPERUID: ::c_int = 70; | ||
365 | pub const KERN_CPTIME2: ::c_int = 71; | ||
366 | pub const KERN_CACHEPCT: ::c_int = 72; | ||
367 | pub const KERN_FILE: ::c_int = 73; | ||
368 | pub const KERN_CONSDEV: ::c_int = 75; | ||
369 | pub const KERN_NETLIVELOCKS: ::c_int = 76; | ||
370 | pub const KERN_POOL_DEBUG: ::c_int = 77; | ||
371 | pub const KERN_PROC_CWD: ::c_int = 78; | ||
372 | pub const KERN_PROC_NOBROADCASTKILL: ::c_int = 79; | ||
373 | pub const KERN_PROC_VMMAP: ::c_int = 80; | ||
374 | pub const KERN_GLOBAL_PTRACE: ::c_int = 81; | ||
375 | pub const KERN_CONSBUFSIZE: ::c_int = 82; | ||
376 | pub const KERN_CONSBUF: ::c_int = 83; | ||
377 | pub const KERN_MAXID: ::c_int = 84; | ||
378 | pub const KERN_PROC_ALL: ::c_int = 0; | ||
379 | pub const KERN_PROC_PID: ::c_int = 1; | ||
380 | pub const KERN_PROC_PGRP: ::c_int = 2; | ||
381 | pub const KERN_PROC_SESSION: ::c_int = 3; | ||
382 | pub const KERN_PROC_TTY: ::c_int = 4; | ||
383 | pub const KERN_PROC_UID: ::c_int = 5; | ||
384 | pub const KERN_PROC_RUID: ::c_int = 6; | ||
385 | pub const KERN_PROC_KTHREAD: ::c_int = 7; | ||
386 | pub const KERN_PROC_SHOW_THREADS: ::c_int = 0x40000000; | ||
387 | pub const KERN_SYSVIPC_MSG_INFO: ::c_int = 1; | ||
388 | pub const KERN_SYSVIPC_SEM_INFO: ::c_int = 2; | ||
389 | pub const KERN_SYSVIPC_SHM_INFO: ::c_int = 3; | ||
390 | pub const KERN_PROC_ARGV: ::c_int = 1; | ||
391 | pub const KERN_PROC_NARGV: ::c_int = 2; | ||
392 | pub const KERN_PROC_ENV: ::c_int = 3; | ||
393 | pub const KERN_PROC_NENV: ::c_int = 4; | ||
394 | pub const KI_NGROUPS: ::c_int = 16; | ||
395 | pub const KI_MAXCOMLEN: ::c_int = 24; | ||
396 | pub const KI_WMESGLEN: ::c_int = 8; | ||
397 | pub const KI_MAXLOGNAME: ::c_int = 32; | ||
398 | pub const KI_EMULNAMELEN: ::c_int = 8; | ||
399 | |||
400 | extern { | ||
401 | pub fn getnameinfo(sa: *const ::sockaddr, | ||
402 | salen: ::socklen_t, | ||
403 | host: *mut ::c_char, | ||
404 | hostlen: ::size_t, | ||
405 | serv: *mut ::c_char, | ||
406 | servlen: ::size_t, | ||
407 | flags: ::c_int) -> ::c_int; | ||
408 | pub fn mprotect(addr: *const ::c_void, len: ::size_t, prot: ::c_int) | ||
409 | -> ::c_int; | ||
410 | pub fn pthread_main_np() -> ::c_int; | ||
411 | pub fn pthread_set_name_np(tid: ::pthread_t, name: *const ::c_char); | ||
412 | pub fn pthread_stackseg_np(thread: ::pthread_t, | ||
413 | sinfo: *mut ::stack_t) -> ::c_int; | ||
414 | pub fn sysctl(name: *mut ::c_int, | ||
415 | namelen: ::c_uint, | ||
416 | oldp: *mut ::c_void, | ||
417 | oldlenp: *mut ::size_t, | ||
418 | newp: *mut ::c_void, | ||
419 | newlen: ::size_t) | ||
420 | -> ::c_int; | ||
421 | pub fn sysctlbyname(name: *const ::c_char, | ||
422 | oldp: *mut ::c_void, | ||
423 | oldlenp: *mut ::size_t, | ||
424 | newp: *mut ::c_void, | ||
425 | newlen: ::size_t) | ||
426 | -> ::c_int; | ||
427 | pub fn nl_langinfo_l(item: ::nl_item, locale: ::locale_t) -> *mut ::c_char; | ||
428 | pub fn duplocale(base: ::locale_t) -> ::locale_t; | ||
429 | pub fn freelocale(loc: ::locale_t) -> ::c_int; | ||
430 | pub fn newlocale(mask: ::c_int, | ||
431 | locale: *const ::c_char, | ||
432 | base: ::locale_t) -> ::locale_t; | ||
433 | pub fn uselocale(loc: ::locale_t) -> ::locale_t; | ||
434 | pub fn querylocale(mask: ::c_int, loc: ::locale_t) -> *const ::c_char; | ||
435 | } | ||