1 //! Apple (ios/darwin)-specific definitions 2 //! 3 //! This covers *-apple-* triples currently 4 pub type c_char = i8; 5 pub type wchar_t = i32; 6 pub type clock_t = c_ulong; 7 pub type time_t = c_long; 8 pub type suseconds_t = i32; 9 pub type dev_t = i32; 10 pub type ino_t = u64; 11 pub type mode_t = u16; 12 pub type nlink_t = u16; 13 pub type blksize_t = i32; 14 pub type rlim_t = u64; 15 pub type pthread_key_t = c_ulong; 16 pub type sigset_t = u32; 17 pub type clockid_t = ::c_uint; 18 pub type fsblkcnt_t = ::c_uint; 19 pub type fsfilcnt_t = ::c_uint; 20 pub type speed_t = ::c_ulong; 21 pub type tcflag_t = ::c_ulong; 22 pub type nl_item = ::c_int; 23 pub type id_t = ::c_uint; 24 pub type sem_t = ::c_int; 25 pub type idtype_t = ::c_uint; 26 pub type integer_t = ::c_int; 27 pub type cpu_type_t = integer_t; 28 pub type cpu_subtype_t = integer_t; 29 30 pub type posix_spawnattr_t = *mut ::c_void; 31 pub type posix_spawn_file_actions_t = *mut ::c_void; 32 pub type key_t = ::c_int; 33 pub type shmatt_t = ::c_ushort; 34 35 pub type sae_associd_t = u32; 36 pub type sae_connid_t = u32; 37 38 deprecated_mach! { 39 pub type vm_prot_t = ::c_int; 40 pub type vm_size_t = ::uintptr_t; 41 pub type mach_timebase_info_data_t = mach_timebase_info; 42 } 43 44 #[cfg_attr(feature = "extra_traits", derive(Debug))] 45 pub enum timezone {} 46 impl ::Copy for timezone {} 47 impl ::Clone for timezone { clone(&self) -> timezone48 fn clone(&self) -> timezone { 49 *self 50 } 51 } 52 53 s! { 54 pub struct ip_mreq { 55 pub imr_multiaddr: in_addr, 56 pub imr_interface: in_addr, 57 } 58 59 pub struct aiocb { 60 pub aio_fildes: ::c_int, 61 pub aio_offset: ::off_t, 62 pub aio_buf: *mut ::c_void, 63 pub aio_nbytes: ::size_t, 64 pub aio_reqprio: ::c_int, 65 pub aio_sigevent: sigevent, 66 pub aio_lio_opcode: ::c_int 67 } 68 69 pub struct glob_t { 70 pub gl_pathc: ::size_t, 71 __unused1: ::c_int, 72 pub gl_offs: ::size_t, 73 __unused2: ::c_int, 74 pub gl_pathv: *mut *mut ::c_char, 75 76 __unused3: *mut ::c_void, 77 78 __unused4: *mut ::c_void, 79 __unused5: *mut ::c_void, 80 __unused6: *mut ::c_void, 81 __unused7: *mut ::c_void, 82 __unused8: *mut ::c_void, 83 } 84 85 pub struct addrinfo { 86 pub ai_flags: ::c_int, 87 pub ai_family: ::c_int, 88 pub ai_socktype: ::c_int, 89 pub ai_protocol: ::c_int, 90 pub ai_addrlen: ::socklen_t, 91 pub ai_canonname: *mut ::c_char, 92 pub ai_addr: *mut ::sockaddr, 93 pub ai_next: *mut addrinfo, 94 } 95 96 #[deprecated( 97 since = "0.2.55", 98 note = "Use the `mach` crate instead", 99 )] 100 pub struct mach_timebase_info { 101 pub numer: u32, 102 pub denom: u32, 103 } 104 105 pub struct stat { 106 pub st_dev: dev_t, 107 pub st_mode: mode_t, 108 pub st_nlink: nlink_t, 109 pub st_ino: ino_t, 110 pub st_uid: ::uid_t, 111 pub st_gid: ::gid_t, 112 pub st_rdev: dev_t, 113 pub st_atime: time_t, 114 pub st_atime_nsec: c_long, 115 pub st_mtime: time_t, 116 pub st_mtime_nsec: c_long, 117 pub st_ctime: time_t, 118 pub st_ctime_nsec: c_long, 119 pub st_birthtime: time_t, 120 pub st_birthtime_nsec: c_long, 121 pub st_size: ::off_t, 122 pub st_blocks: ::blkcnt_t, 123 pub st_blksize: blksize_t, 124 pub st_flags: u32, 125 pub st_gen: u32, 126 pub st_lspare: i32, 127 pub st_qspare: [i64; 2], 128 } 129 130 pub struct pthread_mutexattr_t { 131 __sig: ::c_long, 132 __opaque: [u8; 8], 133 } 134 135 pub struct pthread_condattr_t { 136 __sig: ::c_long, 137 __opaque: [u8; __PTHREAD_CONDATTR_SIZE__], 138 } 139 140 pub struct pthread_rwlockattr_t { 141 __sig: ::c_long, 142 __opaque: [u8; __PTHREAD_RWLOCKATTR_SIZE__], 143 } 144 145 pub struct siginfo_t { 146 pub si_signo: ::c_int, 147 pub si_errno: ::c_int, 148 pub si_code: ::c_int, 149 pub si_pid: ::pid_t, 150 pub si_uid: ::uid_t, 151 pub si_status: ::c_int, 152 pub si_addr: *mut ::c_void, 153 //Requires it to be union for tests 154 //pub si_value: ::sigval, 155 _pad: [usize; 9], 156 } 157 158 pub struct sigaction { 159 // FIXME: this field is actually a union 160 pub sa_sigaction: ::sighandler_t, 161 pub sa_mask: sigset_t, 162 pub sa_flags: ::c_int, 163 } 164 165 pub struct stack_t { 166 pub ss_sp: *mut ::c_void, 167 pub ss_size: ::size_t, 168 pub ss_flags: ::c_int, 169 } 170 171 pub struct fstore_t { 172 pub fst_flags: ::c_uint, 173 pub fst_posmode: ::c_int, 174 pub fst_offset: ::off_t, 175 pub fst_length: ::off_t, 176 pub fst_bytesalloc: ::off_t, 177 } 178 179 pub struct radvisory { 180 pub ra_offset: ::off_t, 181 pub ra_count: ::c_int, 182 } 183 184 pub struct statvfs { 185 pub f_bsize: ::c_ulong, 186 pub f_frsize: ::c_ulong, 187 pub f_blocks: ::fsblkcnt_t, 188 pub f_bfree: ::fsblkcnt_t, 189 pub f_bavail: ::fsblkcnt_t, 190 pub f_files: ::fsfilcnt_t, 191 pub f_ffree: ::fsfilcnt_t, 192 pub f_favail: ::fsfilcnt_t, 193 pub f_fsid: ::c_ulong, 194 pub f_flag: ::c_ulong, 195 pub f_namemax: ::c_ulong, 196 } 197 198 pub struct Dl_info { 199 pub dli_fname: *const ::c_char, 200 pub dli_fbase: *mut ::c_void, 201 pub dli_sname: *const ::c_char, 202 pub dli_saddr: *mut ::c_void, 203 } 204 205 pub struct sockaddr_in { 206 pub sin_len: u8, 207 pub sin_family: ::sa_family_t, 208 pub sin_port: ::in_port_t, 209 pub sin_addr: ::in_addr, 210 pub sin_zero: [::c_char; 8], 211 } 212 213 pub struct kevent64_s { 214 pub ident: u64, 215 pub filter: i16, 216 pub flags: u16, 217 pub fflags: u32, 218 pub data: i64, 219 pub udata: u64, 220 pub ext: [u64; 2], 221 } 222 223 pub struct dqblk { 224 pub dqb_bhardlimit: u64, 225 pub dqb_bsoftlimit: u64, 226 pub dqb_curbytes: u64, 227 pub dqb_ihardlimit: u32, 228 pub dqb_isoftlimit: u32, 229 pub dqb_curinodes: u32, 230 pub dqb_btime: u32, 231 pub dqb_itime: u32, 232 pub dqb_id: u32, 233 pub dqb_spare: [u32; 4], 234 } 235 236 pub struct if_msghdr { 237 pub ifm_msglen: ::c_ushort, 238 pub ifm_version: ::c_uchar, 239 pub ifm_type: ::c_uchar, 240 pub ifm_addrs: ::c_int, 241 pub ifm_flags: ::c_int, 242 pub ifm_index: ::c_ushort, 243 pub ifm_data: if_data, 244 } 245 246 pub struct termios { 247 pub c_iflag: ::tcflag_t, 248 pub c_oflag: ::tcflag_t, 249 pub c_cflag: ::tcflag_t, 250 pub c_lflag: ::tcflag_t, 251 pub c_cc: [::cc_t; ::NCCS], 252 pub c_ispeed: ::speed_t, 253 pub c_ospeed: ::speed_t, 254 } 255 256 pub struct flock { 257 pub l_start: ::off_t, 258 pub l_len: ::off_t, 259 pub l_pid: ::pid_t, 260 pub l_type: ::c_short, 261 pub l_whence: ::c_short, 262 } 263 264 pub struct sf_hdtr { 265 pub headers: *mut ::iovec, 266 pub hdr_cnt: ::c_int, 267 pub trailers: *mut ::iovec, 268 pub trl_cnt: ::c_int, 269 } 270 271 pub struct lconv { 272 pub decimal_point: *mut ::c_char, 273 pub thousands_sep: *mut ::c_char, 274 pub grouping: *mut ::c_char, 275 pub int_curr_symbol: *mut ::c_char, 276 pub currency_symbol: *mut ::c_char, 277 pub mon_decimal_point: *mut ::c_char, 278 pub mon_thousands_sep: *mut ::c_char, 279 pub mon_grouping: *mut ::c_char, 280 pub positive_sign: *mut ::c_char, 281 pub negative_sign: *mut ::c_char, 282 pub int_frac_digits: ::c_char, 283 pub frac_digits: ::c_char, 284 pub p_cs_precedes: ::c_char, 285 pub p_sep_by_space: ::c_char, 286 pub n_cs_precedes: ::c_char, 287 pub n_sep_by_space: ::c_char, 288 pub p_sign_posn: ::c_char, 289 pub n_sign_posn: ::c_char, 290 pub int_p_cs_precedes: ::c_char, 291 pub int_n_cs_precedes: ::c_char, 292 pub int_p_sep_by_space: ::c_char, 293 pub int_n_sep_by_space: ::c_char, 294 pub int_p_sign_posn: ::c_char, 295 pub int_n_sign_posn: ::c_char, 296 } 297 298 pub struct proc_taskinfo { 299 pub pti_virtual_size: u64, 300 pub pti_resident_size: u64, 301 pub pti_total_user: u64, 302 pub pti_total_system: u64, 303 pub pti_threads_user: u64, 304 pub pti_threads_system: u64, 305 pub pti_policy: i32, 306 pub pti_faults: i32, 307 pub pti_pageins: i32, 308 pub pti_cow_faults: i32, 309 pub pti_messages_sent: i32, 310 pub pti_messages_received: i32, 311 pub pti_syscalls_mach: i32, 312 pub pti_syscalls_unix: i32, 313 pub pti_csw: i32, 314 pub pti_threadnum: i32, 315 pub pti_numrunning: i32, 316 pub pti_priority: i32, 317 } 318 319 pub struct proc_bsdinfo { 320 pub pbi_flags: u32, 321 pub pbi_status: u32, 322 pub pbi_xstatus: u32, 323 pub pbi_pid: u32, 324 pub pbi_ppid: u32, 325 pub pbi_uid: ::uid_t, 326 pub pbi_gid: ::gid_t, 327 pub pbi_ruid: ::uid_t, 328 pub pbi_rgid: ::gid_t, 329 pub pbi_svuid: ::uid_t, 330 pub pbi_svgid: ::gid_t, 331 pub rfu_1: u32, 332 pub pbi_comm: [::c_char; MAXCOMLEN], 333 pub pbi_name: [::c_char; 32], // MAXCOMLEN * 2, but macro isn't happy... 334 pub pbi_nfiles: u32, 335 pub pbi_pgid: u32, 336 pub pbi_pjobc: u32, 337 pub e_tdev: u32, 338 pub e_tpgid: u32, 339 pub pbi_nice: i32, 340 pub pbi_start_tvsec: u64, 341 pub pbi_start_tvusec: u64, 342 } 343 344 pub struct proc_taskallinfo { 345 pub pbsd: proc_bsdinfo, 346 pub ptinfo: proc_taskinfo, 347 } 348 349 pub struct xsw_usage { 350 pub xsu_total: u64, 351 pub xsu_avail: u64, 352 pub xsu_used: u64, 353 pub xsu_pagesize: u32, 354 pub xsu_encrypted: ::boolean_t, 355 } 356 357 pub struct xucred { 358 pub cr_version: ::c_uint, 359 pub cr_uid: ::uid_t, 360 pub cr_ngroups: ::c_short, 361 pub cr_groups: [::gid_t;16] 362 } 363 364 #[deprecated( 365 since = "0.2.55", 366 note = "Use the `mach` crate instead", 367 )] 368 pub struct mach_header { 369 pub magic: u32, 370 pub cputype: cpu_type_t, 371 pub cpusubtype: cpu_subtype_t, 372 pub filetype: u32, 373 pub ncmds: u32, 374 pub sizeofcmds: u32, 375 pub flags: u32, 376 } 377 378 #[deprecated( 379 since = "0.2.55", 380 note = "Use the `mach` crate instead", 381 )] 382 pub struct mach_header_64 { 383 pub magic: u32, 384 pub cputype: cpu_type_t, 385 pub cpusubtype: cpu_subtype_t, 386 pub filetype: u32, 387 pub ncmds: u32, 388 pub sizeofcmds: u32, 389 pub flags: u32, 390 pub reserved: u32, 391 } 392 393 pub struct segment_command { 394 pub cmd: u32, 395 pub cmdsize: u32, 396 pub segname: [::c_char; 16], 397 pub vmaddr: u32, 398 pub vmsize: u32, 399 pub fileoff: u32, 400 pub filesize: u32, 401 pub maxprot: vm_prot_t, 402 pub initprot: vm_prot_t, 403 pub nsects: u32, 404 pub flags: u32, 405 } 406 407 pub struct segment_command_64 { 408 pub cmd: u32, 409 pub cmdsize: u32, 410 pub segname: [::c_char; 16], 411 pub vmaddr: u64, 412 pub vmsize: u64, 413 pub fileoff: u64, 414 pub filesize: u64, 415 pub maxprot: vm_prot_t, 416 pub initprot: vm_prot_t, 417 pub nsects: u32, 418 pub flags: u32, 419 } 420 421 pub struct load_command { 422 pub cmd: u32, 423 pub cmdsize: u32, 424 } 425 426 pub struct sockaddr_dl { 427 pub sdl_len: ::c_uchar, 428 pub sdl_family: ::c_uchar, 429 pub sdl_index: ::c_ushort, 430 pub sdl_type: ::c_uchar, 431 pub sdl_nlen: ::c_uchar, 432 pub sdl_alen: ::c_uchar, 433 pub sdl_slen: ::c_uchar, 434 pub sdl_data: [::c_char; 12], 435 } 436 437 pub struct sockaddr_inarp { 438 pub sin_len: ::c_uchar, 439 pub sin_family: ::c_uchar, 440 pub sin_port: ::c_ushort, 441 pub sin_addr: ::in_addr, 442 pub sin_srcaddr: ::in_addr, 443 pub sin_tos: ::c_ushort, 444 pub sin_other: ::c_ushort, 445 } 446 447 pub struct sockaddr_ctl { 448 pub sc_len: ::c_uchar, 449 pub sc_family: ::c_uchar, 450 pub ss_sysaddr: u16, 451 pub sc_id: u32, 452 pub sc_unit: u32, 453 pub sc_reserved: [u32; 5], 454 } 455 456 pub struct in_pktinfo { 457 pub ipi_ifindex: ::c_uint, 458 pub ipi_spec_dst: ::in_addr, 459 pub ipi_addr: ::in_addr, 460 } 461 462 pub struct in6_pktinfo { 463 pub ipi6_addr: ::in6_addr, 464 pub ipi6_ifindex: ::c_uint, 465 } 466 467 // sys/ipc.h: 468 469 pub struct ipc_perm { 470 pub uid: ::uid_t, 471 pub gid: ::gid_t, 472 pub cuid: ::uid_t, 473 pub cgid: ::gid_t, 474 pub mode: ::mode_t, 475 pub _seq: ::c_ushort, 476 pub _key: ::key_t, 477 } 478 479 // sys/sem.h 480 481 pub struct sembuf { 482 pub sem_num: ::c_ushort, 483 pub sem_op: ::c_short, 484 pub sem_flg: ::c_short, 485 } 486 487 // sys/shm.h 488 489 pub struct arphdr { 490 pub ar_hrd: u16, 491 pub ar_pro: u16, 492 pub ar_hln: u8, 493 pub ar_pln: u8, 494 pub ar_op: u16, 495 } 496 497 pub struct in_addr { 498 pub s_addr: ::in_addr_t, 499 } 500 501 // sys/socket.h 502 503 pub struct sa_endpoints_t { 504 pub sae_srcif: ::c_uint, // optional source interface 505 pub sae_srcaddr: *const ::sockaddr, // optional source address 506 pub sae_srcaddrlen: ::socklen_t, // size of source address 507 pub sae_dstaddr: *const ::sockaddr, // destination address 508 pub sae_dstaddrlen: ::socklen_t, // size of destination address 509 } 510 511 pub struct timex { 512 pub modes: ::c_uint, 513 pub offset: ::c_long, 514 pub freq: ::c_long, 515 pub maxerror: ::c_long, 516 pub esterror: ::c_long, 517 pub status: ::c_int, 518 pub constant: ::c_long, 519 pub precision: ::c_long, 520 pub tolerance: ::c_long, 521 pub ppsfreq: ::c_long, 522 pub jitter: ::c_long, 523 pub shift: ::c_int, 524 pub stabil: ::c_long, 525 pub jitcnt: ::c_long, 526 pub calcnt: ::c_long, 527 pub errcnt: ::c_long, 528 pub stbcnt: ::c_long, 529 } 530 531 pub struct ntptimeval { 532 pub time: ::timespec, 533 pub maxerror: ::c_long, 534 pub esterror: ::c_long, 535 pub tai: ::c_long, 536 pub time_state: ::c_int, 537 } 538 } 539 540 s_no_extra_traits! { 541 #[cfg_attr(libc_packedN, repr(packed(4)))] 542 pub struct kevent { 543 pub ident: ::uintptr_t, 544 pub filter: i16, 545 pub flags: u16, 546 pub fflags: u32, 547 pub data: ::intptr_t, 548 pub udata: *mut ::c_void, 549 } 550 551 #[cfg_attr(libc_packedN, repr(packed(4)))] 552 pub struct semid_ds { 553 // Note the manpage shows different types than the system header. 554 pub sem_perm: ipc_perm, 555 pub sem_base: i32, 556 pub sem_nsems: ::c_ushort, 557 pub sem_otime: ::time_t, 558 pub sem_pad1: i32, 559 pub sem_ctime: ::time_t, 560 pub sem_pad2: i32, 561 pub sem_pad3: [i32; 4], 562 } 563 564 #[cfg_attr(libc_packedN, repr(packed(4)))] 565 pub struct shmid_ds { 566 pub shm_perm: ipc_perm, 567 pub shm_segsz: ::size_t, 568 pub shm_lpid: ::pid_t, 569 pub shm_cpid: ::pid_t, 570 pub shm_nattch: ::shmatt_t, 571 pub shm_atime: ::time_t, // FIXME: 64-bit wrong align => wrong offset 572 pub shm_dtime: ::time_t, // FIXME: 64-bit wrong align => wrong offset 573 pub shm_ctime: ::time_t, // FIXME: 64-bit wrong align => wrong offset 574 // FIXME: 64-bit wrong align => wrong offset: 575 pub shm_internal: *mut ::c_void, 576 } 577 578 pub struct proc_threadinfo { 579 pub pth_user_time: u64, 580 pub pth_system_time: u64, 581 pub pth_cpu_usage: i32, 582 pub pth_policy: i32, 583 pub pth_run_state: i32, 584 pub pth_flags: i32, 585 pub pth_sleep_time: i32, 586 pub pth_curpri: i32, 587 pub pth_priority: i32, 588 pub pth_maxpriority: i32, 589 pub pth_name: [::c_char; MAXTHREADNAMESIZE], 590 } 591 592 pub struct statfs { 593 pub f_bsize: u32, 594 pub f_iosize: i32, 595 pub f_blocks: u64, 596 pub f_bfree: u64, 597 pub f_bavail: u64, 598 pub f_files: u64, 599 pub f_ffree: u64, 600 pub f_fsid: ::fsid_t, 601 pub f_owner: ::uid_t, 602 pub f_type: u32, 603 pub f_flags: u32, 604 pub f_fssubtype: u32, 605 pub f_fstypename: [::c_char; 16], 606 pub f_mntonname: [::c_char; 1024], 607 pub f_mntfromname: [::c_char; 1024], 608 pub f_reserved: [u32; 8], 609 } 610 611 pub struct dirent { 612 pub d_ino: u64, 613 pub d_seekoff: u64, 614 pub d_reclen: u16, 615 pub d_namlen: u16, 616 pub d_type: u8, 617 pub d_name: [::c_char; 1024], 618 } 619 620 pub struct pthread_rwlock_t { 621 __sig: ::c_long, 622 __opaque: [u8; __PTHREAD_RWLOCK_SIZE__], 623 } 624 625 pub struct pthread_mutex_t { 626 __sig: ::c_long, 627 __opaque: [u8; __PTHREAD_MUTEX_SIZE__], 628 } 629 630 pub struct pthread_cond_t { 631 __sig: ::c_long, 632 __opaque: [u8; __PTHREAD_COND_SIZE__], 633 } 634 635 pub struct sockaddr_storage { 636 pub ss_len: u8, 637 pub ss_family: ::sa_family_t, 638 __ss_pad1: [u8; 6], 639 __ss_align: i64, 640 __ss_pad2: [u8; 112], 641 } 642 643 pub struct utmpx { 644 pub ut_user: [::c_char; _UTX_USERSIZE], 645 pub ut_id: [::c_char; _UTX_IDSIZE], 646 pub ut_line: [::c_char; _UTX_LINESIZE], 647 pub ut_pid: ::pid_t, 648 pub ut_type: ::c_short, 649 pub ut_tv: ::timeval, 650 pub ut_host: [::c_char; _UTX_HOSTSIZE], 651 ut_pad: [u32; 16], 652 } 653 654 pub struct sigevent { 655 pub sigev_notify: ::c_int, 656 pub sigev_signo: ::c_int, 657 pub sigev_value: ::sigval, 658 __unused1: *mut ::c_void, //actually a function pointer 659 pub sigev_notify_attributes: *mut ::pthread_attr_t 660 } 661 } 662 663 impl siginfo_t { si_addr(&self) -> *mut ::c_void664 pub unsafe fn si_addr(&self) -> *mut ::c_void { 665 self.si_addr 666 } 667 si_value(&self) -> ::sigval668 pub unsafe fn si_value(&self) -> ::sigval { 669 #[repr(C)] 670 struct siginfo_timer { 671 _si_signo: ::c_int, 672 _si_errno: ::c_int, 673 _si_code: ::c_int, 674 _si_pid: ::pid_t, 675 _si_uid: ::uid_t, 676 _si_status: ::c_int, 677 _si_addr: *mut ::c_void, 678 si_value: ::sigval, 679 } 680 681 (*(self as *const siginfo_t as *const siginfo_timer)).si_value 682 } 683 } 684 685 cfg_if! { 686 if #[cfg(libc_union)] { 687 s_no_extra_traits! { 688 pub union semun { 689 pub val: ::c_int, 690 pub buf: *mut semid_ds, 691 pub array: *mut ::c_ushort, 692 } 693 } 694 695 cfg_if! { 696 if #[cfg(feature = "extra_traits")] { 697 impl PartialEq for semun { 698 fn eq(&self, other: &semun) -> bool { 699 unsafe { self.val == other.val } 700 } 701 } 702 impl Eq for semun {} 703 impl ::fmt::Debug for semun { 704 fn fmt(&self, f: &mut ::fmt::Formatter) 705 -> ::fmt::Result { 706 f.debug_struct("semun") 707 .field("val", unsafe { &self.val }) 708 .finish() 709 } 710 } 711 impl ::hash::Hash for semun { 712 fn hash<H: ::hash::Hasher>(&self, state: &mut H) { 713 unsafe { self.val.hash(state) }; 714 } 715 } 716 } 717 } 718 } 719 } 720 721 cfg_if! { 722 if #[cfg(feature = "extra_traits")] { 723 impl PartialEq for kevent { 724 fn eq(&self, other: &kevent) -> bool { 725 self.ident == other.ident 726 && self.filter == other.filter 727 && self.flags == other.flags 728 && self.fflags == other.fflags 729 && self.data == other.data 730 && self.udata == other.udata 731 } 732 } 733 impl Eq for kevent {} 734 impl ::fmt::Debug for kevent { 735 fn fmt(&self, f: &mut ::fmt::Formatter) -> ::fmt::Result { 736 let ident = self.ident; 737 let filter = self.filter; 738 let flags = self.flags; 739 let fflags = self.fflags; 740 let data = self.data; 741 let udata = self.udata; 742 f.debug_struct("kevent") 743 .field("ident", &ident) 744 .field("filter", &filter) 745 .field("flags", &flags) 746 .field("fflags", &fflags) 747 .field("data", &data) 748 .field("udata", &udata) 749 .finish() 750 } 751 } 752 impl ::hash::Hash for kevent { 753 fn hash<H: ::hash::Hasher>(&self, state: &mut H) { 754 let ident = self.ident; 755 let filter = self.filter; 756 let flags = self.flags; 757 let fflags = self.fflags; 758 let data = self.data; 759 let udata = self.udata; 760 ident.hash(state); 761 filter.hash(state); 762 flags.hash(state); 763 fflags.hash(state); 764 data.hash(state); 765 udata.hash(state); 766 } 767 } 768 769 impl PartialEq for semid_ds { 770 fn eq(&self, other: &semid_ds) -> bool { 771 let sem_perm = self.sem_perm; 772 let sem_pad3 = self.sem_pad3; 773 let other_sem_perm = other.sem_perm; 774 let other_sem_pad3 = other.sem_pad3; 775 sem_perm == other_sem_perm 776 && self.sem_base == other.sem_base 777 && self.sem_nsems == other.sem_nsems 778 && self.sem_otime == other.sem_otime 779 && self.sem_pad1 == other.sem_pad1 780 && self.sem_ctime == other.sem_ctime 781 && self.sem_pad2 == other.sem_pad2 782 && sem_pad3 == other_sem_pad3 783 } 784 } 785 impl Eq for semid_ds {} 786 impl ::fmt::Debug for semid_ds { 787 fn fmt(&self, f: &mut ::fmt::Formatter) -> ::fmt::Result { 788 let sem_perm = self.sem_perm; 789 let sem_base = self.sem_base; 790 let sem_nsems = self.sem_nsems; 791 let sem_otime = self.sem_otime; 792 let sem_pad1 = self.sem_pad1; 793 let sem_ctime = self.sem_ctime; 794 let sem_pad2 = self.sem_pad2; 795 let sem_pad3 = self.sem_pad3; 796 f.debug_struct("semid_ds") 797 .field("sem_perm", &sem_perm) 798 .field("sem_base", &sem_base) 799 .field("sem_nsems", &sem_nsems) 800 .field("sem_otime", &sem_otime) 801 .field("sem_pad1", &sem_pad1) 802 .field("sem_ctime", &sem_ctime) 803 .field("sem_pad2", &sem_pad2) 804 .field("sem_pad3", &sem_pad3) 805 .finish() 806 } 807 } 808 impl ::hash::Hash for semid_ds { 809 fn hash<H: ::hash::Hasher>(&self, state: &mut H) { 810 let sem_perm = self.sem_perm; 811 let sem_base = self.sem_base; 812 let sem_nsems = self.sem_nsems; 813 let sem_otime = self.sem_otime; 814 let sem_pad1 = self.sem_pad1; 815 let sem_ctime = self.sem_ctime; 816 let sem_pad2 = self.sem_pad2; 817 let sem_pad3 = self.sem_pad3; 818 sem_perm.hash(state); 819 sem_base.hash(state); 820 sem_nsems.hash(state); 821 sem_otime.hash(state); 822 sem_pad1.hash(state); 823 sem_ctime.hash(state); 824 sem_pad2.hash(state); 825 sem_pad3.hash(state); 826 } 827 } 828 829 impl PartialEq for shmid_ds { 830 fn eq(&self, other: &shmid_ds) -> bool { 831 let shm_perm = self.shm_perm; 832 let other_shm_perm = other.shm_perm; 833 shm_perm == other_shm_perm 834 && self.shm_segsz == other.shm_segsz 835 && self.shm_lpid == other.shm_lpid 836 && self.shm_cpid == other.shm_cpid 837 && self.shm_nattch == other.shm_nattch 838 && self.shm_atime == other.shm_atime 839 && self.shm_dtime == other.shm_dtime 840 && self.shm_ctime == other.shm_ctime 841 && self.shm_internal == other.shm_internal 842 } 843 } 844 impl Eq for shmid_ds {} 845 impl ::fmt::Debug for shmid_ds { 846 fn fmt(&self, f: &mut ::fmt::Formatter) -> ::fmt::Result { 847 let shm_perm = self.shm_perm; 848 let shm_segsz = self.shm_segsz; 849 let shm_lpid = self.shm_lpid; 850 let shm_cpid = self.shm_cpid; 851 let shm_nattch = self.shm_nattch; 852 let shm_atime = self.shm_atime; 853 let shm_dtime = self.shm_dtime; 854 let shm_ctime = self.shm_ctime; 855 let shm_internal = self.shm_internal; 856 f.debug_struct("shmid_ds") 857 .field("shm_perm", &shm_perm) 858 .field("shm_segsz", &shm_segsz) 859 .field("shm_lpid", &shm_lpid) 860 .field("shm_cpid", &shm_cpid) 861 .field("shm_nattch", &shm_nattch) 862 .field("shm_atime", &shm_atime) 863 .field("shm_dtime", &shm_dtime) 864 .field("shm_ctime", &shm_ctime) 865 .field("shm_internal", &shm_internal) 866 .finish() 867 } 868 } 869 impl ::hash::Hash for shmid_ds { 870 fn hash<H: ::hash::Hasher>(&self, state: &mut H) { 871 let shm_perm = self.shm_perm; 872 let shm_segsz = self.shm_segsz; 873 let shm_lpid = self.shm_lpid; 874 let shm_cpid = self.shm_cpid; 875 let shm_nattch = self.shm_nattch; 876 let shm_atime = self.shm_atime; 877 let shm_dtime = self.shm_dtime; 878 let shm_ctime = self.shm_ctime; 879 let shm_internal = self.shm_internal; 880 shm_perm.hash(state); 881 shm_segsz.hash(state); 882 shm_lpid.hash(state); 883 shm_cpid.hash(state); 884 shm_nattch.hash(state); 885 shm_atime.hash(state); 886 shm_dtime.hash(state); 887 shm_ctime.hash(state); 888 shm_internal.hash(state); 889 } 890 } 891 892 impl PartialEq for proc_threadinfo { 893 fn eq(&self, other: &proc_threadinfo) -> bool { 894 self.pth_user_time == other.pth_user_time 895 && self.pth_system_time == other.pth_system_time 896 && self.pth_cpu_usage == other.pth_cpu_usage 897 && self.pth_policy == other.pth_policy 898 && self.pth_run_state == other.pth_run_state 899 && self.pth_flags == other.pth_flags 900 && self.pth_sleep_time == other.pth_sleep_time 901 && self.pth_curpri == other.pth_curpri 902 && self.pth_priority == other.pth_priority 903 && self.pth_maxpriority == other.pth_maxpriority 904 && self.pth_name 905 .iter() 906 .zip(other.pth_name.iter()) 907 .all(|(a,b)| a == b) 908 } 909 } 910 impl Eq for proc_threadinfo {} 911 impl ::fmt::Debug for proc_threadinfo { 912 fn fmt(&self, f: &mut ::fmt::Formatter) -> ::fmt::Result { 913 f.debug_struct("proc_threadinfo") 914 .field("pth_user_time", &self.pth_user_time) 915 .field("pth_system_time", &self.pth_system_time) 916 .field("pth_cpu_usage", &self.pth_cpu_usage) 917 .field("pth_policy", &self.pth_policy) 918 .field("pth_run_state", &self.pth_run_state) 919 .field("pth_flags", &self.pth_flags) 920 .field("pth_sleep_time", &self.pth_sleep_time) 921 .field("pth_curpri", &self.pth_curpri) 922 .field("pth_priority", &self.pth_priority) 923 .field("pth_maxpriority", &self.pth_maxpriority) 924 // FIXME: .field("pth_name", &self.pth_name) 925 .finish() 926 } 927 } 928 impl ::hash::Hash for proc_threadinfo { 929 fn hash<H: ::hash::Hasher>(&self, state: &mut H) { 930 self.pth_user_time.hash(state); 931 self.pth_system_time.hash(state); 932 self.pth_cpu_usage.hash(state); 933 self.pth_policy.hash(state); 934 self.pth_run_state.hash(state); 935 self.pth_flags.hash(state); 936 self.pth_sleep_time.hash(state); 937 self.pth_curpri.hash(state); 938 self.pth_priority.hash(state); 939 self.pth_maxpriority.hash(state); 940 self.pth_name.hash(state); 941 } 942 } 943 944 impl PartialEq for statfs { 945 fn eq(&self, other: &statfs) -> bool { 946 self.f_bsize == other.f_bsize 947 && self.f_iosize == other.f_iosize 948 && self.f_blocks == other.f_blocks 949 && self.f_bfree == other.f_bfree 950 && self.f_bavail == other.f_bavail 951 && self.f_files == other.f_files 952 && self.f_ffree == other.f_ffree 953 && self.f_fsid == other.f_fsid 954 && self.f_owner == other.f_owner 955 && self.f_flags == other.f_flags 956 && self.f_fssubtype == other.f_fssubtype 957 && self.f_fstypename == other.f_fstypename 958 && self.f_type == other.f_type 959 && self 960 .f_mntonname 961 .iter() 962 .zip(other.f_mntonname.iter()) 963 .all(|(a,b)| a == b) 964 && self 965 .f_mntfromname 966 .iter() 967 .zip(other.f_mntfromname.iter()) 968 .all(|(a,b)| a == b) 969 && self.f_reserved == other.f_reserved 970 } 971 } 972 973 impl Eq for statfs {} 974 impl ::fmt::Debug for statfs { 975 fn fmt(&self, f: &mut ::fmt::Formatter) -> ::fmt::Result { 976 f.debug_struct("statfs") 977 .field("f_bsize", &self.f_bsize) 978 .field("f_iosize", &self.f_iosize) 979 .field("f_blocks", &self.f_blocks) 980 .field("f_bfree", &self.f_bfree) 981 .field("f_bavail", &self.f_bavail) 982 .field("f_files", &self.f_files) 983 .field("f_ffree", &self.f_ffree) 984 .field("f_fsid", &self.f_fsid) 985 .field("f_owner", &self.f_owner) 986 .field("f_flags", &self.f_flags) 987 .field("f_fssubtype", &self.f_fssubtype) 988 .field("f_fstypename", &self.f_fstypename) 989 .field("f_type", &self.f_type) 990 // FIXME: .field("f_mntonname", &self.f_mntonname) 991 // FIXME: .field("f_mntfromname", &self.f_mntfromname) 992 .field("f_reserved", &self.f_reserved) 993 .finish() 994 } 995 } 996 997 impl ::hash::Hash for statfs { 998 fn hash<H: ::hash::Hasher>(&self, state: &mut H) { 999 self.f_bsize.hash(state); 1000 self.f_iosize.hash(state); 1001 self.f_blocks.hash(state); 1002 self.f_bfree.hash(state); 1003 self.f_bavail.hash(state); 1004 self.f_files.hash(state); 1005 self.f_ffree.hash(state); 1006 self.f_fsid.hash(state); 1007 self.f_owner.hash(state); 1008 self.f_flags.hash(state); 1009 self.f_fssubtype.hash(state); 1010 self.f_fstypename.hash(state); 1011 self.f_type.hash(state); 1012 self.f_mntonname.hash(state); 1013 self.f_mntfromname.hash(state); 1014 self.f_reserved.hash(state); 1015 } 1016 } 1017 1018 impl PartialEq for dirent { 1019 fn eq(&self, other: &dirent) -> bool { 1020 self.d_ino == other.d_ino 1021 && self.d_seekoff == other.d_seekoff 1022 && self.d_reclen == other.d_reclen 1023 && self.d_namlen == other.d_namlen 1024 && self.d_type == other.d_type 1025 && self 1026 .d_name 1027 .iter() 1028 .zip(other.d_name.iter()) 1029 .all(|(a,b)| a == b) 1030 } 1031 } 1032 impl Eq for dirent {} 1033 impl ::fmt::Debug for dirent { 1034 fn fmt(&self, f: &mut ::fmt::Formatter) -> ::fmt::Result { 1035 f.debug_struct("dirent") 1036 .field("d_ino", &self.d_ino) 1037 .field("d_seekoff", &self.d_seekoff) 1038 .field("d_reclen", &self.d_reclen) 1039 .field("d_namlen", &self.d_namlen) 1040 .field("d_type", &self.d_type) 1041 // FIXME: .field("d_name", &self.d_name) 1042 .finish() 1043 } 1044 } 1045 impl ::hash::Hash for dirent { 1046 fn hash<H: ::hash::Hasher>(&self, state: &mut H) { 1047 self.d_ino.hash(state); 1048 self.d_seekoff.hash(state); 1049 self.d_reclen.hash(state); 1050 self.d_namlen.hash(state); 1051 self.d_type.hash(state); 1052 self.d_name.hash(state); 1053 } 1054 } 1055 impl PartialEq for pthread_rwlock_t { 1056 fn eq(&self, other: &pthread_rwlock_t) -> bool { 1057 self.__sig == other.__sig 1058 && self. 1059 __opaque 1060 .iter() 1061 .zip(other.__opaque.iter()) 1062 .all(|(a,b)| a == b) 1063 } 1064 } 1065 impl Eq for pthread_rwlock_t {} 1066 impl ::fmt::Debug for pthread_rwlock_t { 1067 fn fmt(&self, f: &mut ::fmt::Formatter) -> ::fmt::Result { 1068 f.debug_struct("pthread_rwlock_t") 1069 .field("__sig", &self.__sig) 1070 // FIXME: .field("__opaque", &self.__opaque) 1071 .finish() 1072 } 1073 } 1074 impl ::hash::Hash for pthread_rwlock_t { 1075 fn hash<H: ::hash::Hasher>(&self, state: &mut H) { 1076 self.__sig.hash(state); 1077 self.__opaque.hash(state); 1078 } 1079 } 1080 1081 impl PartialEq for pthread_mutex_t { 1082 fn eq(&self, other: &pthread_mutex_t) -> bool { 1083 self.__sig == other.__sig 1084 && self. 1085 __opaque 1086 .iter() 1087 .zip(other.__opaque.iter()) 1088 .all(|(a,b)| a == b) 1089 } 1090 } 1091 1092 impl Eq for pthread_mutex_t {} 1093 1094 impl ::fmt::Debug for pthread_mutex_t { 1095 fn fmt(&self, f: &mut ::fmt::Formatter) -> ::fmt::Result { 1096 f.debug_struct("pthread_mutex_t") 1097 .field("__sig", &self.__sig) 1098 // FIXME: .field("__opaque", &self.__opaque) 1099 .finish() 1100 } 1101 } 1102 1103 impl ::hash::Hash for pthread_mutex_t { 1104 fn hash<H: ::hash::Hasher>(&self, state: &mut H) { 1105 self.__sig.hash(state); 1106 self.__opaque.hash(state); 1107 } 1108 } 1109 1110 impl PartialEq for pthread_cond_t { 1111 fn eq(&self, other: &pthread_cond_t) -> bool { 1112 self.__sig == other.__sig 1113 && self. 1114 __opaque 1115 .iter() 1116 .zip(other.__opaque.iter()) 1117 .all(|(a,b)| a == b) 1118 } 1119 } 1120 1121 impl Eq for pthread_cond_t {} 1122 1123 impl ::fmt::Debug for pthread_cond_t { 1124 fn fmt(&self, f: &mut ::fmt::Formatter) -> ::fmt::Result { 1125 f.debug_struct("pthread_cond_t") 1126 .field("__sig", &self.__sig) 1127 // FIXME: .field("__opaque", &self.__opaque) 1128 .finish() 1129 } 1130 } 1131 1132 impl ::hash::Hash for pthread_cond_t { 1133 fn hash<H: ::hash::Hasher>(&self, state: &mut H) { 1134 self.__sig.hash(state); 1135 self.__opaque.hash(state); 1136 } 1137 } 1138 1139 impl PartialEq for sockaddr_storage { 1140 fn eq(&self, other: &sockaddr_storage) -> bool { 1141 self.ss_len == other.ss_len 1142 && self.ss_family == other.ss_family 1143 && self 1144 .__ss_pad1 1145 .iter() 1146 .zip(other.__ss_pad1.iter()) 1147 .all(|(a, b)| a == b) 1148 && self.__ss_align == other.__ss_align 1149 && self 1150 .__ss_pad2 1151 .iter() 1152 .zip(other.__ss_pad2.iter()) 1153 .all(|(a, b)| a == b) 1154 } 1155 } 1156 1157 impl Eq for sockaddr_storage {} 1158 1159 impl ::fmt::Debug for sockaddr_storage { 1160 fn fmt(&self, f: &mut ::fmt::Formatter) -> ::fmt::Result { 1161 f.debug_struct("sockaddr_storage") 1162 .field("ss_len", &self.ss_len) 1163 .field("ss_family", &self.ss_family) 1164 .field("__ss_pad1", &self.__ss_pad1) 1165 .field("__ss_align", &self.__ss_align) 1166 // FIXME: .field("__ss_pad2", &self.__ss_pad2) 1167 .finish() 1168 } 1169 } 1170 1171 impl ::hash::Hash for sockaddr_storage { 1172 fn hash<H: ::hash::Hasher>(&self, state: &mut H) { 1173 self.ss_len.hash(state); 1174 self.ss_family.hash(state); 1175 self.__ss_pad1.hash(state); 1176 self.__ss_align.hash(state); 1177 self.__ss_pad2.hash(state); 1178 } 1179 } 1180 1181 impl PartialEq for utmpx { 1182 fn eq(&self, other: &utmpx) -> bool { 1183 self.ut_user 1184 .iter() 1185 .zip(other.ut_user.iter()) 1186 .all(|(a,b)| a == b) 1187 && self.ut_id == other.ut_id 1188 && self.ut_line == other.ut_line 1189 && self.ut_pid == other.ut_pid 1190 && self.ut_type == other.ut_type 1191 && self.ut_tv == other.ut_tv 1192 && self 1193 .ut_host 1194 .iter() 1195 .zip(other.ut_host.iter()) 1196 .all(|(a,b)| a == b) 1197 && self.ut_pad == other.ut_pad 1198 } 1199 } 1200 1201 impl Eq for utmpx {} 1202 1203 impl ::fmt::Debug for utmpx { 1204 fn fmt(&self, f: &mut ::fmt::Formatter) -> ::fmt::Result { 1205 f.debug_struct("utmpx") 1206 // FIXME: .field("ut_user", &self.ut_user) 1207 .field("ut_id", &self.ut_id) 1208 .field("ut_line", &self.ut_line) 1209 .field("ut_pid", &self.ut_pid) 1210 .field("ut_type", &self.ut_type) 1211 .field("ut_tv", &self.ut_tv) 1212 // FIXME: .field("ut_host", &self.ut_host) 1213 .field("ut_pad", &self.ut_pad) 1214 .finish() 1215 } 1216 } 1217 1218 impl ::hash::Hash for utmpx { 1219 fn hash<H: ::hash::Hasher>(&self, state: &mut H) { 1220 self.ut_user.hash(state); 1221 self.ut_id.hash(state); 1222 self.ut_line.hash(state); 1223 self.ut_pid.hash(state); 1224 self.ut_type.hash(state); 1225 self.ut_tv.hash(state); 1226 self.ut_host.hash(state); 1227 self.ut_pad.hash(state); 1228 } 1229 } 1230 1231 impl PartialEq for sigevent { 1232 fn eq(&self, other: &sigevent) -> bool { 1233 self.sigev_notify == other.sigev_notify 1234 && self.sigev_signo == other.sigev_signo 1235 && self.sigev_value == other.sigev_value 1236 && self.sigev_notify_attributes 1237 == other.sigev_notify_attributes 1238 } 1239 } 1240 1241 impl Eq for sigevent {} 1242 1243 impl ::fmt::Debug for sigevent { 1244 fn fmt(&self, f: &mut ::fmt::Formatter) -> ::fmt::Result { 1245 f.debug_struct("sigevent") 1246 .field("sigev_notify", &self.sigev_notify) 1247 .field("sigev_signo", &self.sigev_signo) 1248 .field("sigev_value", &self.sigev_value) 1249 .field("sigev_notify_attributes", 1250 &self.sigev_notify_attributes) 1251 .finish() 1252 } 1253 } 1254 1255 impl ::hash::Hash for sigevent { 1256 fn hash<H: ::hash::Hasher>(&self, state: &mut H) { 1257 self.sigev_notify.hash(state); 1258 self.sigev_signo.hash(state); 1259 self.sigev_value.hash(state); 1260 self.sigev_notify_attributes.hash(state); 1261 } 1262 } 1263 } 1264 } 1265 1266 pub const _UTX_USERSIZE: usize = 256; 1267 pub const _UTX_LINESIZE: usize = 32; 1268 pub const _UTX_IDSIZE: usize = 4; 1269 pub const _UTX_HOSTSIZE: usize = 256; 1270 1271 pub const EMPTY: ::c_short = 0; 1272 pub const RUN_LVL: ::c_short = 1; 1273 pub const BOOT_TIME: ::c_short = 2; 1274 pub const OLD_TIME: ::c_short = 3; 1275 pub const NEW_TIME: ::c_short = 4; 1276 pub const INIT_PROCESS: ::c_short = 5; 1277 pub const LOGIN_PROCESS: ::c_short = 6; 1278 pub const USER_PROCESS: ::c_short = 7; 1279 pub const DEAD_PROCESS: ::c_short = 8; 1280 pub const ACCOUNTING: ::c_short = 9; 1281 pub const SIGNATURE: ::c_short = 10; 1282 pub const SHUTDOWN_TIME: ::c_short = 11; 1283 1284 pub const LC_COLLATE_MASK: ::c_int = 1 << 0; 1285 pub const LC_CTYPE_MASK: ::c_int = 1 << 1; 1286 pub const LC_MESSAGES_MASK: ::c_int = 1 << 2; 1287 pub const LC_MONETARY_MASK: ::c_int = 1 << 3; 1288 pub const LC_NUMERIC_MASK: ::c_int = 1 << 4; 1289 pub const LC_TIME_MASK: ::c_int = 1 << 5; 1290 pub const LC_ALL_MASK: ::c_int = LC_COLLATE_MASK 1291 | LC_CTYPE_MASK 1292 | LC_MESSAGES_MASK 1293 | LC_MONETARY_MASK 1294 | LC_NUMERIC_MASK 1295 | LC_TIME_MASK; 1296 1297 pub const CODESET: ::nl_item = 0; 1298 pub const D_T_FMT: ::nl_item = 1; 1299 pub const D_FMT: ::nl_item = 2; 1300 pub const T_FMT: ::nl_item = 3; 1301 pub const T_FMT_AMPM: ::nl_item = 4; 1302 pub const AM_STR: ::nl_item = 5; 1303 pub const PM_STR: ::nl_item = 6; 1304 1305 pub const DAY_1: ::nl_item = 7; 1306 pub const DAY_2: ::nl_item = 8; 1307 pub const DAY_3: ::nl_item = 9; 1308 pub const DAY_4: ::nl_item = 10; 1309 pub const DAY_5: ::nl_item = 11; 1310 pub const DAY_6: ::nl_item = 12; 1311 pub const DAY_7: ::nl_item = 13; 1312 1313 pub const ABDAY_1: ::nl_item = 14; 1314 pub const ABDAY_2: ::nl_item = 15; 1315 pub const ABDAY_3: ::nl_item = 16; 1316 pub const ABDAY_4: ::nl_item = 17; 1317 pub const ABDAY_5: ::nl_item = 18; 1318 pub const ABDAY_6: ::nl_item = 19; 1319 pub const ABDAY_7: ::nl_item = 20; 1320 1321 pub const MON_1: ::nl_item = 21; 1322 pub const MON_2: ::nl_item = 22; 1323 pub const MON_3: ::nl_item = 23; 1324 pub const MON_4: ::nl_item = 24; 1325 pub const MON_5: ::nl_item = 25; 1326 pub const MON_6: ::nl_item = 26; 1327 pub const MON_7: ::nl_item = 27; 1328 pub const MON_8: ::nl_item = 28; 1329 pub const MON_9: ::nl_item = 29; 1330 pub const MON_10: ::nl_item = 30; 1331 pub const MON_11: ::nl_item = 31; 1332 pub const MON_12: ::nl_item = 32; 1333 1334 pub const ABMON_1: ::nl_item = 33; 1335 pub const ABMON_2: ::nl_item = 34; 1336 pub const ABMON_3: ::nl_item = 35; 1337 pub const ABMON_4: ::nl_item = 36; 1338 pub const ABMON_5: ::nl_item = 37; 1339 pub const ABMON_6: ::nl_item = 38; 1340 pub const ABMON_7: ::nl_item = 39; 1341 pub const ABMON_8: ::nl_item = 40; 1342 pub const ABMON_9: ::nl_item = 41; 1343 pub const ABMON_10: ::nl_item = 42; 1344 pub const ABMON_11: ::nl_item = 43; 1345 pub const ABMON_12: ::nl_item = 44; 1346 1347 pub const CLOCK_REALTIME: ::clockid_t = 0; 1348 pub const CLOCK_MONOTONIC: ::clockid_t = 6; 1349 pub const CLOCK_PROCESS_CPUTIME_ID: ::clockid_t = 12; 1350 pub const CLOCK_THREAD_CPUTIME_ID: ::clockid_t = 16; 1351 1352 pub const ERA: ::nl_item = 45; 1353 pub const ERA_D_FMT: ::nl_item = 46; 1354 pub const ERA_D_T_FMT: ::nl_item = 47; 1355 pub const ERA_T_FMT: ::nl_item = 48; 1356 pub const ALT_DIGITS: ::nl_item = 49; 1357 1358 pub const RADIXCHAR: ::nl_item = 50; 1359 pub const THOUSEP: ::nl_item = 51; 1360 1361 pub const YESEXPR: ::nl_item = 52; 1362 pub const NOEXPR: ::nl_item = 53; 1363 1364 pub const YESSTR: ::nl_item = 54; 1365 pub const NOSTR: ::nl_item = 55; 1366 1367 pub const CRNCYSTR: ::nl_item = 56; 1368 1369 pub const D_MD_ORDER: ::nl_item = 57; 1370 1371 pub const EXIT_FAILURE: ::c_int = 1; 1372 pub const EXIT_SUCCESS: ::c_int = 0; 1373 pub const RAND_MAX: ::c_int = 2147483647; 1374 pub const EOF: ::c_int = -1; 1375 pub const SEEK_SET: ::c_int = 0; 1376 pub const SEEK_CUR: ::c_int = 1; 1377 pub const SEEK_END: ::c_int = 2; 1378 pub const _IOFBF: ::c_int = 0; 1379 pub const _IONBF: ::c_int = 2; 1380 pub const _IOLBF: ::c_int = 1; 1381 pub const BUFSIZ: ::c_uint = 1024; 1382 pub const FOPEN_MAX: ::c_uint = 20; 1383 pub const FILENAME_MAX: ::c_uint = 1024; 1384 pub const L_tmpnam: ::c_uint = 1024; 1385 pub const TMP_MAX: ::c_uint = 308915776; 1386 pub const _PC_LINK_MAX: ::c_int = 1; 1387 pub const _PC_MAX_CANON: ::c_int = 2; 1388 pub const _PC_MAX_INPUT: ::c_int = 3; 1389 pub const _PC_NAME_MAX: ::c_int = 4; 1390 pub const _PC_PATH_MAX: ::c_int = 5; 1391 pub const _PC_PIPE_BUF: ::c_int = 6; 1392 pub const _PC_CHOWN_RESTRICTED: ::c_int = 7; 1393 pub const _PC_NO_TRUNC: ::c_int = 8; 1394 pub const _PC_VDISABLE: ::c_int = 9; 1395 pub const O_DSYNC: ::c_int = 0x400000; 1396 pub const O_NOCTTY: ::c_int = 0x20000; 1397 pub const O_CLOEXEC: ::c_int = 0x1000000; 1398 pub const O_DIRECTORY: ::c_int = 0x100000; 1399 pub const S_IFIFO: mode_t = 4096; 1400 pub const S_IFCHR: mode_t = 8192; 1401 pub const S_IFBLK: mode_t = 24576; 1402 pub const S_IFDIR: mode_t = 16384; 1403 pub const S_IFREG: mode_t = 32768; 1404 pub const S_IFLNK: mode_t = 40960; 1405 pub const S_IFSOCK: mode_t = 49152; 1406 pub const S_IFMT: mode_t = 61440; 1407 pub const S_IEXEC: mode_t = 64; 1408 pub const S_IWRITE: mode_t = 128; 1409 pub const S_IREAD: mode_t = 256; 1410 pub const S_IRWXU: mode_t = 448; 1411 pub const S_IXUSR: mode_t = 64; 1412 pub const S_IWUSR: mode_t = 128; 1413 pub const S_IRUSR: mode_t = 256; 1414 pub const S_IRWXG: mode_t = 56; 1415 pub const S_IXGRP: mode_t = 8; 1416 pub const S_IWGRP: mode_t = 16; 1417 pub const S_IRGRP: mode_t = 32; 1418 pub const S_IRWXO: mode_t = 7; 1419 pub const S_IXOTH: mode_t = 1; 1420 pub const S_IWOTH: mode_t = 2; 1421 pub const S_IROTH: mode_t = 4; 1422 pub const F_OK: ::c_int = 0; 1423 pub const R_OK: ::c_int = 4; 1424 pub const W_OK: ::c_int = 2; 1425 pub const X_OK: ::c_int = 1; 1426 pub const STDIN_FILENO: ::c_int = 0; 1427 pub const STDOUT_FILENO: ::c_int = 1; 1428 pub const STDERR_FILENO: ::c_int = 2; 1429 pub const F_LOCK: ::c_int = 1; 1430 pub const F_TEST: ::c_int = 3; 1431 pub const F_TLOCK: ::c_int = 2; 1432 pub const F_ULOCK: ::c_int = 0; 1433 pub const F_GETLK: ::c_int = 7; 1434 pub const F_SETLK: ::c_int = 8; 1435 pub const F_SETLKW: ::c_int = 9; 1436 pub const SIGHUP: ::c_int = 1; 1437 pub const SIGINT: ::c_int = 2; 1438 pub const SIGQUIT: ::c_int = 3; 1439 pub const SIGILL: ::c_int = 4; 1440 pub const SIGABRT: ::c_int = 6; 1441 pub const SIGEMT: ::c_int = 7; 1442 pub const SIGFPE: ::c_int = 8; 1443 pub const SIGKILL: ::c_int = 9; 1444 pub const SIGSEGV: ::c_int = 11; 1445 pub const SIGPIPE: ::c_int = 13; 1446 pub const SIGALRM: ::c_int = 14; 1447 pub const SIGTERM: ::c_int = 15; 1448 1449 pub const PROT_NONE: ::c_int = 0; 1450 pub const PROT_READ: ::c_int = 1; 1451 pub const PROT_WRITE: ::c_int = 2; 1452 pub const PROT_EXEC: ::c_int = 4; 1453 1454 pub const PT_TRACE_ME: ::c_int = 0; 1455 pub const PT_READ_I: ::c_int = 1; 1456 pub const PT_READ_D: ::c_int = 2; 1457 pub const PT_READ_U: ::c_int = 3; 1458 pub const PT_WRITE_I: ::c_int = 4; 1459 pub const PT_WRITE_D: ::c_int = 5; 1460 pub const PT_WRITE_U: ::c_int = 6; 1461 pub const PT_CONTINUE: ::c_int = 7; 1462 pub const PT_KILL: ::c_int = 8; 1463 pub const PT_STEP: ::c_int = 9; 1464 pub const PT_ATTACH: ::c_int = 10; 1465 pub const PT_DETACH: ::c_int = 11; 1466 pub const PT_SIGEXC: ::c_int = 12; 1467 pub const PT_THUPDATE: ::c_int = 13; 1468 pub const PT_ATTACHEXC: ::c_int = 14; 1469 1470 pub const PT_FORCEQUOTA: ::c_int = 30; 1471 pub const PT_DENY_ATTACH: ::c_int = 31; 1472 pub const PT_FIRSTMACH: ::c_int = 32; 1473 1474 pub const MAP_FILE: ::c_int = 0x0000; 1475 pub const MAP_SHARED: ::c_int = 0x0001; 1476 pub const MAP_PRIVATE: ::c_int = 0x0002; 1477 pub const MAP_FIXED: ::c_int = 0x0010; 1478 pub const MAP_ANON: ::c_int = 0x1000; 1479 pub const MAP_ANONYMOUS: ::c_int = MAP_ANON; 1480 1481 deprecated_mach! { 1482 pub const VM_FLAGS_FIXED: ::c_int = 0x0000; 1483 pub const VM_FLAGS_ANYWHERE: ::c_int = 0x0001; 1484 pub const VM_FLAGS_PURGABLE: ::c_int = 0x0002; 1485 pub const VM_FLAGS_RANDOM_ADDR: ::c_int = 0x0008; 1486 pub const VM_FLAGS_NO_CACHE: ::c_int = 0x0010; 1487 pub const VM_FLAGS_RESILIENT_CODESIGN: ::c_int = 0x0020; 1488 pub const VM_FLAGS_RESILIENT_MEDIA: ::c_int = 0x0040; 1489 pub const VM_FLAGS_OVERWRITE: ::c_int = 0x4000; 1490 pub const VM_FLAGS_SUPERPAGE_MASK: ::c_int = 0x70000; 1491 pub const VM_FLAGS_RETURN_DATA_ADDR: ::c_int = 0x100000; 1492 pub const VM_FLAGS_RETURN_4K_DATA_ADDR: ::c_int = 0x800000; 1493 pub const VM_FLAGS_ALIAS_MASK: ::c_int = 0xFF000000; 1494 pub const VM_FLAGS_USER_ALLOCATE: ::c_int = 0xff07401f; 1495 pub const VM_FLAGS_USER_MAP: ::c_int = 0xff97401f; 1496 pub const VM_FLAGS_USER_REMAP: ::c_int = VM_FLAGS_FIXED | 1497 VM_FLAGS_ANYWHERE | 1498 VM_FLAGS_RANDOM_ADDR | 1499 VM_FLAGS_OVERWRITE | 1500 VM_FLAGS_RETURN_DATA_ADDR | 1501 VM_FLAGS_RESILIENT_CODESIGN; 1502 1503 pub const VM_FLAGS_SUPERPAGE_SHIFT: ::c_int = 16; 1504 pub const SUPERPAGE_NONE: ::c_int = 0; 1505 pub const SUPERPAGE_SIZE_ANY: ::c_int = 1; 1506 pub const VM_FLAGS_SUPERPAGE_NONE: ::c_int = SUPERPAGE_NONE << 1507 VM_FLAGS_SUPERPAGE_SHIFT; 1508 pub const VM_FLAGS_SUPERPAGE_SIZE_ANY: ::c_int = SUPERPAGE_SIZE_ANY << 1509 VM_FLAGS_SUPERPAGE_SHIFT; 1510 pub const SUPERPAGE_SIZE_2MB: ::c_int = 2; 1511 pub const VM_FLAGS_SUPERPAGE_SIZE_2MB: ::c_int = SUPERPAGE_SIZE_2MB << 1512 VM_FLAGS_SUPERPAGE_SHIFT; 1513 1514 pub const VM_MEMORY_MALLOC: ::c_int = 1; 1515 pub const VM_MEMORY_MALLOC_SMALL: ::c_int = 2; 1516 pub const VM_MEMORY_MALLOC_LARGE: ::c_int = 3; 1517 pub const VM_MEMORY_MALLOC_HUGE: ::c_int = 4; 1518 pub const VM_MEMORY_SBRK: ::c_int = 5; 1519 pub const VM_MEMORY_REALLOC: ::c_int = 6; 1520 pub const VM_MEMORY_MALLOC_TINY: ::c_int = 7; 1521 pub const VM_MEMORY_MALLOC_LARGE_REUSABLE: ::c_int = 8; 1522 pub const VM_MEMORY_MALLOC_LARGE_REUSED: ::c_int = 9; 1523 pub const VM_MEMORY_ANALYSIS_TOOL: ::c_int = 10; 1524 pub const VM_MEMORY_MALLOC_NANO: ::c_int = 11; 1525 pub const VM_MEMORY_MACH_MSG: ::c_int = 20; 1526 pub const VM_MEMORY_IOKIT: ::c_int = 21; 1527 pub const VM_MEMORY_STACK: ::c_int = 30; 1528 pub const VM_MEMORY_GUARD: ::c_int = 31; 1529 pub const VM_MEMORY_SHARED_PMAP: ::c_int = 32; 1530 pub const VM_MEMORY_DYLIB: ::c_int = 33; 1531 pub const VM_MEMORY_OBJC_DISPATCHERS: ::c_int = 34; 1532 pub const VM_MEMORY_UNSHARED_PMAP: ::c_int = 35; 1533 pub const VM_MEMORY_APPKIT: ::c_int = 40; 1534 pub const VM_MEMORY_FOUNDATION: ::c_int = 41; 1535 pub const VM_MEMORY_COREGRAPHICS: ::c_int = 42; 1536 pub const VM_MEMORY_CORESERVICES: ::c_int = 43; 1537 pub const VM_MEMORY_CARBON: ::c_int = VM_MEMORY_CORESERVICES; 1538 pub const VM_MEMORY_JAVA: ::c_int = 44; 1539 pub const VM_MEMORY_COREDATA: ::c_int = 45; 1540 pub const VM_MEMORY_COREDATA_OBJECTIDS: ::c_int = 46; 1541 pub const VM_MEMORY_ATS: ::c_int = 50; 1542 pub const VM_MEMORY_LAYERKIT: ::c_int = 51; 1543 pub const VM_MEMORY_CGIMAGE: ::c_int = 52; 1544 pub const VM_MEMORY_TCMALLOC: ::c_int = 53; 1545 pub const VM_MEMORY_COREGRAPHICS_DATA: ::c_int = 54; 1546 pub const VM_MEMORY_COREGRAPHICS_SHARED: ::c_int = 55; 1547 pub const VM_MEMORY_COREGRAPHICS_FRAMEBUFFERS: ::c_int = 56; 1548 pub const VM_MEMORY_COREGRAPHICS_BACKINGSTORES: ::c_int = 57; 1549 pub const VM_MEMORY_COREGRAPHICS_XALLOC: ::c_int = 58; 1550 pub const VM_MEMORY_COREGRAPHICS_MISC: ::c_int = VM_MEMORY_COREGRAPHICS; 1551 pub const VM_MEMORY_DYLD: ::c_int = 60; 1552 pub const VM_MEMORY_DYLD_MALLOC: ::c_int = 61; 1553 pub const VM_MEMORY_SQLITE: ::c_int = 62; 1554 pub const VM_MEMORY_JAVASCRIPT_CORE: ::c_int = 63; 1555 pub const VM_MEMORY_JAVASCRIPT_JIT_EXECUTABLE_ALLOCATOR: ::c_int = 64; 1556 pub const VM_MEMORY_JAVASCRIPT_JIT_REGISTER_FILE: ::c_int = 65; 1557 pub const VM_MEMORY_GLSL: ::c_int = 66; 1558 pub const VM_MEMORY_OPENCL: ::c_int = 67; 1559 pub const VM_MEMORY_COREIMAGE: ::c_int = 68; 1560 pub const VM_MEMORY_WEBCORE_PURGEABLE_BUFFERS: ::c_int = 69; 1561 pub const VM_MEMORY_IMAGEIO: ::c_int = 70; 1562 pub const VM_MEMORY_COREPROFILE: ::c_int = 71; 1563 pub const VM_MEMORY_ASSETSD: ::c_int = 72; 1564 pub const VM_MEMORY_OS_ALLOC_ONCE: ::c_int = 73; 1565 pub const VM_MEMORY_LIBDISPATCH: ::c_int = 74; 1566 pub const VM_MEMORY_ACCELERATE: ::c_int = 75; 1567 pub const VM_MEMORY_COREUI: ::c_int = 76; 1568 pub const VM_MEMORY_COREUIFILE: ::c_int = 77; 1569 pub const VM_MEMORY_GENEALOGY: ::c_int = 78; 1570 pub const VM_MEMORY_RAWCAMERA: ::c_int = 79; 1571 pub const VM_MEMORY_CORPSEINFO: ::c_int = 80; 1572 pub const VM_MEMORY_ASL: ::c_int = 81; 1573 pub const VM_MEMORY_SWIFT_RUNTIME: ::c_int = 82; 1574 pub const VM_MEMORY_SWIFT_METADATA: ::c_int = 83; 1575 pub const VM_MEMORY_DHMM: ::c_int = 84; 1576 pub const VM_MEMORY_SCENEKIT: ::c_int = 86; 1577 pub const VM_MEMORY_SKYWALK: ::c_int = 87; 1578 pub const VM_MEMORY_APPLICATION_SPECIFIC_1: ::c_int = 240; 1579 pub const VM_MEMORY_APPLICATION_SPECIFIC_16: ::c_int = 255; 1580 } 1581 1582 pub const MAP_FAILED: *mut ::c_void = !0 as *mut ::c_void; 1583 1584 pub const MCL_CURRENT: ::c_int = 0x0001; 1585 pub const MCL_FUTURE: ::c_int = 0x0002; 1586 1587 pub const MS_ASYNC: ::c_int = 0x0001; 1588 pub const MS_INVALIDATE: ::c_int = 0x0002; 1589 pub const MS_SYNC: ::c_int = 0x0010; 1590 1591 pub const MS_KILLPAGES: ::c_int = 0x0004; 1592 pub const MS_DEACTIVATE: ::c_int = 0x0008; 1593 1594 pub const EPERM: ::c_int = 1; 1595 pub const ENOENT: ::c_int = 2; 1596 pub const ESRCH: ::c_int = 3; 1597 pub const EINTR: ::c_int = 4; 1598 pub const EIO: ::c_int = 5; 1599 pub const ENXIO: ::c_int = 6; 1600 pub const E2BIG: ::c_int = 7; 1601 pub const ENOEXEC: ::c_int = 8; 1602 pub const EBADF: ::c_int = 9; 1603 pub const ECHILD: ::c_int = 10; 1604 pub const EDEADLK: ::c_int = 11; 1605 pub const ENOMEM: ::c_int = 12; 1606 pub const EACCES: ::c_int = 13; 1607 pub const EFAULT: ::c_int = 14; 1608 pub const ENOTBLK: ::c_int = 15; 1609 pub const EBUSY: ::c_int = 16; 1610 pub const EEXIST: ::c_int = 17; 1611 pub const EXDEV: ::c_int = 18; 1612 pub const ENODEV: ::c_int = 19; 1613 pub const ENOTDIR: ::c_int = 20; 1614 pub const EISDIR: ::c_int = 21; 1615 pub const EINVAL: ::c_int = 22; 1616 pub const ENFILE: ::c_int = 23; 1617 pub const EMFILE: ::c_int = 24; 1618 pub const ENOTTY: ::c_int = 25; 1619 pub const ETXTBSY: ::c_int = 26; 1620 pub const EFBIG: ::c_int = 27; 1621 pub const ENOSPC: ::c_int = 28; 1622 pub const ESPIPE: ::c_int = 29; 1623 pub const EROFS: ::c_int = 30; 1624 pub const EMLINK: ::c_int = 31; 1625 pub const EPIPE: ::c_int = 32; 1626 pub const EDOM: ::c_int = 33; 1627 pub const ERANGE: ::c_int = 34; 1628 pub const EAGAIN: ::c_int = 35; 1629 pub const EWOULDBLOCK: ::c_int = EAGAIN; 1630 pub const EINPROGRESS: ::c_int = 36; 1631 pub const EALREADY: ::c_int = 37; 1632 pub const ENOTSOCK: ::c_int = 38; 1633 pub const EDESTADDRREQ: ::c_int = 39; 1634 pub const EMSGSIZE: ::c_int = 40; 1635 pub const EPROTOTYPE: ::c_int = 41; 1636 pub const ENOPROTOOPT: ::c_int = 42; 1637 pub const EPROTONOSUPPORT: ::c_int = 43; 1638 pub const ESOCKTNOSUPPORT: ::c_int = 44; 1639 pub const ENOTSUP: ::c_int = 45; 1640 pub const EPFNOSUPPORT: ::c_int = 46; 1641 pub const EAFNOSUPPORT: ::c_int = 47; 1642 pub const EADDRINUSE: ::c_int = 48; 1643 pub const EADDRNOTAVAIL: ::c_int = 49; 1644 pub const ENETDOWN: ::c_int = 50; 1645 pub const ENETUNREACH: ::c_int = 51; 1646 pub const ENETRESET: ::c_int = 52; 1647 pub const ECONNABORTED: ::c_int = 53; 1648 pub const ECONNRESET: ::c_int = 54; 1649 pub const ENOBUFS: ::c_int = 55; 1650 pub const EISCONN: ::c_int = 56; 1651 pub const ENOTCONN: ::c_int = 57; 1652 pub const ESHUTDOWN: ::c_int = 58; 1653 pub const ETOOMANYREFS: ::c_int = 59; 1654 pub const ETIMEDOUT: ::c_int = 60; 1655 pub const ECONNREFUSED: ::c_int = 61; 1656 pub const ELOOP: ::c_int = 62; 1657 pub const ENAMETOOLONG: ::c_int = 63; 1658 pub const EHOSTDOWN: ::c_int = 64; 1659 pub const EHOSTUNREACH: ::c_int = 65; 1660 pub const ENOTEMPTY: ::c_int = 66; 1661 pub const EPROCLIM: ::c_int = 67; 1662 pub const EUSERS: ::c_int = 68; 1663 pub const EDQUOT: ::c_int = 69; 1664 pub const ESTALE: ::c_int = 70; 1665 pub const EREMOTE: ::c_int = 71; 1666 pub const EBADRPC: ::c_int = 72; 1667 pub const ERPCMISMATCH: ::c_int = 73; 1668 pub const EPROGUNAVAIL: ::c_int = 74; 1669 pub const EPROGMISMATCH: ::c_int = 75; 1670 pub const EPROCUNAVAIL: ::c_int = 76; 1671 pub const ENOLCK: ::c_int = 77; 1672 pub const ENOSYS: ::c_int = 78; 1673 pub const EFTYPE: ::c_int = 79; 1674 pub const EAUTH: ::c_int = 80; 1675 pub const ENEEDAUTH: ::c_int = 81; 1676 pub const EPWROFF: ::c_int = 82; 1677 pub const EDEVERR: ::c_int = 83; 1678 pub const EOVERFLOW: ::c_int = 84; 1679 pub const EBADEXEC: ::c_int = 85; 1680 pub const EBADARCH: ::c_int = 86; 1681 pub const ESHLIBVERS: ::c_int = 87; 1682 pub const EBADMACHO: ::c_int = 88; 1683 pub const ECANCELED: ::c_int = 89; 1684 pub const EIDRM: ::c_int = 90; 1685 pub const ENOMSG: ::c_int = 91; 1686 pub const EILSEQ: ::c_int = 92; 1687 pub const ENOATTR: ::c_int = 93; 1688 pub const EBADMSG: ::c_int = 94; 1689 pub const EMULTIHOP: ::c_int = 95; 1690 pub const ENODATA: ::c_int = 96; 1691 pub const ENOLINK: ::c_int = 97; 1692 pub const ENOSR: ::c_int = 98; 1693 pub const ENOSTR: ::c_int = 99; 1694 pub const EPROTO: ::c_int = 100; 1695 pub const ETIME: ::c_int = 101; 1696 pub const EOPNOTSUPP: ::c_int = 102; 1697 pub const ENOPOLICY: ::c_int = 103; 1698 pub const ENOTRECOVERABLE: ::c_int = 104; 1699 pub const EOWNERDEAD: ::c_int = 105; 1700 pub const EQFULL: ::c_int = 106; 1701 pub const ELAST: ::c_int = 106; 1702 1703 pub const EAI_AGAIN: ::c_int = 2; 1704 pub const EAI_BADFLAGS: ::c_int = 3; 1705 pub const EAI_FAIL: ::c_int = 4; 1706 pub const EAI_FAMILY: ::c_int = 5; 1707 pub const EAI_MEMORY: ::c_int = 6; 1708 pub const EAI_NODATA: ::c_int = 7; 1709 pub const EAI_NONAME: ::c_int = 8; 1710 pub const EAI_SERVICE: ::c_int = 9; 1711 pub const EAI_SOCKTYPE: ::c_int = 10; 1712 pub const EAI_SYSTEM: ::c_int = 11; 1713 pub const EAI_OVERFLOW: ::c_int = 14; 1714 1715 pub const F_DUPFD: ::c_int = 0; 1716 pub const F_DUPFD_CLOEXEC: ::c_int = 67; 1717 pub const F_GETFD: ::c_int = 1; 1718 pub const F_SETFD: ::c_int = 2; 1719 pub const F_GETFL: ::c_int = 3; 1720 pub const F_SETFL: ::c_int = 4; 1721 pub const F_PREALLOCATE: ::c_int = 42; 1722 pub const F_RDADVISE: ::c_int = 44; 1723 pub const F_RDAHEAD: ::c_int = 45; 1724 pub const F_NOCACHE: ::c_int = 48; 1725 pub const F_GETPATH: ::c_int = 50; 1726 pub const F_FULLFSYNC: ::c_int = 51; 1727 pub const F_FREEZE_FS: ::c_int = 53; 1728 pub const F_THAW_FS: ::c_int = 54; 1729 pub const F_GLOBAL_NOCACHE: ::c_int = 55; 1730 pub const F_NODIRECT: ::c_int = 62; 1731 1732 pub const F_ALLOCATECONTIG: ::c_uint = 0x02; 1733 pub const F_ALLOCATEALL: ::c_uint = 0x04; 1734 1735 pub const F_PEOFPOSMODE: ::c_int = 3; 1736 pub const F_VOLPOSMODE: ::c_int = 4; 1737 1738 pub const AT_FDCWD: ::c_int = -2; 1739 pub const AT_EACCESS: ::c_int = 0x0010; 1740 pub const AT_SYMLINK_NOFOLLOW: ::c_int = 0x0020; 1741 pub const AT_SYMLINK_FOLLOW: ::c_int = 0x0040; 1742 pub const AT_REMOVEDIR: ::c_int = 0x0080; 1743 1744 pub const TIOCMODG: ::c_ulong = 0x40047403; 1745 pub const TIOCMODS: ::c_ulong = 0x80047404; 1746 pub const TIOCM_LE: ::c_int = 0x1; 1747 pub const TIOCM_DTR: ::c_int = 0x2; 1748 pub const TIOCM_RTS: ::c_int = 0x4; 1749 pub const TIOCM_ST: ::c_int = 0x8; 1750 pub const TIOCM_SR: ::c_int = 0x10; 1751 pub const TIOCM_CTS: ::c_int = 0x20; 1752 pub const TIOCM_CAR: ::c_int = 0x40; 1753 pub const TIOCM_CD: ::c_int = 0x40; 1754 pub const TIOCM_RNG: ::c_int = 0x80; 1755 pub const TIOCM_RI: ::c_int = 0x80; 1756 pub const TIOCM_DSR: ::c_int = 0x100; 1757 pub const TIOCEXCL: ::c_int = 0x2000740d; 1758 pub const TIOCNXCL: ::c_int = 0x2000740e; 1759 pub const TIOCFLUSH: ::c_ulong = 0x80047410; 1760 pub const TIOCGETD: ::c_ulong = 0x4004741a; 1761 pub const TIOCSETD: ::c_ulong = 0x8004741b; 1762 pub const TIOCIXON: ::c_uint = 0x20007481; 1763 pub const TIOCIXOFF: ::c_uint = 0x20007480; 1764 pub const TIOCSDTR: ::c_uint = 0x20007479; 1765 pub const TIOCCDTR: ::c_uint = 0x20007478; 1766 pub const TIOCGPGRP: ::c_ulong = 0x40047477; 1767 pub const TIOCSPGRP: ::c_ulong = 0x80047476; 1768 pub const TIOCOUTQ: ::c_ulong = 0x40047473; 1769 pub const TIOCSTI: ::c_ulong = 0x80017472; 1770 pub const TIOCNOTTY: ::c_uint = 0x20007471; 1771 pub const TIOCPKT: ::c_ulong = 0x80047470; 1772 pub const TIOCPKT_DATA: ::c_int = 0x0; 1773 pub const TIOCPKT_FLUSHREAD: ::c_int = 0x1; 1774 pub const TIOCPKT_FLUSHWRITE: ::c_int = 0x2; 1775 pub const TIOCPKT_STOP: ::c_int = 0x4; 1776 pub const TIOCPKT_START: ::c_int = 0x8; 1777 pub const TIOCPKT_NOSTOP: ::c_int = 0x10; 1778 pub const TIOCPKT_DOSTOP: ::c_int = 0x20; 1779 pub const TIOCPKT_IOCTL: ::c_int = 0x40; 1780 pub const TIOCSTOP: ::c_uint = 0x2000746f; 1781 pub const TIOCSTART: ::c_uint = 0x2000746e; 1782 pub const TIOCMSET: ::c_ulong = 0x8004746d; 1783 pub const TIOCMBIS: ::c_ulong = 0x8004746c; 1784 pub const TIOCMBIC: ::c_ulong = 0x8004746b; 1785 pub const TIOCMGET: ::c_ulong = 0x4004746a; 1786 pub const TIOCREMOTE: ::c_ulong = 0x80047469; 1787 pub const TIOCGWINSZ: ::c_ulong = 0x40087468; 1788 pub const TIOCSWINSZ: ::c_ulong = 0x80087467; 1789 pub const TIOCUCNTL: ::c_ulong = 0x80047466; 1790 pub const TIOCSTAT: ::c_uint = 0x20007465; 1791 pub const TIOCSCONS: ::c_uint = 0x20007463; 1792 pub const TIOCCONS: ::c_ulong = 0x80047462; 1793 pub const TIOCSCTTY: ::c_uint = 0x20007461; 1794 pub const TIOCEXT: ::c_ulong = 0x80047460; 1795 pub const TIOCSIG: ::c_uint = 0x2000745f; 1796 pub const TIOCDRAIN: ::c_uint = 0x2000745e; 1797 pub const TIOCMSDTRWAIT: ::c_ulong = 0x8004745b; 1798 pub const TIOCMGDTRWAIT: ::c_ulong = 0x4004745a; 1799 pub const TIOCSDRAINWAIT: ::c_ulong = 0x80047457; 1800 pub const TIOCGDRAINWAIT: ::c_ulong = 0x40047456; 1801 pub const TIOCDSIMICROCODE: ::c_uint = 0x20007455; 1802 pub const TIOCPTYGRANT: ::c_uint = 0x20007454; 1803 pub const TIOCPTYGNAME: ::c_uint = 0x40807453; 1804 pub const TIOCPTYUNLK: ::c_uint = 0x20007452; 1805 1806 pub const BIOCGRSIG: ::c_ulong = 0x40044272; 1807 pub const BIOCSRSIG: ::c_ulong = 0x80044273; 1808 pub const BIOCSDLT: ::c_ulong = 0x80044278; 1809 pub const BIOCGSEESENT: ::c_ulong = 0x40044276; 1810 pub const BIOCSSEESENT: ::c_ulong = 0x80044277; 1811 pub const BIOCGDLTLIST: ::c_ulong = 0xc00c4279; 1812 1813 pub const FIODTYPE: ::c_ulong = 0x4004667a; 1814 1815 pub const B0: speed_t = 0; 1816 pub const B50: speed_t = 50; 1817 pub const B75: speed_t = 75; 1818 pub const B110: speed_t = 110; 1819 pub const B134: speed_t = 134; 1820 pub const B150: speed_t = 150; 1821 pub const B200: speed_t = 200; 1822 pub const B300: speed_t = 300; 1823 pub const B600: speed_t = 600; 1824 pub const B1200: speed_t = 1200; 1825 pub const B1800: speed_t = 1800; 1826 pub const B2400: speed_t = 2400; 1827 pub const B4800: speed_t = 4800; 1828 pub const B9600: speed_t = 9600; 1829 pub const B19200: speed_t = 19200; 1830 pub const B38400: speed_t = 38400; 1831 pub const B7200: speed_t = 7200; 1832 pub const B14400: speed_t = 14400; 1833 pub const B28800: speed_t = 28800; 1834 pub const B57600: speed_t = 57600; 1835 pub const B76800: speed_t = 76800; 1836 pub const B115200: speed_t = 115200; 1837 pub const B230400: speed_t = 230400; 1838 pub const EXTA: speed_t = 19200; 1839 pub const EXTB: speed_t = 38400; 1840 1841 pub const SIGTRAP: ::c_int = 5; 1842 1843 pub const GLOB_APPEND: ::c_int = 0x0001; 1844 pub const GLOB_DOOFFS: ::c_int = 0x0002; 1845 pub const GLOB_ERR: ::c_int = 0x0004; 1846 pub const GLOB_MARK: ::c_int = 0x0008; 1847 pub const GLOB_NOCHECK: ::c_int = 0x0010; 1848 pub const GLOB_NOSORT: ::c_int = 0x0020; 1849 pub const GLOB_NOESCAPE: ::c_int = 0x2000; 1850 1851 pub const GLOB_NOSPACE: ::c_int = -1; 1852 pub const GLOB_ABORTED: ::c_int = -2; 1853 pub const GLOB_NOMATCH: ::c_int = -3; 1854 1855 pub const POSIX_MADV_NORMAL: ::c_int = 0; 1856 pub const POSIX_MADV_RANDOM: ::c_int = 1; 1857 pub const POSIX_MADV_SEQUENTIAL: ::c_int = 2; 1858 pub const POSIX_MADV_WILLNEED: ::c_int = 3; 1859 pub const POSIX_MADV_DONTNEED: ::c_int = 4; 1860 1861 pub const _SC_IOV_MAX: ::c_int = 56; 1862 pub const _SC_GETGR_R_SIZE_MAX: ::c_int = 70; 1863 pub const _SC_GETPW_R_SIZE_MAX: ::c_int = 71; 1864 pub const _SC_LOGIN_NAME_MAX: ::c_int = 73; 1865 pub const _SC_MQ_PRIO_MAX: ::c_int = 75; 1866 pub const _SC_THREAD_ATTR_STACKADDR: ::c_int = 82; 1867 pub const _SC_THREAD_ATTR_STACKSIZE: ::c_int = 83; 1868 pub const _SC_THREAD_DESTRUCTOR_ITERATIONS: ::c_int = 85; 1869 pub const _SC_THREAD_KEYS_MAX: ::c_int = 86; 1870 pub const _SC_THREAD_PRIO_INHERIT: ::c_int = 87; 1871 pub const _SC_THREAD_PRIO_PROTECT: ::c_int = 88; 1872 pub const _SC_THREAD_PRIORITY_SCHEDULING: ::c_int = 89; 1873 pub const _SC_THREAD_PROCESS_SHARED: ::c_int = 90; 1874 pub const _SC_THREAD_SAFE_FUNCTIONS: ::c_int = 91; 1875 pub const _SC_THREAD_STACK_MIN: ::c_int = 93; 1876 pub const _SC_THREAD_THREADS_MAX: ::c_int = 94; 1877 pub const _SC_THREADS: ::c_int = 96; 1878 pub const _SC_TTY_NAME_MAX: ::c_int = 101; 1879 pub const _SC_ATEXIT_MAX: ::c_int = 107; 1880 pub const _SC_XOPEN_CRYPT: ::c_int = 108; 1881 pub const _SC_XOPEN_ENH_I18N: ::c_int = 109; 1882 pub const _SC_XOPEN_LEGACY: ::c_int = 110; 1883 pub const _SC_XOPEN_REALTIME: ::c_int = 111; 1884 pub const _SC_XOPEN_REALTIME_THREADS: ::c_int = 112; 1885 pub const _SC_XOPEN_SHM: ::c_int = 113; 1886 pub const _SC_XOPEN_UNIX: ::c_int = 115; 1887 pub const _SC_XOPEN_VERSION: ::c_int = 116; 1888 pub const _SC_XOPEN_XCU_VERSION: ::c_int = 121; 1889 pub const _SC_PHYS_PAGES: ::c_int = 200; 1890 1891 pub const PTHREAD_PROCESS_PRIVATE: ::c_int = 2; 1892 pub const PTHREAD_PROCESS_SHARED: ::c_int = 1; 1893 pub const PTHREAD_CREATE_JOINABLE: ::c_int = 1; 1894 pub const PTHREAD_CREATE_DETACHED: ::c_int = 2; 1895 pub const PTHREAD_STACK_MIN: ::size_t = 8192; 1896 1897 pub const RLIMIT_CPU: ::c_int = 0; 1898 pub const RLIMIT_FSIZE: ::c_int = 1; 1899 pub const RLIMIT_DATA: ::c_int = 2; 1900 pub const RLIMIT_STACK: ::c_int = 3; 1901 pub const RLIMIT_CORE: ::c_int = 4; 1902 pub const RLIMIT_AS: ::c_int = 5; 1903 pub const RLIMIT_RSS: ::c_int = RLIMIT_AS; 1904 pub const RLIMIT_MEMLOCK: ::c_int = 6; 1905 pub const RLIMIT_NPROC: ::c_int = 7; 1906 pub const RLIMIT_NOFILE: ::c_int = 8; 1907 #[deprecated(since = "0.2.64", note = "Not stable across OS versions")] 1908 pub const RLIM_NLIMITS: ::c_int = 9; 1909 pub const _RLIMIT_POSIX_FLAG: ::c_int = 0x1000; 1910 1911 pub const RLIM_INFINITY: rlim_t = 0x7fff_ffff_ffff_ffff; 1912 1913 pub const RUSAGE_SELF: ::c_int = 0; 1914 pub const RUSAGE_CHILDREN: ::c_int = -1; 1915 1916 pub const MADV_NORMAL: ::c_int = 0; 1917 pub const MADV_RANDOM: ::c_int = 1; 1918 pub const MADV_SEQUENTIAL: ::c_int = 2; 1919 pub const MADV_WILLNEED: ::c_int = 3; 1920 pub const MADV_DONTNEED: ::c_int = 4; 1921 pub const MADV_FREE: ::c_int = 5; 1922 pub const MADV_ZERO_WIRED_PAGES: ::c_int = 6; 1923 pub const MADV_FREE_REUSABLE: ::c_int = 7; 1924 pub const MADV_FREE_REUSE: ::c_int = 8; 1925 pub const MADV_CAN_REUSE: ::c_int = 9; 1926 1927 pub const MINCORE_INCORE: ::c_int = 0x1; 1928 pub const MINCORE_REFERENCED: ::c_int = 0x2; 1929 pub const MINCORE_MODIFIED: ::c_int = 0x4; 1930 pub const MINCORE_REFERENCED_OTHER: ::c_int = 0x8; 1931 pub const MINCORE_MODIFIED_OTHER: ::c_int = 0x10; 1932 1933 // 1934 // sys/netinet/in.h 1935 // Protocols (RFC 1700) 1936 // NOTE: These are in addition to the constants defined in src/unix/mod.rs 1937 1938 // IPPROTO_IP defined in src/unix/mod.rs 1939 /// IP6 hop-by-hop options 1940 pub const IPPROTO_HOPOPTS: ::c_int = 0; 1941 // IPPROTO_ICMP defined in src/unix/mod.rs 1942 /// group mgmt protocol 1943 pub const IPPROTO_IGMP: ::c_int = 2; 1944 /// gateway<sup>2</sup> (deprecated) 1945 pub const IPPROTO_GGP: ::c_int = 3; 1946 /// for compatibility 1947 pub const IPPROTO_IPIP: ::c_int = 4; 1948 // IPPROTO_TCP defined in src/unix/mod.rs 1949 /// Stream protocol II. 1950 pub const IPPROTO_ST: ::c_int = 7; 1951 /// exterior gateway protocol 1952 pub const IPPROTO_EGP: ::c_int = 8; 1953 /// private interior gateway 1954 pub const IPPROTO_PIGP: ::c_int = 9; 1955 /// BBN RCC Monitoring 1956 pub const IPPROTO_RCCMON: ::c_int = 10; 1957 /// network voice protocol 1958 pub const IPPROTO_NVPII: ::c_int = 11; 1959 /// pup 1960 pub const IPPROTO_PUP: ::c_int = 12; 1961 /// Argus 1962 pub const IPPROTO_ARGUS: ::c_int = 13; 1963 /// EMCON 1964 pub const IPPROTO_EMCON: ::c_int = 14; 1965 /// Cross Net Debugger 1966 pub const IPPROTO_XNET: ::c_int = 15; 1967 /// Chaos 1968 pub const IPPROTO_CHAOS: ::c_int = 16; 1969 // IPPROTO_UDP defined in src/unix/mod.rs 1970 /// Multiplexing 1971 pub const IPPROTO_MUX: ::c_int = 18; 1972 /// DCN Measurement Subsystems 1973 pub const IPPROTO_MEAS: ::c_int = 19; 1974 /// Host Monitoring 1975 pub const IPPROTO_HMP: ::c_int = 20; 1976 /// Packet Radio Measurement 1977 pub const IPPROTO_PRM: ::c_int = 21; 1978 /// xns idp 1979 pub const IPPROTO_IDP: ::c_int = 22; 1980 /// Trunk-1 1981 pub const IPPROTO_TRUNK1: ::c_int = 23; 1982 /// Trunk-2 1983 pub const IPPROTO_TRUNK2: ::c_int = 24; 1984 /// Leaf-1 1985 pub const IPPROTO_LEAF1: ::c_int = 25; 1986 /// Leaf-2 1987 pub const IPPROTO_LEAF2: ::c_int = 26; 1988 /// Reliable Data 1989 pub const IPPROTO_RDP: ::c_int = 27; 1990 /// Reliable Transaction 1991 pub const IPPROTO_IRTP: ::c_int = 28; 1992 /// tp-4 w/ class negotiation 1993 pub const IPPROTO_TP: ::c_int = 29; 1994 /// Bulk Data Transfer 1995 pub const IPPROTO_BLT: ::c_int = 30; 1996 /// Network Services 1997 pub const IPPROTO_NSP: ::c_int = 31; 1998 /// Merit Internodal 1999 pub const IPPROTO_INP: ::c_int = 32; 2000 /// Sequential Exchange 2001 pub const IPPROTO_SEP: ::c_int = 33; 2002 /// Third Party Connect 2003 pub const IPPROTO_3PC: ::c_int = 34; 2004 /// InterDomain Policy Routing 2005 pub const IPPROTO_IDPR: ::c_int = 35; 2006 /// XTP 2007 pub const IPPROTO_XTP: ::c_int = 36; 2008 /// Datagram Delivery 2009 pub const IPPROTO_DDP: ::c_int = 37; 2010 /// Control Message Transport 2011 pub const IPPROTO_CMTP: ::c_int = 38; 2012 /// TP++ Transport 2013 pub const IPPROTO_TPXX: ::c_int = 39; 2014 /// IL transport protocol 2015 pub const IPPROTO_IL: ::c_int = 40; 2016 // IPPROTO_IPV6 defined in src/unix/mod.rs 2017 /// Source Demand Routing 2018 pub const IPPROTO_SDRP: ::c_int = 42; 2019 /// IP6 routing header 2020 pub const IPPROTO_ROUTING: ::c_int = 43; 2021 /// IP6 fragmentation header 2022 pub const IPPROTO_FRAGMENT: ::c_int = 44; 2023 /// InterDomain Routing 2024 pub const IPPROTO_IDRP: ::c_int = 45; 2025 /// resource reservation 2026 pub const IPPROTO_RSVP: ::c_int = 46; 2027 /// General Routing Encap. 2028 pub const IPPROTO_GRE: ::c_int = 47; 2029 /// Mobile Host Routing 2030 pub const IPPROTO_MHRP: ::c_int = 48; 2031 /// BHA 2032 pub const IPPROTO_BHA: ::c_int = 49; 2033 /// IP6 Encap Sec. Payload 2034 pub const IPPROTO_ESP: ::c_int = 50; 2035 /// IP6 Auth Header 2036 pub const IPPROTO_AH: ::c_int = 51; 2037 /// Integ. Net Layer Security 2038 pub const IPPROTO_INLSP: ::c_int = 52; 2039 /// IP with encryption 2040 pub const IPPROTO_SWIPE: ::c_int = 53; 2041 /// Next Hop Resolution 2042 pub const IPPROTO_NHRP: ::c_int = 54; 2043 /* 55-57: Unassigned */ 2044 // IPPROTO_ICMPV6 defined in src/unix/mod.rs 2045 /// IP6 no next header 2046 pub const IPPROTO_NONE: ::c_int = 59; 2047 /// IP6 destination option 2048 pub const IPPROTO_DSTOPTS: ::c_int = 60; 2049 /// any host internal protocol 2050 pub const IPPROTO_AHIP: ::c_int = 61; 2051 /// CFTP 2052 pub const IPPROTO_CFTP: ::c_int = 62; 2053 /// "hello" routing protocol 2054 pub const IPPROTO_HELLO: ::c_int = 63; 2055 /// SATNET/Backroom EXPAK 2056 pub const IPPROTO_SATEXPAK: ::c_int = 64; 2057 /// Kryptolan 2058 pub const IPPROTO_KRYPTOLAN: ::c_int = 65; 2059 /// Remote Virtual Disk 2060 pub const IPPROTO_RVD: ::c_int = 66; 2061 /// Pluribus Packet Core 2062 pub const IPPROTO_IPPC: ::c_int = 67; 2063 /// Any distributed FS 2064 pub const IPPROTO_ADFS: ::c_int = 68; 2065 /// Satnet Monitoring 2066 pub const IPPROTO_SATMON: ::c_int = 69; 2067 /// VISA Protocol 2068 pub const IPPROTO_VISA: ::c_int = 70; 2069 /// Packet Core Utility 2070 pub const IPPROTO_IPCV: ::c_int = 71; 2071 /// Comp. Prot. Net. Executive 2072 pub const IPPROTO_CPNX: ::c_int = 72; 2073 /// Comp. Prot. HeartBeat 2074 pub const IPPROTO_CPHB: ::c_int = 73; 2075 /// Wang Span Network 2076 pub const IPPROTO_WSN: ::c_int = 74; 2077 /// Packet Video Protocol 2078 pub const IPPROTO_PVP: ::c_int = 75; 2079 /// BackRoom SATNET Monitoring 2080 pub const IPPROTO_BRSATMON: ::c_int = 76; 2081 /// Sun net disk proto (temp.) 2082 pub const IPPROTO_ND: ::c_int = 77; 2083 /// WIDEBAND Monitoring 2084 pub const IPPROTO_WBMON: ::c_int = 78; 2085 /// WIDEBAND EXPAK 2086 pub const IPPROTO_WBEXPAK: ::c_int = 79; 2087 /// ISO cnlp 2088 pub const IPPROTO_EON: ::c_int = 80; 2089 /// VMTP 2090 pub const IPPROTO_VMTP: ::c_int = 81; 2091 /// Secure VMTP 2092 pub const IPPROTO_SVMTP: ::c_int = 82; 2093 /// Banyon VINES 2094 pub const IPPROTO_VINES: ::c_int = 83; 2095 /// TTP 2096 pub const IPPROTO_TTP: ::c_int = 84; 2097 /// NSFNET-IGP 2098 pub const IPPROTO_IGP: ::c_int = 85; 2099 /// dissimilar gateway prot. 2100 pub const IPPROTO_DGP: ::c_int = 86; 2101 /// TCF 2102 pub const IPPROTO_TCF: ::c_int = 87; 2103 /// Cisco/GXS IGRP 2104 pub const IPPROTO_IGRP: ::c_int = 88; 2105 /// OSPFIGP 2106 pub const IPPROTO_OSPFIGP: ::c_int = 89; 2107 /// Strite RPC protocol 2108 pub const IPPROTO_SRPC: ::c_int = 90; 2109 /// Locus Address Resoloution 2110 pub const IPPROTO_LARP: ::c_int = 91; 2111 /// Multicast Transport 2112 pub const IPPROTO_MTP: ::c_int = 92; 2113 /// AX.25 Frames 2114 pub const IPPROTO_AX25: ::c_int = 93; 2115 /// IP encapsulated in IP 2116 pub const IPPROTO_IPEIP: ::c_int = 94; 2117 /// Mobile Int.ing control 2118 pub const IPPROTO_MICP: ::c_int = 95; 2119 /// Semaphore Comm. security 2120 pub const IPPROTO_SCCSP: ::c_int = 96; 2121 /// Ethernet IP encapsulation 2122 pub const IPPROTO_ETHERIP: ::c_int = 97; 2123 /// encapsulation header 2124 pub const IPPROTO_ENCAP: ::c_int = 98; 2125 /// any private encr. scheme 2126 pub const IPPROTO_APES: ::c_int = 99; 2127 /// GMTP 2128 pub const IPPROTO_GMTP: ::c_int = 100; 2129 2130 /* 101-254: Partly Unassigned */ 2131 /// Protocol Independent Mcast 2132 pub const IPPROTO_PIM: ::c_int = 103; 2133 /// payload compression (IPComp) 2134 pub const IPPROTO_IPCOMP: ::c_int = 108; 2135 /// PGM 2136 pub const IPPROTO_PGM: ::c_int = 113; 2137 /// SCTP 2138 pub const IPPROTO_SCTP: ::c_int = 132; 2139 2140 /* 255: Reserved */ 2141 /* BSD Private, local use, namespace incursion */ 2142 /// divert pseudo-protocol 2143 pub const IPPROTO_DIVERT: ::c_int = 254; 2144 /// raw IP packet 2145 pub const IPPROTO_RAW: ::c_int = 255; 2146 pub const IPPROTO_MAX: ::c_int = 256; 2147 /// last return value of *_input(), meaning "all job for this pkt is done". 2148 pub const IPPROTO_DONE: ::c_int = 257; 2149 2150 pub const AF_UNSPEC: ::c_int = 0; 2151 pub const AF_LOCAL: ::c_int = 1; 2152 pub const AF_UNIX: ::c_int = AF_LOCAL; 2153 pub const AF_INET: ::c_int = 2; 2154 pub const AF_IMPLINK: ::c_int = 3; 2155 pub const AF_PUP: ::c_int = 4; 2156 pub const AF_CHAOS: ::c_int = 5; 2157 pub const AF_NS: ::c_int = 6; 2158 pub const AF_ISO: ::c_int = 7; 2159 pub const AF_OSI: ::c_int = AF_ISO; 2160 pub const AF_ECMA: ::c_int = 8; 2161 pub const AF_DATAKIT: ::c_int = 9; 2162 pub const AF_CCITT: ::c_int = 10; 2163 pub const AF_SNA: ::c_int = 11; 2164 pub const AF_DECnet: ::c_int = 12; 2165 pub const AF_DLI: ::c_int = 13; 2166 pub const AF_LAT: ::c_int = 14; 2167 pub const AF_HYLINK: ::c_int = 15; 2168 pub const AF_APPLETALK: ::c_int = 16; 2169 pub const AF_ROUTE: ::c_int = 17; 2170 pub const AF_LINK: ::c_int = 18; 2171 pub const pseudo_AF_XTP: ::c_int = 19; 2172 pub const AF_COIP: ::c_int = 20; 2173 pub const AF_CNT: ::c_int = 21; 2174 pub const pseudo_AF_RTIP: ::c_int = 22; 2175 pub const AF_IPX: ::c_int = 23; 2176 pub const AF_SIP: ::c_int = 24; 2177 pub const pseudo_AF_PIP: ::c_int = 25; 2178 pub const AF_ISDN: ::c_int = 28; 2179 pub const AF_E164: ::c_int = AF_ISDN; 2180 pub const pseudo_AF_KEY: ::c_int = 29; 2181 pub const AF_INET6: ::c_int = 30; 2182 pub const AF_NATM: ::c_int = 31; 2183 pub const AF_SYSTEM: ::c_int = 32; 2184 pub const AF_NETBIOS: ::c_int = 33; 2185 pub const AF_PPP: ::c_int = 34; 2186 pub const pseudo_AF_HDRCMPLT: ::c_int = 35; 2187 pub const AF_SYS_CONTROL: ::c_int = 2; 2188 2189 pub const SYSPROTO_EVENT: ::c_int = 1; 2190 pub const SYSPROTO_CONTROL: ::c_int = 2; 2191 2192 pub const PF_UNSPEC: ::c_int = AF_UNSPEC; 2193 pub const PF_LOCAL: ::c_int = AF_LOCAL; 2194 pub const PF_UNIX: ::c_int = PF_LOCAL; 2195 pub const PF_INET: ::c_int = AF_INET; 2196 pub const PF_IMPLINK: ::c_int = AF_IMPLINK; 2197 pub const PF_PUP: ::c_int = AF_PUP; 2198 pub const PF_CHAOS: ::c_int = AF_CHAOS; 2199 pub const PF_NS: ::c_int = AF_NS; 2200 pub const PF_ISO: ::c_int = AF_ISO; 2201 pub const PF_OSI: ::c_int = AF_ISO; 2202 pub const PF_ECMA: ::c_int = AF_ECMA; 2203 pub const PF_DATAKIT: ::c_int = AF_DATAKIT; 2204 pub const PF_CCITT: ::c_int = AF_CCITT; 2205 pub const PF_SNA: ::c_int = AF_SNA; 2206 pub const PF_DECnet: ::c_int = AF_DECnet; 2207 pub const PF_DLI: ::c_int = AF_DLI; 2208 pub const PF_LAT: ::c_int = AF_LAT; 2209 pub const PF_HYLINK: ::c_int = AF_HYLINK; 2210 pub const PF_APPLETALK: ::c_int = AF_APPLETALK; 2211 pub const PF_ROUTE: ::c_int = AF_ROUTE; 2212 pub const PF_LINK: ::c_int = AF_LINK; 2213 pub const PF_XTP: ::c_int = pseudo_AF_XTP; 2214 pub const PF_COIP: ::c_int = AF_COIP; 2215 pub const PF_CNT: ::c_int = AF_CNT; 2216 pub const PF_SIP: ::c_int = AF_SIP; 2217 pub const PF_IPX: ::c_int = AF_IPX; 2218 pub const PF_RTIP: ::c_int = pseudo_AF_RTIP; 2219 pub const PF_PIP: ::c_int = pseudo_AF_PIP; 2220 pub const PF_ISDN: ::c_int = AF_ISDN; 2221 pub const PF_KEY: ::c_int = pseudo_AF_KEY; 2222 pub const PF_INET6: ::c_int = AF_INET6; 2223 pub const PF_NATM: ::c_int = AF_NATM; 2224 pub const PF_SYSTEM: ::c_int = AF_SYSTEM; 2225 pub const PF_NETBIOS: ::c_int = AF_NETBIOS; 2226 pub const PF_PPP: ::c_int = AF_PPP; 2227 2228 pub const NET_RT_DUMP: ::c_int = 1; 2229 pub const NET_RT_FLAGS: ::c_int = 2; 2230 pub const NET_RT_IFLIST: ::c_int = 3; 2231 2232 pub const SOMAXCONN: ::c_int = 128; 2233 2234 pub const SOCK_MAXADDRLEN: ::c_int = 255; 2235 2236 pub const SOCK_STREAM: ::c_int = 1; 2237 pub const SOCK_DGRAM: ::c_int = 2; 2238 pub const SOCK_RAW: ::c_int = 3; 2239 pub const SOCK_RDM: ::c_int = 4; 2240 pub const SOCK_SEQPACKET: ::c_int = 5; 2241 pub const IP_TTL: ::c_int = 4; 2242 pub const IP_HDRINCL: ::c_int = 2; 2243 pub const IP_RECVDSTADDR: ::c_int = 7; 2244 pub const IP_ADD_MEMBERSHIP: ::c_int = 12; 2245 pub const IP_DROP_MEMBERSHIP: ::c_int = 13; 2246 pub const IP_RECVIF: ::c_int = 20; 2247 pub const IP_PKTINFO: ::c_int = 26; 2248 pub const IP_RECVTOS: ::c_int = 27; 2249 pub const IPV6_JOIN_GROUP: ::c_int = 12; 2250 pub const IPV6_LEAVE_GROUP: ::c_int = 13; 2251 pub const IPV6_CHECKSUM: ::c_int = 26; 2252 pub const IPV6_RECVTCLASS: ::c_int = 35; 2253 pub const IPV6_TCLASS: ::c_int = 36; 2254 pub const IPV6_PKTINFO: ::c_int = 46; 2255 pub const IPV6_HOPLIMIT: ::c_int = 47; 2256 pub const IPV6_RECVPKTINFO: ::c_int = 61; 2257 2258 pub const TCP_NOPUSH: ::c_int = 4; 2259 pub const TCP_NOOPT: ::c_int = 8; 2260 pub const TCP_KEEPALIVE: ::c_int = 0x10; 2261 pub const TCP_KEEPINTVL: ::c_int = 0x101; 2262 pub const TCP_KEEPCNT: ::c_int = 0x102; 2263 /// Enable/Disable TCP Fastopen on this socket 2264 pub const TCP_FASTOPEN: ::c_int = 0x105; 2265 2266 pub const SOL_LOCAL: ::c_int = 0; 2267 2268 pub const LOCAL_PEERCRED: ::c_int = 0x001; 2269 pub const LOCAL_PEERPID: ::c_int = 0x002; 2270 pub const LOCAL_PEEREPID: ::c_int = 0x003; 2271 pub const LOCAL_PEERUUID: ::c_int = 0x004; 2272 pub const LOCAL_PEEREUUID: ::c_int = 0x005; 2273 2274 pub const SOL_SOCKET: ::c_int = 0xffff; 2275 2276 pub const SO_DEBUG: ::c_int = 0x01; 2277 pub const SO_ACCEPTCONN: ::c_int = 0x0002; 2278 pub const SO_REUSEADDR: ::c_int = 0x0004; 2279 pub const SO_KEEPALIVE: ::c_int = 0x0008; 2280 pub const SO_DONTROUTE: ::c_int = 0x0010; 2281 pub const SO_BROADCAST: ::c_int = 0x0020; 2282 pub const SO_USELOOPBACK: ::c_int = 0x0040; 2283 pub const SO_LINGER: ::c_int = 0x0080; 2284 pub const SO_OOBINLINE: ::c_int = 0x0100; 2285 pub const SO_REUSEPORT: ::c_int = 0x0200; 2286 pub const SO_TIMESTAMP: ::c_int = 0x0400; 2287 pub const SO_TIMESTAMP_MONOTONIC: ::c_int = 0x0800; 2288 pub const SO_DONTTRUNC: ::c_int = 0x2000; 2289 pub const SO_WANTMORE: ::c_int = 0x4000; 2290 pub const SO_WANTOOBFLAG: ::c_int = 0x8000; 2291 pub const SO_SNDBUF: ::c_int = 0x1001; 2292 pub const SO_RCVBUF: ::c_int = 0x1002; 2293 pub const SO_SNDLOWAT: ::c_int = 0x1003; 2294 pub const SO_RCVLOWAT: ::c_int = 0x1004; 2295 pub const SO_SNDTIMEO: ::c_int = 0x1005; 2296 pub const SO_RCVTIMEO: ::c_int = 0x1006; 2297 pub const SO_ERROR: ::c_int = 0x1007; 2298 pub const SO_TYPE: ::c_int = 0x1008; 2299 pub const SO_LABEL: ::c_int = 0x1010; 2300 pub const SO_PEERLABEL: ::c_int = 0x1011; 2301 pub const SO_NREAD: ::c_int = 0x1020; 2302 pub const SO_NKE: ::c_int = 0x1021; 2303 pub const SO_NOSIGPIPE: ::c_int = 0x1022; 2304 pub const SO_NOADDRERR: ::c_int = 0x1023; 2305 pub const SO_NWRITE: ::c_int = 0x1024; 2306 pub const SO_REUSESHAREUID: ::c_int = 0x1025; 2307 pub const SO_NOTIFYCONFLICT: ::c_int = 0x1026; 2308 pub const SO_RANDOMPORT: ::c_int = 0x1082; 2309 pub const SO_NP_EXTENSIONS: ::c_int = 0x1083; 2310 2311 pub const MSG_OOB: ::c_int = 0x1; 2312 pub const MSG_PEEK: ::c_int = 0x2; 2313 pub const MSG_DONTROUTE: ::c_int = 0x4; 2314 pub const MSG_EOR: ::c_int = 0x8; 2315 pub const MSG_TRUNC: ::c_int = 0x10; 2316 pub const MSG_CTRUNC: ::c_int = 0x20; 2317 pub const MSG_WAITALL: ::c_int = 0x40; 2318 pub const MSG_DONTWAIT: ::c_int = 0x80; 2319 pub const MSG_EOF: ::c_int = 0x100; 2320 pub const MSG_FLUSH: ::c_int = 0x400; 2321 pub const MSG_HOLD: ::c_int = 0x800; 2322 pub const MSG_SEND: ::c_int = 0x1000; 2323 pub const MSG_HAVEMORE: ::c_int = 0x2000; 2324 pub const MSG_RCVMORE: ::c_int = 0x4000; 2325 // pub const MSG_COMPAT: ::c_int = 0x8000; 2326 2327 pub const SCM_TIMESTAMP: ::c_int = 0x02; 2328 pub const SCM_CREDS: ::c_int = 0x03; 2329 2330 // https://github.com/aosm/xnu/blob/master/bsd/net/if.h#L140-L156 2331 pub const IFF_UP: ::c_int = 0x1; // interface is up 2332 pub const IFF_BROADCAST: ::c_int = 0x2; // broadcast address valid 2333 pub const IFF_DEBUG: ::c_int = 0x4; // turn on debugging 2334 pub const IFF_LOOPBACK: ::c_int = 0x8; // is a loopback net 2335 pub const IFF_POINTOPOINT: ::c_int = 0x10; // interface is point-to-point link 2336 pub const IFF_NOTRAILERS: ::c_int = 0x20; // obsolete: avoid use of trailers 2337 pub const IFF_RUNNING: ::c_int = 0x40; // resources allocated 2338 pub const IFF_NOARP: ::c_int = 0x80; // no address resolution protocol 2339 pub const IFF_PROMISC: ::c_int = 0x100; // receive all packets 2340 pub const IFF_ALLMULTI: ::c_int = 0x200; // receive all multicast packets 2341 pub const IFF_OACTIVE: ::c_int = 0x400; // transmission in progress 2342 pub const IFF_SIMPLEX: ::c_int = 0x800; // can't hear own transmissions 2343 pub const IFF_LINK0: ::c_int = 0x1000; // per link layer defined bit 2344 pub const IFF_LINK1: ::c_int = 0x2000; // per link layer defined bit 2345 pub const IFF_LINK2: ::c_int = 0x4000; // per link layer defined bit 2346 pub const IFF_ALTPHYS: ::c_int = IFF_LINK2; // use alternate physical connection 2347 pub const IFF_MULTICAST: ::c_int = 0x8000; // supports multicast 2348 2349 pub const SHUT_RD: ::c_int = 0; 2350 pub const SHUT_WR: ::c_int = 1; 2351 pub const SHUT_RDWR: ::c_int = 2; 2352 2353 pub const SAE_ASSOCID_ANY: ::sae_associd_t = 0; 2354 /// ((sae_associd_t)(-1ULL)) 2355 pub const SAE_ASSOCID_ALL: ::sae_associd_t = 0xffffffff; 2356 2357 pub const SAE_CONNID_ANY: ::sae_connid_t = 0; 2358 /// ((sae_connid_t)(-1ULL)) 2359 pub const SAE_CONNID_ALL: ::sae_connid_t = 0xffffffff; 2360 2361 // connectx() flag parameters 2362 2363 /// resume connect() on read/write 2364 pub const CONNECT_RESUME_ON_READ_WRITE: ::c_uint = 0x1; 2365 /// data is idempotent 2366 pub const CONNECT_DATA_IDEMPOTENT: ::c_uint = 0x2; 2367 /// data includes security that replaces the TFO-cookie 2368 pub const CONNECT_DATA_AUTHENTICATED: ::c_uint = 0x4; 2369 2370 pub const LOCK_SH: ::c_int = 1; 2371 pub const LOCK_EX: ::c_int = 2; 2372 pub const LOCK_NB: ::c_int = 4; 2373 pub const LOCK_UN: ::c_int = 8; 2374 2375 pub const MAP_COPY: ::c_int = 0x0002; 2376 pub const MAP_RENAME: ::c_int = 0x0020; 2377 pub const MAP_NORESERVE: ::c_int = 0x0040; 2378 pub const MAP_NOEXTEND: ::c_int = 0x0100; 2379 pub const MAP_HASSEMAPHORE: ::c_int = 0x0200; 2380 pub const MAP_NOCACHE: ::c_int = 0x0400; 2381 pub const MAP_JIT: ::c_int = 0x0800; 2382 2383 pub const _SC_ARG_MAX: ::c_int = 1; 2384 pub const _SC_CHILD_MAX: ::c_int = 2; 2385 pub const _SC_CLK_TCK: ::c_int = 3; 2386 pub const _SC_NGROUPS_MAX: ::c_int = 4; 2387 pub const _SC_OPEN_MAX: ::c_int = 5; 2388 pub const _SC_JOB_CONTROL: ::c_int = 6; 2389 pub const _SC_SAVED_IDS: ::c_int = 7; 2390 pub const _SC_VERSION: ::c_int = 8; 2391 pub const _SC_BC_BASE_MAX: ::c_int = 9; 2392 pub const _SC_BC_DIM_MAX: ::c_int = 10; 2393 pub const _SC_BC_SCALE_MAX: ::c_int = 11; 2394 pub const _SC_BC_STRING_MAX: ::c_int = 12; 2395 pub const _SC_COLL_WEIGHTS_MAX: ::c_int = 13; 2396 pub const _SC_EXPR_NEST_MAX: ::c_int = 14; 2397 pub const _SC_LINE_MAX: ::c_int = 15; 2398 pub const _SC_RE_DUP_MAX: ::c_int = 16; 2399 pub const _SC_2_VERSION: ::c_int = 17; 2400 pub const _SC_2_C_BIND: ::c_int = 18; 2401 pub const _SC_2_C_DEV: ::c_int = 19; 2402 pub const _SC_2_CHAR_TERM: ::c_int = 20; 2403 pub const _SC_2_FORT_DEV: ::c_int = 21; 2404 pub const _SC_2_FORT_RUN: ::c_int = 22; 2405 pub const _SC_2_LOCALEDEF: ::c_int = 23; 2406 pub const _SC_2_SW_DEV: ::c_int = 24; 2407 pub const _SC_2_UPE: ::c_int = 25; 2408 pub const _SC_STREAM_MAX: ::c_int = 26; 2409 pub const _SC_TZNAME_MAX: ::c_int = 27; 2410 pub const _SC_ASYNCHRONOUS_IO: ::c_int = 28; 2411 pub const _SC_PAGESIZE: ::c_int = 29; 2412 pub const _SC_MEMLOCK: ::c_int = 30; 2413 pub const _SC_MEMLOCK_RANGE: ::c_int = 31; 2414 pub const _SC_MEMORY_PROTECTION: ::c_int = 32; 2415 pub const _SC_MESSAGE_PASSING: ::c_int = 33; 2416 pub const _SC_PRIORITIZED_IO: ::c_int = 34; 2417 pub const _SC_PRIORITY_SCHEDULING: ::c_int = 35; 2418 pub const _SC_REALTIME_SIGNALS: ::c_int = 36; 2419 pub const _SC_SEMAPHORES: ::c_int = 37; 2420 pub const _SC_FSYNC: ::c_int = 38; 2421 pub const _SC_SHARED_MEMORY_OBJECTS: ::c_int = 39; 2422 pub const _SC_SYNCHRONIZED_IO: ::c_int = 40; 2423 pub const _SC_TIMERS: ::c_int = 41; 2424 pub const _SC_AIO_LISTIO_MAX: ::c_int = 42; 2425 pub const _SC_AIO_MAX: ::c_int = 43; 2426 pub const _SC_AIO_PRIO_DELTA_MAX: ::c_int = 44; 2427 pub const _SC_DELAYTIMER_MAX: ::c_int = 45; 2428 pub const _SC_MQ_OPEN_MAX: ::c_int = 46; 2429 pub const _SC_MAPPED_FILES: ::c_int = 47; 2430 pub const _SC_RTSIG_MAX: ::c_int = 48; 2431 pub const _SC_SEM_NSEMS_MAX: ::c_int = 49; 2432 pub const _SC_SEM_VALUE_MAX: ::c_int = 50; 2433 pub const _SC_SIGQUEUE_MAX: ::c_int = 51; 2434 pub const _SC_TIMER_MAX: ::c_int = 52; 2435 pub const _SC_NPROCESSORS_CONF: ::c_int = 57; 2436 pub const _SC_NPROCESSORS_ONLN: ::c_int = 58; 2437 pub const _SC_2_PBS: ::c_int = 59; 2438 pub const _SC_2_PBS_ACCOUNTING: ::c_int = 60; 2439 pub const _SC_2_PBS_CHECKPOINT: ::c_int = 61; 2440 pub const _SC_2_PBS_LOCATE: ::c_int = 62; 2441 pub const _SC_2_PBS_MESSAGE: ::c_int = 63; 2442 pub const _SC_2_PBS_TRACK: ::c_int = 64; 2443 pub const _SC_ADVISORY_INFO: ::c_int = 65; 2444 pub const _SC_BARRIERS: ::c_int = 66; 2445 pub const _SC_CLOCK_SELECTION: ::c_int = 67; 2446 pub const _SC_CPUTIME: ::c_int = 68; 2447 pub const _SC_FILE_LOCKING: ::c_int = 69; 2448 pub const _SC_HOST_NAME_MAX: ::c_int = 72; 2449 pub const _SC_MONOTONIC_CLOCK: ::c_int = 74; 2450 pub const _SC_READER_WRITER_LOCKS: ::c_int = 76; 2451 pub const _SC_REGEXP: ::c_int = 77; 2452 pub const _SC_SHELL: ::c_int = 78; 2453 pub const _SC_SPAWN: ::c_int = 79; 2454 pub const _SC_SPIN_LOCKS: ::c_int = 80; 2455 pub const _SC_SPORADIC_SERVER: ::c_int = 81; 2456 pub const _SC_THREAD_CPUTIME: ::c_int = 84; 2457 pub const _SC_THREAD_SPORADIC_SERVER: ::c_int = 92; 2458 pub const _SC_TIMEOUTS: ::c_int = 95; 2459 pub const _SC_TRACE: ::c_int = 97; 2460 pub const _SC_TRACE_EVENT_FILTER: ::c_int = 98; 2461 pub const _SC_TRACE_INHERIT: ::c_int = 99; 2462 pub const _SC_TRACE_LOG: ::c_int = 100; 2463 pub const _SC_TYPED_MEMORY_OBJECTS: ::c_int = 102; 2464 pub const _SC_V6_ILP32_OFF32: ::c_int = 103; 2465 pub const _SC_V6_ILP32_OFFBIG: ::c_int = 104; 2466 pub const _SC_V6_LP64_OFF64: ::c_int = 105; 2467 pub const _SC_V6_LPBIG_OFFBIG: ::c_int = 106; 2468 pub const _SC_IPV6: ::c_int = 118; 2469 pub const _SC_RAW_SOCKETS: ::c_int = 119; 2470 pub const _SC_SYMLOOP_MAX: ::c_int = 120; 2471 pub const _SC_PAGE_SIZE: ::c_int = _SC_PAGESIZE; 2472 pub const _SC_XOPEN_STREAMS: ::c_int = 114; 2473 pub const _SC_XBS5_ILP32_OFF32: ::c_int = 122; 2474 pub const _SC_XBS5_ILP32_OFFBIG: ::c_int = 123; 2475 pub const _SC_XBS5_LP64_OFF64: ::c_int = 124; 2476 pub const _SC_XBS5_LPBIG_OFFBIG: ::c_int = 125; 2477 pub const _SC_SS_REPL_MAX: ::c_int = 126; 2478 pub const _SC_TRACE_EVENT_NAME_MAX: ::c_int = 127; 2479 pub const _SC_TRACE_NAME_MAX: ::c_int = 128; 2480 pub const _SC_TRACE_SYS_MAX: ::c_int = 129; 2481 pub const _SC_TRACE_USER_EVENT_MAX: ::c_int = 130; 2482 pub const _SC_PASS_MAX: ::c_int = 131; 2483 2484 pub const PTHREAD_MUTEX_NORMAL: ::c_int = 0; 2485 pub const PTHREAD_MUTEX_ERRORCHECK: ::c_int = 1; 2486 pub const PTHREAD_MUTEX_RECURSIVE: ::c_int = 2; 2487 pub const PTHREAD_MUTEX_DEFAULT: ::c_int = PTHREAD_MUTEX_NORMAL; 2488 pub const _PTHREAD_MUTEX_SIG_init: ::c_long = 0x32AAABA7; 2489 pub const _PTHREAD_COND_SIG_init: ::c_long = 0x3CB0B1BB; 2490 pub const _PTHREAD_RWLOCK_SIG_init: ::c_long = 0x2DA8B3B4; 2491 pub const PTHREAD_MUTEX_INITIALIZER: pthread_mutex_t = pthread_mutex_t { 2492 __sig: _PTHREAD_MUTEX_SIG_init, 2493 __opaque: [0; __PTHREAD_MUTEX_SIZE__], 2494 }; 2495 pub const PTHREAD_COND_INITIALIZER: pthread_cond_t = pthread_cond_t { 2496 __sig: _PTHREAD_COND_SIG_init, 2497 __opaque: [0; __PTHREAD_COND_SIZE__], 2498 }; 2499 pub const PTHREAD_RWLOCK_INITIALIZER: pthread_rwlock_t = pthread_rwlock_t { 2500 __sig: _PTHREAD_RWLOCK_SIG_init, 2501 __opaque: [0; __PTHREAD_RWLOCK_SIZE__], 2502 }; 2503 2504 pub const MINSIGSTKSZ: ::size_t = 32768; 2505 pub const SIGSTKSZ: ::size_t = 131072; 2506 2507 pub const FD_SETSIZE: usize = 1024; 2508 2509 pub const ST_NOSUID: ::c_ulong = 2; 2510 2511 pub const EVFILT_READ: i16 = -1; 2512 pub const EVFILT_WRITE: i16 = -2; 2513 pub const EVFILT_AIO: i16 = -3; 2514 pub const EVFILT_VNODE: i16 = -4; 2515 pub const EVFILT_PROC: i16 = -5; 2516 pub const EVFILT_SIGNAL: i16 = -6; 2517 pub const EVFILT_TIMER: i16 = -7; 2518 pub const EVFILT_MACHPORT: i16 = -8; 2519 pub const EVFILT_FS: i16 = -9; 2520 pub const EVFILT_USER: i16 = -10; 2521 pub const EVFILT_VM: i16 = -12; 2522 2523 pub const EV_ADD: u16 = 0x1; 2524 pub const EV_DELETE: u16 = 0x2; 2525 pub const EV_ENABLE: u16 = 0x4; 2526 pub const EV_DISABLE: u16 = 0x8; 2527 pub const EV_ONESHOT: u16 = 0x10; 2528 pub const EV_CLEAR: u16 = 0x20; 2529 pub const EV_RECEIPT: u16 = 0x40; 2530 pub const EV_DISPATCH: u16 = 0x80; 2531 pub const EV_FLAG0: u16 = 0x1000; 2532 pub const EV_POLL: u16 = 0x1000; 2533 pub const EV_FLAG1: u16 = 0x2000; 2534 pub const EV_OOBAND: u16 = 0x2000; 2535 pub const EV_ERROR: u16 = 0x4000; 2536 pub const EV_EOF: u16 = 0x8000; 2537 pub const EV_SYSFLAGS: u16 = 0xf000; 2538 2539 pub const NOTE_TRIGGER: u32 = 0x01000000; 2540 pub const NOTE_FFNOP: u32 = 0x00000000; 2541 pub const NOTE_FFAND: u32 = 0x40000000; 2542 pub const NOTE_FFOR: u32 = 0x80000000; 2543 pub const NOTE_FFCOPY: u32 = 0xc0000000; 2544 pub const NOTE_FFCTRLMASK: u32 = 0xc0000000; 2545 pub const NOTE_FFLAGSMASK: u32 = 0x00ffffff; 2546 pub const NOTE_LOWAT: u32 = 0x00000001; 2547 pub const NOTE_DELETE: u32 = 0x00000001; 2548 pub const NOTE_WRITE: u32 = 0x00000002; 2549 pub const NOTE_EXTEND: u32 = 0x00000004; 2550 pub const NOTE_ATTRIB: u32 = 0x00000008; 2551 pub const NOTE_LINK: u32 = 0x00000010; 2552 pub const NOTE_RENAME: u32 = 0x00000020; 2553 pub const NOTE_REVOKE: u32 = 0x00000040; 2554 pub const NOTE_NONE: u32 = 0x00000080; 2555 pub const NOTE_EXIT: u32 = 0x80000000; 2556 pub const NOTE_FORK: u32 = 0x40000000; 2557 pub const NOTE_EXEC: u32 = 0x20000000; 2558 #[doc(hidden)] 2559 #[deprecated(since = "0.2.49", note = "Deprecated since MacOSX 10.9")] 2560 pub const NOTE_REAP: u32 = 0x10000000; 2561 pub const NOTE_SIGNAL: u32 = 0x08000000; 2562 pub const NOTE_EXITSTATUS: u32 = 0x04000000; 2563 pub const NOTE_EXIT_DETAIL: u32 = 0x02000000; 2564 pub const NOTE_PDATAMASK: u32 = 0x000fffff; 2565 pub const NOTE_PCTRLMASK: u32 = 0xfff00000; 2566 #[doc(hidden)] 2567 #[deprecated(since = "0.2.49", note = "Deprecated since MacOSX 10.9")] 2568 pub const NOTE_EXIT_REPARENTED: u32 = 0x00080000; 2569 pub const NOTE_EXIT_DETAIL_MASK: u32 = 0x00070000; 2570 pub const NOTE_EXIT_DECRYPTFAIL: u32 = 0x00010000; 2571 pub const NOTE_EXIT_MEMORY: u32 = 0x00020000; 2572 pub const NOTE_EXIT_CSERROR: u32 = 0x00040000; 2573 pub const NOTE_VM_PRESSURE: u32 = 0x80000000; 2574 pub const NOTE_VM_PRESSURE_TERMINATE: u32 = 0x40000000; 2575 pub const NOTE_VM_PRESSURE_SUDDEN_TERMINATE: u32 = 0x20000000; 2576 pub const NOTE_VM_ERROR: u32 = 0x10000000; 2577 pub const NOTE_SECONDS: u32 = 0x00000001; 2578 pub const NOTE_USECONDS: u32 = 0x00000002; 2579 pub const NOTE_NSECONDS: u32 = 0x00000004; 2580 pub const NOTE_ABSOLUTE: u32 = 0x00000008; 2581 pub const NOTE_LEEWAY: u32 = 0x00000010; 2582 pub const NOTE_CRITICAL: u32 = 0x00000020; 2583 pub const NOTE_BACKGROUND: u32 = 0x00000040; 2584 pub const NOTE_TRACK: u32 = 0x00000001; 2585 pub const NOTE_TRACKERR: u32 = 0x00000002; 2586 pub const NOTE_CHILD: u32 = 0x00000004; 2587 2588 pub const OCRNL: ::tcflag_t = 0x00000010; 2589 pub const ONOCR: ::tcflag_t = 0x00000020; 2590 pub const ONLRET: ::tcflag_t = 0x00000040; 2591 pub const OFILL: ::tcflag_t = 0x00000080; 2592 pub const NLDLY: ::tcflag_t = 0x00000300; 2593 pub const TABDLY: ::tcflag_t = 0x00000c04; 2594 pub const CRDLY: ::tcflag_t = 0x00003000; 2595 pub const FFDLY: ::tcflag_t = 0x00004000; 2596 pub const BSDLY: ::tcflag_t = 0x00008000; 2597 pub const VTDLY: ::tcflag_t = 0x00010000; 2598 pub const OFDEL: ::tcflag_t = 0x00020000; 2599 2600 pub const NL0: ::tcflag_t = 0x00000000; 2601 pub const NL1: ::tcflag_t = 0x00000100; 2602 pub const TAB0: ::tcflag_t = 0x00000000; 2603 pub const TAB1: ::tcflag_t = 0x00000400; 2604 pub const TAB2: ::tcflag_t = 0x00000800; 2605 pub const CR0: ::tcflag_t = 0x00000000; 2606 pub const CR1: ::tcflag_t = 0x00001000; 2607 pub const CR2: ::tcflag_t = 0x00002000; 2608 pub const CR3: ::tcflag_t = 0x00003000; 2609 pub const FF0: ::tcflag_t = 0x00000000; 2610 pub const FF1: ::tcflag_t = 0x00004000; 2611 pub const BS0: ::tcflag_t = 0x00000000; 2612 pub const BS1: ::tcflag_t = 0x00008000; 2613 pub const TAB3: ::tcflag_t = 0x00000004; 2614 pub const VT0: ::tcflag_t = 0x00000000; 2615 pub const VT1: ::tcflag_t = 0x00010000; 2616 pub const IUTF8: ::tcflag_t = 0x00004000; 2617 pub const CRTSCTS: ::tcflag_t = 0x00030000; 2618 2619 pub const NI_MAXHOST: ::socklen_t = 1025; 2620 pub const NI_MAXSERV: ::socklen_t = 32; 2621 pub const NI_NOFQDN: ::c_int = 0x00000001; 2622 pub const NI_NUMERICHOST: ::c_int = 0x00000002; 2623 pub const NI_NAMEREQD: ::c_int = 0x00000004; 2624 pub const NI_NUMERICSERV: ::c_int = 0x00000008; 2625 pub const NI_NUMERICSCOPE: ::c_int = 0x00000100; 2626 pub const NI_DGRAM: ::c_int = 0x00000010; 2627 2628 pub const Q_GETQUOTA: ::c_int = 0x300; 2629 pub const Q_SETQUOTA: ::c_int = 0x400; 2630 2631 pub const RENAME_SWAP: ::c_uint = 0x00000002; 2632 pub const RENAME_EXCL: ::c_uint = 0x00000004; 2633 2634 pub const RTLD_LOCAL: ::c_int = 0x4; 2635 pub const RTLD_FIRST: ::c_int = 0x100; 2636 pub const RTLD_NODELETE: ::c_int = 0x80; 2637 pub const RTLD_NOLOAD: ::c_int = 0x10; 2638 pub const RTLD_GLOBAL: ::c_int = 0x8; 2639 2640 pub const _WSTOPPED: ::c_int = 0o177; 2641 2642 pub const LOG_NETINFO: ::c_int = 12 << 3; 2643 pub const LOG_REMOTEAUTH: ::c_int = 13 << 3; 2644 pub const LOG_INSTALL: ::c_int = 14 << 3; 2645 pub const LOG_RAS: ::c_int = 15 << 3; 2646 pub const LOG_LAUNCHD: ::c_int = 24 << 3; 2647 pub const LOG_NFACILITIES: ::c_int = 25; 2648 2649 pub const CTLTYPE: ::c_int = 0xf; 2650 pub const CTLTYPE_NODE: ::c_int = 1; 2651 pub const CTLTYPE_INT: ::c_int = 2; 2652 pub const CTLTYPE_STRING: ::c_int = 3; 2653 pub const CTLTYPE_QUAD: ::c_int = 4; 2654 pub const CTLTYPE_OPAQUE: ::c_int = 5; 2655 pub const CTLTYPE_STRUCT: ::c_int = CTLTYPE_OPAQUE; 2656 pub const CTLFLAG_RD: ::c_int = 0x80000000; 2657 pub const CTLFLAG_WR: ::c_int = 0x40000000; 2658 pub const CTLFLAG_RW: ::c_int = CTLFLAG_RD | CTLFLAG_WR; 2659 pub const CTLFLAG_NOLOCK: ::c_int = 0x20000000; 2660 pub const CTLFLAG_ANYBODY: ::c_int = 0x10000000; 2661 pub const CTLFLAG_SECURE: ::c_int = 0x08000000; 2662 pub const CTLFLAG_MASKED: ::c_int = 0x04000000; 2663 pub const CTLFLAG_NOAUTO: ::c_int = 0x02000000; 2664 pub const CTLFLAG_KERN: ::c_int = 0x01000000; 2665 pub const CTLFLAG_LOCKED: ::c_int = 0x00800000; 2666 pub const CTLFLAG_OID2: ::c_int = 0x00400000; 2667 pub const CTL_UNSPEC: ::c_int = 0; 2668 pub const CTL_KERN: ::c_int = 1; 2669 pub const CTL_VM: ::c_int = 2; 2670 pub const CTL_VFS: ::c_int = 3; 2671 pub const CTL_NET: ::c_int = 4; 2672 pub const CTL_DEBUG: ::c_int = 5; 2673 pub const CTL_HW: ::c_int = 6; 2674 pub const CTL_MACHDEP: ::c_int = 7; 2675 pub const CTL_USER: ::c_int = 8; 2676 pub const CTL_MAXID: ::c_int = 9; 2677 pub const KERN_OSTYPE: ::c_int = 1; 2678 pub const KERN_OSRELEASE: ::c_int = 2; 2679 pub const KERN_OSREV: ::c_int = 3; 2680 pub const KERN_VERSION: ::c_int = 4; 2681 pub const KERN_MAXVNODES: ::c_int = 5; 2682 pub const KERN_MAXPROC: ::c_int = 6; 2683 pub const KERN_MAXFILES: ::c_int = 7; 2684 pub const KERN_ARGMAX: ::c_int = 8; 2685 pub const KERN_SECURELVL: ::c_int = 9; 2686 pub const KERN_HOSTNAME: ::c_int = 10; 2687 pub const KERN_HOSTID: ::c_int = 11; 2688 pub const KERN_CLOCKRATE: ::c_int = 12; 2689 pub const KERN_VNODE: ::c_int = 13; 2690 pub const KERN_PROC: ::c_int = 14; 2691 pub const KERN_FILE: ::c_int = 15; 2692 pub const KERN_PROF: ::c_int = 16; 2693 pub const KERN_POSIX1: ::c_int = 17; 2694 pub const KERN_NGROUPS: ::c_int = 18; 2695 pub const KERN_JOB_CONTROL: ::c_int = 19; 2696 pub const KERN_SAVED_IDS: ::c_int = 20; 2697 pub const KERN_BOOTTIME: ::c_int = 21; 2698 pub const KERN_NISDOMAINNAME: ::c_int = 22; 2699 pub const KERN_DOMAINNAME: ::c_int = KERN_NISDOMAINNAME; 2700 pub const KERN_MAXPARTITIONS: ::c_int = 23; 2701 pub const KERN_KDEBUG: ::c_int = 24; 2702 pub const KERN_UPDATEINTERVAL: ::c_int = 25; 2703 pub const KERN_OSRELDATE: ::c_int = 26; 2704 pub const KERN_NTP_PLL: ::c_int = 27; 2705 pub const KERN_BOOTFILE: ::c_int = 28; 2706 pub const KERN_MAXFILESPERPROC: ::c_int = 29; 2707 pub const KERN_MAXPROCPERUID: ::c_int = 30; 2708 pub const KERN_DUMPDEV: ::c_int = 31; 2709 pub const KERN_IPC: ::c_int = 32; 2710 pub const KERN_DUMMY: ::c_int = 33; 2711 pub const KERN_PS_STRINGS: ::c_int = 34; 2712 pub const KERN_USRSTACK32: ::c_int = 35; 2713 pub const KERN_LOGSIGEXIT: ::c_int = 36; 2714 pub const KERN_SYMFILE: ::c_int = 37; 2715 pub const KERN_PROCARGS: ::c_int = 38; 2716 pub const KERN_NETBOOT: ::c_int = 40; 2717 pub const KERN_SYSV: ::c_int = 42; 2718 pub const KERN_AFFINITY: ::c_int = 43; 2719 pub const KERN_TRANSLATE: ::c_int = 44; 2720 pub const KERN_CLASSIC: ::c_int = KERN_TRANSLATE; 2721 pub const KERN_EXEC: ::c_int = 45; 2722 pub const KERN_CLASSICHANDLER: ::c_int = KERN_EXEC; 2723 pub const KERN_AIOMAX: ::c_int = 46; 2724 pub const KERN_AIOPROCMAX: ::c_int = 47; 2725 pub const KERN_AIOTHREADS: ::c_int = 48; 2726 pub const KERN_COREFILE: ::c_int = 50; 2727 pub const KERN_COREDUMP: ::c_int = 51; 2728 pub const KERN_SUGID_COREDUMP: ::c_int = 52; 2729 pub const KERN_PROCDELAYTERM: ::c_int = 53; 2730 pub const KERN_SHREG_PRIVATIZABLE: ::c_int = 54; 2731 pub const KERN_LOW_PRI_WINDOW: ::c_int = 56; 2732 pub const KERN_LOW_PRI_DELAY: ::c_int = 57; 2733 pub const KERN_POSIX: ::c_int = 58; 2734 pub const KERN_USRSTACK64: ::c_int = 59; 2735 pub const KERN_NX_PROTECTION: ::c_int = 60; 2736 pub const KERN_TFP: ::c_int = 61; 2737 pub const KERN_PROCNAME: ::c_int = 62; 2738 pub const KERN_THALTSTACK: ::c_int = 63; 2739 pub const KERN_SPECULATIVE_READS: ::c_int = 64; 2740 pub const KERN_OSVERSION: ::c_int = 65; 2741 pub const KERN_SAFEBOOT: ::c_int = 66; 2742 pub const KERN_RAGEVNODE: ::c_int = 68; 2743 pub const KERN_TTY: ::c_int = 69; 2744 pub const KERN_CHECKOPENEVT: ::c_int = 70; 2745 pub const KERN_THREADNAME: ::c_int = 71; 2746 pub const KERN_MAXID: ::c_int = 72; 2747 pub const KERN_RAGE_PROC: ::c_int = 1; 2748 pub const KERN_RAGE_THREAD: ::c_int = 2; 2749 pub const KERN_UNRAGE_PROC: ::c_int = 3; 2750 pub const KERN_UNRAGE_THREAD: ::c_int = 4; 2751 pub const KERN_OPENEVT_PROC: ::c_int = 1; 2752 pub const KERN_UNOPENEVT_PROC: ::c_int = 2; 2753 pub const KERN_TFP_POLICY: ::c_int = 1; 2754 pub const KERN_TFP_POLICY_DENY: ::c_int = 0; 2755 pub const KERN_TFP_POLICY_DEFAULT: ::c_int = 2; 2756 pub const KERN_KDEFLAGS: ::c_int = 1; 2757 pub const KERN_KDDFLAGS: ::c_int = 2; 2758 pub const KERN_KDENABLE: ::c_int = 3; 2759 pub const KERN_KDSETBUF: ::c_int = 4; 2760 pub const KERN_KDGETBUF: ::c_int = 5; 2761 pub const KERN_KDSETUP: ::c_int = 6; 2762 pub const KERN_KDREMOVE: ::c_int = 7; 2763 pub const KERN_KDSETREG: ::c_int = 8; 2764 pub const KERN_KDGETREG: ::c_int = 9; 2765 pub const KERN_KDREADTR: ::c_int = 10; 2766 pub const KERN_KDPIDTR: ::c_int = 11; 2767 pub const KERN_KDTHRMAP: ::c_int = 12; 2768 pub const KERN_KDPIDEX: ::c_int = 14; 2769 pub const KERN_KDSETRTCDEC: ::c_int = 15; 2770 pub const KERN_KDGETENTROPY: ::c_int = 16; 2771 pub const KERN_KDWRITETR: ::c_int = 17; 2772 pub const KERN_KDWRITEMAP: ::c_int = 18; 2773 #[doc(hidden)] 2774 #[deprecated(since = "0.2.49", note = "Removed in MacOSX 10.12")] 2775 pub const KERN_KDENABLE_BG_TRACE: ::c_int = 19; 2776 #[doc(hidden)] 2777 #[deprecated(since = "0.2.49", note = "Removed in MacOSX 10.12")] 2778 pub const KERN_KDDISABLE_BG_TRACE: ::c_int = 20; 2779 pub const KERN_KDREADCURTHRMAP: ::c_int = 21; 2780 pub const KERN_KDSET_TYPEFILTER: ::c_int = 22; 2781 pub const KERN_KDBUFWAIT: ::c_int = 23; 2782 pub const KERN_KDCPUMAP: ::c_int = 24; 2783 pub const KERN_PROC_ALL: ::c_int = 0; 2784 pub const KERN_PROC_PID: ::c_int = 1; 2785 pub const KERN_PROC_PGRP: ::c_int = 2; 2786 pub const KERN_PROC_SESSION: ::c_int = 3; 2787 pub const KERN_PROC_TTY: ::c_int = 4; 2788 pub const KERN_PROC_UID: ::c_int = 5; 2789 pub const KERN_PROC_RUID: ::c_int = 6; 2790 pub const KERN_PROC_LCID: ::c_int = 7; 2791 pub const KIPC_MAXSOCKBUF: ::c_int = 1; 2792 pub const KIPC_SOCKBUF_WASTE: ::c_int = 2; 2793 pub const KIPC_SOMAXCONN: ::c_int = 3; 2794 pub const KIPC_MAX_LINKHDR: ::c_int = 4; 2795 pub const KIPC_MAX_PROTOHDR: ::c_int = 5; 2796 pub const KIPC_MAX_HDR: ::c_int = 6; 2797 pub const KIPC_MAX_DATALEN: ::c_int = 7; 2798 pub const KIPC_MBSTAT: ::c_int = 8; 2799 pub const KIPC_NMBCLUSTERS: ::c_int = 9; 2800 pub const KIPC_SOQLIMITCOMPAT: ::c_int = 10; 2801 pub const VM_METER: ::c_int = 1; 2802 pub const VM_LOADAVG: ::c_int = 2; 2803 pub const VM_MACHFACTOR: ::c_int = 4; 2804 pub const VM_SWAPUSAGE: ::c_int = 5; 2805 pub const VM_MAXID: ::c_int = 6; 2806 pub const HW_MACHINE: ::c_int = 1; 2807 pub const HW_MODEL: ::c_int = 2; 2808 pub const HW_NCPU: ::c_int = 3; 2809 pub const HW_BYTEORDER: ::c_int = 4; 2810 pub const HW_PHYSMEM: ::c_int = 5; 2811 pub const HW_USERMEM: ::c_int = 6; 2812 pub const HW_PAGESIZE: ::c_int = 7; 2813 pub const HW_DISKNAMES: ::c_int = 8; 2814 pub const HW_DISKSTATS: ::c_int = 9; 2815 pub const HW_EPOCH: ::c_int = 10; 2816 pub const HW_FLOATINGPT: ::c_int = 11; 2817 pub const HW_MACHINE_ARCH: ::c_int = 12; 2818 pub const HW_VECTORUNIT: ::c_int = 13; 2819 pub const HW_BUS_FREQ: ::c_int = 14; 2820 pub const HW_CPU_FREQ: ::c_int = 15; 2821 pub const HW_CACHELINE: ::c_int = 16; 2822 pub const HW_L1ICACHESIZE: ::c_int = 17; 2823 pub const HW_L1DCACHESIZE: ::c_int = 18; 2824 pub const HW_L2SETTINGS: ::c_int = 19; 2825 pub const HW_L2CACHESIZE: ::c_int = 20; 2826 pub const HW_L3SETTINGS: ::c_int = 21; 2827 pub const HW_L3CACHESIZE: ::c_int = 22; 2828 pub const HW_TB_FREQ: ::c_int = 23; 2829 pub const HW_MEMSIZE: ::c_int = 24; 2830 pub const HW_AVAILCPU: ::c_int = 25; 2831 pub const HW_MAXID: ::c_int = 26; 2832 pub const USER_CS_PATH: ::c_int = 1; 2833 pub const USER_BC_BASE_MAX: ::c_int = 2; 2834 pub const USER_BC_DIM_MAX: ::c_int = 3; 2835 pub const USER_BC_SCALE_MAX: ::c_int = 4; 2836 pub const USER_BC_STRING_MAX: ::c_int = 5; 2837 pub const USER_COLL_WEIGHTS_MAX: ::c_int = 6; 2838 pub const USER_EXPR_NEST_MAX: ::c_int = 7; 2839 pub const USER_LINE_MAX: ::c_int = 8; 2840 pub const USER_RE_DUP_MAX: ::c_int = 9; 2841 pub const USER_POSIX2_VERSION: ::c_int = 10; 2842 pub const USER_POSIX2_C_BIND: ::c_int = 11; 2843 pub const USER_POSIX2_C_DEV: ::c_int = 12; 2844 pub const USER_POSIX2_CHAR_TERM: ::c_int = 13; 2845 pub const USER_POSIX2_FORT_DEV: ::c_int = 14; 2846 pub const USER_POSIX2_FORT_RUN: ::c_int = 15; 2847 pub const USER_POSIX2_LOCALEDEF: ::c_int = 16; 2848 pub const USER_POSIX2_SW_DEV: ::c_int = 17; 2849 pub const USER_POSIX2_UPE: ::c_int = 18; 2850 pub const USER_STREAM_MAX: ::c_int = 19; 2851 pub const USER_TZNAME_MAX: ::c_int = 20; 2852 pub const USER_MAXID: ::c_int = 21; 2853 pub const CTL_DEBUG_NAME: ::c_int = 0; 2854 pub const CTL_DEBUG_VALUE: ::c_int = 1; 2855 pub const CTL_DEBUG_MAXID: ::c_int = 20; 2856 2857 pub const PRIO_DARWIN_THREAD: ::c_int = 3; 2858 pub const PRIO_DARWIN_PROCESS: ::c_int = 4; 2859 pub const PRIO_DARWIN_BG: ::c_int = 0x1000; 2860 pub const PRIO_DARWIN_NONUI: ::c_int = 0x1001; 2861 2862 pub const SEM_FAILED: *mut sem_t = -1isize as *mut ::sem_t; 2863 2864 pub const AI_PASSIVE: ::c_int = 0x00000001; 2865 pub const AI_CANONNAME: ::c_int = 0x00000002; 2866 pub const AI_NUMERICHOST: ::c_int = 0x00000004; 2867 pub const AI_NUMERICSERV: ::c_int = 0x00001000; 2868 pub const AI_MASK: ::c_int = AI_PASSIVE 2869 | AI_CANONNAME 2870 | AI_NUMERICHOST 2871 | AI_NUMERICSERV 2872 | AI_ADDRCONFIG; 2873 pub const AI_ALL: ::c_int = 0x00000100; 2874 pub const AI_V4MAPPED_CFG: ::c_int = 0x00000200; 2875 pub const AI_ADDRCONFIG: ::c_int = 0x00000400; 2876 pub const AI_V4MAPPED: ::c_int = 0x00000800; 2877 pub const AI_DEFAULT: ::c_int = AI_V4MAPPED_CFG | AI_ADDRCONFIG; 2878 pub const AI_UNUSABLE: ::c_int = 0x10000000; 2879 2880 pub const SIGEV_NONE: ::c_int = 0; 2881 pub const SIGEV_SIGNAL: ::c_int = 1; 2882 pub const SIGEV_THREAD: ::c_int = 3; 2883 2884 pub const AIO_CANCELED: ::c_int = 2; 2885 pub const AIO_NOTCANCELED: ::c_int = 4; 2886 pub const AIO_ALLDONE: ::c_int = 1; 2887 #[deprecated( 2888 since = "0.2.64", 2889 note = "Can vary at runtime. Use sysconf(3) instead" 2890 )] 2891 pub const AIO_LISTIO_MAX: ::c_int = 16; 2892 pub const LIO_NOP: ::c_int = 0; 2893 pub const LIO_WRITE: ::c_int = 2; 2894 pub const LIO_READ: ::c_int = 1; 2895 pub const LIO_WAIT: ::c_int = 2; 2896 pub const LIO_NOWAIT: ::c_int = 1; 2897 2898 pub const WEXITED: ::c_int = 0x00000004; 2899 pub const WSTOPPED: ::c_int = 0x00000008; 2900 pub const WCONTINUED: ::c_int = 0x00000010; 2901 pub const WNOWAIT: ::c_int = 0x00000020; 2902 2903 pub const P_ALL: idtype_t = 0; 2904 pub const P_PID: idtype_t = 1; 2905 pub const P_PGID: idtype_t = 2; 2906 2907 pub const UTIME_OMIT: c_long = -2; 2908 pub const UTIME_NOW: c_long = -1; 2909 2910 pub const XATTR_NOFOLLOW: ::c_int = 0x0001; 2911 pub const XATTR_CREATE: ::c_int = 0x0002; 2912 pub const XATTR_REPLACE: ::c_int = 0x0004; 2913 pub const XATTR_NOSECURITY: ::c_int = 0x0008; 2914 pub const XATTR_NODEFAULT: ::c_int = 0x0010; 2915 pub const XATTR_SHOWCOMPRESSION: ::c_int = 0x0020; 2916 2917 pub const NET_RT_IFLIST2: ::c_int = 0x0006; 2918 2919 // net/route.h 2920 pub const RTF_UP: ::c_int = 0x1; 2921 pub const RTF_GATEWAY: ::c_int = 0x2; 2922 pub const RTF_HOST: ::c_int = 0x4; 2923 pub const RTF_REJECT: ::c_int = 0x8; 2924 pub const RTF_DYNAMIC: ::c_int = 0x10; 2925 pub const RTF_MODIFIED: ::c_int = 0x20; 2926 pub const RTF_DONE: ::c_int = 0x40; 2927 pub const RTF_DELCLONE: ::c_int = 0x80; 2928 pub const RTF_CLONING: ::c_int = 0x100; 2929 pub const RTF_XRESOLVE: ::c_int = 0x200; 2930 pub const RTF_LLINFO: ::c_int = 0x400; 2931 pub const RTF_STATIC: ::c_int = 0x800; 2932 pub const RTF_BLACKHOLE: ::c_int = 0x1000; 2933 pub const RTF_NOIFREF: ::c_int = 0x2000; 2934 pub const RTF_PROTO2: ::c_int = 0x4000; 2935 pub const RTF_PROTO1: ::c_int = 0x8000; 2936 pub const RTF_PRCLONING: ::c_int = 0x10000; 2937 pub const RTF_WASCLONED: ::c_int = 0x20000; 2938 pub const RTF_PROTO3: ::c_int = 0x40000; 2939 pub const RTF_PINNED: ::c_int = 0x100000; 2940 pub const RTF_LOCAL: ::c_int = 0x200000; 2941 pub const RTF_BROADCAST: ::c_int = 0x400000; 2942 pub const RTF_MULTICAST: ::c_int = 0x800000; 2943 pub const RTF_IFSCOPE: ::c_int = 0x1000000; 2944 pub const RTF_CONDEMNED: ::c_int = 0x2000000; 2945 pub const RTF_IFREF: ::c_int = 0x4000000; 2946 pub const RTF_PROXY: ::c_int = 0x8000000; 2947 pub const RTF_ROUTER: ::c_int = 0x10000000; 2948 2949 pub const RTM_VERSION: ::c_int = 5; 2950 2951 // Message types 2952 pub const RTM_ADD: ::c_int = 0x1; 2953 pub const RTM_DELETE: ::c_int = 0x2; 2954 pub const RTM_CHANGE: ::c_int = 0x3; 2955 pub const RTM_GET: ::c_int = 0x4; 2956 pub const RTM_LOSING: ::c_int = 0x5; 2957 pub const RTM_REDIRECT: ::c_int = 0x6; 2958 pub const RTM_MISS: ::c_int = 0x7; 2959 pub const RTM_LOCK: ::c_int = 0x8; 2960 pub const RTM_OLDADD: ::c_int = 0x9; 2961 pub const RTM_OLDDEL: ::c_int = 0xa; 2962 pub const RTM_RESOLVE: ::c_int = 0xb; 2963 pub const RTM_NEWADDR: ::c_int = 0xc; 2964 pub const RTM_DELADDR: ::c_int = 0xd; 2965 pub const RTM_IFINFO: ::c_int = 0xe; 2966 pub const RTM_NEWMADDR: ::c_int = 0xf; 2967 pub const RTM_DELMADDR: ::c_int = 0x10; 2968 pub const RTM_IFINFO2: ::c_int = 0x12; 2969 pub const RTM_NEWMADDR2: ::c_int = 0x13; 2970 pub const RTM_GET2: ::c_int = 0x14; 2971 2972 // Bitmask values for rtm_inits and rmx_locks. 2973 pub const RTV_MTU: ::c_int = 0x1; 2974 pub const RTV_HOPCOUNT: ::c_int = 0x2; 2975 pub const RTV_EXPIRE: ::c_int = 0x4; 2976 pub const RTV_RPIPE: ::c_int = 0x8; 2977 pub const RTV_SPIPE: ::c_int = 0x10; 2978 pub const RTV_SSTHRESH: ::c_int = 0x20; 2979 pub const RTV_RTT: ::c_int = 0x40; 2980 pub const RTV_RTTVAR: ::c_int = 0x80; 2981 2982 // Bitmask values for rtm_addrs. 2983 pub const RTA_DST: ::c_int = 0x1; 2984 pub const RTA_GATEWAY: ::c_int = 0x2; 2985 pub const RTA_NETMASK: ::c_int = 0x4; 2986 pub const RTA_GENMASK: ::c_int = 0x8; 2987 pub const RTA_IFP: ::c_int = 0x10; 2988 pub const RTA_IFA: ::c_int = 0x20; 2989 pub const RTA_AUTHOR: ::c_int = 0x40; 2990 pub const RTA_BRD: ::c_int = 0x80; 2991 2992 // Index offsets for sockaddr array for alternate internal encoding. 2993 pub const RTAX_DST: ::c_int = 0; 2994 pub const RTAX_GATEWAY: ::c_int = 1; 2995 pub const RTAX_NETMASK: ::c_int = 2; 2996 pub const RTAX_GENMASK: ::c_int = 3; 2997 pub const RTAX_IFP: ::c_int = 4; 2998 pub const RTAX_IFA: ::c_int = 5; 2999 pub const RTAX_AUTHOR: ::c_int = 6; 3000 pub const RTAX_BRD: ::c_int = 7; 3001 pub const RTAX_MAX: ::c_int = 8; 3002 3003 pub const KERN_PROCARGS2: ::c_int = 49; 3004 3005 pub const PROC_PIDTASKALLINFO: ::c_int = 2; 3006 pub const PROC_PIDTASKINFO: ::c_int = 4; 3007 pub const PROC_PIDTHREADINFO: ::c_int = 5; 3008 pub const MAXCOMLEN: usize = 16; 3009 pub const MAXTHREADNAMESIZE: usize = 64; 3010 3011 pub const XUCRED_VERSION: ::c_uint = 0; 3012 3013 pub const LC_SEGMENT: u32 = 0x1; 3014 pub const LC_SEGMENT_64: u32 = 0x19; 3015 3016 pub const MH_MAGIC: u32 = 0xfeedface; 3017 pub const MH_MAGIC_64: u32 = 0xfeedfacf; 3018 3019 // net/if_utun.h 3020 pub const UTUN_OPT_FLAGS: ::c_int = 1; 3021 pub const UTUN_OPT_IFNAME: ::c_int = 2; 3022 3023 // net/bpf.h 3024 pub const DLT_NULL: ::c_uint = 0; // no link-layer encapsulation 3025 pub const DLT_EN10MB: ::c_uint = 1; // Ethernet (10Mb) 3026 pub const DLT_EN3MB: ::c_uint = 2; // Experimental Ethernet (3Mb) 3027 pub const DLT_AX25: ::c_uint = 3; // Amateur Radio AX.25 3028 pub const DLT_PRONET: ::c_uint = 4; // Proteon ProNET Token Ring 3029 pub const DLT_CHAOS: ::c_uint = 5; // Chaos 3030 pub const DLT_IEEE802: ::c_uint = 6; // IEEE 802 Networks 3031 pub const DLT_ARCNET: ::c_uint = 7; // ARCNET 3032 pub const DLT_SLIP: ::c_uint = 8; // Serial Line IP 3033 pub const DLT_PPP: ::c_uint = 9; // Point-to-point Protocol 3034 pub const DLT_FDDI: ::c_uint = 10; // FDDI 3035 pub const DLT_ATM_RFC1483: ::c_uint = 11; // LLC/SNAP encapsulated atm 3036 pub const DLT_RAW: ::c_uint = 12; // raw IP 3037 pub const DLT_LOOP: ::c_uint = 108; 3038 3039 // https://github.com/apple/darwin-xnu/blob/master/bsd/net/bpf.h#L100 3040 // sizeof(i32) 3041 pub const BPF_ALIGNMENT: ::c_int = 4; 3042 3043 // sys/mount.h 3044 pub const MNT_RDONLY: ::c_int = 0x00000001; 3045 pub const MNT_SYNCHRONOUS: ::c_int = 0x00000002; 3046 pub const MNT_NOEXEC: ::c_int = 0x00000004; 3047 pub const MNT_NOSUID: ::c_int = 0x00000008; 3048 pub const MNT_NODEV: ::c_int = 0x00000010; 3049 pub const MNT_UNION: ::c_int = 0x00000020; 3050 pub const MNT_ASYNC: ::c_int = 0x00000040; 3051 pub const MNT_CPROTECT: ::c_int = 0x00000080; 3052 3053 // NFS export related mount flags. 3054 pub const MNT_EXPORTED: ::c_int = 0x00000100; 3055 3056 // MAC labeled / "quarantined" flag 3057 pub const MNT_QUARANTINE: ::c_int = 0x00000400; 3058 3059 // Flags set by internal operations. 3060 pub const MNT_LOCAL: ::c_int = 0x00001000; 3061 pub const MNT_QUOTA: ::c_int = 0x00002000; 3062 pub const MNT_ROOTFS: ::c_int = 0x00004000; 3063 pub const MNT_DOVOLFS: ::c_int = 0x00008000; 3064 3065 pub const MNT_DONTBROWSE: ::c_int = 0x00100000; 3066 pub const MNT_IGNORE_OWNERSHIP: ::c_int = 0x00200000; 3067 pub const MNT_AUTOMOUNTED: ::c_int = 0x00400000; 3068 pub const MNT_JOURNALED: ::c_int = 0x00800000; 3069 pub const MNT_NOUSERXATTR: ::c_int = 0x01000000; 3070 pub const MNT_DEFWRITE: ::c_int = 0x02000000; 3071 pub const MNT_MULTILABEL: ::c_int = 0x04000000; 3072 pub const MNT_NOATIME: ::c_int = 0x10000000; 3073 pub const MNT_SNAPSHOT: ::c_int = 0x40000000; 3074 3075 // External filesystem command modifier flags. 3076 pub const MNT_UPDATE: ::c_int = 0x00010000; 3077 pub const MNT_NOBLOCK: ::c_int = 0x00020000; 3078 pub const MNT_RELOAD: ::c_int = 0x00040000; 3079 3080 // sys/spawn.h: 3081 pub const POSIX_SPAWN_RESETIDS: ::c_int = 0x01; 3082 pub const POSIX_SPAWN_SETPGROUP: ::c_int = 0x02; 3083 pub const POSIX_SPAWN_SETSIGDEF: ::c_int = 0x04; 3084 pub const POSIX_SPAWN_SETSIGMASK: ::c_int = 0x08; 3085 pub const POSIX_SPAWN_SETEXEC: ::c_int = 0x40; 3086 pub const POSIX_SPAWN_START_SUSPENDED: ::c_int = 0x80; 3087 pub const POSIX_SPAWN_CLOEXEC_DEFAULT: ::c_int = 0x4000; 3088 3089 // sys/ipc.h: 3090 pub const IPC_CREAT: ::c_int = 0x200; 3091 pub const IPC_EXCL: ::c_int = 0x400; 3092 pub const IPC_NOWAIT: ::c_int = 0x800; 3093 pub const IPC_PRIVATE: key_t = 0; 3094 3095 pub const IPC_RMID: ::c_int = 0; 3096 pub const IPC_SET: ::c_int = 1; 3097 pub const IPC_STAT: ::c_int = 2; 3098 3099 pub const IPC_R: ::c_int = 0x100; 3100 pub const IPC_W: ::c_int = 0x80; 3101 pub const IPC_M: ::c_int = 0x1000; 3102 3103 // sys/sem.h 3104 pub const SEM_UNDO: ::c_int = 0o10000; 3105 3106 pub const GETNCNT: ::c_int = 3; 3107 pub const GETPID: ::c_int = 4; 3108 pub const GETVAL: ::c_int = 5; 3109 pub const GETALL: ::c_int = 6; 3110 pub const GETZCNT: ::c_int = 7; 3111 pub const SETVAL: ::c_int = 8; 3112 pub const SETALL: ::c_int = 9; 3113 3114 // sys/shm.h 3115 pub const SHM_RDONLY: ::c_int = 0x1000; 3116 pub const SHM_RND: ::c_int = 0x2000; 3117 pub const SHMLBA: ::c_int = 4096; 3118 pub const SHM_R: ::c_int = IPC_R; 3119 pub const SHM_W: ::c_int = IPC_W; 3120 3121 // Flags for chflags(2) 3122 pub const UF_SETTABLE: ::c_uint = 0x0000ffff; 3123 pub const UF_NODUMP: ::c_uint = 0x00000001; 3124 pub const UF_IMMUTABLE: ::c_uint = 0x00000002; 3125 pub const UF_APPEND: ::c_uint = 0x00000004; 3126 pub const UF_OPAQUE: ::c_uint = 0x00000008; 3127 pub const UF_COMPRESSED: ::c_uint = 0x00000020; 3128 pub const UF_TRACKED: ::c_uint = 0x00000040; 3129 pub const SF_SETTABLE: ::c_uint = 0xffff0000; 3130 pub const SF_ARCHIVED: ::c_uint = 0x00010000; 3131 pub const SF_IMMUTABLE: ::c_uint = 0x00020000; 3132 pub const SF_APPEND: ::c_uint = 0x00040000; 3133 pub const UF_HIDDEN: ::c_uint = 0x00008000; 3134 3135 //<sys/timex.h> 3136 pub const NTP_API: ::c_int = 4; 3137 pub const MAXPHASE: ::c_long = 500000000; 3138 pub const MAXFREQ: ::c_long = 500000; 3139 pub const MINSEC: ::c_int = 256; 3140 pub const MAXSEC: ::c_int = 2048; 3141 pub const NANOSECOND: ::c_long = 1000000000; 3142 pub const SCALE_PPM: ::c_int = 65; 3143 pub const MAXTC: ::c_int = 10; 3144 pub const MOD_OFFSET: ::c_uint = 0x0001; 3145 pub const MOD_FREQUENCY: ::c_uint = 0x0002; 3146 pub const MOD_MAXERROR: ::c_uint = 0x0004; 3147 pub const MOD_ESTERROR: ::c_uint = 0x0008; 3148 pub const MOD_STATUS: ::c_uint = 0x0010; 3149 pub const MOD_TIMECONST: ::c_uint = 0x0020; 3150 pub const MOD_PPSMAX: ::c_uint = 0x0040; 3151 pub const MOD_TAI: ::c_uint = 0x0080; 3152 pub const MOD_MICRO: ::c_uint = 0x1000; 3153 pub const MOD_NANO: ::c_uint = 0x2000; 3154 pub const MOD_CLKB: ::c_uint = 0x4000; 3155 pub const MOD_CLKA: ::c_uint = 0x8000; 3156 pub const STA_PLL: ::c_int = 0x0001; 3157 pub const STA_PPSFREQ: ::c_int = 0x0002; 3158 pub const STA_PPSTIME: ::c_int = 0x0004; 3159 pub const STA_FLL: ::c_int = 0x0008; 3160 pub const STA_INS: ::c_int = 0x0010; 3161 pub const STA_DEL: ::c_int = 0x0020; 3162 pub const STA_UNSYNC: ::c_int = 0x0040; 3163 pub const STA_FREQHOLD: ::c_int = 0x0080; 3164 pub const STA_PPSSIGNAL: ::c_int = 0x0100; 3165 pub const STA_PPSJITTER: ::c_int = 0x0200; 3166 pub const STA_PPSWANDER: ::c_int = 0x0400; 3167 pub const STA_PPSERROR: ::c_int = 0x0800; 3168 pub const STA_CLOCKERR: ::c_int = 0x1000; 3169 pub const STA_NANO: ::c_int = 0x2000; 3170 pub const STA_MODE: ::c_int = 0x4000; 3171 pub const STA_CLK: ::c_int = 0x8000; 3172 pub const STA_RONLY: ::c_int = STA_PPSSIGNAL 3173 | STA_PPSJITTER 3174 | STA_PPSWANDER 3175 | STA_PPSERROR 3176 | STA_CLOCKERR 3177 | STA_NANO 3178 | STA_MODE 3179 | STA_CLK; 3180 pub const TIME_OK: ::c_int = 0; 3181 pub const TIME_INS: ::c_int = 1; 3182 pub const TIME_DEL: ::c_int = 2; 3183 pub const TIME_OOP: ::c_int = 3; 3184 pub const TIME_WAIT: ::c_int = 4; 3185 pub const TIME_ERROR: ::c_int = 5; 3186 3187 cfg_if! { 3188 if #[cfg(libc_const_size_of)] { 3189 fn __DARWIN_ALIGN32(p: usize) -> usize { 3190 const __DARWIN_ALIGNBYTES32: usize = ::mem::size_of::<u32>() - 1; 3191 p + __DARWIN_ALIGNBYTES32 & !__DARWIN_ALIGNBYTES32 3192 } 3193 } else { 3194 fn __DARWIN_ALIGN32(p: usize) -> usize { 3195 let __DARWIN_ALIGNBYTES32: usize = ::mem::size_of::<u32>() - 1; 3196 p + __DARWIN_ALIGNBYTES32 & !__DARWIN_ALIGNBYTES32 3197 } 3198 } 3199 } 3200 3201 f! { 3202 pub fn CMSG_NXTHDR(mhdr: *const ::msghdr, 3203 cmsg: *const ::cmsghdr) -> *mut ::cmsghdr { 3204 if cmsg.is_null() { 3205 return ::CMSG_FIRSTHDR(mhdr); 3206 }; 3207 let cmsg_len = (*cmsg).cmsg_len as usize; 3208 let next = cmsg as usize + __DARWIN_ALIGN32(cmsg_len as usize); 3209 let max = (*mhdr).msg_control as usize 3210 + (*mhdr).msg_controllen as usize; 3211 if next + __DARWIN_ALIGN32(::mem::size_of::<::cmsghdr>()) > max { 3212 0 as *mut ::cmsghdr 3213 } else { 3214 next as *mut ::cmsghdr 3215 } 3216 } 3217 3218 pub fn CMSG_DATA(cmsg: *const ::cmsghdr) -> *mut ::c_uchar { 3219 (cmsg as *mut ::c_uchar) 3220 .offset(__DARWIN_ALIGN32(::mem::size_of::<::cmsghdr>()) as isize) 3221 } 3222 3223 pub fn CMSG_SPACE(length: ::c_uint) -> ::c_uint { 3224 (__DARWIN_ALIGN32(::mem::size_of::<::cmsghdr>()) 3225 + __DARWIN_ALIGN32(length as usize)) 3226 as ::c_uint 3227 } 3228 3229 pub fn CMSG_LEN(length: ::c_uint) -> ::c_uint { 3230 (__DARWIN_ALIGN32(::mem::size_of::<::cmsghdr>()) + length as usize) 3231 as ::c_uint 3232 } 3233 3234 pub fn WSTOPSIG(status: ::c_int) -> ::c_int { 3235 status >> 8 3236 } 3237 3238 pub fn _WSTATUS(status: ::c_int) -> ::c_int { 3239 status & 0x7f 3240 } 3241 3242 pub fn WIFCONTINUED(status: ::c_int) -> bool { 3243 _WSTATUS(status) == _WSTOPPED && WSTOPSIG(status) == 0x13 3244 } 3245 3246 pub fn WIFSIGNALED(status: ::c_int) -> bool { 3247 _WSTATUS(status) != _WSTOPPED && _WSTATUS(status) != 0 3248 } 3249 3250 pub fn WIFSTOPPED(status: ::c_int) -> bool { 3251 _WSTATUS(status) == _WSTOPPED && WSTOPSIG(status) != 0x13 3252 } 3253 } 3254 3255 extern "C" { setgrent()3256 pub fn setgrent(); 3257 #[doc(hidden)] 3258 #[deprecated(since = "0.2.49", note = "Deprecated in MacOSX 10.5")] 3259 #[link_name = "daemon$1050"] daemon(nochdir: ::c_int, noclose: ::c_int) -> ::c_int3260 pub fn daemon(nochdir: ::c_int, noclose: ::c_int) -> ::c_int; 3261 #[doc(hidden)] 3262 #[deprecated(since = "0.2.49", note = "Deprecated in MacOSX 10.10")] sem_destroy(sem: *mut sem_t) -> ::c_int3263 pub fn sem_destroy(sem: *mut sem_t) -> ::c_int; 3264 #[doc(hidden)] 3265 #[deprecated(since = "0.2.49", note = "Deprecated in MacOSX 10.10")] sem_init( sem: *mut sem_t, pshared: ::c_int, value: ::c_uint, ) -> ::c_int3266 pub fn sem_init( 3267 sem: *mut sem_t, 3268 pshared: ::c_int, 3269 value: ::c_uint, 3270 ) -> ::c_int; aio_read(aiocbp: *mut aiocb) -> ::c_int3271 pub fn aio_read(aiocbp: *mut aiocb) -> ::c_int; aio_write(aiocbp: *mut aiocb) -> ::c_int3272 pub fn aio_write(aiocbp: *mut aiocb) -> ::c_int; aio_fsync(op: ::c_int, aiocbp: *mut aiocb) -> ::c_int3273 pub fn aio_fsync(op: ::c_int, aiocbp: *mut aiocb) -> ::c_int; aio_error(aiocbp: *const aiocb) -> ::c_int3274 pub fn aio_error(aiocbp: *const aiocb) -> ::c_int; aio_return(aiocbp: *mut aiocb) -> ::ssize_t3275 pub fn aio_return(aiocbp: *mut aiocb) -> ::ssize_t; 3276 #[cfg_attr( 3277 all(target_os = "macos", target_arch = "x86"), 3278 link_name = "aio_suspend$UNIX2003" 3279 )] aio_suspend( aiocb_list: *const *const aiocb, nitems: ::c_int, timeout: *const ::timespec, ) -> ::c_int3280 pub fn aio_suspend( 3281 aiocb_list: *const *const aiocb, 3282 nitems: ::c_int, 3283 timeout: *const ::timespec, 3284 ) -> ::c_int; aio_cancel(fd: ::c_int, aiocbp: *mut aiocb) -> ::c_int3285 pub fn aio_cancel(fd: ::c_int, aiocbp: *mut aiocb) -> ::c_int; chflags(path: *const ::c_char, flags: ::c_uint) -> ::c_int3286 pub fn chflags(path: *const ::c_char, flags: ::c_uint) -> ::c_int; fchflags(fd: ::c_int, flags: ::c_uint) -> ::c_int3287 pub fn fchflags(fd: ::c_int, flags: ::c_uint) -> ::c_int; clock_getres(clk_id: ::clockid_t, tp: *mut ::timespec) -> ::c_int3288 pub fn clock_getres(clk_id: ::clockid_t, tp: *mut ::timespec) -> ::c_int; clock_gettime(clk_id: ::clockid_t, tp: *mut ::timespec) -> ::c_int3289 pub fn clock_gettime(clk_id: ::clockid_t, tp: *mut ::timespec) -> ::c_int; lio_listio( mode: ::c_int, aiocb_list: *const *mut aiocb, nitems: ::c_int, sevp: *mut sigevent, ) -> ::c_int3290 pub fn lio_listio( 3291 mode: ::c_int, 3292 aiocb_list: *const *mut aiocb, 3293 nitems: ::c_int, 3294 sevp: *mut sigevent, 3295 ) -> ::c_int; 3296 dirfd(dirp: *mut ::DIR) -> ::c_int3297 pub fn dirfd(dirp: *mut ::DIR) -> ::c_int; 3298 lutimes(file: *const ::c_char, times: *const ::timeval) -> ::c_int3299 pub fn lutimes(file: *const ::c_char, times: *const ::timeval) -> ::c_int; 3300 gettimeofday(tp: *mut ::timeval, tz: *mut ::c_void) -> ::c_int3301 pub fn gettimeofday(tp: *mut ::timeval, tz: *mut ::c_void) -> ::c_int; getutxent() -> *mut utmpx3302 pub fn getutxent() -> *mut utmpx; getutxid(ut: *const utmpx) -> *mut utmpx3303 pub fn getutxid(ut: *const utmpx) -> *mut utmpx; getutxline(ut: *const utmpx) -> *mut utmpx3304 pub fn getutxline(ut: *const utmpx) -> *mut utmpx; pututxline(ut: *const utmpx) -> *mut utmpx3305 pub fn pututxline(ut: *const utmpx) -> *mut utmpx; setutxent()3306 pub fn setutxent(); endutxent()3307 pub fn endutxent(); utmpxname(file: *const ::c_char) -> ::c_int3308 pub fn utmpxname(file: *const ::c_char) -> ::c_int; 3309 getnameinfo( sa: *const ::sockaddr, salen: ::socklen_t, host: *mut ::c_char, hostlen: ::socklen_t, serv: *mut ::c_char, sevlen: ::socklen_t, flags: ::c_int, ) -> ::c_int3310 pub fn getnameinfo( 3311 sa: *const ::sockaddr, 3312 salen: ::socklen_t, 3313 host: *mut ::c_char, 3314 hostlen: ::socklen_t, 3315 serv: *mut ::c_char, 3316 sevlen: ::socklen_t, 3317 flags: ::c_int, 3318 ) -> ::c_int; mincore( addr: *const ::c_void, len: ::size_t, vec: *mut ::c_char, ) -> ::c_int3319 pub fn mincore( 3320 addr: *const ::c_void, 3321 len: ::size_t, 3322 vec: *mut ::c_char, 3323 ) -> ::c_int; sysctlnametomib( name: *const ::c_char, mibp: *mut ::c_int, sizep: *mut ::size_t, ) -> ::c_int3324 pub fn sysctlnametomib( 3325 name: *const ::c_char, 3326 mibp: *mut ::c_int, 3327 sizep: *mut ::size_t, 3328 ) -> ::c_int; 3329 #[cfg_attr( 3330 all(target_os = "macos", target_arch = "x86"), 3331 link_name = "mprotect$UNIX2003" 3332 )] mprotect( addr: *mut ::c_void, len: ::size_t, prot: ::c_int, ) -> ::c_int3333 pub fn mprotect( 3334 addr: *mut ::c_void, 3335 len: ::size_t, 3336 prot: ::c_int, 3337 ) -> ::c_int; semget(key: key_t, nsems: ::c_int, semflg: ::c_int) -> ::c_int3338 pub fn semget(key: key_t, nsems: ::c_int, semflg: ::c_int) -> ::c_int; 3339 #[cfg_attr( 3340 all(target_os = "macos", target_arch = "x86"), 3341 link_name = "semctl$UNIX2003" 3342 )] semctl( semid: ::c_int, semnum: ::c_int, cmd: ::c_int, ... ) -> ::c_int3343 pub fn semctl( 3344 semid: ::c_int, 3345 semnum: ::c_int, 3346 cmd: ::c_int, 3347 ... 3348 ) -> ::c_int; semop( semid: ::c_int, sops: *mut sembuf, nsops: ::size_t, ) -> ::c_int3349 pub fn semop( 3350 semid: ::c_int, 3351 sops: *mut sembuf, 3352 nsops: ::size_t, 3353 ) -> ::c_int; shm_open(name: *const ::c_char, oflag: ::c_int, ...) -> ::c_int3354 pub fn shm_open(name: *const ::c_char, oflag: ::c_int, ...) -> ::c_int; ftok(pathname: *const c_char, proj_id: ::c_int) -> key_t3355 pub fn ftok(pathname: *const c_char, proj_id: ::c_int) -> key_t; shmat( shmid: ::c_int, shmaddr: *const ::c_void, shmflg: ::c_int, ) -> *mut ::c_void3356 pub fn shmat( 3357 shmid: ::c_int, 3358 shmaddr: *const ::c_void, 3359 shmflg: ::c_int, 3360 ) -> *mut ::c_void; shmdt(shmaddr: *const ::c_void) -> ::c_int3361 pub fn shmdt(shmaddr: *const ::c_void) -> ::c_int; 3362 #[cfg_attr( 3363 all(target_os = "macos", target_arch = "x86"), 3364 link_name = "shmctl$UNIX2003" 3365 )] shmctl( shmid: ::c_int, cmd: ::c_int, buf: *mut ::shmid_ds, ) -> ::c_int3366 pub fn shmctl( 3367 shmid: ::c_int, 3368 cmd: ::c_int, 3369 buf: *mut ::shmid_ds, 3370 ) -> ::c_int; shmget(key: key_t, size: ::size_t, shmflg: ::c_int) -> ::c_int3371 pub fn shmget(key: key_t, size: ::size_t, shmflg: ::c_int) -> ::c_int; sysctl( name: *mut ::c_int, namelen: ::c_uint, oldp: *mut ::c_void, oldlenp: *mut ::size_t, newp: *mut ::c_void, newlen: ::size_t, ) -> ::c_int3372 pub fn sysctl( 3373 name: *mut ::c_int, 3374 namelen: ::c_uint, 3375 oldp: *mut ::c_void, 3376 oldlenp: *mut ::size_t, 3377 newp: *mut ::c_void, 3378 newlen: ::size_t, 3379 ) -> ::c_int; sysctlbyname( name: *const ::c_char, oldp: *mut ::c_void, oldlenp: *mut ::size_t, newp: *mut ::c_void, newlen: ::size_t, ) -> ::c_int3380 pub fn sysctlbyname( 3381 name: *const ::c_char, 3382 oldp: *mut ::c_void, 3383 oldlenp: *mut ::size_t, 3384 newp: *mut ::c_void, 3385 newlen: ::size_t, 3386 ) -> ::c_int; 3387 #[deprecated(since = "0.2.55", note = "Use the mach crate")] mach_absolute_time() -> u643388 pub fn mach_absolute_time() -> u64; 3389 #[deprecated(since = "0.2.55", note = "Use the mach crate")] 3390 #[allow(deprecated)] mach_timebase_info(info: *mut ::mach_timebase_info) -> ::c_int3391 pub fn mach_timebase_info(info: *mut ::mach_timebase_info) -> ::c_int; pthread_setname_np(name: *const ::c_char) -> ::c_int3392 pub fn pthread_setname_np(name: *const ::c_char) -> ::c_int; pthread_getname_np( thread: ::pthread_t, name: *mut ::c_char, len: ::size_t, ) -> ::c_int3393 pub fn pthread_getname_np( 3394 thread: ::pthread_t, 3395 name: *mut ::c_char, 3396 len: ::size_t, 3397 ) -> ::c_int; pthread_get_stackaddr_np(thread: ::pthread_t) -> *mut ::c_void3398 pub fn pthread_get_stackaddr_np(thread: ::pthread_t) -> *mut ::c_void; pthread_get_stacksize_np(thread: ::pthread_t) -> ::size_t3399 pub fn pthread_get_stacksize_np(thread: ::pthread_t) -> ::size_t; pthread_condattr_setpshared( attr: *mut pthread_condattr_t, pshared: ::c_int, ) -> ::c_int3400 pub fn pthread_condattr_setpshared( 3401 attr: *mut pthread_condattr_t, 3402 pshared: ::c_int, 3403 ) -> ::c_int; pthread_condattr_getpshared( attr: *const pthread_condattr_t, pshared: *mut ::c_int, ) -> ::c_int3404 pub fn pthread_condattr_getpshared( 3405 attr: *const pthread_condattr_t, 3406 pshared: *mut ::c_int, 3407 ) -> ::c_int; pthread_mutexattr_setpshared( attr: *mut pthread_mutexattr_t, pshared: ::c_int, ) -> ::c_int3408 pub fn pthread_mutexattr_setpshared( 3409 attr: *mut pthread_mutexattr_t, 3410 pshared: ::c_int, 3411 ) -> ::c_int; pthread_mutexattr_getpshared( attr: *const pthread_mutexattr_t, pshared: *mut ::c_int, ) -> ::c_int3412 pub fn pthread_mutexattr_getpshared( 3413 attr: *const pthread_mutexattr_t, 3414 pshared: *mut ::c_int, 3415 ) -> ::c_int; pthread_rwlockattr_getpshared( attr: *const pthread_rwlockattr_t, val: *mut ::c_int, ) -> ::c_int3416 pub fn pthread_rwlockattr_getpshared( 3417 attr: *const pthread_rwlockattr_t, 3418 val: *mut ::c_int, 3419 ) -> ::c_int; pthread_rwlockattr_setpshared( attr: *mut pthread_rwlockattr_t, val: ::c_int, ) -> ::c_int3420 pub fn pthread_rwlockattr_setpshared( 3421 attr: *mut pthread_rwlockattr_t, 3422 val: ::c_int, 3423 ) -> ::c_int; __error() -> *mut ::c_int3424 pub fn __error() -> *mut ::c_int; backtrace(buf: *mut *mut ::c_void, sz: ::c_int) -> ::c_int3425 pub fn backtrace(buf: *mut *mut ::c_void, sz: ::c_int) -> ::c_int; 3426 #[cfg_attr(target_os = "macos", link_name = "statfs$INODE64")] statfs(path: *const ::c_char, buf: *mut statfs) -> ::c_int3427 pub fn statfs(path: *const ::c_char, buf: *mut statfs) -> ::c_int; 3428 #[cfg_attr(target_os = "macos", link_name = "fstatfs$INODE64")] fstatfs(fd: ::c_int, buf: *mut statfs) -> ::c_int3429 pub fn fstatfs(fd: ::c_int, buf: *mut statfs) -> ::c_int; kevent( kq: ::c_int, changelist: *const ::kevent, nchanges: ::c_int, eventlist: *mut ::kevent, nevents: ::c_int, timeout: *const ::timespec, ) -> ::c_int3430 pub fn kevent( 3431 kq: ::c_int, 3432 changelist: *const ::kevent, 3433 nchanges: ::c_int, 3434 eventlist: *mut ::kevent, 3435 nevents: ::c_int, 3436 timeout: *const ::timespec, 3437 ) -> ::c_int; kevent64( kq: ::c_int, changelist: *const ::kevent64_s, nchanges: ::c_int, eventlist: *mut ::kevent64_s, nevents: ::c_int, flags: ::c_uint, timeout: *const ::timespec, ) -> ::c_int3438 pub fn kevent64( 3439 kq: ::c_int, 3440 changelist: *const ::kevent64_s, 3441 nchanges: ::c_int, 3442 eventlist: *mut ::kevent64_s, 3443 nevents: ::c_int, 3444 flags: ::c_uint, 3445 timeout: *const ::timespec, 3446 ) -> ::c_int; mount( src: *const ::c_char, target: *const ::c_char, flags: ::c_int, data: *mut ::c_void, ) -> ::c_int3447 pub fn mount( 3448 src: *const ::c_char, 3449 target: *const ::c_char, 3450 flags: ::c_int, 3451 data: *mut ::c_void, 3452 ) -> ::c_int; ptrace( request: ::c_int, pid: ::pid_t, addr: *mut ::c_char, data: ::c_int, ) -> ::c_int3453 pub fn ptrace( 3454 request: ::c_int, 3455 pid: ::pid_t, 3456 addr: *mut ::c_char, 3457 data: ::c_int, 3458 ) -> ::c_int; quotactl( special: *const ::c_char, cmd: ::c_int, id: ::c_int, data: *mut ::c_char, ) -> ::c_int3459 pub fn quotactl( 3460 special: *const ::c_char, 3461 cmd: ::c_int, 3462 id: ::c_int, 3463 data: *mut ::c_char, 3464 ) -> ::c_int; sethostname(name: *const ::c_char, len: ::c_int) -> ::c_int3465 pub fn sethostname(name: *const ::c_char, len: ::c_int) -> ::c_int; sendfile( fd: ::c_int, s: ::c_int, offset: ::off_t, len: *mut ::off_t, hdtr: *mut ::sf_hdtr, flags: ::c_int, ) -> ::c_int3466 pub fn sendfile( 3467 fd: ::c_int, 3468 s: ::c_int, 3469 offset: ::off_t, 3470 len: *mut ::off_t, 3471 hdtr: *mut ::sf_hdtr, 3472 flags: ::c_int, 3473 ) -> ::c_int; futimens(fd: ::c_int, times: *const ::timespec) -> ::c_int3474 pub fn futimens(fd: ::c_int, times: *const ::timespec) -> ::c_int; utimensat( dirfd: ::c_int, path: *const ::c_char, times: *const ::timespec, flag: ::c_int, ) -> ::c_int3475 pub fn utimensat( 3476 dirfd: ::c_int, 3477 path: *const ::c_char, 3478 times: *const ::timespec, 3479 flag: ::c_int, 3480 ) -> ::c_int; openpty( amaster: *mut ::c_int, aslave: *mut ::c_int, name: *mut ::c_char, termp: *mut termios, winp: *mut ::winsize, ) -> ::c_int3481 pub fn openpty( 3482 amaster: *mut ::c_int, 3483 aslave: *mut ::c_int, 3484 name: *mut ::c_char, 3485 termp: *mut termios, 3486 winp: *mut ::winsize, 3487 ) -> ::c_int; forkpty( amaster: *mut ::c_int, name: *mut ::c_char, termp: *mut termios, winp: *mut ::winsize, ) -> ::pid_t3488 pub fn forkpty( 3489 amaster: *mut ::c_int, 3490 name: *mut ::c_char, 3491 termp: *mut termios, 3492 winp: *mut ::winsize, 3493 ) -> ::pid_t; login_tty(fd: ::c_int) -> ::c_int3494 pub fn login_tty(fd: ::c_int) -> ::c_int; duplocale(base: ::locale_t) -> ::locale_t3495 pub fn duplocale(base: ::locale_t) -> ::locale_t; freelocale(loc: ::locale_t) -> ::c_int3496 pub fn freelocale(loc: ::locale_t) -> ::c_int; localeconv_l(loc: ::locale_t) -> *mut lconv3497 pub fn localeconv_l(loc: ::locale_t) -> *mut lconv; newlocale( mask: ::c_int, locale: *const ::c_char, base: ::locale_t, ) -> ::locale_t3498 pub fn newlocale( 3499 mask: ::c_int, 3500 locale: *const ::c_char, 3501 base: ::locale_t, 3502 ) -> ::locale_t; uselocale(loc: ::locale_t) -> ::locale_t3503 pub fn uselocale(loc: ::locale_t) -> ::locale_t; querylocale(mask: ::c_int, loc: ::locale_t) -> *const ::c_char3504 pub fn querylocale(mask: ::c_int, loc: ::locale_t) -> *const ::c_char; getpriority(which: ::c_int, who: ::id_t) -> ::c_int3505 pub fn getpriority(which: ::c_int, who: ::id_t) -> ::c_int; setpriority(which: ::c_int, who: ::id_t, prio: ::c_int) -> ::c_int3506 pub fn setpriority(which: ::c_int, who: ::id_t, prio: ::c_int) -> ::c_int; getdomainname(name: *mut ::c_char, len: ::c_int) -> ::c_int3507 pub fn getdomainname(name: *mut ::c_char, len: ::c_int) -> ::c_int; setdomainname(name: *const ::c_char, len: ::c_int) -> ::c_int3508 pub fn setdomainname(name: *const ::c_char, len: ::c_int) -> ::c_int; getxattr( path: *const ::c_char, name: *const ::c_char, value: *mut ::c_void, size: ::size_t, position: u32, flags: ::c_int, ) -> ::ssize_t3509 pub fn getxattr( 3510 path: *const ::c_char, 3511 name: *const ::c_char, 3512 value: *mut ::c_void, 3513 size: ::size_t, 3514 position: u32, 3515 flags: ::c_int, 3516 ) -> ::ssize_t; fgetxattr( filedes: ::c_int, name: *const ::c_char, value: *mut ::c_void, size: ::size_t, position: u32, flags: ::c_int, ) -> ::ssize_t3517 pub fn fgetxattr( 3518 filedes: ::c_int, 3519 name: *const ::c_char, 3520 value: *mut ::c_void, 3521 size: ::size_t, 3522 position: u32, 3523 flags: ::c_int, 3524 ) -> ::ssize_t; setxattr( path: *const ::c_char, name: *const ::c_char, value: *const ::c_void, size: ::size_t, position: u32, flags: ::c_int, ) -> ::c_int3525 pub fn setxattr( 3526 path: *const ::c_char, 3527 name: *const ::c_char, 3528 value: *const ::c_void, 3529 size: ::size_t, 3530 position: u32, 3531 flags: ::c_int, 3532 ) -> ::c_int; fsetxattr( filedes: ::c_int, name: *const ::c_char, value: *const ::c_void, size: ::size_t, position: u32, flags: ::c_int, ) -> ::c_int3533 pub fn fsetxattr( 3534 filedes: ::c_int, 3535 name: *const ::c_char, 3536 value: *const ::c_void, 3537 size: ::size_t, 3538 position: u32, 3539 flags: ::c_int, 3540 ) -> ::c_int; listxattr( path: *const ::c_char, list: *mut ::c_char, size: ::size_t, flags: ::c_int, ) -> ::ssize_t3541 pub fn listxattr( 3542 path: *const ::c_char, 3543 list: *mut ::c_char, 3544 size: ::size_t, 3545 flags: ::c_int, 3546 ) -> ::ssize_t; flistxattr( filedes: ::c_int, list: *mut ::c_char, size: ::size_t, flags: ::c_int, ) -> ::ssize_t3547 pub fn flistxattr( 3548 filedes: ::c_int, 3549 list: *mut ::c_char, 3550 size: ::size_t, 3551 flags: ::c_int, 3552 ) -> ::ssize_t; removexattr( path: *const ::c_char, name: *const ::c_char, flags: ::c_int, ) -> ::c_int3553 pub fn removexattr( 3554 path: *const ::c_char, 3555 name: *const ::c_char, 3556 flags: ::c_int, 3557 ) -> ::c_int; renamex_np( from: *const ::c_char, to: *const ::c_char, flags: ::c_uint, ) -> ::c_int3558 pub fn renamex_np( 3559 from: *const ::c_char, 3560 to: *const ::c_char, 3561 flags: ::c_uint, 3562 ) -> ::c_int; renameatx_np( fromfd: ::c_int, from: *const ::c_char, tofd: ::c_int, to: *const ::c_char, flags: ::c_uint, ) -> ::c_int3563 pub fn renameatx_np( 3564 fromfd: ::c_int, 3565 from: *const ::c_char, 3566 tofd: ::c_int, 3567 to: *const ::c_char, 3568 flags: ::c_uint, 3569 ) -> ::c_int; fremovexattr( filedes: ::c_int, name: *const ::c_char, flags: ::c_int, ) -> ::c_int3570 pub fn fremovexattr( 3571 filedes: ::c_int, 3572 name: *const ::c_char, 3573 flags: ::c_int, 3574 ) -> ::c_int; 3575 getgrouplist( name: *const ::c_char, basegid: ::c_int, groups: *mut ::c_int, ngroups: *mut ::c_int, ) -> ::c_int3576 pub fn getgrouplist( 3577 name: *const ::c_char, 3578 basegid: ::c_int, 3579 groups: *mut ::c_int, 3580 ngroups: *mut ::c_int, 3581 ) -> ::c_int; initgroups(user: *const ::c_char, basegroup: ::c_int) -> ::c_int3582 pub fn initgroups(user: *const ::c_char, basegroup: ::c_int) -> ::c_int; 3583 3584 #[cfg_attr( 3585 all(target_os = "macos", target_arch = "x86"), 3586 link_name = "waitid$UNIX2003" 3587 )] waitid( idtype: idtype_t, id: id_t, infop: *mut ::siginfo_t, options: ::c_int, ) -> ::c_int3588 pub fn waitid( 3589 idtype: idtype_t, 3590 id: id_t, 3591 infop: *mut ::siginfo_t, 3592 options: ::c_int, 3593 ) -> ::c_int; brk(addr: *const ::c_void) -> *mut ::c_void3594 pub fn brk(addr: *const ::c_void) -> *mut ::c_void; sbrk(increment: ::c_int) -> *mut ::c_void3595 pub fn sbrk(increment: ::c_int) -> *mut ::c_void; settimeofday( tv: *const ::timeval, tz: *const ::timezone, ) -> ::c_int3596 pub fn settimeofday( 3597 tv: *const ::timeval, 3598 tz: *const ::timezone, 3599 ) -> ::c_int; 3600 #[deprecated(since = "0.2.55", note = "Use the mach crate")] _dyld_image_count() -> u323601 pub fn _dyld_image_count() -> u32; 3602 #[deprecated(since = "0.2.55", note = "Use the mach crate")] 3603 #[allow(deprecated)] _dyld_get_image_header(image_index: u32) -> *const mach_header3604 pub fn _dyld_get_image_header(image_index: u32) -> *const mach_header; 3605 #[deprecated(since = "0.2.55", note = "Use the mach crate")] _dyld_get_image_vmaddr_slide(image_index: u32) -> ::intptr_t3606 pub fn _dyld_get_image_vmaddr_slide(image_index: u32) -> ::intptr_t; 3607 #[deprecated(since = "0.2.55", note = "Use the mach crate")] _dyld_get_image_name(image_index: u32) -> *const ::c_char3608 pub fn _dyld_get_image_name(image_index: u32) -> *const ::c_char; 3609 posix_spawn( pid: *mut ::pid_t, path: *const ::c_char, file_actions: *const ::posix_spawn_file_actions_t, attrp: *const ::posix_spawnattr_t, argv: *const *mut ::c_char, envp: *const *mut ::c_char, ) -> ::c_int3610 pub fn posix_spawn( 3611 pid: *mut ::pid_t, 3612 path: *const ::c_char, 3613 file_actions: *const ::posix_spawn_file_actions_t, 3614 attrp: *const ::posix_spawnattr_t, 3615 argv: *const *mut ::c_char, 3616 envp: *const *mut ::c_char, 3617 ) -> ::c_int; posix_spawnp( pid: *mut ::pid_t, file: *const ::c_char, file_actions: *const ::posix_spawn_file_actions_t, attrp: *const ::posix_spawnattr_t, argv: *const *mut ::c_char, envp: *const *mut ::c_char, ) -> ::c_int3618 pub fn posix_spawnp( 3619 pid: *mut ::pid_t, 3620 file: *const ::c_char, 3621 file_actions: *const ::posix_spawn_file_actions_t, 3622 attrp: *const ::posix_spawnattr_t, 3623 argv: *const *mut ::c_char, 3624 envp: *const *mut ::c_char, 3625 ) -> ::c_int; posix_spawnattr_init(attr: *mut posix_spawnattr_t) -> ::c_int3626 pub fn posix_spawnattr_init(attr: *mut posix_spawnattr_t) -> ::c_int; posix_spawnattr_destroy(attr: *mut posix_spawnattr_t) -> ::c_int3627 pub fn posix_spawnattr_destroy(attr: *mut posix_spawnattr_t) -> ::c_int; posix_spawnattr_getsigdefault( attr: *const posix_spawnattr_t, default: *mut ::sigset_t, ) -> ::c_int3628 pub fn posix_spawnattr_getsigdefault( 3629 attr: *const posix_spawnattr_t, 3630 default: *mut ::sigset_t, 3631 ) -> ::c_int; posix_spawnattr_setsigdefault( attr: *mut posix_spawnattr_t, default: *const ::sigset_t, ) -> ::c_int3632 pub fn posix_spawnattr_setsigdefault( 3633 attr: *mut posix_spawnattr_t, 3634 default: *const ::sigset_t, 3635 ) -> ::c_int; posix_spawnattr_getsigmask( attr: *const posix_spawnattr_t, default: *mut ::sigset_t, ) -> ::c_int3636 pub fn posix_spawnattr_getsigmask( 3637 attr: *const posix_spawnattr_t, 3638 default: *mut ::sigset_t, 3639 ) -> ::c_int; posix_spawnattr_setsigmask( attr: *mut posix_spawnattr_t, default: *const ::sigset_t, ) -> ::c_int3640 pub fn posix_spawnattr_setsigmask( 3641 attr: *mut posix_spawnattr_t, 3642 default: *const ::sigset_t, 3643 ) -> ::c_int; posix_spawnattr_getflags( attr: *const posix_spawnattr_t, flags: *mut ::c_short, ) -> ::c_int3644 pub fn posix_spawnattr_getflags( 3645 attr: *const posix_spawnattr_t, 3646 flags: *mut ::c_short, 3647 ) -> ::c_int; posix_spawnattr_setflags( attr: *mut posix_spawnattr_t, flags: ::c_short, ) -> ::c_int3648 pub fn posix_spawnattr_setflags( 3649 attr: *mut posix_spawnattr_t, 3650 flags: ::c_short, 3651 ) -> ::c_int; posix_spawnattr_getpgroup( attr: *const posix_spawnattr_t, flags: *mut ::pid_t, ) -> ::c_int3652 pub fn posix_spawnattr_getpgroup( 3653 attr: *const posix_spawnattr_t, 3654 flags: *mut ::pid_t, 3655 ) -> ::c_int; posix_spawnattr_setpgroup( attr: *mut posix_spawnattr_t, flags: ::pid_t, ) -> ::c_int3656 pub fn posix_spawnattr_setpgroup( 3657 attr: *mut posix_spawnattr_t, 3658 flags: ::pid_t, 3659 ) -> ::c_int; 3660 posix_spawn_file_actions_init( actions: *mut posix_spawn_file_actions_t, ) -> ::c_int3661 pub fn posix_spawn_file_actions_init( 3662 actions: *mut posix_spawn_file_actions_t, 3663 ) -> ::c_int; posix_spawn_file_actions_destroy( actions: *mut posix_spawn_file_actions_t, ) -> ::c_int3664 pub fn posix_spawn_file_actions_destroy( 3665 actions: *mut posix_spawn_file_actions_t, 3666 ) -> ::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_int3667 pub fn posix_spawn_file_actions_addopen( 3668 actions: *mut posix_spawn_file_actions_t, 3669 fd: ::c_int, 3670 path: *const ::c_char, 3671 oflag: ::c_int, 3672 mode: ::mode_t, 3673 ) -> ::c_int; posix_spawn_file_actions_addclose( actions: *mut posix_spawn_file_actions_t, fd: ::c_int, ) -> ::c_int3674 pub fn posix_spawn_file_actions_addclose( 3675 actions: *mut posix_spawn_file_actions_t, 3676 fd: ::c_int, 3677 ) -> ::c_int; posix_spawn_file_actions_adddup2( actions: *mut posix_spawn_file_actions_t, fd: ::c_int, newfd: ::c_int, ) -> ::c_int3678 pub fn posix_spawn_file_actions_adddup2( 3679 actions: *mut posix_spawn_file_actions_t, 3680 fd: ::c_int, 3681 newfd: ::c_int, 3682 ) -> ::c_int; uname(buf: *mut ::utsname) -> ::c_int3683 pub fn uname(buf: *mut ::utsname) -> ::c_int; 3684 connectx( socket: ::c_int, endpoints: *const sa_endpoints_t, associd: sae_associd_t, flags: ::c_uint, iov: *const ::iovec, iovcnt: ::c_uint, len: *mut ::size_t, connid: *mut sae_connid_t, ) -> ::c_int3685 pub fn connectx( 3686 socket: ::c_int, 3687 endpoints: *const sa_endpoints_t, 3688 associd: sae_associd_t, 3689 flags: ::c_uint, 3690 iov: *const ::iovec, 3691 iovcnt: ::c_uint, 3692 len: *mut ::size_t, 3693 connid: *mut sae_connid_t, 3694 ) -> ::c_int; disconnectx( socket: ::c_int, associd: sae_associd_t, connid: sae_connid_t, ) -> ::c_int3695 pub fn disconnectx( 3696 socket: ::c_int, 3697 associd: sae_associd_t, 3698 connid: sae_connid_t, 3699 ) -> ::c_int; 3700 ntp_adjtime(buf: *mut timex) -> ::c_int3701 pub fn ntp_adjtime(buf: *mut timex) -> ::c_int; ntp_gettime(buf: *mut ntptimeval) -> ::c_int3702 pub fn ntp_gettime(buf: *mut ntptimeval) -> ::c_int; 3703 } 3704 3705 cfg_if! { 3706 if #[cfg(any(target_arch = "arm", target_arch = "x86"))] { 3707 mod b32; 3708 pub use self::b32::*; 3709 } else if #[cfg(any(target_arch = "x86_64", target_arch = "aarch64"))] { 3710 mod b64; 3711 pub use self::b64::*; 3712 } else { 3713 // Unknown target_arch 3714 } 3715 } 3716