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