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