| 1 |
pub type c_char = i8; |
| 2 |
pub type caddr_t = *mut ::c_char; |
| 3 |
pub type clockid_t = ::c_longlong; |
| 4 |
pub type blkcnt_t = ::c_long; |
| 5 |
pub type clock_t = ::c_int; |
| 6 |
pub type daddr_t = ::c_long; |
| 7 |
pub type dev_t = ::c_ulong; |
| 8 |
pub type fpos64_t = ::c_longlong; |
| 9 |
pub type fsblkcnt_t = ::c_ulong; |
| 10 |
pub type fsfilcnt_t = ::c_ulong; |
| 11 |
pub type idtype_t = ::c_int; |
| 12 |
pub type ino_t = ::c_ulong; |
| 13 |
pub type key_t = ::c_int; |
| 14 |
pub type mode_t = ::c_uint; |
| 15 |
pub type nlink_t = ::c_short; |
| 16 |
pub type rlim_t = ::c_ulong; |
| 17 |
pub type speed_t = ::c_uint; |
| 18 |
pub type tcflag_t = ::c_uint; |
| 19 |
pub type time_t = ::c_long; |
| 20 |
pub type time64_t = ::int64_t; |
| 21 |
pub type timer_t = ::c_long; |
| 22 |
pub type wchar_t = ::c_uint; |
| 23 |
pub type nfds_t = ::c_int; |
| 24 |
pub type projid_t = ::c_int; |
| 25 |
pub type id_t = ::c_uint; |
| 26 |
pub type blksize64_t = ::c_ulonglong; |
| 27 |
pub type blkcnt64_t = ::c_ulonglong; |
| 28 |
pub type sctp_assoc_t = ::uint32_t; |
| 29 |
|
| 30 |
pub type suseconds_t = ::c_int; |
| 31 |
pub type useconds_t = ::c_uint; |
| 32 |
pub type off_t = ::c_long; |
| 33 |
pub type off64_t = ::c_longlong; |
| 34 |
|
| 35 |
pub type socklen_t = ::c_uint; |
| 36 |
pub type sa_family_t = ::c_uchar; |
| 37 |
pub type in_port_t = ::c_ushort; |
| 38 |
pub type in_addr_t = ::c_uint; |
| 39 |
|
| 40 |
pub type signal_t = ::c_int; |
| 41 |
pub type pthread_t = ::c_uint; |
| 42 |
pub type pthread_key_t = ::c_uint; |
| 43 |
pub type thread_t = pthread_t; |
| 44 |
pub type blksize_t = ::c_long; |
| 45 |
pub type nl_item = ::c_int; |
| 46 |
pub type mqd_t = ::c_int; |
| 47 |
pub type shmatt_t = ::c_ulong; |
| 48 |
pub type regoff_t = ::c_long; |
| 49 |
pub type rlim64_t = ::c_ulonglong; |
| 50 |
|
| 51 |
pub type sem_t = ::c_int; |
| 52 |
pub type pollset_t = ::c_int; |
| 53 |
|
| 54 |
pub type pthread_rwlockattr_t = *mut ::c_void; |
| 55 |
pub type pthread_condattr_t = *mut ::c_void; |
| 56 |
pub type pthread_mutexattr_t = *mut ::c_void; |
| 57 |
pub type pthread_attr_t = *mut ::c_void; |
| 58 |
pub type pthread_barrierattr_t = *mut ::c_void; |
| 59 |
pub type posix_spawn_file_actions_t = *mut ::c_char; |
| 60 |
pub type iconv_t = *mut ::c_void; |
| 61 |
|
| 62 |
e! { |
| 63 |
pub enum uio_rw { |
| 64 |
UIO_READ = 0, |
| 65 |
UIO_WRITE, |
| 66 |
UIO_READ_NO_MOVE, |
| 67 |
UIO_WRITE_NO_MOVE, |
| 68 |
UIO_PWRITE, |
| 69 |
} |
| 70 |
} |
| 71 |
|
| 72 |
s! { |
| 73 |
pub struct fsid_t { |
| 74 |
pub val: [::c_uint; 2], |
| 75 |
} |
| 76 |
|
| 77 |
pub struct fsid64_t { |
| 78 |
pub val: [::uint64_t; 2], |
| 79 |
} |
| 80 |
|
| 81 |
pub struct timezone { |
| 82 |
pub tz_minuteswest: ::c_int, |
| 83 |
pub tz_dsttime: ::c_int, |
| 84 |
} |
| 85 |
|
| 86 |
pub struct ip_mreq { |
| 87 |
pub imr_multiaddr: in_addr, |
| 88 |
pub imr_interface: in_addr, |
| 89 |
} |
| 90 |
|
| 91 |
pub struct dirent { |
| 92 |
pub d_offset: ::c_ulong, |
| 93 |
pub d_ino: ::ino_t, |
| 94 |
pub d_reclen: ::c_ushort, |
| 95 |
pub d_namlen: ::c_ushort, |
| 96 |
pub d_name: [::c_char; 256] |
| 97 |
} |
| 98 |
|
| 99 |
pub struct termios { |
| 100 |
pub c_iflag: ::tcflag_t, |
| 101 |
pub c_oflag: ::tcflag_t, |
| 102 |
pub c_cflag: ::tcflag_t, |
| 103 |
pub c_lflag: ::tcflag_t, |
| 104 |
pub c_cc: [::cc_t; ::NCCS] |
| 105 |
} |
| 106 |
|
| 107 |
pub struct flock64 { |
| 108 |
pub l_type: ::c_short, |
| 109 |
pub l_whence: ::c_short, |
| 110 |
pub l_sysid: ::c_uint, |
| 111 |
pub l_pid: ::pid_t, |
| 112 |
pub l_vfs: ::c_int, |
| 113 |
pub l_start: ::off64_t, |
| 114 |
pub l_len: ::off64_t, |
| 115 |
} |
| 116 |
|
| 117 |
pub struct msghdr { |
| 118 |
pub msg_name: *mut ::c_void, |
| 119 |
pub msg_namelen: ::socklen_t, |
| 120 |
pub msg_iov: *mut ::iovec, |
| 121 |
pub msg_iovlen: ::c_int, |
| 122 |
pub msg_control: *mut ::c_void, |
| 123 |
pub msg_controllen: socklen_t, |
| 124 |
pub msg_flags: ::c_int, |
| 125 |
} |
| 126 |
|
| 127 |
pub struct statvfs64 { |
| 128 |
pub f_bsize: ::blksize64_t, |
| 129 |
pub f_frsize: ::blksize64_t, |
| 130 |
pub f_blocks: ::blkcnt64_t, |
| 131 |
pub f_bfree: ::blkcnt64_t, |
| 132 |
pub f_bavail: ::blkcnt64_t, |
| 133 |
pub f_files: ::blkcnt64_t, |
| 134 |
pub f_ffree: ::blkcnt64_t, |
| 135 |
pub f_favail: ::blkcnt64_t, |
| 136 |
pub f_fsid: fsid64_t, |
| 137 |
pub f_basetype: [::c_char; 16], |
| 138 |
pub f_flag: ::c_ulong, |
| 139 |
pub f_namemax: ::c_ulong, |
| 140 |
pub f_fstr: [::c_char; 32], |
| 141 |
pub f_filler: [::c_ulong; 16] |
| 142 |
} |
| 143 |
|
| 144 |
pub struct lconv { |
| 145 |
pub decimal_point: *mut ::c_char, |
| 146 |
pub thousands_sep: *mut ::c_char, |
| 147 |
pub grouping: *mut ::c_char, |
| 148 |
pub int_curr_symbol: *mut ::c_char, |
| 149 |
pub currency_symbol: *mut ::c_char, |
| 150 |
pub mon_decimal_point: *mut ::c_char, |
| 151 |
pub mon_thousands_sep: *mut ::c_char, |
| 152 |
pub mon_grouping: *mut ::c_char, |
| 153 |
pub positive_sign: *mut ::c_char, |
| 154 |
pub negative_sign: *mut ::c_char, |
| 155 |
pub int_frac_digits: ::c_char, |
| 156 |
pub frac_digits: ::c_char, |
| 157 |
pub p_cs_precedes: ::c_char, |
| 158 |
pub p_sep_by_space: ::c_char, |
| 159 |
pub n_cs_precedes: ::c_char, |
| 160 |
pub n_sep_by_space: ::c_char, |
| 161 |
pub p_sign_posn: ::c_char, |
| 162 |
pub n_sign_posn: ::c_char, |
| 163 |
pub left_parenthesis: *mut ::c_char, |
| 164 |
pub right_parenthesis: *mut ::c_char, |
| 165 |
pub int_p_cs_precedes: ::c_char, |
| 166 |
pub int_p_sep_by_space: ::c_char, |
| 167 |
pub int_n_cs_precedes: ::c_char, |
| 168 |
pub int_n_sep_by_space: ::c_char, |
| 169 |
pub int_p_sign_posn: ::c_char, |
| 170 |
pub int_n_sign_posn: ::c_char, |
| 171 |
} |
| 172 |
|
| 173 |
pub struct tm { |
| 174 |
pub tm_sec: ::c_int, |
| 175 |
pub tm_min: ::c_int, |
| 176 |
pub tm_hour: ::c_int, |
| 177 |
pub tm_mday: ::c_int, |
| 178 |
pub tm_mon: ::c_int, |
| 179 |
pub tm_year: ::c_int, |
| 180 |
pub tm_wday: ::c_int, |
| 181 |
pub tm_yday: ::c_int, |
| 182 |
pub tm_isdst: ::c_int |
| 183 |
} |
| 184 |
|
| 185 |
pub struct addrinfo { |
| 186 |
pub ai_flags: ::c_int, |
| 187 |
pub ai_family: ::c_int, |
| 188 |
pub ai_socktype: ::c_int, |
| 189 |
pub ai_protocol: ::c_int, |
| 190 |
pub ai_addrlen: ::c_ulong, |
| 191 |
pub ai_canonname: *mut ::c_char, |
| 192 |
pub ai_addr: *mut ::sockaddr, |
| 193 |
pub ai_next: *mut addrinfo, |
| 194 |
pub ai_eflags: ::c_int, |
| 195 |
} |
| 196 |
|
| 197 |
pub struct in_addr { |
| 198 |
pub s_addr: in_addr_t |
| 199 |
} |
| 200 |
|
| 201 |
pub struct ip_mreq_source { |
| 202 |
pub imr_multiaddr: in_addr, |
| 203 |
pub imr_sourceaddr: in_addr, |
| 204 |
pub imr_interface: in_addr, |
| 205 |
} |
| 206 |
|
| 207 |
pub struct sockaddr { |
| 208 |
pub sa_len: ::c_uchar, |
| 209 |
pub sa_family: sa_family_t, |
| 210 |
pub sa_data: [::c_char; 14], |
| 211 |
} |
| 212 |
|
| 213 |
pub struct sockaddr_dl { |
| 214 |
pub sdl_len: ::c_uchar, |
| 215 |
pub sdl_family: ::c_uchar, |
| 216 |
pub sdl_index: ::c_ushort, |
| 217 |
pub sdl_type: ::c_uchar, |
| 218 |
pub sdl_nlen: ::c_uchar, |
| 219 |
pub sdl_alen: ::c_uchar, |
| 220 |
pub sdl_slen: ::c_uchar, |
| 221 |
pub sdl_data: [::c_char; 120], |
| 222 |
} |
| 223 |
|
| 224 |
pub struct sockaddr_in { |
| 225 |
pub sin_len: ::c_uchar, |
| 226 |
pub sin_family: sa_family_t, |
| 227 |
pub sin_port: in_port_t, |
| 228 |
pub sin_addr: in_addr, |
| 229 |
pub sin_zero: [::c_char; 8] |
| 230 |
} |
| 231 |
|
| 232 |
pub struct sockaddr_in6 { |
| 233 |
pub sin6_len: ::c_uchar, |
| 234 |
pub sin6_family: ::c_uchar, |
| 235 |
pub sin6_port: ::uint16_t, |
| 236 |
pub sin6_flowinfo: ::uint32_t, |
| 237 |
pub sin6_addr: ::in6_addr, |
| 238 |
pub sin6_scope_id: ::uint32_t |
| 239 |
} |
| 240 |
|
| 241 |
pub struct sockaddr_storage { |
| 242 |
pub __ss_len: ::c_uchar, |
| 243 |
pub ss_family: sa_family_t, |
| 244 |
__ss_pad1: [::c_char; 6], |
| 245 |
__ss_align: ::int64_t, |
| 246 |
__ss_pad2: [::c_char; 1265], |
| 247 |
} |
| 248 |
|
| 249 |
pub struct sockaddr_un { |
| 250 |
pub sun_len: ::c_uchar, |
| 251 |
pub sun_family: sa_family_t, |
| 252 |
pub sun_path: [::c_char; 1023] |
| 253 |
} |
| 254 |
|
| 255 |
pub struct st_timespec { |
| 256 |
pub tv_sec: ::time_t, |
| 257 |
pub tv_nsec: ::c_int, |
| 258 |
} |
| 259 |
|
| 260 |
pub struct statfs64 { |
| 261 |
pub f_version: ::c_int, |
| 262 |
pub f_type: ::c_int, |
| 263 |
pub f_bsize: blksize64_t, |
| 264 |
pub f_blocks: blkcnt64_t, |
| 265 |
pub f_bfree: blkcnt64_t, |
| 266 |
pub f_bavail: blkcnt64_t, |
| 267 |
pub f_files: ::uint64_t, |
| 268 |
pub f_ffree: ::uint64_t, |
| 269 |
pub f_fsid: fsid64_t, |
| 270 |
pub f_vfstype: ::c_int, |
| 271 |
pub f_fsize: blksize64_t, |
| 272 |
pub f_vfsnumber: ::c_int, |
| 273 |
pub f_vfsoff: ::c_int, |
| 274 |
pub f_vfslen: ::c_int, |
| 275 |
pub f_vfsvers: ::c_int, |
| 276 |
pub f_fname: [::c_char; 32], |
| 277 |
pub f_fpack: [::c_char; 32], |
| 278 |
pub f_name_max: ::c_int, |
| 279 |
} |
| 280 |
|
| 281 |
pub struct passwd { |
| 282 |
pub pw_name: *mut ::c_char, |
| 283 |
pub pw_passwd: *mut ::c_char, |
| 284 |
pub pw_uid: ::uid_t, |
| 285 |
pub pw_gid: ::gid_t, |
| 286 |
pub pw_gecos: *mut ::c_char, |
| 287 |
pub pw_dir: *mut ::c_char, |
| 288 |
pub pw_shell: *mut ::c_char |
| 289 |
} |
| 290 |
|
| 291 |
pub struct utsname { |
| 292 |
pub sysname: [::c_char; 32], |
| 293 |
pub nodename: [::c_char; 32], |
| 294 |
pub release: [::c_char; 32], |
| 295 |
pub version: [::c_char; 32], |
| 296 |
pub machine: [::c_char; 32], |
| 297 |
} |
| 298 |
|
| 299 |
pub struct xutsname { |
| 300 |
pub nid: ::c_uint, |
| 301 |
pub reserved: ::c_int, |
| 302 |
pub longnid: ::c_ulonglong, |
| 303 |
} |
| 304 |
|
| 305 |
pub struct cmsghdr { |
| 306 |
pub cmsg_len: ::socklen_t, |
| 307 |
pub cmsg_level: ::c_int, |
| 308 |
pub cmsg_type: ::c_int, |
| 309 |
} |
| 310 |
|
| 311 |
pub struct sigevent { |
| 312 |
pub sigev_value: ::sigval, |
| 313 |
pub sigev_signo: ::c_int, |
| 314 |
pub sigev_notify: ::c_int, |
| 315 |
pub sigev_notify_function: extern fn(val: ::sigval), |
| 316 |
pub sigev_notify_attributes: *mut pthread_attr_t, |
| 317 |
} |
| 318 |
|
| 319 |
// Should be union with another 'sival_int' |
| 320 |
pub struct sigval64 { |
| 321 |
pub sival_ptr: ::c_ulonglong, |
| 322 |
} |
| 323 |
|
| 324 |
pub struct sigevent64 { |
| 325 |
pub sigev_value: sigval64, |
| 326 |
pub sigev_signo: ::c_int, |
| 327 |
pub sigev_notify: ::c_int, |
| 328 |
pub sigev_notify_function: ::c_ulonglong, |
| 329 |
pub sigev_notify_attributes: ::c_ulonglong, |
| 330 |
} |
| 331 |
|
| 332 |
pub struct osigevent { |
| 333 |
pub sevt_value: *mut ::c_void, |
| 334 |
pub sevt_signo: signal_t, |
| 335 |
} |
| 336 |
|
| 337 |
pub struct poll_ctl { |
| 338 |
pub cmd: ::c_short, |
| 339 |
pub events: ::c_short, |
| 340 |
pub fd: ::c_int, |
| 341 |
} |
| 342 |
|
| 343 |
pub struct sf_parms { |
| 344 |
pub header_data: *mut ::c_void, |
| 345 |
pub header_length: ::c_uint, |
| 346 |
pub file_descriptor: ::c_int, |
| 347 |
pub file_size: ::uint64_t, |
| 348 |
pub file_offset: ::uint64_t, |
| 349 |
pub file_bytes: ::int64_t, |
| 350 |
pub trailer_data: *mut ::c_void, |
| 351 |
pub trailer_length: ::c_uint, |
| 352 |
pub bytes_sent: ::uint64_t, |
| 353 |
} |
| 354 |
|
| 355 |
pub struct mmsghdr { |
| 356 |
pub msg_hdr: ::msghdr, |
| 357 |
pub msg_len: ::c_uint, |
| 358 |
} |
| 359 |
|
| 360 |
pub struct sched_param { |
| 361 |
pub sched_priority: ::c_int, |
| 362 |
pub sched_policy: ::c_int, |
| 363 |
pub sched_reserved: [::c_int; 6], |
| 364 |
} |
| 365 |
|
| 366 |
pub struct stack_t { |
| 367 |
pub ss_sp: *mut ::c_void, |
| 368 |
pub ss_size: ::size_t, |
| 369 |
pub ss_flags: ::c_int, |
| 370 |
pub __pad: [::c_int; 4], |
| 371 |
} |
| 372 |
|
| 373 |
pub struct posix_spawnattr_t { |
| 374 |
pub posix_attr_flags: ::c_short, |
| 375 |
pub posix_attr_pgroup: ::pid_t, |
| 376 |
pub posix_attr_sigmask: ::sigset_t, |
| 377 |
pub posix_attr_sigdefault: ::sigset_t, |
| 378 |
pub posix_attr_schedpolicy: ::c_int, |
| 379 |
pub posix_attr_schedparam: sched_param, |
| 380 |
} |
| 381 |
|
| 382 |
pub struct glob_t { |
| 383 |
pub gl_pathc: ::size_t, |
| 384 |
pub gl_pathv: *mut *mut c_char, |
| 385 |
pub gl_offs: ::size_t, |
| 386 |
pub gl_padr: *mut ::c_void, |
| 387 |
pub gl_ptx: *mut ::c_void, |
| 388 |
} |
| 389 |
|
| 390 |
pub struct mallinfo { |
| 391 |
pub arena: ::c_ulong, |
| 392 |
pub ordblks: ::c_int, |
| 393 |
pub smblks: ::c_int, |
| 394 |
pub hblks: ::c_int, |
| 395 |
pub hblkhd: ::c_int, |
| 396 |
pub usmblks: ::c_ulong, |
| 397 |
pub fsmblks: ::c_ulong, |
| 398 |
pub uordblks: ::c_ulong, |
| 399 |
pub fordblks: ::c_ulong, |
| 400 |
pub keepcost: ::c_int, |
| 401 |
} |
| 402 |
|
| 403 |
pub struct utmp_exit_status { |
| 404 |
pub e_termination: ::c_short, |
| 405 |
pub e_exit: ::c_short, |
| 406 |
} |
| 407 |
|
| 408 |
pub struct utmp { |
| 409 |
pub ut_user: [::c_char; 256], |
| 410 |
pub ut_id: [::c_char; 14], |
| 411 |
pub ut_line: [::c_char; 64], |
| 412 |
pub ut_pid: ::pid_t, |
| 413 |
pub ut_type: ::c_short, |
| 414 |
pub ut_time: time64_t, |
| 415 |
pub ut_exit: utmp_exit_status, |
| 416 |
pub ut_host: [::c_char; 256], |
| 417 |
pub __dbl_word_pad: ::c_int, |
| 418 |
pub __reservedA: [::c_int; 2], |
| 419 |
pub __reservedV: [::c_int; 6], |
| 420 |
} |
| 421 |
|
| 422 |
pub struct regmatch_t { |
| 423 |
pub rm_so: regoff_t, |
| 424 |
pub rm_eo: regoff_t, |
| 425 |
} |
| 426 |
|
| 427 |
pub struct regex_t { |
| 428 |
pub re_nsub: ::size_t, |
| 429 |
pub re_comp: *mut ::c_void, |
| 430 |
pub re_cflags: ::c_int, |
| 431 |
pub re_erroff: ::size_t, |
| 432 |
pub re_len: ::size_t, |
| 433 |
pub re_ucoll: [::wchar_t; 2], |
| 434 |
pub re_lsub: [*mut ::c_void; 24], |
| 435 |
pub re_esub: [*mut ::c_void; 24], |
| 436 |
pub re_map: *mut ::c_uchar, |
| 437 |
pub __maxsub: ::c_int, |
| 438 |
pub __unused: [*mut ::c_void; 34], |
| 439 |
} |
| 440 |
|
| 441 |
pub struct rlimit64 { |
| 442 |
pub rlim_cur: rlim64_t, |
| 443 |
pub rlim_max: rlim64_t, |
| 444 |
} |
| 445 |
|
| 446 |
pub struct shmid_ds { |
| 447 |
pub shm_perm: ipc_perm, |
| 448 |
pub shm_segsz: ::size_t, |
| 449 |
pub shm_lpid: ::pid_t, |
| 450 |
pub shm_cpid: ::pid_t, |
| 451 |
pub shm_nattch: shmatt_t, |
| 452 |
pub shm_cnattch: shmatt_t, |
| 453 |
pub shm_atime: time_t, |
| 454 |
pub shm_dtime: time_t, |
| 455 |
pub shm_ctime: time_t, |
| 456 |
pub shm_handle: ::uint32_t, |
| 457 |
pub shm_extshm: ::c_int, |
| 458 |
pub shm_pagesize: ::int64_t, |
| 459 |
pub shm_lba: ::uint64_t, |
| 460 |
pub shm_reserved: ::int64_t, |
| 461 |
pub shm_reserved1: ::int64_t, |
| 462 |
} |
| 463 |
|
| 464 |
pub struct stat64 { |
| 465 |
pub st_dev: dev_t, |
| 466 |
pub st_ino: ino_t, |
| 467 |
pub st_mode: mode_t, |
| 468 |
pub st_nlink: nlink_t, |
| 469 |
pub st_flag: ::c_ushort, |
| 470 |
pub st_uid: ::uid_t, |
| 471 |
pub st_gid: ::gid_t, |
| 472 |
pub st_rdev: dev_t, |
| 473 |
pub st_ssize: ::c_int, |
| 474 |
pub st_atim: st_timespec, |
| 475 |
pub st_mtim: st_timespec, |
| 476 |
pub st_ctim: st_timespec, |
| 477 |
pub st_blksize: blksize_t, |
| 478 |
pub st_blocks: blkcnt_t, |
| 479 |
pub st_vfstype: ::c_int, |
| 480 |
pub st_vfs: ::c_uint, |
| 481 |
pub st_type: ::c_uint, |
| 482 |
pub st_gen: ::c_uint, |
| 483 |
pub st_reserved: [::c_uint; 10], |
| 484 |
pub st_size: off64_t, |
| 485 |
} |
| 486 |
|
| 487 |
pub struct mntent { |
| 488 |
pub mnt_fsname: *mut ::c_char, |
| 489 |
pub mnt_dir: *mut ::c_char, |
| 490 |
pub mnt_type: *mut ::c_char, |
| 491 |
pub mnt_opts: *mut ::c_char, |
| 492 |
pub mnt_freq: ::c_int, |
| 493 |
pub mnt_passno: ::c_int, |
| 494 |
} |
| 495 |
|
| 496 |
pub struct ipc_perm { |
| 497 |
pub uid: ::uid_t, |
| 498 |
pub gid: ::gid_t, |
| 499 |
pub cuid: ::uid_t, |
| 500 |
pub cgid: ::gid_t, |
| 501 |
pub mode: mode_t, |
| 502 |
pub seq: ::c_ushort, |
| 503 |
pub __reserved: ::c_ushort, |
| 504 |
pub key: key_t, |
| 505 |
} |
| 506 |
|
| 507 |
pub struct entry { |
| 508 |
pub key: *mut ::c_char, |
| 509 |
pub data: *mut ::c_void, |
| 510 |
} |
| 511 |
|
| 512 |
pub struct mq_attr { |
| 513 |
pub mq_flags: ::c_long, |
| 514 |
pub mq_maxmsg: ::c_long, |
| 515 |
pub mq_msgsize: ::c_long, |
| 516 |
pub mq_curmsgs: ::c_long, |
| 517 |
} |
| 518 |
|
| 519 |
pub struct sembuf { |
| 520 |
pub sem_num: ::c_ushort, |
| 521 |
pub sem_op: ::c_short, |
| 522 |
pub sem_flg: ::c_short, |
| 523 |
} |
| 524 |
|
| 525 |
pub struct if_nameindex { |
| 526 |
pub if_index: ::c_uint, |
| 527 |
pub if_name: *mut ::c_char, |
| 528 |
} |
| 529 |
|
| 530 |
pub struct itimerspec { |
| 531 |
pub it_interval: ::timespec, |
| 532 |
pub it_value: ::timespec, |
| 533 |
} |
| 534 |
} |
| 535 |
|
| 536 |
s_no_extra_traits! { |
| 537 |
#[cfg(libc_union)] |
| 538 |
pub union __sigaction_sa_union { |
| 539 |
pub __su_handler: extern fn(c: ::c_int), |
| 540 |
pub __su_sigaction: extern fn(c: ::c_int, info: *mut siginfo_t, ptr: *mut ::c_void), |
| 541 |
} |
| 542 |
|
| 543 |
pub struct sigaction { |
| 544 |
#[cfg(libc_union)] |
| 545 |
pub sa_union: __sigaction_sa_union, |
| 546 |
pub sa_mask: sigset_t, |
| 547 |
pub sa_flags: ::c_int, |
| 548 |
} |
| 549 |
|
| 550 |
#[cfg(libc_union)] |
| 551 |
pub union __poll_ctl_ext_u { |
| 552 |
pub addr: *mut ::c_void, |
| 553 |
pub data32: u32, |
| 554 |
pub data: u64, |
| 555 |
} |
| 556 |
|
| 557 |
pub struct poll_ctl_ext { |
| 558 |
pub version: u8, |
| 559 |
pub command: u8, |
| 560 |
pub events: ::c_short, |
| 561 |
pub fd: ::c_int, |
| 562 |
#[cfg(libc_union)] |
| 563 |
pub u: __poll_ctl_ext_u, |
| 564 |
pub reversed64: [u64; 6], |
| 565 |
} |
| 566 |
} |
| 567 |
|
| 568 |
cfg_if! { |
| 569 |
if #[cfg(feature = "extra_traits")] { |
| 570 |
#[cfg(libc_union)] |
| 571 |
impl PartialEq for __sigaction_sa_union { |
| 572 |
fn eq(&self, other: &__sigaction_sa_union) -> bool { |
| 573 |
unsafe { |
| 574 |
self.__su_handler == other.__su_handler |
| 575 |
&& self.__su_sigaction == other.__su_sigaction |
| 576 |
} |
| 577 |
} |
| 578 |
} |
| 579 |
#[cfg(libc_union)] |
| 580 |
impl Eq for __sigaction_sa_union {} |
| 581 |
#[cfg(libc_union)] |
| 582 |
impl ::fmt::Debug for __sigaction_sa_union { |
| 583 |
fn fmt(&self, f: &mut ::fmt::Formatter) -> ::fmt::Result { |
| 584 |
f.debug_struct("__sigaction_sa_union") |
| 585 |
.field("__su_handler", unsafe { &self.__su_handler }) |
| 586 |
.field("__su_sigaction", unsafe { &self.__su_sigaction }) |
| 587 |
.finish() |
| 588 |
} |
| 589 |
} |
| 590 |
#[cfg(libc_union)] |
| 591 |
impl ::hash::Hash for __sigaction_sa_union { |
| 592 |
fn hash<H: ::hash::Hasher>(&self, state: &mut H) { |
| 593 |
unsafe { |
| 594 |
self.__su_handler.hash(state); |
| 595 |
self.__su_sigaction.hash(state); |
| 596 |
} |
| 597 |
} |
| 598 |
} |
| 599 |
|
| 600 |
impl PartialEq for sigaction { |
| 601 |
fn eq(&self, other: &sigaction) -> bool { |
| 602 |
#[cfg(libc_union)] |
| 603 |
let union_eq = self.sa_union == other.sa_union; |
| 604 |
#[cfg(not(libc_union))] |
| 605 |
let union_eq = true; |
| 606 |
self.sa_mask == other.sa_mask |
| 607 |
&& self.sa_flags == other.sa_flags |
| 608 |
&& union_eq |
| 609 |
} |
| 610 |
} |
| 611 |
impl Eq for sigaction {} |
| 612 |
impl ::fmt::Debug for sigaction { |
| 613 |
fn fmt(&self, f: &mut ::fmt::Formatter) -> ::fmt::Result { |
| 614 |
let mut struct_formatter = f.debug_struct("sigaction"); |
| 615 |
#[cfg(libc_union)] |
| 616 |
struct_formatter.field("sa_union", &self.sa_union); |
| 617 |
struct_formatter.field("sa_mask", &self.sa_mask); |
| 618 |
struct_formatter.field("sa_flags", &self.sa_flags); |
| 619 |
struct_formatter.finish() |
| 620 |
} |
| 621 |
} |
| 622 |
impl ::hash::Hash for sigaction { |
| 623 |
fn hash<H: ::hash::Hasher>(&self, state: &mut H) { |
| 624 |
#[cfg(libc_union)] |
| 625 |
self.sa_union.hash(state); |
| 626 |
self.sa_mask.hash(state); |
| 627 |
self.sa_flags.hash(state); |
| 628 |
} |
| 629 |
} |
| 630 |
|
| 631 |
#[cfg(libc_union)] |
| 632 |
impl PartialEq for __poll_ctl_ext_u { |
| 633 |
fn eq(&self, other: &__poll_ctl_ext_u) -> bool { |
| 634 |
unsafe { |
| 635 |
self.addr == other.addr |
| 636 |
&& self.data32 == other.data32 |
| 637 |
&& self.data == other.data |
| 638 |
} |
| 639 |
} |
| 640 |
} |
| 641 |
#[cfg(libc_union)] |
| 642 |
impl Eq for __poll_ctl_ext_u {} |
| 643 |
#[cfg(libc_union)] |
| 644 |
impl ::fmt::Debug for __poll_ctl_ext_u { |
| 645 |
fn fmt(&self, f: &mut ::fmt::Formatter) -> ::fmt::Result { |
| 646 |
f.debug_struct("__poll_ctl_ext_u") |
| 647 |
.field("addr", unsafe { &self.addr }) |
| 648 |
.field("data32", unsafe { &self.data32 }) |
| 649 |
.field("data", unsafe { &self.data }) |
| 650 |
.finish() |
| 651 |
} |
| 652 |
} |
| 653 |
#[cfg(libc_union)] |
| 654 |
impl ::hash::Hash for __poll_ctl_ext_u { |
| 655 |
fn hash<H: ::hash::Hasher>(&self, state: &mut H) { |
| 656 |
unsafe { |
| 657 |
self.addr.hash(state); |
| 658 |
self.data32.hash(state); |
| 659 |
self.data.hash(state); |
| 660 |
} |
| 661 |
} |
| 662 |
} |
| 663 |
|
| 664 |
impl PartialEq for poll_ctl_ext { |
| 665 |
fn eq(&self, other: &poll_ctl_ext) -> bool { |
| 666 |
#[cfg(libc_union)] |
| 667 |
let union_eq = self.u == other.u; |
| 668 |
#[cfg(not(libc_union))] |
| 669 |
let union_eq = true; |
| 670 |
self.version == other.version |
| 671 |
&& self.command == other.command |
| 672 |
&& self.events == other.events |
| 673 |
&& self.fd == other.fd |
| 674 |
&& self.reversed64 == other.reversed64 |
| 675 |
&& union_eq |
| 676 |
} |
| 677 |
} |
| 678 |
impl Eq for poll_ctl_ext {} |
| 679 |
impl ::fmt::Debug for poll_ctl_ext { |
| 680 |
fn fmt(&self, f: &mut ::fmt::Formatter) -> ::fmt::Result { |
| 681 |
let mut struct_formatter = f.debug_struct("poll_ctl_ext"); |
| 682 |
struct_formatter.field("version", &self.version); |
| 683 |
struct_formatter.field("command", &self.command); |
| 684 |
struct_formatter.field("events", &self.events); |
| 685 |
struct_formatter.field("fd", &self.fd); |
| 686 |
#[cfg(libc_union)] |
| 687 |
struct_formatter.field("u", &self.u); |
| 688 |
struct_formatter.field("reversed64", &self.reversed64); |
| 689 |
struct_formatter.finish() |
| 690 |
} |
| 691 |
} |
| 692 |
impl ::hash::Hash for poll_ctl_ext { |
| 693 |
fn hash<H: ::hash::Hasher>(&self, state: &mut H) { |
| 694 |
self.version.hash(state); |
| 695 |
self.command.hash(state); |
| 696 |
self.events.hash(state); |
| 697 |
self.fd.hash(state); |
| 698 |
#[cfg(libc_union)] |
| 699 |
self.u.hash(state); |
| 700 |
self.reversed64.hash(state); |
| 701 |
} |
| 702 |
} |
| 703 |
} |
| 704 |
} |
| 705 |
|
| 706 |
// dlfcn.h |
| 707 |
pub const RTLD_LAZY: ::c_int = 0x4; |
| 708 |
pub const RTLD_NOW: ::c_int = 0x2; |
| 709 |
pub const RTLD_GLOBAL: ::c_int = 0x10000; |
| 710 |
pub const RTLD_LOCAL: ::c_int = 0x80000; |
| 711 |
pub const RTLD_DEFAULT: *mut ::c_void = -1isize as *mut ::c_void; |
| 712 |
pub const RTLD_MYSELF: *mut ::c_void = -2isize as *mut ::c_void; |
| 713 |
pub const RTLD_NEXT: *mut ::c_void = -3isize as *mut ::c_void; |
| 714 |
|
| 715 |
// fcntl.h |
| 716 |
pub const O_RDONLY: ::c_int = 0x0; |
| 717 |
pub const O_WRONLY: ::c_int = 0x1; |
| 718 |
pub const O_RDWR: ::c_int = 0x2; |
| 719 |
pub const O_NDELAY: ::c_int = 0x8000; |
| 720 |
pub const O_APPEND: ::c_int = 0x8; |
| 721 |
pub const O_DSYNC: ::c_int = 0x400000; |
| 722 |
pub const O_CREAT: ::c_int = 0x100; |
| 723 |
pub const O_EXCL: ::c_int = 0x400; |
| 724 |
pub const O_NOCTTY: ::c_int = 0x800; |
| 725 |
pub const O_TRUNC: ::c_int = 0x200; |
| 726 |
pub const O_NOFOLLOW: ::c_int = 0x1000000; |
| 727 |
pub const O_DIRECTORY: ::c_int = 0x80000; |
| 728 |
pub const O_SEARCH: ::c_int = 0x20; |
| 729 |
pub const O_EXEC: ::c_int = 0x20; |
| 730 |
pub const O_CLOEXEC: ::c_int = 0x800000; |
| 731 |
pub const O_ACCMODE: ::c_int = O_RDONLY | O_WRONLY | O_RDWR; |
| 732 |
pub const O_DIRECT: ::c_int = 0x8000000; |
| 733 |
pub const O_TTY_INIT: ::c_int = 0; |
| 734 |
pub const O_RSYNC: ::c_int = 0x200000; |
| 735 |
pub const O_LARGEFILE: ::c_int = 0x4000000; |
| 736 |
pub const F_CLOSEM: ::c_int = 10; |
| 737 |
pub const F_DUPFD_CLOEXEC: ::c_int = 16; |
| 738 |
pub const F_GETLK64: ::c_int = 11; |
| 739 |
pub const F_SETLK64: ::c_int = 12; |
| 740 |
pub const F_SETLKW64: ::c_int = 13; |
| 741 |
pub const F_DUP2FD: ::c_int = 14; |
| 742 |
pub const F_TSTLK: ::c_int = 15; |
| 743 |
pub const F_GETLK: ::c_int = F_GETLK64; |
| 744 |
pub const F_SETLK: ::c_int = F_SETLK64; |
| 745 |
pub const F_SETLKW: ::c_int = F_SETLKW64; |
| 746 |
pub const F_GETOWN: ::c_int = 8; |
| 747 |
pub const F_SETOWN: ::c_int = 9; |
| 748 |
pub const AT_FDCWD: ::c_int = -2; |
| 749 |
pub const AT_SYMLINK_NOFOLLOW: ::c_int = 1; |
| 750 |
pub const AT_SYMLINK_FOLLOW: ::c_int = 2; |
| 751 |
pub const AT_REMOVEDIR: ::c_int = 1; |
| 752 |
pub const AT_EACCESS: ::c_int = 1; |
| 753 |
pub const F_DUPFD: ::c_int = 0; |
| 754 |
pub const F_GETFD: ::c_int = 1; |
| 755 |
pub const F_SETFD: ::c_int = 2; |
| 756 |
pub const F_GETFL: ::c_int = 3; |
| 757 |
pub const F_SETFL: ::c_int = 4; |
| 758 |
pub const O_SYNC: ::c_int = 16; |
| 759 |
pub const O_NONBLOCK: ::c_int = 4; |
| 760 |
pub const FASYNC: ::c_int = 0x20000; |
| 761 |
pub const POSIX_FADV_NORMAL: ::c_int = 1; |
| 762 |
pub const POSIX_FADV_SEQUENTIAL: ::c_int = 2; |
| 763 |
pub const POSIX_FADV_RANDOM: ::c_int = 3; |
| 764 |
pub const POSIX_FADV_WILLNEED: ::c_int = 4; |
| 765 |
pub const POSIX_FADV_DONTNEED: ::c_int = 5; |
| 766 |
pub const POSIX_FADV_NOREUSE: ::c_int = 6; |
| 767 |
|
| 768 |
// glob.h |
| 769 |
pub const GLOB_APPEND: ::c_int = 0x1; |
| 770 |
pub const GLOB_DOOFFS: ::c_int = 0x2; |
| 771 |
pub const GLOB_ERR: ::c_int = 0x4; |
| 772 |
pub const GLOB_MARK: ::c_int = 0x8; |
| 773 |
pub const GLOB_NOCHECK: ::c_int = 0x10; |
| 774 |
pub const GLOB_NOSORT: ::c_int = 0x20; |
| 775 |
pub const GLOB_NOESCAPE: ::c_int = 0x80; |
| 776 |
pub const GLOB_NOSPACE: ::c_int = 0x2000; |
| 777 |
pub const GLOB_ABORTED: ::c_int = 0x1000; |
| 778 |
pub const GLOB_NOMATCH: ::c_int = 0x4000; |
| 779 |
pub const GLOB_NOSYS: ::c_int = 0x8000; |
| 780 |
|
| 781 |
// langinfo.h |
| 782 |
pub const DAY_1: ::nl_item = 13; |
| 783 |
pub const DAY_2: ::nl_item = 14; |
| 784 |
pub const DAY_3: ::nl_item = 15; |
| 785 |
pub const DAY_4: ::nl_item = 16; |
| 786 |
pub const DAY_5: ::nl_item = 17; |
| 787 |
pub const DAY_6: ::nl_item = 18; |
| 788 |
pub const DAY_7: ::nl_item = 19; |
| 789 |
pub const ABDAY_1: ::nl_item = 6; |
| 790 |
pub const ABDAY_2: ::nl_item = 7; |
| 791 |
pub const ABDAY_3: ::nl_item = 8; |
| 792 |
pub const ABDAY_4: ::nl_item = 9; |
| 793 |
pub const ABDAY_5: ::nl_item = 10; |
| 794 |
pub const ABDAY_6: ::nl_item = 11; |
| 795 |
pub const ABDAY_7: ::nl_item = 12; |
| 796 |
pub const MON_1: ::nl_item = 32; |
| 797 |
pub const MON_2: ::nl_item = 33; |
| 798 |
pub const MON_3: ::nl_item = 34; |
| 799 |
pub const MON_4: ::nl_item = 35; |
| 800 |
pub const MON_5: ::nl_item = 36; |
| 801 |
pub const MON_6: ::nl_item = 37; |
| 802 |
pub const MON_7: ::nl_item = 38; |
| 803 |
pub const MON_8: ::nl_item = 39; |
| 804 |
pub const MON_9: ::nl_item = 40; |
| 805 |
pub const MON_10: ::nl_item = 41; |
| 806 |
pub const MON_11: ::nl_item = 42; |
| 807 |
pub const MON_12: ::nl_item = 43; |
| 808 |
pub const ABMON_1: ::nl_item = 20; |
| 809 |
pub const ABMON_2: ::nl_item = 21; |
| 810 |
pub const ABMON_3: ::nl_item = 22; |
| 811 |
pub const ABMON_4: ::nl_item = 23; |
| 812 |
pub const ABMON_5: ::nl_item = 24; |
| 813 |
pub const ABMON_6: ::nl_item = 25; |
| 814 |
pub const ABMON_7: ::nl_item = 26; |
| 815 |
pub const ABMON_8: ::nl_item = 27; |
| 816 |
pub const ABMON_9: ::nl_item = 28; |
| 817 |
pub const ABMON_10: ::nl_item = 29; |
| 818 |
pub const ABMON_11: ::nl_item = 30; |
| 819 |
pub const ABMON_12: ::nl_item = 31; |
| 820 |
pub const RADIXCHAR: ::nl_item = 44; |
| 821 |
pub const THOUSEP: ::nl_item = 45; |
| 822 |
pub const YESSTR: ::nl_item = 46; |
| 823 |
pub const NOSTR: ::nl_item = 47; |
| 824 |
pub const CRNCYSTR: ::nl_item = 48; |
| 825 |
pub const D_T_FMT: ::nl_item = 1; |
| 826 |
pub const D_FMT: ::nl_item = 2; |
| 827 |
pub const T_FMT: ::nl_item = 3; |
| 828 |
pub const AM_STR: ::nl_item = 4; |
| 829 |
pub const PM_STR: ::nl_item = 5; |
| 830 |
pub const CODESET: ::nl_item = 49; |
| 831 |
pub const T_FMT_AMPM: ::nl_item = 55; |
| 832 |
pub const ERA: ::nl_item = 56; |
| 833 |
pub const ERA_D_FMT: ::nl_item = 57; |
| 834 |
pub const ERA_D_T_FMT: ::nl_item = 58; |
| 835 |
pub const ERA_T_FMT: ::nl_item = 59; |
| 836 |
pub const ALT_DIGITS: ::nl_item = 60; |
| 837 |
pub const YESEXPR: ::nl_item = 61; |
| 838 |
pub const NOEXPR: ::nl_item = 62; |
| 839 |
|
| 840 |
// locale.h |
| 841 |
pub const LC_GLOBAL_LOCALE: ::locale_t = -1isize as ::locale_t; |
| 842 |
pub const LC_CTYPE: ::c_int = 1; |
| 843 |
pub const LC_NUMERIC: ::c_int = 3; |
| 844 |
pub const LC_TIME: ::c_int = 4; |
| 845 |
pub const LC_COLLATE: ::c_int = 0; |
| 846 |
pub const LC_MONETARY: ::c_int = 2; |
| 847 |
pub const LC_MESSAGES: ::c_int = 4; |
| 848 |
pub const LC_ALL: ::c_int = -1; |
| 849 |
pub const LC_CTYPE_MASK: ::c_int = 2; |
| 850 |
pub const LC_NUMERIC_MASK: ::c_int = 16; |
| 851 |
pub const LC_TIME_MASK: ::c_int = 32; |
| 852 |
pub const LC_COLLATE_MASK: ::c_int = 1; |
| 853 |
pub const LC_MONETARY_MASK: ::c_int = 8; |
| 854 |
pub const LC_MESSAGES_MASK: ::c_int = 4; |
| 855 |
pub const LC_ALL_MASK: ::c_int = LC_CTYPE_MASK |
| 856 |
| LC_NUMERIC_MASK |
| 857 |
| LC_TIME_MASK |
| 858 |
| LC_COLLATE_MASK |
| 859 |
| LC_MONETARY_MASK |
| 860 |
| LC_MESSAGES_MASK; |
| 861 |
|
| 862 |
// netdb.h |
| 863 |
pub const NI_MAXHOST: ::socklen_t = 1025; |
| 864 |
pub const NI_MAXSERV: ::socklen_t = 32; |
| 865 |
pub const NI_NOFQDN: ::socklen_t = 0x1; |
| 866 |
pub const NI_NUMERICHOST: ::socklen_t = 0x2; |
| 867 |
pub const NI_NAMEREQD: ::socklen_t = 0x4; |
| 868 |
pub const NI_NUMERICSERV: ::socklen_t = 0x8; |
| 869 |
pub const NI_DGRAM: ::socklen_t = 0x10; |
| 870 |
pub const NI_NUMERICSCOPE: ::socklen_t = 0x40; |
| 871 |
pub const EAI_AGAIN: ::c_int = 2; |
| 872 |
pub const EAI_BADFLAGS: ::c_int = 3; |
| 873 |
pub const EAI_FAIL: ::c_int = 4; |
| 874 |
pub const EAI_FAMILY: ::c_int = 5; |
| 875 |
pub const EAI_MEMORY: ::c_int = 6; |
| 876 |
pub const EAI_NODATA: ::c_int = 7; |
| 877 |
pub const EAI_NONAME: ::c_int = 8; |
| 878 |
pub const EAI_SERVICE: ::c_int = 9; |
| 879 |
pub const EAI_SOCKTYPE: ::c_int = 10; |
| 880 |
pub const EAI_SYSTEM: ::c_int = 11; |
| 881 |
pub const EAI_OVERFLOW: ::c_int = 13; |
| 882 |
pub const AI_CANONNAME: ::c_int = 0x01; |
| 883 |
pub const AI_PASSIVE: ::c_int = 0x02; |
| 884 |
pub const AI_NUMERICHOST: ::c_int = 0x04; |
| 885 |
pub const AI_ADDRCONFIG: ::c_int = 0x08; |
| 886 |
pub const AI_V4MAPPED: ::c_int = 0x10; |
| 887 |
pub const AI_ALL: ::c_int = 0x20; |
| 888 |
pub const AI_NUMERICSERV: ::c_int = 0x40; |
| 889 |
pub const AI_EXTFLAGS: ::c_int = 0x80; |
| 890 |
pub const AI_DEFAULT: ::c_int = AI_V4MAPPED | AI_ADDRCONFIG; |
| 891 |
pub const IPV6_ADDRFORM: ::c_int = 22; |
| 892 |
pub const IPV6_ADDR_PREFERENCES: ::c_int = 74; |
| 893 |
pub const IPV6_CHECKSUM: ::c_int = 39; |
| 894 |
pub const IPV6_DONTFRAG: ::c_int = 45; |
| 895 |
pub const IPV6_DSTOPTS: ::c_int = 54; |
| 896 |
pub const IPV6_FLOWINFO_FLOWLABEL: ::c_int = 16777215; |
| 897 |
pub const IPV6_FLOWINFO_PRIORITY: ::c_int = 251658240; |
| 898 |
pub const IPV6_HOPLIMIT: ::c_int = 40; |
| 899 |
pub const IPV6_HOPOPTS: ::c_int = 52; |
| 900 |
pub const IPV6_NEXTHOP: ::c_int = 48; |
| 901 |
pub const IPV6_PATHMTU: ::c_int = 46; |
| 902 |
pub const IPV6_PKTINFO: ::c_int = 33; |
| 903 |
pub const IPV6_PREFER_SRC_CGA: ::c_int = 16; |
| 904 |
pub const IPV6_PREFER_SRC_COA: ::c_int = 2; |
| 905 |
pub const IPV6_PREFER_SRC_HOME: ::c_int = 1; |
| 906 |
pub const IPV6_PREFER_SRC_NONCGA: ::c_int = 32; |
| 907 |
pub const IPV6_PREFER_SRC_PUBLIC: ::c_int = 4; |
| 908 |
pub const IPV6_PREFER_SRC_TMP: ::c_int = 8; |
| 909 |
pub const IPV6_RECVDSTOPTS: ::c_int = 56; |
| 910 |
pub const IPV6_RECVHOPLIMIT: ::c_int = 41; |
| 911 |
pub const IPV6_RECVHOPOPTS: ::c_int = 53; |
| 912 |
pub const IPV6_RECVPATHMTU: ::c_int = 47; |
| 913 |
pub const IPV6_RECVRTHDR: ::c_int = 51; |
| 914 |
pub const IPV6_RECVTCLASS: ::c_int = 42; |
| 915 |
pub const IPV6_RTHDR: ::c_int = 50; |
| 916 |
pub const IPV6_RTHDRDSTOPTS: ::c_int = 55; |
| 917 |
pub const IPV6_TCLASS: ::c_int = 43; |
| 918 |
|
| 919 |
// net/bpf.h |
| 920 |
pub const DLT_NULL: ::c_int = 0x18; |
| 921 |
pub const DLT_EN10MB: ::c_int = 0x6; |
| 922 |
pub const DLT_EN3MB: ::c_int = 0x1a; |
| 923 |
pub const DLT_AX25: ::c_int = 0x5; |
| 924 |
pub const DLT_PRONET: ::c_int = 0xd; |
| 925 |
pub const DLT_IEEE802: ::c_int = 0x7; |
| 926 |
pub const DLT_ARCNET: ::c_int = 0x23; |
| 927 |
pub const DLT_SLIP: ::c_int = 0x1c; |
| 928 |
pub const DLT_PPP: ::c_int = 0x17; |
| 929 |
pub const DLT_FDDI: ::c_int = 0xf; |
| 930 |
pub const DLT_ATM: ::c_int = 0x25; |
| 931 |
pub const DLT_IPOIB: ::c_int = 0xc7; |
| 932 |
pub const BIOCSETF: ::c_ulong = 0x80104267; |
| 933 |
pub const BIOCGRTIMEOUT: ::c_ulong = 0x4010426e; |
| 934 |
pub const BIOCGBLEN: ::c_int = 0x40044266; |
| 935 |
pub const BIOCSBLEN: ::c_int = 0xc0044266; |
| 936 |
pub const BIOCFLUSH: ::c_int = 0x20004268; |
| 937 |
pub const BIOCPROMISC: ::c_int = 0x20004269; |
| 938 |
pub const BIOCGDLT: ::c_int = 0x4004426a; |
| 939 |
pub const BIOCSRTIMEOUT: ::c_int = 0x8010426d; |
| 940 |
pub const BIOCGSTATS: ::c_int = 0x4008426f; |
| 941 |
pub const BIOCIMMEDIATE: ::c_int = 0x80044270; |
| 942 |
pub const BIOCVERSION: ::c_int = 0x40044271; |
| 943 |
pub const BIOCSDEVNO: ::c_int = 0x20004272; |
| 944 |
pub const BIOCGETIF: ::c_ulong = 0x4020426b; |
| 945 |
pub const BIOCSETIF: ::c_ulong = 0xffffffff8020426c; |
| 946 |
pub const BPF_ABS: ::c_int = 32; |
| 947 |
pub const BPF_ADD: ::c_int = 0; |
| 948 |
pub const BPF_ALIGNMENT: ::c_ulong = 4; |
| 949 |
pub const BPF_ALU: ::c_int = 4; |
| 950 |
pub const BPF_AND: ::c_int = 80; |
| 951 |
pub const BPF_B: ::c_int = 16; |
| 952 |
pub const BPF_DIV: ::c_int = 48; |
| 953 |
pub const BPF_H: ::c_int = 8; |
| 954 |
pub const BPF_IMM: ::c_int = 0; |
| 955 |
pub const BPF_IND: ::c_int = 64; |
| 956 |
pub const BPF_JA: ::c_int = 0; |
| 957 |
pub const BPF_JEQ: ::c_int = 16; |
| 958 |
pub const BPF_JGE: ::c_int = 48; |
| 959 |
pub const BPF_JGT: ::c_int = 32; |
| 960 |
pub const BPF_JMP: ::c_int = 5; |
| 961 |
pub const BPF_JSET: ::c_int = 64; |
| 962 |
pub const BPF_K: ::c_int = 0; |
| 963 |
pub const BPF_LD: ::c_int = 0; |
| 964 |
pub const BPF_LDX: ::c_int = 1; |
| 965 |
pub const BPF_LEN: ::c_int = 128; |
| 966 |
pub const BPF_LSH: ::c_int = 96; |
| 967 |
pub const BPF_MAXINSNS: ::c_int = 512; |
| 968 |
pub const BPF_MEM: ::c_int = 96; |
| 969 |
pub const BPF_MEMWORDS: ::c_int = 16; |
| 970 |
pub const BPF_MISC: ::c_int = 7; |
| 971 |
pub const BPF_MSH: ::c_int = 160; |
| 972 |
pub const BPF_MUL: ::c_int = 32; |
| 973 |
pub const BPF_NEG: ::c_int = 128; |
| 974 |
pub const BPF_OR: ::c_int = 64; |
| 975 |
pub const BPF_RET: ::c_int = 6; |
| 976 |
pub const BPF_RSH: ::c_int = 112; |
| 977 |
pub const BPF_ST: ::c_int = 2; |
| 978 |
pub const BPF_STX: ::c_int = 3; |
| 979 |
pub const BPF_SUB: ::c_int = 16; |
| 980 |
pub const BPF_W: ::c_int = 0; |
| 981 |
pub const BPF_X: ::c_int = 8; |
| 982 |
|
| 983 |
// net/if.h |
| 984 |
pub const IFNET_SLOWHZ: ::c_int = 1; |
| 985 |
pub const IFQ_MAXLEN: ::c_int = 50; |
| 986 |
pub const IF_NAMESIZE: ::c_int = 16; |
| 987 |
pub const IFNAMSIZ: ::c_int = 16; |
| 988 |
pub const IFF_UP: ::c_int = 0x1; |
| 989 |
pub const IFF_BROADCAST: ::c_int = 0x2; |
| 990 |
pub const IFF_DEBUG: ::c_int = 0x4; |
| 991 |
pub const IFF_LOOPBACK: ::c_int = 0x8; |
| 992 |
pub const IFF_POINTOPOINT: ::c_int = 0x10; |
| 993 |
pub const IFF_NOTRAILERS: ::c_int = 0x20; |
| 994 |
pub const IFF_RUNNING: ::c_int = 0x40; |
| 995 |
pub const IFF_NOARP: ::c_int = 0x80; |
| 996 |
pub const IFF_PROMISC: ::c_int = 0x100; |
| 997 |
pub const IFF_ALLMULTI: ::c_int = 0x200; |
| 998 |
pub const IFF_MULTICAST: ::c_int = 0x80000; |
| 999 |
pub const IFF_LINK0: ::c_int = 0x100000; |
| 1000 |
pub const IFF_LINK1: ::c_int = 0x200000; |
| 1001 |
pub const IFF_LINK2: ::c_int = 0x400000; |
| 1002 |
pub const IFF_OACTIVE: ::c_int = 0x400; |
| 1003 |
pub const IFF_SIMPLEX: ::c_int = 0x800; |
| 1004 |
|
| 1005 |
// net/if_arp.h |
| 1006 |
pub const ARPHRD_ETHER: ::c_int = 1; |
| 1007 |
pub const ARPHRD_802_5: ::c_int = 6; |
| 1008 |
pub const ARPHRD_802_3: ::c_int = 6; |
| 1009 |
pub const ARPHRD_FDDI: ::c_int = 1; |
| 1010 |
pub const ARPOP_REQUEST: ::c_int = 1; |
| 1011 |
pub const ARPOP_REPLY: ::c_int = 2; |
| 1012 |
|
| 1013 |
// net/route.h |
| 1014 |
pub const RTM_ADD: ::c_int = 0x1; |
| 1015 |
pub const RTM_DELETE: ::c_int = 0x2; |
| 1016 |
pub const RTM_CHANGE: ::c_int = 0x3; |
| 1017 |
pub const RTM_GET: ::c_int = 0x4; |
| 1018 |
pub const RTM_LOSING: ::c_int = 0x5; |
| 1019 |
pub const RTM_REDIRECT: ::c_int = 0x6; |
| 1020 |
pub const RTM_MISS: ::c_int = 0x7; |
| 1021 |
pub const RTM_LOCK: ::c_int = 0x8; |
| 1022 |
pub const RTM_OLDADD: ::c_int = 0x9; |
| 1023 |
pub const RTM_OLDDEL: ::c_int = 0xa; |
| 1024 |
pub const RTM_RESOLVE: ::c_int = 0xb; |
| 1025 |
pub const RTM_NEWADDR: ::c_int = 0xc; |
| 1026 |
pub const RTM_DELADDR: ::c_int = 0xd; |
| 1027 |
pub const RTM_IFINFO: ::c_int = 0xe; |
| 1028 |
pub const RTM_EXPIRE: ::c_int = 0xf; |
| 1029 |
pub const RTM_RTLOST: ::c_int = 0x10; |
| 1030 |
pub const RTM_GETNEXT: ::c_int = 0x11; |
| 1031 |
pub const RTM_SAMEADDR: ::c_int = 0x12; |
| 1032 |
pub const RTM_SET: ::c_int = 0x13; |
| 1033 |
pub const RTV_MTU: ::c_int = 0x1; |
| 1034 |
pub const RTV_HOPCOUNT: ::c_int = 0x2; |
| 1035 |
pub const RTV_EXPIRE: ::c_int = 0x4; |
| 1036 |
pub const RTV_RPIPE: ::c_int = 0x8; |
| 1037 |
pub const RTV_SPIPE: ::c_int = 0x10; |
| 1038 |
pub const RTV_SSTHRESH: ::c_int = 0x20; |
| 1039 |
pub const RTV_RTT: ::c_int = 0x40; |
| 1040 |
pub const RTV_RTTVAR: ::c_int = 0x80; |
| 1041 |
pub const RTA_DST: ::c_int = 0x1; |
| 1042 |
pub const RTA_GATEWAY: ::c_int = 0x2; |
| 1043 |
pub const RTA_NETMASK: ::c_int = 0x4; |
| 1044 |
pub const RTA_GENMASK: ::c_int = 0x8; |
| 1045 |
pub const RTA_IFP: ::c_int = 0x10; |
| 1046 |
pub const RTA_IFA: ::c_int = 0x20; |
| 1047 |
pub const RTA_AUTHOR: ::c_int = 0x40; |
| 1048 |
pub const RTA_BRD: ::c_int = 0x80; |
| 1049 |
pub const RTA_DOWNSTREAM: ::c_int = 0x100; |
| 1050 |
pub const RTAX_DST: ::c_int = 0; |
| 1051 |
pub const RTAX_GATEWAY: ::c_int = 1; |
| 1052 |
pub const RTAX_NETMASK: ::c_int = 2; |
| 1053 |
pub const RTAX_GENMASK: ::c_int = 3; |
| 1054 |
pub const RTAX_IFP: ::c_int = 4; |
| 1055 |
pub const RTAX_IFA: ::c_int = 5; |
| 1056 |
pub const RTAX_AUTHOR: ::c_int = 6; |
| 1057 |
pub const RTAX_BRD: ::c_int = 7; |
| 1058 |
pub const RTAX_MAX: ::c_int = 8; |
| 1059 |
pub const RTF_UP: ::c_int = 0x1; |
| 1060 |
pub const RTF_GATEWAY: ::c_int = 0x2; |
| 1061 |
pub const RTF_HOST: ::c_int = 0x4; |
| 1062 |
pub const RTF_REJECT: ::c_int = 0x8; |
| 1063 |
pub const RTF_DYNAMIC: ::c_int = 0x10; |
| 1064 |
pub const RTF_MODIFIED: ::c_int = 0x20; |
| 1065 |
pub const RTF_DONE: ::c_int = 0x40; |
| 1066 |
pub const RTF_MASK: ::c_int = 0x80; |
| 1067 |
pub const RTF_CLONING: ::c_int = 0x100; |
| 1068 |
pub const RTF_XRESOLVE: ::c_int = 0x200; |
| 1069 |
pub const RTF_LLINFO: ::c_int = 0x400; |
| 1070 |
pub const RTF_STATIC: ::c_int = 0x800; |
| 1071 |
pub const RTF_BLACKHOLE: ::c_int = 0x1000; |
| 1072 |
pub const RTF_BUL: ::c_int = 0x2000; |
| 1073 |
pub const RTF_PROTO2: ::c_int = 0x4000; |
| 1074 |
pub const RTF_PROTO1: ::c_int = 0x8000; |
| 1075 |
pub const RTF_CLONE: ::c_int = 0x10000; |
| 1076 |
pub const RTF_CLONED: ::c_int = 0x20000; |
| 1077 |
pub const RTF_PROTO3: ::c_int = 0x40000; |
| 1078 |
pub const RTF_BCE: ::c_int = 0x80000; |
| 1079 |
pub const RTF_PINNED: ::c_int = 0x100000; |
| 1080 |
pub const RTF_LOCAL: ::c_int = 0x200000; |
| 1081 |
pub const RTF_BROADCAST: ::c_int = 0x400000; |
| 1082 |
pub const RTF_MULTICAST: ::c_int = 0x800000; |
| 1083 |
pub const RTF_ACTIVE_DGD: ::c_int = 0x1000000; |
| 1084 |
pub const RTF_STOPSRCH: ::c_int = 0x2000000; |
| 1085 |
pub const RTF_FREE_IN_PROG: ::c_int = 0x4000000; |
| 1086 |
pub const RTF_PERMANENT6: ::c_int = 0x8000000; |
| 1087 |
pub const RTF_UNREACHABLE: ::c_int = 0x10000000; |
| 1088 |
pub const RTF_CACHED: ::c_int = 0x20000000; |
| 1089 |
pub const RTF_SMALLMTU: ::c_int = 0x40000; |
| 1090 |
|
| 1091 |
// netinet/in.h |
| 1092 |
pub const IPPROTO_HOPOPTS: ::c_int = 0; |
| 1093 |
pub const IPPROTO_IGMP: ::c_int = 2; |
| 1094 |
pub const IPPROTO_GGP: ::c_int = 3; |
| 1095 |
pub const IPPROTO_IPIP: ::c_int = 4; |
| 1096 |
pub const IPPROTO_EGP: ::c_int = 8; |
| 1097 |
pub const IPPROTO_PUP: ::c_int = 12; |
| 1098 |
pub const IPPROTO_IDP: ::c_int = 22; |
| 1099 |
pub const IPPROTO_TP: ::c_int = 29; |
| 1100 |
pub const IPPROTO_ROUTING: ::c_int = 43; |
| 1101 |
pub const IPPROTO_FRAGMENT: ::c_int = 44; |
| 1102 |
pub const IPPROTO_QOS: ::c_int = 45; |
| 1103 |
pub const IPPROTO_RSVP: ::c_int = 46; |
| 1104 |
pub const IPPROTO_GRE: ::c_int = 47; |
| 1105 |
pub const IPPROTO_ESP: ::c_int = 50; |
| 1106 |
pub const IPPROTO_AH: ::c_int = 51; |
| 1107 |
pub const IPPROTO_NONE: ::c_int = 59; |
| 1108 |
pub const IPPROTO_DSTOPTS: ::c_int = 60; |
| 1109 |
pub const IPPROTO_LOCAL: ::c_int = 63; |
| 1110 |
pub const IPPROTO_EON: ::c_int = 80; |
| 1111 |
pub const IPPROTO_BIP: ::c_int = 0x53; |
| 1112 |
pub const IPPROTO_SCTP: ::c_int = 132; |
| 1113 |
pub const IPPROTO_MH: ::c_int = 135; |
| 1114 |
pub const IPPROTO_GIF: ::c_int = 140; |
| 1115 |
pub const IPPROTO_RAW: ::c_int = 255; |
| 1116 |
pub const IPPROTO_MAX: ::c_int = 256; |
| 1117 |
pub const IP_OPTIONS: ::c_int = 1; |
| 1118 |
pub const IP_HDRINCL: ::c_int = 2; |
| 1119 |
pub const IP_TOS: ::c_int = 3; |
| 1120 |
pub const IP_TTL: ::c_int = 4; |
| 1121 |
pub const IP_UNICAST_HOPS: ::c_int = 4; |
| 1122 |
pub const IP_RECVOPTS: ::c_int = 5; |
| 1123 |
pub const IP_RECVRETOPTS: ::c_int = 6; |
| 1124 |
pub const IP_RECVDSTADDR: ::c_int = 7; |
| 1125 |
pub const IP_RETOPTS: ::c_int = 8; |
| 1126 |
pub const IP_MULTICAST_IF: ::c_int = 9; |
| 1127 |
pub const IP_MULTICAST_TTL: ::c_int = 10; |
| 1128 |
pub const IP_MULTICAST_HOPS: ::c_int = 10; |
| 1129 |
pub const IP_MULTICAST_LOOP: ::c_int = 11; |
| 1130 |
pub const IP_ADD_MEMBERSHIP: ::c_int = 12; |
| 1131 |
pub const IP_DROP_MEMBERSHIP: ::c_int = 13; |
| 1132 |
pub const IP_RECVMACHDR: ::c_int = 14; |
| 1133 |
pub const IP_RECVIFINFO: ::c_int = 15; |
| 1134 |
pub const IP_BROADCAST_IF: ::c_int = 16; |
| 1135 |
pub const IP_DHCPMODE: ::c_int = 17; |
| 1136 |
pub const IP_RECVIF: ::c_int = 20; |
| 1137 |
pub const IP_ADDRFORM: ::c_int = 22; |
| 1138 |
pub const IP_DONTFRAG: ::c_int = 25; |
| 1139 |
pub const IP_FINDPMTU: ::c_int = 26; |
| 1140 |
pub const IP_PMTUAGE: ::c_int = 27; |
| 1141 |
pub const IP_RECVINTERFACE: ::c_int = 32; |
| 1142 |
pub const IP_RECVTTL: ::c_int = 34; |
| 1143 |
pub const IP_BLOCK_SOURCE: ::c_int = 58; |
| 1144 |
pub const IP_UNBLOCK_SOURCE: ::c_int = 59; |
| 1145 |
pub const IP_ADD_SOURCE_MEMBERSHIP: ::c_int = 60; |
| 1146 |
pub const IP_DROP_SOURCE_MEMBERSHIP: ::c_int = 61; |
| 1147 |
pub const IP_DEFAULT_MULTICAST_TTL: ::c_int = 1; |
| 1148 |
pub const IP_DEFAULT_MULTICAST_LOOP: ::c_int = 1; |
| 1149 |
pub const IP_INC_MEMBERSHIPS: ::c_int = 20; |
| 1150 |
pub const IP_INIT_MEMBERSHIP: ::c_int = 20; |
| 1151 |
pub const IPV6_UNICAST_HOPS: ::c_int = IP_TTL; |
| 1152 |
pub const IPV6_MULTICAST_IF: ::c_int = IP_MULTICAST_IF; |
| 1153 |
pub const IPV6_MULTICAST_HOPS: ::c_int = IP_MULTICAST_TTL; |
| 1154 |
pub const IPV6_MULTICAST_LOOP: ::c_int = IP_MULTICAST_LOOP; |
| 1155 |
pub const IPV6_RECVPKTINFO: ::c_int = 35; |
| 1156 |
pub const IPV6_V6ONLY: ::c_int = 37; |
| 1157 |
pub const IPV6_ADD_MEMBERSHIP: ::c_int = IP_ADD_MEMBERSHIP; |
| 1158 |
pub const IPV6_DROP_MEMBERSHIP: ::c_int = IP_DROP_MEMBERSHIP; |
| 1159 |
pub const IPV6_JOIN_GROUP: ::c_int = IP_ADD_MEMBERSHIP; |
| 1160 |
pub const IPV6_LEAVE_GROUP: ::c_int = IP_DROP_MEMBERSHIP; |
| 1161 |
pub const MCAST_BLOCK_SOURCE: ::c_int = 64; |
| 1162 |
pub const MCAST_EXCLUDE: ::c_int = 2; |
| 1163 |
pub const MCAST_INCLUDE: ::c_int = 1; |
| 1164 |
pub const MCAST_JOIN_GROUP: ::c_int = 62; |
| 1165 |
pub const MCAST_JOIN_SOURCE_GROUP: ::c_int = 66; |
| 1166 |
pub const MCAST_LEAVE_GROUP: ::c_int = 63; |
| 1167 |
pub const MCAST_LEAVE_SOURCE_GROUP: ::c_int = 67; |
| 1168 |
pub const MCAST_UNBLOCK_SOURCE: ::c_int = 65; |
| 1169 |
|
| 1170 |
// netinet/ip.h |
| 1171 |
pub const MAXTTL: ::c_int = 255; |
| 1172 |
pub const IPDEFTTL: ::c_int = 64; |
| 1173 |
pub const IPOPT_CONTROL: ::c_int = 0; |
| 1174 |
pub const IPOPT_EOL: ::c_int = 0; |
| 1175 |
pub const IPOPT_LSRR: ::c_int = 131; |
| 1176 |
pub const IPOPT_MINOFF: ::c_int = 4; |
| 1177 |
pub const IPOPT_NOP: ::c_int = 1; |
| 1178 |
pub const IPOPT_OFFSET: ::c_int = 2; |
| 1179 |
pub const IPOPT_OLEN: ::c_int = 1; |
| 1180 |
pub const IPOPT_OPTVAL: ::c_int = 0; |
| 1181 |
pub const IPOPT_RESERVED1: ::c_int = 0x20; |
| 1182 |
pub const IPOPT_RESERVED2: ::c_int = 0x60; |
| 1183 |
pub const IPOPT_RR: ::c_int = 7; |
| 1184 |
pub const IPOPT_SSRR: ::c_int = 137; |
| 1185 |
pub const IPOPT_TS: ::c_int = 68; |
| 1186 |
pub const IPOPT_TS_PRESPEC: ::c_int = 3; |
| 1187 |
pub const IPOPT_TS_TSANDADDR: ::c_int = 1; |
| 1188 |
pub const IPOPT_TS_TSONLY: ::c_int = 0; |
| 1189 |
pub const IPTOS_LOWDELAY: ::c_int = 16; |
| 1190 |
pub const IPTOS_PREC_CRITIC_ECP: ::c_int = 160; |
| 1191 |
pub const IPTOS_PREC_FLASH: ::c_int = 96; |
| 1192 |
pub const IPTOS_PREC_FLASHOVERRIDE: ::c_int = 128; |
| 1193 |
pub const IPTOS_PREC_IMMEDIATE: ::c_int = 64; |
| 1194 |
pub const IPTOS_PREC_INTERNETCONTROL: ::c_int = 192; |
| 1195 |
pub const IPTOS_PREC_NETCONTROL: ::c_int = 224; |
| 1196 |
pub const IPTOS_PREC_PRIORITY: ::c_int = 32; |
| 1197 |
pub const IPTOS_PREC_ROUTINE: ::c_int = 16; |
| 1198 |
pub const IPTOS_RELIABILITY: ::c_int = 4; |
| 1199 |
pub const IPTOS_THROUGHPUT: ::c_int = 8; |
| 1200 |
pub const IPVERSION: ::c_int = 4; |
| 1201 |
|
| 1202 |
// netinet/tcp.h |
| 1203 |
pub const TCP_NODELAY: ::c_int = 0x1; |
| 1204 |
pub const TCP_MAXSEG: ::c_int = 0x2; |
| 1205 |
pub const TCP_RFC1323: ::c_int = 0x4; |
| 1206 |
pub const TCP_KEEPALIVE: ::c_int = 0x8; |
| 1207 |
pub const TCP_KEEPIDLE: ::c_int = 0x11; |
| 1208 |
pub const TCP_KEEPINTVL: ::c_int = 0x12; |
| 1209 |
pub const TCP_KEEPCNT: ::c_int = 0x13; |
| 1210 |
pub const TCP_NODELAYACK: ::c_int = 0x14; |
| 1211 |
|
| 1212 |
// pthread.h |
| 1213 |
pub const PTHREAD_CREATE_JOINABLE: ::c_int = 0; |
| 1214 |
pub const PTHREAD_CREATE_DETACHED: ::c_int = 1; |
| 1215 |
pub const PTHREAD_PROCESS_SHARED: ::c_int = 0; |
| 1216 |
pub const PTHREAD_PROCESS_PRIVATE: ::c_ushort = 1; |
| 1217 |
pub const PTHREAD_STACK_MIN: ::size_t = PAGESIZE as ::size_t * 4; |
| 1218 |
pub const PTHREAD_MUTEX_NORMAL: ::c_int = 5; |
| 1219 |
pub const PTHREAD_MUTEX_ERRORCHECK: ::c_int = 3; |
| 1220 |
pub const PTHREAD_MUTEX_RECURSIVE: ::c_int = 4; |
| 1221 |
pub const PTHREAD_MUTEX_DEFAULT: ::c_int = PTHREAD_MUTEX_NORMAL; |
| 1222 |
pub const PTHREAD_MUTEX_ROBUST: ::c_int = 1; |
| 1223 |
pub const PTHREAD_MUTEX_STALLED: ::c_int = 0; |
| 1224 |
pub const PTHREAD_PRIO_INHERIT: ::c_int = 3; |
| 1225 |
pub const PTHREAD_PRIO_NONE: ::c_int = 1; |
| 1226 |
pub const PTHREAD_PRIO_PROTECT: ::c_int = 2; |
| 1227 |
|
| 1228 |
// regex.h |
| 1229 |
pub const REG_EXTENDED: ::c_int = 1; |
| 1230 |
pub const REG_ICASE: ::c_int = 2; |
| 1231 |
pub const REG_NEWLINE: ::c_int = 4; |
| 1232 |
pub const REG_NOSUB: ::c_int = 8; |
| 1233 |
pub const REG_NOTBOL: ::c_int = 0x100; |
| 1234 |
pub const REG_NOTEOL: ::c_int = 0x200; |
| 1235 |
pub const REG_NOMATCH: ::c_int = 1; |
| 1236 |
pub const REG_BADPAT: ::c_int = 2; |
| 1237 |
pub const REG_ECOLLATE: ::c_int = 3; |
| 1238 |
pub const REG_ECTYPE: ::c_int = 4; |
| 1239 |
pub const REG_EESCAPE: ::c_int = 5; |
| 1240 |
pub const REG_ESUBREG: ::c_int = 6; |
| 1241 |
pub const REG_EBRACK: ::c_int = 7; |
| 1242 |
pub const REG_EPAREN: ::c_int = 8; |
| 1243 |
pub const REG_EBRACE: ::c_int = 9; |
| 1244 |
pub const REG_BADBR: ::c_int = 10; |
| 1245 |
pub const REG_ERANGE: ::c_int = 11; |
| 1246 |
pub const REG_ESPACE: ::c_int = 12; |
| 1247 |
pub const REG_BADRPT: ::c_int = 13; |
| 1248 |
pub const REG_ECHAR: ::c_int = 14; |
| 1249 |
pub const REG_EBOL: ::c_int = 15; |
| 1250 |
pub const REG_EEOL: ::c_int = 16; |
| 1251 |
pub const REG_ENOSYS: ::c_int = 17; |
| 1252 |
|
| 1253 |
// rpcsvc/mount.h |
| 1254 |
pub const NFSMNT_ACDIRMAX: ::c_int = 2048; |
| 1255 |
pub const NFSMNT_ACDIRMIN: ::c_int = 1024; |
| 1256 |
pub const NFSMNT_ACREGMAX: ::c_int = 512; |
| 1257 |
pub const NFSMNT_ACREGMIN: ::c_int = 256; |
| 1258 |
pub const NFSMNT_INT: ::c_int = 64; |
| 1259 |
pub const NFSMNT_NOAC: ::c_int = 128; |
| 1260 |
pub const NFSMNT_RETRANS: ::c_int = 16; |
| 1261 |
pub const NFSMNT_RSIZE: ::c_int = 4; |
| 1262 |
pub const NFSMNT_SOFT: ::c_int = 1; |
| 1263 |
pub const NFSMNT_TIMEO: ::c_int = 8; |
| 1264 |
pub const NFSMNT_WSIZE: ::c_int = 2; |
| 1265 |
|
| 1266 |
// rpcsvc/rstat.h |
| 1267 |
pub const CPUSTATES: ::c_int = 4; |
| 1268 |
|
| 1269 |
// search.h |
| 1270 |
pub const FIND: ::c_int = 0; |
| 1271 |
pub const ENTER: ::c_int = 1; |
| 1272 |
|
| 1273 |
// semaphore.h |
| 1274 |
pub const SEM_FAILED: *mut sem_t = -1isize as *mut ::sem_t; |
| 1275 |
|
| 1276 |
// spawn.h |
| 1277 |
pub const POSIX_SPAWN_SETPGROUP: ::c_int = 0x1; |
| 1278 |
pub const POSIX_SPAWN_SETSIGMASK: ::c_int = 0x2; |
| 1279 |
pub const POSIX_SPAWN_SETSIGDEF: ::c_int = 0x4; |
| 1280 |
pub const POSIX_SPAWN_SETSCHEDULER: ::c_int = 0x8; |
| 1281 |
pub const POSIX_SPAWN_SETSCHEDPARAM: ::c_int = 0x10; |
| 1282 |
pub const POSIX_SPAWN_RESETIDS: ::c_int = 0x20; |
| 1283 |
pub const POSIX_SPAWN_FORK_HANDLERS: ::c_int = 0x1000; |
| 1284 |
|
| 1285 |
// stdio.h |
| 1286 |
pub const EOF: ::c_int = -1; |
| 1287 |
pub const SEEK_SET: ::c_int = 0; |
| 1288 |
pub const SEEK_CUR: ::c_int = 1; |
| 1289 |
pub const SEEK_END: ::c_int = 2; |
| 1290 |
pub const _IOFBF: ::c_int = 0o000; |
| 1291 |
pub const _IONBF: ::c_int = 0o004; |
| 1292 |
pub const _IOLBF: ::c_int = 0o100; |
| 1293 |
pub const BUFSIZ: ::c_uint = 4096; |
| 1294 |
pub const FOPEN_MAX: ::c_uint = 32767; |
| 1295 |
pub const FILENAME_MAX: ::c_uint = 255; |
| 1296 |
pub const L_tmpnam: ::c_uint = 21; |
| 1297 |
pub const TMP_MAX: ::c_uint = 16384; |
| 1298 |
|
| 1299 |
// stdlib.h |
| 1300 |
pub const EXIT_FAILURE: ::c_int = 1; |
| 1301 |
pub const EXIT_SUCCESS: ::c_int = 0; |
| 1302 |
pub const RAND_MAX: ::c_int = 32767; |
| 1303 |
|
| 1304 |
// sys/access.h |
| 1305 |
pub const F_OK: ::c_int = 0; |
| 1306 |
pub const R_OK: ::c_int = 4; |
| 1307 |
pub const W_OK: ::c_int = 2; |
| 1308 |
pub const X_OK: ::c_int = 1; |
| 1309 |
|
| 1310 |
// sys/aio.h |
| 1311 |
pub const LIO_NOP: ::c_int = 0; |
| 1312 |
pub const LIO_READ: ::c_int = 1; |
| 1313 |
pub const LIO_WRITE: ::c_int = 2; |
| 1314 |
pub const LIO_NOWAIT: ::c_int = 0; |
| 1315 |
pub const LIO_WAIT: ::c_int = 1; |
| 1316 |
pub const AIO_ALLDONE: ::c_int = 2; |
| 1317 |
pub const AIO_CANCELED: ::c_int = 0; |
| 1318 |
pub const AIO_NOTCANCELED: ::c_int = 1; |
| 1319 |
|
| 1320 |
// sys/errno.h |
| 1321 |
pub const EPERM: ::c_int = 1; |
| 1322 |
pub const ENOENT: ::c_int = 2; |
| 1323 |
pub const ESRCH: ::c_int = 3; |
| 1324 |
pub const EINTR: ::c_int = 4; |
| 1325 |
pub const EIO: ::c_int = 5; |
| 1326 |
pub const ENXIO: ::c_int = 6; |
| 1327 |
pub const E2BIG: ::c_int = 7; |
| 1328 |
pub const ENOEXEC: ::c_int = 8; |
| 1329 |
pub const EBADF: ::c_int = 9; |
| 1330 |
pub const ECHILD: ::c_int = 10; |
| 1331 |
pub const EAGAIN: ::c_int = 11; |
| 1332 |
pub const ENOMEM: ::c_int = 12; |
| 1333 |
pub const EACCES: ::c_int = 13; |
| 1334 |
pub const EFAULT: ::c_int = 14; |
| 1335 |
pub const ENOTBLK: ::c_int = 15; |
| 1336 |
pub const EBUSY: ::c_int = 16; |
| 1337 |
pub const EEXIST: ::c_int = 17; |
| 1338 |
pub const EXDEV: ::c_int = 18; |
| 1339 |
pub const ENODEV: ::c_int = 19; |
| 1340 |
pub const ENOTDIR: ::c_int = 20; |
| 1341 |
pub const EISDIR: ::c_int = 21; |
| 1342 |
pub const EINVAL: ::c_int = 22; |
| 1343 |
pub const ENFILE: ::c_int = 23; |
| 1344 |
pub const EMFILE: ::c_int = 24; |
| 1345 |
pub const ENOTTY: ::c_int = 25; |
| 1346 |
pub const ETXTBSY: ::c_int = 26; |
| 1347 |
pub const EFBIG: ::c_int = 27; |
| 1348 |
pub const ENOSPC: ::c_int = 28; |
| 1349 |
pub const ESPIPE: ::c_int = 29; |
| 1350 |
pub const EROFS: ::c_int = 30; |
| 1351 |
pub const EMLINK: ::c_int = 31; |
| 1352 |
pub const EPIPE: ::c_int = 32; |
| 1353 |
pub const EDOM: ::c_int = 33; |
| 1354 |
pub const ERANGE: ::c_int = 34; |
| 1355 |
pub const ENOMSG: ::c_int = 35; |
| 1356 |
pub const EIDRM: ::c_int = 36; |
| 1357 |
pub const ECHRNG: ::c_int = 37; |
| 1358 |
pub const EL2NSYNC: ::c_int = 38; |
| 1359 |
pub const EL3HLT: ::c_int = 39; |
| 1360 |
pub const EL3RST: ::c_int = 40; |
| 1361 |
pub const ELNRNG: ::c_int = 41; |
| 1362 |
pub const EUNATCH: ::c_int = 42; |
| 1363 |
pub const ENOCSI: ::c_int = 43; |
| 1364 |
pub const EL2HLT: ::c_int = 44; |
| 1365 |
pub const EDEADLK: ::c_int = 45; |
| 1366 |
pub const ENOLCK: ::c_int = 49; |
| 1367 |
pub const ECANCELED: ::c_int = 117; |
| 1368 |
pub const ENOTSUP: ::c_int = 124; |
| 1369 |
pub const EPROCLIM: ::c_int = 83; |
| 1370 |
pub const EDQUOT: ::c_int = 88; |
| 1371 |
pub const EOWNERDEAD: ::c_int = 95; |
| 1372 |
pub const ENOTRECOVERABLE: ::c_int = 94; |
| 1373 |
pub const ENOSTR: ::c_int = 123; |
| 1374 |
pub const ENODATA: ::c_int = 122; |
| 1375 |
pub const ETIME: ::c_int = 119; |
| 1376 |
pub const ENOSR: ::c_int = 118; |
| 1377 |
pub const EREMOTE: ::c_int = 93; |
| 1378 |
pub const ENOATTR: ::c_int = 112; |
| 1379 |
pub const ESAD: ::c_int = 113; |
| 1380 |
pub const ENOTRUST: ::c_int = 114; |
| 1381 |
pub const ENOLINK: ::c_int = 126; |
| 1382 |
pub const EPROTO: ::c_int = 121; |
| 1383 |
pub const EMULTIHOP: ::c_int = 125; |
| 1384 |
pub const EBADMSG: ::c_int = 120; |
| 1385 |
pub const ENAMETOOLONG: ::c_int = 86; |
| 1386 |
pub const EOVERFLOW: ::c_int = 127; |
| 1387 |
pub const EILSEQ: ::c_int = 116; |
| 1388 |
pub const ENOSYS: ::c_int = 109; |
| 1389 |
pub const ELOOP: ::c_int = 85; |
| 1390 |
pub const ERESTART: ::c_int = 82; |
| 1391 |
pub const ENOTEMPTY: ::c_int = 87; |
| 1392 |
pub const EUSERS: ::c_int = 84; |
| 1393 |
pub const ENOTSOCK: ::c_int = 57; |
| 1394 |
pub const EDESTADDRREQ: ::c_int = 58; |
| 1395 |
pub const EMSGSIZE: ::c_int = 59; |
| 1396 |
pub const EPROTOTYPE: ::c_int = 60; |
| 1397 |
pub const ENOPROTOOPT: ::c_int = 61; |
| 1398 |
pub const EPROTONOSUPPORT: ::c_int = 62; |
| 1399 |
pub const ESOCKTNOSUPPORT: ::c_int = 63; |
| 1400 |
pub const EOPNOTSUPP: ::c_int = 64; |
| 1401 |
pub const EPFNOSUPPORT: ::c_int = 65; |
| 1402 |
pub const EAFNOSUPPORT: ::c_int = 66; |
| 1403 |
pub const EADDRINUSE: ::c_int = 67; |
| 1404 |
pub const EADDRNOTAVAIL: ::c_int = 68; |
| 1405 |
pub const ENETDOWN: ::c_int = 69; |
| 1406 |
pub const ENETUNREACH: ::c_int = 70; |
| 1407 |
pub const ENETRESET: ::c_int = 71; |
| 1408 |
pub const ECONNABORTED: ::c_int = 72; |
| 1409 |
pub const ECONNRESET: ::c_int = 73; |
| 1410 |
pub const ENOBUFS: ::c_int = 74; |
| 1411 |
pub const EISCONN: ::c_int = 75; |
| 1412 |
pub const ENOTCONN: ::c_int = 76; |
| 1413 |
pub const ESHUTDOWN: ::c_int = 77; |
| 1414 |
pub const ETOOMANYREFS: ::c_int = 115; |
| 1415 |
pub const ETIMEDOUT: ::c_int = 78; |
| 1416 |
pub const ECONNREFUSED: ::c_int = 79; |
| 1417 |
pub const EHOSTDOWN: ::c_int = 80; |
| 1418 |
pub const EHOSTUNREACH: ::c_int = 81; |
| 1419 |
pub const EWOULDBLOCK: ::c_int = EAGAIN; |
| 1420 |
pub const EALREADY: ::c_int = 56; |
| 1421 |
pub const EINPROGRESS: ::c_int = 55; |
| 1422 |
pub const ESTALE: ::c_int = 52; |
| 1423 |
|
| 1424 |
// sys/dr.h |
| 1425 |
pub const LPAR_INFO_FORMAT1: ::c_int = 1; |
| 1426 |
pub const LPAR_INFO_FORMAT2: ::c_int = 2; |
| 1427 |
pub const WPAR_INFO_FORMAT: ::c_int = 3; |
| 1428 |
pub const PROC_MODULE_INFO: ::c_int = 4; |
| 1429 |
pub const NUM_PROC_MODULE_TYPES: ::c_int = 5; |
| 1430 |
pub const LPAR_INFO_VRME_NUM_POOLS: ::c_int = 6; |
| 1431 |
pub const LPAR_INFO_VRME_POOLS: ::c_int = 7; |
| 1432 |
pub const LPAR_INFO_VRME_LPAR: ::c_int = 8; |
| 1433 |
pub const LPAR_INFO_VRME_RESET_HWMARKS: ::c_int = 9; |
| 1434 |
pub const LPAR_INFO_VRME_ALLOW_DESIRED: ::c_int = 10; |
| 1435 |
pub const EMTP_INFO_FORMAT: ::c_int = 11; |
| 1436 |
pub const LPAR_INFO_LPM_CAPABILITY: ::c_int = 12; |
| 1437 |
pub const ENERGYSCALE_INFO: ::c_int = 13; |
| 1438 |
|
| 1439 |
// sys/file.h |
| 1440 |
pub const LOCK_SH: ::c_int = 1; |
| 1441 |
pub const LOCK_EX: ::c_int = 2; |
| 1442 |
pub const LOCK_NB: ::c_int = 4; |
| 1443 |
pub const LOCK_UN: ::c_int = 8; |
| 1444 |
|
| 1445 |
// sys/flock.h |
| 1446 |
pub const F_RDLCK: ::c_short = 0o01; |
| 1447 |
pub const F_WRLCK: ::c_short = 0o02; |
| 1448 |
pub const F_UNLCK: ::c_short = 0o03; |
| 1449 |
|
| 1450 |
// sys/fs/quota_common.h |
| 1451 |
pub const Q_QUOTAON: ::c_int = 0x100; |
| 1452 |
pub const Q_QUOTAOFF: ::c_int = 0x200; |
| 1453 |
pub const Q_SETUSE: ::c_int = 0x500; |
| 1454 |
pub const Q_SYNC: ::c_int = 0x600; |
| 1455 |
pub const Q_GETQUOTA: ::c_int = 0x300; |
| 1456 |
pub const Q_SETQLIM: ::c_int = 0x400; |
| 1457 |
pub const Q_SETQUOTA: ::c_int = 0x400; |
| 1458 |
|
| 1459 |
// sys/ioctl.h |
| 1460 |
pub const IOCPARM_MASK: ::c_int = 0x7f; |
| 1461 |
pub const IOC_VOID: ::c_int = 0x20000000; |
| 1462 |
pub const IOC_OUT: ::c_int = 0x40000000; |
| 1463 |
pub const IOC_IN: ::c_int = 0x40000000 << 1; |
| 1464 |
pub const IOC_INOUT: ::c_int = IOC_IN | IOC_OUT; |
| 1465 |
pub const FIOCLEX: ::c_int = 536897025; |
| 1466 |
pub const FIONCLEX: ::c_int = 536897026; |
| 1467 |
pub const FIONREAD: ::c_int = 1074030207; |
| 1468 |
pub const FIONBIO: ::c_int = -2147195266; |
| 1469 |
pub const FIOASYNC: ::c_int = -2147195267; |
| 1470 |
pub const FIOSETOWN: ::c_int = -2147195268; |
| 1471 |
pub const FIOGETOWN: ::c_int = 1074030203; |
| 1472 |
pub const TIOCGETD: ::c_int = 0x40047400; |
| 1473 |
pub const TIOCSETD: ::c_int = 0x80047401; |
| 1474 |
pub const TIOCHPCL: ::c_int = 0x20007402; |
| 1475 |
pub const TIOCMODG: ::c_int = 0x40047403; |
| 1476 |
pub const TIOCMODS: ::c_int = 0x80047404; |
| 1477 |
pub const TIOCM_LE: ::c_int = 0x1; |
| 1478 |
pub const TIOCM_DTR: ::c_int = 0x2; |
| 1479 |
pub const TIOCM_RTS: ::c_int = 0x4; |
| 1480 |
pub const TIOCM_ST: ::c_int = 0x8; |
| 1481 |
pub const TIOCM_SR: ::c_int = 0x10; |
| 1482 |
pub const TIOCM_CTS: ::c_int = 0x20; |
| 1483 |
pub const TIOCM_CAR: ::c_int = 0x40; |
| 1484 |
pub const TIOCM_CD: ::c_int = 0x40; |
| 1485 |
pub const TIOCM_RNG: ::c_int = 0x80; |
| 1486 |
pub const TIOCM_RI: ::c_int = 0x80; |
| 1487 |
pub const TIOCM_DSR: ::c_int = 0x100; |
| 1488 |
pub const TIOCGETP: ::c_int = 0x40067408; |
| 1489 |
pub const TIOCSETP: ::c_int = 0x80067409; |
| 1490 |
pub const TIOCSETN: ::c_int = 0x8006740a; |
| 1491 |
pub const TIOCEXCL: ::c_int = 0x2000740d; |
| 1492 |
pub const TIOCNXCL: ::c_int = 0x2000740e; |
| 1493 |
pub const TIOCFLUSH: ::c_int = 0x80047410; |
| 1494 |
pub const TIOCSETC: ::c_int = 0x80067411; |
| 1495 |
pub const TIOCGETC: ::c_int = 0x40067412; |
| 1496 |
pub const TANDEM: ::c_int = 0x1; |
| 1497 |
pub const CBREAK: ::c_int = 0x2; |
| 1498 |
pub const LCASE: ::c_int = 0x4; |
| 1499 |
pub const MDMBUF: ::c_int = 0x800000; |
| 1500 |
pub const XTABS: ::c_int = 0xc00; |
| 1501 |
pub const SIOCADDMULTI: ::c_int = -2145359567; |
| 1502 |
pub const SIOCADDRT: ::c_int = -2143784438; |
| 1503 |
pub const SIOCDARP: ::c_int = -2142476000; |
| 1504 |
pub const SIOCDELMULTI: ::c_int = -2145359566; |
| 1505 |
pub const SIOCDELRT: ::c_int = -2143784437; |
| 1506 |
pub const SIOCDIFADDR: ::c_int = -2144835303; |
| 1507 |
pub const SIOCGARP: ::c_int = -1068734170; |
| 1508 |
pub const SIOCGIFADDR: ::c_int = -1071093471; |
| 1509 |
pub const SIOCGIFBRDADDR: ::c_int = -1071093469; |
| 1510 |
pub const SIOCGIFCONF: ::c_int = -1072666299; |
| 1511 |
pub const SIOCGIFDSTADDR: ::c_int = -1071093470; |
| 1512 |
pub const SIOCGIFFLAGS: ::c_int = -1071093487; |
| 1513 |
pub const SIOCGIFHWADDR: ::c_int = -1068209771; |
| 1514 |
pub const SIOCGIFMETRIC: ::c_int = -1071093481; |
| 1515 |
pub const SIOCGIFMTU: ::c_int = -1071093418; |
| 1516 |
pub const SIOCGIFNETMASK: ::c_int = -1071093467; |
| 1517 |
pub const SIOCSARP: ::c_int = -2142476002; |
| 1518 |
pub const SIOCSIFADDR: ::c_int = -2144835316; |
| 1519 |
pub const SIOCSIFBRDADDR: ::c_int = -2144835309; |
| 1520 |
pub const SIOCSIFDSTADDR: ::c_int = -2144835314; |
| 1521 |
pub const SIOCSIFFLAGS: ::c_int = -2144835312; |
| 1522 |
pub const SIOCSIFMETRIC: ::c_int = -2144835304; |
| 1523 |
pub const SIOCSIFMTU: ::c_int = -2144835240; |
| 1524 |
pub const SIOCSIFNETMASK: ::c_int = -2144835306; |
| 1525 |
pub const TIOCUCNTL: ::c_int = -2147191706; |
| 1526 |
pub const TIOCCONS: ::c_int = -2147191710; |
| 1527 |
pub const TIOCPKT: ::c_int = -2147191696; |
| 1528 |
pub const TIOCPKT_DATA: ::c_int = 0; |
| 1529 |
pub const TIOCPKT_FLUSHREAD: ::c_int = 1; |
| 1530 |
pub const TIOCPKT_FLUSHWRITE: ::c_int = 2; |
| 1531 |
pub const TIOCPKT_NOSTOP: ::c_int = 0x10; |
| 1532 |
pub const TIOCPKT_DOSTOP: ::c_int = 0x20; |
| 1533 |
pub const TIOCPKT_START: ::c_int = 8; |
| 1534 |
pub const TIOCPKT_STOP: ::c_int = 4; |
| 1535 |
|
| 1536 |
// sys/ipc.h |
| 1537 |
pub const IPC_ALLOC: ::c_int = 0o100000; |
| 1538 |
pub const IPC_CREAT: ::c_int = 0o020000; |
| 1539 |
pub const IPC_EXCL: ::c_int = 0o002000; |
| 1540 |
pub const IPC_NOWAIT: ::c_int = 0o004000; |
| 1541 |
pub const IPC_RMID: ::c_int = 0; |
| 1542 |
pub const IPC_SET: ::c_int = 101; |
| 1543 |
pub const IPC_R: ::c_int = 0o0400; |
| 1544 |
pub const IPC_W: ::c_int = 0o0200; |
| 1545 |
pub const IPC_O: ::c_int = 0o1000; |
| 1546 |
pub const IPC_NOERROR: ::c_int = 0o10000; |
| 1547 |
pub const IPC_STAT: ::c_int = 102; |
| 1548 |
pub const IPC_PRIVATE: ::key_t = -1; |
| 1549 |
pub const SHM_LOCK: ::c_int = 201; |
| 1550 |
pub const SHM_UNLOCK: ::c_int = 202; |
| 1551 |
|
| 1552 |
// sys/ldr.h |
| 1553 |
pub const L_GETINFO: ::c_int = 2; |
| 1554 |
pub const L_GETMESSAGE: ::c_int = 1; |
| 1555 |
pub const L_GETLIBPATH: ::c_int = 3; |
| 1556 |
pub const L_GETXINFO: ::c_int = 8; |
| 1557 |
|
| 1558 |
// sys/limits.h |
| 1559 |
pub const PATH_MAX: ::c_int = 1023; |
| 1560 |
pub const PAGESIZE: ::c_int = 4096; |
| 1561 |
pub const IOV_MAX: ::c_int = 16; |
| 1562 |
pub const AIO_LISTIO_MAX: ::c_int = 4096; |
| 1563 |
pub const PIPE_BUF: usize = 32768; |
| 1564 |
pub const OPEN_MAX: ::c_int = 65534; |
| 1565 |
pub const MAX_INPUT: ::c_int = 512; |
| 1566 |
pub const MAX_CANON: ::c_int = 256; |
| 1567 |
pub const ARG_MAX: ::c_int = 1048576; |
| 1568 |
pub const BC_BASE_MAX: ::c_int = 99; |
| 1569 |
pub const BC_DIM_MAX: ::c_int = 0x800; |
| 1570 |
pub const BC_SCALE_MAX: ::c_int = 99; |
| 1571 |
pub const BC_STRING_MAX: ::c_int = 0x800; |
| 1572 |
pub const CHARCLASS_NAME_MAX: ::c_int = 14; |
| 1573 |
pub const CHILD_MAX: ::c_int = 128; |
| 1574 |
pub const COLL_WEIGHTS_MAX: ::c_int = 4; |
| 1575 |
pub const EXPR_NEST_MAX: ::c_int = 32; |
| 1576 |
pub const NZERO: ::c_int = 20; |
| 1577 |
|
| 1578 |
// sys/lockf.h |
| 1579 |
pub const F_LOCK: ::c_int = 1; |
| 1580 |
pub const F_TEST: ::c_int = 3; |
| 1581 |
pub const F_TLOCK: ::c_int = 2; |
| 1582 |
pub const F_ULOCK: ::c_int = 0; |
| 1583 |
|
| 1584 |
// sys/machine.h |
| 1585 |
pub const BIG_ENDIAN: ::c_int = 4321; |
| 1586 |
pub const LITTLE_ENDIAN: ::c_int = 1234; |
| 1587 |
pub const PDP_ENDIAN: ::c_int = 3412; |
| 1588 |
|
| 1589 |
// sys/mman.h |
| 1590 |
pub const PROT_NONE: ::c_int = 0; |
| 1591 |
pub const PROT_READ: ::c_int = 1; |
| 1592 |
pub const PROT_WRITE: ::c_int = 2; |
| 1593 |
pub const PROT_EXEC: ::c_int = 4; |
| 1594 |
pub const MAP_FILE: ::c_int = 0; |
| 1595 |
pub const MAP_SHARED: ::c_int = 1; |
| 1596 |
pub const MAP_PRIVATE: ::c_int = 2; |
| 1597 |
pub const MAP_FIXED: ::c_int = 0x100; |
| 1598 |
pub const MAP_ANON: ::c_int = 0x10; |
| 1599 |
pub const MAP_ANONYMOUS: ::c_int = 0x10; |
| 1600 |
pub const MAP_FAILED: *mut ::c_void = !0 as *mut ::c_void; |
| 1601 |
pub const MAP_TYPE: ::c_int = 0xf0; |
| 1602 |
pub const MCL_CURRENT: ::c_int = 0x100; |
| 1603 |
pub const MCL_FUTURE: ::c_int = 0x200; |
| 1604 |
pub const MS_SYNC: ::c_int = 0x20; |
| 1605 |
pub const MS_ASYNC: ::c_int = 0x10; |
| 1606 |
pub const MS_INVALIDATE: ::c_int = 0x40; |
| 1607 |
pub const POSIX_MADV_NORMAL: ::c_int = 1; |
| 1608 |
pub const POSIX_MADV_RANDOM: ::c_int = 3; |
| 1609 |
pub const POSIX_MADV_SEQUENTIAL: ::c_int = 2; |
| 1610 |
pub const POSIX_MADV_WILLNEED: ::c_int = 4; |
| 1611 |
pub const POSIX_MADV_DONTNEED: ::c_int = 5; |
| 1612 |
pub const MADV_NORMAL: ::c_int = 0; |
| 1613 |
pub const MADV_RANDOM: ::c_int = 1; |
| 1614 |
pub const MADV_SEQUENTIAL: ::c_int = 2; |
| 1615 |
pub const MADV_WILLNEED: ::c_int = 3; |
| 1616 |
pub const MADV_DONTNEED: ::c_int = 4; |
| 1617 |
|
| 1618 |
// sys/mode.h |
| 1619 |
pub const S_IFMT: mode_t = 0o170000; |
| 1620 |
pub const S_IFREG: mode_t = 0o100000; |
| 1621 |
pub const S_IFDIR: mode_t = 0o40000; |
| 1622 |
pub const S_IFBLK: mode_t = 0o60000; |
| 1623 |
pub const S_IFCHR: mode_t = 0o20000; |
| 1624 |
pub const S_IFIFO: mode_t = 0o10000; |
| 1625 |
pub const S_IRWXU: mode_t = 0o700; |
| 1626 |
pub const S_IRUSR: mode_t = 0o400; |
| 1627 |
pub const S_IWUSR: mode_t = 0o200; |
| 1628 |
pub const S_IXUSR: mode_t = 0o100; |
| 1629 |
pub const S_IRWXG: mode_t = 0o70; |
| 1630 |
pub const S_IRGRP: mode_t = 0o40; |
| 1631 |
pub const S_IWGRP: mode_t = 0o20; |
| 1632 |
pub const S_IXGRP: mode_t = 0o10; |
| 1633 |
pub const S_IRWXO: mode_t = 7; |
| 1634 |
pub const S_IROTH: mode_t = 4; |
| 1635 |
pub const S_IWOTH: mode_t = 2; |
| 1636 |
pub const S_IXOTH: mode_t = 1; |
| 1637 |
pub const S_IFLNK: mode_t = 0o120000; |
| 1638 |
pub const S_IFSOCK: mode_t = 0o140000; |
| 1639 |
pub const S_IEXEC: mode_t = 0o100; |
| 1640 |
pub const S_IWRITE: mode_t = 0o200; |
| 1641 |
pub const S_IREAD: mode_t = 0o400; |
| 1642 |
|
| 1643 |
// sys/msg.h |
| 1644 |
pub const MSG_NOERROR: ::c_int = 0o10000; |
| 1645 |
|
| 1646 |
// sys/m_signal.h |
| 1647 |
pub const SIGSTKSZ: ::size_t = 4096; |
| 1648 |
pub const MINSIGSTKSZ: ::size_t = 1200; |
| 1649 |
|
| 1650 |
// sys/params.h |
| 1651 |
pub const MAXPATHLEN: ::c_int = PATH_MAX + 1; |
| 1652 |
pub const MAXSYMLINKS: ::c_int = 20; |
| 1653 |
pub const MAXHOSTNAMELEN: ::c_int = 256; |
| 1654 |
pub const MAXUPRC: ::c_int = 128; |
| 1655 |
pub const NGROUPS_MAX: ::c_ulong = 2048; |
| 1656 |
pub const NGROUPS: ::c_ulong = NGROUPS_MAX; |
| 1657 |
pub const NOFILE: ::c_int = OPEN_MAX; |
| 1658 |
|
| 1659 |
// sys/poll.h |
| 1660 |
pub const POLLIN: ::c_short = 0x0001; |
| 1661 |
pub const POLLPRI: ::c_short = 0x0004; |
| 1662 |
pub const POLLOUT: ::c_short = 0x0002; |
| 1663 |
pub const POLLERR: ::c_short = 0x4000; |
| 1664 |
pub const POLLHUP: ::c_short = 0x2000; |
| 1665 |
pub const POLLMSG: ::c_short = 0x0080; |
| 1666 |
pub const POLLSYNC: ::c_short = 0x8000; |
| 1667 |
pub const POLLNVAL: ::c_short = POLLSYNC; |
| 1668 |
pub const POLLNORM: ::c_short = POLLIN; |
| 1669 |
pub const POLLRDNORM: ::c_short = 0x0010; |
| 1670 |
pub const POLLWRNORM: ::c_short = POLLOUT; |
| 1671 |
pub const POLLRDBAND: ::c_short = 0x0020; |
| 1672 |
pub const POLLWRBAND: ::c_short = 0x0040; |
| 1673 |
|
| 1674 |
// sys/pollset.h |
| 1675 |
pub const PS_ADD: ::c_uchar = 0; |
| 1676 |
pub const PS_MOD: ::c_uchar = 1; |
| 1677 |
pub const PS_DELETE: ::c_uchar = 2; |
| 1678 |
pub const PS_REPLACE: ::c_uchar = 3; |
| 1679 |
|
| 1680 |
// sys/ptrace.h |
| 1681 |
pub const PT_TRACE_ME: ::c_int = 0; |
| 1682 |
pub const PT_READ_I: ::c_int = 1; |
| 1683 |
pub const PT_READ_D: ::c_int = 2; |
| 1684 |
pub const PT_WRITE_I: ::c_int = 4; |
| 1685 |
pub const PT_WRITE_D: ::c_int = 5; |
| 1686 |
pub const PT_CONTINUE: ::c_int = 7; |
| 1687 |
pub const PT_KILL: ::c_int = 8; |
| 1688 |
pub const PT_STEP: ::c_int = 9; |
| 1689 |
pub const PT_READ_GPR: ::c_int = 11; |
| 1690 |
pub const PT_READ_FPR: ::c_int = 12; |
| 1691 |
pub const PT_WRITE_GPR: ::c_int = 14; |
| 1692 |
pub const PT_WRITE_FPR: ::c_int = 15; |
| 1693 |
pub const PT_READ_BLOCK: ::c_int = 17; |
| 1694 |
pub const PT_WRITE_BLOCK: ::c_int = 19; |
| 1695 |
pub const PT_ATTACH: ::c_int = 30; |
| 1696 |
pub const PT_DETACH: ::c_int = 31; |
| 1697 |
pub const PT_REGSET: ::c_int = 32; |
| 1698 |
pub const PT_REATT: ::c_int = 33; |
| 1699 |
pub const PT_LDINFO: ::c_int = 34; |
| 1700 |
pub const PT_MULTI: ::c_int = 35; |
| 1701 |
pub const PT_NEXT: ::c_int = 36; |
| 1702 |
pub const PT_SET: ::c_int = 37; |
| 1703 |
pub const PT_CLEAR: ::c_int = 38; |
| 1704 |
pub const PT_LDXINFO: ::c_int = 39; |
| 1705 |
pub const PT_QUERY: ::c_int = 40; |
| 1706 |
pub const PT_WATCH: ::c_int = 41; |
| 1707 |
pub const PTT_CONTINUE: ::c_int = 50; |
| 1708 |
pub const PTT_STEP: ::c_int = 51; |
| 1709 |
pub const PTT_READ_SPRS: ::c_int = 52; |
| 1710 |
pub const PTT_WRITE_SPRS: ::c_int = 53; |
| 1711 |
pub const PTT_READ_GPRS: ::c_int = 54; |
| 1712 |
pub const PTT_WRITE_GPRS: ::c_int = 55; |
| 1713 |
pub const PTT_READ_FPRS: ::c_int = 56; |
| 1714 |
pub const PTT_WRITE_FPRS: ::c_int = 57; |
| 1715 |
pub const PTT_READ_VEC: ::c_int = 58; |
| 1716 |
pub const PTT_WRITE_VEC: ::c_int = 59; |
| 1717 |
pub const PTT_WATCH: ::c_int = 60; |
| 1718 |
pub const PTT_SET_TRAP: ::c_int = 61; |
| 1719 |
pub const PTT_CLEAR_TRAP: ::c_int = 62; |
| 1720 |
pub const PTT_READ_UKEYSET: ::c_int = 63; |
| 1721 |
pub const PT_GET_UKEY: ::c_int = 64; |
| 1722 |
pub const PTT_READ_FPSCR_HI: ::c_int = 65; |
| 1723 |
pub const PTT_WRITE_FPSCR_HI: ::c_int = 66; |
| 1724 |
pub const PTT_READ_VSX: ::c_int = 67; |
| 1725 |
pub const PTT_WRITE_VSX: ::c_int = 68; |
| 1726 |
pub const PTT_READ_TM: ::c_int = 69; |
| 1727 |
pub const PTRACE_ATTACH: ::c_int = 14; |
| 1728 |
pub const PTRACE_CONT: ::c_int = 7; |
| 1729 |
pub const PTRACE_DETACH: ::c_int = 15; |
| 1730 |
pub const PTRACE_GETFPREGS: ::c_int = 12; |
| 1731 |
pub const PTRACE_GETREGS: ::c_int = 10; |
| 1732 |
pub const PTRACE_KILL: ::c_int = 8; |
| 1733 |
pub const PTRACE_PEEKDATA: ::c_int = 2; |
| 1734 |
pub const PTRACE_PEEKTEXT: ::c_int = 1; |
| 1735 |
pub const PTRACE_PEEKUSER: ::c_int = 3; |
| 1736 |
pub const PTRACE_POKEDATA: ::c_int = 5; |
| 1737 |
pub const PTRACE_POKETEXT: ::c_int = 4; |
| 1738 |
pub const PTRACE_POKEUSER: ::c_int = 6; |
| 1739 |
pub const PTRACE_SETFPREGS: ::c_int = 13; |
| 1740 |
pub const PTRACE_SETREGS: ::c_int = 11; |
| 1741 |
pub const PTRACE_SINGLESTEP: ::c_int = 9; |
| 1742 |
pub const PTRACE_SYSCALL: ::c_int = 16; |
| 1743 |
pub const PTRACE_TRACEME: ::c_int = 0; |
| 1744 |
|
| 1745 |
// sys/resource.h |
| 1746 |
pub const RLIMIT_CPU: ::c_int = 0; |
| 1747 |
pub const RLIMIT_FSIZE: ::c_int = 1; |
| 1748 |
pub const RLIMIT_DATA: ::c_int = 2; |
| 1749 |
pub const RLIMIT_STACK: ::c_int = 3; |
| 1750 |
pub const RLIMIT_CORE: ::c_int = 4; |
| 1751 |
pub const RLIMIT_RSS: ::c_int = 5; |
| 1752 |
pub const RLIMIT_AS: ::c_int = 6; |
| 1753 |
pub const RLIMIT_NOFILE: ::c_int = 7; |
| 1754 |
pub const RLIMIT_THREADS: ::c_int = 8; |
| 1755 |
pub const RLIMIT_NPROC: ::c_int = 9; |
| 1756 |
pub const RUSAGE_SELF: ::c_int = 0; |
| 1757 |
pub const RUSAGE_CHILDREN: ::c_int = -1; |
| 1758 |
pub const PRIO_PROCESS: ::c_int = 0; |
| 1759 |
pub const PRIO_PGRP: ::c_int = 1; |
| 1760 |
pub const PRIO_USER: ::c_int = 2; |
| 1761 |
pub const RUSAGE_THREAD: ::c_int = 1; |
| 1762 |
pub const RLIM_SAVED_MAX: ::c_ulong = RLIM_INFINITY - 1; |
| 1763 |
pub const RLIM_SAVED_CUR: ::c_ulong = RLIM_INFINITY - 2; |
| 1764 |
#[deprecated(since = "0.2.64", note = "Not stable across OS versions")] |
| 1765 |
pub const RLIM_NLIMITS: ::c_int = 10; |
| 1766 |
|
| 1767 |
// sys/sched.h |
| 1768 |
pub const SCHED_OTHER: ::c_int = 0; |
| 1769 |
pub const SCHED_FIFO: ::c_int = 1; |
| 1770 |
pub const SCHED_RR: ::c_int = 2; |
| 1771 |
pub const SCHED_LOCAL: ::c_int = 3; |
| 1772 |
pub const SCHED_GLOBAL: ::c_int = 4; |
| 1773 |
pub const SCHED_FIFO2: ::c_int = 5; |
| 1774 |
pub const SCHED_FIFO3: ::c_int = 6; |
| 1775 |
pub const SCHED_FIFO4: ::c_int = 7; |
| 1776 |
|
| 1777 |
// sys/sem.h |
| 1778 |
pub const SEM_UNDO: ::c_int = 0o10000; |
| 1779 |
pub const GETNCNT: ::c_int = 3; |
| 1780 |
pub const GETPID: ::c_int = 4; |
| 1781 |
pub const GETVAL: ::c_int = 5; |
| 1782 |
pub const GETALL: ::c_int = 6; |
| 1783 |
pub const GETZCNT: ::c_int = 7; |
| 1784 |
pub const SETVAL: ::c_int = 8; |
| 1785 |
pub const SETALL: ::c_int = 9; |
| 1786 |
|
| 1787 |
// sys/shm.h |
| 1788 |
pub const SHMLBA: ::c_int = 0x10000000; |
| 1789 |
pub const SHMLBA_EXTSHM: ::c_int = 0x1000; |
| 1790 |
pub const SHM_SHMAT: ::c_int = 0x80000000; |
| 1791 |
pub const SHM_RDONLY: ::c_int = 0o10000; |
| 1792 |
pub const SHM_RND: ::c_int = 0o20000; |
| 1793 |
pub const SHM_PIN: ::c_int = 0o4000; |
| 1794 |
pub const SHM_LGPAGE: ::c_int = 0o20000000000; |
| 1795 |
pub const SHM_MAP: ::c_int = 0o4000; |
| 1796 |
pub const SHM_FMAP: ::c_int = 0o2000; |
| 1797 |
pub const SHM_COPY: ::c_int = 0o40000; |
| 1798 |
pub const SHM_CLEAR: ::c_int = 0; |
| 1799 |
pub const SHM_HGSEG: ::c_int = 0o10000000000; |
| 1800 |
pub const SHM_R: ::c_int = IPC_R; |
| 1801 |
pub const SHM_W: ::c_int = IPC_W; |
| 1802 |
pub const SHM_DEST: ::c_int = 0o2000; |
| 1803 |
|
| 1804 |
// sys/signal.h |
| 1805 |
pub const SA_ONSTACK: ::c_int = 0x00000001; |
| 1806 |
pub const SA_RESETHAND: ::c_int = 0x00000002; |
| 1807 |
pub const SA_RESTART: ::c_int = 0x00000008; |
| 1808 |
pub const SA_SIGINFO: ::c_int = 0x00000100; |
| 1809 |
pub const SA_NODEFER: ::c_int = 0x00000200; |
| 1810 |
pub const SA_NOCLDWAIT: ::c_int = 0x00000400; |
| 1811 |
pub const SA_NOCLDSTOP: ::c_int = 0x00000004; |
| 1812 |
pub const SS_ONSTACK: ::c_int = 0x00000001; |
| 1813 |
pub const SS_DISABLE: ::c_int = 0x00000002; |
| 1814 |
pub const SIGCHLD: ::c_int = 20; |
| 1815 |
pub const SIGBUS: ::c_int = 10; |
| 1816 |
pub const SIG_BLOCK: ::c_int = 0; |
| 1817 |
pub const SIG_UNBLOCK: ::c_int = 1; |
| 1818 |
pub const SIG_SETMASK: ::c_int = 2; |
| 1819 |
pub const SIGEV_NONE: ::c_int = 1; |
| 1820 |
pub const SIGEV_SIGNAL: ::c_int = 2; |
| 1821 |
pub const SIGEV_THREAD: ::c_int = 3; |
| 1822 |
pub const SIGHUP: ::c_int = 1; |
| 1823 |
pub const SIGINT: ::c_int = 2; |
| 1824 |
pub const SIGQUIT: ::c_int = 3; |
| 1825 |
pub const SIGILL: ::c_int = 4; |
| 1826 |
pub const SIGABRT: ::c_int = 6; |
| 1827 |
pub const SIGEMT: ::c_int = 7; |
| 1828 |
pub const SIGFPE: ::c_int = 8; |
| 1829 |
pub const SIGKILL: ::c_int = 9; |
| 1830 |
pub const SIGSEGV: ::c_int = 11; |
| 1831 |
pub const SIGSYS: ::c_int = 12; |
| 1832 |
pub const SIGPIPE: ::c_int = 13; |
| 1833 |
pub const SIGALRM: ::c_int = 14; |
| 1834 |
pub const SIGTERM: ::c_int = 15; |
| 1835 |
pub const SIGUSR1: ::c_int = 30; |
| 1836 |
pub const SIGUSR2: ::c_int = 31; |
| 1837 |
pub const SIGPWR: ::c_int = 29; |
| 1838 |
pub const SIGWINCH: ::c_int = 28; |
| 1839 |
pub const SIGURG: ::c_int = 16; |
| 1840 |
pub const SIGPOLL: ::c_int = SIGIO; |
| 1841 |
pub const SIGIO: ::c_int = 23; |
| 1842 |
pub const SIGSTOP: ::c_int = 17; |
| 1843 |
pub const SIGTSTP: ::c_int = 18; |
| 1844 |
pub const SIGCONT: ::c_int = 19; |
| 1845 |
pub const SIGTTIN: ::c_int = 21; |
| 1846 |
pub const SIGTTOU: ::c_int = 22; |
| 1847 |
pub const SIGVTALRM: ::c_int = 34; |
| 1848 |
pub const SIGPROF: ::c_int = 32; |
| 1849 |
pub const SIGXCPU: ::c_int = 24; |
| 1850 |
pub const SIGXFSZ: ::c_int = 25; |
| 1851 |
pub const SIGTRAP: ::c_int = 5; |
| 1852 |
pub const SIGCLD: ::c_int = 20; |
| 1853 |
pub const SIGRTMAX: ::c_int = 57; |
| 1854 |
pub const SIGRTMIN: ::c_int = 50; |
| 1855 |
pub const SI_USER: ::c_int = 0; |
| 1856 |
pub const SI_UNDEFINED: ::c_int = 8; |
| 1857 |
pub const SI_EMPTY: ::c_int = 9; |
| 1858 |
pub const BUS_ADRALN: ::c_int = 1; |
| 1859 |
pub const BUS_ADRERR: ::c_int = 2; |
| 1860 |
pub const BUS_OBJERR: ::c_int = 3; |
| 1861 |
pub const BUS_UEGARD: ::c_int = 4; |
| 1862 |
pub const CLD_EXITED: ::c_int = 10; |
| 1863 |
pub const CLD_KILLED: ::c_int = 11; |
| 1864 |
pub const CLD_DUMPED: ::c_int = 12; |
| 1865 |
pub const CLD_TRAPPED: ::c_int = 13; |
| 1866 |
pub const CLD_STOPPED: ::c_int = 14; |
| 1867 |
pub const CLD_CONTINUED: ::c_int = 15; |
| 1868 |
pub const FPE_INTDIV: ::c_int = 20; |
| 1869 |
pub const FPE_INTOVF: ::c_int = 21; |
| 1870 |
pub const FPE_FLTDIV: ::c_int = 22; |
| 1871 |
pub const FPE_FLTOVF: ::c_int = 23; |
| 1872 |
pub const FPE_FLTUND: ::c_int = 24; |
| 1873 |
pub const FPE_FLTRES: ::c_int = 25; |
| 1874 |
pub const FPE_FLTINV: ::c_int = 26; |
| 1875 |
pub const FPE_FLTSUB: ::c_int = 27; |
| 1876 |
pub const ILL_ILLOPC: ::c_int = 30; |
| 1877 |
pub const ILL_ILLOPN: ::c_int = 31; |
| 1878 |
pub const ILL_ILLADR: ::c_int = 32; |
| 1879 |
pub const ILL_ILLTRP: ::c_int = 33; |
| 1880 |
pub const ILL_PRVOPC: ::c_int = 34; |
| 1881 |
pub const ILL_PRVREG: ::c_int = 35; |
| 1882 |
pub const ILL_COPROC: ::c_int = 36; |
| 1883 |
pub const ILL_BADSTK: ::c_int = 37; |
| 1884 |
pub const ILL_TMBADTHING: ::c_int = 38; |
| 1885 |
pub const POLL_IN: ::c_int = 40; |
| 1886 |
pub const POLL_OUT: ::c_int = 41; |
| 1887 |
pub const POLL_MSG: ::c_int = -3; |
| 1888 |
pub const POLL_ERR: ::c_int = 43; |
| 1889 |
pub const POLL_PRI: ::c_int = 44; |
| 1890 |
pub const POLL_HUP: ::c_int = 45; |
| 1891 |
pub const SEGV_MAPERR: ::c_int = 50; |
| 1892 |
pub const SEGV_ACCERR: ::c_int = 51; |
| 1893 |
pub const SEGV_KEYERR: ::c_int = 52; |
| 1894 |
pub const TRAP_BRKPT: ::c_int = 60; |
| 1895 |
pub const TRAP_TRACE: ::c_int = 61; |
| 1896 |
pub const SI_QUEUE: ::c_int = 71; |
| 1897 |
pub const SI_TIMER: ::c_int = 72; |
| 1898 |
pub const SI_ASYNCIO: ::c_int = 73; |
| 1899 |
pub const SI_MESGQ: ::c_int = 74; |
| 1900 |
|
| 1901 |
// sys/socket.h |
| 1902 |
pub const AF_UNSPEC: ::c_int = 0; |
| 1903 |
pub const AF_UNIX: ::c_int = 1; |
| 1904 |
pub const AF_INET: ::c_int = 2; |
| 1905 |
pub const AF_IMPLINK: ::c_int = 3; |
| 1906 |
pub const AF_PUP: ::c_int = 4; |
| 1907 |
pub const AF_CHAOS: ::c_int = 5; |
| 1908 |
pub const AF_NS: ::c_int = 6; |
| 1909 |
pub const AF_ECMA: ::c_int = 8; |
| 1910 |
pub const AF_DATAKIT: ::c_int = 9; |
| 1911 |
pub const AF_CCITT: ::c_int = 10; |
| 1912 |
pub const AF_SNA: ::c_int = 11; |
| 1913 |
pub const AF_DECnet: ::c_int = 12; |
| 1914 |
pub const AF_DLI: ::c_int = 13; |
| 1915 |
pub const AF_LAT: ::c_int = 14; |
| 1916 |
pub const SO_TIMESTAMPNS: ::c_int = 0x100a; |
| 1917 |
pub const SOMAXCONN: ::c_int = 1024; |
| 1918 |
pub const AF_LOCAL: ::c_int = AF_UNIX; |
| 1919 |
pub const UIO_MAXIOV: ::c_int = 1024; |
| 1920 |
pub const pseudo_AF_XTP: ::c_int = 19; |
| 1921 |
pub const AF_HYLINK: ::c_int = 15; |
| 1922 |
pub const AF_APPLETALK: ::c_int = 16; |
| 1923 |
pub const AF_ISO: ::c_int = 7; |
| 1924 |
pub const AF_OSI: ::c_int = AF_ISO; |
| 1925 |
pub const AF_ROUTE: ::c_int = 17; |
| 1926 |
pub const AF_LINK: ::c_int = 18; |
| 1927 |
pub const AF_INET6: ::c_int = 24; |
| 1928 |
pub const AF_INTF: ::c_int = 20; |
| 1929 |
pub const AF_RIF: ::c_int = 21; |
| 1930 |
pub const AF_NDD: ::c_int = 23; |
| 1931 |
pub const AF_MAX: ::c_int = 30; |
| 1932 |
pub const PF_UNSPEC: ::c_int = AF_UNSPEC; |
| 1933 |
pub const PF_UNIX: ::c_int = AF_UNIX; |
| 1934 |
pub const PF_INET: ::c_int = AF_INET; |
| 1935 |
pub const PF_IMPLINK: ::c_int = AF_IMPLINK; |
| 1936 |
pub const PF_PUP: ::c_int = AF_PUP; |
| 1937 |
pub const PF_CHAOS: ::c_int = AF_CHAOS; |
| 1938 |
pub const PF_NS: ::c_int = AF_NS; |
| 1939 |
pub const PF_ISO: ::c_int = AF_ISO; |
| 1940 |
pub const PF_OSI: ::c_int = AF_ISO; |
| 1941 |
pub const PF_ECMA: ::c_int = AF_ECMA; |
| 1942 |
pub const PF_DATAKIT: ::c_int = AF_DATAKIT; |
| 1943 |
pub const PF_CCITT: ::c_int = AF_CCITT; |
| 1944 |
pub const PF_SNA: ::c_int = AF_SNA; |
| 1945 |
pub const PF_DECnet: ::c_int = AF_DECnet; |
| 1946 |
pub const PF_DLI: ::c_int = AF_DLI; |
| 1947 |
pub const PF_LAT: ::c_int = AF_LAT; |
| 1948 |
pub const PF_HYLINK: ::c_int = AF_HYLINK; |
| 1949 |
pub const PF_APPLETALK: ::c_int = AF_APPLETALK; |
| 1950 |
pub const PF_ROUTE: ::c_int = AF_ROUTE; |
| 1951 |
pub const PF_LINK: ::c_int = AF_LINK; |
| 1952 |
pub const PF_XTP: ::c_int = 19; |
| 1953 |
pub const PF_RIF: ::c_int = AF_RIF; |
| 1954 |
pub const PF_INTF: ::c_int = AF_INTF; |
| 1955 |
pub const PF_NDD: ::c_int = AF_NDD; |
| 1956 |
pub const PF_INET6: ::c_int = AF_INET6; |
| 1957 |
pub const PF_MAX: ::c_int = AF_MAX; |
| 1958 |
pub const SF_CLOSE: ::c_int = 1; |
| 1959 |
pub const SF_REUSE: ::c_int = 2; |
| 1960 |
pub const SF_DONT_CACHE: ::c_int = 4; |
| 1961 |
pub const SF_SYNC_CACHE: ::c_int = 8; |
| 1962 |
pub const SOCK_DGRAM: ::c_int = 2; |
| 1963 |
pub const SOCK_STREAM: ::c_int = 1; |
| 1964 |
pub const SOCK_RAW: ::c_int = 3; |
| 1965 |
pub const SOCK_RDM: ::c_int = 4; |
| 1966 |
pub const SOCK_SEQPACKET: ::c_int = 5; |
| 1967 |
pub const SOL_SOCKET: ::c_int = 0xffff; |
| 1968 |
pub const SO_DEBUG: ::c_int = 0x0001; |
| 1969 |
pub const SO_ACCEPTCONN: ::c_int = 0x0002; |
| 1970 |
pub const SO_REUSEADDR: ::c_int = 0x0004; |
| 1971 |
pub const SO_KEEPALIVE: ::c_int = 0x0008; |
| 1972 |
pub const SO_DONTROUTE: ::c_int = 0x0010; |
| 1973 |
pub const SO_BROADCAST: ::c_int = 0x0020; |
| 1974 |
pub const SO_USELOOPBACK: ::c_int = 0x0040; |
| 1975 |
pub const SO_LINGER: ::c_int = 0x0080; |
| 1976 |
pub const SO_OOBINLINE: ::c_int = 0x0100; |
| 1977 |
pub const SO_REUSEPORT: ::c_int = 0x0200; |
| 1978 |
pub const SO_USE_IFBUFS: ::c_int = 0x0400; |
| 1979 |
pub const SO_CKSUMRECV: ::c_int = 0x0800; |
| 1980 |
pub const SO_NOREUSEADDR: ::c_int = 0x1000; |
| 1981 |
pub const SO_KERNACCEPT: ::c_int = 0x2000; |
| 1982 |
pub const SO_NOMULTIPATH: ::c_int = 0x4000; |
| 1983 |
pub const SO_AUDIT: ::c_int = 0x8000; |
| 1984 |
pub const SO_SNDBUF: ::c_int = 0x1001; |
| 1985 |
pub const SO_RCVBUF: ::c_int = 0x1002; |
| 1986 |
pub const SO_SNDLOWAT: ::c_int = 0x1003; |
| 1987 |
pub const SO_RCVLOWAT: ::c_int = 0x1004; |
| 1988 |
pub const SO_SNDTIMEO: ::c_int = 0x1005; |
| 1989 |
pub const SO_RCVTIMEO: ::c_int = 0x1006; |
| 1990 |
pub const SO_ERROR: ::c_int = 0x1007; |
| 1991 |
pub const SO_TYPE: ::c_int = 0x1008; |
| 1992 |
pub const SCM_RIGHTS: ::c_int = 0x01; |
| 1993 |
pub const MSG_OOB: ::c_int = 0x1; |
| 1994 |
pub const MSG_PEEK: ::c_int = 0x2; |
| 1995 |
pub const MSG_DONTROUTE: ::c_int = 0x4; |
| 1996 |
pub const MSG_EOR: ::c_int = 0x8; |
| 1997 |
pub const MSG_TRUNC: ::c_int = 0x10; |
| 1998 |
pub const MSG_CTRUNC: ::c_int = 0x20; |
| 1999 |
pub const MSG_WAITALL: ::c_int = 0x40; |
| 2000 |
pub const MSG_MPEG2: ::c_int = 0x80; |
| 2001 |
pub const MSG_NOSIGNAL: ::c_int = 0x100; |
| 2002 |
pub const MSG_WAITFORONE: ::c_int = 0x200; |
| 2003 |
pub const MSG_ARGEXT: ::c_int = 0x400; |
| 2004 |
pub const MSG_NONBLOCK: ::c_int = 0x4000; |
| 2005 |
pub const MSG_COMPAT: ::c_int = 0x8000; |
| 2006 |
pub const MSG_MAXIOVLEN: ::c_int = 16; |
| 2007 |
pub const SHUT_RD: ::c_int = 0; |
| 2008 |
pub const SHUT_WR: ::c_int = 1; |
| 2009 |
pub const SHUT_RDWR: ::c_int = 2; |
| 2010 |
|
| 2011 |
// sys/stat.h |
| 2012 |
pub const UTIME_NOW: ::c_int = -2; |
| 2013 |
pub const UTIME_OMIT: ::c_int = -3; |
| 2014 |
|
| 2015 |
// sys/statvfs.h |
| 2016 |
pub const ST_RDONLY: ::c_ulong = 0x0001; |
| 2017 |
pub const ST_NOSUID: ::c_ulong = 0x0040; |
| 2018 |
pub const ST_NODEV: ::c_ulong = 0x0080; |
| 2019 |
|
| 2020 |
// sys/stropts.h |
| 2021 |
pub const I_NREAD: ::c_int = 0x20005301; |
| 2022 |
pub const I_PUSH: ::c_int = 0x20005302; |
| 2023 |
pub const I_POP: ::c_int = 0x20005303; |
| 2024 |
pub const I_LOOK: ::c_int = 0x20005304; |
| 2025 |
pub const I_FLUSH: ::c_int = 0x20005305; |
| 2026 |
pub const I_SRDOPT: ::c_int = 0x20005306; |
| 2027 |
pub const I_GRDOPT: ::c_int = 0x20005307; |
| 2028 |
pub const I_STR: ::c_int = 0x20005308; |
| 2029 |
pub const I_SETSIG: ::c_int = 0x20005309; |
| 2030 |
pub const I_GETSIG: ::c_int = 0x2000530a; |
| 2031 |
pub const I_FIND: ::c_int = 0x2000530b; |
| 2032 |
pub const I_LINK: ::c_int = 0x2000530c; |
| 2033 |
pub const I_UNLINK: ::c_int = 0x2000530d; |
| 2034 |
pub const I_PEEK: ::c_int = 0x2000530f; |
| 2035 |
pub const I_FDINSERT: ::c_int = 0x20005310; |
| 2036 |
pub const I_SENDFD: ::c_int = 0x20005311; |
| 2037 |
pub const I_RECVFD: ::c_int = 0x20005312; |
| 2038 |
pub const I_SWROPT: ::c_int = 0x20005314; |
| 2039 |
pub const I_GWROPT: ::c_int = 0x20005315; |
| 2040 |
pub const I_LIST: ::c_int = 0x20005316; |
| 2041 |
pub const I_PLINK: ::c_int = 0x2000531d; |
| 2042 |
pub const I_PUNLINK: ::c_int = 0x2000531e; |
| 2043 |
pub const I_FLUSHBAND: ::c_int = 0x20005313; |
| 2044 |
pub const I_CKBAND: ::c_int = 0x20005318; |
| 2045 |
pub const I_GETBAND: ::c_int = 0x20005319; |
| 2046 |
pub const I_ATMARK: ::c_int = 0x20005317; |
| 2047 |
pub const I_SETCLTIME: ::c_int = 0x2000531b; |
| 2048 |
pub const I_GETCLTIME: ::c_int = 0x2000531c; |
| 2049 |
pub const I_CANPUT: ::c_int = 0x2000531a; |
| 2050 |
|
| 2051 |
// sys/syslog.h |
| 2052 |
pub const LOG_CRON: ::c_int = 9 << 3; |
| 2053 |
pub const LOG_AUTHPRIV: ::c_int = 10 << 3; |
| 2054 |
pub const LOG_NFACILITIES: ::c_int = 24; |
| 2055 |
pub const LOG_PERROR: ::c_int = 0x20; |
| 2056 |
|
| 2057 |
// sys/systemcfg.h |
| 2058 |
pub const SC_ARCH: ::c_int = 1; |
| 2059 |
pub const SC_IMPL: ::c_int = 2; |
| 2060 |
pub const SC_VERS: ::c_int = 3; |
| 2061 |
pub const SC_WIDTH: ::c_int = 4; |
| 2062 |
pub const SC_NCPUS: ::c_int = 5; |
| 2063 |
pub const SC_L1C_ATTR: ::c_int = 6; |
| 2064 |
pub const SC_L1C_ISZ: ::c_int = 7; |
| 2065 |
pub const SC_L1C_DSZ: ::c_int = 8; |
| 2066 |
pub const SC_L1C_ICA: ::c_int = 9; |
| 2067 |
pub const SC_L1C_DCA: ::c_int = 10; |
| 2068 |
pub const SC_L1C_IBS: ::c_int = 11; |
| 2069 |
pub const SC_L1C_DBS: ::c_int = 12; |
| 2070 |
pub const SC_L1C_ILS: ::c_int = 13; |
| 2071 |
pub const SC_L1C_DLS: ::c_int = 14; |
| 2072 |
pub const SC_L2C_SZ: ::c_int = 15; |
| 2073 |
pub const SC_L2C_AS: ::c_int = 16; |
| 2074 |
pub const SC_TLB_ATTR: ::c_int = 17; |
| 2075 |
pub const SC_ITLB_SZ: ::c_int = 18; |
| 2076 |
pub const SC_DTLB_SZ: ::c_int = 19; |
| 2077 |
pub const SC_ITLB_ATT: ::c_int = 20; |
| 2078 |
pub const SC_DTLB_ATT: ::c_int = 21; |
| 2079 |
pub const SC_RESRV_SZ: ::c_int = 22; |
| 2080 |
pub const SC_PRI_LC: ::c_int = 23; |
| 2081 |
pub const SC_PRO_LC: ::c_int = 24; |
| 2082 |
pub const SC_RTC_TYPE: ::c_int = 25; |
| 2083 |
pub const SC_VIRT_AL: ::c_int = 26; |
| 2084 |
pub const SC_CAC_CONG: ::c_int = 27; |
| 2085 |
pub const SC_MOD_ARCH: ::c_int = 28; |
| 2086 |
pub const SC_MOD_IMPL: ::c_int = 29; |
| 2087 |
pub const SC_XINT: ::c_int = 30; |
| 2088 |
pub const SC_XFRAC: ::c_int = 31; |
| 2089 |
pub const SC_KRN_ATTR: ::c_int = 32; |
| 2090 |
pub const SC_PHYSMEM: ::c_int = 33; |
| 2091 |
pub const SC_SLB_ATTR: ::c_int = 34; |
| 2092 |
pub const SC_SLB_SZ: ::c_int = 35; |
| 2093 |
pub const SC_MAX_NCPUS: ::c_int = 37; |
| 2094 |
pub const SC_MAX_REALADDR: ::c_int = 38; |
| 2095 |
pub const SC_ORIG_ENT_CAP: ::c_int = 39; |
| 2096 |
pub const SC_ENT_CAP: ::c_int = 40; |
| 2097 |
pub const SC_DISP_WHE: ::c_int = 41; |
| 2098 |
pub const SC_CAPINC: ::c_int = 42; |
| 2099 |
pub const SC_VCAPW: ::c_int = 43; |
| 2100 |
pub const SC_SPLP_STAT: ::c_int = 44; |
| 2101 |
pub const SC_SMT_STAT: ::c_int = 45; |
| 2102 |
pub const SC_SMT_TC: ::c_int = 46; |
| 2103 |
pub const SC_VMX_VER: ::c_int = 47; |
| 2104 |
pub const SC_LMB_SZ: ::c_int = 48; |
| 2105 |
pub const SC_MAX_XCPU: ::c_int = 49; |
| 2106 |
pub const SC_EC_LVL: ::c_int = 50; |
| 2107 |
pub const SC_AME_STAT: ::c_int = 51; |
| 2108 |
pub const SC_ECO_STAT: ::c_int = 52; |
| 2109 |
pub const SC_DFP_VER: ::c_int = 53; |
| 2110 |
pub const SC_VRM_STAT: ::c_int = 54; |
| 2111 |
pub const SC_PHYS_IMP: ::c_int = 55; |
| 2112 |
pub const SC_PHYS_VER: ::c_int = 56; |
| 2113 |
pub const SC_SPCM_STATUS: ::c_int = 57; |
| 2114 |
pub const SC_SPCM_MAX: ::c_int = 58; |
| 2115 |
pub const SC_TM_VER: ::c_int = 59; |
| 2116 |
pub const SC_NX_CAP: ::c_int = 60; |
| 2117 |
pub const SC_PKS_STATE: ::c_int = 61; |
| 2118 |
pub const SC_MMA_VER: ::c_int = 62; |
| 2119 |
pub const POWER_RS: ::c_int = 1; |
| 2120 |
pub const POWER_PC: ::c_int = 2; |
| 2121 |
pub const IA64: ::c_int = 3; |
| 2122 |
pub const POWER_RS1: ::c_int = 0x1; |
| 2123 |
pub const POWER_RSC: ::c_int = 0x2; |
| 2124 |
pub const POWER_RS2: ::c_int = 0x4; |
| 2125 |
pub const POWER_601: ::c_int = 0x8; |
| 2126 |
pub const POWER_604: ::c_int = 0x10; |
| 2127 |
pub const POWER_603: ::c_int = 0x20; |
| 2128 |
pub const POWER_620: ::c_int = 0x40; |
| 2129 |
pub const POWER_630: ::c_int = 0x80; |
| 2130 |
pub const POWER_A35: ::c_int = 0x100; |
| 2131 |
pub const POWER_RS64II: ::c_int = 0x200; |
| 2132 |
pub const POWER_RS64III: ::c_int = 0x400; |
| 2133 |
pub const POWER_4: ::c_int = 0x800; |
| 2134 |
pub const POWER_RS64IV: ::c_int = POWER_4; |
| 2135 |
pub const POWER_MPC7450: ::c_int = 0x1000; |
| 2136 |
pub const POWER_5: ::c_int = 0x2000; |
| 2137 |
pub const POWER_6: ::c_int = 0x4000; |
| 2138 |
pub const POWER_7: ::c_int = 0x8000; |
| 2139 |
pub const POWER_8: ::c_int = 0x10000; |
| 2140 |
pub const POWER_9: ::c_int = 0x20000; |
| 2141 |
|
| 2142 |
// sys/time.h |
| 2143 |
pub const FD_SETSIZE: usize = 65534; |
| 2144 |
pub const TIMEOFDAY: ::c_int = 9; |
| 2145 |
pub const CLOCK_REALTIME: ::clockid_t = TIMEOFDAY as clockid_t; |
| 2146 |
pub const CLOCK_MONOTONIC: ::clockid_t = 10; |
| 2147 |
pub const TIMER_ABSTIME: ::c_int = 999; |
| 2148 |
pub const ITIMER_REAL: ::c_int = 0; |
| 2149 |
pub const ITIMER_VIRTUAL: ::c_int = 1; |
| 2150 |
pub const ITIMER_PROF: ::c_int = 2; |
| 2151 |
pub const ITIMER_VIRT: ::c_int = 3; |
| 2152 |
pub const ITIMER_REAL1: ::c_int = 20; |
| 2153 |
pub const ITIMER_REAL_TH: ::c_int = ITIMER_REAL1; |
| 2154 |
pub const DST_AUST: ::c_int = 2; |
| 2155 |
pub const DST_CAN: ::c_int = 6; |
| 2156 |
pub const DST_EET: ::c_int = 5; |
| 2157 |
pub const DST_MET: ::c_int = 4; |
| 2158 |
pub const DST_NONE: ::c_int = 0; |
| 2159 |
pub const DST_USA: ::c_int = 1; |
| 2160 |
pub const DST_WET: ::c_int = 3; |
| 2161 |
|
| 2162 |
// sys/termio.h |
| 2163 |
pub const CSTART: ::tcflag_t = 0o21; |
| 2164 |
pub const CSTOP: ::tcflag_t = 0o23; |
| 2165 |
pub const TCGETA: ::c_int = TIOC | 5; |
| 2166 |
pub const TCSETA: ::c_int = TIOC | 6; |
| 2167 |
pub const TCSETAW: ::c_int = TIOC | 7; |
| 2168 |
pub const TCSETAF: ::c_int = TIOC | 8; |
| 2169 |
pub const TCSBRK: ::c_int = TIOC | 9; |
| 2170 |
pub const TCXONC: ::c_int = TIOC | 11; |
| 2171 |
pub const TCFLSH: ::c_int = TIOC | 12; |
| 2172 |
pub const TCGETS: ::c_int = TIOC | 1; |
| 2173 |
pub const TCSETS: ::c_int = TIOC | 2; |
| 2174 |
pub const TCSANOW: ::c_int = 0; |
| 2175 |
pub const TCSETSW: ::c_int = TIOC | 3; |
| 2176 |
pub const TCSADRAIN: ::c_int = 1; |
| 2177 |
pub const TCSETSF: ::c_int = TIOC | 4; |
| 2178 |
pub const TCSAFLUSH: ::c_int = 2; |
| 2179 |
pub const TCIFLUSH: ::c_int = 0; |
| 2180 |
pub const TCOFLUSH: ::c_int = 1; |
| 2181 |
pub const TCIOFLUSH: ::c_int = 2; |
| 2182 |
pub const TCOOFF: ::c_int = 0; |
| 2183 |
pub const TCOON: ::c_int = 1; |
| 2184 |
pub const TCIOFF: ::c_int = 2; |
| 2185 |
pub const TCION: ::c_int = 3; |
| 2186 |
pub const TIOC: ::c_int = 0x5400; |
| 2187 |
pub const TIOCGWINSZ: ::c_int = 0x40087468; |
| 2188 |
pub const TIOCSWINSZ: ::c_int = 0x80087467; |
| 2189 |
pub const TIOCLBIS: ::c_int = 0x8004747f; |
| 2190 |
pub const TIOCLBIC: ::c_int = 0x8004747e; |
| 2191 |
pub const TIOCLSET: ::c_int = 0x8004747d; |
| 2192 |
pub const TIOCLGET: ::c_int = 0x4004747c; |
| 2193 |
pub const TIOCSBRK: ::c_int = 0x2000747b; |
| 2194 |
pub const TIOCCBRK: ::c_int = 0x2000747a; |
| 2195 |
pub const TIOCSDTR: ::c_int = 0x20007479; |
| 2196 |
pub const TIOCCDTR: ::c_int = 0x20007478; |
| 2197 |
pub const TIOCSLTC: ::c_int = 0x80067475; |
| 2198 |
pub const TIOCGLTC: ::c_int = 0x40067474; |
| 2199 |
pub const TIOCOUTQ: ::c_int = 0x40047473; |
| 2200 |
pub const TIOCNOTTY: ::c_int = 0x20007471; |
| 2201 |
pub const TIOCSTOP: ::c_int = 0x2000746f; |
| 2202 |
pub const TIOCSTART: ::c_int = 0x2000746e; |
| 2203 |
pub const TIOCGPGRP: ::c_int = 0x40047477; |
| 2204 |
pub const TIOCSPGRP: ::c_int = 0x80047476; |
| 2205 |
pub const TIOCGSID: ::c_int = 0x40047448; |
| 2206 |
pub const TIOCSTI: ::c_int = 0x80017472; |
| 2207 |
pub const TIOCMSET: ::c_int = 0x8004746d; |
| 2208 |
pub const TIOCMBIS: ::c_int = 0x8004746c; |
| 2209 |
pub const TIOCMBIC: ::c_int = 0x8004746b; |
| 2210 |
pub const TIOCMGET: ::c_int = 0x4004746a; |
| 2211 |
pub const TIOCREMOTE: ::c_int = 0x80047469; |
| 2212 |
|
| 2213 |
// sys/user.h |
| 2214 |
pub const MAXCOMLEN: ::c_int = 32; |
| 2215 |
pub const UF_SYSTEM: ::c_int = 0x1000; |
| 2216 |
|
| 2217 |
// sys/vattr.h |
| 2218 |
pub const AT_FLAGS: ::c_int = 0x80; |
| 2219 |
pub const AT_GID: ::c_int = 8; |
| 2220 |
pub const AT_UID: ::c_int = 4; |
| 2221 |
|
| 2222 |
// sys/wait.h |
| 2223 |
pub const P_ALL: ::c_int = 0; |
| 2224 |
pub const P_PID: ::c_int = 1; |
| 2225 |
pub const P_PGID: ::c_int = 2; |
| 2226 |
pub const WNOHANG: ::c_int = 0x1; |
| 2227 |
pub const WUNTRACED: ::c_int = 0x2; |
| 2228 |
pub const WEXITED: ::c_int = 0x04; |
| 2229 |
pub const WCONTINUED: ::c_int = 0x01000000; |
| 2230 |
pub const WNOWAIT: ::c_int = 0x10; |
| 2231 |
pub const WSTOPPED: ::c_int = _W_STOPPED; |
| 2232 |
pub const _W_STOPPED: ::c_int = 0x00000040; |
| 2233 |
pub const _W_SLWTED: ::c_int = 0x0000007c; |
| 2234 |
pub const _W_SEWTED: ::c_int = 0x0000007d; |
| 2235 |
pub const _W_SFWTED: ::c_int = 0x0000007e; |
| 2236 |
pub const _W_STRC: ::c_int = 0x0000007f; |
| 2237 |
|
| 2238 |
// termios.h |
| 2239 |
pub const NCCS: usize = 16; |
| 2240 |
pub const OLCUC: ::tcflag_t = 2; |
| 2241 |
pub const CSIZE: ::tcflag_t = 0x00000030; |
| 2242 |
pub const CS5: ::tcflag_t = 0x00000000; |
| 2243 |
pub const CS6: ::tcflag_t = 0x00000010; |
| 2244 |
pub const CS7: ::tcflag_t = 0x00000020; |
| 2245 |
pub const CS8: ::tcflag_t = 0x00000030; |
| 2246 |
pub const CSTOPB: ::tcflag_t = 0x00000040; |
| 2247 |
pub const ECHO: ::tcflag_t = 0x20000; |
| 2248 |
pub const ECHOE: ::tcflag_t = 0x00000010; |
| 2249 |
pub const ECHOK: ::tcflag_t = 0x00000020; |
| 2250 |
pub const ECHONL: ::tcflag_t = 0x00000040; |
| 2251 |
pub const ECHOCTL: ::tcflag_t = 0x00020000; |
| 2252 |
pub const ECHOPRT: ::tcflag_t = 0x00040000; |
| 2253 |
pub const ECHOKE: ::tcflag_t = 0x00080000; |
| 2254 |
pub const IGNBRK: ::tcflag_t = 0x00000001; |
| 2255 |
pub const BRKINT: ::tcflag_t = 0x00000002; |
| 2256 |
pub const IGNPAR: ::tcflag_t = 0x00000004; |
| 2257 |
pub const PARMRK: ::tcflag_t = 0x00000008; |
| 2258 |
pub const INPCK: ::tcflag_t = 0x00000010; |
| 2259 |
pub const ISTRIP: ::tcflag_t = 0x00000020; |
| 2260 |
pub const INLCR: ::tcflag_t = 0x00000040; |
| 2261 |
pub const IGNCR: ::tcflag_t = 0x00000080; |
| 2262 |
pub const ICRNL: ::tcflag_t = 0x00000100; |
| 2263 |
pub const IXON: ::tcflag_t = 0x0001; |
| 2264 |
pub const IXOFF: ::tcflag_t = 0x00000400; |
| 2265 |
pub const IXANY: ::tcflag_t = 0x00001000; |
| 2266 |
pub const IMAXBEL: ::tcflag_t = 0x00010000; |
| 2267 |
pub const OPOST: ::tcflag_t = 0x00000001; |
| 2268 |
pub const ONLCR: ::tcflag_t = 0x00000004; |
| 2269 |
pub const OCRNL: ::tcflag_t = 0x00000008; |
| 2270 |
pub const ONOCR: ::tcflag_t = 0x00000010; |
| 2271 |
pub const ONLRET: ::tcflag_t = 0x00000020; |
| 2272 |
pub const CREAD: ::tcflag_t = 0x00000080; |
| 2273 |
pub const IEXTEN: ::tcflag_t = 0x00200000; |
| 2274 |
pub const TOSTOP: ::tcflag_t = 0x00010000; |
| 2275 |
pub const FLUSHO: ::tcflag_t = 0x00100000; |
| 2276 |
pub const PENDIN: ::tcflag_t = 0x20000000; |
| 2277 |
pub const NOFLSH: ::tcflag_t = 0x00000080; |
| 2278 |
pub const VINTR: usize = 0; |
| 2279 |
pub const VQUIT: usize = 1; |
| 2280 |
pub const VERASE: usize = 2; |
| 2281 |
pub const VKILL: usize = 3; |
| 2282 |
pub const VEOF: usize = 4; |
| 2283 |
pub const VEOL: usize = 5; |
| 2284 |
pub const VSTART: usize = 7; |
| 2285 |
pub const VSTOP: usize = 8; |
| 2286 |
pub const VSUSP: usize = 9; |
| 2287 |
pub const VMIN: usize = 4; |
| 2288 |
pub const VTIME: usize = 5; |
| 2289 |
pub const VEOL2: usize = 6; |
| 2290 |
pub const VDSUSP: usize = 10; |
| 2291 |
pub const VREPRINT: usize = 11; |
| 2292 |
pub const VDISCRD: usize = 12; |
| 2293 |
pub const VWERSE: usize = 13; |
| 2294 |
pub const VLNEXT: usize = 14; |
| 2295 |
pub const B0: ::speed_t = 0x0; |
| 2296 |
pub const B50: ::speed_t = 0x1; |
| 2297 |
pub const B75: ::speed_t = 0x2; |
| 2298 |
pub const B110: ::speed_t = 0x3; |
| 2299 |
pub const B134: ::speed_t = 0x4; |
| 2300 |
pub const B150: ::speed_t = 0x5; |
| 2301 |
pub const B200: ::speed_t = 0x6; |
| 2302 |
pub const B300: ::speed_t = 0x7; |
| 2303 |
pub const B600: ::speed_t = 0x8; |
| 2304 |
pub const B1200: ::speed_t = 0x9; |
| 2305 |
pub const B1800: ::speed_t = 0xa; |
| 2306 |
pub const B2400: ::speed_t = 0xb; |
| 2307 |
pub const B4800: ::speed_t = 0xc; |
| 2308 |
pub const B9600: ::speed_t = 0xd; |
| 2309 |
pub const B19200: ::speed_t = 0xe; |
| 2310 |
pub const B38400: ::speed_t = 0xf; |
| 2311 |
pub const EXTA: ::speed_t = B19200; |
| 2312 |
pub const EXTB: ::speed_t = B38400; |
| 2313 |
pub const IUCLC: ::tcflag_t = 0x00000800; |
| 2314 |
pub const OFILL: ::tcflag_t = 0x00000040; |
| 2315 |
pub const OFDEL: ::tcflag_t = 0x00000080; |
| 2316 |
pub const CRDLY: ::tcflag_t = 0x00000300; |
| 2317 |
pub const CR0: ::tcflag_t = 0x00000000; |
| 2318 |
pub const CR1: ::tcflag_t = 0x00000100; |
| 2319 |
pub const CR2: ::tcflag_t = 0x00000200; |
| 2320 |
pub const CR3: ::tcflag_t = 0x00000300; |
| 2321 |
pub const TABDLY: ::tcflag_t = 0x00000c00; |
| 2322 |
pub const TAB0: ::tcflag_t = 0x00000000; |
| 2323 |
pub const TAB1: ::tcflag_t = 0x00000400; |
| 2324 |
pub const TAB2: ::tcflag_t = 0x00000800; |
| 2325 |
pub const TAB3: ::tcflag_t = 0x00000c00; |
| 2326 |
pub const BSDLY: ::tcflag_t = 0x00001000; |
| 2327 |
pub const BS0: ::tcflag_t = 0x00000000; |
| 2328 |
pub const BS1: ::tcflag_t = 0x00001000; |
| 2329 |
pub const FFDLY: ::tcflag_t = 0x00002000; |
| 2330 |
pub const FF0: ::tcflag_t = 0x00000000; |
| 2331 |
pub const FF1: ::tcflag_t = 0x00002000; |
| 2332 |
pub const NLDLY: ::tcflag_t = 0x00004000; |
| 2333 |
pub const NL0: ::tcflag_t = 0x00000000; |
| 2334 |
pub const NL1: ::tcflag_t = 0x00004000; |
| 2335 |
pub const VTDLY: ::tcflag_t = 0x00008000; |
| 2336 |
pub const VT0: ::tcflag_t = 0x00000000; |
| 2337 |
pub const VT1: ::tcflag_t = 0x00008000; |
| 2338 |
pub const OXTABS: ::tcflag_t = 0x00040000; |
| 2339 |
pub const ONOEOT: ::tcflag_t = 0x00080000; |
| 2340 |
pub const CBAUD: ::tcflag_t = 0x0000000f; |
| 2341 |
pub const PARENB: ::tcflag_t = 0x00000100; |
| 2342 |
pub const PARODD: ::tcflag_t = 0x00000200; |
| 2343 |
pub const HUPCL: ::tcflag_t = 0x00000400; |
| 2344 |
pub const CLOCAL: ::tcflag_t = 0x00000800; |
| 2345 |
pub const CIBAUD: ::tcflag_t = 0x000f0000; |
| 2346 |
pub const IBSHIFT: ::tcflag_t = 16; |
| 2347 |
pub const PAREXT: ::tcflag_t = 0x00100000; |
| 2348 |
pub const ISIG: ::tcflag_t = 0x00000001; |
| 2349 |
pub const ICANON: ::tcflag_t = 0x00000002; |
| 2350 |
pub const XCASE: ::tcflag_t = 0x00000004; |
| 2351 |
pub const ALTWERASE: ::tcflag_t = 0x00400000; |
| 2352 |
|
| 2353 |
// time.h |
| 2354 |
pub const CLOCK_PROCESS_CPUTIME_ID: ::clockid_t = 11; |
| 2355 |
pub const CLOCK_THREAD_CPUTIME_ID: ::clockid_t = 12; |
| 2356 |
|
| 2357 |
// unistd.h |
| 2358 |
pub const STDIN_FILENO: ::c_int = 0; |
| 2359 |
pub const STDOUT_FILENO: ::c_int = 1; |
| 2360 |
pub const STDERR_FILENO: ::c_int = 2; |
| 2361 |
pub const _POSIX_VDISABLE: ::c_int = 0xff; |
| 2362 |
pub const _PC_LINK_MAX: ::c_int = 11; |
| 2363 |
pub const _PC_MAX_CANON: ::c_int = 12; |
| 2364 |
pub const _PC_MAX_INPUT: ::c_int = 13; |
| 2365 |
pub const _PC_NAME_MAX: ::c_int = 14; |
| 2366 |
pub const _PC_PATH_MAX: ::c_int = 16; |
| 2367 |
pub const _PC_PIPE_BUF: ::c_int = 17; |
| 2368 |
pub const _PC_NO_TRUNC: ::c_int = 15; |
| 2369 |
pub const _PC_VDISABLE: ::c_int = 18; |
| 2370 |
pub const _PC_CHOWN_RESTRICTED: ::c_int = 10; |
| 2371 |
pub const _PC_ASYNC_IO: ::c_int = 19; |
| 2372 |
pub const _PC_PRIO_IO: ::c_int = 21; |
| 2373 |
pub const _PC_SYNC_IO: ::c_int = 20; |
| 2374 |
pub const _PC_ALLOC_SIZE_MIN: ::c_int = 26; |
| 2375 |
pub const _PC_REC_INCR_XFER_SIZE: ::c_int = 27; |
| 2376 |
pub const _PC_REC_MAX_XFER_SIZE: ::c_int = 28; |
| 2377 |
pub const _PC_REC_MIN_XFER_SIZE: ::c_int = 29; |
| 2378 |
pub const _PC_REC_XFER_ALIGN: ::c_int = 30; |
| 2379 |
pub const _PC_SYMLINK_MAX: ::c_int = 25; |
| 2380 |
pub const _PC_2_SYMLINKS: ::c_int = 31; |
| 2381 |
pub const _PC_TIMESTAMP_RESOLUTION: ::c_int = 32; |
| 2382 |
pub const _PC_FILESIZEBITS: ::c_int = 22; |
| 2383 |
pub const _SC_ARG_MAX: ::c_int = 0; |
| 2384 |
pub const _SC_CHILD_MAX: ::c_int = 1; |
| 2385 |
pub const _SC_CLK_TCK: ::c_int = 2; |
| 2386 |
pub const _SC_NGROUPS_MAX: ::c_int = 3; |
| 2387 |
pub const _SC_OPEN_MAX: ::c_int = 4; |
| 2388 |
pub const _SC_JOB_CONTROL: ::c_int = 7; |
| 2389 |
pub const _SC_SAVED_IDS: ::c_int = 8; |
| 2390 |
pub const _SC_VERSION: ::c_int = 9; |
| 2391 |
pub const _SC_PASS_MAX: ::c_int = 45; |
| 2392 |
pub const _SC_PAGESIZE: ::c_int = _SC_PAGE_SIZE; |
| 2393 |
pub const _SC_PAGE_SIZE: ::c_int = 48; |
| 2394 |
pub const _SC_XOPEN_VERSION: ::c_int = 46; |
| 2395 |
pub const _SC_NPROCESSORS_CONF: ::c_int = 71; |
| 2396 |
pub const _SC_NPROCESSORS_ONLN: ::c_int = 72; |
| 2397 |
pub const _SC_STREAM_MAX: ::c_int = 5; |
| 2398 |
pub const _SC_TZNAME_MAX: ::c_int = 6; |
| 2399 |
pub const _SC_AIO_LISTIO_MAX: ::c_int = 75; |
| 2400 |
pub const _SC_AIO_MAX: ::c_int = 76; |
| 2401 |
pub const _SC_AIO_PRIO_DELTA_MAX: ::c_int = 77; |
| 2402 |
pub const _SC_ASYNCHRONOUS_IO: ::c_int = 78; |
| 2403 |
pub const _SC_DELAYTIMER_MAX: ::c_int = 79; |
| 2404 |
pub const _SC_FSYNC: ::c_int = 80; |
| 2405 |
pub const _SC_MAPPED_FILES: ::c_int = 84; |
| 2406 |
pub const _SC_MEMLOCK: ::c_int = 85; |
| 2407 |
pub const _SC_MEMLOCK_RANGE: ::c_int = 86; |
| 2408 |
pub const _SC_MEMORY_PROTECTION: ::c_int = 87; |
| 2409 |
pub const _SC_MESSAGE_PASSING: ::c_int = 88; |
| 2410 |
pub const _SC_MQ_OPEN_MAX: ::c_int = 89; |
| 2411 |
pub const _SC_MQ_PRIO_MAX: ::c_int = 90; |
| 2412 |
pub const _SC_PRIORITIZED_IO: ::c_int = 91; |
| 2413 |
pub const _SC_PRIORITY_SCHEDULING: ::c_int = 92; |
| 2414 |
pub const _SC_REALTIME_SIGNALS: ::c_int = 93; |
| 2415 |
pub const _SC_RTSIG_MAX: ::c_int = 94; |
| 2416 |
pub const _SC_SEMAPHORES: ::c_int = 95; |
| 2417 |
pub const _SC_SEM_NSEMS_MAX: ::c_int = 96; |
| 2418 |
pub const _SC_SEM_VALUE_MAX: ::c_int = 97; |
| 2419 |
pub const _SC_SHARED_MEMORY_OBJECTS: ::c_int = 98; |
| 2420 |
pub const _SC_SIGQUEUE_MAX: ::c_int = 99; |
| 2421 |
pub const _SC_SYNCHRONIZED_IO: ::c_int = 100; |
| 2422 |
pub const _SC_TIMERS: ::c_int = 102; |
| 2423 |
pub const _SC_TIMER_MAX: ::c_int = 103; |
| 2424 |
pub const _SC_2_C_BIND: ::c_int = 51; |
| 2425 |
pub const _SC_2_C_DEV: ::c_int = 32; |
| 2426 |
pub const _SC_2_C_VERSION: ::c_int = 52; |
| 2427 |
pub const _SC_2_FORT_DEV: ::c_int = 33; |
| 2428 |
pub const _SC_2_FORT_RUN: ::c_int = 34; |
| 2429 |
pub const _SC_2_LOCALEDEF: ::c_int = 35; |
| 2430 |
pub const _SC_2_SW_DEV: ::c_int = 36; |
| 2431 |
pub const _SC_2_UPE: ::c_int = 53; |
| 2432 |
pub const _SC_2_VERSION: ::c_int = 31; |
| 2433 |
pub const _SC_BC_BASE_MAX: ::c_int = 23; |
| 2434 |
pub const _SC_BC_DIM_MAX: ::c_int = 24; |
| 2435 |
pub const _SC_BC_SCALE_MAX: ::c_int = 25; |
| 2436 |
pub const _SC_BC_STRING_MAX: ::c_int = 26; |
| 2437 |
pub const _SC_COLL_WEIGHTS_MAX: ::c_int = 50; |
| 2438 |
pub const _SC_EXPR_NEST_MAX: ::c_int = 28; |
| 2439 |
pub const _SC_LINE_MAX: ::c_int = 29; |
| 2440 |
pub const _SC_RE_DUP_MAX: ::c_int = 30; |
| 2441 |
pub const _SC_XOPEN_CRYPT: ::c_int = 56; |
| 2442 |
pub const _SC_XOPEN_ENH_I18N: ::c_int = 57; |
| 2443 |
pub const _SC_XOPEN_SHM: ::c_int = 55; |
| 2444 |
pub const _SC_2_CHAR_TERM: ::c_int = 54; |
| 2445 |
pub const _SC_XOPEN_XCU_VERSION: ::c_int = 109; |
| 2446 |
pub const _SC_ATEXIT_MAX: ::c_int = 47; |
| 2447 |
pub const _SC_IOV_MAX: ::c_int = 58; |
| 2448 |
pub const _SC_XOPEN_UNIX: ::c_int = 73; |
| 2449 |
pub const _SC_T_IOV_MAX: ::c_int = 0; |
| 2450 |
pub const _SC_PHYS_PAGES: ::c_int = 113; |
| 2451 |
pub const _SC_AVPHYS_PAGES: ::c_int = 114; |
| 2452 |
pub const _SC_THREAD_DESTRUCTOR_ITERATIONS: ::c_int = 101; |
| 2453 |
pub const _SC_GETGR_R_SIZE_MAX: ::c_int = 81; |
| 2454 |
pub const _SC_GETPW_R_SIZE_MAX: ::c_int = 82; |
| 2455 |
pub const _SC_LOGIN_NAME_MAX: ::c_int = 83; |
| 2456 |
pub const _SC_THREAD_KEYS_MAX: ::c_int = 68; |
| 2457 |
pub const _SC_THREAD_STACK_MIN: ::c_int = 69; |
| 2458 |
pub const _SC_THREAD_THREADS_MAX: ::c_int = 70; |
| 2459 |
pub const _SC_TTY_NAME_MAX: ::c_int = 104; |
| 2460 |
pub const _SC_THREADS: ::c_int = 60; |
| 2461 |
pub const _SC_THREAD_ATTR_STACKADDR: ::c_int = 61; |
| 2462 |
pub const _SC_THREAD_ATTR_STACKSIZE: ::c_int = 62; |
| 2463 |
pub const _SC_THREAD_PRIORITY_SCHEDULING: ::c_int = 64; |
| 2464 |
pub const _SC_THREAD_PRIO_INHERIT: ::c_int = 65; |
| 2465 |
pub const _SC_THREAD_PRIO_PROTECT: ::c_int = 66; |
| 2466 |
pub const _SC_THREAD_PROCESS_SHARED: ::c_int = 67; |
| 2467 |
pub const _SC_THREAD_SAFE_FUNCTIONS: ::c_int = 59; |
| 2468 |
pub const _SC_XOPEN_LEGACY: ::c_int = 112; |
| 2469 |
pub const _SC_XOPEN_REALTIME: ::c_int = 110; |
| 2470 |
pub const _SC_XOPEN_REALTIME_THREADS: ::c_int = 111; |
| 2471 |
pub const _SC_XBS5_ILP32_OFF32: ::c_int = 105; |
| 2472 |
pub const _SC_XBS5_ILP32_OFFBIG: ::c_int = 106; |
| 2473 |
pub const _SC_XBS5_LP64_OFF64: ::c_int = 107; |
| 2474 |
pub const _SC_XBS5_LPBIG_OFFBIG: ::c_int = 108; |
| 2475 |
pub const _SC_2_PBS: ::c_int = 132; |
| 2476 |
pub const _SC_2_PBS_ACCOUNTING: ::c_int = 133; |
| 2477 |
pub const _SC_2_PBS_CHECKPOINT: ::c_int = 134; |
| 2478 |
pub const _SC_2_PBS_LOCATE: ::c_int = 135; |
| 2479 |
pub const _SC_2_PBS_MESSAGE: ::c_int = 136; |
| 2480 |
pub const _SC_2_PBS_TRACK: ::c_int = 137; |
| 2481 |
pub const _SC_ADVISORY_INFO: ::c_int = 130; |
| 2482 |
pub const _SC_BARRIERS: ::c_int = 138; |
| 2483 |
pub const _SC_CLOCK_SELECTION: ::c_int = 139; |
| 2484 |
pub const _SC_CPUTIME: ::c_int = 140; |
| 2485 |
pub const _SC_HOST_NAME_MAX: ::c_int = 126; |
| 2486 |
pub const _SC_MONOTONIC_CLOCK: ::c_int = 141; |
| 2487 |
pub const _SC_READER_WRITER_LOCKS: ::c_int = 142; |
| 2488 |
pub const _SC_REGEXP: ::c_int = 127; |
| 2489 |
pub const _SC_SHELL: ::c_int = 128; |
| 2490 |
pub const _SC_SPAWN: ::c_int = 143; |
| 2491 |
pub const _SC_SPIN_LOCKS: ::c_int = 144; |
| 2492 |
pub const _SC_SPORADIC_SERVER: ::c_int = 145; |
| 2493 |
pub const _SC_SS_REPL_MAX: ::c_int = 156; |
| 2494 |
pub const _SC_SYMLOOP_MAX: ::c_int = 129; |
| 2495 |
pub const _SC_THREAD_CPUTIME: ::c_int = 146; |
| 2496 |
pub const _SC_THREAD_SPORADIC_SERVER: ::c_int = 147; |
| 2497 |
pub const _SC_TIMEOUTS: ::c_int = 148; |
| 2498 |
pub const _SC_TRACE: ::c_int = 149; |
| 2499 |
pub const _SC_TRACE_EVENT_FILTER: ::c_int = 150; |
| 2500 |
pub const _SC_TRACE_EVENT_NAME_MAX: ::c_int = 157; |
| 2501 |
pub const _SC_TRACE_INHERIT: ::c_int = 151; |
| 2502 |
pub const _SC_TRACE_LOG: ::c_int = 152; |
| 2503 |
pub const _SC_TRACE_NAME_MAX: ::c_int = 158; |
| 2504 |
pub const _SC_TRACE_SYS_MAX: ::c_int = 159; |
| 2505 |
pub const _SC_TRACE_USER_EVENT_MAX: ::c_int = 160; |
| 2506 |
pub const _SC_TYPED_MEMORY_OBJECTS: ::c_int = 153; |
| 2507 |
pub const _SC_V6_ILP32_OFF32: ::c_int = 121; |
| 2508 |
pub const _SC_V6_ILP32_OFFBIG: ::c_int = 122; |
| 2509 |
pub const _SC_V6_LP64_OFF64: ::c_int = 123; |
| 2510 |
pub const _SC_V6_LPBIG_OFFBIG: ::c_int = 124; |
| 2511 |
pub const _SC_XOPEN_STREAMS: ::c_int = 125; |
| 2512 |
pub const _SC_IPV6: ::c_int = 154; |
| 2513 |
pub const _SC_RAW_SOCKETS: ::c_int = 155; |
| 2514 |
|
| 2515 |
// utmp.h |
| 2516 |
pub const EMPTY: ::c_short = -1; |
| 2517 |
pub const RUN_LVL: ::c_short = 1; |
| 2518 |
pub const BOOT_TIME: ::c_short = 2; |
| 2519 |
pub const OLD_TIME: ::c_short = 3; |
| 2520 |
pub const NEW_TIME: ::c_short = 4; |
| 2521 |
pub const INIT_PROCESS: ::c_short = 5; |
| 2522 |
pub const LOGIN_PROCESS: ::c_short = 6; |
| 2523 |
pub const USER_PROCESS: ::c_short = 7; |
| 2524 |
pub const DEAD_PROCESS: ::c_short = 8; |
| 2525 |
pub const ACCOUNTING: ::c_short = 9; |
| 2526 |
|
| 2527 |
f! { |
| 2528 |
pub fn CMSG_FIRSTHDR(mhdr: *const msghdr) -> *mut cmsghdr { |
| 2529 |
if (*mhdr).msg_controllen as usize >= ::mem::size_of::<cmsghdr>() { |
| 2530 |
(*mhdr).msg_control as *mut cmsghdr |
| 2531 |
} else { |
| 2532 |
0 as *mut cmsghdr |
| 2533 |
} |
| 2534 |
} |
| 2535 |
|
| 2536 |
pub fn CMSG_NXTHDR(mhdr: *const msghdr, cmsg: *const cmsghdr) -> *mut cmsghdr { |
| 2537 |
if cmsg.is_null() { |
| 2538 |
CMSG_FIRSTHDR(mhdr) |
| 2539 |
} else { |
| 2540 |
if (cmsg as usize + (*cmsg).cmsg_len as usize + ::mem::size_of::<::cmsghdr>()) > |
| 2541 |
((*mhdr).msg_control as usize + (*mhdr).msg_controllen as usize) { |
| 2542 |
0 as *mut ::cmsghdr |
| 2543 |
} else { |
| 2544 |
// AIX does not have any alignment/padding for ancillary data, so we don't need _CMSG_ALIGN here. |
| 2545 |
(cmsg as usize + (*cmsg).cmsg_len as usize) as *mut cmsghdr |
| 2546 |
} |
| 2547 |
} |
| 2548 |
} |
| 2549 |
|
| 2550 |
pub fn CMSG_DATA(cmsg: *const ::cmsghdr) -> *mut ::c_uchar { |
| 2551 |
(cmsg as *mut ::c_uchar).offset(::mem::size_of::<::cmsghdr>() as isize) |
| 2552 |
} |
| 2553 |
|
| 2554 |
pub {const} fn CMSG_LEN(length: ::c_uint) -> ::c_uint { |
| 2555 |
::mem::size_of::<::cmsghdr>() as ::c_uint + length |
| 2556 |
} |
| 2557 |
|
| 2558 |
pub {const} fn CMSG_SPACE(length: ::c_uint) -> ::c_uint { |
| 2559 |
::mem::size_of::<::cmsghdr>() as ::c_uint + length |
| 2560 |
} |
| 2561 |
|
| 2562 |
pub fn FD_ZERO(set: *mut fd_set) -> () { |
| 2563 |
for slot in (*set).fds_bits.iter_mut() { |
| 2564 |
*slot = 0; |
| 2565 |
} |
| 2566 |
} |
| 2567 |
|
| 2568 |
pub fn FD_SET(fd: ::c_int, set: *mut fd_set) -> () { |
| 2569 |
let bits = ::mem::size_of::<::c_long>() * 8; |
| 2570 |
let fd = fd as usize; |
| 2571 |
(*set).fds_bits[fd / bits] |= 1 << (fd % bits); |
| 2572 |
return |
| 2573 |
} |
| 2574 |
|
| 2575 |
pub fn FD_CLR(fd: ::c_int, set: *mut fd_set) -> () { |
| 2576 |
let bits = ::mem::size_of::<::c_long>() * 8; |
| 2577 |
let fd = fd as usize; |
| 2578 |
(*set).fds_bits[fd / bits] &= !(1 << (fd % bits)); |
| 2579 |
return |
| 2580 |
} |
| 2581 |
|
| 2582 |
pub fn FD_ISSET(fd: ::c_int, set: *const fd_set) -> bool { |
| 2583 |
let bits = ::mem::size_of::<::c_long>() * 8; |
| 2584 |
let fd = fd as usize; |
| 2585 |
return ((*set).fds_bits[fd / bits] & (1 << (fd % bits))) != 0 |
| 2586 |
} |
| 2587 |
|
| 2588 |
pub fn major(dev: ::dev_t) -> ::c_uint { |
| 2589 |
let x = dev >> 16; |
| 2590 |
x as ::c_uint |
| 2591 |
} |
| 2592 |
|
| 2593 |
pub fn minor(dev: ::dev_t) -> ::c_uint { |
| 2594 |
let y = dev & 0xFFFF; |
| 2595 |
y as ::c_uint |
| 2596 |
} |
| 2597 |
|
| 2598 |
pub fn makedev(major: ::c_uint, minor: ::c_uint) -> ::dev_t { |
| 2599 |
let major = major as ::dev_t; |
| 2600 |
let minor = minor as ::dev_t; |
| 2601 |
let mut dev = 0; |
| 2602 |
dev |= major << 16; |
| 2603 |
dev |= minor; |
| 2604 |
dev |
| 2605 |
} |
| 2606 |
} |
| 2607 |
|
| 2608 |
safe_f! { |
| 2609 |
pub {const} fn WIFSTOPPED(status: ::c_int) -> bool { |
| 2610 |
(status & _W_STOPPED) != 0 |
| 2611 |
} |
| 2612 |
|
| 2613 |
pub {const} fn WSTOPSIG(status: ::c_int) -> ::c_int { |
| 2614 |
if WIFSTOPPED(status) { |
| 2615 |
(((status as ::c_uint) >> 8) & 0xff) as ::c_int |
| 2616 |
} else { |
| 2617 |
-1 |
| 2618 |
} |
| 2619 |
} |
| 2620 |
|
| 2621 |
pub {const} fn WIFEXITED(status: ::c_int) -> bool { |
| 2622 |
(status & 0xFF) == 0 |
| 2623 |
} |
| 2624 |
|
| 2625 |
pub {const} fn WEXITSTATUS(status: ::c_int) -> ::c_int { |
| 2626 |
if WIFEXITED(status) { |
| 2627 |
(((status as ::c_uint) >> 8) & 0xff) as ::c_int |
| 2628 |
} else { |
| 2629 |
-1 |
| 2630 |
} |
| 2631 |
} |
| 2632 |
|
| 2633 |
pub {const} fn WIFSIGNALED(status: ::c_int) -> bool { |
| 2634 |
!WIFEXITED(status) && !WIFSTOPPED(status) |
| 2635 |
} |
| 2636 |
|
| 2637 |
pub {const} fn WTERMSIG(status: ::c_int) -> ::c_int { |
| 2638 |
if WIFSIGNALED(status) { |
| 2639 |
(((status as ::c_uint) >> 16) & 0xff) as ::c_int |
| 2640 |
} else { |
| 2641 |
-1 |
| 2642 |
} |
| 2643 |
} |
| 2644 |
|
| 2645 |
pub {const} fn WIFCONTINUED(status: ::c_int) -> bool { |
| 2646 |
(status & WCONTINUED) != 0 |
| 2647 |
} |
| 2648 |
|
| 2649 |
// AIX doesn't have native WCOREDUMP. |
| 2650 |
pub {const} fn WCOREDUMP(_status: ::c_int) -> bool { |
| 2651 |
false |
| 2652 |
} |
| 2653 |
} |
| 2654 |
|
| 2655 |
#[link(name = "thread")] |
| 2656 |
extern "C" { |
| 2657 |
pub fn thr_kill(id: thread_t, sig: ::c_int) -> ::c_int; |
| 2658 |
pub fn thr_self() -> thread_t; |
| 2659 |
} |
| 2660 |
|
| 2661 |
#[link(name = "pthread")] |
| 2662 |
extern "C" { |
| 2663 |
pub fn pthread_atfork( |
| 2664 |
prepare: ::Option<unsafe extern "C" fn()>, |
| 2665 |
parent: ::Option<unsafe extern "C" fn()>, |
| 2666 |
child: ::Option<unsafe extern "C" fn()>, |
| 2667 |
) -> ::c_int; |
| 2668 |
pub fn pthread_attr_getguardsize( |
| 2669 |
attr: *const ::pthread_attr_t, |
| 2670 |
guardsize: *mut ::size_t, |
| 2671 |
) -> ::c_int; |
| 2672 |
pub fn pthread_attr_setguardsize(attr: *mut ::pthread_attr_t, guardsize: ::size_t) -> ::c_int; |
| 2673 |
pub fn pthread_attr_getschedparam( |
| 2674 |
attr: *const ::pthread_attr_t, |
| 2675 |
param: *mut sched_param, |
| 2676 |
) -> ::c_int; |
| 2677 |
pub fn pthread_attr_getstack( |
| 2678 |
attr: *const ::pthread_attr_t, |
| 2679 |
stackaddr: *mut *mut ::c_void, |
| 2680 |
stacksize: *mut ::size_t, |
| 2681 |
) -> ::c_int; |
| 2682 |
pub fn pthread_attr_setschedparam( |
| 2683 |
attr: *mut ::pthread_attr_t, |
| 2684 |
param: *const sched_param, |
| 2685 |
) -> ::c_int; |
| 2686 |
pub fn pthread_barrier_destroy(barrier: *mut pthread_barrier_t) -> ::c_int; |
| 2687 |
pub fn pthread_barrier_init( |
| 2688 |
barrier: *mut pthread_barrier_t, |
| 2689 |
attr: *const ::pthread_barrierattr_t, |
| 2690 |
count: ::c_uint, |
| 2691 |
) -> ::c_int; |
| 2692 |
pub fn pthread_barrier_wait(barrier: *mut pthread_barrier_t) -> ::c_int; |
| 2693 |
pub fn pthread_barrierattr_destroy(attr: *mut ::pthread_barrierattr_t) -> ::c_int; |
| 2694 |
pub fn pthread_barrierattr_getpshared( |
| 2695 |
attr: *const ::pthread_barrierattr_t, |
| 2696 |
shared: *mut ::c_int, |
| 2697 |
) -> ::c_int; |
| 2698 |
pub fn pthread_barrierattr_init(attr: *mut ::pthread_barrierattr_t) -> ::c_int; |
| 2699 |
pub fn pthread_barrierattr_setpshared( |
| 2700 |
attr: *mut ::pthread_barrierattr_t, |
| 2701 |
shared: ::c_int, |
| 2702 |
) -> ::c_int; |
| 2703 |
pub fn pthread_cancel(thread: ::pthread_t) -> ::c_int; |
| 2704 |
pub fn pthread_condattr_getclock( |
| 2705 |
attr: *const pthread_condattr_t, |
| 2706 |
clock_id: *mut clockid_t, |
| 2707 |
) -> ::c_int; |
| 2708 |
pub fn pthread_condattr_getpshared( |
| 2709 |
attr: *const pthread_condattr_t, |
| 2710 |
pshared: *mut ::c_int, |
| 2711 |
) -> ::c_int; |
| 2712 |
pub fn pthread_condattr_setclock( |
| 2713 |
attr: *mut pthread_condattr_t, |
| 2714 |
clock_id: ::clockid_t, |
| 2715 |
) -> ::c_int; |
| 2716 |
pub fn pthread_condattr_setpshared(attr: *mut pthread_condattr_t, pshared: ::c_int) -> ::c_int; |
| 2717 |
pub fn pthread_create( |
| 2718 |
native: *mut ::pthread_t, |
| 2719 |
attr: *const ::pthread_attr_t, |
| 2720 |
f: extern "C" fn(*mut ::c_void) -> *mut ::c_void, |
| 2721 |
value: *mut ::c_void, |
| 2722 |
) -> ::c_int; |
| 2723 |
pub fn pthread_getattr_np(native: ::pthread_t, attr: *mut ::pthread_attr_t) -> ::c_int; |
| 2724 |
pub fn pthread_getcpuclockid(thread: ::pthread_t, clk_id: *mut ::clockid_t) -> ::c_int; |
| 2725 |
pub fn pthread_getschedparam( |
| 2726 |
thread: ::pthread_t, |
| 2727 |
policy: *mut ::c_int, |
| 2728 |
param: *mut sched_param, |
| 2729 |
) -> ::c_int; |
| 2730 |
pub fn pthread_kill(thread: ::pthread_t, signal: ::c_int) -> ::c_int; |
| 2731 |
pub fn pthread_mutex_consistent(mutex: *mut ::pthread_mutex_t) -> ::c_int; |
| 2732 |
pub fn pthread_mutex_timedlock( |
| 2733 |
lock: *mut pthread_mutex_t, |
| 2734 |
abstime: *const ::timespec, |
| 2735 |
) -> ::c_int; |
| 2736 |
pub fn pthread_mutexattr_getprotocol( |
| 2737 |
attr: *const pthread_mutexattr_t, |
| 2738 |
protocol: *mut ::c_int, |
| 2739 |
) -> ::c_int; |
| 2740 |
pub fn pthread_mutexattr_getpshared( |
| 2741 |
attr: *const pthread_mutexattr_t, |
| 2742 |
pshared: *mut ::c_int, |
| 2743 |
) -> ::c_int; |
| 2744 |
pub fn pthread_mutexattr_getrobust( |
| 2745 |
attr: *mut ::pthread_mutexattr_t, |
| 2746 |
robust: *mut ::c_int, |
| 2747 |
) -> ::c_int; |
| 2748 |
pub fn pthread_mutexattr_setprotocol( |
| 2749 |
attr: *mut pthread_mutexattr_t, |
| 2750 |
protocol: ::c_int, |
| 2751 |
) -> ::c_int; |
| 2752 |
pub fn pthread_mutexattr_setpshared( |
| 2753 |
attr: *mut pthread_mutexattr_t, |
| 2754 |
pshared: ::c_int, |
| 2755 |
) -> ::c_int; |
| 2756 |
pub fn pthread_mutexattr_setrobust( |
| 2757 |
attr: *mut ::pthread_mutexattr_t, |
| 2758 |
robust: ::c_int, |
| 2759 |
) -> ::c_int; |
| 2760 |
pub fn pthread_rwlockattr_getpshared( |
| 2761 |
attr: *const pthread_rwlockattr_t, |
| 2762 |
val: *mut ::c_int, |
| 2763 |
) -> ::c_int; |
| 2764 |
pub fn pthread_rwlockattr_setpshared(attr: *mut pthread_rwlockattr_t, val: ::c_int) -> ::c_int; |
| 2765 |
pub fn pthread_setschedparam( |
| 2766 |
thread: ::pthread_t, |
| 2767 |
policy: ::c_int, |
| 2768 |
param: *const sched_param, |
| 2769 |
) -> ::c_int; |
| 2770 |
pub fn pthread_setschedprio(native: ::pthread_t, priority: ::c_int) -> ::c_int; |
| 2771 |
pub fn pthread_sigmask(how: ::c_int, set: *const sigset_t, oldset: *mut sigset_t) -> ::c_int; |
| 2772 |
pub fn pthread_spin_destroy(lock: *mut pthread_spinlock_t) -> ::c_int; |
| 2773 |
pub fn pthread_spin_init(lock: *mut pthread_spinlock_t, pshared: ::c_int) -> ::c_int; |
| 2774 |
pub fn pthread_spin_lock(lock: *mut pthread_spinlock_t) -> ::c_int; |
| 2775 |
pub fn pthread_spin_trylock(lock: *mut pthread_spinlock_t) -> ::c_int; |
| 2776 |
pub fn pthread_spin_unlock(lock: *mut pthread_spinlock_t) -> ::c_int; |
| 2777 |
} |
| 2778 |
|
| 2779 |
#[link(name = "iconv")] |
| 2780 |
extern "C" { |
| 2781 |
pub fn iconv( |
| 2782 |
cd: iconv_t, |
| 2783 |
inbuf: *mut *mut ::c_char, |
| 2784 |
inbytesleft: *mut ::size_t, |
| 2785 |
outbuf: *mut *mut ::c_char, |
| 2786 |
outbytesleft: *mut ::size_t, |
| 2787 |
) -> ::size_t; |
| 2788 |
pub fn iconv_close(cd: iconv_t) -> ::c_int; |
| 2789 |
pub fn iconv_open(tocode: *const ::c_char, fromcode: *const ::c_char) -> iconv_t; |
| 2790 |
} |
| 2791 |
|
| 2792 |
extern "C" { |
| 2793 |
pub fn acct(filename: *const ::c_char) -> ::c_int; |
| 2794 |
pub fn aio_cancel(fildes: ::c_int, aiocbp: *mut ::aiocb) -> ::c_int; |
| 2795 |
pub fn aio_error(aiocbp: *mut ::aiocb) -> ::c_int; |
| 2796 |
#[link_name = "_posix_aio_fsync"] |
| 2797 |
pub fn aio_fsync(op: ::c_int, aiocbp: *mut ::aiocb) -> ::c_int; |
| 2798 |
pub fn aio_read(aiocbp: *mut ::aiocb) -> ::c_int; |
| 2799 |
// pub fn aio_suspend |
| 2800 |
// pub fn aio_write |
| 2801 |
pub fn basename(path: *mut ::c_char) -> *mut ::c_char; |
| 2802 |
pub fn bind(socket: ::c_int, address: *const ::sockaddr, address_len: ::socklen_t) -> ::c_int; |
| 2803 |
pub fn brk(addr: *mut ::c_void) -> ::c_int; |
| 2804 |
pub fn clearenv() -> ::c_int; |
| 2805 |
pub fn clock_getcpuclockid(pid: ::pid_t, clk_id: *mut ::clockid_t) -> ::c_int; |
| 2806 |
pub fn clock_getres(clk_id: ::clockid_t, tp: *mut ::timespec) -> ::c_int; |
| 2807 |
pub fn clock_gettime(clk_id: ::clockid_t, tp: *mut ::timespec) -> ::c_int; |
| 2808 |
pub fn clock_nanosleep( |
| 2809 |
clk_id: ::clockid_t, |
| 2810 |
flags: ::c_int, |
| 2811 |
rqtp: *const ::timespec, |
| 2812 |
rmtp: *mut ::timespec, |
| 2813 |
) -> ::c_int; |
| 2814 |
pub fn clock_settime(clock_id: ::clockid_t, tp: *const ::timespec) -> ::c_int; |
| 2815 |
pub fn creat64(path: *const c_char, mode: mode_t) -> ::c_int; |
| 2816 |
pub fn ctermid(s: *mut ::c_char) -> *mut ::c_char; |
| 2817 |
pub fn dirfd(dirp: *mut ::DIR) -> ::c_int; |
| 2818 |
pub fn dirname(path: *mut ::c_char) -> *mut ::c_char; |
| 2819 |
pub fn drand48() -> ::c_double; |
| 2820 |
pub fn duplocale(arg1: ::locale_t) -> ::locale_t; |
| 2821 |
pub fn endgrent(); |
| 2822 |
pub fn endmntent(streamp: *mut ::FILE) -> ::c_int; |
| 2823 |
pub fn endpwent(); |
| 2824 |
pub fn endutent(); |
| 2825 |
pub fn endutxent(); |
| 2826 |
pub fn erand48(xseed: *mut ::c_ushort) -> ::c_double; |
| 2827 |
pub fn faccessat( |
| 2828 |
dirfd: ::c_int, |
| 2829 |
pathname: *const ::c_char, |
| 2830 |
mode: ::c_int, |
| 2831 |
flags: ::c_int, |
| 2832 |
) -> ::c_int; |
| 2833 |
pub fn fattach(fildes: ::c_int, path: *const ::c_char) -> ::c_int; |
| 2834 |
pub fn fdatasync(fd: ::c_int) -> ::c_int; |
| 2835 |
pub fn fexecve( |
| 2836 |
fd: ::c_int, |
| 2837 |
argv: *const *const ::c_char, |
| 2838 |
envp: *const *const ::c_char, |
| 2839 |
) -> ::c_int; |
| 2840 |
pub fn ffs(value: ::c_int) -> ::c_int; |
| 2841 |
pub fn ffsl(value: ::c_long) -> ::c_int; |
| 2842 |
pub fn ffsll(value: ::c_longlong) -> ::c_int; |
| 2843 |
pub fn fgetgrent(file: *mut ::FILE) -> *mut ::group; |
| 2844 |
pub fn fgetpos64(stream: *mut ::FILE, ptr: *mut fpos64_t) -> ::c_int; |
| 2845 |
pub fn fgetpwent(file: *mut ::FILE) -> *mut ::passwd; |
| 2846 |
pub fn fopen64(filename: *const c_char, mode: *const c_char) -> *mut ::FILE; |
| 2847 |
pub fn freelocale(loc: ::locale_t); |
| 2848 |
pub fn freopen64( |
| 2849 |
filename: *const c_char, |
| 2850 |
mode: *const c_char, |
| 2851 |
file: *mut ::FILE, |
| 2852 |
) -> *mut ::FILE; |
| 2853 |
pub fn fseeko64(stream: *mut ::FILE, offset: ::off64_t, whence: ::c_int) -> ::c_int; |
| 2854 |
pub fn fsetpos64(stream: *mut ::FILE, ptr: *const fpos64_t) -> ::c_int; |
| 2855 |
pub fn fstat64(fildes: ::c_int, buf: *mut stat64) -> ::c_int; |
| 2856 |
pub fn fstatfs(fd: ::c_int, buf: *mut statfs) -> ::c_int; |
| 2857 |
pub fn fstatfs64(fd: ::c_int, buf: *mut statfs64) -> ::c_int; |
| 2858 |
pub fn fstatvfs64(fd: ::c_int, buf: *mut statvfs64) -> ::c_int; |
| 2859 |
pub fn ftello64(stream: *mut ::FILE) -> ::off64_t; |
| 2860 |
pub fn ftok(path: *const ::c_char, id: ::c_int) -> ::key_t; |
| 2861 |
pub fn ftruncate64(fd: ::c_int, length: off64_t) -> ::c_int; |
| 2862 |
pub fn futimens(fd: ::c_int, times: *const ::timespec) -> ::c_int; |
| 2863 |
pub fn getcontext(ucp: *mut ucontext_t) -> ::c_int; |
| 2864 |
pub fn getdomainname(name: *mut ::c_char, len: ::c_int) -> ::c_int; |
| 2865 |
pub fn getdtablesize() -> ::c_int; |
| 2866 |
pub fn getgrent() -> *mut ::group; |
| 2867 |
pub fn getgrgid(gid: ::gid_t) -> *mut ::group; |
| 2868 |
pub fn getgrgid_r( |
| 2869 |
gid: ::gid_t, |
| 2870 |
grp: *mut ::group, |
| 2871 |
buf: *mut ::c_char, |
| 2872 |
buflen: ::size_t, |
| 2873 |
result: *mut *mut ::group, |
| 2874 |
) -> ::c_int; |
| 2875 |
pub fn getgrnam(name: *const ::c_char) -> *mut ::group; |
| 2876 |
pub fn getgrnam_r( |
| 2877 |
name: *const ::c_char, |
| 2878 |
grp: *mut ::group, |
| 2879 |
buf: *mut ::c_char, |
| 2880 |
buflen: ::size_t, |
| 2881 |
result: *mut *mut ::group, |
| 2882 |
) -> ::c_int; |
| 2883 |
pub fn getgrset(user: *mut ::c_char) -> *mut ::c_char; |
| 2884 |
pub fn gethostid() -> ::c_long; |
| 2885 |
pub fn getmntent(stream: *mut ::FILE) -> *mut ::mntent; |
| 2886 |
pub fn getnameinfo( |
| 2887 |
sa: *const ::sockaddr, |
| 2888 |
salen: ::size_t, |
| 2889 |
host: *mut ::c_char, |
| 2890 |
hostlen: ::size_t, |
| 2891 |
serv: *mut ::c_char, |
| 2892 |
servlen: ::size_t, |
| 2893 |
flags: ::c_int, |
| 2894 |
) -> ::c_int; |
| 2895 |
pub fn getpagesize() -> ::c_int; |
| 2896 |
pub fn getpeereid(socket: ::c_int, euid: *mut ::uid_t, egid: *mut ::gid_t) -> ::c_int; |
| 2897 |
pub fn getpriority(which: ::c_int, who: ::id_t) -> ::c_int; |
| 2898 |
pub fn getpwent() -> *mut ::passwd; |
| 2899 |
pub fn getpwnam_r( |
| 2900 |
name: *const ::c_char, |
| 2901 |
pwd: *mut passwd, |
| 2902 |
buf: *mut ::c_char, |
| 2903 |
buflen: ::size_t, |
| 2904 |
result: *mut *mut passwd, |
| 2905 |
) -> ::c_int; |
| 2906 |
pub fn getpwuid_r( |
| 2907 |
uid: ::uid_t, |
| 2908 |
pwd: *mut passwd, |
| 2909 |
buf: *mut ::c_char, |
| 2910 |
buflen: ::size_t, |
| 2911 |
result: *mut *mut passwd, |
| 2912 |
) -> ::c_int; |
| 2913 |
pub fn getrlimit(resource: ::c_int, rlim: *mut ::rlimit) -> ::c_int; |
| 2914 |
pub fn getrlimit64(resource: ::c_int, rlim: *mut rlimit64) -> ::c_int; |
| 2915 |
pub fn gettimeofday(tp: *mut ::timeval, tz: *mut ::c_void) -> ::c_int; |
| 2916 |
pub fn getitimer(which: ::c_int, curr_value: *mut ::itimerval) -> ::c_int; |
| 2917 |
pub fn getutent() -> *mut utmp; |
| 2918 |
pub fn getutid(u: *const utmp) -> *mut utmp; |
| 2919 |
pub fn getutline(u: *const utmp) -> *mut utmp; |
| 2920 |
pub fn getutxent() -> *mut utmpx; |
| 2921 |
pub fn getutxid(ut: *const utmpx) -> *mut utmpx; |
| 2922 |
pub fn getutxline(ut: *const utmpx) -> *mut utmpx; |
| 2923 |
pub fn glob( |
| 2924 |
pattern: *const ::c_char, |
| 2925 |
flags: ::c_int, |
| 2926 |
errfunc: ::Option<extern "C" fn(epath: *const ::c_char, errno: ::c_int) -> ::c_int>, |
| 2927 |
pglob: *mut ::glob_t, |
| 2928 |
) -> ::c_int; |
| 2929 |
pub fn globfree(pglob: *mut ::glob_t); |
| 2930 |
pub fn hasmntopt(mnt: *const ::mntent, opt: *const ::c_char) -> *mut ::c_char; |
| 2931 |
pub fn hcreate(nelt: ::size_t) -> ::c_int; |
| 2932 |
pub fn hdestroy(); |
| 2933 |
pub fn hsearch(entry: entry, action: ::c_int) -> *mut entry; |
| 2934 |
pub fn if_freenameindex(ptr: *mut if_nameindex); |
| 2935 |
pub fn if_nameindex() -> *mut if_nameindex; |
| 2936 |
pub fn initgroups(name: *const ::c_char, basegid: ::gid_t) -> ::c_int; |
| 2937 |
pub fn ioctl(fildes: ::c_int, request: ::c_int, ...) -> ::c_int; |
| 2938 |
pub fn jrand48(xseed: *mut ::c_ushort) -> ::c_long; |
| 2939 |
pub fn lcong48(p: *mut ::c_ushort); |
| 2940 |
pub fn lfind( |
| 2941 |
key: *const ::c_void, |
| 2942 |
base: *const ::c_void, |
| 2943 |
nelp: *mut ::size_t, |
| 2944 |
width: ::size_t, |
| 2945 |
compar: ::Option<unsafe extern "C" fn(*const ::c_void, *const ::c_void) -> ::c_int>, |
| 2946 |
) -> *mut ::c_void; |
| 2947 |
pub fn lio_listio( |
| 2948 |
mode: ::c_int, |
| 2949 |
aiocb_list: *const *mut aiocb, |
| 2950 |
nitems: ::c_int, |
| 2951 |
sevp: *mut sigevent, |
| 2952 |
) -> ::c_int; |
| 2953 |
pub fn loadquery(flags: ::c_int, buf: *mut ::c_char, buflen: ::c_uint) -> ::c_int; |
| 2954 |
pub fn lpar_get_info(command: ::c_int, buf: *mut ::c_void, bufsize: ::size_t) -> ::c_int; |
| 2955 |
pub fn lpar_set_resources(id: ::c_int, resource: *mut ::c_void) -> ::c_int; |
| 2956 |
pub fn lrand48() -> c_long; |
| 2957 |
pub fn lsearch( |
| 2958 |
key: *const ::c_void, |
| 2959 |
base: *mut ::c_void, |
| 2960 |
nelp: *mut ::size_t, |
| 2961 |
width: ::size_t, |
| 2962 |
compar: ::Option<unsafe extern "C" fn(*const ::c_void, *const ::c_void) -> ::c_int>, |
| 2963 |
) -> *mut ::c_void; |
| 2964 |
pub fn lseek64(fd: ::c_int, offset: off64_t, whence: ::c_int) -> off64_t; |
| 2965 |
pub fn lstat64(path: *const c_char, buf: *mut stat64) -> ::c_int; |
| 2966 |
pub fn madvise(addr: *mut ::c_void, len: ::size_t, advice: ::c_int) -> ::c_int; |
| 2967 |
pub fn makecontext(ucp: *mut ::ucontext_t, func: extern "C" fn(), argc: ::c_int, ...); |
| 2968 |
pub fn mallinfo() -> ::mallinfo; |
| 2969 |
pub fn mallopt(param: ::c_int, value: ::c_int) -> ::c_int; |
| 2970 |
pub fn memmem( |
| 2971 |
haystack: *const ::c_void, |
| 2972 |
haystacklen: ::size_t, |
| 2973 |
needle: *const ::c_void, |
| 2974 |
needlelen: ::size_t, |
| 2975 |
) -> *mut ::c_void; |
| 2976 |
pub fn memset_s(s: *mut ::c_void, smax: ::size_t, c: ::c_int, n: ::size_t) -> ::c_int; |
| 2977 |
pub fn mincore(addr: *const ::c_void, len: ::size_t, vec: *mut ::c_char) -> ::c_int; |
| 2978 |
pub fn mkfifoat(dirfd: ::c_int, pathname: *const ::c_char, mode: ::mode_t) -> ::c_int; |
| 2979 |
pub fn mknodat( |
| 2980 |
dirfd: ::c_int, |
| 2981 |
pathname: *const ::c_char, |
| 2982 |
mode: ::mode_t, |
| 2983 |
dev: dev_t, |
| 2984 |
) -> ::c_int; |
| 2985 |
pub fn mount(device: *const ::c_char, path: *const ::c_char, flags: ::c_int) -> ::c_int; |
| 2986 |
pub fn mprotect(addr: *mut ::c_void, len: ::size_t, prot: ::c_int) -> ::c_int; |
| 2987 |
pub fn mq_close(mqd: ::mqd_t) -> ::c_int; |
| 2988 |
pub fn mq_getattr(mqd: ::mqd_t, attr: *mut ::mq_attr) -> ::c_int; |
| 2989 |
pub fn mq_notify(mqd: ::mqd_t, notification: *const ::sigevent) -> ::c_int; |
| 2990 |
pub fn mq_open(name: *const ::c_char, oflag: ::c_int, ...) -> ::mqd_t; |
| 2991 |
pub fn mq_receive( |
| 2992 |
mqd: ::mqd_t, |
| 2993 |
msg_ptr: *mut ::c_char, |
| 2994 |
msg_len: ::size_t, |
| 2995 |
msg_prio: *mut ::c_uint, |
| 2996 |
) -> ::ssize_t; |
| 2997 |
pub fn mq_send( |
| 2998 |
mqd: ::mqd_t, |
| 2999 |
msg_ptr: *const ::c_char, |
| 3000 |
msg_len: ::size_t, |
| 3001 |
msg_prio: ::c_uint, |
| 3002 |
) -> ::c_int; |
| 3003 |
pub fn mq_setattr(mqd: ::mqd_t, newattr: *const ::mq_attr, oldattr: *mut ::mq_attr) -> ::c_int; |
| 3004 |
pub fn mq_timedreceive( |
| 3005 |
mqd: ::mqd_t, |
| 3006 |
msg_ptr: *mut ::c_char, |
| 3007 |
msg_len: ::size_t, |
| 3008 |
msg_prio: *mut ::c_uint, |
| 3009 |
abs_timeout: *const ::timespec, |
| 3010 |
) -> ::ssize_t; |
| 3011 |
pub fn mq_timedsend( |
| 3012 |
mqd: ::mqd_t, |
| 3013 |
msg_ptr: *const ::c_char, |
| 3014 |
msg_len: ::size_t, |
| 3015 |
msg_prio: ::c_uint, |
| 3016 |
abs_timeout: *const ::timespec, |
| 3017 |
) -> ::c_int; |
| 3018 |
pub fn mq_unlink(name: *const ::c_char) -> ::c_int; |
| 3019 |
pub fn mrand48() -> c_long; |
| 3020 |
pub fn msgctl(msqid: ::c_int, cmd: ::c_int, buf: *mut msqid_ds) -> ::c_int; |
| 3021 |
pub fn msgget(key: ::key_t, msgflg: ::c_int) -> ::c_int; |
| 3022 |
pub fn msgrcv( |
| 3023 |
msqid: ::c_int, |
| 3024 |
msgp: *mut ::c_void, |
| 3025 |
msgsz: ::size_t, |
| 3026 |
msgtyp: ::c_long, |
| 3027 |
msgflg: ::c_int, |
| 3028 |
) -> ::ssize_t; |
| 3029 |
pub fn msgsnd( |
| 3030 |
msqid: ::c_int, |
| 3031 |
msgp: *const ::c_void, |
| 3032 |
msgsz: ::size_t, |
| 3033 |
msgflg: ::c_int, |
| 3034 |
) -> ::c_int; |
| 3035 |
pub fn msync(addr: *mut ::c_void, len: ::size_t, flags: ::c_int) -> ::c_int; |
| 3036 |
pub fn newlocale(mask: ::c_int, locale: *const ::c_char, base: ::locale_t) -> ::locale_t; |
| 3037 |
pub fn nl_langinfo(item: ::nl_item) -> *mut ::c_char; |
| 3038 |
pub fn nl_langinfo_l(item: ::nl_item, loc: ::locale_t) -> *mut ::c_char; |
| 3039 |
pub fn nrand48(xseed: *mut ::c_ushort) -> ::c_long; |
| 3040 |
pub fn open64(path: *const c_char, oflag: ::c_int, ...) -> ::c_int; |
| 3041 |
pub fn pollset_create(maxfd: ::c_int) -> pollset_t; |
| 3042 |
pub fn pollset_ctl( |
| 3043 |
ps: pollset_t, |
| 3044 |
pollctl_array: *mut poll_ctl, |
| 3045 |
array_length: ::c_int, |
| 3046 |
) -> ::c_int; |
| 3047 |
pub fn pollset_destroy(ps: pollset_t) -> ::c_int; |
| 3048 |
pub fn pollset_poll( |
| 3049 |
ps: pollset_t, |
| 3050 |
polldata_array: *mut ::pollfd, |
| 3051 |
array_length: ::c_int, |
| 3052 |
timeout: ::c_int, |
| 3053 |
) -> ::c_int; |
| 3054 |
pub fn pollset_query(ps: pollset_t, pollfd_query: *mut ::pollfd) -> ::c_int; |
| 3055 |
pub fn popen(command: *const c_char, mode: *const c_char) -> *mut ::FILE; |
| 3056 |
pub fn posix_fadvise(fd: ::c_int, offset: ::off_t, len: ::off_t, advise: ::c_int) -> ::c_int; |
| 3057 |
pub fn posix_fadvise64( |
| 3058 |
fd: ::c_int, |
| 3059 |
offset: ::off64_t, |
| 3060 |
len: ::off64_t, |
| 3061 |
advise: ::c_int, |
| 3062 |
) -> ::c_int; |
| 3063 |
pub fn posix_fallocate(fd: ::c_int, offset: ::off_t, len: ::off_t) -> ::c_int; |
| 3064 |
pub fn posix_fallocate64(fd: ::c_int, offset: ::off64_t, len: ::off64_t) -> ::c_int; |
| 3065 |
pub fn posix_madvise(addr: *mut ::c_void, len: ::size_t, advice: ::c_int) -> ::c_int; |
| 3066 |
pub fn posix_spawn( |
| 3067 |
pid: *mut ::pid_t, |
| 3068 |
path: *const ::c_char, |
| 3069 |
file_actions: *const ::posix_spawn_file_actions_t, |
| 3070 |
attrp: *const ::posix_spawnattr_t, |
| 3071 |
argv: *const *mut ::c_char, |
| 3072 |
envp: *const *mut ::c_char, |
| 3073 |
) -> ::c_int; |
| 3074 |
pub fn posix_spawn_file_actions_addclose( |
| 3075 |
actions: *mut posix_spawn_file_actions_t, |
| 3076 |
fd: ::c_int, |
| 3077 |
) -> ::c_int; |
| 3078 |
pub fn posix_spawn_file_actions_adddup2( |
| 3079 |
actions: *mut posix_spawn_file_actions_t, |
| 3080 |
fd: ::c_int, |
| 3081 |
newfd: ::c_int, |
| 3082 |
) -> ::c_int; |
| 3083 |
pub fn posix_spawn_file_actions_addopen( |
| 3084 |
actions: *mut posix_spawn_file_actions_t, |
| 3085 |
fd: ::c_int, |
| 3086 |
path: *const ::c_char, |
| 3087 |
oflag: ::c_int, |
| 3088 |
mode: ::mode_t, |
| 3089 |
) -> ::c_int; |
| 3090 |
pub fn posix_spawn_file_actions_destroy(actions: *mut posix_spawn_file_actions_t) -> ::c_int; |
| 3091 |
pub fn posix_spawn_file_actions_init(actions: *mut posix_spawn_file_actions_t) -> ::c_int; |
| 3092 |
pub fn posix_spawnattr_destroy(attr: *mut posix_spawnattr_t) -> ::c_int; |
| 3093 |
pub fn posix_spawnattr_getflags( |
| 3094 |
attr: *const posix_spawnattr_t, |
| 3095 |
flags: *mut ::c_short, |
| 3096 |
) -> ::c_int; |
| 3097 |
pub fn posix_spawnattr_getpgroup( |
| 3098 |
attr: *const posix_spawnattr_t, |
| 3099 |
flags: *mut ::pid_t, |
| 3100 |
) -> ::c_int; |
| 3101 |
pub fn posix_spawnattr_getschedparam( |
| 3102 |
attr: *const posix_spawnattr_t, |
| 3103 |
param: *mut ::sched_param, |
| 3104 |
) -> ::c_int; |
| 3105 |
pub fn posix_spawnattr_getschedpolicy( |
| 3106 |
attr: *const posix_spawnattr_t, |
| 3107 |
flags: *mut ::c_int, |
| 3108 |
) -> ::c_int; |
| 3109 |
pub fn posix_spawnattr_getsigdefault( |
| 3110 |
attr: *const posix_spawnattr_t, |
| 3111 |
default: *mut sigset_t, |
| 3112 |
) -> ::c_int; |
| 3113 |
pub fn posix_spawnattr_getsigmask( |
| 3114 |
attr: *const posix_spawnattr_t, |
| 3115 |
default: *mut sigset_t, |
| 3116 |
) -> ::c_int; |
| 3117 |
pub fn posix_spawnattr_init(attr: *mut posix_spawnattr_t) -> ::c_int; |
| 3118 |
pub fn posix_spawnattr_setflags(attr: *mut posix_spawnattr_t, flags: ::c_short) -> ::c_int; |
| 3119 |
pub fn posix_spawnattr_setpgroup(attr: *mut posix_spawnattr_t, flags: ::pid_t) -> ::c_int; |
| 3120 |
pub fn posix_spawnattr_setschedparam( |
| 3121 |
attr: *mut posix_spawnattr_t, |
| 3122 |
param: *const ::sched_param, |
| 3123 |
) -> ::c_int; |
| 3124 |
pub fn posix_spawnattr_setschedpolicy(attr: *mut posix_spawnattr_t, flags: ::c_int) -> ::c_int; |
| 3125 |
pub fn posix_spawnattr_setsigdefault( |
| 3126 |
attr: *mut posix_spawnattr_t, |
| 3127 |
default: *const ::sigset_t, |
| 3128 |
) -> ::c_int; |
| 3129 |
pub fn posix_spawnattr_setsigmask( |
| 3130 |
attr: *mut posix_spawnattr_t, |
| 3131 |
default: *const ::sigset_t, |
| 3132 |
) -> ::c_int; |
| 3133 |
pub fn posix_spawnp( |
| 3134 |
pid: *mut ::pid_t, |
| 3135 |
file: *const ::c_char, |
| 3136 |
file_actions: *const ::posix_spawn_file_actions_t, |
| 3137 |
attrp: *const ::posix_spawnattr_t, |
| 3138 |
argv: *const *mut ::c_char, |
| 3139 |
envp: *const *mut ::c_char, |
| 3140 |
) -> ::c_int; |
| 3141 |
pub fn pread64(fd: ::c_int, buf: *mut ::c_void, count: ::size_t, offset: off64_t) -> ::ssize_t; |
| 3142 |
pub fn preadv(fd: ::c_int, iov: *const ::iovec, iovcnt: ::c_int, offset: ::off_t) -> ::ssize_t; |
| 3143 |
pub fn ptrace64( |
| 3144 |
request: ::c_int, |
| 3145 |
id: ::c_longlong, |
| 3146 |
addr: ::c_longlong, |
| 3147 |
data: ::c_int, |
| 3148 |
buff: *mut ::c_int, |
| 3149 |
) -> ::c_int; |
| 3150 |
pub fn pututline(u: *const utmp) -> *mut utmp; |
| 3151 |
pub fn pututxline(ut: *const utmpx) -> *mut utmpx; |
| 3152 |
pub fn pwrite64( |
| 3153 |
fd: ::c_int, |
| 3154 |
buf: *const ::c_void, |
| 3155 |
count: ::size_t, |
| 3156 |
offset: off64_t, |
| 3157 |
) -> ::ssize_t; |
| 3158 |
pub fn pwritev(fd: ::c_int, iov: *const ::iovec, iovcnt: ::c_int, offset: ::off_t) |
| 3159 |
-> ::ssize_t; |
| 3160 |
#[link_name = "__linux_quotactl"] |
| 3161 |
pub fn quotactl( |
| 3162 |
cmd: ::c_int, |
| 3163 |
special: *const ::c_char, |
| 3164 |
id: ::c_int, |
| 3165 |
data: *mut ::c_char, |
| 3166 |
) -> ::c_int; |
| 3167 |
pub fn rand() -> ::c_int; |
| 3168 |
pub fn readv(fd: ::c_int, iov: *const ::iovec, iovcnt: ::c_int) -> ::ssize_t; |
| 3169 |
pub fn recvfrom( |
| 3170 |
socket: ::c_int, |
| 3171 |
buf: *mut ::c_void, |
| 3172 |
len: ::size_t, |
| 3173 |
flags: ::c_int, |
| 3174 |
addr: *mut ::sockaddr, |
| 3175 |
addrlen: *mut ::socklen_t, |
| 3176 |
) -> ::ssize_t; |
| 3177 |
pub fn recvmmsg( |
| 3178 |
sockfd: ::c_int, |
| 3179 |
msgvec: *mut ::mmsghdr, |
| 3180 |
vlen: ::c_uint, |
| 3181 |
flags: ::c_int, |
| 3182 |
timeout: *mut ::timespec, |
| 3183 |
) -> ::c_int; |
| 3184 |
pub fn recvmsg(sockfd: ::c_int, msg: *mut msghdr, flags: ::c_int) -> ::ssize_t; |
| 3185 |
pub fn regcomp(preg: *mut regex_t, pattern: *const ::c_char, cflags: ::c_int) -> ::c_int; |
| 3186 |
pub fn regerror( |
| 3187 |
errcode: ::c_int, |
| 3188 |
preg: *const ::regex_t, |
| 3189 |
errbuf: *mut ::c_char, |
| 3190 |
errbuf_size: ::size_t, |
| 3191 |
) -> ::size_t; |
| 3192 |
pub fn regexec( |
| 3193 |
preg: *const regex_t, |
| 3194 |
input: *const ::c_char, |
| 3195 |
nmatch: ::size_t, |
| 3196 |
pmatch: *mut regmatch_t, |
| 3197 |
eflags: ::c_int, |
| 3198 |
) -> ::c_int; |
| 3199 |
pub fn regfree(preg: *mut regex_t); |
| 3200 |
pub fn sbrk(increment: ::intptr_t) -> *mut ::c_void; |
| 3201 |
pub fn sched_getparam(pid: ::pid_t, param: *mut sched_param) -> ::c_int; |
| 3202 |
pub fn sched_getscheduler(pid: ::pid_t) -> ::c_int; |
| 3203 |
pub fn sched_get_priority_max(policy: ::c_int) -> ::c_int; |
| 3204 |
pub fn sched_get_priority_min(policy: ::c_int) -> ::c_int; |
| 3205 |
pub fn sched_rr_get_interval(pid: ::pid_t, tp: *mut ::timespec) -> ::c_int; |
| 3206 |
pub fn sched_setparam(pid: ::pid_t, param: *const ::sched_param) -> ::c_int; |
| 3207 |
pub fn sched_setscheduler( |
| 3208 |
pid: ::pid_t, |
| 3209 |
policy: ::c_int, |
| 3210 |
param: *const ::sched_param, |
| 3211 |
) -> ::c_int; |
| 3212 |
pub fn sctp_opt_info( |
| 3213 |
sd: ::c_int, |
| 3214 |
id: ::sctp_assoc_t, |
| 3215 |
opt: ::c_int, |
| 3216 |
arg_size: *mut ::c_void, |
| 3217 |
size: *mut ::size_t, |
| 3218 |
) -> ::c_int; |
| 3219 |
pub fn sctp_peeloff(s: ::c_int, id: ::sctp_assoc_t) -> ::c_int; |
| 3220 |
pub fn seed48(xseed: *mut ::c_ushort) -> *mut ::c_ushort; |
| 3221 |
pub fn seekdir(dirp: *mut ::DIR, loc: ::c_long); |
| 3222 |
pub fn sem_close(sem: *mut sem_t) -> ::c_int; |
| 3223 |
pub fn sem_destroy(sem: *mut sem_t) -> ::c_int; |
| 3224 |
pub fn sem_getvalue(sem: *mut sem_t, sval: *mut ::c_int) -> ::c_int; |
| 3225 |
pub fn sem_init(sem: *mut sem_t, pshared: ::c_int, value: ::c_uint) -> ::c_int; |
| 3226 |
pub fn sem_open(name: *const ::c_char, oflag: ::c_int, ...) -> *mut sem_t; |
| 3227 |
pub fn sem_timedwait(sem: *mut sem_t, abstime: *const ::timespec) -> ::c_int; |
| 3228 |
pub fn sem_unlink(name: *const ::c_char) -> ::c_int; |
| 3229 |
pub fn semctl(semid: ::c_int, semnum: ::c_int, cmd: ::c_int, ...) -> ::c_int; |
| 3230 |
pub fn semget(key: ::key_t, nsems: ::c_int, semflag: ::c_int) -> ::c_int; |
| 3231 |
pub fn semop(semid: ::c_int, sops: *mut sembuf, nsops: ::size_t) -> ::c_int; |
| 3232 |
pub fn send_file(socket: *mut ::c_int, iobuf: *mut sf_parms, flags: ::c_uint) -> ::ssize_t; |
| 3233 |
pub fn sendmmsg( |
| 3234 |
sockfd: ::c_int, |
| 3235 |
msgvec: *mut mmsghdr, |
| 3236 |
vlen: ::c_uint, |
| 3237 |
flags: ::c_int, |
| 3238 |
) -> ::c_int; |
| 3239 |
pub fn sendmsg(sockfd: ::c_int, msg: *const msghdr, flags: ::c_int) -> ::ssize_t; |
| 3240 |
pub fn setcontext(ucp: *const ucontext_t) -> ::c_int; |
| 3241 |
pub fn setdomainname(name: *const ::c_char, len: ::c_int) -> ::c_int; |
| 3242 |
pub fn setgroups(ngroups: ::c_int, ptr: *const ::gid_t) -> ::c_int; |
| 3243 |
pub fn setgrent(); |
| 3244 |
pub fn sethostid(hostid: ::c_int) -> ::c_int; |
| 3245 |
pub fn sethostname(name: *const ::c_char, len: ::c_int) -> ::c_int; |
| 3246 |
pub fn setmntent(filename: *const ::c_char, ty: *const ::c_char) -> *mut ::FILE; |
| 3247 |
pub fn setpriority(which: ::c_int, who: id_t, priority: ::c_int) -> ::c_int; |
| 3248 |
pub fn setpwent(); |
| 3249 |
pub fn setrlimit(resource: ::c_int, rlim: *const ::rlimit) -> ::c_int; |
| 3250 |
pub fn setrlimit64(resource: ::c_int, rlim: *const rlimit64) -> ::c_int; |
| 3251 |
pub fn settimeofday(tv: *const ::timeval, tz: *const ::timezone) -> ::c_int; |
| 3252 |
pub fn setitimer( |
| 3253 |
which: ::c_int, |
| 3254 |
new_value: *const ::itimerval, |
| 3255 |
old_value: *mut ::itimerval, |
| 3256 |
) -> ::c_int; |
| 3257 |
pub fn setutent(); |
| 3258 |
pub fn setutxent(); |
| 3259 |
pub fn sigaltstack(ss: *const stack_t, oss: *mut stack_t) -> ::c_int; |
| 3260 |
pub fn sigsuspend(mask: *const ::sigset_t) -> ::c_int; |
| 3261 |
pub fn sigtimedwait( |
| 3262 |
set: *const sigset_t, |
| 3263 |
info: *mut siginfo_t, |
| 3264 |
timeout: *const ::timespec, |
| 3265 |
) -> ::c_int; |
| 3266 |
pub fn sigwait(set: *const sigset_t, sig: *mut ::c_int) -> ::c_int; |
| 3267 |
pub fn sigwaitinfo(set: *const sigset_t, info: *mut siginfo_t) -> ::c_int; |
| 3268 |
pub fn shmat(shmid: ::c_int, shmaddr: *const ::c_void, shmflg: ::c_int) -> *mut ::c_void; |
| 3269 |
pub fn shmdt(shmaddr: *const ::c_void) -> ::c_int; |
| 3270 |
pub fn shmctl(shmid: ::c_int, cmd: ::c_int, buf: *mut ::shmid_ds) -> ::c_int; |
| 3271 |
pub fn shmget(key: key_t, size: ::size_t, shmflg: ::c_int) -> ::c_int; |
| 3272 |
pub fn shm_open(name: *const ::c_char, oflag: ::c_int, mode: ::mode_t) -> ::c_int; |
| 3273 |
pub fn shm_unlink(name: *const ::c_char) -> ::c_int; |
| 3274 |
pub fn splice(socket1: ::c_int, socket2: ::c_int, flags: ::c_int) -> ::c_int; |
| 3275 |
pub fn srand(seed: ::c_uint); |
| 3276 |
pub fn srand48(seed: ::c_long); |
| 3277 |
pub fn stat64(path: *const ::c_char, buf: *mut stat64) -> ::c_int; |
| 3278 |
pub fn stat64at( |
| 3279 |
dirfd: ::c_int, |
| 3280 |
path: *const ::c_char, |
| 3281 |
buf: *mut stat64, |
| 3282 |
flags: ::c_int, |
| 3283 |
) -> ::c_int; |
| 3284 |
pub fn statfs(path: *const ::c_char, buf: *mut statfs) -> ::c_int; |
| 3285 |
pub fn statfs64(path: *const ::c_char, buf: *mut statfs64) -> ::c_int; |
| 3286 |
pub fn statvfs64(path: *const ::c_char, buf: *mut statvfs64) -> ::c_int; |
| 3287 |
pub fn statx( |
| 3288 |
path: *const ::c_char, |
| 3289 |
buf: *mut stat, |
| 3290 |
length: ::c_int, |
| 3291 |
command: ::c_int, |
| 3292 |
) -> ::c_int; |
| 3293 |
pub fn strcasecmp_l( |
| 3294 |
string1: *const ::c_char, |
| 3295 |
string2: *const ::c_char, |
| 3296 |
locale: ::locale_t, |
| 3297 |
) -> ::c_int; |
| 3298 |
pub fn strerror_r(errnum: ::c_int, buf: *mut c_char, buflen: ::size_t) -> ::c_int; |
| 3299 |
pub fn strftime( |
| 3300 |
arg1: *mut c_char, |
| 3301 |
arg2: ::size_t, |
| 3302 |
arg3: *const c_char, |
| 3303 |
arg4: *const tm, |
| 3304 |
) -> ::size_t; |
| 3305 |
pub fn strncasecmp_l( |
| 3306 |
string1: *const ::c_char, |
| 3307 |
string2: *const ::c_char, |
| 3308 |
length: ::size_t, |
| 3309 |
locale: ::locale_t, |
| 3310 |
) -> ::c_int; |
| 3311 |
pub fn strptime(s: *const ::c_char, format: *const ::c_char, tm: *mut ::tm) -> *mut ::c_char; |
| 3312 |
pub fn strsep(string: *mut *mut ::c_char, delim: *const ::c_char) -> *mut ::c_char; |
| 3313 |
pub fn swapcontext(uocp: *mut ucontext_t, ucp: *const ucontext_t) -> ::c_int; |
| 3314 |
pub fn swapoff(puath: *const ::c_char) -> ::c_int; |
| 3315 |
pub fn swapon(path: *const ::c_char) -> ::c_int; |
| 3316 |
pub fn sync(); |
| 3317 |
pub fn telldir(dirp: *mut ::DIR) -> ::c_long; |
| 3318 |
pub fn timer_create( |
| 3319 |
clockid: ::clockid_t, |
| 3320 |
sevp: *mut ::sigevent, |
| 3321 |
timerid: *mut ::timer_t, |
| 3322 |
) -> ::c_int; |
| 3323 |
pub fn timer_delete(timerid: timer_t) -> ::c_int; |
| 3324 |
pub fn timer_getoverrun(timerid: timer_t) -> ::c_int; |
| 3325 |
pub fn timer_gettime(timerid: timer_t, value: *mut itimerspec) -> ::c_int; |
| 3326 |
pub fn timer_settime( |
| 3327 |
timerid: ::timer_t, |
| 3328 |
flags: ::c_int, |
| 3329 |
new_value: *const ::itimerspec, |
| 3330 |
old_value: *mut ::itimerspec, |
| 3331 |
) -> ::c_int; |
| 3332 |
pub fn truncate64(path: *const c_char, length: off64_t) -> ::c_int; |
| 3333 |
pub fn uname(buf: *mut ::utsname) -> ::c_int; |
| 3334 |
pub fn updwtmp(file: *const ::c_char, u: *mut utmp); |
| 3335 |
pub fn uselocale(loc: ::locale_t) -> ::locale_t; |
| 3336 |
pub fn utmpname(file: *const ::c_char) -> ::c_int; |
| 3337 |
pub fn utimensat( |
| 3338 |
dirfd: ::c_int, |
| 3339 |
path: *const ::c_char, |
| 3340 |
times: *const ::timespec, |
| 3341 |
flag: ::c_int, |
| 3342 |
) -> ::c_int; |
| 3343 |
pub fn wait4( |
| 3344 |
pid: ::pid_t, |
| 3345 |
status: *mut ::c_int, |
| 3346 |
options: ::c_int, |
| 3347 |
rusage: *mut ::rusage, |
| 3348 |
) -> ::pid_t; |
| 3349 |
pub fn waitid(idtype: idtype_t, id: id_t, infop: *mut ::siginfo_t, options: ::c_int) |
| 3350 |
-> ::c_int; |
| 3351 |
pub fn writev(fd: ::c_int, iov: *const ::iovec, iovcnt: ::c_int) -> ::ssize_t; |
| 3352 |
|
| 3353 |
// Use AIX thread-safe version errno. |
| 3354 |
pub fn _Errno() -> *mut ::c_int; |
| 3355 |
} |
| 3356 |
|
| 3357 |
cfg_if! { |
| 3358 |
if #[cfg(target_arch = "powerpc64")] { |
| 3359 |
mod powerpc64; |
| 3360 |
pub use self::powerpc64::*; |
| 3361 |
} |
| 3362 |
} |