1 #![allow(dead_code)] 2 3 // types 4 pub type c_char = i8; 5 6 pub type __s16_type = ::c_short; 7 pub type __u16_type = ::c_ushort; 8 pub type __s32_type = ::c_int; 9 pub type __u32_type = ::c_uint; 10 pub type __slongword_type = ::c_long; 11 pub type __ulongword_type = ::c_ulong; 12 13 pub type __u_char = ::c_uchar; 14 pub type __u_short = ::c_ushort; 15 pub type __u_int = ::c_uint; 16 pub type __u_long = ::c_ulong; 17 pub type __int8_t = ::c_schar; 18 pub type __uint8_t = ::c_uchar; 19 pub type __int16_t = ::c_short; 20 pub type __uint16_t = ::c_ushort; 21 pub type __int32_t = ::c_int; 22 pub type __uint32_t = ::c_uint; 23 pub type __int_least8_t = __int8_t; 24 pub type __uint_least8_t = __uint8_t; 25 pub type __int_least16_t = __int16_t; 26 pub type __uint_least16_t = __uint16_t; 27 pub type __int_least32_t = __int32_t; 28 pub type __uint_least32_t = __uint32_t; 29 pub type __int_least64_t = __int64_t; 30 pub type __uint_least64_t = __uint64_t; 31 32 pub type __dev_t = __uword_type; 33 pub type __uid_t = __u32_type; 34 pub type __gid_t = __u32_type; 35 pub type __ino_t = __ulongword_type; 36 pub type __ino64_t = __uquad_type; 37 pub type __mode_t = __u32_type; 38 pub type __nlink_t = __uword_type; 39 pub type __off_t = __slongword_type; 40 pub type __off64_t = __squad_type; 41 pub type __pid_t = __s32_type; 42 pub type __rlim_t = __ulongword_type; 43 pub type __rlim64_t = __uquad_type; 44 pub type __blkcnt_t = __slongword_type; 45 pub type __blkcnt64_t = __squad_type; 46 pub type __fsblkcnt_t = __ulongword_type; 47 pub type __fsblkcnt64_t = __uquad_type; 48 pub type __fsfilcnt_t = __ulongword_type; 49 pub type __fsfilcnt64_t = __uquad_type; 50 pub type __fsword_t = __sword_type; 51 pub type __id_t = __u32_type; 52 pub type __clock_t = __slongword_type; 53 pub type __time_t = __slongword_type; 54 pub type __useconds_t = __u32_type; 55 pub type __suseconds_t = __slongword_type; 56 pub type __suseconds64_t = __squad_type; 57 pub type __daddr_t = __s32_type; 58 pub type __key_t = __s32_type; 59 pub type __clockid_t = __s32_type; 60 pub type __timer_t = __uword_type; 61 pub type __blksize_t = __slongword_type; 62 pub type __fsid_t = __uquad_type; 63 pub type __ssize_t = __sword_type; 64 pub type __syscall_slong_t = __slongword_type; 65 pub type __syscall_ulong_t = __ulongword_type; 66 pub type __cpu_mask = __ulongword_type; 67 68 pub type __loff_t = __off64_t; 69 pub type __caddr_t = *mut ::c_char; 70 pub type __intptr_t = __sword_type; 71 pub type __ptrdiff_t = __sword_type; 72 pub type __socklen_t = __u32_type; 73 pub type __sig_atomic_t = ::c_int; 74 pub type __time64_t = __int64_t; 75 pub type ssize_t = __ssize_t; 76 pub type size_t = ::c_ulong; 77 pub type wchar_t = ::c_int; 78 pub type wint_t = ::c_uint; 79 pub type gid_t = __gid_t; 80 pub type uid_t = __uid_t; 81 pub type off_t = __off_t; 82 pub type off64_t = __off64_t; 83 pub type useconds_t = __useconds_t; 84 pub type pid_t = __pid_t; 85 pub type socklen_t = __socklen_t; 86 87 pub type in_addr_t = u32; 88 89 pub type _Float32 = f32; 90 pub type _Float64 = f64; 91 pub type _Float32x = f64; 92 pub type _Float64x = f64; 93 94 pub type __locale_t = *mut __locale_struct; 95 pub type locale_t = __locale_t; 96 97 pub type u_char = __u_char; 98 pub type u_short = __u_short; 99 pub type u_int = __u_int; 100 pub type u_long = __u_long; 101 pub type quad_t = __quad_t; 102 pub type u_quad_t = __u_quad_t; 103 pub type fsid_t = __fsid_t; 104 pub type loff_t = __loff_t; 105 pub type ino_t = __ino_t; 106 pub type ino64_t = __ino64_t; 107 pub type dev_t = __dev_t; 108 pub type mode_t = __mode_t; 109 pub type nlink_t = __nlink_t; 110 pub type id_t = __id_t; 111 pub type daddr_t = __daddr_t; 112 pub type caddr_t = __caddr_t; 113 pub type key_t = __key_t; 114 pub type clock_t = __clock_t; 115 pub type clockid_t = __clockid_t; 116 pub type time_t = __time_t; 117 pub type timer_t = __timer_t; 118 pub type suseconds_t = __suseconds_t; 119 pub type ulong = ::c_ulong; 120 pub type ushort = ::c_ushort; 121 pub type uint = ::c_uint; 122 pub type u_int8_t = __uint8_t; 123 pub type u_int16_t = __uint16_t; 124 pub type u_int32_t = __uint32_t; 125 pub type u_int64_t = __uint64_t; 126 pub type register_t = ::c_int; 127 pub type __sigset_t = ::c_ulong; 128 pub type sigset_t = __sigset_t; 129 130 pub type __fd_mask = ::c_long; 131 pub type fd_mask = __fd_mask; 132 pub type blksize_t = __blksize_t; 133 pub type blkcnt_t = __blkcnt_t; 134 pub type fsblkcnt_t = __fsblkcnt_t; 135 pub type fsfilcnt_t = __fsfilcnt_t; 136 pub type blkcnt64_t = __blkcnt64_t; 137 pub type fsblkcnt64_t = __fsblkcnt64_t; 138 pub type fsfilcnt64_t = __fsfilcnt64_t; 139 140 pub type __pthread_spinlock_t = ::c_int; 141 pub type __tss_t = ::c_int; 142 pub type __thrd_t = ::c_long; 143 pub type __pthread_t = ::c_long; 144 pub type pthread_t = __pthread_t; 145 pub type __pthread_process_shared = ::c_uint; 146 pub type __pthread_inheritsched = ::c_uint; 147 pub type __pthread_contentionscope = ::c_uint; 148 pub type __pthread_detachstate = ::c_uint; 149 pub type pthread_attr_t = __pthread_attr; 150 pub type __pthread_mutex_protocol = ::c_uint; 151 pub type __pthread_mutex_type = ::c_uint; 152 pub type __pthread_mutex_robustness = ::c_uint; 153 pub type pthread_mutexattr_t = __pthread_mutexattr; 154 pub type pthread_mutex_t = __pthread_mutex; 155 pub type pthread_condattr_t = __pthread_condattr; 156 pub type pthread_cond_t = __pthread_cond; 157 pub type pthread_spinlock_t = __pthread_spinlock_t; 158 pub type pthread_rwlockattr_t = __pthread_rwlockattr; 159 pub type pthread_rwlock_t = __pthread_rwlock; 160 pub type pthread_barrierattr_t = __pthread_barrierattr; 161 pub type pthread_barrier_t = __pthread_barrier; 162 pub type __pthread_key = ::c_int; 163 pub type pthread_key_t = __pthread_key; 164 pub type pthread_once_t = __pthread_once; 165 166 pub type __rlimit_resource = ::c_uint; 167 pub type __rlimit_resource_t = __rlimit_resource; 168 pub type rlim_t = __rlim_t; 169 pub type rlim64_t = __rlim64_t; 170 171 pub type __rusage_who = ::c_int; 172 173 pub type __priority_which = ::c_uint; 174 175 pub type sa_family_t = ::c_uchar; 176 177 pub type in_port_t = u16; 178 179 pub type __sigval_t = ::sigval; 180 181 pub type sigevent_t = sigevent; 182 183 pub type nfds_t = ::c_ulong; 184 185 pub type tcflag_t = ::c_uint; 186 pub type cc_t = ::c_uchar; 187 pub type speed_t = ::c_int; 188 189 pub type sigval_t = ::sigval; 190 191 pub type greg_t = ::c_int; 192 pub type gregset_t = [greg_t; 19usize]; 193 194 pub type __ioctl_dir = ::c_uint; 195 196 pub type __ioctl_datum = ::c_uint; 197 198 pub type __error_t_codes = ::c_int; 199 200 pub type int_least8_t = __int_least8_t; 201 pub type int_least16_t = __int_least16_t; 202 pub type int_least32_t = __int_least32_t; 203 pub type int_least64_t = __int_least64_t; 204 pub type uint_least8_t = __uint_least8_t; 205 pub type uint_least16_t = __uint_least16_t; 206 pub type uint_least32_t = __uint_least32_t; 207 pub type uint_least64_t = __uint_least64_t; 208 pub type int_fast8_t = ::c_schar; 209 pub type uint_fast8_t = ::c_uchar; 210 pub type intmax_t = __intmax_t; 211 pub type uintmax_t = __uintmax_t; 212 213 pub type tcp_seq = u32; 214 215 pub type tcp_ca_state = ::c_uint; 216 217 pub type idtype_t = ::c_uint; 218 219 pub type mqd_t = ::c_int; 220 221 pub type Lmid_t = ::c_long; 222 223 pub type regoff_t = ::c_int; 224 225 pub type nl_item = ::c_int; 226 227 pub type iconv_t = *mut ::c_void; 228 229 #[cfg_attr(feature = "extra_traits", derive(Debug))] 230 pub enum fpos64_t {} // FIXME: fill this out with a struct 231 impl ::Copy for fpos64_t {} 232 impl ::Clone for fpos64_t { clone(&self) -> fpos64_t233 fn clone(&self) -> fpos64_t { 234 *self 235 } 236 } 237 238 #[cfg_attr(feature = "extra_traits", derive(Debug))] 239 pub enum timezone {} 240 impl ::Copy for timezone {} 241 impl ::Clone for timezone { clone(&self) -> timezone242 fn clone(&self) -> timezone { 243 *self 244 } 245 } 246 247 // structs 248 s! { 249 pub struct ip_mreq { 250 pub imr_multiaddr: in_addr, 251 pub imr_interface: in_addr, 252 } 253 254 pub struct ip_mreqn { 255 pub imr_multiaddr: in_addr, 256 pub imr_address: in_addr, 257 pub imr_ifindex: ::c_int, 258 } 259 260 pub struct ip_mreq_source { 261 pub imr_multiaddr: in_addr, 262 pub imr_interface: in_addr, 263 pub imr_sourceaddr: in_addr, 264 } 265 266 pub struct sockaddr { 267 pub sa_len: ::c_uchar, 268 pub sa_family: sa_family_t, 269 pub sa_data: [::c_char; 14usize], 270 } 271 272 pub struct in_addr { 273 pub s_addr: in_addr_t, 274 } 275 276 pub struct sockaddr_in { 277 pub sin_len: ::c_uchar, 278 pub sin_family: sa_family_t, 279 pub sin_port: in_port_t, 280 pub sin_addr: ::in_addr, 281 pub sin_zero: [::c_uchar; 8usize], 282 } 283 284 pub struct sockaddr_in6 { 285 pub sin6_len: ::c_uchar, 286 pub sin6_family: sa_family_t, 287 pub sin6_port: in_port_t, 288 pub sin6_flowinfo: u32, 289 pub sin6_addr: ::in6_addr, 290 pub sin6_scope_id: u32, 291 } 292 293 pub struct sockaddr_un { 294 pub sun_len: ::c_uchar, 295 pub sun_family: sa_family_t, 296 pub sun_path: [::c_char; 108usize], 297 } 298 299 pub struct sockaddr_storage { 300 pub ss_len: ::c_uchar, 301 pub ss_family: sa_family_t, 302 pub __ss_padding: [::c_char; 122usize], 303 pub __ss_align: __uint32_t, 304 } 305 306 pub struct sockaddr_at { 307 pub _address: u8, 308 } 309 310 pub struct sockaddr_ax25 { 311 pub _address: u8, 312 } 313 314 pub struct sockaddr_x25 { 315 pub _address: u8, 316 } 317 318 pub struct sockaddr_dl { 319 pub _address: u8, 320 } 321 pub struct sockaddr_eon { 322 pub _address: u8, 323 } 324 pub struct sockaddr_inarp { 325 pub _address: u8, 326 } 327 328 pub struct sockaddr_ipx { 329 pub _address: u8, 330 } 331 pub struct sockaddr_iso { 332 pub _address: u8, 333 } 334 335 pub struct sockaddr_ns { 336 pub _address: u8, 337 } 338 339 pub struct addrinfo { 340 pub ai_flags: ::c_int, 341 pub ai_family: ::c_int, 342 pub ai_socktype: ::c_int, 343 pub ai_protocol: ::c_int, 344 pub ai_addrlen: socklen_t, 345 pub ai_addr: *mut sockaddr, 346 pub ai_canonname: *mut ::c_char, 347 pub ai_next: *mut addrinfo, 348 } 349 350 pub struct msghdr { 351 pub msg_name: *mut ::c_void, 352 pub msg_namelen: socklen_t, 353 pub msg_iov: *mut ::iovec, 354 pub msg_iovlen: ::c_int, 355 pub msg_control: *mut ::c_void, 356 pub msg_controllen: socklen_t, 357 pub msg_flags: ::c_int, 358 } 359 360 pub struct cmsghdr { 361 pub cmsg_len: ::socklen_t, 362 pub cmsg_level: ::c_int, 363 pub cmsg_type: ::c_int, 364 } 365 366 pub struct dirent { 367 pub d_ino: __ino_t, 368 pub d_reclen: ::c_ushort, 369 pub d_type: ::c_uchar, 370 pub d_namlen: ::c_uchar, 371 pub d_name: [::c_char; 1usize], 372 } 373 374 pub struct dirent64 { 375 pub d_ino: __ino64_t, 376 pub d_reclen: ::c_ushort, 377 pub d_type: ::c_uchar, 378 pub d_namlen: ::c_uchar, 379 pub d_name: [::c_char; 1usize], 380 } 381 382 pub struct fd_set { 383 pub fds_bits: [__fd_mask; 8usize], 384 } 385 386 pub struct termios { 387 pub c_iflag: ::tcflag_t, 388 pub c_oflag: ::tcflag_t, 389 pub c_cflag: ::tcflag_t, 390 pub c_lflag: ::tcflag_t, 391 pub c_cc: [::cc_t; 20usize], 392 pub __ispeed: ::speed_t, 393 pub __ospeed: ::speed_t, 394 } 395 396 pub struct mallinfo { 397 pub arena: ::c_int, 398 pub ordblks: ::c_int, 399 pub smblks: ::c_int, 400 pub hblks: ::c_int, 401 pub hblkhd: ::c_int, 402 pub usmblks: ::c_int, 403 pub fsmblks: ::c_int, 404 pub uordblks: ::c_int, 405 pub fordblks: ::c_int, 406 pub keepcost: ::c_int, 407 } 408 409 pub struct mallinfo2 { 410 pub arena: ::size_t, 411 pub ordblks: ::size_t, 412 pub smblks: ::size_t, 413 pub hblks: ::size_t, 414 pub hblkhd: ::size_t, 415 pub usmblks: ::size_t, 416 pub fsmblks: ::size_t, 417 pub uordblks: ::size_t, 418 pub fordblks: ::size_t, 419 pub keepcost: ::size_t, 420 } 421 422 pub struct sigaction { 423 pub sa_sigaction: ::sighandler_t, 424 pub sa_mask: __sigset_t, 425 pub sa_flags: ::c_int, 426 } 427 428 pub struct sigevent { 429 pub sigev_value: ::sigval, 430 pub sigev_signo: ::c_int, 431 pub sigev_notify: ::c_int, 432 __unused1: *mut ::c_void, //actually a function pointer 433 pub sigev_notify_attributes: *mut pthread_attr_t, 434 } 435 436 pub struct siginfo_t { 437 pub si_signo: ::c_int, 438 pub si_errno: ::c_int, 439 pub si_code: ::c_int, 440 pub si_pid: __pid_t, 441 pub si_uid: __uid_t, 442 pub si_addr: *mut ::c_void, 443 pub si_status: ::c_int, 444 pub si_band: ::c_long, 445 pub si_value: ::sigval, 446 } 447 448 pub struct timespec { 449 pub tv_sec: __time_t, 450 pub tv_nsec: __syscall_slong_t, 451 } 452 453 pub struct __locale_data { 454 pub _address: u8, 455 } 456 457 pub struct stat { 458 pub st_fstype: ::c_int, 459 pub st_dev: __fsid_t, /* Actually st_fsid */ 460 pub st_ino: __ino_t, 461 pub st_gen: ::c_uint, 462 pub st_rdev: __dev_t, 463 pub st_mode: __mode_t, 464 pub st_nlink: __nlink_t, 465 pub st_uid: __uid_t, 466 pub st_gid: __gid_t, 467 pub st_size: __off_t, 468 pub st_atim: ::timespec, 469 pub st_mtim: ::timespec, 470 pub st_ctim: ::timespec, 471 pub st_blksize: __blksize_t, 472 pub st_blocks: __blkcnt_t, 473 pub st_author: __uid_t, 474 pub st_flags: ::c_uint, 475 pub st_spare: [::c_int; 11usize], 476 } 477 478 pub struct stat64 { 479 pub st_fstype: ::c_int, 480 pub st_fsid: __fsid_t, 481 pub st_ino: __ino64_t, 482 pub st_gen: ::c_uint, 483 pub st_rdev: __dev_t, 484 pub st_mode: __mode_t, 485 pub st_nlink: __nlink_t, 486 pub st_uid: __uid_t, 487 pub st_gid: __gid_t, 488 pub st_size: __off64_t, 489 pub st_atim: ::timespec, 490 pub st_mtim: ::timespec, 491 pub st_ctim: ::timespec, 492 pub st_blksize: __blksize_t, 493 pub st_blocks: __blkcnt64_t, 494 pub st_author: __uid_t, 495 pub st_flags: ::c_uint, 496 pub st_spare: [::c_int; 8usize], 497 } 498 499 pub struct statx { 500 pub stx_mask: u32, 501 pub stx_blksize: u32, 502 pub stx_attributes: u64, 503 pub stx_nlink: u32, 504 pub stx_uid: u32, 505 pub stx_gid: u32, 506 pub stx_mode: u16, 507 __statx_pad1: [u16; 1], 508 pub stx_ino: u64, 509 pub stx_size: u64, 510 pub stx_blocks: u64, 511 pub stx_attributes_mask: u64, 512 pub stx_atime: ::statx_timestamp, 513 pub stx_btime: ::statx_timestamp, 514 pub stx_ctime: ::statx_timestamp, 515 pub stx_mtime: ::statx_timestamp, 516 pub stx_rdev_major: u32, 517 pub stx_rdev_minor: u32, 518 pub stx_dev_major: u32, 519 pub stx_dev_minor: u32, 520 __statx_pad2: [u64; 14], 521 } 522 523 pub struct statx_timestamp { 524 pub tv_sec: i64, 525 pub tv_nsec: u32, 526 pub __statx_timestamp_pad1: [i32; 1], 527 } 528 529 pub struct statfs { 530 pub f_type: ::c_uint, 531 pub f_bsize: ::c_ulong, 532 pub f_blocks: __fsblkcnt_t, 533 pub f_bfree: __fsblkcnt_t, 534 pub f_bavail: __fsblkcnt_t, 535 pub f_files: __fsblkcnt_t, 536 pub f_ffree: __fsblkcnt_t, 537 pub f_fsid: __fsid_t, 538 pub f_namelen: ::c_ulong, 539 pub f_favail: __fsfilcnt_t, 540 pub f_frsize: ::c_ulong, 541 pub f_flag: ::c_ulong, 542 pub f_spare: [::c_uint; 3usize], 543 } 544 545 pub struct statfs64 { 546 pub f_type: ::c_uint, 547 pub f_bsize: ::c_ulong, 548 pub f_blocks: __fsblkcnt64_t, 549 pub f_bfree: __fsblkcnt64_t, 550 pub f_bavail: __fsblkcnt64_t, 551 pub f_files: __fsblkcnt64_t, 552 pub f_ffree: __fsblkcnt64_t, 553 pub f_fsid: __fsid_t, 554 pub f_namelen: ::c_ulong, 555 pub f_favail: __fsfilcnt64_t, 556 pub f_frsize: ::c_ulong, 557 pub f_flag: ::c_ulong, 558 pub f_spare: [::c_uint ; 3usize], 559 } 560 561 pub struct statvfs { 562 pub __f_type: ::c_uint, 563 pub f_bsize: ::c_ulong, 564 pub f_blocks: __fsblkcnt_t, 565 pub f_bfree: __fsblkcnt_t, 566 pub f_bavail: __fsblkcnt_t, 567 pub f_files: __fsfilcnt_t, 568 pub f_ffree: __fsfilcnt_t, 569 pub f_fsid: __fsid_t, 570 pub f_namemax: ::c_ulong, 571 pub f_favail: __fsfilcnt_t, 572 pub f_frsize: ::c_ulong, 573 pub f_flag: ::c_ulong, 574 pub f_spare: [::c_uint; 3usize], 575 } 576 577 pub struct statvfs64 { 578 pub __f_type: ::c_uint, 579 pub f_bsize: ::c_ulong, 580 pub f_blocks: __fsblkcnt64_t, 581 pub f_bfree: __fsblkcnt64_t, 582 pub f_bavail: __fsblkcnt64_t, 583 pub f_files: __fsfilcnt64_t, 584 pub f_ffree: __fsfilcnt64_t, 585 pub f_fsid: __fsid_t, 586 pub f_namemax: ::c_ulong, 587 pub f_favail: __fsfilcnt64_t, 588 pub f_frsize: ::c_ulong, 589 pub f_flag: ::c_ulong, 590 pub f_spare: [::c_uint; 3usize], 591 } 592 593 pub struct aiocb { 594 pub aio_fildes: ::c_int, 595 pub aio_lio_opcode: ::c_int, 596 pub aio_reqprio: ::c_int, 597 pub aio_buf: *mut ::c_void, 598 pub aio_nbytes: ::size_t, 599 pub aio_sigevent: ::sigevent, 600 __next_prio: *mut aiocb, 601 __abs_prio: ::c_int, 602 __policy: ::c_int, 603 __error_code: ::c_int, 604 __return_value: ::ssize_t, 605 pub aio_offset: off_t, 606 #[cfg(all(not(target_arch = "x86_64"), target_pointer_width = "32"))] 607 __unused1: [::c_char; 4], 608 __glibc_reserved: [::c_char; 32] 609 } 610 611 pub struct mq_attr { 612 pub mq_flags: ::c_long, 613 pub mq_maxmsg: ::c_long, 614 pub mq_msgsize: ::c_long, 615 pub mq_curmsgs: ::c_long, 616 } 617 618 pub struct __exit_status { 619 pub e_termination: ::c_short, 620 pub e_exit: ::c_short, 621 } 622 623 #[cfg_attr(target_pointer_width = "32", 624 repr(align(4)))] 625 #[cfg_attr(target_pointer_width = "64", 626 repr(align(8)))] 627 pub struct sem_t { 628 __size: [::c_char; 20usize], 629 } 630 631 pub struct __pthread { 632 pub _address: u8, 633 } 634 635 pub struct __pthread_mutexattr { 636 pub __prioceiling: ::c_int, 637 pub __protocol: __pthread_mutex_protocol, 638 pub __pshared: __pthread_process_shared, 639 pub __mutex_type: __pthread_mutex_type, 640 } 641 pub struct __pthread_mutex { 642 pub __lock: ::c_uint, 643 pub __owner_id: ::c_uint, 644 pub __cnt: ::c_uint, 645 pub __shpid: ::c_int, 646 pub __type: ::c_int, 647 pub __flags: ::c_int, 648 pub __reserved1: ::c_uint, 649 pub __reserved2: ::c_uint, 650 } 651 652 pub struct __pthread_condattr { 653 pub __pshared: __pthread_process_shared, 654 pub __clock: __clockid_t, 655 } 656 657 pub struct __pthread_rwlockattr { 658 pub __pshared: __pthread_process_shared, 659 } 660 661 pub struct __pthread_barrierattr { 662 pub __pshared: __pthread_process_shared, 663 } 664 665 pub struct __pthread_once { 666 pub __run: ::c_int, 667 pub __lock: __pthread_spinlock_t, 668 } 669 670 pub struct __pthread_cond { 671 pub __lock: __pthread_spinlock_t, 672 pub __queue: *mut __pthread, 673 pub __attr: *mut __pthread_condattr, 674 pub __wrefs: ::c_uint, 675 pub __data: *mut ::c_void, 676 } 677 678 pub struct __pthread_attr { 679 pub __schedparam: sched_param, 680 pub __stackaddr: *mut ::c_void, 681 pub __stacksize: size_t, 682 pub __guardsize: size_t, 683 pub __detachstate: __pthread_detachstate, 684 pub __inheritsched: __pthread_inheritsched, 685 pub __contentionscope: __pthread_contentionscope, 686 pub __schedpolicy: ::c_int, 687 } 688 689 pub struct __pthread_rwlock { 690 pub __held: __pthread_spinlock_t, 691 pub __lock: __pthread_spinlock_t, 692 pub __readers: ::c_int, 693 pub __readerqueue: *mut __pthread, 694 pub __writerqueue: *mut __pthread, 695 pub __attr: *mut __pthread_rwlockattr, 696 pub __data: *mut ::c_void, 697 } 698 699 pub struct __pthread_barrier { 700 pub __lock: __pthread_spinlock_t, 701 pub __queue: *mut __pthread, 702 pub __pending: ::c_uint, 703 pub __count: ::c_uint, 704 pub __attr: *mut __pthread_barrierattr, 705 pub __data: *mut ::c_void, 706 } 707 708 pub struct seminfo { 709 pub semmap: ::c_int, 710 pub semmni: ::c_int, 711 pub semmns: ::c_int, 712 pub semmnu: ::c_int, 713 pub semmsl: ::c_int, 714 pub semopm: ::c_int, 715 pub semume: ::c_int, 716 pub semusz: ::c_int, 717 pub semvmx: ::c_int, 718 pub semaem: ::c_int, 719 } 720 721 pub struct _IO_FILE { 722 _unused: [u8; 0], 723 } 724 725 pub struct sched_param { 726 pub sched_priority: ::c_int, 727 } 728 729 pub struct iovec { 730 pub iov_base: *mut ::c_void, 731 pub iov_len: size_t, 732 } 733 734 pub struct passwd { 735 pub pw_name: *mut ::c_char, 736 pub pw_passwd: *mut ::c_char, 737 pub pw_uid: __uid_t, 738 pub pw_gid: __gid_t, 739 pub pw_gecos: *mut ::c_char, 740 pub pw_dir: *mut ::c_char, 741 pub pw_shell: *mut ::c_char, 742 } 743 744 pub struct spwd { 745 pub sp_namp: *mut ::c_char, 746 pub sp_pwdp: *mut ::c_char, 747 pub sp_lstchg: ::c_long, 748 pub sp_min: ::c_long, 749 pub sp_max: ::c_long, 750 pub sp_warn: ::c_long, 751 pub sp_inact: ::c_long, 752 pub sp_expire: ::c_long, 753 pub sp_flag: ::c_ulong, 754 } 755 756 pub struct itimerspec { 757 pub it_interval: ::timespec, 758 pub it_value: ::timespec, 759 } 760 761 pub struct tm { 762 pub tm_sec: ::c_int, 763 pub tm_min: ::c_int, 764 pub tm_hour: ::c_int, 765 pub tm_mday: ::c_int, 766 pub tm_mon: ::c_int, 767 pub tm_year: ::c_int, 768 pub tm_wday: ::c_int, 769 pub tm_yday: ::c_int, 770 pub tm_isdst: ::c_int, 771 pub tm_gmtoff: ::c_long, 772 pub tm_zone: *const ::c_char, 773 } 774 775 pub struct lconv { 776 pub decimal_point: *mut ::c_char, 777 pub thousands_sep: *mut ::c_char, 778 pub grouping: *mut ::c_char, 779 pub int_curr_symbol: *mut ::c_char, 780 pub currency_symbol: *mut ::c_char, 781 pub mon_decimal_point: *mut ::c_char, 782 pub mon_thousands_sep: *mut ::c_char, 783 pub mon_grouping: *mut ::c_char, 784 pub positive_sign: *mut ::c_char, 785 pub negative_sign: *mut ::c_char, 786 pub int_frac_digits: ::c_char, 787 pub frac_digits: ::c_char, 788 pub p_cs_precedes: ::c_char, 789 pub p_sep_by_space: ::c_char, 790 pub n_cs_precedes: ::c_char, 791 pub n_sep_by_space: ::c_char, 792 pub p_sign_posn: ::c_char, 793 pub n_sign_posn: ::c_char, 794 pub int_p_cs_precedes: ::c_char, 795 pub int_p_sep_by_space: ::c_char, 796 pub int_n_cs_precedes: ::c_char, 797 pub int_n_sep_by_space: ::c_char, 798 pub int_p_sign_posn: ::c_char, 799 pub int_n_sign_posn: ::c_char, 800 } 801 802 pub struct Dl_info { 803 pub dli_fname: *const ::c_char, 804 pub dli_fbase: *mut ::c_void, 805 pub dli_sname: *const ::c_char, 806 pub dli_saddr: *mut ::c_void, 807 } 808 809 pub struct ifaddrs { 810 pub ifa_next: *mut ifaddrs, 811 pub ifa_name: *mut c_char, 812 pub ifa_flags: ::c_uint, 813 pub ifa_addr: *mut ::sockaddr, 814 pub ifa_netmask: *mut ::sockaddr, 815 pub ifa_ifu: *mut ::sockaddr, // FIXME This should be a union 816 pub ifa_data: *mut ::c_void 817 } 818 819 pub struct arpreq { 820 pub arp_pa: ::sockaddr, 821 pub arp_ha: ::sockaddr, 822 pub arp_flags: ::c_int, 823 pub arp_netmask: ::sockaddr, 824 pub arp_dev: [::c_char; 16], 825 } 826 827 pub struct arpreq_old { 828 pub arp_pa: ::sockaddr, 829 pub arp_ha: ::sockaddr, 830 pub arp_flags: ::c_int, 831 pub arp_netmask: ::sockaddr, 832 } 833 834 pub struct arphdr { 835 pub ar_hrd: u16, 836 pub ar_pro: u16, 837 pub ar_hln: u8, 838 pub ar_pln: u8, 839 pub ar_op: u16, 840 } 841 842 pub struct arpd_request { 843 pub req: ::c_ushort, 844 pub ip: u32, 845 pub dev: ::c_ulong, 846 pub stamp: ::c_ulong, 847 pub updated: ::c_ulong, 848 pub ha: [::c_uchar; ::MAX_ADDR_LEN], 849 } 850 851 pub struct mmsghdr { 852 pub msg_hdr: ::msghdr, 853 pub msg_len: ::c_uint, 854 } 855 856 pub struct ifreq { 857 /// interface name, e.g. "en0" 858 pub ifr_name: [::c_char; ::IFNAMSIZ], 859 pub ifr_ifru: ::sockaddr, 860 } 861 862 pub struct __locale_struct { 863 pub __locales: [*mut __locale_data; 13usize], 864 pub __ctype_b: *const ::c_ushort, 865 pub __ctype_tolower: *const ::c_int, 866 pub __ctype_toupper: *const ::c_int, 867 pub __names: [*const ::c_char; 13usize], 868 } 869 870 pub struct utsname { 871 pub sysname: [::c_char; 65], 872 pub nodename: [::c_char; 65], 873 pub release: [::c_char; 65], 874 pub version: [::c_char; 65], 875 pub machine: [::c_char; 65], 876 pub domainname: [::c_char; 65] 877 } 878 879 pub struct rlimit64 { 880 pub rlim_cur: rlim64_t, 881 pub rlim_max: rlim64_t, 882 } 883 884 pub struct stack_t { 885 pub ss_sp: * mut ::c_void, 886 pub ss_size: ::size_t, 887 pub ss_flags: ::c_int, 888 } 889 890 pub struct dl_phdr_info { 891 pub dlpi_addr: Elf_Addr, 892 pub dlpi_name: *const ::c_char, 893 pub dlpi_phdr: *const Elf_Phdr, 894 pub dlpi_phnum: Elf_Half, 895 pub dlpi_adds: ::c_ulonglong, 896 pub dlpi_subs: ::c_ulonglong, 897 pub dlpi_tls_modid: ::size_t, 898 pub dlpi_tls_data: *mut ::c_void, 899 } 900 901 pub struct flock { 902 #[cfg(target_pointer_width = "32")] 903 pub l_type : ::c_int, 904 #[cfg(target_pointer_width = "32")] 905 pub l_whence : ::c_int, 906 #[cfg(target_pointer_width = "64")] 907 pub l_type : ::c_short, 908 #[cfg(target_pointer_width = "64")] 909 pub l_whence : ::c_short, 910 pub l_start : __off_t, 911 pub l_len : __off_t, 912 pub l_pid : __pid_t, 913 } 914 915 pub struct flock64 { 916 #[cfg(target_pointer_width = "32")] 917 pub l_type : ::c_int, 918 #[cfg(target_pointer_width = "32")] 919 pub l_whence : ::c_int, 920 #[cfg(target_pointer_width = "64")] 921 pub l_type : ::c_short, 922 #[cfg(target_pointer_width = "64")] 923 pub l_whence : ::c_short, 924 pub l_start : __off_t, 925 pub l_len : __off64_t, 926 pub l_pid : __pid_t, 927 } 928 929 pub struct glob_t { 930 pub gl_pathc: ::size_t, 931 pub gl_pathv: *mut *mut c_char, 932 pub gl_offs: ::size_t, 933 pub gl_flags: ::c_int, 934 935 __unused1: *mut ::c_void, 936 __unused2: *mut ::c_void, 937 __unused3: *mut ::c_void, 938 __unused4: *mut ::c_void, 939 __unused5: *mut ::c_void, 940 } 941 942 pub struct glob64_t { 943 pub gl_pathc: ::size_t, 944 pub gl_pathv: *mut *mut ::c_char, 945 pub gl_offs: ::size_t, 946 pub gl_flags: ::c_int, 947 948 __unused1: *mut ::c_void, 949 __unused2: *mut ::c_void, 950 __unused3: *mut ::c_void, 951 __unused4: *mut ::c_void, 952 __unused5: *mut ::c_void, 953 } 954 955 pub struct regex_t { 956 __buffer: *mut ::c_void, 957 __allocated: ::size_t, 958 __used: ::size_t, 959 __syntax: ::c_ulong, 960 __fastmap: *mut ::c_char, 961 __translate: *mut ::c_char, 962 __re_nsub: ::size_t, 963 __bitfield: u8, 964 } 965 966 pub struct cpu_set_t { 967 #[cfg(all(target_pointer_width = "32", 968 not(target_arch = "x86_64")))] 969 bits: [u32; 32], 970 #[cfg(not(all(target_pointer_width = "32", 971 not(target_arch = "x86_64"))))] 972 bits: [u64; 16], 973 } 974 975 pub struct if_nameindex { 976 pub if_index: ::c_uint, 977 pub if_name: *mut ::c_char, 978 } 979 980 // System V IPC 981 pub struct msginfo { 982 pub msgpool: ::c_int, 983 pub msgmap: ::c_int, 984 pub msgmax: ::c_int, 985 pub msgmnb: ::c_int, 986 pub msgmni: ::c_int, 987 pub msgssz: ::c_int, 988 pub msgtql: ::c_int, 989 pub msgseg: ::c_ushort, 990 } 991 992 pub struct sembuf { 993 pub sem_num: ::c_ushort, 994 pub sem_op: ::c_short, 995 pub sem_flg: ::c_short, 996 } 997 998 pub struct mntent { 999 pub mnt_fsname: *mut ::c_char, 1000 pub mnt_dir: *mut ::c_char, 1001 pub mnt_type: *mut ::c_char, 1002 pub mnt_opts: *mut ::c_char, 1003 pub mnt_freq: ::c_int, 1004 pub mnt_passno: ::c_int, 1005 } 1006 1007 pub struct posix_spawn_file_actions_t { 1008 __allocated: ::c_int, 1009 __used: ::c_int, 1010 __actions: *mut ::c_int, 1011 __pad: [::c_int; 16], 1012 } 1013 1014 pub struct posix_spawnattr_t { 1015 __flags: ::c_short, 1016 __pgrp: ::pid_t, 1017 __sd: ::sigset_t, 1018 __ss: ::sigset_t, 1019 __sp: ::sched_param, 1020 __policy: ::c_int, 1021 __pad: [::c_int; 16], 1022 } 1023 1024 pub struct regmatch_t { 1025 pub rm_so: regoff_t, 1026 pub rm_eo: regoff_t, 1027 } 1028 1029 pub struct option { 1030 pub name: *const ::c_char, 1031 pub has_arg: ::c_int, 1032 pub flag: *mut ::c_int, 1033 pub val: ::c_int, 1034 } 1035 1036 } 1037 1038 s_no_extra_traits! { 1039 pub struct utmpx { 1040 pub ut_type: ::c_short, 1041 pub ut_pid: ::pid_t, 1042 pub ut_line: [::c_char; __UT_LINESIZE], 1043 pub ut_id: [::c_char; 4], 1044 1045 pub ut_user: [::c_char; __UT_NAMESIZE], 1046 pub ut_host: [::c_char; __UT_HOSTSIZE], 1047 pub ut_exit: __exit_status, 1048 1049 #[cfg(any( all(target_pointer_width = "32", 1050 not(target_arch = "x86_64"))))] 1051 pub ut_session: ::c_long, 1052 #[cfg(any(all(target_pointer_width = "32", 1053 not(target_arch = "x86_64"))))] 1054 pub ut_tv: ::timeval, 1055 1056 #[cfg(not(any(all(target_pointer_width = "32", 1057 not(target_arch = "x86_64")))))] 1058 pub ut_session: i32, 1059 #[cfg(not(any(all(target_pointer_width = "32", 1060 not(target_arch = "x86_64")))))] 1061 pub ut_tv: __timeval, 1062 1063 pub ut_addr_v6: [i32; 4], 1064 __glibc_reserved: [::c_char; 20], 1065 } 1066 } 1067 1068 cfg_if! { 1069 if #[cfg(feature = "extra_traits")] { 1070 impl PartialEq for utmpx { 1071 fn eq(&self, other: &utmpx) -> bool { 1072 self.ut_type == other.ut_type 1073 && self.ut_pid == other.ut_pid 1074 && self.ut_line == other.ut_line 1075 && self.ut_id == other.ut_id 1076 && self.ut_user == other.ut_user 1077 && self 1078 .ut_host 1079 .iter() 1080 .zip(other.ut_host.iter()) 1081 .all(|(a,b)| a == b) 1082 && self.ut_exit == other.ut_exit 1083 && self.ut_session == other.ut_session 1084 && self.ut_tv == other.ut_tv 1085 && self.ut_addr_v6 == other.ut_addr_v6 1086 && self.__glibc_reserved == other.__glibc_reserved 1087 } 1088 } 1089 1090 impl Eq for utmpx {} 1091 1092 impl ::fmt::Debug for utmpx { 1093 fn fmt(&self, f: &mut ::fmt::Formatter) -> ::fmt::Result { 1094 f.debug_struct("utmpx") 1095 .field("ut_type", &self.ut_type) 1096 .field("ut_pid", &self.ut_pid) 1097 .field("ut_line", &self.ut_line) 1098 .field("ut_id", &self.ut_id) 1099 .field("ut_user", &self.ut_user) 1100 // FIXME: .field("ut_host", &self.ut_host) 1101 .field("ut_exit", &self.ut_exit) 1102 .field("ut_session", &self.ut_session) 1103 .field("ut_tv", &self.ut_tv) 1104 .field("ut_addr_v6", &self.ut_addr_v6) 1105 .field("__glibc_reserved", &self.__glibc_reserved) 1106 .finish() 1107 } 1108 } 1109 1110 impl ::hash::Hash for utmpx { 1111 fn hash<H: ::hash::Hasher>(&self, state: &mut H) { 1112 self.ut_type.hash(state); 1113 self.ut_pid.hash(state); 1114 self.ut_line.hash(state); 1115 self.ut_id.hash(state); 1116 self.ut_user.hash(state); 1117 self.ut_host.hash(state); 1118 self.ut_exit.hash(state); 1119 self.ut_session.hash(state); 1120 self.ut_tv.hash(state); 1121 self.ut_addr_v6.hash(state); 1122 self.__glibc_reserved.hash(state); 1123 } 1124 } 1125 } 1126 } 1127 1128 impl siginfo_t { si_addr(&self) -> *mut ::c_void1129 pub unsafe fn si_addr(&self) -> *mut ::c_void { 1130 self.si_addr 1131 } 1132 si_value(&self) -> ::sigval1133 pub unsafe fn si_value(&self) -> ::sigval { 1134 self.si_value 1135 } 1136 si_pid(&self) -> ::pid_t1137 pub unsafe fn si_pid(&self) -> ::pid_t { 1138 self.si_pid 1139 } 1140 si_uid(&self) -> ::uid_t1141 pub unsafe fn si_uid(&self) -> ::uid_t { 1142 self.si_uid 1143 } 1144 si_status(&self) -> ::c_int1145 pub unsafe fn si_status(&self) -> ::c_int { 1146 self.si_status 1147 } 1148 } 1149 1150 // const 1151 1152 // aio.h 1153 pub const AIO_CANCELED: ::c_int = 0; 1154 pub const AIO_NOTCANCELED: ::c_int = 1; 1155 pub const AIO_ALLDONE: ::c_int = 2; 1156 pub const LIO_READ: ::c_int = 0; 1157 pub const LIO_WRITE: ::c_int = 1; 1158 pub const LIO_NOP: ::c_int = 2; 1159 pub const LIO_WAIT: ::c_int = 0; 1160 pub const LIO_NOWAIT: ::c_int = 1; 1161 1162 // glob.h 1163 pub const GLOB_ERR: ::c_int = 1 << 0; 1164 pub const GLOB_MARK: ::c_int = 1 << 1; 1165 pub const GLOB_NOSORT: ::c_int = 1 << 2; 1166 pub const GLOB_DOOFFS: ::c_int = 1 << 3; 1167 pub const GLOB_NOCHECK: ::c_int = 1 << 4; 1168 pub const GLOB_APPEND: ::c_int = 1 << 5; 1169 pub const GLOB_NOESCAPE: ::c_int = 1 << 6; 1170 1171 pub const GLOB_NOSPACE: ::c_int = 1; 1172 pub const GLOB_ABORTED: ::c_int = 2; 1173 pub const GLOB_NOMATCH: ::c_int = 3; 1174 1175 pub const GLOB_PERIOD: ::c_int = 1 << 7; 1176 pub const GLOB_ALTDIRFUNC: ::c_int = 1 << 9; 1177 pub const GLOB_BRACE: ::c_int = 1 << 10; 1178 pub const GLOB_NOMAGIC: ::c_int = 1 << 11; 1179 pub const GLOB_TILDE: ::c_int = 1 << 12; 1180 pub const GLOB_ONLYDIR: ::c_int = 1 << 13; 1181 pub const GLOB_TILDE_CHECK: ::c_int = 1 << 14; 1182 1183 // ipc.h 1184 pub const IPC_PRIVATE: ::key_t = 0; 1185 1186 pub const IPC_CREAT: ::c_int = 0o1000; 1187 pub const IPC_EXCL: ::c_int = 0o2000; 1188 pub const IPC_NOWAIT: ::c_int = 0o4000; 1189 1190 pub const IPC_RMID: ::c_int = 0; 1191 pub const IPC_SET: ::c_int = 1; 1192 pub const IPC_STAT: ::c_int = 2; 1193 pub const IPC_INFO: ::c_int = 3; 1194 pub const MSG_STAT: ::c_int = 11; 1195 pub const MSG_INFO: ::c_int = 12; 1196 1197 pub const MSG_NOERROR: ::c_int = 0o10000; 1198 pub const MSG_EXCEPT: ::c_int = 0o20000; 1199 1200 // shm.h 1201 pub const SHM_R: ::c_int = 0o400; 1202 pub const SHM_W: ::c_int = 0o200; 1203 1204 pub const SHM_RDONLY: ::c_int = 0o10000; 1205 pub const SHM_RND: ::c_int = 0o20000; 1206 pub const SHM_REMAP: ::c_int = 0o40000; 1207 1208 pub const SHM_LOCK: ::c_int = 11; 1209 pub const SHM_UNLOCK: ::c_int = 12; 1210 // unistd.h 1211 pub const STDIN_FILENO: ::c_int = 0; 1212 pub const STDOUT_FILENO: ::c_int = 1; 1213 pub const STDERR_FILENO: ::c_int = 2; 1214 pub const __FD_SETSIZE: usize = 256; 1215 pub const R_OK: ::c_int = 4; 1216 pub const W_OK: ::c_int = 2; 1217 pub const X_OK: ::c_int = 1; 1218 pub const F_OK: ::c_int = 0; 1219 pub const SEEK_SET: ::c_int = 0; 1220 pub const SEEK_CUR: ::c_int = 1; 1221 pub const SEEK_END: ::c_int = 2; 1222 pub const SEEK_DATA: ::c_int = 3; 1223 pub const SEEK_HOLE: ::c_int = 4; 1224 pub const L_SET: ::c_int = 0; 1225 pub const L_INCR: ::c_int = 1; 1226 pub const L_XTND: ::c_int = 2; 1227 pub const F_ULOCK: ::c_int = 0; 1228 pub const F_LOCK: ::c_int = 1; 1229 pub const F_TLOCK: ::c_int = 2; 1230 pub const F_TEST: ::c_int = 3; 1231 pub const CLOSE_RANGE_CLOEXEC: ::c_int = 4; 1232 1233 // stdio.h 1234 pub const EOF: ::c_int = -1; 1235 1236 // stdlib.h 1237 pub const WNOHANG: ::c_int = 1; 1238 pub const WUNTRACED: ::c_int = 2; 1239 pub const WSTOPPED: ::c_int = 2; 1240 pub const WCONTINUED: ::c_int = 4; 1241 pub const WNOWAIT: ::c_int = 8; 1242 pub const WEXITED: ::c_int = 16; 1243 pub const __W_CONTINUED: ::c_int = 65535; 1244 pub const __WCOREFLAG: ::c_int = 128; 1245 pub const RAND_MAX: ::c_int = 2147483647; 1246 pub const EXIT_FAILURE: ::c_int = 1; 1247 pub const EXIT_SUCCESS: ::c_int = 0; 1248 pub const __LITTLE_ENDIAN: usize = 1234; 1249 pub const __BIG_ENDIAN: usize = 4321; 1250 pub const __PDP_ENDIAN: usize = 3412; 1251 pub const __BYTE_ORDER: usize = 1234; 1252 pub const __FLOAT_WORD_ORDER: usize = 1234; 1253 pub const LITTLE_ENDIAN: usize = 1234; 1254 pub const BIG_ENDIAN: usize = 4321; 1255 pub const PDP_ENDIAN: usize = 3412; 1256 pub const BYTE_ORDER: usize = 1234; 1257 1258 // sys/select.h 1259 pub const FD_SETSIZE: usize = 256; 1260 pub const __SIZEOF_PTHREAD_MUTEX_T: usize = 32; 1261 pub const __SIZEOF_PTHREAD_ATTR_T: usize = 32; 1262 pub const __SIZEOF_PTHREAD_RWLOCK_T: usize = 28; 1263 pub const __SIZEOF_PTHREAD_BARRIER_T: usize = 24; 1264 pub const __SIZEOF_PTHREAD_MUTEXATTR_T: usize = 16; 1265 pub const __SIZEOF_PTHREAD_COND_T: usize = 20; 1266 pub const __SIZEOF_PTHREAD_CONDATTR_T: usize = 8; 1267 pub const __SIZEOF_PTHREAD_RWLOCKATTR_T: usize = 4; 1268 pub const __SIZEOF_PTHREAD_BARRIERATTR_T: usize = 4; 1269 pub const __SIZEOF_PTHREAD_ONCE_T: usize = 8; 1270 pub const __PTHREAD_SPIN_LOCK_INITIALIZER: ::c_int = 0; 1271 pub const PTHREAD_MUTEX_NORMAL: ::c_int = 0; 1272 1273 // sys/resource.h 1274 pub const RLIM_INFINITY: ::rlim_t = 2147483647; 1275 pub const RLIM64_INFINITY: ::rlim64_t = 9223372036854775807; 1276 pub const RLIM_SAVED_MAX: ::rlim_t = RLIM_INFINITY; 1277 pub const RLIM_SAVED_CUR: ::rlim_t = RLIM_INFINITY; 1278 pub const PRIO_MIN: ::c_int = -20; 1279 pub const PRIO_MAX: ::c_int = 20; 1280 1281 // pwd.h 1282 pub const NSS_BUFLEN_PASSWD: usize = 1024; 1283 1284 // sys/socket.h 1285 pub const SOCK_TYPE_MASK: usize = 15; 1286 pub const PF_UNSPEC: ::c_int = 0; 1287 pub const PF_LOCAL: ::c_int = 1; 1288 pub const PF_UNIX: ::c_int = 1; 1289 pub const PF_FILE: ::c_int = 1; 1290 pub const PF_INET: ::c_int = 2; 1291 pub const PF_IMPLINK: ::c_int = 3; 1292 pub const PF_PUP: ::c_int = 4; 1293 pub const PF_CHAOS: ::c_int = 5; 1294 pub const PF_NS: ::c_int = 6; 1295 pub const PF_ISO: ::c_int = 7; 1296 pub const PF_OSI: ::c_int = 7; 1297 pub const PF_ECMA: ::c_int = 8; 1298 pub const PF_DATAKIT: ::c_int = 9; 1299 pub const PF_CCITT: ::c_int = 10; 1300 pub const PF_SNA: ::c_int = 11; 1301 pub const PF_DECnet: ::c_int = 12; 1302 pub const PF_DLI: ::c_int = 13; 1303 pub const PF_LAT: ::c_int = 14; 1304 pub const PF_HYLINK: ::c_int = 15; 1305 pub const PF_APPLETALK: ::c_int = 16; 1306 pub const PF_ROUTE: ::c_int = 17; 1307 pub const PF_XTP: ::c_int = 19; 1308 pub const PF_COIP: ::c_int = 20; 1309 pub const PF_CNT: ::c_int = 21; 1310 pub const PF_RTIP: ::c_int = 22; 1311 pub const PF_IPX: ::c_int = 23; 1312 pub const PF_SIP: ::c_int = 24; 1313 pub const PF_PIP: ::c_int = 25; 1314 pub const PF_INET6: ::c_int = 26; 1315 pub const PF_MAX: ::c_int = 27; 1316 pub const AF_UNSPEC: ::c_int = 0; 1317 pub const AF_LOCAL: ::c_int = 1; 1318 pub const AF_UNIX: ::c_int = 1; 1319 pub const AF_FILE: ::c_int = 1; 1320 pub const AF_INET: ::c_int = 2; 1321 pub const AF_IMPLINK: ::c_int = 3; 1322 pub const AF_PUP: ::c_int = 4; 1323 pub const AF_CHAOS: ::c_int = 5; 1324 pub const AF_NS: ::c_int = 6; 1325 pub const AF_ISO: ::c_int = 7; 1326 pub const AF_OSI: ::c_int = 7; 1327 pub const AF_ECMA: ::c_int = 8; 1328 pub const AF_DATAKIT: ::c_int = 9; 1329 pub const AF_CCITT: ::c_int = 10; 1330 pub const AF_SNA: ::c_int = 11; 1331 pub const AF_DECnet: ::c_int = 12; 1332 pub const AF_DLI: ::c_int = 13; 1333 pub const AF_LAT: ::c_int = 14; 1334 pub const AF_HYLINK: ::c_int = 15; 1335 pub const AF_APPLETALK: ::c_int = 16; 1336 pub const AF_ROUTE: ::c_int = 17; 1337 pub const pseudo_AF_XTP: ::c_int = 19; 1338 pub const AF_COIP: ::c_int = 20; 1339 pub const AF_CNT: ::c_int = 21; 1340 pub const pseudo_AF_RTIP: ::c_int = 22; 1341 pub const AF_IPX: ::c_int = 23; 1342 pub const AF_SIP: ::c_int = 24; 1343 pub const pseudo_AF_PIP: ::c_int = 25; 1344 pub const AF_INET6: ::c_int = 26; 1345 pub const AF_MAX: ::c_int = 27; 1346 pub const SOMAXCONN: ::c_int = 4096; 1347 pub const _SS_SIZE: usize = 128; 1348 pub const CMGROUP_MAX: usize = 16; 1349 pub const SOL_SOCKET: ::c_int = 65535; 1350 1351 // sys/time.h 1352 pub const ITIMER_REAL: ::c_int = 0; 1353 pub const ITIMER_VIRTUAL: ::c_int = 1; 1354 pub const ITIMER_PROF: ::c_int = 2; 1355 1356 // netinet/in.h 1357 pub const SOL_IP: ::c_int = 0; 1358 pub const SOL_TCP: ::c_int = 6; 1359 pub const SOL_UDP: ::c_int = 17; 1360 pub const SOL_IPV6: ::c_int = 41; 1361 pub const SOL_ICMPV6: ::c_int = 58; 1362 pub const IP_OPTIONS: ::c_int = 1; 1363 pub const IP_HDRINCL: ::c_int = 2; 1364 pub const IP_TOS: ::c_int = 3; 1365 pub const IP_TTL: ::c_int = 4; 1366 pub const IP_RECVOPTS: ::c_int = 5; 1367 pub const IP_RECVRETOPTS: ::c_int = 6; 1368 pub const IP_RECVDSTADDR: ::c_int = 7; 1369 pub const IP_RETOPTS: ::c_int = 8; 1370 pub const IP_MULTICAST_IF: ::c_int = 9; 1371 pub const IP_MULTICAST_TTL: ::c_int = 10; 1372 pub const IP_MULTICAST_LOOP: ::c_int = 11; 1373 pub const IP_ADD_MEMBERSHIP: ::c_int = 12; 1374 pub const IP_DROP_MEMBERSHIP: ::c_int = 13; 1375 pub const IPV6_ADDRFORM: ::c_int = 1; 1376 pub const IPV6_2292PKTINFO: ::c_int = 2; 1377 pub const IPV6_2292HOPOPTS: ::c_int = 3; 1378 pub const IPV6_2292DSTOPTS: ::c_int = 4; 1379 pub const IPV6_2292RTHDR: ::c_int = 5; 1380 pub const IPV6_2292PKTOPTIONS: ::c_int = 6; 1381 pub const IPV6_CHECKSUM: ::c_int = 7; 1382 pub const IPV6_2292HOPLIMIT: ::c_int = 8; 1383 pub const IPV6_RXINFO: ::c_int = 2; 1384 pub const IPV6_TXINFO: ::c_int = 2; 1385 pub const SCM_SRCINFO: ::c_int = 2; 1386 pub const IPV6_UNICAST_HOPS: ::c_int = 16; 1387 pub const IPV6_MULTICAST_IF: ::c_int = 17; 1388 pub const IPV6_MULTICAST_HOPS: ::c_int = 18; 1389 pub const IPV6_MULTICAST_LOOP: ::c_int = 19; 1390 pub const IPV6_JOIN_GROUP: ::c_int = 20; 1391 pub const IPV6_LEAVE_GROUP: ::c_int = 21; 1392 pub const IPV6_ROUTER_ALERT: ::c_int = 22; 1393 pub const IPV6_MTU_DISCOVER: ::c_int = 23; 1394 pub const IPV6_MTU: ::c_int = 24; 1395 pub const IPV6_RECVERR: ::c_int = 25; 1396 pub const IPV6_V6ONLY: ::c_int = 26; 1397 pub const IPV6_JOIN_ANYCAST: ::c_int = 27; 1398 pub const IPV6_LEAVE_ANYCAST: ::c_int = 28; 1399 pub const IPV6_RECVPKTINFO: ::c_int = 49; 1400 pub const IPV6_PKTINFO: ::c_int = 50; 1401 pub const IPV6_RECVHOPLIMIT: ::c_int = 51; 1402 pub const IPV6_HOPLIMIT: ::c_int = 52; 1403 pub const IPV6_RECVHOPOPTS: ::c_int = 53; 1404 pub const IPV6_HOPOPTS: ::c_int = 54; 1405 pub const IPV6_RTHDRDSTOPTS: ::c_int = 55; 1406 pub const IPV6_RECVRTHDR: ::c_int = 56; 1407 pub const IPV6_RTHDR: ::c_int = 57; 1408 pub const IPV6_RECVDSTOPTS: ::c_int = 58; 1409 pub const IPV6_DSTOPTS: ::c_int = 59; 1410 pub const IPV6_RECVPATHMTU: ::c_int = 60; 1411 pub const IPV6_PATHMTU: ::c_int = 61; 1412 pub const IPV6_DONTFRAG: ::c_int = 62; 1413 pub const IPV6_RECVTCLASS: ::c_int = 66; 1414 pub const IPV6_TCLASS: ::c_int = 67; 1415 pub const IPV6_ADDR_PREFERENCES: ::c_int = 72; 1416 pub const IPV6_MINHOPCOUNT: ::c_int = 73; 1417 pub const IPV6_ADD_MEMBERSHIP: ::c_int = 20; 1418 pub const IPV6_DROP_MEMBERSHIP: ::c_int = 21; 1419 pub const IPV6_RXHOPOPTS: ::c_int = 3; 1420 pub const IPV6_RXDSTOPTS: ::c_int = 4; 1421 pub const IPV6_RTHDR_LOOSE: ::c_int = 0; 1422 pub const IPV6_RTHDR_STRICT: ::c_int = 1; 1423 pub const IPV6_RTHDR_TYPE_0: ::c_int = 0; 1424 pub const IN_CLASSA_NET: u32 = 4278190080; 1425 pub const IN_CLASSA_NSHIFT: usize = 24; 1426 pub const IN_CLASSA_HOST: u32 = 16777215; 1427 pub const IN_CLASSA_MAX: u32 = 128; 1428 pub const IN_CLASSB_NET: u32 = 4294901760; 1429 pub const IN_CLASSB_NSHIFT: usize = 16; 1430 pub const IN_CLASSB_HOST: u32 = 65535; 1431 pub const IN_CLASSB_MAX: u32 = 65536; 1432 pub const IN_CLASSC_NET: u32 = 4294967040; 1433 pub const IN_CLASSC_NSHIFT: usize = 8; 1434 pub const IN_CLASSC_HOST: u32 = 255; 1435 pub const IN_LOOPBACKNET: u32 = 127; 1436 pub const INET_ADDRSTRLEN: usize = 16; 1437 pub const INET6_ADDRSTRLEN: usize = 46; 1438 1439 // netinet/ip.h 1440 pub const IPTOS_TOS_MASK: u8 = 0x1E; 1441 pub const IPTOS_PREC_MASK: u8 = 0xE0; 1442 1443 pub const IPTOS_ECN_NOT_ECT: u8 = 0x00; 1444 1445 pub const IPTOS_LOWDELAY: u8 = 0x10; 1446 pub const IPTOS_THROUGHPUT: u8 = 0x08; 1447 pub const IPTOS_RELIABILITY: u8 = 0x04; 1448 pub const IPTOS_MINCOST: u8 = 0x02; 1449 1450 pub const IPTOS_PREC_NETCONTROL: u8 = 0xe0; 1451 pub const IPTOS_PREC_INTERNETCONTROL: u8 = 0xc0; 1452 pub const IPTOS_PREC_CRITIC_ECP: u8 = 0xa0; 1453 pub const IPTOS_PREC_FLASHOVERRIDE: u8 = 0x80; 1454 pub const IPTOS_PREC_FLASH: u8 = 0x60; 1455 pub const IPTOS_PREC_IMMEDIATE: u8 = 0x40; 1456 pub const IPTOS_PREC_PRIORITY: u8 = 0x20; 1457 pub const IPTOS_PREC_ROUTINE: u8 = 0x00; 1458 1459 pub const IPTOS_ECN_MASK: u8 = 0x03; 1460 pub const IPTOS_ECN_ECT1: u8 = 0x01; 1461 pub const IPTOS_ECN_ECT0: u8 = 0x02; 1462 pub const IPTOS_ECN_CE: u8 = 0x03; 1463 1464 pub const IPOPT_COPY: u8 = 0x80; 1465 pub const IPOPT_CLASS_MASK: u8 = 0x60; 1466 pub const IPOPT_NUMBER_MASK: u8 = 0x1f; 1467 1468 pub const IPOPT_CONTROL: u8 = 0x00; 1469 pub const IPOPT_RESERVED1: u8 = 0x20; 1470 pub const IPOPT_MEASUREMENT: u8 = 0x40; 1471 pub const IPOPT_RESERVED2: u8 = 0x60; 1472 pub const IPOPT_END: u8 = 0 | IPOPT_CONTROL; 1473 pub const IPOPT_NOOP: u8 = 1 | IPOPT_CONTROL; 1474 pub const IPOPT_SEC: u8 = 2 | IPOPT_CONTROL | IPOPT_COPY; 1475 pub const IPOPT_LSRR: u8 = 3 | IPOPT_CONTROL | IPOPT_COPY; 1476 pub const IPOPT_TIMESTAMP: u8 = 4 | IPOPT_MEASUREMENT; 1477 pub const IPOPT_RR: u8 = 7 | IPOPT_CONTROL; 1478 pub const IPOPT_SID: u8 = 8 | IPOPT_CONTROL | IPOPT_COPY; 1479 pub const IPOPT_SSRR: u8 = 9 | IPOPT_CONTROL | IPOPT_COPY; 1480 pub const IPOPT_RA: u8 = 20 | IPOPT_CONTROL | IPOPT_COPY; 1481 pub const IPVERSION: u8 = 4; 1482 pub const MAXTTL: u8 = 255; 1483 pub const IPDEFTTL: u8 = 64; 1484 pub const IPOPT_OPTVAL: u8 = 0; 1485 pub const IPOPT_OLEN: u8 = 1; 1486 pub const IPOPT_OFFSET: u8 = 2; 1487 pub const IPOPT_MINOFF: u8 = 4; 1488 pub const MAX_IPOPTLEN: u8 = 40; 1489 pub const IPOPT_NOP: u8 = IPOPT_NOOP; 1490 pub const IPOPT_EOL: u8 = IPOPT_END; 1491 pub const IPOPT_TS: u8 = IPOPT_TIMESTAMP; 1492 pub const IPOPT_TS_TSONLY: u8 = 0; 1493 pub const IPOPT_TS_TSANDADDR: u8 = 1; 1494 pub const IPOPT_TS_PRESPEC: u8 = 3; 1495 1496 // net/if_arp.h 1497 pub const ARPOP_REQUEST: u16 = 1; 1498 pub const ARPOP_REPLY: u16 = 2; 1499 pub const ARPOP_RREQUEST: u16 = 3; 1500 pub const ARPOP_RREPLY: u16 = 4; 1501 pub const ARPOP_InREQUEST: u16 = 8; 1502 pub const ARPOP_InREPLY: u16 = 9; 1503 pub const ARPOP_NAK: u16 = 10; 1504 1505 pub const MAX_ADDR_LEN: usize = 7; 1506 pub const ARPD_UPDATE: ::c_ushort = 0x01; 1507 pub const ARPD_LOOKUP: ::c_ushort = 0x02; 1508 pub const ARPD_FLUSH: ::c_ushort = 0x03; 1509 pub const ATF_MAGIC: ::c_int = 0x80; 1510 1511 pub const ATF_NETMASK: ::c_int = 0x20; 1512 pub const ATF_DONTPUB: ::c_int = 0x40; 1513 1514 pub const ARPHRD_NETROM: u16 = 0; 1515 pub const ARPHRD_ETHER: u16 = 1; 1516 pub const ARPHRD_EETHER: u16 = 2; 1517 pub const ARPHRD_AX25: u16 = 3; 1518 pub const ARPHRD_PRONET: u16 = 4; 1519 pub const ARPHRD_CHAOS: u16 = 5; 1520 pub const ARPHRD_IEEE802: u16 = 6; 1521 pub const ARPHRD_ARCNET: u16 = 7; 1522 pub const ARPHRD_APPLETLK: u16 = 8; 1523 pub const ARPHRD_DLCI: u16 = 15; 1524 pub const ARPHRD_ATM: u16 = 19; 1525 pub const ARPHRD_METRICOM: u16 = 23; 1526 pub const ARPHRD_IEEE1394: u16 = 24; 1527 pub const ARPHRD_EUI64: u16 = 27; 1528 pub const ARPHRD_INFINIBAND: u16 = 32; 1529 1530 pub const ARPHRD_SLIP: u16 = 256; 1531 pub const ARPHRD_CSLIP: u16 = 257; 1532 pub const ARPHRD_SLIP6: u16 = 258; 1533 pub const ARPHRD_CSLIP6: u16 = 259; 1534 pub const ARPHRD_RSRVD: u16 = 260; 1535 pub const ARPHRD_ADAPT: u16 = 264; 1536 pub const ARPHRD_ROSE: u16 = 270; 1537 pub const ARPHRD_X25: u16 = 271; 1538 pub const ARPHRD_HWX25: u16 = 272; 1539 pub const ARPHRD_CAN: u16 = 280; 1540 pub const ARPHRD_PPP: u16 = 512; 1541 pub const ARPHRD_CISCO: u16 = 513; 1542 pub const ARPHRD_HDLC: u16 = ARPHRD_CISCO; 1543 pub const ARPHRD_LAPB: u16 = 516; 1544 pub const ARPHRD_DDCMP: u16 = 517; 1545 pub const ARPHRD_RAWHDLC: u16 = 518; 1546 1547 pub const ARPHRD_TUNNEL: u16 = 768; 1548 pub const ARPHRD_TUNNEL6: u16 = 769; 1549 pub const ARPHRD_FRAD: u16 = 770; 1550 pub const ARPHRD_SKIP: u16 = 771; 1551 pub const ARPHRD_LOOPBACK: u16 = 772; 1552 pub const ARPHRD_LOCALTLK: u16 = 773; 1553 pub const ARPHRD_FDDI: u16 = 774; 1554 pub const ARPHRD_BIF: u16 = 775; 1555 pub const ARPHRD_SIT: u16 = 776; 1556 pub const ARPHRD_IPDDP: u16 = 777; 1557 pub const ARPHRD_IPGRE: u16 = 778; 1558 pub const ARPHRD_PIMREG: u16 = 779; 1559 pub const ARPHRD_HIPPI: u16 = 780; 1560 pub const ARPHRD_ASH: u16 = 781; 1561 pub const ARPHRD_ECONET: u16 = 782; 1562 pub const ARPHRD_IRDA: u16 = 783; 1563 pub const ARPHRD_FCPP: u16 = 784; 1564 pub const ARPHRD_FCAL: u16 = 785; 1565 pub const ARPHRD_FCPL: u16 = 786; 1566 pub const ARPHRD_FCFABRIC: u16 = 787; 1567 pub const ARPHRD_IEEE802_TR: u16 = 800; 1568 pub const ARPHRD_IEEE80211: u16 = 801; 1569 pub const ARPHRD_IEEE80211_PRISM: u16 = 802; 1570 pub const ARPHRD_IEEE80211_RADIOTAP: u16 = 803; 1571 pub const ARPHRD_IEEE802154: u16 = 804; 1572 1573 pub const ARPHRD_VOID: u16 = 0xFFFF; 1574 pub const ARPHRD_NONE: u16 = 0xFFFE; 1575 1576 // bits/posix1_lim.h 1577 pub const _POSIX_AIO_LISTIO_MAX: usize = 2; 1578 pub const _POSIX_AIO_MAX: usize = 1; 1579 pub const _POSIX_ARG_MAX: usize = 4096; 1580 pub const _POSIX_CHILD_MAX: usize = 25; 1581 pub const _POSIX_DELAYTIMER_MAX: usize = 32; 1582 pub const _POSIX_HOST_NAME_MAX: usize = 255; 1583 pub const _POSIX_LINK_MAX: usize = 8; 1584 pub const _POSIX_LOGIN_NAME_MAX: usize = 9; 1585 pub const _POSIX_MAX_CANON: usize = 255; 1586 pub const _POSIX_MAX_INPUT: usize = 255; 1587 pub const _POSIX_MQ_OPEN_MAX: usize = 8; 1588 pub const _POSIX_MQ_PRIO_MAX: usize = 32; 1589 pub const _POSIX_NAME_MAX: usize = 14; 1590 pub const _POSIX_NGROUPS_MAX: usize = 8; 1591 pub const _POSIX_OPEN_MAX: usize = 20; 1592 pub const _POSIX_FD_SETSIZE: usize = 20; 1593 pub const _POSIX_PATH_MAX: usize = 256; 1594 pub const _POSIX_PIPE_BUF: usize = 512; 1595 pub const _POSIX_RE_DUP_MAX: usize = 255; 1596 pub const _POSIX_RTSIG_MAX: usize = 8; 1597 pub const _POSIX_SEM_NSEMS_MAX: usize = 256; 1598 pub const _POSIX_SEM_VALUE_MAX: usize = 32767; 1599 pub const _POSIX_SIGQUEUE_MAX: usize = 32; 1600 pub const _POSIX_SSIZE_MAX: usize = 32767; 1601 pub const _POSIX_STREAM_MAX: usize = 8; 1602 pub const _POSIX_SYMLINK_MAX: usize = 255; 1603 pub const _POSIX_SYMLOOP_MAX: usize = 8; 1604 pub const _POSIX_TIMER_MAX: usize = 32; 1605 pub const _POSIX_TTY_NAME_MAX: usize = 9; 1606 pub const _POSIX_TZNAME_MAX: usize = 6; 1607 pub const _POSIX_QLIMIT: usize = 1; 1608 pub const _POSIX_HIWAT: usize = 512; 1609 pub const _POSIX_UIO_MAXIOV: usize = 16; 1610 pub const _POSIX_CLOCKRES_MIN: usize = 20000000; 1611 pub const NAME_MAX: usize = 255; 1612 pub const NGROUPS_MAX: usize = 256; 1613 pub const _POSIX_THREAD_KEYS_MAX: usize = 128; 1614 pub const _POSIX_THREAD_DESTRUCTOR_ITERATIONS: usize = 4; 1615 pub const _POSIX_THREAD_THREADS_MAX: usize = 64; 1616 pub const SEM_VALUE_MAX: ::c_int = 2147483647; 1617 pub const MAXNAMLEN: usize = 255; 1618 1619 // netdb.h 1620 pub const _PATH_HEQUIV: &'static [u8; 17usize] = b"/etc/hosts.equiv\0"; 1621 pub const _PATH_HOSTS: &'static [u8; 11usize] = b"/etc/hosts\0"; 1622 pub const _PATH_NETWORKS: &'static [u8; 14usize] = b"/etc/networks\0"; 1623 pub const _PATH_NSSWITCH_CONF: &'static [u8; 19usize] = b"/etc/nsswitch.conf\0"; 1624 pub const _PATH_PROTOCOLS: &'static [u8; 15usize] = b"/etc/protocols\0"; 1625 pub const _PATH_SERVICES: &'static [u8; 14usize] = b"/etc/services\0"; 1626 pub const HOST_NOT_FOUND: ::c_int = 1; 1627 pub const TRY_AGAIN: ::c_int = 2; 1628 pub const NO_RECOVERY: ::c_int = 3; 1629 pub const NO_DATA: ::c_int = 4; 1630 pub const NETDB_INTERNAL: ::c_int = -1; 1631 pub const NETDB_SUCCESS: ::c_int = 0; 1632 pub const NO_ADDRESS: ::c_int = 4; 1633 pub const IPPORT_RESERVED: ::c_int = 1024; 1634 pub const SCOPE_DELIMITER: u8 = 37u8; 1635 pub const GAI_WAIT: ::c_int = 0; 1636 pub const GAI_NOWAIT: ::c_int = 1; 1637 pub const AI_PASSIVE: ::c_int = 1; 1638 pub const AI_CANONNAME: ::c_int = 2; 1639 pub const AI_NUMERICHOST: ::c_int = 4; 1640 pub const AI_V4MAPPED: ::c_int = 8; 1641 pub const AI_ALL: ::c_int = 16; 1642 pub const AI_ADDRCONFIG: ::c_int = 32; 1643 pub const AI_IDN: ::c_int = 64; 1644 pub const AI_CANONIDN: ::c_int = 128; 1645 pub const AI_NUMERICSERV: ::c_int = 1024; 1646 pub const EAI_BADFLAGS: ::c_int = -1; 1647 pub const EAI_NONAME: ::c_int = -2; 1648 pub const EAI_AGAIN: ::c_int = -3; 1649 pub const EAI_FAIL: ::c_int = -4; 1650 pub const EAI_FAMILY: ::c_int = -6; 1651 pub const EAI_SOCKTYPE: ::c_int = -7; 1652 pub const EAI_SERVICE: ::c_int = -8; 1653 pub const EAI_MEMORY: ::c_int = -10; 1654 pub const EAI_SYSTEM: ::c_int = -11; 1655 pub const EAI_OVERFLOW: ::c_int = -12; 1656 pub const EAI_NODATA: ::c_int = -5; 1657 pub const EAI_ADDRFAMILY: ::c_int = -9; 1658 pub const EAI_INPROGRESS: ::c_int = -100; 1659 pub const EAI_CANCELED: ::c_int = -101; 1660 pub const EAI_NOTCANCELED: ::c_int = -102; 1661 pub const EAI_ALLDONE: ::c_int = -103; 1662 pub const EAI_INTR: ::c_int = -104; 1663 pub const EAI_IDN_ENCODE: ::c_int = -105; 1664 pub const NI_MAXHOST: usize = 1025; 1665 pub const NI_MAXSERV: usize = 32; 1666 pub const NI_NUMERICHOST: ::c_int = 1; 1667 pub const NI_NUMERICSERV: ::c_int = 2; 1668 pub const NI_NOFQDN: ::c_int = 4; 1669 pub const NI_NAMEREQD: ::c_int = 8; 1670 pub const NI_DGRAM: ::c_int = 16; 1671 pub const NI_IDN: ::c_int = 32; 1672 1673 // time.h 1674 pub const CLOCK_REALTIME: ::clockid_t = 0; 1675 pub const CLOCK_MONOTONIC: ::clockid_t = 1; 1676 pub const CLOCK_PROCESS_CPUTIME_ID: ::clockid_t = 2; 1677 pub const CLOCK_THREAD_CPUTIME_ID: ::clockid_t = 3; 1678 pub const CLOCK_MONOTONIC_RAW: ::clockid_t = 4; 1679 pub const CLOCK_REALTIME_COARSE: ::clockid_t = 5; 1680 pub const CLOCK_MONOTONIC_COARSE: ::clockid_t = 6; 1681 pub const TIMER_ABSTIME: ::c_int = 1; 1682 pub const TIME_UTC: ::c_int = 1; 1683 1684 // sys/poll.h 1685 pub const POLLIN: i16 = 1; 1686 pub const POLLPRI: i16 = 2; 1687 pub const POLLOUT: i16 = 4; 1688 pub const POLLRDNORM: i16 = 1; 1689 pub const POLLRDBAND: i16 = 2; 1690 pub const POLLWRNORM: i16 = 4; 1691 pub const POLLWRBAND: i16 = 4; 1692 pub const POLLERR: i16 = 8; 1693 pub const POLLHUP: i16 = 16; 1694 pub const POLLNVAL: i16 = 32; 1695 1696 // locale.h 1697 pub const __LC_CTYPE: usize = 0; 1698 pub const __LC_NUMERIC: usize = 1; 1699 pub const __LC_TIME: usize = 2; 1700 pub const __LC_COLLATE: usize = 3; 1701 pub const __LC_MONETARY: usize = 4; 1702 pub const __LC_MESSAGES: usize = 5; 1703 pub const __LC_ALL: usize = 6; 1704 pub const __LC_PAPER: usize = 7; 1705 pub const __LC_NAME: usize = 8; 1706 pub const __LC_ADDRESS: usize = 9; 1707 pub const __LC_TELEPHONE: usize = 10; 1708 pub const __LC_MEASUREMENT: usize = 11; 1709 pub const __LC_IDENTIFICATION: usize = 12; 1710 pub const LC_CTYPE: ::c_int = 0; 1711 pub const LC_NUMERIC: ::c_int = 1; 1712 pub const LC_TIME: ::c_int = 2; 1713 pub const LC_COLLATE: ::c_int = 3; 1714 pub const LC_MONETARY: ::c_int = 4; 1715 pub const LC_MESSAGES: ::c_int = 5; 1716 pub const LC_ALL: ::c_int = 6; 1717 pub const LC_PAPER: ::c_int = 7; 1718 pub const LC_NAME: ::c_int = 8; 1719 pub const LC_ADDRESS: ::c_int = 9; 1720 pub const LC_TELEPHONE: ::c_int = 10; 1721 pub const LC_MEASUREMENT: ::c_int = 11; 1722 pub const LC_IDENTIFICATION: ::c_int = 12; 1723 pub const LC_CTYPE_MASK: ::c_int = 1; 1724 pub const LC_NUMERIC_MASK: ::c_int = 2; 1725 pub const LC_TIME_MASK: ::c_int = 4; 1726 pub const LC_COLLATE_MASK: ::c_int = 8; 1727 pub const LC_MONETARY_MASK: ::c_int = 16; 1728 pub const LC_MESSAGES_MASK: ::c_int = 32; 1729 pub const LC_PAPER_MASK: ::c_int = 128; 1730 pub const LC_NAME_MASK: ::c_int = 256; 1731 pub const LC_ADDRESS_MASK: ::c_int = 512; 1732 pub const LC_TELEPHONE_MASK: ::c_int = 1024; 1733 pub const LC_MEASUREMENT_MASK: ::c_int = 2048; 1734 pub const LC_IDENTIFICATION_MASK: ::c_int = 4096; 1735 pub const LC_ALL_MASK: ::c_int = 8127; 1736 1737 pub const ABDAY_1: ::nl_item = 0x20000; 1738 pub const ABDAY_2: ::nl_item = 0x20001; 1739 pub const ABDAY_3: ::nl_item = 0x20002; 1740 pub const ABDAY_4: ::nl_item = 0x20003; 1741 pub const ABDAY_5: ::nl_item = 0x20004; 1742 pub const ABDAY_6: ::nl_item = 0x20005; 1743 pub const ABDAY_7: ::nl_item = 0x20006; 1744 1745 pub const DAY_1: ::nl_item = 0x20007; 1746 pub const DAY_2: ::nl_item = 0x20008; 1747 pub const DAY_3: ::nl_item = 0x20009; 1748 pub const DAY_4: ::nl_item = 0x2000A; 1749 pub const DAY_5: ::nl_item = 0x2000B; 1750 pub const DAY_6: ::nl_item = 0x2000C; 1751 pub const DAY_7: ::nl_item = 0x2000D; 1752 1753 pub const ABMON_1: ::nl_item = 0x2000E; 1754 pub const ABMON_2: ::nl_item = 0x2000F; 1755 pub const ABMON_3: ::nl_item = 0x20010; 1756 pub const ABMON_4: ::nl_item = 0x20011; 1757 pub const ABMON_5: ::nl_item = 0x20012; 1758 pub const ABMON_6: ::nl_item = 0x20013; 1759 pub const ABMON_7: ::nl_item = 0x20014; 1760 pub const ABMON_8: ::nl_item = 0x20015; 1761 pub const ABMON_9: ::nl_item = 0x20016; 1762 pub const ABMON_10: ::nl_item = 0x20017; 1763 pub const ABMON_11: ::nl_item = 0x20018; 1764 pub const ABMON_12: ::nl_item = 0x20019; 1765 1766 pub const MON_1: ::nl_item = 0x2001A; 1767 pub const MON_2: ::nl_item = 0x2001B; 1768 pub const MON_3: ::nl_item = 0x2001C; 1769 pub const MON_4: ::nl_item = 0x2001D; 1770 pub const MON_5: ::nl_item = 0x2001E; 1771 pub const MON_6: ::nl_item = 0x2001F; 1772 pub const MON_7: ::nl_item = 0x20020; 1773 pub const MON_8: ::nl_item = 0x20021; 1774 pub const MON_9: ::nl_item = 0x20022; 1775 pub const MON_10: ::nl_item = 0x20023; 1776 pub const MON_11: ::nl_item = 0x20024; 1777 pub const MON_12: ::nl_item = 0x20025; 1778 1779 pub const AM_STR: ::nl_item = 0x20026; 1780 pub const PM_STR: ::nl_item = 0x20027; 1781 1782 pub const D_T_FMT: ::nl_item = 0x20028; 1783 pub const D_FMT: ::nl_item = 0x20029; 1784 pub const T_FMT: ::nl_item = 0x2002A; 1785 pub const T_FMT_AMPM: ::nl_item = 0x2002B; 1786 1787 pub const ERA: ::nl_item = 0x2002C; 1788 pub const ERA_D_FMT: ::nl_item = 0x2002E; 1789 pub const ALT_DIGITS: ::nl_item = 0x2002F; 1790 pub const ERA_D_T_FMT: ::nl_item = 0x20030; 1791 pub const ERA_T_FMT: ::nl_item = 0x20031; 1792 1793 pub const CODESET: ::nl_item = 14; 1794 pub const CRNCYSTR: ::nl_item = 0x4000F; 1795 pub const RADIXCHAR: ::nl_item = 0x10000; 1796 pub const THOUSEP: ::nl_item = 0x10001; 1797 pub const YESEXPR: ::nl_item = 0x50000; 1798 pub const NOEXPR: ::nl_item = 0x50001; 1799 pub const YESSTR: ::nl_item = 0x50002; 1800 pub const NOSTR: ::nl_item = 0x50003; 1801 1802 // reboot.h 1803 pub const RB_AUTOBOOT: ::c_int = 0x0; 1804 pub const RB_ASKNAME: ::c_int = 0x1; 1805 pub const RB_SINGLE: ::c_int = 0x2; 1806 pub const RB_KBD: ::c_int = 0x4; 1807 pub const RB_HALT: ::c_int = 0x8; 1808 pub const RB_INITNAME: ::c_int = 0x10; 1809 pub const RB_DFLTROOT: ::c_int = 0x20; 1810 pub const RB_NOBOOTRC: ::c_int = 0x20; 1811 pub const RB_ALTBOOT: ::c_int = 0x40; 1812 pub const RB_UNIPROC: ::c_int = 0x80; 1813 pub const RB_DEBUGGER: ::c_int = 0x1000; 1814 1815 // semaphore.h 1816 pub const __SIZEOF_SEM_T: usize = 20; 1817 pub const SEM_FAILED: *mut ::sem_t = 0 as *mut sem_t; 1818 1819 // termios.h 1820 pub const IGNBRK: ::tcflag_t = 1; 1821 pub const BRKINT: ::tcflag_t = 2; 1822 pub const IGNPAR: ::tcflag_t = 4; 1823 pub const PARMRK: ::tcflag_t = 8; 1824 pub const INPCK: ::tcflag_t = 16; 1825 pub const ISTRIP: ::tcflag_t = 32; 1826 pub const INLCR: ::tcflag_t = 64; 1827 pub const IGNCR: ::tcflag_t = 128; 1828 pub const ICRNL: ::tcflag_t = 256; 1829 pub const IXON: ::tcflag_t = 512; 1830 pub const IXOFF: ::tcflag_t = 1024; 1831 pub const IXANY: ::tcflag_t = 2048; 1832 pub const IMAXBEL: ::tcflag_t = 8192; 1833 pub const IUCLC: ::tcflag_t = 16384; 1834 pub const OPOST: ::tcflag_t = 1; 1835 pub const ONLCR: ::tcflag_t = 2; 1836 pub const ONOEOT: ::tcflag_t = 8; 1837 pub const OCRNL: ::tcflag_t = 16; 1838 pub const ONOCR: ::tcflag_t = 32; 1839 pub const ONLRET: ::tcflag_t = 64; 1840 pub const NLDLY: ::tcflag_t = 768; 1841 pub const NL0: ::tcflag_t = 0; 1842 pub const NL1: ::tcflag_t = 256; 1843 pub const TABDLY: ::tcflag_t = 3076; 1844 pub const TAB0: ::tcflag_t = 0; 1845 pub const TAB1: ::tcflag_t = 1024; 1846 pub const TAB2: ::tcflag_t = 2048; 1847 pub const TAB3: ::tcflag_t = 4; 1848 pub const CRDLY: ::tcflag_t = 12288; 1849 pub const CR0: ::tcflag_t = 0; 1850 pub const CR1: ::tcflag_t = 4096; 1851 pub const CR2: ::tcflag_t = 8192; 1852 pub const CR3: ::tcflag_t = 12288; 1853 pub const FFDLY: ::tcflag_t = 16384; 1854 pub const FF0: ::tcflag_t = 0; 1855 pub const FF1: ::tcflag_t = 16384; 1856 pub const BSDLY: ::tcflag_t = 32768; 1857 pub const BS0: ::tcflag_t = 0; 1858 pub const BS1: ::tcflag_t = 32768; 1859 pub const VTDLY: ::tcflag_t = 65536; 1860 pub const VT0: ::tcflag_t = 0; 1861 pub const VT1: ::tcflag_t = 65536; 1862 pub const OLCUC: ::tcflag_t = 131072; 1863 pub const OFILL: ::tcflag_t = 262144; 1864 pub const OFDEL: ::tcflag_t = 524288; 1865 pub const CIGNORE: ::tcflag_t = 1; 1866 pub const CSIZE: ::tcflag_t = 768; 1867 pub const CS5: ::tcflag_t = 0; 1868 pub const CS6: ::tcflag_t = 256; 1869 pub const CS7: ::tcflag_t = 512; 1870 pub const CS8: ::tcflag_t = 768; 1871 pub const CSTOPB: ::tcflag_t = 1024; 1872 pub const CREAD: ::tcflag_t = 2048; 1873 pub const PARENB: ::tcflag_t = 4096; 1874 pub const PARODD: ::tcflag_t = 8192; 1875 pub const HUPCL: ::tcflag_t = 16384; 1876 pub const CLOCAL: ::tcflag_t = 32768; 1877 pub const CRTSCTS: ::tcflag_t = 65536; 1878 pub const CRTS_IFLOW: ::tcflag_t = 65536; 1879 pub const CCTS_OFLOW: ::tcflag_t = 65536; 1880 pub const CDTRCTS: ::tcflag_t = 131072; 1881 pub const MDMBUF: ::tcflag_t = 1048576; 1882 pub const CHWFLOW: ::tcflag_t = 1245184; 1883 pub const ECHOKE: ::tcflag_t = 1; 1884 pub const _ECHOE: ::tcflag_t = 2; 1885 pub const ECHOE: ::tcflag_t = 2; 1886 pub const _ECHOK: ::tcflag_t = 4; 1887 pub const ECHOK: ::tcflag_t = 4; 1888 pub const _ECHO: ::tcflag_t = 8; 1889 pub const ECHO: ::tcflag_t = 8; 1890 pub const _ECHONL: ::tcflag_t = 16; 1891 pub const ECHONL: ::tcflag_t = 16; 1892 pub const ECHOPRT: ::tcflag_t = 32; 1893 pub const ECHOCTL: ::tcflag_t = 64; 1894 pub const _ISIG: ::tcflag_t = 128; 1895 pub const ISIG: ::tcflag_t = 128; 1896 pub const _ICANON: ::tcflag_t = 256; 1897 pub const ICANON: ::tcflag_t = 256; 1898 pub const ALTWERASE: ::tcflag_t = 512; 1899 pub const _IEXTEN: ::tcflag_t = 1024; 1900 pub const IEXTEN: ::tcflag_t = 1024; 1901 pub const EXTPROC: ::tcflag_t = 2048; 1902 pub const _TOSTOP: ::tcflag_t = 4194304; 1903 pub const TOSTOP: ::tcflag_t = 4194304; 1904 pub const FLUSHO: ::tcflag_t = 8388608; 1905 pub const NOKERNINFO: ::tcflag_t = 33554432; 1906 pub const PENDIN: ::tcflag_t = 536870912; 1907 pub const _NOFLSH: ::tcflag_t = 2147483648; 1908 pub const NOFLSH: ::tcflag_t = 2147483648; 1909 pub const VEOF: usize = 0; 1910 pub const VEOL: usize = 1; 1911 pub const VEOL2: usize = 2; 1912 pub const VERASE: usize = 3; 1913 pub const VWERASE: usize = 4; 1914 pub const VKILL: usize = 5; 1915 pub const VREPRINT: usize = 6; 1916 pub const VINTR: usize = 8; 1917 pub const VQUIT: usize = 9; 1918 pub const VSUSP: usize = 10; 1919 pub const VDSUSP: usize = 11; 1920 pub const VSTART: usize = 12; 1921 pub const VSTOP: usize = 13; 1922 pub const VLNEXT: usize = 14; 1923 pub const VDISCARD: usize = 15; 1924 pub const VMIN: usize = 16; 1925 pub const VTIME: usize = 17; 1926 pub const VSTATUS: usize = 18; 1927 pub const NCCS: usize = 20; 1928 pub const B0: ::speed_t = 0; 1929 pub const B50: ::speed_t = 50; 1930 pub const B75: ::speed_t = 75; 1931 pub const B110: ::speed_t = 110; 1932 pub const B134: ::speed_t = 134; 1933 pub const B150: ::speed_t = 150; 1934 pub const B200: ::speed_t = 200; 1935 pub const B300: ::speed_t = 300; 1936 pub const B600: ::speed_t = 600; 1937 pub const B1200: ::speed_t = 1200; 1938 pub const B1800: ::speed_t = 1800; 1939 pub const B2400: ::speed_t = 2400; 1940 pub const B4800: ::speed_t = 4800; 1941 pub const B9600: ::speed_t = 9600; 1942 pub const B7200: ::speed_t = 7200; 1943 pub const B14400: ::speed_t = 14400; 1944 pub const B19200: ::speed_t = 19200; 1945 pub const B28800: ::speed_t = 28800; 1946 pub const B38400: ::speed_t = 38400; 1947 pub const EXTA: ::speed_t = B19200; 1948 pub const EXTB: ::speed_t = B38400; 1949 pub const B57600: ::speed_t = 57600; 1950 pub const B76800: ::speed_t = 76800; 1951 pub const B115200: ::speed_t = 115200; 1952 pub const B230400: ::speed_t = 230400; 1953 pub const B460800: ::speed_t = 460800; 1954 pub const B500000: ::speed_t = 500000; 1955 pub const B576000: ::speed_t = 576000; 1956 pub const B921600: ::speed_t = 921600; 1957 pub const B1000000: ::speed_t = 1000000; 1958 pub const B1152000: ::speed_t = 1152000; 1959 pub const B1500000: ::speed_t = 1500000; 1960 pub const B2000000: ::speed_t = 2000000; 1961 pub const B2500000: ::speed_t = 2500000; 1962 pub const B3000000: ::speed_t = 3000000; 1963 pub const B3500000: ::speed_t = 3500000; 1964 pub const B4000000: ::speed_t = 4000000; 1965 pub const TCSANOW: ::c_int = 0; 1966 pub const TCSADRAIN: ::c_int = 1; 1967 pub const TCSAFLUSH: ::c_int = 2; 1968 pub const TCSASOFT: ::c_int = 16; 1969 pub const TCIFLUSH: ::c_int = 1; 1970 pub const TCOFLUSH: ::c_int = 2; 1971 pub const TCIOFLUSH: ::c_int = 3; 1972 pub const TCOOFF: ::c_int = 1; 1973 pub const TCOON: ::c_int = 2; 1974 pub const TCIOFF: ::c_int = 3; 1975 pub const TCION: ::c_int = 4; 1976 pub const TTYDEF_IFLAG: ::tcflag_t = 11042; 1977 pub const TTYDEF_LFLAG: ::tcflag_t = 1483; 1978 pub const TTYDEF_CFLAG: ::tcflag_t = 23040; 1979 pub const TTYDEF_SPEED: ::tcflag_t = 9600; 1980 pub const CEOL: u8 = 0u8; 1981 pub const CERASE: u8 = 127; 1982 pub const CMIN: u8 = 1; 1983 pub const CQUIT: u8 = 28; 1984 pub const CTIME: u8 = 0; 1985 pub const CBRK: u8 = 0u8; 1986 1987 // dlfcn.h 1988 pub const RTLD_DEFAULT: *mut ::c_void = 0i64 as *mut ::c_void; 1989 pub const RTLD_NEXT: *mut ::c_void = -1i64 as *mut ::c_void; 1990 pub const RTLD_LAZY: ::c_int = 1; 1991 pub const RTLD_NOW: ::c_int = 2; 1992 pub const RTLD_BINDING_MASK: ::c_int = 3; 1993 pub const RTLD_NOLOAD: ::c_int = 4; 1994 pub const RTLD_DEEPBIND: ::c_int = 8; 1995 pub const RTLD_GLOBAL: ::c_int = 256; 1996 pub const RTLD_LOCAL: ::c_int = 0; 1997 pub const RTLD_NODELETE: ::c_int = 4096; 1998 pub const DLFO_STRUCT_HAS_EH_DBASE: usize = 1; 1999 pub const DLFO_STRUCT_HAS_EH_COUNT: usize = 0; 2000 pub const LM_ID_BASE: c_long = 0; 2001 pub const LM_ID_NEWLM: c_long = -1; 2002 2003 // bits/signum_generic.h 2004 pub const SIGINT: ::c_int = 2; 2005 pub const SIGILL: ::c_int = 4; 2006 pub const SIGABRT: ::c_int = 6; 2007 pub const SIGFPE: ::c_int = 8; 2008 pub const SIGSEGV: ::c_int = 11; 2009 pub const SIGTERM: ::c_int = 15; 2010 pub const SIGHUP: ::c_int = 1; 2011 pub const SIGQUIT: ::c_int = 3; 2012 pub const SIGTRAP: ::c_int = 5; 2013 pub const SIGKILL: ::c_int = 9; 2014 pub const SIGPIPE: ::c_int = 13; 2015 pub const SIGALRM: ::c_int = 14; 2016 pub const SIGIOT: ::c_int = 6; 2017 pub const SIGBUS: ::c_int = 10; 2018 pub const SIGSYS: ::c_int = 12; 2019 pub const SIGEMT: ::c_int = 7; 2020 pub const SIGINFO: ::c_int = 29; 2021 pub const SIGLOST: ::c_int = 32; 2022 pub const SIGURG: ::c_int = 16; 2023 pub const SIGSTOP: ::c_int = 17; 2024 pub const SIGTSTP: ::c_int = 18; 2025 pub const SIGCONT: ::c_int = 19; 2026 pub const SIGCHLD: ::c_int = 20; 2027 pub const SIGTTIN: ::c_int = 21; 2028 pub const SIGTTOU: ::c_int = 22; 2029 pub const SIGPOLL: ::c_int = 23; 2030 pub const SIGXCPU: ::c_int = 24; 2031 pub const SIGVTALRM: ::c_int = 26; 2032 pub const SIGPROF: ::c_int = 27; 2033 pub const SIGXFSZ: ::c_int = 25; 2034 pub const SIGUSR1: ::c_int = 30; 2035 pub const SIGUSR2: ::c_int = 31; 2036 pub const SIGWINCH: ::c_int = 28; 2037 pub const SIGIO: ::c_int = 23; 2038 pub const SIGCLD: ::c_int = 20; 2039 pub const __SIGRTMIN: usize = 32; 2040 pub const __SIGRTMAX: usize = 32; 2041 pub const _NSIG: usize = 33; 2042 pub const NSIG: usize = 33; 2043 2044 // bits/sigaction.h 2045 pub const SA_ONSTACK: ::c_int = 1; 2046 pub const SA_RESTART: ::c_int = 2; 2047 pub const SA_NODEFER: ::c_int = 16; 2048 pub const SA_RESETHAND: ::c_int = 4; 2049 pub const SA_NOCLDSTOP: ::c_int = 8; 2050 pub const SA_SIGINFO: ::c_int = 64; 2051 pub const SA_INTERRUPT: ::c_int = 0; 2052 pub const SA_NOMASK: ::c_int = 16; 2053 pub const SA_ONESHOT: ::c_int = 4; 2054 pub const SA_STACK: ::c_int = 1; 2055 pub const SIG_BLOCK: ::c_int = 1; 2056 pub const SIG_UNBLOCK: ::c_int = 2; 2057 pub const SIG_SETMASK: ::c_int = 3; 2058 2059 // bits/sigcontext.h 2060 pub const FPC_IE: u16 = 1; 2061 pub const FPC_IM: u16 = 1; 2062 pub const FPC_DE: u16 = 2; 2063 pub const FPC_DM: u16 = 2; 2064 pub const FPC_ZE: u16 = 4; 2065 pub const FPC_ZM: u16 = 4; 2066 pub const FPC_OE: u16 = 8; 2067 pub const FPC_OM: u16 = 8; 2068 pub const FPC_UE: u16 = 16; 2069 pub const FPC_PE: u16 = 32; 2070 pub const FPC_PC: u16 = 768; 2071 pub const FPC_PC_24: u16 = 0; 2072 pub const FPC_PC_53: u16 = 512; 2073 pub const FPC_PC_64: u16 = 768; 2074 pub const FPC_RC: u16 = 3072; 2075 pub const FPC_RC_RN: u16 = 0; 2076 pub const FPC_RC_RD: u16 = 1024; 2077 pub const FPC_RC_RU: u16 = 2048; 2078 pub const FPC_RC_CHOP: u16 = 3072; 2079 pub const FPC_IC: u16 = 4096; 2080 pub const FPC_IC_PROJ: u16 = 0; 2081 pub const FPC_IC_AFF: u16 = 4096; 2082 pub const FPS_IE: u16 = 1; 2083 pub const FPS_DE: u16 = 2; 2084 pub const FPS_ZE: u16 = 4; 2085 pub const FPS_OE: u16 = 8; 2086 pub const FPS_UE: u16 = 16; 2087 pub const FPS_PE: u16 = 32; 2088 pub const FPS_SF: u16 = 64; 2089 pub const FPS_ES: u16 = 128; 2090 pub const FPS_C0: u16 = 256; 2091 pub const FPS_C1: u16 = 512; 2092 pub const FPS_C2: u16 = 1024; 2093 pub const FPS_TOS: u16 = 14336; 2094 pub const FPS_TOS_SHIFT: u16 = 11; 2095 pub const FPS_C3: u16 = 16384; 2096 pub const FPS_BUSY: u16 = 32768; 2097 pub const FPE_INTOVF_TRAP: ::c_int = 1; 2098 pub const FPE_INTDIV_FAULT: ::c_int = 2; 2099 pub const FPE_FLTOVF_FAULT: ::c_int = 3; 2100 pub const FPE_FLTDIV_FAULT: ::c_int = 4; 2101 pub const FPE_FLTUND_FAULT: ::c_int = 5; 2102 pub const FPE_SUBRNG_FAULT: ::c_int = 7; 2103 pub const FPE_FLTDNR_FAULT: ::c_int = 8; 2104 pub const FPE_FLTINX_FAULT: ::c_int = 9; 2105 pub const FPE_EMERR_FAULT: ::c_int = 10; 2106 pub const FPE_EMBND_FAULT: ::c_int = 11; 2107 pub const ILL_INVOPR_FAULT: ::c_int = 1; 2108 pub const ILL_STACK_FAULT: ::c_int = 2; 2109 pub const ILL_FPEOPR_FAULT: ::c_int = 3; 2110 pub const DBG_SINGLE_TRAP: ::c_int = 1; 2111 pub const DBG_BRKPNT_FAULT: ::c_int = 2; 2112 pub const __NGREG: usize = 19; 2113 pub const NGREG: usize = 19; 2114 2115 // bits/sigstack.h 2116 pub const MINSIGSTKSZ: usize = 8192; 2117 pub const SIGSTKSZ: usize = 40960; 2118 2119 // sys/stat.h 2120 pub const __S_IFMT: mode_t = 61440; 2121 pub const __S_IFDIR: mode_t = 16384; 2122 pub const __S_IFCHR: mode_t = 8192; 2123 pub const __S_IFBLK: mode_t = 24576; 2124 pub const __S_IFREG: mode_t = 32768; 2125 pub const __S_IFLNK: mode_t = 40960; 2126 pub const __S_IFSOCK: mode_t = 49152; 2127 pub const __S_IFIFO: mode_t = 4096; 2128 pub const __S_ISUID: mode_t = 2048; 2129 pub const __S_ISGID: mode_t = 1024; 2130 pub const __S_ISVTX: mode_t = 512; 2131 pub const __S_IREAD: mode_t = 256; 2132 pub const __S_IWRITE: mode_t = 128; 2133 pub const __S_IEXEC: mode_t = 64; 2134 pub const S_INOCACHE: mode_t = 65536; 2135 pub const S_IUSEUNK: mode_t = 131072; 2136 pub const S_IUNKNOWN: mode_t = 1835008; 2137 pub const S_IUNKSHIFT: mode_t = 12; 2138 pub const S_IPTRANS: mode_t = 2097152; 2139 pub const S_IATRANS: mode_t = 4194304; 2140 pub const S_IROOT: mode_t = 8388608; 2141 pub const S_ITRANS: mode_t = 14680064; 2142 pub const S_IMMAP0: mode_t = 16777216; 2143 pub const CMASK: mode_t = 18; 2144 pub const UF_SETTABLE: ::c_uint = 65535; 2145 pub const UF_NODUMP: ::c_uint = 1; 2146 pub const UF_IMMUTABLE: ::c_uint = 2; 2147 pub const UF_APPEND: ::c_uint = 4; 2148 pub const UF_OPAQUE: ::c_uint = 8; 2149 pub const UF_NOUNLINK: ::c_uint = 16; 2150 pub const SF_SETTABLE: ::c_uint = 4294901760; 2151 pub const SF_ARCHIVED: ::c_uint = 65536; 2152 pub const SF_IMMUTABLE: ::c_uint = 131072; 2153 pub const SF_APPEND: ::c_uint = 262144; 2154 pub const SF_NOUNLINK: ::c_uint = 1048576; 2155 pub const SF_SNAPSHOT: ::c_uint = 2097152; 2156 pub const UTIME_NOW: ::c_long = -1; 2157 pub const UTIME_OMIT: ::c_long = -2; 2158 pub const S_IFMT: ::mode_t = 61440; 2159 pub const S_IFDIR: ::mode_t = 16384; 2160 pub const S_IFCHR: ::mode_t = 8192; 2161 pub const S_IFBLK: ::mode_t = 24576; 2162 pub const S_IFREG: ::mode_t = 32768; 2163 pub const S_IFIFO: ::mode_t = 4096; 2164 pub const S_IFLNK: ::mode_t = 40960; 2165 pub const S_IFSOCK: ::mode_t = 49152; 2166 pub const S_ISUID: ::mode_t = 2048; 2167 pub const S_ISGID: ::mode_t = 1024; 2168 pub const S_ISVTX: ::mode_t = 512; 2169 pub const S_IRUSR: ::mode_t = 256; 2170 pub const S_IWUSR: ::mode_t = 128; 2171 pub const S_IXUSR: ::mode_t = 64; 2172 pub const S_IRWXU: ::mode_t = 448; 2173 pub const S_IREAD: ::mode_t = 256; 2174 pub const S_IWRITE: ::mode_t = 128; 2175 pub const S_IEXEC: ::mode_t = 64; 2176 pub const S_IRGRP: ::mode_t = 32; 2177 pub const S_IWGRP: ::mode_t = 16; 2178 pub const S_IXGRP: ::mode_t = 8; 2179 pub const S_IRWXG: ::mode_t = 56; 2180 pub const S_IROTH: ::mode_t = 4; 2181 pub const S_IWOTH: ::mode_t = 2; 2182 pub const S_IXOTH: ::mode_t = 1; 2183 pub const S_IRWXO: ::mode_t = 7; 2184 pub const ACCESSPERMS: ::mode_t = 511; 2185 pub const ALLPERMS: ::mode_t = 4095; 2186 pub const DEFFILEMODE: ::mode_t = 438; 2187 pub const S_BLKSIZE: usize = 512; 2188 pub const STATX_TYPE: ::c_uint = 1; 2189 pub const STATX_MODE: ::c_uint = 2; 2190 pub const STATX_NLINK: ::c_uint = 4; 2191 pub const STATX_UID: ::c_uint = 8; 2192 pub const STATX_GID: ::c_uint = 16; 2193 pub const STATX_ATIME: ::c_uint = 32; 2194 pub const STATX_MTIME: ::c_uint = 64; 2195 pub const STATX_CTIME: ::c_uint = 128; 2196 pub const STATX_INO: ::c_uint = 256; 2197 pub const STATX_SIZE: ::c_uint = 512; 2198 pub const STATX_BLOCKS: ::c_uint = 1024; 2199 pub const STATX_BASIC_STATS: ::c_uint = 2047; 2200 pub const STATX_ALL: ::c_uint = 4095; 2201 pub const STATX_BTIME: ::c_uint = 2048; 2202 pub const STATX_MNT_ID: ::c_uint = 4096; 2203 pub const STATX_DIOALIGN: ::c_uint = 8192; 2204 pub const STATX__RESERVED: ::c_uint = 2147483648; 2205 pub const STATX_ATTR_COMPRESSED: ::c_uint = 4; 2206 pub const STATX_ATTR_IMMUTABLE: ::c_uint = 16; 2207 pub const STATX_ATTR_APPEND: ::c_uint = 32; 2208 pub const STATX_ATTR_NODUMP: ::c_uint = 64; 2209 pub const STATX_ATTR_ENCRYPTED: ::c_uint = 2048; 2210 pub const STATX_ATTR_AUTOMOUNT: ::c_uint = 4096; 2211 pub const STATX_ATTR_MOUNT_ROOT: ::c_uint = 8192; 2212 pub const STATX_ATTR_VERITY: ::c_uint = 1048576; 2213 pub const STATX_ATTR_DAX: ::c_uint = 2097152; 2214 2215 // sys/ioctl.h 2216 pub const TIOCM_LE: ::c_int = 1; 2217 pub const TIOCM_DTR: ::c_int = 2; 2218 pub const TIOCM_RTS: ::c_int = 4; 2219 pub const TIOCM_ST: ::c_int = 8; 2220 pub const TIOCM_SR: ::c_int = 16; 2221 pub const TIOCM_CTS: ::c_int = 32; 2222 pub const TIOCM_CAR: ::c_int = 64; 2223 pub const TIOCM_CD: ::c_int = 64; 2224 pub const TIOCM_RNG: ::c_int = 128; 2225 pub const TIOCM_RI: ::c_int = 128; 2226 pub const TIOCM_DSR: ::c_int = 256; 2227 pub const TIOCPKT_DATA: ::c_int = 0; 2228 pub const TIOCPKT_FLUSHREAD: ::c_int = 1; 2229 pub const TIOCPKT_FLUSHWRITE: ::c_int = 2; 2230 pub const TIOCPKT_STOP: ::c_int = 4; 2231 pub const TIOCPKT_START: ::c_int = 8; 2232 pub const TIOCPKT_NOSTOP: ::c_int = 16; 2233 pub const TIOCPKT_DOSTOP: ::c_int = 32; 2234 pub const TIOCPKT_IOCTL: ::c_int = 64; 2235 pub const TTYDISC: ::c_int = 0; 2236 pub const TABLDISC: ::c_int = 3; 2237 pub const SLIPDISC: ::c_int = 4; 2238 pub const TANDEM: ::tcflag_t = 1; 2239 pub const CBREAK: ::tcflag_t = 2; 2240 pub const LCASE: ::tcflag_t = 4; 2241 pub const CRMOD: ::tcflag_t = 16; 2242 pub const RAW: ::tcflag_t = 32; 2243 pub const ODDP: ::tcflag_t = 64; 2244 pub const EVENP: ::tcflag_t = 128; 2245 pub const ANYP: ::tcflag_t = 192; 2246 pub const NLDELAY: ::tcflag_t = 768; 2247 pub const NL2: ::tcflag_t = 512; 2248 pub const NL3: ::tcflag_t = 768; 2249 pub const TBDELAY: ::tcflag_t = 3072; 2250 pub const XTABS: ::tcflag_t = 3072; 2251 pub const CRDELAY: ::tcflag_t = 12288; 2252 pub const VTDELAY: ::tcflag_t = 16384; 2253 pub const BSDELAY: ::tcflag_t = 32768; 2254 pub const ALLDELAY: ::tcflag_t = 65280; 2255 pub const CRTBS: ::tcflag_t = 65536; 2256 pub const PRTERA: ::tcflag_t = 131072; 2257 pub const CRTERA: ::tcflag_t = 262144; 2258 pub const TILDE: ::tcflag_t = 524288; 2259 pub const LITOUT: ::tcflag_t = 2097152; 2260 pub const NOHANG: ::tcflag_t = 16777216; 2261 pub const L001000: ::tcflag_t = 33554432; 2262 pub const CRTKIL: ::tcflag_t = 67108864; 2263 pub const PASS8: ::tcflag_t = 134217728; 2264 pub const CTLECH: ::tcflag_t = 268435456; 2265 pub const DECCTQ: ::tcflag_t = 1073741824; 2266 2267 pub const FIONBIO: ::c_ulong = 0xa008007e; 2268 pub const FIONREAD: ::c_ulong = 0x6008007f; 2269 pub const TIOCSWINSZ: ::c_ulong = 0x90200767; 2270 pub const TIOCGWINSZ: ::c_ulong = 0x50200768; 2271 pub const TIOCEXCL: ::c_ulong = 0x70d; 2272 pub const TIOCNXCL: ::c_ulong = 0x70e; 2273 pub const TIOCSCTTY: ::c_ulong = 0x761; 2274 2275 pub const FIOCLEX: ::c_ulong = 1; 2276 2277 // fcntl.h 2278 pub const O_EXEC: ::c_int = 4; 2279 pub const O_NORW: ::c_int = 0; 2280 pub const O_RDONLY: ::c_int = 1; 2281 pub const O_WRONLY: ::c_int = 2; 2282 pub const O_RDWR: ::c_int = 3; 2283 pub const O_ACCMODE: ::c_int = 3; 2284 pub const O_LARGEFILE: ::c_int = 0; 2285 pub const O_CREAT: ::c_int = 16; 2286 pub const O_EXCL: ::c_int = 32; 2287 pub const O_NOLINK: ::c_int = 64; 2288 pub const O_NOTRANS: ::c_int = 128; 2289 pub const O_NOFOLLOW: ::c_int = 1048576; 2290 pub const O_DIRECTORY: ::c_int = 2097152; 2291 pub const O_APPEND: ::c_int = 256; 2292 pub const O_ASYNC: ::c_int = 512; 2293 pub const O_FSYNC: ::c_int = 1024; 2294 pub const O_SYNC: ::c_int = 1024; 2295 pub const O_NOATIME: ::c_int = 2048; 2296 pub const O_SHLOCK: ::c_int = 131072; 2297 pub const O_EXLOCK: ::c_int = 262144; 2298 pub const O_DSYNC: ::c_int = 1024; 2299 pub const O_RSYNC: ::c_int = 1024; 2300 pub const O_NONBLOCK: ::c_int = 8; 2301 pub const O_NDELAY: ::c_int = 8; 2302 pub const O_HURD: ::c_int = 458751; 2303 pub const O_TRUNC: ::c_int = 65536; 2304 pub const O_CLOEXEC: ::c_int = 4194304; 2305 pub const O_IGNORE_CTTY: ::c_int = 524288; 2306 pub const O_TMPFILE: ::c_int = 8388608; 2307 pub const O_NOCTTY: ::c_int = 0; 2308 pub const FREAD: ::c_int = 1; 2309 pub const FWRITE: ::c_int = 2; 2310 pub const FASYNC: ::c_int = 512; 2311 pub const FCREAT: ::c_int = 16; 2312 pub const FEXCL: ::c_int = 32; 2313 pub const FTRUNC: ::c_int = 65536; 2314 pub const FNOCTTY: ::c_int = 0; 2315 pub const FFSYNC: ::c_int = 1024; 2316 pub const FSYNC: ::c_int = 1024; 2317 pub const FAPPEND: ::c_int = 256; 2318 pub const FNONBLOCK: ::c_int = 8; 2319 pub const FNDELAY: ::c_int = 8; 2320 pub const F_DUPFD: ::c_int = 0; 2321 pub const F_GETFD: ::c_int = 1; 2322 pub const F_SETFD: ::c_int = 2; 2323 pub const F_GETFL: ::c_int = 3; 2324 pub const F_SETFL: ::c_int = 4; 2325 pub const F_GETOWN: ::c_int = 5; 2326 pub const F_SETOWN: ::c_int = 6; 2327 pub const F_GETLK: ::c_int = 7; 2328 pub const F_SETLK: ::c_int = 8; 2329 pub const F_SETLKW: ::c_int = 9; 2330 pub const F_GETLK64: ::c_int = 10; 2331 pub const F_SETLK64: ::c_int = 11; 2332 pub const F_SETLKW64: ::c_int = 12; 2333 pub const F_DUPFD_CLOEXEC: ::c_int = 1030; 2334 pub const FD_CLOEXEC: ::c_int = 1; 2335 pub const F_RDLCK: ::c_int = 1; 2336 pub const F_WRLCK: ::c_int = 2; 2337 pub const F_UNLCK: ::c_int = 3; 2338 pub const POSIX_FADV_NORMAL: ::c_int = 0; 2339 pub const POSIX_FADV_RANDOM: ::c_int = 1; 2340 pub const POSIX_FADV_SEQUENTIAL: ::c_int = 2; 2341 pub const POSIX_FADV_WILLNEED: ::c_int = 3; 2342 pub const POSIX_FADV_DONTNEED: ::c_int = 4; 2343 pub const POSIX_FADV_NOREUSE: ::c_int = 5; 2344 pub const AT_FDCWD: ::c_int = -100; 2345 pub const AT_SYMLINK_NOFOLLOW: ::c_int = 256; 2346 pub const AT_REMOVEDIR: ::c_int = 512; 2347 pub const AT_SYMLINK_FOLLOW: ::c_int = 1024; 2348 pub const AT_NO_AUTOMOUNT: ::c_int = 2048; 2349 pub const AT_EMPTY_PATH: ::c_int = 4096; 2350 pub const AT_STATX_SYNC_TYPE: ::c_int = 24576; 2351 pub const AT_STATX_SYNC_AS_STAT: ::c_int = 0; 2352 pub const AT_STATX_FORCE_SYNC: ::c_int = 8192; 2353 pub const AT_STATX_DONT_SYNC: ::c_int = 16384; 2354 pub const AT_RECURSIVE: ::c_int = 32768; 2355 pub const AT_EACCESS: ::c_int = 512; 2356 2357 // sys/uio.h 2358 pub const RWF_HIPRI: ::c_int = 1; 2359 pub const RWF_DSYNC: ::c_int = 2; 2360 pub const RWF_SYNC: ::c_int = 4; 2361 pub const RWF_NOWAIT: ::c_int = 8; 2362 pub const RWF_APPEND: ::c_int = 16; 2363 2364 // errno.h 2365 pub const EPERM: ::c_int = 1073741825; 2366 pub const ENOENT: ::c_int = 1073741826; 2367 pub const ESRCH: ::c_int = 1073741827; 2368 pub const EINTR: ::c_int = 1073741828; 2369 pub const EIO: ::c_int = 1073741829; 2370 pub const ENXIO: ::c_int = 1073741830; 2371 pub const E2BIG: ::c_int = 1073741831; 2372 pub const ENOEXEC: ::c_int = 1073741832; 2373 pub const EBADF: ::c_int = 1073741833; 2374 pub const ECHILD: ::c_int = 1073741834; 2375 pub const EDEADLK: ::c_int = 1073741835; 2376 pub const ENOMEM: ::c_int = 1073741836; 2377 pub const EACCES: ::c_int = 1073741837; 2378 pub const EFAULT: ::c_int = 1073741838; 2379 pub const ENOTBLK: ::c_int = 1073741839; 2380 pub const EBUSY: ::c_int = 1073741840; 2381 pub const EEXIST: ::c_int = 1073741841; 2382 pub const EXDEV: ::c_int = 1073741842; 2383 pub const ENODEV: ::c_int = 1073741843; 2384 pub const ENOTDIR: ::c_int = 1073741844; 2385 pub const EISDIR: ::c_int = 1073741845; 2386 pub const EINVAL: ::c_int = 1073741846; 2387 pub const EMFILE: ::c_int = 1073741848; 2388 pub const ENFILE: ::c_int = 1073741847; 2389 pub const ENOTTY: ::c_int = 1073741849; 2390 pub const ETXTBSY: ::c_int = 1073741850; 2391 pub const EFBIG: ::c_int = 1073741851; 2392 pub const ENOSPC: ::c_int = 1073741852; 2393 pub const ESPIPE: ::c_int = 1073741853; 2394 pub const EROFS: ::c_int = 1073741854; 2395 pub const EMLINK: ::c_int = 1073741855; 2396 pub const EPIPE: ::c_int = 1073741856; 2397 pub const EDOM: ::c_int = 1073741857; 2398 pub const ERANGE: ::c_int = 1073741858; 2399 pub const EAGAIN: ::c_int = 1073741859; 2400 pub const EWOULDBLOCK: ::c_int = 1073741859; 2401 pub const EINPROGRESS: ::c_int = 1073741860; 2402 pub const EALREADY: ::c_int = 1073741861; 2403 pub const ENOTSOCK: ::c_int = 1073741862; 2404 pub const EMSGSIZE: ::c_int = 1073741864; 2405 pub const EPROTOTYPE: ::c_int = 1073741865; 2406 pub const ENOPROTOOPT: ::c_int = 1073741866; 2407 pub const EPROTONOSUPPORT: ::c_int = 1073741867; 2408 pub const ESOCKTNOSUPPORT: ::c_int = 1073741868; 2409 pub const EOPNOTSUPP: ::c_int = 1073741869; 2410 pub const EPFNOSUPPORT: ::c_int = 1073741870; 2411 pub const EAFNOSUPPORT: ::c_int = 1073741871; 2412 pub const EADDRINUSE: ::c_int = 1073741872; 2413 pub const EADDRNOTAVAIL: ::c_int = 1073741873; 2414 pub const ENETDOWN: ::c_int = 1073741874; 2415 pub const ENETUNREACH: ::c_int = 1073741875; 2416 pub const ENETRESET: ::c_int = 1073741876; 2417 pub const ECONNABORTED: ::c_int = 1073741877; 2418 pub const ECONNRESET: ::c_int = 1073741878; 2419 pub const ENOBUFS: ::c_int = 1073741879; 2420 pub const EISCONN: ::c_int = 1073741880; 2421 pub const ENOTCONN: ::c_int = 1073741881; 2422 pub const EDESTADDRREQ: ::c_int = 1073741863; 2423 pub const ESHUTDOWN: ::c_int = 1073741882; 2424 pub const ETOOMANYREFS: ::c_int = 1073741883; 2425 pub const ETIMEDOUT: ::c_int = 1073741884; 2426 pub const ECONNREFUSED: ::c_int = 1073741885; 2427 pub const ELOOP: ::c_int = 1073741886; 2428 pub const ENAMETOOLONG: ::c_int = 1073741887; 2429 pub const EHOSTDOWN: ::c_int = 1073741888; 2430 pub const EHOSTUNREACH: ::c_int = 1073741889; 2431 pub const ENOTEMPTY: ::c_int = 1073741890; 2432 pub const EPROCLIM: ::c_int = 1073741891; 2433 pub const EUSERS: ::c_int = 1073741892; 2434 pub const EDQUOT: ::c_int = 1073741893; 2435 pub const ESTALE: ::c_int = 1073741894; 2436 pub const EREMOTE: ::c_int = 1073741895; 2437 pub const EBADRPC: ::c_int = 1073741896; 2438 pub const ERPCMISMATCH: ::c_int = 1073741897; 2439 pub const EPROGUNAVAIL: ::c_int = 1073741898; 2440 pub const EPROGMISMATCH: ::c_int = 1073741899; 2441 pub const EPROCUNAVAIL: ::c_int = 1073741900; 2442 pub const ENOLCK: ::c_int = 1073741901; 2443 pub const EFTYPE: ::c_int = 1073741903; 2444 pub const EAUTH: ::c_int = 1073741904; 2445 pub const ENEEDAUTH: ::c_int = 1073741905; 2446 pub const ENOSYS: ::c_int = 1073741902; 2447 pub const ELIBEXEC: ::c_int = 1073741907; 2448 pub const ENOTSUP: ::c_int = 1073741942; 2449 pub const EILSEQ: ::c_int = 1073741930; 2450 pub const EBACKGROUND: ::c_int = 1073741924; 2451 pub const EDIED: ::c_int = 1073741925; 2452 pub const EGREGIOUS: ::c_int = 1073741927; 2453 pub const EIEIO: ::c_int = 1073741928; 2454 pub const EGRATUITOUS: ::c_int = 1073741929; 2455 pub const EBADMSG: ::c_int = 1073741931; 2456 pub const EIDRM: ::c_int = 1073741932; 2457 pub const EMULTIHOP: ::c_int = 1073741933; 2458 pub const ENODATA: ::c_int = 1073741934; 2459 pub const ENOLINK: ::c_int = 1073741935; 2460 pub const ENOMSG: ::c_int = 1073741936; 2461 pub const ENOSR: ::c_int = 1073741937; 2462 pub const ENOSTR: ::c_int = 1073741938; 2463 pub const EOVERFLOW: ::c_int = 1073741939; 2464 pub const EPROTO: ::c_int = 1073741940; 2465 pub const ETIME: ::c_int = 1073741941; 2466 pub const ECANCELED: ::c_int = 1073741943; 2467 pub const EOWNERDEAD: ::c_int = 1073741944; 2468 pub const ENOTRECOVERABLE: ::c_int = 1073741945; 2469 pub const EMACH_SEND_IN_PROGRESS: ::c_int = 268435457; 2470 pub const EMACH_SEND_INVALID_DATA: ::c_int = 268435458; 2471 pub const EMACH_SEND_INVALID_DEST: ::c_int = 268435459; 2472 pub const EMACH_SEND_TIMED_OUT: ::c_int = 268435460; 2473 pub const EMACH_SEND_WILL_NOTIFY: ::c_int = 268435461; 2474 pub const EMACH_SEND_NOTIFY_IN_PROGRESS: ::c_int = 268435462; 2475 pub const EMACH_SEND_INTERRUPTED: ::c_int = 268435463; 2476 pub const EMACH_SEND_MSG_TOO_SMALL: ::c_int = 268435464; 2477 pub const EMACH_SEND_INVALID_REPLY: ::c_int = 268435465; 2478 pub const EMACH_SEND_INVALID_RIGHT: ::c_int = 268435466; 2479 pub const EMACH_SEND_INVALID_NOTIFY: ::c_int = 268435467; 2480 pub const EMACH_SEND_INVALID_MEMORY: ::c_int = 268435468; 2481 pub const EMACH_SEND_NO_BUFFER: ::c_int = 268435469; 2482 pub const EMACH_SEND_NO_NOTIFY: ::c_int = 268435470; 2483 pub const EMACH_SEND_INVALID_TYPE: ::c_int = 268435471; 2484 pub const EMACH_SEND_INVALID_HEADER: ::c_int = 268435472; 2485 pub const EMACH_RCV_IN_PROGRESS: ::c_int = 268451841; 2486 pub const EMACH_RCV_INVALID_NAME: ::c_int = 268451842; 2487 pub const EMACH_RCV_TIMED_OUT: ::c_int = 268451843; 2488 pub const EMACH_RCV_TOO_LARGE: ::c_int = 268451844; 2489 pub const EMACH_RCV_INTERRUPTED: ::c_int = 268451845; 2490 pub const EMACH_RCV_PORT_CHANGED: ::c_int = 268451846; 2491 pub const EMACH_RCV_INVALID_NOTIFY: ::c_int = 268451847; 2492 pub const EMACH_RCV_INVALID_DATA: ::c_int = 268451848; 2493 pub const EMACH_RCV_PORT_DIED: ::c_int = 268451849; 2494 pub const EMACH_RCV_IN_SET: ::c_int = 268451850; 2495 pub const EMACH_RCV_HEADER_ERROR: ::c_int = 268451851; 2496 pub const EMACH_RCV_BODY_ERROR: ::c_int = 268451852; 2497 pub const EKERN_INVALID_ADDRESS: ::c_int = 1; 2498 pub const EKERN_PROTECTION_FAILURE: ::c_int = 2; 2499 pub const EKERN_NO_SPACE: ::c_int = 3; 2500 pub const EKERN_INVALID_ARGUMENT: ::c_int = 4; 2501 pub const EKERN_FAILURE: ::c_int = 5; 2502 pub const EKERN_RESOURCE_SHORTAGE: ::c_int = 6; 2503 pub const EKERN_NOT_RECEIVER: ::c_int = 7; 2504 pub const EKERN_NO_ACCESS: ::c_int = 8; 2505 pub const EKERN_MEMORY_FAILURE: ::c_int = 9; 2506 pub const EKERN_MEMORY_ERROR: ::c_int = 10; 2507 pub const EKERN_NOT_IN_SET: ::c_int = 12; 2508 pub const EKERN_NAME_EXISTS: ::c_int = 13; 2509 pub const EKERN_ABORTED: ::c_int = 14; 2510 pub const EKERN_INVALID_NAME: ::c_int = 15; 2511 pub const EKERN_INVALID_TASK: ::c_int = 16; 2512 pub const EKERN_INVALID_RIGHT: ::c_int = 17; 2513 pub const EKERN_INVALID_VALUE: ::c_int = 18; 2514 pub const EKERN_UREFS_OVERFLOW: ::c_int = 19; 2515 pub const EKERN_INVALID_CAPABILITY: ::c_int = 20; 2516 pub const EKERN_RIGHT_EXISTS: ::c_int = 21; 2517 pub const EKERN_INVALID_HOST: ::c_int = 22; 2518 pub const EKERN_MEMORY_PRESENT: ::c_int = 23; 2519 pub const EKERN_WRITE_PROTECTION_FAILURE: ::c_int = 24; 2520 pub const EKERN_TERMINATED: ::c_int = 26; 2521 pub const EKERN_TIMEDOUT: ::c_int = 27; 2522 pub const EKERN_INTERRUPTED: ::c_int = 28; 2523 pub const EMIG_TYPE_ERROR: ::c_int = -300; 2524 pub const EMIG_REPLY_MISMATCH: ::c_int = -301; 2525 pub const EMIG_REMOTE_ERROR: ::c_int = -302; 2526 pub const EMIG_BAD_ID: ::c_int = -303; 2527 pub const EMIG_BAD_ARGUMENTS: ::c_int = -304; 2528 pub const EMIG_NO_REPLY: ::c_int = -305; 2529 pub const EMIG_EXCEPTION: ::c_int = -306; 2530 pub const EMIG_ARRAY_TOO_LARGE: ::c_int = -307; 2531 pub const EMIG_SERVER_DIED: ::c_int = -308; 2532 pub const EMIG_DESTROY_REQUEST: ::c_int = -309; 2533 pub const ED_IO_ERROR: ::c_int = 2500; 2534 pub const ED_WOULD_BLOCK: ::c_int = 2501; 2535 pub const ED_NO_SUCH_DEVICE: ::c_int = 2502; 2536 pub const ED_ALREADY_OPEN: ::c_int = 2503; 2537 pub const ED_DEVICE_DOWN: ::c_int = 2504; 2538 pub const ED_INVALID_OPERATION: ::c_int = 2505; 2539 pub const ED_INVALID_RECNUM: ::c_int = 2506; 2540 pub const ED_INVALID_SIZE: ::c_int = 2507; 2541 pub const ED_NO_MEMORY: ::c_int = 2508; 2542 pub const ED_READ_ONLY: ::c_int = 2509; 2543 pub const _HURD_ERRNOS: usize = 122; 2544 2545 // sched.h 2546 pub const SCHED_OTHER: ::c_int = 0; 2547 pub const SCHED_FIFO: ::c_int = 1; 2548 pub const SCHED_RR: ::c_int = 2; 2549 pub const _BITS_TYPES_STRUCT_SCHED_PARAM: usize = 1; 2550 pub const __CPU_SETSIZE: usize = 1024; 2551 pub const CPU_SETSIZE: usize = 1024; 2552 2553 // pthread.h 2554 pub const PTHREAD_SPINLOCK_INITIALIZER: ::c_int = 0; 2555 pub const PTHREAD_CANCEL_DISABLE: ::c_int = 0; 2556 pub const PTHREAD_CANCEL_ENABLE: ::c_int = 1; 2557 pub const PTHREAD_CANCEL_DEFERRED: ::c_int = 0; 2558 pub const PTHREAD_CANCEL_ASYNCHRONOUS: ::c_int = 1; 2559 pub const PTHREAD_BARRIER_SERIAL_THREAD: ::c_int = -1; 2560 2561 // netinet/tcp.h 2562 pub const TCP_NODELAY: ::c_int = 1; 2563 pub const TCP_MAXSEG: ::c_int = 2; 2564 pub const TCP_CORK: ::c_int = 3; 2565 pub const TCP_KEEPIDLE: ::c_int = 4; 2566 pub const TCP_KEEPINTVL: ::c_int = 5; 2567 pub const TCP_KEEPCNT: ::c_int = 6; 2568 pub const TCP_SYNCNT: ::c_int = 7; 2569 pub const TCP_LINGER2: ::c_int = 8; 2570 pub const TCP_DEFER_ACCEPT: ::c_int = 9; 2571 pub const TCP_WINDOW_CLAMP: ::c_int = 10; 2572 pub const TCP_INFO: ::c_int = 11; 2573 pub const TCP_QUICKACK: ::c_int = 12; 2574 pub const TCP_CONGESTION: ::c_int = 13; 2575 pub const TCP_MD5SIG: ::c_int = 14; 2576 pub const TCP_COOKIE_TRANSACTIONS: ::c_int = 15; 2577 pub const TCP_THIN_LINEAR_TIMEOUTS: ::c_int = 16; 2578 pub const TCP_THIN_DUPACK: ::c_int = 17; 2579 pub const TCP_USER_TIMEOUT: ::c_int = 18; 2580 pub const TCP_REPAIR: ::c_int = 19; 2581 pub const TCP_REPAIR_QUEUE: ::c_int = 20; 2582 pub const TCP_QUEUE_SEQ: ::c_int = 21; 2583 pub const TCP_REPAIR_OPTIONS: ::c_int = 22; 2584 pub const TCP_FASTOPEN: ::c_int = 23; 2585 pub const TCP_TIMESTAMP: ::c_int = 24; 2586 pub const TCP_NOTSENT_LOWAT: ::c_int = 25; 2587 pub const TCP_CC_INFO: ::c_int = 26; 2588 pub const TCP_SAVE_SYN: ::c_int = 27; 2589 pub const TCP_SAVED_SYN: ::c_int = 28; 2590 pub const TCP_REPAIR_WINDOW: ::c_int = 29; 2591 pub const TCP_FASTOPEN_CONNECT: ::c_int = 30; 2592 pub const TCP_ULP: ::c_int = 31; 2593 pub const TCP_MD5SIG_EXT: ::c_int = 32; 2594 pub const TCP_FASTOPEN_KEY: ::c_int = 33; 2595 pub const TCP_FASTOPEN_NO_COOKIE: ::c_int = 34; 2596 pub const TCP_ZEROCOPY_RECEIVE: ::c_int = 35; 2597 pub const TCP_INQ: ::c_int = 36; 2598 pub const TCP_CM_INQ: ::c_int = 36; 2599 pub const TCP_TX_DELAY: ::c_int = 37; 2600 pub const TCP_REPAIR_ON: ::c_int = 1; 2601 pub const TCP_REPAIR_OFF: ::c_int = 0; 2602 pub const TCP_REPAIR_OFF_NO_WP: ::c_int = -1; 2603 2604 // stdint.h 2605 pub const INT8_MIN: i8 = -128; 2606 pub const INT16_MIN: i16 = -32768; 2607 pub const INT32_MIN: i32 = -2147483648; 2608 pub const INT8_MAX: i8 = 127; 2609 pub const INT16_MAX: i16 = 32767; 2610 pub const INT32_MAX: i32 = 2147483647; 2611 pub const UINT8_MAX: u8 = 255; 2612 pub const UINT16_MAX: u16 = 65535; 2613 pub const UINT32_MAX: u32 = 4294967295; 2614 pub const INT_LEAST8_MIN: int_least8_t = -128; 2615 pub const INT_LEAST16_MIN: int_least16_t = -32768; 2616 pub const INT_LEAST32_MIN: int_least32_t = -2147483648; 2617 pub const INT_LEAST8_MAX: int_least8_t = 127; 2618 pub const INT_LEAST16_MAX: int_least16_t = 32767; 2619 pub const INT_LEAST32_MAX: int_least32_t = 2147483647; 2620 pub const UINT_LEAST8_MAX: uint_least8_t = 255; 2621 pub const UINT_LEAST16_MAX: uint_least16_t = 65535; 2622 pub const UINT_LEAST32_MAX: uint_least32_t = 4294967295; 2623 pub const INT_FAST8_MIN: int_fast8_t = -128; 2624 pub const INT_FAST16_MIN: int_fast16_t = -2147483648; 2625 pub const INT_FAST32_MIN: int_fast32_t = -2147483648; 2626 pub const INT_FAST8_MAX: int_fast8_t = 127; 2627 pub const INT_FAST16_MAX: int_fast16_t = 2147483647; 2628 pub const INT_FAST32_MAX: int_fast32_t = 2147483647; 2629 pub const UINT_FAST8_MAX: uint_fast8_t = 255; 2630 pub const UINT_FAST16_MAX: uint_fast16_t = 4294967295; 2631 pub const UINT_FAST32_MAX: uint_fast32_t = 4294967295; 2632 pub const INTPTR_MIN: __intptr_t = -2147483648; 2633 pub const INTPTR_MAX: __intptr_t = 2147483647; 2634 pub const UINTPTR_MAX: usize = 4294967295; 2635 pub const PTRDIFF_MIN: __ptrdiff_t = -2147483648; 2636 pub const PTRDIFF_MAX: __ptrdiff_t = 2147483647; 2637 pub const SIG_ATOMIC_MIN: __sig_atomic_t = -2147483648; 2638 pub const SIG_ATOMIC_MAX: __sig_atomic_t = 2147483647; 2639 pub const SIZE_MAX: usize = 4294967295; 2640 pub const WINT_MIN: wint_t = 0; 2641 pub const WINT_MAX: wint_t = 4294967295; 2642 pub const INT8_WIDTH: usize = 8; 2643 pub const UINT8_WIDTH: usize = 8; 2644 pub const INT16_WIDTH: usize = 16; 2645 pub const UINT16_WIDTH: usize = 16; 2646 pub const INT32_WIDTH: usize = 32; 2647 pub const UINT32_WIDTH: usize = 32; 2648 pub const INT64_WIDTH: usize = 64; 2649 pub const UINT64_WIDTH: usize = 64; 2650 pub const INT_LEAST8_WIDTH: usize = 8; 2651 pub const UINT_LEAST8_WIDTH: usize = 8; 2652 pub const INT_LEAST16_WIDTH: usize = 16; 2653 pub const UINT_LEAST16_WIDTH: usize = 16; 2654 pub const INT_LEAST32_WIDTH: usize = 32; 2655 pub const UINT_LEAST32_WIDTH: usize = 32; 2656 pub const INT_LEAST64_WIDTH: usize = 64; 2657 pub const UINT_LEAST64_WIDTH: usize = 64; 2658 pub const INT_FAST8_WIDTH: usize = 8; 2659 pub const UINT_FAST8_WIDTH: usize = 8; 2660 pub const INT_FAST16_WIDTH: usize = 32; 2661 pub const UINT_FAST16_WIDTH: usize = 32; 2662 pub const INT_FAST32_WIDTH: usize = 32; 2663 pub const UINT_FAST32_WIDTH: usize = 32; 2664 pub const INT_FAST64_WIDTH: usize = 64; 2665 pub const UINT_FAST64_WIDTH: usize = 64; 2666 pub const INTPTR_WIDTH: usize = 32; 2667 pub const UINTPTR_WIDTH: usize = 32; 2668 pub const INTMAX_WIDTH: usize = 64; 2669 pub const UINTMAX_WIDTH: usize = 64; 2670 pub const PTRDIFF_WIDTH: usize = 32; 2671 pub const SIG_ATOMIC_WIDTH: usize = 32; 2672 pub const SIZE_WIDTH: usize = 32; 2673 pub const WCHAR_WIDTH: usize = 32; 2674 pub const WINT_WIDTH: usize = 32; 2675 2676 pub const TH_FIN: u8 = 1; 2677 pub const TH_SYN: u8 = 2; 2678 pub const TH_RST: u8 = 4; 2679 pub const TH_PUSH: u8 = 8; 2680 pub const TH_ACK: u8 = 16; 2681 pub const TH_URG: u8 = 32; 2682 pub const TCPOPT_EOL: u8 = 0; 2683 pub const TCPOPT_NOP: u8 = 1; 2684 pub const TCPOPT_MAXSEG: u8 = 2; 2685 pub const TCPOLEN_MAXSEG: u8 = 4; 2686 pub const TCPOPT_WINDOW: u8 = 3; 2687 pub const TCPOLEN_WINDOW: u8 = 3; 2688 pub const TCPOPT_SACK_PERMITTED: u8 = 4; 2689 pub const TCPOLEN_SACK_PERMITTED: u8 = 2; 2690 pub const TCPOPT_SACK: u8 = 5; 2691 pub const TCPOPT_TIMESTAMP: u8 = 8; 2692 pub const TCPOLEN_TIMESTAMP: u8 = 10; 2693 pub const TCPOLEN_TSTAMP_APPA: u8 = 12; 2694 pub const TCPOPT_TSTAMP_HDR: u32 = 16844810; 2695 pub const TCP_MSS: usize = 512; 2696 pub const TCP_MAXWIN: usize = 65535; 2697 pub const TCP_MAX_WINSHIFT: usize = 14; 2698 pub const TCPI_OPT_TIMESTAMPS: u8 = 1; 2699 pub const TCPI_OPT_SACK: u8 = 2; 2700 pub const TCPI_OPT_WSCALE: u8 = 4; 2701 pub const TCPI_OPT_ECN: u8 = 8; 2702 pub const TCPI_OPT_ECN_SEEN: u8 = 16; 2703 pub const TCPI_OPT_SYN_DATA: u8 = 32; 2704 pub const TCP_MD5SIG_MAXKEYLEN: usize = 80; 2705 pub const TCP_MD5SIG_FLAG_PREFIX: usize = 1; 2706 pub const TCP_COOKIE_MIN: usize = 8; 2707 pub const TCP_COOKIE_MAX: usize = 16; 2708 pub const TCP_COOKIE_PAIR_SIZE: usize = 32; 2709 pub const TCP_COOKIE_IN_ALWAYS: ::c_int = 1; 2710 pub const TCP_COOKIE_OUT_NEVER: ::c_int = 2; 2711 pub const TCP_S_DATA_IN: ::c_int = 4; 2712 pub const TCP_S_DATA_OUT: ::c_int = 8; 2713 pub const TCP_MSS_DEFAULT: usize = 536; 2714 pub const TCP_MSS_DESIRED: usize = 1220; 2715 2716 // sys/wait.h 2717 pub const WCOREFLAG: ::c_int = 128; 2718 pub const WAIT_ANY: pid_t = -1; 2719 pub const WAIT_MYPGRP: pid_t = 0; 2720 2721 // sys/file.h 2722 pub const LOCK_SH: ::c_int = 1; 2723 pub const LOCK_EX: ::c_int = 2; 2724 pub const LOCK_UN: ::c_int = 8; 2725 pub const LOCK_NB: ::c_int = 4; 2726 2727 // sys/mman.h 2728 pub const PROT_NONE: ::c_int = 0; 2729 pub const PROT_READ: ::c_int = 4; 2730 pub const PROT_WRITE: ::c_int = 2; 2731 pub const PROT_EXEC: ::c_int = 1; 2732 pub const MAP_FILE: ::c_int = 1; 2733 pub const MAP_ANON: ::c_int = 2; 2734 pub const MAP_ANONYMOUS: ::c_int = MAP_ANON; 2735 pub const MAP_TYPE: ::c_int = 15; 2736 pub const MAP_COPY: ::c_int = 32; 2737 pub const MAP_SHARED: ::c_int = 16; 2738 pub const MAP_PRIVATE: ::c_int = 0; 2739 pub const MAP_FIXED: ::c_int = 256; 2740 pub const MAP_NOEXTEND: ::c_int = 512; 2741 pub const MAP_HASSEMPHORE: ::c_int = 1024; 2742 pub const MAP_INHERIT: ::c_int = 2048; 2743 pub const MAP_FAILED: *mut ::c_void = !0 as *mut ::c_void; 2744 pub const MADV_NORMAL: ::c_int = 0; 2745 pub const MADV_RANDOM: ::c_int = 1; 2746 pub const MADV_SEQUENTIAL: ::c_int = 2; 2747 pub const MADV_WILLNEED: ::c_int = 3; 2748 pub const MADV_DONTNEED: ::c_int = 4; 2749 pub const POSIX_MADV_NORMAL: ::c_int = 0; 2750 pub const POSIX_MADV_RANDOM: ::c_int = 1; 2751 pub const POSIX_MADV_SEQUENTIAL: ::c_int = 2; 2752 pub const POSIX_MADV_WILLNEED: ::c_int = 3; 2753 pub const POSIX_MADV_WONTNEED: ::c_int = 4; 2754 2755 pub const MS_ASYNC: ::c_int = 1; 2756 pub const MS_SYNC: ::c_int = 0; 2757 pub const MS_INVALIDATE: ::c_int = 2; 2758 pub const MREMAP_MAYMOVE: ::c_int = 1; 2759 pub const MREMAP_FIXED: ::c_int = 2; 2760 pub const MCL_CURRENT: ::c_int = 0x0001; 2761 pub const MCL_FUTURE: ::c_int = 0x0002; 2762 2763 // spawn.h 2764 pub const POSIX_SPAWN_USEVFORK: ::c_int = 64; 2765 pub const POSIX_SPAWN_SETSID: ::c_int = 128; 2766 2767 // sys/syslog.h 2768 pub const LOG_CRON: ::c_int = 9 << 3; 2769 pub const LOG_AUTHPRIV: ::c_int = 10 << 3; 2770 pub const LOG_FTP: ::c_int = 11 << 3; 2771 pub const LOG_PERROR: ::c_int = 0x20; 2772 2773 // net/if.h 2774 pub const IFF_UP: ::c_int = 0x1; 2775 pub const IFF_BROADCAST: ::c_int = 0x2; 2776 pub const IFF_DEBUG: ::c_int = 0x4; 2777 pub const IFF_LOOPBACK: ::c_int = 0x8; 2778 pub const IFF_POINTOPOINT: ::c_int = 0x10; 2779 pub const IFF_NOTRAILERS: ::c_int = 0x20; 2780 pub const IFF_RUNNING: ::c_int = 0x40; 2781 pub const IFF_NOARP: ::c_int = 0x80; 2782 pub const IFF_PROMISC: ::c_int = 0x100; 2783 pub const IFF_ALLMULTI: ::c_int = 0x200; 2784 pub const IFF_MASTER: ::c_int = 0x400; 2785 pub const IFF_SLAVE: ::c_int = 0x800; 2786 pub const IFF_MULTICAST: ::c_int = 0x1000; 2787 pub const IFF_PORTSEL: ::c_int = 0x2000; 2788 pub const IFF_AUTOMEDIA: ::c_int = 0x4000; 2789 pub const IFF_DYNAMIC: ::c_int = 0x8000; 2790 2791 // random.h 2792 pub const GRND_NONBLOCK: ::c_uint = 1; 2793 pub const GRND_RANDOM: ::c_uint = 2; 2794 pub const GRND_INSECURE: ::c_uint = 4; 2795 2796 pub const _PC_LINK_MAX: ::c_int = 0; 2797 pub const _PC_MAX_CANON: ::c_int = 1; 2798 pub const _PC_MAX_INPUT: ::c_int = 2; 2799 pub const _PC_NAME_MAX: ::c_int = 3; 2800 pub const _PC_PATH_MAX: ::c_int = 4; 2801 pub const _PC_PIPE_BUF: ::c_int = 5; 2802 pub const _PC_CHOWN_RESTRICTED: ::c_int = 6; 2803 pub const _PC_NO_TRUNC: ::c_int = 7; 2804 pub const _PC_VDISABLE: ::c_int = 8; 2805 pub const _PC_SYNC_IO: ::c_int = 9; 2806 pub const _PC_ASYNC_IO: ::c_int = 10; 2807 pub const _PC_PRIO_IO: ::c_int = 11; 2808 pub const _PC_SOCK_MAXBUF: ::c_int = 12; 2809 pub const _PC_FILESIZEBITS: ::c_int = 13; 2810 pub const _PC_REC_INCR_XFER_SIZE: ::c_int = 14; 2811 pub const _PC_REC_MAX_XFER_SIZE: ::c_int = 15; 2812 pub const _PC_REC_MIN_XFER_SIZE: ::c_int = 16; 2813 pub const _PC_REC_XFER_ALIGN: ::c_int = 17; 2814 pub const _PC_ALLOC_SIZE_MIN: ::c_int = 18; 2815 pub const _PC_SYMLINK_MAX: ::c_int = 19; 2816 pub const _PC_2_SYMLINKS: ::c_int = 20; 2817 pub const _SC_ARG_MAX: ::c_int = 0; 2818 pub const _SC_CHILD_MAX: ::c_int = 1; 2819 pub const _SC_CLK_TCK: ::c_int = 2; 2820 pub const _SC_NGROUPS_MAX: ::c_int = 3; 2821 pub const _SC_OPEN_MAX: ::c_int = 4; 2822 pub const _SC_STREAM_MAX: ::c_int = 5; 2823 pub const _SC_TZNAME_MAX: ::c_int = 6; 2824 pub const _SC_JOB_CONTROL: ::c_int = 7; 2825 pub const _SC_SAVED_IDS: ::c_int = 8; 2826 pub const _SC_REALTIME_SIGNALS: ::c_int = 9; 2827 pub const _SC_PRIORITY_SCHEDULING: ::c_int = 10; 2828 pub const _SC_TIMERS: ::c_int = 11; 2829 pub const _SC_ASYNCHRONOUS_IO: ::c_int = 12; 2830 pub const _SC_PRIORITIZED_IO: ::c_int = 13; 2831 pub const _SC_SYNCHRONIZED_IO: ::c_int = 14; 2832 pub const _SC_FSYNC: ::c_int = 15; 2833 pub const _SC_MAPPED_FILES: ::c_int = 16; 2834 pub const _SC_MEMLOCK: ::c_int = 17; 2835 pub const _SC_MEMLOCK_RANGE: ::c_int = 18; 2836 pub const _SC_MEMORY_PROTECTION: ::c_int = 19; 2837 pub const _SC_MESSAGE_PASSING: ::c_int = 20; 2838 pub const _SC_SEMAPHORES: ::c_int = 21; 2839 pub const _SC_SHARED_MEMORY_OBJECTS: ::c_int = 22; 2840 pub const _SC_AIO_LISTIO_MAX: ::c_int = 23; 2841 pub const _SC_AIO_MAX: ::c_int = 24; 2842 pub const _SC_AIO_PRIO_DELTA_MAX: ::c_int = 25; 2843 pub const _SC_DELAYTIMER_MAX: ::c_int = 26; 2844 pub const _SC_MQ_OPEN_MAX: ::c_int = 27; 2845 pub const _SC_MQ_PRIO_MAX: ::c_int = 28; 2846 pub const _SC_VERSION: ::c_int = 29; 2847 pub const _SC_PAGESIZE: ::c_int = 30; 2848 pub const _SC_PAGE_SIZE: ::c_int = 30; 2849 pub const _SC_RTSIG_MAX: ::c_int = 31; 2850 pub const _SC_SEM_NSEMS_MAX: ::c_int = 32; 2851 pub const _SC_SEM_VALUE_MAX: ::c_int = 33; 2852 pub const _SC_SIGQUEUE_MAX: ::c_int = 34; 2853 pub const _SC_TIMER_MAX: ::c_int = 35; 2854 pub const _SC_BC_BASE_MAX: ::c_int = 36; 2855 pub const _SC_BC_DIM_MAX: ::c_int = 37; 2856 pub const _SC_BC_SCALE_MAX: ::c_int = 38; 2857 pub const _SC_BC_STRING_MAX: ::c_int = 39; 2858 pub const _SC_COLL_WEIGHTS_MAX: ::c_int = 40; 2859 pub const _SC_EQUIV_CLASS_MAX: ::c_int = 41; 2860 pub const _SC_EXPR_NEST_MAX: ::c_int = 42; 2861 pub const _SC_LINE_MAX: ::c_int = 43; 2862 pub const _SC_RE_DUP_MAX: ::c_int = 44; 2863 pub const _SC_CHARCLASS_NAME_MAX: ::c_int = 45; 2864 pub const _SC_2_VERSION: ::c_int = 46; 2865 pub const _SC_2_C_BIND: ::c_int = 47; 2866 pub const _SC_2_C_DEV: ::c_int = 48; 2867 pub const _SC_2_FORT_DEV: ::c_int = 49; 2868 pub const _SC_2_FORT_RUN: ::c_int = 50; 2869 pub const _SC_2_SW_DEV: ::c_int = 51; 2870 pub const _SC_2_LOCALEDEF: ::c_int = 52; 2871 pub const _SC_PII: ::c_int = 53; 2872 pub const _SC_PII_XTI: ::c_int = 54; 2873 pub const _SC_PII_SOCKET: ::c_int = 55; 2874 pub const _SC_PII_INTERNET: ::c_int = 56; 2875 pub const _SC_PII_OSI: ::c_int = 57; 2876 pub const _SC_POLL: ::c_int = 58; 2877 pub const _SC_SELECT: ::c_int = 59; 2878 pub const _SC_UIO_MAXIOV: ::c_int = 60; 2879 pub const _SC_IOV_MAX: ::c_int = 60; 2880 pub const _SC_PII_INTERNET_STREAM: ::c_int = 61; 2881 pub const _SC_PII_INTERNET_DGRAM: ::c_int = 62; 2882 pub const _SC_PII_OSI_COTS: ::c_int = 63; 2883 pub const _SC_PII_OSI_CLTS: ::c_int = 64; 2884 pub const _SC_PII_OSI_M: ::c_int = 65; 2885 pub const _SC_T_IOV_MAX: ::c_int = 66; 2886 pub const _SC_THREADS: ::c_int = 67; 2887 pub const _SC_THREAD_SAFE_FUNCTIONS: ::c_int = 68; 2888 pub const _SC_GETGR_R_SIZE_MAX: ::c_int = 69; 2889 pub const _SC_GETPW_R_SIZE_MAX: ::c_int = 70; 2890 pub const _SC_LOGIN_NAME_MAX: ::c_int = 71; 2891 pub const _SC_TTY_NAME_MAX: ::c_int = 72; 2892 pub const _SC_THREAD_DESTRUCTOR_ITERATIONS: ::c_int = 73; 2893 pub const _SC_THREAD_KEYS_MAX: ::c_int = 74; 2894 pub const _SC_THREAD_STACK_MIN: ::c_int = 75; 2895 pub const _SC_THREAD_THREADS_MAX: ::c_int = 76; 2896 pub const _SC_THREAD_ATTR_STACKADDR: ::c_int = 77; 2897 pub const _SC_THREAD_ATTR_STACKSIZE: ::c_int = 78; 2898 pub const _SC_THREAD_PRIORITY_SCHEDULING: ::c_int = 79; 2899 pub const _SC_THREAD_PRIO_INHERIT: ::c_int = 80; 2900 pub const _SC_THREAD_PRIO_PROTECT: ::c_int = 81; 2901 pub const _SC_THREAD_PROCESS_SHARED: ::c_int = 82; 2902 pub const _SC_NPROCESSORS_CONF: ::c_int = 83; 2903 pub const _SC_NPROCESSORS_ONLN: ::c_int = 84; 2904 pub const _SC_PHYS_PAGES: ::c_int = 85; 2905 pub const _SC_AVPHYS_PAGES: ::c_int = 86; 2906 pub const _SC_ATEXIT_MAX: ::c_int = 87; 2907 pub const _SC_PASS_MAX: ::c_int = 88; 2908 pub const _SC_XOPEN_VERSION: ::c_int = 89; 2909 pub const _SC_XOPEN_XCU_VERSION: ::c_int = 90; 2910 pub const _SC_XOPEN_UNIX: ::c_int = 91; 2911 pub const _SC_XOPEN_CRYPT: ::c_int = 92; 2912 pub const _SC_XOPEN_ENH_I18N: ::c_int = 93; 2913 pub const _SC_XOPEN_SHM: ::c_int = 94; 2914 pub const _SC_2_CHAR_TERM: ::c_int = 95; 2915 pub const _SC_2_C_VERSION: ::c_int = 96; 2916 pub const _SC_2_UPE: ::c_int = 97; 2917 pub const _SC_XOPEN_XPG2: ::c_int = 98; 2918 pub const _SC_XOPEN_XPG3: ::c_int = 99; 2919 pub const _SC_XOPEN_XPG4: ::c_int = 100; 2920 pub const _SC_CHAR_BIT: ::c_int = 101; 2921 pub const _SC_CHAR_MAX: ::c_int = 102; 2922 pub const _SC_CHAR_MIN: ::c_int = 103; 2923 pub const _SC_INT_MAX: ::c_int = 104; 2924 pub const _SC_INT_MIN: ::c_int = 105; 2925 pub const _SC_LONG_BIT: ::c_int = 106; 2926 pub const _SC_WORD_BIT: ::c_int = 107; 2927 pub const _SC_MB_LEN_MAX: ::c_int = 108; 2928 pub const _SC_NZERO: ::c_int = 109; 2929 pub const _SC_SSIZE_MAX: ::c_int = 110; 2930 pub const _SC_SCHAR_MAX: ::c_int = 111; 2931 pub const _SC_SCHAR_MIN: ::c_int = 112; 2932 pub const _SC_SHRT_MAX: ::c_int = 113; 2933 pub const _SC_SHRT_MIN: ::c_int = 114; 2934 pub const _SC_UCHAR_MAX: ::c_int = 115; 2935 pub const _SC_UINT_MAX: ::c_int = 116; 2936 pub const _SC_ULONG_MAX: ::c_int = 117; 2937 pub const _SC_USHRT_MAX: ::c_int = 118; 2938 pub const _SC_NL_ARGMAX: ::c_int = 119; 2939 pub const _SC_NL_LANGMAX: ::c_int = 120; 2940 pub const _SC_NL_MSGMAX: ::c_int = 121; 2941 pub const _SC_NL_NMAX: ::c_int = 122; 2942 pub const _SC_NL_SETMAX: ::c_int = 123; 2943 pub const _SC_NL_TEXTMAX: ::c_int = 124; 2944 pub const _SC_XBS5_ILP32_OFF32: ::c_int = 125; 2945 pub const _SC_XBS5_ILP32_OFFBIG: ::c_int = 126; 2946 pub const _SC_XBS5_LP64_OFF64: ::c_int = 127; 2947 pub const _SC_XBS5_LPBIG_OFFBIG: ::c_int = 128; 2948 pub const _SC_XOPEN_LEGACY: ::c_int = 129; 2949 pub const _SC_XOPEN_REALTIME: ::c_int = 130; 2950 pub const _SC_XOPEN_REALTIME_THREADS: ::c_int = 131; 2951 pub const _SC_ADVISORY_INFO: ::c_int = 132; 2952 pub const _SC_BARRIERS: ::c_int = 133; 2953 pub const _SC_BASE: ::c_int = 134; 2954 pub const _SC_C_LANG_SUPPORT: ::c_int = 135; 2955 pub const _SC_C_LANG_SUPPORT_R: ::c_int = 136; 2956 pub const _SC_CLOCK_SELECTION: ::c_int = 137; 2957 pub const _SC_CPUTIME: ::c_int = 138; 2958 pub const _SC_THREAD_CPUTIME: ::c_int = 139; 2959 pub const _SC_DEVICE_IO: ::c_int = 140; 2960 pub const _SC_DEVICE_SPECIFIC: ::c_int = 141; 2961 pub const _SC_DEVICE_SPECIFIC_R: ::c_int = 142; 2962 pub const _SC_FD_MGMT: ::c_int = 143; 2963 pub const _SC_FIFO: ::c_int = 144; 2964 pub const _SC_PIPE: ::c_int = 145; 2965 pub const _SC_FILE_ATTRIBUTES: ::c_int = 146; 2966 pub const _SC_FILE_LOCKING: ::c_int = 147; 2967 pub const _SC_FILE_SYSTEM: ::c_int = 148; 2968 pub const _SC_MONOTONIC_CLOCK: ::c_int = 149; 2969 pub const _SC_MULTI_PROCESS: ::c_int = 150; 2970 pub const _SC_SINGLE_PROCESS: ::c_int = 151; 2971 pub const _SC_NETWORKING: ::c_int = 152; 2972 pub const _SC_READER_WRITER_LOCKS: ::c_int = 153; 2973 pub const _SC_SPIN_LOCKS: ::c_int = 154; 2974 pub const _SC_REGEXP: ::c_int = 155; 2975 pub const _SC_REGEX_VERSION: ::c_int = 156; 2976 pub const _SC_SHELL: ::c_int = 157; 2977 pub const _SC_SIGNALS: ::c_int = 158; 2978 pub const _SC_SPAWN: ::c_int = 159; 2979 pub const _SC_SPORADIC_SERVER: ::c_int = 160; 2980 pub const _SC_THREAD_SPORADIC_SERVER: ::c_int = 161; 2981 pub const _SC_SYSTEM_DATABASE: ::c_int = 162; 2982 pub const _SC_SYSTEM_DATABASE_R: ::c_int = 163; 2983 pub const _SC_TIMEOUTS: ::c_int = 164; 2984 pub const _SC_TYPED_MEMORY_OBJECTS: ::c_int = 165; 2985 pub const _SC_USER_GROUPS: ::c_int = 166; 2986 pub const _SC_USER_GROUPS_R: ::c_int = 167; 2987 pub const _SC_2_PBS: ::c_int = 168; 2988 pub const _SC_2_PBS_ACCOUNTING: ::c_int = 169; 2989 pub const _SC_2_PBS_LOCATE: ::c_int = 170; 2990 pub const _SC_2_PBS_MESSAGE: ::c_int = 171; 2991 pub const _SC_2_PBS_TRACK: ::c_int = 172; 2992 pub const _SC_SYMLOOP_MAX: ::c_int = 173; 2993 pub const _SC_STREAMS: ::c_int = 174; 2994 pub const _SC_2_PBS_CHECKPOINT: ::c_int = 175; 2995 pub const _SC_V6_ILP32_OFF32: ::c_int = 176; 2996 pub const _SC_V6_ILP32_OFFBIG: ::c_int = 177; 2997 pub const _SC_V6_LP64_OFF64: ::c_int = 178; 2998 pub const _SC_V6_LPBIG_OFFBIG: ::c_int = 179; 2999 pub const _SC_HOST_NAME_MAX: ::c_int = 180; 3000 pub const _SC_TRACE: ::c_int = 181; 3001 pub const _SC_TRACE_EVENT_FILTER: ::c_int = 182; 3002 pub const _SC_TRACE_INHERIT: ::c_int = 183; 3003 pub const _SC_TRACE_LOG: ::c_int = 184; 3004 pub const _SC_LEVEL1_ICACHE_SIZE: ::c_int = 185; 3005 pub const _SC_LEVEL1_ICACHE_ASSOC: ::c_int = 186; 3006 pub const _SC_LEVEL1_ICACHE_LINESIZE: ::c_int = 187; 3007 pub const _SC_LEVEL1_DCACHE_SIZE: ::c_int = 188; 3008 pub const _SC_LEVEL1_DCACHE_ASSOC: ::c_int = 189; 3009 pub const _SC_LEVEL1_DCACHE_LINESIZE: ::c_int = 190; 3010 pub const _SC_LEVEL2_CACHE_SIZE: ::c_int = 191; 3011 pub const _SC_LEVEL2_CACHE_ASSOC: ::c_int = 192; 3012 pub const _SC_LEVEL2_CACHE_LINESIZE: ::c_int = 193; 3013 pub const _SC_LEVEL3_CACHE_SIZE: ::c_int = 194; 3014 pub const _SC_LEVEL3_CACHE_ASSOC: ::c_int = 195; 3015 pub const _SC_LEVEL3_CACHE_LINESIZE: ::c_int = 196; 3016 pub const _SC_LEVEL4_CACHE_SIZE: ::c_int = 197; 3017 pub const _SC_LEVEL4_CACHE_ASSOC: ::c_int = 198; 3018 pub const _SC_LEVEL4_CACHE_LINESIZE: ::c_int = 199; 3019 pub const _SC_IPV6: ::c_int = 235; 3020 pub const _SC_RAW_SOCKETS: ::c_int = 236; 3021 pub const _SC_V7_ILP32_OFF32: ::c_int = 237; 3022 pub const _SC_V7_ILP32_OFFBIG: ::c_int = 238; 3023 pub const _SC_V7_LP64_OFF64: ::c_int = 239; 3024 pub const _SC_V7_LPBIG_OFFBIG: ::c_int = 240; 3025 pub const _SC_SS_REPL_MAX: ::c_int = 241; 3026 pub const _SC_TRACE_EVENT_NAME_MAX: ::c_int = 242; 3027 pub const _SC_TRACE_NAME_MAX: ::c_int = 243; 3028 pub const _SC_TRACE_SYS_MAX: ::c_int = 244; 3029 pub const _SC_TRACE_USER_EVENT_MAX: ::c_int = 245; 3030 pub const _SC_XOPEN_STREAMS: ::c_int = 246; 3031 pub const _SC_THREAD_ROBUST_PRIO_INHERIT: ::c_int = 247; 3032 pub const _SC_THREAD_ROBUST_PRIO_PROTECT: ::c_int = 248; 3033 pub const _SC_MINSIGSTKSZ: ::c_int = 249; 3034 pub const _SC_SIGSTKSZ: ::c_int = 250; 3035 3036 pub const _CS_PATH: ::c_int = 0; 3037 pub const _CS_V6_WIDTH_RESTRICTED_ENVS: ::c_int = 1; 3038 pub const _CS_GNU_LIBC_VERSION: ::c_int = 2; 3039 pub const _CS_GNU_LIBPTHREAD_VERSION: ::c_int = 3; 3040 pub const _CS_V5_WIDTH_RESTRICTED_ENVS: ::c_int = 4; 3041 pub const _CS_V7_WIDTH_RESTRICTED_ENVS: ::c_int = 5; 3042 pub const _CS_LFS_CFLAGS: ::c_int = 1000; 3043 pub const _CS_LFS_LDFLAGS: ::c_int = 1001; 3044 pub const _CS_LFS_LIBS: ::c_int = 1002; 3045 pub const _CS_LFS_LINTFLAGS: ::c_int = 1003; 3046 pub const _CS_LFS64_CFLAGS: ::c_int = 1004; 3047 pub const _CS_LFS64_LDFLAGS: ::c_int = 1005; 3048 pub const _CS_LFS64_LIBS: ::c_int = 1006; 3049 pub const _CS_LFS64_LINTFLAGS: ::c_int = 1007; 3050 pub const _CS_XBS5_ILP32_OFF32_CFLAGS: ::c_int = 1100; 3051 pub const _CS_XBS5_ILP32_OFF32_LDFLAGS: ::c_int = 1101; 3052 pub const _CS_XBS5_ILP32_OFF32_LIBS: ::c_int = 1102; 3053 pub const _CS_XBS5_ILP32_OFF32_LINTFLAGS: ::c_int = 1103; 3054 pub const _CS_XBS5_ILP32_OFFBIG_CFLAGS: ::c_int = 1104; 3055 pub const _CS_XBS5_ILP32_OFFBIG_LDFLAGS: ::c_int = 1105; 3056 pub const _CS_XBS5_ILP32_OFFBIG_LIBS: ::c_int = 1106; 3057 pub const _CS_XBS5_ILP32_OFFBIG_LINTFLAGS: ::c_int = 1107; 3058 pub const _CS_XBS5_LP64_OFF64_CFLAGS: ::c_int = 1108; 3059 pub const _CS_XBS5_LP64_OFF64_LDFLAGS: ::c_int = 1109; 3060 pub const _CS_XBS5_LP64_OFF64_LIBS: ::c_int = 1110; 3061 pub const _CS_XBS5_LP64_OFF64_LINTFLAGS: ::c_int = 1111; 3062 pub const _CS_XBS5_LPBIG_OFFBIG_CFLAGS: ::c_int = 1112; 3063 pub const _CS_XBS5_LPBIG_OFFBIG_LDFLAGS: ::c_int = 1113; 3064 pub const _CS_XBS5_LPBIG_OFFBIG_LIBS: ::c_int = 1114; 3065 pub const _CS_XBS5_LPBIG_OFFBIG_LINTFLAGS: ::c_int = 1115; 3066 pub const _CS_POSIX_V6_ILP32_OFF32_CFLAGS: ::c_int = 1116; 3067 pub const _CS_POSIX_V6_ILP32_OFF32_LDFLAGS: ::c_int = 1117; 3068 pub const _CS_POSIX_V6_ILP32_OFF32_LIBS: ::c_int = 1118; 3069 pub const _CS_POSIX_V6_ILP32_OFF32_LINTFLAGS: ::c_int = 1119; 3070 pub const _CS_POSIX_V6_ILP32_OFFBIG_CFLAGS: ::c_int = 1120; 3071 pub const _CS_POSIX_V6_ILP32_OFFBIG_LDFLAGS: ::c_int = 1121; 3072 pub const _CS_POSIX_V6_ILP32_OFFBIG_LIBS: ::c_int = 1122; 3073 pub const _CS_POSIX_V6_ILP32_OFFBIG_LINTFLAGS: ::c_int = 1123; 3074 pub const _CS_POSIX_V6_LP64_OFF64_CFLAGS: ::c_int = 1124; 3075 pub const _CS_POSIX_V6_LP64_OFF64_LDFLAGS: ::c_int = 1125; 3076 pub const _CS_POSIX_V6_LP64_OFF64_LIBS: ::c_int = 1126; 3077 pub const _CS_POSIX_V6_LP64_OFF64_LINTFLAGS: ::c_int = 1127; 3078 pub const _CS_POSIX_V6_LPBIG_OFFBIG_CFLAGS: ::c_int = 1128; 3079 pub const _CS_POSIX_V6_LPBIG_OFFBIG_LDFLAGS: ::c_int = 1129; 3080 pub const _CS_POSIX_V6_LPBIG_OFFBIG_LIBS: ::c_int = 1130; 3081 pub const _CS_POSIX_V6_LPBIG_OFFBIG_LINTFLAGS: ::c_int = 1131; 3082 pub const _CS_POSIX_V7_ILP32_OFF32_CFLAGS: ::c_int = 1132; 3083 pub const _CS_POSIX_V7_ILP32_OFF32_LDFLAGS: ::c_int = 1133; 3084 pub const _CS_POSIX_V7_ILP32_OFF32_LIBS: ::c_int = 1134; 3085 pub const _CS_POSIX_V7_ILP32_OFF32_LINTFLAGS: ::c_int = 1135; 3086 pub const _CS_POSIX_V7_ILP32_OFFBIG_CFLAGS: ::c_int = 1136; 3087 pub const _CS_POSIX_V7_ILP32_OFFBIG_LDFLAGS: ::c_int = 1137; 3088 pub const _CS_POSIX_V7_ILP32_OFFBIG_LIBS: ::c_int = 1138; 3089 pub const _CS_POSIX_V7_ILP32_OFFBIG_LINTFLAGS: ::c_int = 1139; 3090 pub const _CS_POSIX_V7_LP64_OFF64_CFLAGS: ::c_int = 1140; 3091 pub const _CS_POSIX_V7_LP64_OFF64_LDFLAGS: ::c_int = 1141; 3092 pub const _CS_POSIX_V7_LP64_OFF64_LIBS: ::c_int = 1142; 3093 pub const _CS_POSIX_V7_LP64_OFF64_LINTFLAGS: ::c_int = 1143; 3094 pub const _CS_POSIX_V7_LPBIG_OFFBIG_CFLAGS: ::c_int = 1144; 3095 pub const _CS_POSIX_V7_LPBIG_OFFBIG_LDFLAGS: ::c_int = 1145; 3096 pub const _CS_POSIX_V7_LPBIG_OFFBIG_LIBS: ::c_int = 1146; 3097 pub const _CS_POSIX_V7_LPBIG_OFFBIG_LINTFLAGS: ::c_int = 1147; 3098 pub const _CS_V6_ENV: ::c_int = 1148; 3099 pub const _CS_V7_ENV: ::c_int = 1149; 3100 3101 pub const PTHREAD_PROCESS_PRIVATE: __pthread_process_shared = 0; 3102 pub const PTHREAD_PROCESS_SHARED: __pthread_process_shared = 1; 3103 3104 pub const PTHREAD_EXPLICIT_SCHED: __pthread_inheritsched = 0; 3105 pub const PTHREAD_INHERIT_SCHED: __pthread_inheritsched = 1; 3106 3107 pub const PTHREAD_SCOPE_SYSTEM: __pthread_contentionscope = 0; 3108 pub const PTHREAD_SCOPE_PROCESS: __pthread_contentionscope = 1; 3109 3110 pub const PTHREAD_CREATE_JOINABLE: __pthread_detachstate = 0; 3111 pub const PTHREAD_CREATE_DETACHED: __pthread_detachstate = 1; 3112 3113 pub const PTHREAD_PRIO_NONE: __pthread_mutex_protocol = 0; 3114 pub const PTHREAD_PRIO_INHERIT: __pthread_mutex_protocol = 1; 3115 pub const PTHREAD_PRIO_PROTECT: __pthread_mutex_protocol = 2; 3116 3117 pub const PTHREAD_MUTEX_TIMED: __pthread_mutex_type = 0; 3118 pub const PTHREAD_MUTEX_ERRORCHECK: __pthread_mutex_type = 1; 3119 pub const PTHREAD_MUTEX_RECURSIVE: __pthread_mutex_type = 2; 3120 3121 pub const PTHREAD_MUTEX_STALLED: __pthread_mutex_robustness = 0; 3122 pub const PTHREAD_MUTEX_ROBUST: __pthread_mutex_robustness = 256; 3123 3124 pub const RLIMIT_CPU: ::__rlimit_resource_t = 0; 3125 pub const RLIMIT_FSIZE: ::__rlimit_resource_t = 1; 3126 pub const RLIMIT_DATA: ::__rlimit_resource_t = 2; 3127 pub const RLIMIT_STACK: ::__rlimit_resource_t = 3; 3128 pub const RLIMIT_CORE: ::__rlimit_resource_t = 4; 3129 pub const RLIMIT_RSS: ::__rlimit_resource_t = 5; 3130 pub const RLIMIT_MEMLOCK: ::__rlimit_resource_t = 6; 3131 pub const RLIMIT_NPROC: ::__rlimit_resource_t = 7; 3132 pub const RLIMIT_OFILE: ::__rlimit_resource_t = 8; 3133 pub const RLIMIT_NOFILE: ::__rlimit_resource_t = 8; 3134 pub const RLIMIT_SBSIZE: ::__rlimit_resource_t = 9; 3135 pub const RLIMIT_AS: ::__rlimit_resource_t = 10; 3136 pub const RLIMIT_VMEM: ::__rlimit_resource_t = 10; 3137 pub const RLIMIT_NLIMITS: ::__rlimit_resource_t = 11; 3138 pub const RLIM_NLIMITS: ::__rlimit_resource_t = 11; 3139 3140 pub const RUSAGE_SELF: __rusage_who = 0; 3141 pub const RUSAGE_CHILDREN: __rusage_who = -1; 3142 3143 pub const PRIO_PROCESS: __priority_which = 0; 3144 pub const PRIO_PGRP: __priority_which = 1; 3145 pub const PRIO_USER: __priority_which = 2; 3146 3147 pub const __UT_LINESIZE: usize = 32; 3148 pub const __UT_NAMESIZE: usize = 32; 3149 pub const __UT_HOSTSIZE: usize = 256; 3150 3151 pub const SOCK_STREAM: ::c_int = 1; 3152 pub const SOCK_DGRAM: ::c_int = 2; 3153 pub const SOCK_RAW: ::c_int = 3; 3154 pub const SOCK_RDM: ::c_int = 4; 3155 pub const SOCK_SEQPACKET: ::c_int = 5; 3156 pub const SOCK_CLOEXEC: ::c_int = 4194304; 3157 pub const SOCK_NONBLOCK: ::c_int = 2048; 3158 3159 pub const MSG_OOB: ::c_int = 1; 3160 pub const MSG_PEEK: ::c_int = 2; 3161 pub const MSG_DONTROUTE: ::c_int = 4; 3162 pub const MSG_EOR: ::c_int = 8; 3163 pub const MSG_TRUNC: ::c_int = 16; 3164 pub const MSG_CTRUNC: ::c_int = 32; 3165 pub const MSG_WAITALL: ::c_int = 64; 3166 pub const MSG_DONTWAIT: ::c_int = 128; 3167 pub const MSG_NOSIGNAL: ::c_int = 1024; 3168 pub const MSG_CMSG_CLOEXEC: ::c_int = 0x40000000; 3169 3170 pub const SCM_RIGHTS: ::c_int = 1; 3171 pub const SCM_TIMESTAMP: ::c_int = 2; 3172 pub const SCM_CREDS: ::c_int = 3; 3173 3174 pub const SO_DEBUG: ::c_int = 1; 3175 pub const SO_ACCEPTCONN: ::c_int = 2; 3176 pub const SO_REUSEADDR: ::c_int = 4; 3177 pub const SO_KEEPALIVE: ::c_int = 8; 3178 pub const SO_DONTROUTE: ::c_int = 16; 3179 pub const SO_BROADCAST: ::c_int = 32; 3180 pub const SO_USELOOPBACK: ::c_int = 64; 3181 pub const SO_LINGER: ::c_int = 128; 3182 pub const SO_OOBINLINE: ::c_int = 256; 3183 pub const SO_REUSEPORT: ::c_int = 512; 3184 pub const SO_SNDBUF: ::c_int = 4097; 3185 pub const SO_RCVBUF: ::c_int = 4098; 3186 pub const SO_SNDLOWAT: ::c_int = 4099; 3187 pub const SO_RCVLOWAT: ::c_int = 4100; 3188 pub const SO_SNDTIMEO: ::c_int = 4101; 3189 pub const SO_RCVTIMEO: ::c_int = 4102; 3190 pub const SO_ERROR: ::c_int = 4103; 3191 pub const SO_STYLE: ::c_int = 4104; 3192 pub const SO_TYPE: ::c_int = 4104; 3193 3194 pub const IPPROTO_IP: ::c_int = 0; 3195 pub const IPPROTO_ICMP: ::c_int = 1; 3196 pub const IPPROTO_IGMP: ::c_int = 2; 3197 pub const IPPROTO_IPIP: ::c_int = 4; 3198 pub const IPPROTO_TCP: ::c_int = 6; 3199 pub const IPPROTO_EGP: ::c_int = 8; 3200 pub const IPPROTO_PUP: ::c_int = 12; 3201 pub const IPPROTO_UDP: ::c_int = 17; 3202 pub const IPPROTO_IDP: ::c_int = 22; 3203 pub const IPPROTO_TP: ::c_int = 29; 3204 pub const IPPROTO_DCCP: ::c_int = 33; 3205 pub const IPPROTO_IPV6: ::c_int = 41; 3206 pub const IPPROTO_RSVP: ::c_int = 46; 3207 pub const IPPROTO_GRE: ::c_int = 47; 3208 pub const IPPROTO_ESP: ::c_int = 50; 3209 pub const IPPROTO_AH: ::c_int = 51; 3210 pub const IPPROTO_MTP: ::c_int = 92; 3211 pub const IPPROTO_BEETPH: ::c_int = 94; 3212 pub const IPPROTO_ENCAP: ::c_int = 98; 3213 pub const IPPROTO_PIM: ::c_int = 103; 3214 pub const IPPROTO_COMP: ::c_int = 108; 3215 pub const IPPROTO_L2TP: ::c_int = 115; 3216 pub const IPPROTO_SCTP: ::c_int = 132; 3217 pub const IPPROTO_UDPLITE: ::c_int = 136; 3218 pub const IPPROTO_MPLS: ::c_int = 137; 3219 pub const IPPROTO_ETHERNET: ::c_int = 143; 3220 pub const IPPROTO_RAW: ::c_int = 255; 3221 pub const IPPROTO_MPTCP: ::c_int = 262; 3222 pub const IPPROTO_MAX: ::c_int = 263; 3223 3224 pub const IPPROTO_HOPOPTS: ::c_int = 0; 3225 pub const IPPROTO_ROUTING: ::c_int = 43; 3226 pub const IPPROTO_FRAGMENT: ::c_int = 44; 3227 pub const IPPROTO_ICMPV6: ::c_int = 58; 3228 pub const IPPROTO_NONE: ::c_int = 59; 3229 pub const IPPROTO_DSTOPTS: ::c_int = 60; 3230 pub const IPPROTO_MH: ::c_int = 135; 3231 3232 pub const IPPORT_ECHO: in_port_t = 7; 3233 pub const IPPORT_DISCARD: in_port_t = 9; 3234 pub const IPPORT_SYSTAT: in_port_t = 11; 3235 pub const IPPORT_DAYTIME: in_port_t = 13; 3236 pub const IPPORT_NETSTAT: in_port_t = 15; 3237 pub const IPPORT_FTP: in_port_t = 21; 3238 pub const IPPORT_TELNET: in_port_t = 23; 3239 pub const IPPORT_SMTP: in_port_t = 25; 3240 pub const IPPORT_TIMESERVER: in_port_t = 37; 3241 pub const IPPORT_NAMESERVER: in_port_t = 42; 3242 pub const IPPORT_WHOIS: in_port_t = 43; 3243 pub const IPPORT_MTP: in_port_t = 57; 3244 pub const IPPORT_TFTP: in_port_t = 69; 3245 pub const IPPORT_RJE: in_port_t = 77; 3246 pub const IPPORT_FINGER: in_port_t = 79; 3247 pub const IPPORT_TTYLINK: in_port_t = 87; 3248 pub const IPPORT_SUPDUP: in_port_t = 95; 3249 pub const IPPORT_EXECSERVER: in_port_t = 512; 3250 pub const IPPORT_LOGINSERVER: in_port_t = 513; 3251 pub const IPPORT_CMDSERVER: in_port_t = 514; 3252 pub const IPPORT_EFSSERVER: in_port_t = 520; 3253 pub const IPPORT_BIFFUDP: in_port_t = 512; 3254 pub const IPPORT_WHOSERVER: in_port_t = 513; 3255 pub const IPPORT_ROUTESERVER: in_port_t = 520; 3256 pub const IPPORT_USERRESERVED: in_port_t = 5000; 3257 3258 pub const DT_UNKNOWN: ::c_uchar = 0; 3259 pub const DT_FIFO: ::c_uchar = 1; 3260 pub const DT_CHR: ::c_uchar = 2; 3261 pub const DT_DIR: ::c_uchar = 4; 3262 pub const DT_BLK: ::c_uchar = 6; 3263 pub const DT_REG: ::c_uchar = 8; 3264 pub const DT_LNK: ::c_uchar = 10; 3265 pub const DT_SOCK: ::c_uchar = 12; 3266 pub const DT_WHT: ::c_uchar = 14; 3267 3268 pub const ST_RDONLY: ::c_ulong = 1; 3269 pub const ST_NOSUID: ::c_ulong = 2; 3270 pub const ST_NOEXEC: ::c_ulong = 8; 3271 pub const ST_SYNCHRONOUS: ::c_ulong = 16; 3272 pub const ST_NOATIME: ::c_ulong = 32; 3273 pub const ST_RELATIME: ::c_ulong = 64; 3274 3275 pub const RTLD_DI_LMID: ::c_int = 1; 3276 pub const RTLD_DI_LINKMAP: ::c_int = 2; 3277 pub const RTLD_DI_CONFIGADDR: ::c_int = 3; 3278 pub const RTLD_DI_SERINFO: ::c_int = 4; 3279 pub const RTLD_DI_SERINFOSIZE: ::c_int = 5; 3280 pub const RTLD_DI_ORIGIN: ::c_int = 6; 3281 pub const RTLD_DI_PROFILENAME: ::c_int = 7; 3282 pub const RTLD_DI_PROFILEOUT: ::c_int = 8; 3283 pub const RTLD_DI_TLS_MODID: ::c_int = 9; 3284 pub const RTLD_DI_TLS_DATA: ::c_int = 10; 3285 pub const RTLD_DI_PHDR: ::c_int = 11; 3286 pub const RTLD_DI_MAX: ::c_int = 11; 3287 3288 pub const SI_ASYNCIO: ::c_int = -4; 3289 pub const SI_MESGQ: ::c_int = -3; 3290 pub const SI_TIMER: ::c_int = -2; 3291 pub const SI_QUEUE: ::c_int = -1; 3292 pub const SI_USER: ::c_int = 0; 3293 3294 pub const ILL_ILLOPC: ::c_int = 1; 3295 pub const ILL_ILLOPN: ::c_int = 2; 3296 pub const ILL_ILLADR: ::c_int = 3; 3297 pub const ILL_ILLTRP: ::c_int = 4; 3298 pub const ILL_PRVOPC: ::c_int = 5; 3299 pub const ILL_PRVREG: ::c_int = 6; 3300 pub const ILL_COPROC: ::c_int = 7; 3301 pub const ILL_BADSTK: ::c_int = 8; 3302 3303 pub const FPE_INTDIV: ::c_int = 1; 3304 pub const FPE_INTOVF: ::c_int = 2; 3305 pub const FPE_FLTDIV: ::c_int = 3; 3306 pub const FPE_FLTOVF: ::c_int = 4; 3307 pub const FPE_FLTUND: ::c_int = 5; 3308 pub const FPE_FLTRES: ::c_int = 6; 3309 pub const FPE_FLTINV: ::c_int = 7; 3310 pub const FPE_FLTSUB: ::c_int = 8; 3311 3312 pub const SEGV_MAPERR: ::c_int = 1; 3313 pub const SEGV_ACCERR: ::c_int = 2; 3314 3315 pub const BUS_ADRALN: ::c_int = 1; 3316 pub const BUS_ADRERR: ::c_int = 2; 3317 pub const BUS_OBJERR: ::c_int = 3; 3318 3319 pub const TRAP_BRKPT: ::c_int = 1; 3320 pub const TRAP_TRACE: ::c_int = 2; 3321 3322 pub const CLD_EXITED: ::c_int = 1; 3323 pub const CLD_KILLED: ::c_int = 2; 3324 pub const CLD_DUMPED: ::c_int = 3; 3325 pub const CLD_TRAPPED: ::c_int = 4; 3326 pub const CLD_STOPPED: ::c_int = 5; 3327 pub const CLD_CONTINUED: ::c_int = 6; 3328 3329 pub const POLL_IN: ::c_int = 1; 3330 pub const POLL_OUT: ::c_int = 2; 3331 pub const POLL_MSG: ::c_int = 3; 3332 pub const POLL_ERR: ::c_int = 4; 3333 pub const POLL_PRI: ::c_int = 5; 3334 pub const POLL_HUP: ::c_int = 6; 3335 3336 pub const SIGEV_SIGNAL: ::c_int = 0; 3337 pub const SIGEV_NONE: ::c_int = 1; 3338 pub const SIGEV_THREAD: ::c_int = 2; 3339 3340 pub const REG_GS: ::c_uint = 0; 3341 pub const REG_FS: ::c_uint = 1; 3342 pub const REG_ES: ::c_uint = 2; 3343 pub const REG_DS: ::c_uint = 3; 3344 pub const REG_EDI: ::c_uint = 4; 3345 pub const REG_ESI: ::c_uint = 5; 3346 pub const REG_EBP: ::c_uint = 6; 3347 pub const REG_ESP: ::c_uint = 7; 3348 pub const REG_EBX: ::c_uint = 8; 3349 pub const REG_EDX: ::c_uint = 9; 3350 pub const REG_ECX: ::c_uint = 10; 3351 pub const REG_EAX: ::c_uint = 11; 3352 pub const REG_TRAPNO: ::c_uint = 12; 3353 pub const REG_ERR: ::c_uint = 13; 3354 pub const REG_EIP: ::c_uint = 14; 3355 pub const REG_CS: ::c_uint = 15; 3356 pub const REG_EFL: ::c_uint = 16; 3357 pub const REG_UESP: ::c_uint = 17; 3358 pub const REG_SS: ::c_uint = 18; 3359 3360 pub const IOC_VOID: __ioctl_dir = 0; 3361 pub const IOC_OUT: __ioctl_dir = 1; 3362 pub const IOC_IN: __ioctl_dir = 2; 3363 pub const IOC_INOUT: __ioctl_dir = 3; 3364 3365 pub const IOC_8: __ioctl_datum = 0; 3366 pub const IOC_16: __ioctl_datum = 1; 3367 pub const IOC_32: __ioctl_datum = 2; 3368 pub const IOC_64: __ioctl_datum = 3; 3369 3370 pub const TCP_ESTABLISHED: ::c_uint = 1; 3371 pub const TCP_SYN_SENT: ::c_uint = 2; 3372 pub const TCP_SYN_RECV: ::c_uint = 3; 3373 pub const TCP_FIN_WAIT1: ::c_uint = 4; 3374 pub const TCP_FIN_WAIT2: ::c_uint = 5; 3375 pub const TCP_TIME_WAIT: ::c_uint = 6; 3376 pub const TCP_CLOSE: ::c_uint = 7; 3377 pub const TCP_CLOSE_WAIT: ::c_uint = 8; 3378 pub const TCP_LAST_ACK: ::c_uint = 9; 3379 pub const TCP_LISTEN: ::c_uint = 10; 3380 pub const TCP_CLOSING: ::c_uint = 11; 3381 3382 pub const TCP_CA_Open: tcp_ca_state = 0; 3383 pub const TCP_CA_Disorder: tcp_ca_state = 1; 3384 pub const TCP_CA_CWR: tcp_ca_state = 2; 3385 pub const TCP_CA_Recovery: tcp_ca_state = 3; 3386 pub const TCP_CA_Loss: tcp_ca_state = 4; 3387 3388 pub const TCP_NO_QUEUE: ::c_uint = 0; 3389 pub const TCP_RECV_QUEUE: ::c_uint = 1; 3390 pub const TCP_SEND_QUEUE: ::c_uint = 2; 3391 pub const TCP_QUEUES_NR: ::c_uint = 3; 3392 3393 pub const P_ALL: idtype_t = 0; 3394 pub const P_PID: idtype_t = 1; 3395 pub const P_PGID: idtype_t = 2; 3396 3397 pub const SS_ONSTACK: ::c_int = 1; 3398 pub const SS_DISABLE: ::c_int = 4; 3399 3400 pub const SHUT_RD: ::c_int = 0; 3401 pub const SHUT_WR: ::c_int = 1; 3402 pub const SHUT_RDWR: ::c_int = 2; 3403 pub const PTHREAD_MUTEX_INITIALIZER: pthread_mutex_t = pthread_mutex_t { 3404 __lock: 0, 3405 __owner_id: 0, 3406 __cnt: 0, 3407 __shpid: 0, 3408 __type: PTHREAD_MUTEX_TIMED as ::c_int, 3409 __flags: 0, 3410 __reserved1: 0, 3411 __reserved2: 0, 3412 }; 3413 pub const PTHREAD_COND_INITIALIZER: pthread_cond_t = pthread_cond_t { 3414 __lock: __PTHREAD_SPIN_LOCK_INITIALIZER, 3415 __queue: 0i64 as *mut __pthread, 3416 __attr: 0i64 as *mut __pthread_condattr, 3417 __wrefs: 0, 3418 __data: 0i64 as *mut ::c_void, 3419 }; 3420 pub const PTHREAD_RWLOCK_INITIALIZER: pthread_rwlock_t = pthread_rwlock_t { 3421 __held: __PTHREAD_SPIN_LOCK_INITIALIZER, 3422 __lock: __PTHREAD_SPIN_LOCK_INITIALIZER, 3423 __readers: 0, 3424 __readerqueue: 0i64 as *mut __pthread, 3425 __writerqueue: 0i64 as *mut __pthread, 3426 __attr: 0i64 as *mut __pthread_rwlockattr, 3427 __data: 0i64 as *mut ::c_void, 3428 }; 3429 pub const PTHREAD_STACK_MIN: ::size_t = 0; 3430 3431 const_fn! { 3432 {const} fn CMSG_ALIGN(len: usize) -> usize { 3433 len + ::mem::size_of::<usize>() - 1 & !(::mem::size_of::<usize>() - 1) 3434 } 3435 } 3436 3437 // functions 3438 f! { 3439 pub fn CMSG_FIRSTHDR(mhdr: *const msghdr) -> *mut cmsghdr { 3440 if (*mhdr).msg_controllen as usize >= ::mem::size_of::<cmsghdr>() { 3441 (*mhdr).msg_control as *mut cmsghdr 3442 } else { 3443 0 as *mut cmsghdr 3444 } 3445 } 3446 3447 pub fn CMSG_DATA(cmsg: *const cmsghdr) -> *mut ::c_uchar { 3448 cmsg.offset(1) as *mut ::c_uchar 3449 } 3450 3451 pub {const} fn CMSG_SPACE(length: ::c_uint) -> ::c_uint { 3452 (CMSG_ALIGN(length as usize) + CMSG_ALIGN(::mem::size_of::<cmsghdr>())) 3453 as ::c_uint 3454 } 3455 3456 pub {const} fn CMSG_LEN(length: ::c_uint) -> ::c_uint { 3457 CMSG_ALIGN(::mem::size_of::<cmsghdr>()) as ::c_uint + length 3458 } 3459 3460 pub fn CMSG_NXTHDR(mhdr: *const msghdr, 3461 cmsg: *const cmsghdr) -> *mut cmsghdr { 3462 if ((*cmsg).cmsg_len as usize) < ::mem::size_of::<cmsghdr>() { 3463 return 0 as *mut cmsghdr; 3464 }; 3465 let next = (cmsg as usize + 3466 CMSG_ALIGN((*cmsg).cmsg_len as usize)) 3467 as *mut cmsghdr; 3468 let max = (*mhdr).msg_control as usize 3469 + (*mhdr).msg_controllen as usize; 3470 if (next.offset(1)) as usize > max || 3471 next as usize + CMSG_ALIGN((*next).cmsg_len as usize) > max 3472 { 3473 0 as *mut cmsghdr 3474 } else { 3475 next as *mut cmsghdr 3476 } 3477 } 3478 3479 pub fn CPU_ALLOC_SIZE(count: ::c_int) -> ::size_t { 3480 let _dummy: cpu_set_t = ::mem::zeroed(); 3481 let size_in_bits = 8 * ::mem::size_of_val(&_dummy.bits[0]); 3482 ((count as ::size_t + size_in_bits - 1) / 8) as ::size_t 3483 } 3484 3485 pub fn CPU_ZERO(cpuset: &mut cpu_set_t) -> () { 3486 for slot in cpuset.bits.iter_mut() { 3487 *slot = 0; 3488 } 3489 } 3490 3491 pub fn CPU_SET(cpu: usize, cpuset: &mut cpu_set_t) -> () { 3492 let size_in_bits 3493 = 8 * ::mem::size_of_val(&cpuset.bits[0]); // 32, 64 etc 3494 let (idx, offset) = (cpu / size_in_bits, cpu % size_in_bits); 3495 cpuset.bits[idx] |= 1 << offset; 3496 () 3497 } 3498 3499 pub fn CPU_CLR(cpu: usize, cpuset: &mut cpu_set_t) -> () { 3500 let size_in_bits 3501 = 8 * ::mem::size_of_val(&cpuset.bits[0]); // 32, 64 etc 3502 let (idx, offset) = (cpu / size_in_bits, cpu % size_in_bits); 3503 cpuset.bits[idx] &= !(1 << offset); 3504 () 3505 } 3506 3507 pub fn CPU_ISSET(cpu: usize, cpuset: &cpu_set_t) -> bool { 3508 let size_in_bits = 8 * ::mem::size_of_val(&cpuset.bits[0]); 3509 let (idx, offset) = (cpu / size_in_bits, cpu % size_in_bits); 3510 0 != (cpuset.bits[idx] & (1 << offset)) 3511 } 3512 3513 pub fn CPU_COUNT_S(size: usize, cpuset: &cpu_set_t) -> ::c_int { 3514 let mut s: u32 = 0; 3515 let size_of_mask = ::mem::size_of_val(&cpuset.bits[0]); 3516 for i in cpuset.bits[..(size / size_of_mask)].iter() { 3517 s += i.count_ones(); 3518 }; 3519 s as ::c_int 3520 } 3521 3522 pub fn CPU_COUNT(cpuset: &cpu_set_t) -> ::c_int { 3523 CPU_COUNT_S(::mem::size_of::<cpu_set_t>(), cpuset) 3524 } 3525 3526 pub fn CPU_EQUAL(set1: &cpu_set_t, set2: &cpu_set_t) -> bool { 3527 set1.bits == set2.bits 3528 } 3529 3530 pub fn major(dev: ::dev_t) -> ::c_uint { 3531 ((dev >> 8) & 0xff) as ::c_uint 3532 } 3533 3534 pub fn minor(dev: ::dev_t) -> ::c_uint { 3535 (dev & 0xffff00ff) as ::c_uint 3536 } 3537 3538 pub fn IPTOS_TOS(tos: u8) -> u8 { 3539 tos & IPTOS_TOS_MASK 3540 } 3541 3542 pub fn IPTOS_PREC(tos: u8) -> u8 { 3543 tos & IPTOS_PREC_MASK 3544 } 3545 3546 pub fn FD_CLR(fd: ::c_int, set: *mut fd_set) -> () { 3547 let fd = fd as usize; 3548 let size = ::mem::size_of_val(&(*set).fds_bits[0]) * 8; 3549 (*set).fds_bits[fd / size] &= !(1 << (fd % size)); 3550 return 3551 } 3552 3553 pub fn FD_ISSET(fd: ::c_int, set: *const fd_set) -> bool { 3554 let fd = fd as usize; 3555 let size = ::mem::size_of_val(&(*set).fds_bits[0]) * 8; 3556 return ((*set).fds_bits[fd / size] & (1 << (fd % size))) != 0 3557 } 3558 3559 pub fn FD_SET(fd: ::c_int, set: *mut fd_set) -> () { 3560 let fd = fd as usize; 3561 let size = ::mem::size_of_val(&(*set).fds_bits[0]) * 8; 3562 (*set).fds_bits[fd / size] |= 1 << (fd % size); 3563 return 3564 } 3565 3566 pub fn FD_ZERO(set: *mut fd_set) -> () { 3567 for slot in (*set).fds_bits.iter_mut() { 3568 *slot = 0; 3569 } 3570 } 3571 } 3572 3573 extern "C" { lutimes(file: *const ::c_char, times: *const ::timeval) -> ::c_int3574 pub fn lutimes(file: *const ::c_char, times: *const ::timeval) -> ::c_int; 3575 futimes(fd: ::c_int, times: *const ::timeval) -> ::c_int3576 pub fn futimes(fd: ::c_int, times: *const ::timeval) -> ::c_int; futimens(__fd: ::c_int, __times: *const ::timespec) -> ::c_int3577 pub fn futimens(__fd: ::c_int, __times: *const ::timespec) -> ::c_int; 3578 utimensat( dirfd: ::c_int, path: *const ::c_char, times: *const ::timespec, flag: ::c_int, ) -> ::c_int3579 pub fn utimensat( 3580 dirfd: ::c_int, 3581 path: *const ::c_char, 3582 times: *const ::timespec, 3583 flag: ::c_int, 3584 ) -> ::c_int; 3585 mkfifoat(__fd: ::c_int, __path: *const ::c_char, __mode: __mode_t) -> ::c_int3586 pub fn mkfifoat(__fd: ::c_int, __path: *const ::c_char, __mode: __mode_t) -> ::c_int; 3587 mknodat( dirfd: ::c_int, pathname: *const ::c_char, mode: ::mode_t, dev: dev_t, ) -> ::c_int3588 pub fn mknodat( 3589 dirfd: ::c_int, 3590 pathname: *const ::c_char, 3591 mode: ::mode_t, 3592 dev: dev_t, 3593 ) -> ::c_int; 3594 __libc_current_sigrtmin() -> ::c_int3595 pub fn __libc_current_sigrtmin() -> ::c_int; 3596 __libc_current_sigrtmax() -> ::c_int3597 pub fn __libc_current_sigrtmax() -> ::c_int; 3598 wait4( pid: ::pid_t, status: *mut ::c_int, options: ::c_int, rusage: *mut ::rusage, ) -> ::pid_t3599 pub fn wait4( 3600 pid: ::pid_t, 3601 status: *mut ::c_int, 3602 options: ::c_int, 3603 rusage: *mut ::rusage, 3604 ) -> ::pid_t; 3605 waitid(idtype: idtype_t, id: id_t, infop: *mut ::siginfo_t, options: ::c_int) -> ::c_int3606 pub fn waitid(idtype: idtype_t, id: id_t, infop: *mut ::siginfo_t, options: ::c_int) 3607 -> ::c_int; 3608 sigwait(__set: *const sigset_t, __sig: *mut ::c_int) -> ::c_int3609 pub fn sigwait(__set: *const sigset_t, __sig: *mut ::c_int) -> ::c_int; 3610 sigsuspend(mask: *const ::sigset_t) -> ::c_int3611 pub fn sigsuspend(mask: *const ::sigset_t) -> ::c_int; sigtimedwait( set: *const sigset_t, info: *mut siginfo_t, timeout: *const ::timespec, ) -> ::c_int3612 pub fn sigtimedwait( 3613 set: *const sigset_t, 3614 info: *mut siginfo_t, 3615 timeout: *const ::timespec, 3616 ) -> ::c_int; sigwaitinfo(set: *const sigset_t, info: *mut siginfo_t) -> ::c_int3617 pub fn sigwaitinfo(set: *const sigset_t, info: *mut siginfo_t) -> ::c_int; 3618 sigaltstack(ss: *const stack_t, oss: *mut stack_t) -> ::c_int3619 pub fn sigaltstack(ss: *const stack_t, oss: *mut stack_t) -> ::c_int; 3620 ioctl(__fd: ::c_int, __request: ::c_ulong, ...) -> ::c_int3621 pub fn ioctl(__fd: ::c_int, __request: ::c_ulong, ...) -> ::c_int; 3622 pipe2(fds: *mut ::c_int, flags: ::c_int) -> ::c_int3623 pub fn pipe2(fds: *mut ::c_int, flags: ::c_int) -> ::c_int; 3624 dup3(oldfd: ::c_int, newfd: ::c_int, flags: ::c_int) -> ::c_int3625 pub fn dup3(oldfd: ::c_int, newfd: ::c_int, flags: ::c_int) -> ::c_int; 3626 pread64(fd: ::c_int, buf: *mut ::c_void, count: ::size_t, offset: off64_t) -> ::ssize_t3627 pub fn pread64(fd: ::c_int, buf: *mut ::c_void, count: ::size_t, offset: off64_t) -> ::ssize_t; pwrite64( fd: ::c_int, buf: *const ::c_void, count: ::size_t, offset: off64_t, ) -> ::ssize_t3628 pub fn pwrite64( 3629 fd: ::c_int, 3630 buf: *const ::c_void, 3631 count: ::size_t, 3632 offset: off64_t, 3633 ) -> ::ssize_t; 3634 readv(__fd: ::c_int, __iovec: *const ::iovec, __count: ::c_int) -> ::ssize_t3635 pub fn readv(__fd: ::c_int, __iovec: *const ::iovec, __count: ::c_int) -> ::ssize_t; writev(__fd: ::c_int, __iovec: *const ::iovec, __count: ::c_int) -> ::ssize_t3636 pub fn writev(__fd: ::c_int, __iovec: *const ::iovec, __count: ::c_int) -> ::ssize_t; 3637 preadv( __fd: ::c_int, __iovec: *const ::iovec, __count: ::c_int, __offset: __off_t, ) -> ssize_t3638 pub fn preadv( 3639 __fd: ::c_int, 3640 __iovec: *const ::iovec, 3641 __count: ::c_int, 3642 __offset: __off_t, 3643 ) -> ssize_t; pwritev( __fd: ::c_int, __iovec: *const ::iovec, __count: ::c_int, __offset: __off_t, ) -> ssize_t3644 pub fn pwritev( 3645 __fd: ::c_int, 3646 __iovec: *const ::iovec, 3647 __count: ::c_int, 3648 __offset: __off_t, 3649 ) -> ssize_t; 3650 preadv64( fd: ::c_int, iov: *const ::iovec, iovcnt: ::c_int, offset: ::off64_t, ) -> ::ssize_t3651 pub fn preadv64( 3652 fd: ::c_int, 3653 iov: *const ::iovec, 3654 iovcnt: ::c_int, 3655 offset: ::off64_t, 3656 ) -> ::ssize_t; pwritev64( fd: ::c_int, iov: *const ::iovec, iovcnt: ::c_int, offset: ::off64_t, ) -> ::ssize_t3657 pub fn pwritev64( 3658 fd: ::c_int, 3659 iov: *const ::iovec, 3660 iovcnt: ::c_int, 3661 offset: ::off64_t, 3662 ) -> ::ssize_t; 3663 fread_unlocked( buf: *mut ::c_void, size: ::size_t, nobj: ::size_t, stream: *mut ::FILE, ) -> ::size_t3664 pub fn fread_unlocked( 3665 buf: *mut ::c_void, 3666 size: ::size_t, 3667 nobj: ::size_t, 3668 stream: *mut ::FILE, 3669 ) -> ::size_t; 3670 aio_read(aiocbp: *mut aiocb) -> ::c_int3671 pub fn aio_read(aiocbp: *mut aiocb) -> ::c_int; aio_write(aiocbp: *mut aiocb) -> ::c_int3672 pub fn aio_write(aiocbp: *mut aiocb) -> ::c_int; aio_fsync(op: ::c_int, aiocbp: *mut aiocb) -> ::c_int3673 pub fn aio_fsync(op: ::c_int, aiocbp: *mut aiocb) -> ::c_int; aio_error(aiocbp: *const aiocb) -> ::c_int3674 pub fn aio_error(aiocbp: *const aiocb) -> ::c_int; aio_return(aiocbp: *mut aiocb) -> ::ssize_t3675 pub fn aio_return(aiocbp: *mut aiocb) -> ::ssize_t; aio_suspend( aiocb_list: *const *const aiocb, nitems: ::c_int, timeout: *const ::timespec, ) -> ::c_int3676 pub fn aio_suspend( 3677 aiocb_list: *const *const aiocb, 3678 nitems: ::c_int, 3679 timeout: *const ::timespec, 3680 ) -> ::c_int; aio_cancel(fd: ::c_int, aiocbp: *mut aiocb) -> ::c_int3681 pub fn aio_cancel(fd: ::c_int, aiocbp: *mut aiocb) -> ::c_int; lio_listio( mode: ::c_int, aiocb_list: *const *mut aiocb, nitems: ::c_int, sevp: *mut ::sigevent, ) -> ::c_int3682 pub fn lio_listio( 3683 mode: ::c_int, 3684 aiocb_list: *const *mut aiocb, 3685 nitems: ::c_int, 3686 sevp: *mut ::sigevent, 3687 ) -> ::c_int; 3688 mq_open(name: *const ::c_char, oflag: ::c_int, ...) -> ::mqd_t3689 pub fn mq_open(name: *const ::c_char, oflag: ::c_int, ...) -> ::mqd_t; mq_close(mqd: ::mqd_t) -> ::c_int3690 pub fn mq_close(mqd: ::mqd_t) -> ::c_int; mq_unlink(name: *const ::c_char) -> ::c_int3691 pub fn mq_unlink(name: *const ::c_char) -> ::c_int; mq_receive( mqd: ::mqd_t, msg_ptr: *mut ::c_char, msg_len: ::size_t, msg_prio: *mut ::c_uint, ) -> ::ssize_t3692 pub fn mq_receive( 3693 mqd: ::mqd_t, 3694 msg_ptr: *mut ::c_char, 3695 msg_len: ::size_t, 3696 msg_prio: *mut ::c_uint, 3697 ) -> ::ssize_t; mq_timedreceive( mqd: ::mqd_t, msg_ptr: *mut ::c_char, msg_len: ::size_t, msg_prio: *mut ::c_uint, abs_timeout: *const ::timespec, ) -> ::ssize_t3698 pub fn mq_timedreceive( 3699 mqd: ::mqd_t, 3700 msg_ptr: *mut ::c_char, 3701 msg_len: ::size_t, 3702 msg_prio: *mut ::c_uint, 3703 abs_timeout: *const ::timespec, 3704 ) -> ::ssize_t; mq_send( mqd: ::mqd_t, msg_ptr: *const ::c_char, msg_len: ::size_t, msg_prio: ::c_uint, ) -> ::c_int3705 pub fn mq_send( 3706 mqd: ::mqd_t, 3707 msg_ptr: *const ::c_char, 3708 msg_len: ::size_t, 3709 msg_prio: ::c_uint, 3710 ) -> ::c_int; mq_timedsend( mqd: ::mqd_t, msg_ptr: *const ::c_char, msg_len: ::size_t, msg_prio: ::c_uint, abs_timeout: *const ::timespec, ) -> ::c_int3711 pub fn mq_timedsend( 3712 mqd: ::mqd_t, 3713 msg_ptr: *const ::c_char, 3714 msg_len: ::size_t, 3715 msg_prio: ::c_uint, 3716 abs_timeout: *const ::timespec, 3717 ) -> ::c_int; mq_getattr(mqd: ::mqd_t, attr: *mut ::mq_attr) -> ::c_int3718 pub fn mq_getattr(mqd: ::mqd_t, attr: *mut ::mq_attr) -> ::c_int; mq_setattr(mqd: ::mqd_t, newattr: *const ::mq_attr, oldattr: *mut ::mq_attr) -> ::c_int3719 pub fn mq_setattr(mqd: ::mqd_t, newattr: *const ::mq_attr, oldattr: *mut ::mq_attr) -> ::c_int; 3720 lseek64(__fd: ::c_int, __offset: __off64_t, __whence: ::c_int) -> __off64_t3721 pub fn lseek64(__fd: ::c_int, __offset: __off64_t, __whence: ::c_int) -> __off64_t; 3722 lseek(__fd: ::c_int, __offset: __off_t, __whence: ::c_int) -> __off_t3723 pub fn lseek(__fd: ::c_int, __offset: __off_t, __whence: ::c_int) -> __off_t; 3724 fgetpos64(stream: *mut ::FILE, ptr: *mut fpos64_t) -> ::c_int3725 pub fn fgetpos64(stream: *mut ::FILE, ptr: *mut fpos64_t) -> ::c_int; fseeko64(stream: *mut ::FILE, offset: ::off64_t, whence: ::c_int) -> ::c_int3726 pub fn fseeko64(stream: *mut ::FILE, offset: ::off64_t, whence: ::c_int) -> ::c_int; fsetpos64(stream: *mut ::FILE, ptr: *const fpos64_t) -> ::c_int3727 pub fn fsetpos64(stream: *mut ::FILE, ptr: *const fpos64_t) -> ::c_int; ftello64(stream: *mut ::FILE) -> ::off64_t3728 pub fn ftello64(stream: *mut ::FILE) -> ::off64_t; 3729 bind(__fd: ::c_int, __addr: *const sockaddr, __len: socklen_t) -> ::c_int3730 pub fn bind(__fd: ::c_int, __addr: *const sockaddr, __len: socklen_t) -> ::c_int; 3731 accept4( fd: ::c_int, addr: *mut ::sockaddr, len: *mut ::socklen_t, flg: ::c_int, ) -> ::c_int3732 pub fn accept4( 3733 fd: ::c_int, 3734 addr: *mut ::sockaddr, 3735 len: *mut ::socklen_t, 3736 flg: ::c_int, 3737 ) -> ::c_int; 3738 ppoll( fds: *mut ::pollfd, nfds: nfds_t, timeout: *const ::timespec, sigmask: *const sigset_t, ) -> ::c_int3739 pub fn ppoll( 3740 fds: *mut ::pollfd, 3741 nfds: nfds_t, 3742 timeout: *const ::timespec, 3743 sigmask: *const sigset_t, 3744 ) -> ::c_int; 3745 recvmsg(__fd: ::c_int, __message: *mut msghdr, __flags: ::c_int) -> ::ssize_t3746 pub fn recvmsg(__fd: ::c_int, __message: *mut msghdr, __flags: ::c_int) -> ::ssize_t; 3747 sendmsg(__fd: ::c_int, __message: *const msghdr, __flags: ::c_int) -> ssize_t3748 pub fn sendmsg(__fd: ::c_int, __message: *const msghdr, __flags: ::c_int) -> ssize_t; 3749 recvfrom( socket: ::c_int, buf: *mut ::c_void, len: ::size_t, flags: ::c_int, addr: *mut ::sockaddr, addrlen: *mut ::socklen_t, ) -> ::ssize_t3750 pub fn recvfrom( 3751 socket: ::c_int, 3752 buf: *mut ::c_void, 3753 len: ::size_t, 3754 flags: ::c_int, 3755 addr: *mut ::sockaddr, 3756 addrlen: *mut ::socklen_t, 3757 ) -> ::ssize_t; 3758 sendfile( out_fd: ::c_int, in_fd: ::c_int, offset: *mut off_t, count: ::size_t, ) -> ::ssize_t3759 pub fn sendfile( 3760 out_fd: ::c_int, 3761 in_fd: ::c_int, 3762 offset: *mut off_t, 3763 count: ::size_t, 3764 ) -> ::ssize_t; sendfile64( out_fd: ::c_int, in_fd: ::c_int, offset: *mut off64_t, count: ::size_t, ) -> ::ssize_t3765 pub fn sendfile64( 3766 out_fd: ::c_int, 3767 in_fd: ::c_int, 3768 offset: *mut off64_t, 3769 count: ::size_t, 3770 ) -> ::ssize_t; 3771 shutdown(__fd: ::c_int, __how: ::c_int) -> ::c_int3772 pub fn shutdown(__fd: ::c_int, __how: ::c_int) -> ::c_int; 3773 sethostname(name: *const ::c_char, len: ::size_t) -> ::c_int3774 pub fn sethostname(name: *const ::c_char, len: ::size_t) -> ::c_int; getdomainname(name: *mut ::c_char, len: ::size_t) -> ::c_int3775 pub fn getdomainname(name: *mut ::c_char, len: ::size_t) -> ::c_int; setdomainname(name: *const ::c_char, len: ::size_t) -> ::c_int3776 pub fn setdomainname(name: *const ::c_char, len: ::size_t) -> ::c_int; if_nameindex() -> *mut if_nameindex3777 pub fn if_nameindex() -> *mut if_nameindex; if_freenameindex(ptr: *mut if_nameindex)3778 pub fn if_freenameindex(ptr: *mut if_nameindex); 3779 getnameinfo( sa: *const ::sockaddr, salen: ::socklen_t, host: *mut ::c_char, hostlen: ::socklen_t, serv: *mut ::c_char, servlen: ::socklen_t, flags: ::c_int, ) -> ::c_int3780 pub fn getnameinfo( 3781 sa: *const ::sockaddr, 3782 salen: ::socklen_t, 3783 host: *mut ::c_char, 3784 hostlen: ::socklen_t, 3785 serv: *mut ::c_char, 3786 servlen: ::socklen_t, 3787 flags: ::c_int, 3788 ) -> ::c_int; 3789 getifaddrs(ifap: *mut *mut ::ifaddrs) -> ::c_int3790 pub fn getifaddrs(ifap: *mut *mut ::ifaddrs) -> ::c_int; freeifaddrs(ifa: *mut ::ifaddrs)3791 pub fn freeifaddrs(ifa: *mut ::ifaddrs); 3792 uname(buf: *mut ::utsname) -> ::c_int3793 pub fn uname(buf: *mut ::utsname) -> ::c_int; 3794 gethostid() -> ::c_long3795 pub fn gethostid() -> ::c_long; sethostid(hostid: ::c_long) -> ::c_int3796 pub fn sethostid(hostid: ::c_long) -> ::c_int; 3797 setpwent()3798 pub fn setpwent(); endpwent()3799 pub fn endpwent(); getpwent() -> *mut passwd3800 pub fn getpwent() -> *mut passwd; setgrent()3801 pub fn setgrent(); endgrent()3802 pub fn endgrent(); getgrent() -> *mut ::group3803 pub fn getgrent() -> *mut ::group; setspent()3804 pub fn setspent(); endspent()3805 pub fn endspent(); getspent() -> *mut spwd3806 pub fn getspent() -> *mut spwd; 3807 getspnam(name: *const ::c_char) -> *mut spwd3808 pub fn getspnam(name: *const ::c_char) -> *mut spwd; 3809 getpwent_r( pwd: *mut ::passwd, buf: *mut ::c_char, buflen: ::size_t, result: *mut *mut ::passwd, ) -> ::c_int3810 pub fn getpwent_r( 3811 pwd: *mut ::passwd, 3812 buf: *mut ::c_char, 3813 buflen: ::size_t, 3814 result: *mut *mut ::passwd, 3815 ) -> ::c_int; getgrent_r( grp: *mut ::group, buf: *mut ::c_char, buflen: ::size_t, result: *mut *mut ::group, ) -> ::c_int3816 pub fn getgrent_r( 3817 grp: *mut ::group, 3818 buf: *mut ::c_char, 3819 buflen: ::size_t, 3820 result: *mut *mut ::group, 3821 ) -> ::c_int; fgetpwent_r( stream: *mut ::FILE, pwd: *mut ::passwd, buf: *mut ::c_char, buflen: ::size_t, result: *mut *mut ::passwd, ) -> ::c_int3822 pub fn fgetpwent_r( 3823 stream: *mut ::FILE, 3824 pwd: *mut ::passwd, 3825 buf: *mut ::c_char, 3826 buflen: ::size_t, 3827 result: *mut *mut ::passwd, 3828 ) -> ::c_int; fgetgrent_r( stream: *mut ::FILE, grp: *mut ::group, buf: *mut ::c_char, buflen: ::size_t, result: *mut *mut ::group, ) -> ::c_int3829 pub fn fgetgrent_r( 3830 stream: *mut ::FILE, 3831 grp: *mut ::group, 3832 buf: *mut ::c_char, 3833 buflen: ::size_t, 3834 result: *mut *mut ::group, 3835 ) -> ::c_int; 3836 putpwent(p: *const ::passwd, stream: *mut ::FILE) -> ::c_int3837 pub fn putpwent(p: *const ::passwd, stream: *mut ::FILE) -> ::c_int; putgrent(grp: *const ::group, stream: *mut ::FILE) -> ::c_int3838 pub fn putgrent(grp: *const ::group, stream: *mut ::FILE) -> ::c_int; 3839 getpwnam_r( name: *const ::c_char, pwd: *mut passwd, buf: *mut ::c_char, buflen: ::size_t, result: *mut *mut passwd, ) -> ::c_int3840 pub fn getpwnam_r( 3841 name: *const ::c_char, 3842 pwd: *mut passwd, 3843 buf: *mut ::c_char, 3844 buflen: ::size_t, 3845 result: *mut *mut passwd, 3846 ) -> ::c_int; 3847 getpwuid_r( uid: ::uid_t, pwd: *mut passwd, buf: *mut ::c_char, buflen: ::size_t, result: *mut *mut passwd, ) -> ::c_int3848 pub fn getpwuid_r( 3849 uid: ::uid_t, 3850 pwd: *mut passwd, 3851 buf: *mut ::c_char, 3852 buflen: ::size_t, 3853 result: *mut *mut passwd, 3854 ) -> ::c_int; 3855 fgetspent_r( fp: *mut ::FILE, spbuf: *mut ::spwd, buf: *mut ::c_char, buflen: ::size_t, spbufp: *mut *mut ::spwd, ) -> ::c_int3856 pub fn fgetspent_r( 3857 fp: *mut ::FILE, 3858 spbuf: *mut ::spwd, 3859 buf: *mut ::c_char, 3860 buflen: ::size_t, 3861 spbufp: *mut *mut ::spwd, 3862 ) -> ::c_int; sgetspent_r( s: *const ::c_char, spbuf: *mut ::spwd, buf: *mut ::c_char, buflen: ::size_t, spbufp: *mut *mut ::spwd, ) -> ::c_int3863 pub fn sgetspent_r( 3864 s: *const ::c_char, 3865 spbuf: *mut ::spwd, 3866 buf: *mut ::c_char, 3867 buflen: ::size_t, 3868 spbufp: *mut *mut ::spwd, 3869 ) -> ::c_int; getspent_r( spbuf: *mut ::spwd, buf: *mut ::c_char, buflen: ::size_t, spbufp: *mut *mut ::spwd, ) -> ::c_int3870 pub fn getspent_r( 3871 spbuf: *mut ::spwd, 3872 buf: *mut ::c_char, 3873 buflen: ::size_t, 3874 spbufp: *mut *mut ::spwd, 3875 ) -> ::c_int; 3876 getspnam_r( name: *const ::c_char, spbuf: *mut spwd, buf: *mut ::c_char, buflen: ::size_t, spbufp: *mut *mut spwd, ) -> ::c_int3877 pub fn getspnam_r( 3878 name: *const ::c_char, 3879 spbuf: *mut spwd, 3880 buf: *mut ::c_char, 3881 buflen: ::size_t, 3882 spbufp: *mut *mut spwd, 3883 ) -> ::c_int; 3884 3885 // mntent.h getmntent_r( stream: *mut ::FILE, mntbuf: *mut ::mntent, buf: *mut ::c_char, buflen: ::c_int, ) -> *mut ::mntent3886 pub fn getmntent_r( 3887 stream: *mut ::FILE, 3888 mntbuf: *mut ::mntent, 3889 buf: *mut ::c_char, 3890 buflen: ::c_int, 3891 ) -> *mut ::mntent; 3892 utmpname(file: *const ::c_char) -> ::c_int3893 pub fn utmpname(file: *const ::c_char) -> ::c_int; utmpxname(file: *const ::c_char) -> ::c_int3894 pub fn utmpxname(file: *const ::c_char) -> ::c_int; getutxent() -> *mut utmpx3895 pub fn getutxent() -> *mut utmpx; getutxid(ut: *const utmpx) -> *mut utmpx3896 pub fn getutxid(ut: *const utmpx) -> *mut utmpx; getutxline(ut: *const utmpx) -> *mut utmpx3897 pub fn getutxline(ut: *const utmpx) -> *mut utmpx; pututxline(ut: *const utmpx) -> *mut utmpx3898 pub fn pututxline(ut: *const utmpx) -> *mut utmpx; setutxent()3899 pub fn setutxent(); endutxent()3900 pub fn endutxent(); 3901 getresuid(ruid: *mut ::uid_t, euid: *mut ::uid_t, suid: *mut ::uid_t) -> ::c_int3902 pub fn getresuid(ruid: *mut ::uid_t, euid: *mut ::uid_t, suid: *mut ::uid_t) -> ::c_int; getresgid(rgid: *mut ::gid_t, egid: *mut ::gid_t, sgid: *mut ::gid_t) -> ::c_int3903 pub fn getresgid(rgid: *mut ::gid_t, egid: *mut ::gid_t, sgid: *mut ::gid_t) -> ::c_int; setresuid(ruid: ::uid_t, euid: ::uid_t, suid: ::uid_t) -> ::c_int3904 pub fn setresuid(ruid: ::uid_t, euid: ::uid_t, suid: ::uid_t) -> ::c_int; setresgid(rgid: ::gid_t, egid: ::gid_t, sgid: ::gid_t) -> ::c_int3905 pub fn setresgid(rgid: ::gid_t, egid: ::gid_t, sgid: ::gid_t) -> ::c_int; 3906 initgroups(user: *const ::c_char, group: ::gid_t) -> ::c_int3907 pub fn initgroups(user: *const ::c_char, group: ::gid_t) -> ::c_int; 3908 getgrgid(gid: ::gid_t) -> *mut ::group3909 pub fn getgrgid(gid: ::gid_t) -> *mut ::group; getgrgid_r( gid: ::gid_t, grp: *mut ::group, buf: *mut ::c_char, buflen: ::size_t, result: *mut *mut ::group, ) -> ::c_int3910 pub fn getgrgid_r( 3911 gid: ::gid_t, 3912 grp: *mut ::group, 3913 buf: *mut ::c_char, 3914 buflen: ::size_t, 3915 result: *mut *mut ::group, 3916 ) -> ::c_int; 3917 getgrnam(name: *const ::c_char) -> *mut ::group3918 pub fn getgrnam(name: *const ::c_char) -> *mut ::group; getgrnam_r( name: *const ::c_char, grp: *mut ::group, buf: *mut ::c_char, buflen: ::size_t, result: *mut *mut ::group, ) -> ::c_int3919 pub fn getgrnam_r( 3920 name: *const ::c_char, 3921 grp: *mut ::group, 3922 buf: *mut ::c_char, 3923 buflen: ::size_t, 3924 result: *mut *mut ::group, 3925 ) -> ::c_int; 3926 getgrouplist( user: *const ::c_char, group: ::gid_t, groups: *mut ::gid_t, ngroups: *mut ::c_int, ) -> ::c_int3927 pub fn getgrouplist( 3928 user: *const ::c_char, 3929 group: ::gid_t, 3930 groups: *mut ::gid_t, 3931 ngroups: *mut ::c_int, 3932 ) -> ::c_int; 3933 setgroups(ngroups: ::size_t, ptr: *const ::gid_t) -> ::c_int3934 pub fn setgroups(ngroups: ::size_t, ptr: *const ::gid_t) -> ::c_int; 3935 acct(filename: *const ::c_char) -> ::c_int3936 pub fn acct(filename: *const ::c_char) -> ::c_int; 3937 setmntent(filename: *const ::c_char, ty: *const ::c_char) -> *mut ::FILE3938 pub fn setmntent(filename: *const ::c_char, ty: *const ::c_char) -> *mut ::FILE; getmntent(stream: *mut ::FILE) -> *mut ::mntent3939 pub fn getmntent(stream: *mut ::FILE) -> *mut ::mntent; addmntent(stream: *mut ::FILE, mnt: *const ::mntent) -> ::c_int3940 pub fn addmntent(stream: *mut ::FILE, mnt: *const ::mntent) -> ::c_int; endmntent(streamp: *mut ::FILE) -> ::c_int3941 pub fn endmntent(streamp: *mut ::FILE) -> ::c_int; hasmntopt(mnt: *const ::mntent, opt: *const ::c_char) -> *mut ::c_char3942 pub fn hasmntopt(mnt: *const ::mntent, opt: *const ::c_char) -> *mut ::c_char; 3943 pthread_create( native: *mut ::pthread_t, attr: *const ::pthread_attr_t, f: extern "C" fn(*mut ::c_void) -> *mut ::c_void, value: *mut ::c_void, ) -> ::c_int3944 pub fn pthread_create( 3945 native: *mut ::pthread_t, 3946 attr: *const ::pthread_attr_t, 3947 f: extern "C" fn(*mut ::c_void) -> *mut ::c_void, 3948 value: *mut ::c_void, 3949 ) -> ::c_int; pthread_kill(__threadid: ::pthread_t, __signo: ::c_int) -> ::c_int3950 pub fn pthread_kill(__threadid: ::pthread_t, __signo: ::c_int) -> ::c_int; pthread_cancel(thread: ::pthread_t) -> ::c_int3951 pub fn pthread_cancel(thread: ::pthread_t) -> ::c_int; __pthread_equal(__t1: __pthread_t, __t2: __pthread_t) -> ::c_int3952 pub fn __pthread_equal(__t1: __pthread_t, __t2: __pthread_t) -> ::c_int; 3953 pthread_getattr_np(__thr: ::pthread_t, __attr: *mut pthread_attr_t) -> ::c_int3954 pub fn pthread_getattr_np(__thr: ::pthread_t, __attr: *mut pthread_attr_t) -> ::c_int; 3955 pthread_attr_getguardsize( __attr: *const pthread_attr_t, __guardsize: *mut ::size_t, ) -> ::c_int3956 pub fn pthread_attr_getguardsize( 3957 __attr: *const pthread_attr_t, 3958 __guardsize: *mut ::size_t, 3959 ) -> ::c_int; pthread_attr_setguardsize(attr: *mut ::pthread_attr_t, guardsize: ::size_t) -> ::c_int3960 pub fn pthread_attr_setguardsize(attr: *mut ::pthread_attr_t, guardsize: ::size_t) -> ::c_int; 3961 pthread_attr_getstack( __attr: *const pthread_attr_t, __stackaddr: *mut *mut ::c_void, __stacksize: *mut ::size_t, ) -> ::c_int3962 pub fn pthread_attr_getstack( 3963 __attr: *const pthread_attr_t, 3964 __stackaddr: *mut *mut ::c_void, 3965 __stacksize: *mut ::size_t, 3966 ) -> ::c_int; 3967 pthread_mutexattr_getpshared( attr: *const pthread_mutexattr_t, pshared: *mut ::c_int, ) -> ::c_int3968 pub fn pthread_mutexattr_getpshared( 3969 attr: *const pthread_mutexattr_t, 3970 pshared: *mut ::c_int, 3971 ) -> ::c_int; pthread_mutexattr_setpshared( attr: *mut pthread_mutexattr_t, pshared: ::c_int, ) -> ::c_int3972 pub fn pthread_mutexattr_setpshared( 3973 attr: *mut pthread_mutexattr_t, 3974 pshared: ::c_int, 3975 ) -> ::c_int; 3976 pthread_mutex_timedlock( lock: *mut pthread_mutex_t, abstime: *const ::timespec, ) -> ::c_int3977 pub fn pthread_mutex_timedlock( 3978 lock: *mut pthread_mutex_t, 3979 abstime: *const ::timespec, 3980 ) -> ::c_int; 3981 pthread_rwlockattr_getpshared( attr: *const pthread_rwlockattr_t, val: *mut ::c_int, ) -> ::c_int3982 pub fn pthread_rwlockattr_getpshared( 3983 attr: *const pthread_rwlockattr_t, 3984 val: *mut ::c_int, 3985 ) -> ::c_int; pthread_rwlockattr_setpshared(attr: *mut pthread_rwlockattr_t, val: ::c_int) -> ::c_int3986 pub fn pthread_rwlockattr_setpshared(attr: *mut pthread_rwlockattr_t, val: ::c_int) -> ::c_int; 3987 pthread_condattr_getclock( attr: *const pthread_condattr_t, clock_id: *mut clockid_t, ) -> ::c_int3988 pub fn pthread_condattr_getclock( 3989 attr: *const pthread_condattr_t, 3990 clock_id: *mut clockid_t, 3991 ) -> ::c_int; pthread_condattr_setclock( __attr: *mut pthread_condattr_t, __clock_id: __clockid_t, ) -> ::c_int3992 pub fn pthread_condattr_setclock( 3993 __attr: *mut pthread_condattr_t, 3994 __clock_id: __clockid_t, 3995 ) -> ::c_int; pthread_condattr_getpshared( attr: *const pthread_condattr_t, pshared: *mut ::c_int, ) -> ::c_int3996 pub fn pthread_condattr_getpshared( 3997 attr: *const pthread_condattr_t, 3998 pshared: *mut ::c_int, 3999 ) -> ::c_int; pthread_condattr_setpshared(attr: *mut pthread_condattr_t, pshared: ::c_int) -> ::c_int4000 pub fn pthread_condattr_setpshared(attr: *mut pthread_condattr_t, pshared: ::c_int) -> ::c_int; 4001 pthread_once(control: *mut pthread_once_t, routine: extern "C" fn()) -> ::c_int4002 pub fn pthread_once(control: *mut pthread_once_t, routine: extern "C" fn()) -> ::c_int; 4003 pthread_barrierattr_init(attr: *mut ::pthread_barrierattr_t) -> ::c_int4004 pub fn pthread_barrierattr_init(attr: *mut ::pthread_barrierattr_t) -> ::c_int; pthread_barrierattr_destroy(attr: *mut ::pthread_barrierattr_t) -> ::c_int4005 pub fn pthread_barrierattr_destroy(attr: *mut ::pthread_barrierattr_t) -> ::c_int; pthread_barrierattr_getpshared( attr: *const ::pthread_barrierattr_t, shared: *mut ::c_int, ) -> ::c_int4006 pub fn pthread_barrierattr_getpshared( 4007 attr: *const ::pthread_barrierattr_t, 4008 shared: *mut ::c_int, 4009 ) -> ::c_int; pthread_barrierattr_setpshared( attr: *mut ::pthread_barrierattr_t, shared: ::c_int, ) -> ::c_int4010 pub fn pthread_barrierattr_setpshared( 4011 attr: *mut ::pthread_barrierattr_t, 4012 shared: ::c_int, 4013 ) -> ::c_int; pthread_barrier_init( barrier: *mut pthread_barrier_t, attr: *const ::pthread_barrierattr_t, count: ::c_uint, ) -> ::c_int4014 pub fn pthread_barrier_init( 4015 barrier: *mut pthread_barrier_t, 4016 attr: *const ::pthread_barrierattr_t, 4017 count: ::c_uint, 4018 ) -> ::c_int; pthread_barrier_destroy(barrier: *mut pthread_barrier_t) -> ::c_int4019 pub fn pthread_barrier_destroy(barrier: *mut pthread_barrier_t) -> ::c_int; pthread_barrier_wait(barrier: *mut pthread_barrier_t) -> ::c_int4020 pub fn pthread_barrier_wait(barrier: *mut pthread_barrier_t) -> ::c_int; pthread_spin_init(lock: *mut ::pthread_spinlock_t, pshared: ::c_int) -> ::c_int4021 pub fn pthread_spin_init(lock: *mut ::pthread_spinlock_t, pshared: ::c_int) -> ::c_int; pthread_spin_destroy(lock: *mut ::pthread_spinlock_t) -> ::c_int4022 pub fn pthread_spin_destroy(lock: *mut ::pthread_spinlock_t) -> ::c_int; pthread_spin_lock(lock: *mut ::pthread_spinlock_t) -> ::c_int4023 pub fn pthread_spin_lock(lock: *mut ::pthread_spinlock_t) -> ::c_int; pthread_spin_trylock(lock: *mut ::pthread_spinlock_t) -> ::c_int4024 pub fn pthread_spin_trylock(lock: *mut ::pthread_spinlock_t) -> ::c_int; pthread_spin_unlock(lock: *mut ::pthread_spinlock_t) -> ::c_int4025 pub fn pthread_spin_unlock(lock: *mut ::pthread_spinlock_t) -> ::c_int; pthread_atfork( prepare: ::Option<unsafe extern "C" fn()>, parent: ::Option<unsafe extern "C" fn()>, child: ::Option<unsafe extern "C" fn()>, ) -> ::c_int4026 pub fn pthread_atfork( 4027 prepare: ::Option<unsafe extern "C" fn()>, 4028 parent: ::Option<unsafe extern "C" fn()>, 4029 child: ::Option<unsafe extern "C" fn()>, 4030 ) -> ::c_int; 4031 pthread_sigmask( __how: ::c_int, __newmask: *const __sigset_t, __oldmask: *mut __sigset_t, ) -> ::c_int4032 pub fn pthread_sigmask( 4033 __how: ::c_int, 4034 __newmask: *const __sigset_t, 4035 __oldmask: *mut __sigset_t, 4036 ) -> ::c_int; 4037 sched_getparam(pid: ::pid_t, param: *mut ::sched_param) -> ::c_int4038 pub fn sched_getparam(pid: ::pid_t, param: *mut ::sched_param) -> ::c_int; sched_setparam(pid: ::pid_t, param: *const ::sched_param) -> ::c_int4039 pub fn sched_setparam(pid: ::pid_t, param: *const ::sched_param) -> ::c_int; sched_getscheduler(pid: ::pid_t) -> ::c_int4040 pub fn sched_getscheduler(pid: ::pid_t) -> ::c_int; sched_setscheduler( pid: ::pid_t, policy: ::c_int, param: *const ::sched_param, ) -> ::c_int4041 pub fn sched_setscheduler( 4042 pid: ::pid_t, 4043 policy: ::c_int, 4044 param: *const ::sched_param, 4045 ) -> ::c_int; pthread_getschedparam( native: ::pthread_t, policy: *mut ::c_int, param: *mut ::sched_param, ) -> ::c_int4046 pub fn pthread_getschedparam( 4047 native: ::pthread_t, 4048 policy: *mut ::c_int, 4049 param: *mut ::sched_param, 4050 ) -> ::c_int; pthread_setschedparam( native: ::pthread_t, policy: ::c_int, param: *const ::sched_param, ) -> ::c_int4051 pub fn pthread_setschedparam( 4052 native: ::pthread_t, 4053 policy: ::c_int, 4054 param: *const ::sched_param, 4055 ) -> ::c_int; 4056 pthread_getcpuclockid(thread: ::pthread_t, clk_id: *mut ::clockid_t) -> ::c_int4057 pub fn pthread_getcpuclockid(thread: ::pthread_t, clk_id: *mut ::clockid_t) -> ::c_int; 4058 sem_init(sem: *mut sem_t, pshared: ::c_int, value: ::c_uint) -> ::c_int4059 pub fn sem_init(sem: *mut sem_t, pshared: ::c_int, value: ::c_uint) -> ::c_int; sem_destroy(sem: *mut sem_t) -> ::c_int4060 pub fn sem_destroy(sem: *mut sem_t) -> ::c_int; sem_timedwait(sem: *mut sem_t, abstime: *const ::timespec) -> ::c_int4061 pub fn sem_timedwait(sem: *mut sem_t, abstime: *const ::timespec) -> ::c_int; sem_getvalue(sem: *mut sem_t, sval: *mut ::c_int) -> ::c_int4062 pub fn sem_getvalue(sem: *mut sem_t, sval: *mut ::c_int) -> ::c_int; 4063 clock_getres(__clock_id: clockid_t, __res: *mut ::timespec) -> ::c_int4064 pub fn clock_getres(__clock_id: clockid_t, __res: *mut ::timespec) -> ::c_int; clock_gettime(__clock_id: clockid_t, __tp: *mut ::timespec) -> ::c_int4065 pub fn clock_gettime(__clock_id: clockid_t, __tp: *mut ::timespec) -> ::c_int; clock_settime(__clock_id: clockid_t, __tp: *const ::timespec) -> ::c_int4066 pub fn clock_settime(__clock_id: clockid_t, __tp: *const ::timespec) -> ::c_int; clock_getcpuclockid(pid: ::pid_t, clk_id: *mut ::clockid_t) -> ::c_int4067 pub fn clock_getcpuclockid(pid: ::pid_t, clk_id: *mut ::clockid_t) -> ::c_int; 4068 clock_nanosleep( clk_id: ::clockid_t, flags: ::c_int, rqtp: *const ::timespec, rmtp: *mut ::timespec, ) -> ::c_int4069 pub fn clock_nanosleep( 4070 clk_id: ::clockid_t, 4071 flags: ::c_int, 4072 rqtp: *const ::timespec, 4073 rmtp: *mut ::timespec, 4074 ) -> ::c_int; 4075 gettimeofday(tp: *mut ::timeval, tz: *mut ::timezone) -> ::c_int4076 pub fn gettimeofday(tp: *mut ::timeval, tz: *mut ::timezone) -> ::c_int; settimeofday(tv: *const ::timeval, tz: *const ::timezone) -> ::c_int4077 pub fn settimeofday(tv: *const ::timeval, tz: *const ::timezone) -> ::c_int; 4078 asctime_r(tm: *const ::tm, buf: *mut ::c_char) -> *mut ::c_char4079 pub fn asctime_r(tm: *const ::tm, buf: *mut ::c_char) -> *mut ::c_char; ctime_r(timep: *const time_t, buf: *mut ::c_char) -> *mut ::c_char4080 pub fn ctime_r(timep: *const time_t, buf: *mut ::c_char) -> *mut ::c_char; 4081 strftime( s: *mut ::c_char, max: ::size_t, format: *const ::c_char, tm: *const ::tm, ) -> ::size_t4082 pub fn strftime( 4083 s: *mut ::c_char, 4084 max: ::size_t, 4085 format: *const ::c_char, 4086 tm: *const ::tm, 4087 ) -> ::size_t; strptime(s: *const ::c_char, format: *const ::c_char, tm: *mut ::tm) -> *mut ::c_char4088 pub fn strptime(s: *const ::c_char, format: *const ::c_char, tm: *mut ::tm) -> *mut ::c_char; 4089 timer_create( clockid: ::clockid_t, sevp: *mut ::sigevent, timerid: *mut ::timer_t, ) -> ::c_int4090 pub fn timer_create( 4091 clockid: ::clockid_t, 4092 sevp: *mut ::sigevent, 4093 timerid: *mut ::timer_t, 4094 ) -> ::c_int; timer_delete(timerid: ::timer_t) -> ::c_int4095 pub fn timer_delete(timerid: ::timer_t) -> ::c_int; timer_getoverrun(timerid: ::timer_t) -> ::c_int4096 pub fn timer_getoverrun(timerid: ::timer_t) -> ::c_int; timer_gettime(timerid: ::timer_t, curr_value: *mut ::itimerspec) -> ::c_int4097 pub fn timer_gettime(timerid: ::timer_t, curr_value: *mut ::itimerspec) -> ::c_int; timer_settime( timerid: ::timer_t, flags: ::c_int, new_value: *const ::itimerspec, old_value: *mut ::itimerspec, ) -> ::c_int4098 pub fn timer_settime( 4099 timerid: ::timer_t, 4100 flags: ::c_int, 4101 new_value: *const ::itimerspec, 4102 old_value: *mut ::itimerspec, 4103 ) -> ::c_int; 4104 fstat(__fd: ::c_int, __buf: *mut stat) -> ::c_int4105 pub fn fstat(__fd: ::c_int, __buf: *mut stat) -> ::c_int; fstat64(__fd: ::c_int, __buf: *mut stat64) -> ::c_int4106 pub fn fstat64(__fd: ::c_int, __buf: *mut stat64) -> ::c_int; 4107 fstatat( __fd: ::c_int, __file: *const ::c_char, __buf: *mut stat, __flag: ::c_int, ) -> ::c_int4108 pub fn fstatat( 4109 __fd: ::c_int, 4110 __file: *const ::c_char, 4111 __buf: *mut stat, 4112 __flag: ::c_int, 4113 ) -> ::c_int; fstatat64( __fd: ::c_int, __file: *const ::c_char, __buf: *mut stat64, __flag: ::c_int, ) -> ::c_int4114 pub fn fstatat64( 4115 __fd: ::c_int, 4116 __file: *const ::c_char, 4117 __buf: *mut stat64, 4118 __flag: ::c_int, 4119 ) -> ::c_int; 4120 statx( dirfd: ::c_int, pathname: *const c_char, flags: ::c_int, mask: ::c_uint, statxbuf: *mut statx, ) -> ::c_int4121 pub fn statx( 4122 dirfd: ::c_int, 4123 pathname: *const c_char, 4124 flags: ::c_int, 4125 mask: ::c_uint, 4126 statxbuf: *mut statx, 4127 ) -> ::c_int; 4128 ftruncate(__fd: ::c_int, __length: __off_t) -> ::c_int4129 pub fn ftruncate(__fd: ::c_int, __length: __off_t) -> ::c_int; ftruncate64(__fd: ::c_int, __length: __off64_t) -> ::c_int4130 pub fn ftruncate64(__fd: ::c_int, __length: __off64_t) -> ::c_int; truncate64(__file: *const ::c_char, __length: __off64_t) -> ::c_int4131 pub fn truncate64(__file: *const ::c_char, __length: __off64_t) -> ::c_int; 4132 lstat(__file: *const ::c_char, __buf: *mut stat) -> ::c_int4133 pub fn lstat(__file: *const ::c_char, __buf: *mut stat) -> ::c_int; lstat64(__file: *const ::c_char, __buf: *mut stat64) -> ::c_int4134 pub fn lstat64(__file: *const ::c_char, __buf: *mut stat64) -> ::c_int; 4135 statfs(path: *const ::c_char, buf: *mut statfs) -> ::c_int4136 pub fn statfs(path: *const ::c_char, buf: *mut statfs) -> ::c_int; statfs64(__file: *const ::c_char, __buf: *mut statfs64) -> ::c_int4137 pub fn statfs64(__file: *const ::c_char, __buf: *mut statfs64) -> ::c_int; fstatfs(fd: ::c_int, buf: *mut statfs) -> ::c_int4138 pub fn fstatfs(fd: ::c_int, buf: *mut statfs) -> ::c_int; fstatfs64(__fildes: ::c_int, __buf: *mut statfs64) -> ::c_int4139 pub fn fstatfs64(__fildes: ::c_int, __buf: *mut statfs64) -> ::c_int; 4140 statvfs(__file: *const ::c_char, __buf: *mut statvfs) -> ::c_int4141 pub fn statvfs(__file: *const ::c_char, __buf: *mut statvfs) -> ::c_int; statvfs64(__file: *const ::c_char, __buf: *mut statvfs64) -> ::c_int4142 pub fn statvfs64(__file: *const ::c_char, __buf: *mut statvfs64) -> ::c_int; fstatvfs(__fildes: ::c_int, __buf: *mut statvfs) -> ::c_int4143 pub fn fstatvfs(__fildes: ::c_int, __buf: *mut statvfs) -> ::c_int; fstatvfs64(__fildes: ::c_int, __buf: *mut statvfs64) -> ::c_int4144 pub fn fstatvfs64(__fildes: ::c_int, __buf: *mut statvfs64) -> ::c_int; 4145 open(__file: *const ::c_char, __oflag: ::c_int, ...) -> ::c_int4146 pub fn open(__file: *const ::c_char, __oflag: ::c_int, ...) -> ::c_int; open64(__file: *const ::c_char, __oflag: ::c_int, ...) -> ::c_int4147 pub fn open64(__file: *const ::c_char, __oflag: ::c_int, ...) -> ::c_int; 4148 openat(__fd: ::c_int, __file: *const ::c_char, __oflag: ::c_int, ...) -> ::c_int4149 pub fn openat(__fd: ::c_int, __file: *const ::c_char, __oflag: ::c_int, ...) -> ::c_int; openat64(__fd: ::c_int, __file: *const ::c_char, __oflag: ::c_int, ...) -> ::c_int4150 pub fn openat64(__fd: ::c_int, __file: *const ::c_char, __oflag: ::c_int, ...) -> ::c_int; 4151 fopen64(filename: *const c_char, mode: *const c_char) -> *mut ::FILE4152 pub fn fopen64(filename: *const c_char, mode: *const c_char) -> *mut ::FILE; freopen64( filename: *const c_char, mode: *const c_char, file: *mut ::FILE, ) -> *mut ::FILE4153 pub fn freopen64( 4154 filename: *const c_char, 4155 mode: *const c_char, 4156 file: *mut ::FILE, 4157 ) -> *mut ::FILE; 4158 creat64(path: *const c_char, mode: mode_t) -> ::c_int4159 pub fn creat64(path: *const c_char, mode: mode_t) -> ::c_int; 4160 mkostemp(template: *mut ::c_char, flags: ::c_int) -> ::c_int4161 pub fn mkostemp(template: *mut ::c_char, flags: ::c_int) -> ::c_int; mkostemps(template: *mut ::c_char, suffixlen: ::c_int, flags: ::c_int) -> ::c_int4162 pub fn mkostemps(template: *mut ::c_char, suffixlen: ::c_int, flags: ::c_int) -> ::c_int; mkstemps(template: *mut ::c_char, suffixlen: ::c_int) -> ::c_int4163 pub fn mkstemps(template: *mut ::c_char, suffixlen: ::c_int) -> ::c_int; tmpfile64() -> *mut ::FILE4164 pub fn tmpfile64() -> *mut ::FILE; 4165 popen(command: *const c_char, mode: *const c_char) -> *mut ::FILE4166 pub fn popen(command: *const c_char, mode: *const c_char) -> *mut ::FILE; 4167 getdtablesize() -> ::c_int4168 pub fn getdtablesize() -> ::c_int; 4169 4170 // Added in `glibc` 2.34 close_range(first: ::c_uint, last: ::c_uint, flags: ::c_int) -> ::c_int4171 pub fn close_range(first: ::c_uint, last: ::c_uint, flags: ::c_int) -> ::c_int; 4172 openpty( __amaster: *mut ::c_int, __aslave: *mut ::c_int, __name: *mut ::c_char, __termp: *const termios, __winp: *const ::winsize, ) -> ::c_int4173 pub fn openpty( 4174 __amaster: *mut ::c_int, 4175 __aslave: *mut ::c_int, 4176 __name: *mut ::c_char, 4177 __termp: *const termios, 4178 __winp: *const ::winsize, 4179 ) -> ::c_int; 4180 forkpty( __amaster: *mut ::c_int, __name: *mut ::c_char, __termp: *const termios, __winp: *const ::winsize, ) -> ::pid_t4181 pub fn forkpty( 4182 __amaster: *mut ::c_int, 4183 __name: *mut ::c_char, 4184 __termp: *const termios, 4185 __winp: *const ::winsize, 4186 ) -> ::pid_t; 4187 getpt() -> ::c_int4188 pub fn getpt() -> ::c_int; ptsname_r(fd: ::c_int, buf: *mut ::c_char, buflen: ::size_t) -> ::c_int4189 pub fn ptsname_r(fd: ::c_int, buf: *mut ::c_char, buflen: ::size_t) -> ::c_int; login_tty(fd: ::c_int) -> ::c_int4190 pub fn login_tty(fd: ::c_int) -> ::c_int; 4191 ctermid(s: *mut ::c_char) -> *mut ::c_char4192 pub fn ctermid(s: *mut ::c_char) -> *mut ::c_char; 4193 clearenv() -> ::c_int4194 pub fn clearenv() -> ::c_int; 4195 execveat( dirfd: ::c_int, pathname: *const ::c_char, argv: *const *mut c_char, envp: *const *mut c_char, flags: ::c_int, ) -> ::c_int4196 pub fn execveat( 4197 dirfd: ::c_int, 4198 pathname: *const ::c_char, 4199 argv: *const *mut c_char, 4200 envp: *const *mut c_char, 4201 flags: ::c_int, 4202 ) -> ::c_int; execvpe( file: *const ::c_char, argv: *const *const ::c_char, envp: *const *const ::c_char, ) -> ::c_int4203 pub fn execvpe( 4204 file: *const ::c_char, 4205 argv: *const *const ::c_char, 4206 envp: *const *const ::c_char, 4207 ) -> ::c_int; fexecve( fd: ::c_int, argv: *const *const ::c_char, envp: *const *const ::c_char, ) -> ::c_int4208 pub fn fexecve( 4209 fd: ::c_int, 4210 argv: *const *const ::c_char, 4211 envp: *const *const ::c_char, 4212 ) -> ::c_int; 4213 daemon(nochdir: ::c_int, noclose: ::c_int) -> ::c_int4214 pub fn daemon(nochdir: ::c_int, noclose: ::c_int) -> ::c_int; 4215 4216 // posix/spawn.h 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_int4217 pub fn posix_spawn( 4218 pid: *mut ::pid_t, 4219 path: *const ::c_char, 4220 file_actions: *const ::posix_spawn_file_actions_t, 4221 attrp: *const ::posix_spawnattr_t, 4222 argv: *const *mut ::c_char, 4223 envp: *const *mut ::c_char, 4224 ) -> ::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_int4225 pub fn posix_spawnp( 4226 pid: *mut ::pid_t, 4227 file: *const ::c_char, 4228 file_actions: *const ::posix_spawn_file_actions_t, 4229 attrp: *const ::posix_spawnattr_t, 4230 argv: *const *mut ::c_char, 4231 envp: *const *mut ::c_char, 4232 ) -> ::c_int; posix_spawnattr_init(attr: *mut posix_spawnattr_t) -> ::c_int4233 pub fn posix_spawnattr_init(attr: *mut posix_spawnattr_t) -> ::c_int; posix_spawnattr_destroy(attr: *mut posix_spawnattr_t) -> ::c_int4234 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_int4235 pub fn posix_spawnattr_getsigdefault( 4236 attr: *const posix_spawnattr_t, 4237 default: *mut ::sigset_t, 4238 ) -> ::c_int; posix_spawnattr_setsigdefault( attr: *mut posix_spawnattr_t, default: *const ::sigset_t, ) -> ::c_int4239 pub fn posix_spawnattr_setsigdefault( 4240 attr: *mut posix_spawnattr_t, 4241 default: *const ::sigset_t, 4242 ) -> ::c_int; posix_spawnattr_getsigmask( attr: *const posix_spawnattr_t, default: *mut ::sigset_t, ) -> ::c_int4243 pub fn posix_spawnattr_getsigmask( 4244 attr: *const posix_spawnattr_t, 4245 default: *mut ::sigset_t, 4246 ) -> ::c_int; posix_spawnattr_setsigmask( attr: *mut posix_spawnattr_t, default: *const ::sigset_t, ) -> ::c_int4247 pub fn posix_spawnattr_setsigmask( 4248 attr: *mut posix_spawnattr_t, 4249 default: *const ::sigset_t, 4250 ) -> ::c_int; posix_spawnattr_getflags( attr: *const posix_spawnattr_t, flags: *mut ::c_short, ) -> ::c_int4251 pub fn posix_spawnattr_getflags( 4252 attr: *const posix_spawnattr_t, 4253 flags: *mut ::c_short, 4254 ) -> ::c_int; posix_spawnattr_setflags(attr: *mut posix_spawnattr_t, flags: ::c_short) -> ::c_int4255 pub fn posix_spawnattr_setflags(attr: *mut posix_spawnattr_t, flags: ::c_short) -> ::c_int; posix_spawnattr_getpgroup( attr: *const posix_spawnattr_t, flags: *mut ::pid_t, ) -> ::c_int4256 pub fn posix_spawnattr_getpgroup( 4257 attr: *const posix_spawnattr_t, 4258 flags: *mut ::pid_t, 4259 ) -> ::c_int; posix_spawnattr_setpgroup(attr: *mut posix_spawnattr_t, flags: ::pid_t) -> ::c_int4260 pub fn posix_spawnattr_setpgroup(attr: *mut posix_spawnattr_t, flags: ::pid_t) -> ::c_int; posix_spawnattr_getschedpolicy( attr: *const posix_spawnattr_t, flags: *mut ::c_int, ) -> ::c_int4261 pub fn posix_spawnattr_getschedpolicy( 4262 attr: *const posix_spawnattr_t, 4263 flags: *mut ::c_int, 4264 ) -> ::c_int; posix_spawnattr_setschedpolicy(attr: *mut posix_spawnattr_t, flags: ::c_int) -> ::c_int4265 pub fn posix_spawnattr_setschedpolicy(attr: *mut posix_spawnattr_t, flags: ::c_int) -> ::c_int; posix_spawnattr_getschedparam( attr: *const posix_spawnattr_t, param: *mut ::sched_param, ) -> ::c_int4266 pub fn posix_spawnattr_getschedparam( 4267 attr: *const posix_spawnattr_t, 4268 param: *mut ::sched_param, 4269 ) -> ::c_int; posix_spawnattr_setschedparam( attr: *mut posix_spawnattr_t, param: *const ::sched_param, ) -> ::c_int4270 pub fn posix_spawnattr_setschedparam( 4271 attr: *mut posix_spawnattr_t, 4272 param: *const ::sched_param, 4273 ) -> ::c_int; 4274 posix_spawn_file_actions_init(actions: *mut posix_spawn_file_actions_t) -> ::c_int4275 pub fn posix_spawn_file_actions_init(actions: *mut posix_spawn_file_actions_t) -> ::c_int; posix_spawn_file_actions_destroy(actions: *mut posix_spawn_file_actions_t) -> ::c_int4276 pub fn posix_spawn_file_actions_destroy(actions: *mut posix_spawn_file_actions_t) -> ::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_int4277 pub fn posix_spawn_file_actions_addopen( 4278 actions: *mut posix_spawn_file_actions_t, 4279 fd: ::c_int, 4280 path: *const ::c_char, 4281 oflag: ::c_int, 4282 mode: ::mode_t, 4283 ) -> ::c_int; posix_spawn_file_actions_addclose( actions: *mut posix_spawn_file_actions_t, fd: ::c_int, ) -> ::c_int4284 pub fn posix_spawn_file_actions_addclose( 4285 actions: *mut posix_spawn_file_actions_t, 4286 fd: ::c_int, 4287 ) -> ::c_int; posix_spawn_file_actions_adddup2( actions: *mut posix_spawn_file_actions_t, fd: ::c_int, newfd: ::c_int, ) -> ::c_int4288 pub fn posix_spawn_file_actions_adddup2( 4289 actions: *mut posix_spawn_file_actions_t, 4290 fd: ::c_int, 4291 newfd: ::c_int, 4292 ) -> ::c_int; 4293 4294 // Added in `glibc` 2.29 posix_spawn_file_actions_addchdir_np( actions: *mut ::posix_spawn_file_actions_t, path: *const ::c_char, ) -> ::c_int4295 pub fn posix_spawn_file_actions_addchdir_np( 4296 actions: *mut ::posix_spawn_file_actions_t, 4297 path: *const ::c_char, 4298 ) -> ::c_int; 4299 // Added in `glibc` 2.29 posix_spawn_file_actions_addfchdir_np( actions: *mut ::posix_spawn_file_actions_t, fd: ::c_int, ) -> ::c_int4300 pub fn posix_spawn_file_actions_addfchdir_np( 4301 actions: *mut ::posix_spawn_file_actions_t, 4302 fd: ::c_int, 4303 ) -> ::c_int; 4304 // Added in `glibc` 2.34 posix_spawn_file_actions_addclosefrom_np( actions: *mut ::posix_spawn_file_actions_t, from: ::c_int, ) -> ::c_int4305 pub fn posix_spawn_file_actions_addclosefrom_np( 4306 actions: *mut ::posix_spawn_file_actions_t, 4307 from: ::c_int, 4308 ) -> ::c_int; 4309 // Added in `glibc` 2.35 posix_spawn_file_actions_addtcsetpgrp_np( actions: *mut ::posix_spawn_file_actions_t, tcfd: ::c_int, ) -> ::c_int4310 pub fn posix_spawn_file_actions_addtcsetpgrp_np( 4311 actions: *mut ::posix_spawn_file_actions_t, 4312 tcfd: ::c_int, 4313 ) -> ::c_int; 4314 shm_open(name: *const c_char, oflag: ::c_int, mode: mode_t) -> ::c_int4315 pub fn shm_open(name: *const c_char, oflag: ::c_int, mode: mode_t) -> ::c_int; shm_unlink(name: *const ::c_char) -> ::c_int4316 pub fn shm_unlink(name: *const ::c_char) -> ::c_int; 4317 euidaccess(pathname: *const ::c_char, mode: ::c_int) -> ::c_int4318 pub fn euidaccess(pathname: *const ::c_char, mode: ::c_int) -> ::c_int; eaccess(pathname: *const ::c_char, mode: ::c_int) -> ::c_int4319 pub fn eaccess(pathname: *const ::c_char, mode: ::c_int) -> ::c_int; 4320 faccessat( dirfd: ::c_int, pathname: *const ::c_char, mode: ::c_int, flags: ::c_int, ) -> ::c_int4321 pub fn faccessat( 4322 dirfd: ::c_int, 4323 pathname: *const ::c_char, 4324 mode: ::c_int, 4325 flags: ::c_int, 4326 ) -> ::c_int; 4327 stat(__file: *const ::c_char, __buf: *mut stat) -> ::c_int4328 pub fn stat(__file: *const ::c_char, __buf: *mut stat) -> ::c_int; stat64(__file: *const ::c_char, __buf: *mut stat64) -> ::c_int4329 pub fn stat64(__file: *const ::c_char, __buf: *mut stat64) -> ::c_int; 4330 readdir(dirp: *mut ::DIR) -> *mut ::dirent4331 pub fn readdir(dirp: *mut ::DIR) -> *mut ::dirent; readdir64(dirp: *mut ::DIR) -> *mut ::dirent644332 pub fn readdir64(dirp: *mut ::DIR) -> *mut ::dirent64; readdir_r(dirp: *mut ::DIR, entry: *mut ::dirent, result: *mut *mut ::dirent) -> ::c_int4333 pub fn readdir_r(dirp: *mut ::DIR, entry: *mut ::dirent, result: *mut *mut ::dirent) 4334 -> ::c_int; readdir64_r( dirp: *mut ::DIR, entry: *mut ::dirent64, result: *mut *mut ::dirent64, ) -> ::c_int4335 pub fn readdir64_r( 4336 dirp: *mut ::DIR, 4337 entry: *mut ::dirent64, 4338 result: *mut *mut ::dirent64, 4339 ) -> ::c_int; seekdir(dirp: *mut ::DIR, loc: ::c_long)4340 pub fn seekdir(dirp: *mut ::DIR, loc: ::c_long); telldir(dirp: *mut ::DIR) -> ::c_long4341 pub fn telldir(dirp: *mut ::DIR) -> ::c_long; 4342 dirfd(dirp: *mut ::DIR) -> ::c_int4343 pub fn dirfd(dirp: *mut ::DIR) -> ::c_int; 4344 4345 #[link_name = "__xpg_strerror_r"] strerror_r(__errnum: ::c_int, __buf: *mut ::c_char, __buflen: ::size_t) -> ::c_int4346 pub fn strerror_r(__errnum: ::c_int, __buf: *mut ::c_char, __buflen: ::size_t) -> ::c_int; 4347 __errno_location() -> *mut ::c_int4348 pub fn __errno_location() -> *mut ::c_int; 4349 mmap64( __addr: *mut ::c_void, __len: size_t, __prot: ::c_int, __flags: ::c_int, __fd: ::c_int, __offset: __off64_t, ) -> *mut ::c_void4350 pub fn mmap64( 4351 __addr: *mut ::c_void, 4352 __len: size_t, 4353 __prot: ::c_int, 4354 __flags: ::c_int, 4355 __fd: ::c_int, 4356 __offset: __off64_t, 4357 ) -> *mut ::c_void; 4358 mremap( addr: *mut ::c_void, len: ::size_t, new_len: ::size_t, flags: ::c_int, ... ) -> *mut ::c_void4359 pub fn mremap( 4360 addr: *mut ::c_void, 4361 len: ::size_t, 4362 new_len: ::size_t, 4363 flags: ::c_int, 4364 ... 4365 ) -> *mut ::c_void; 4366 mprotect(__addr: *mut ::c_void, __len: ::size_t, __prot: ::c_int) -> ::c_int4367 pub fn mprotect(__addr: *mut ::c_void, __len: ::size_t, __prot: ::c_int) -> ::c_int; 4368 msync(__addr: *mut ::c_void, __len: ::size_t, __flags: ::c_int) -> ::c_int4369 pub fn msync(__addr: *mut ::c_void, __len: ::size_t, __flags: ::c_int) -> ::c_int; sync()4370 pub fn sync(); syncfs(fd: ::c_int) -> ::c_int4371 pub fn syncfs(fd: ::c_int) -> ::c_int; fdatasync(fd: ::c_int) -> ::c_int4372 pub fn fdatasync(fd: ::c_int) -> ::c_int; 4373 fallocate64(fd: ::c_int, mode: ::c_int, offset: ::off64_t, len: ::off64_t) -> ::c_int4374 pub fn fallocate64(fd: ::c_int, mode: ::c_int, offset: ::off64_t, len: ::off64_t) -> ::c_int; posix_fallocate(fd: ::c_int, offset: ::off_t, len: ::off_t) -> ::c_int4375 pub fn posix_fallocate(fd: ::c_int, offset: ::off_t, len: ::off_t) -> ::c_int; posix_fallocate64(fd: ::c_int, offset: ::off64_t, len: ::off64_t) -> ::c_int4376 pub fn posix_fallocate64(fd: ::c_int, offset: ::off64_t, len: ::off64_t) -> ::c_int; 4377 posix_fadvise(fd: ::c_int, offset: ::off_t, len: ::off_t, advise: ::c_int) -> ::c_int4378 pub fn posix_fadvise(fd: ::c_int, offset: ::off_t, len: ::off_t, advise: ::c_int) -> ::c_int; 4379 posix_fadvise64( fd: ::c_int, offset: ::off64_t, len: ::off64_t, advise: ::c_int, ) -> ::c_int4380 pub fn posix_fadvise64( 4381 fd: ::c_int, 4382 offset: ::off64_t, 4383 len: ::off64_t, 4384 advise: ::c_int, 4385 ) -> ::c_int; 4386 madvise(__addr: *mut ::c_void, __len: ::size_t, __advice: ::c_int) -> ::c_int4387 pub fn madvise(__addr: *mut ::c_void, __len: ::size_t, __advice: ::c_int) -> ::c_int; 4388 posix_madvise(addr: *mut ::c_void, len: ::size_t, advice: ::c_int) -> ::c_int4389 pub fn posix_madvise(addr: *mut ::c_void, len: ::size_t, advice: ::c_int) -> ::c_int; 4390 getrlimit(resource: ::__rlimit_resource_t, rlim: *mut ::rlimit) -> ::c_int4391 pub fn getrlimit(resource: ::__rlimit_resource_t, rlim: *mut ::rlimit) -> ::c_int; getrlimit64(resource: ::__rlimit_resource_t, rlim: *mut ::rlimit64) -> ::c_int4392 pub fn getrlimit64(resource: ::__rlimit_resource_t, rlim: *mut ::rlimit64) -> ::c_int; setrlimit(resource: ::__rlimit_resource_t, rlim: *const ::rlimit) -> ::c_int4393 pub fn setrlimit(resource: ::__rlimit_resource_t, rlim: *const ::rlimit) -> ::c_int; setrlimit64(resource: ::__rlimit_resource_t, rlim: *const ::rlimit64) -> ::c_int4394 pub fn setrlimit64(resource: ::__rlimit_resource_t, rlim: *const ::rlimit64) -> ::c_int; 4395 getpriority(which: ::__priority_which, who: ::id_t) -> ::c_int4396 pub fn getpriority(which: ::__priority_which, who: ::id_t) -> ::c_int; setpriority(which: ::__priority_which, who: ::id_t, prio: ::c_int) -> ::c_int4397 pub fn setpriority(which: ::__priority_which, who: ::id_t, prio: ::c_int) -> ::c_int; 4398 getrandom(__buffer: *mut ::c_void, __length: ::size_t, __flags: ::c_uint) -> ::ssize_t4399 pub fn getrandom(__buffer: *mut ::c_void, __length: ::size_t, __flags: ::c_uint) -> ::ssize_t; getentropy(__buffer: *mut ::c_void, __length: ::size_t) -> ::c_int4400 pub fn getentropy(__buffer: *mut ::c_void, __length: ::size_t) -> ::c_int; 4401 memrchr(cx: *const ::c_void, c: ::c_int, n: ::size_t) -> *mut ::c_void4402 pub fn memrchr(cx: *const ::c_void, c: ::c_int, n: ::size_t) -> *mut ::c_void; memmem( haystack: *const ::c_void, haystacklen: ::size_t, needle: *const ::c_void, needlelen: ::size_t, ) -> *mut ::c_void4403 pub fn memmem( 4404 haystack: *const ::c_void, 4405 haystacklen: ::size_t, 4406 needle: *const ::c_void, 4407 needlelen: ::size_t, 4408 ) -> *mut ::c_void; strchrnul(s: *const ::c_char, c: ::c_int) -> *mut ::c_char4409 pub fn strchrnul(s: *const ::c_char, c: ::c_int) -> *mut ::c_char; 4410 abs(i: ::c_int) -> ::c_int4411 pub fn abs(i: ::c_int) -> ::c_int; labs(i: ::c_long) -> ::c_long4412 pub fn labs(i: ::c_long) -> ::c_long; rand() -> ::c_int4413 pub fn rand() -> ::c_int; srand(seed: ::c_uint)4414 pub fn srand(seed: ::c_uint); 4415 drand48() -> ::c_double4416 pub fn drand48() -> ::c_double; erand48(xseed: *mut ::c_ushort) -> ::c_double4417 pub fn erand48(xseed: *mut ::c_ushort) -> ::c_double; lrand48() -> ::c_long4418 pub fn lrand48() -> ::c_long; nrand48(xseed: *mut ::c_ushort) -> ::c_long4419 pub fn nrand48(xseed: *mut ::c_ushort) -> ::c_long; mrand48() -> ::c_long4420 pub fn mrand48() -> ::c_long; jrand48(xseed: *mut ::c_ushort) -> ::c_long4421 pub fn jrand48(xseed: *mut ::c_ushort) -> ::c_long; srand48(seed: ::c_long)4422 pub fn srand48(seed: ::c_long); seed48(xseed: *mut ::c_ushort) -> *mut ::c_ushort4423 pub fn seed48(xseed: *mut ::c_ushort) -> *mut ::c_ushort; lcong48(p: *mut ::c_ushort)4424 pub fn lcong48(p: *mut ::c_ushort); 4425 qsort_r( base: *mut ::c_void, num: ::size_t, size: ::size_t, compar: ::Option< unsafe extern "C" fn(*const ::c_void, *const ::c_void, *mut ::c_void) -> ::c_int, >, arg: *mut ::c_void, )4426 pub fn qsort_r( 4427 base: *mut ::c_void, 4428 num: ::size_t, 4429 size: ::size_t, 4430 compar: ::Option< 4431 unsafe extern "C" fn(*const ::c_void, *const ::c_void, *mut ::c_void) -> ::c_int, 4432 >, 4433 arg: *mut ::c_void, 4434 ); 4435 brk(addr: *mut ::c_void) -> ::c_int4436 pub fn brk(addr: *mut ::c_void) -> ::c_int; sbrk(increment: ::intptr_t) -> *mut ::c_void4437 pub fn sbrk(increment: ::intptr_t) -> *mut ::c_void; 4438 memalign(align: ::size_t, size: ::size_t) -> *mut ::c_void4439 pub fn memalign(align: ::size_t, size: ::size_t) -> *mut ::c_void; mallopt(param: ::c_int, value: ::c_int) -> ::c_int4440 pub fn mallopt(param: ::c_int, value: ::c_int) -> ::c_int; 4441 mallinfo() -> ::mallinfo4442 pub fn mallinfo() -> ::mallinfo; mallinfo2() -> ::mallinfo24443 pub fn mallinfo2() -> ::mallinfo2; malloc_info(options: ::c_int, stream: *mut ::FILE) -> ::c_int4444 pub fn malloc_info(options: ::c_int, stream: *mut ::FILE) -> ::c_int; malloc_usable_size(ptr: *mut ::c_void) -> ::size_t4445 pub fn malloc_usable_size(ptr: *mut ::c_void) -> ::size_t; malloc_trim(__pad: ::size_t) -> ::c_int4446 pub fn malloc_trim(__pad: ::size_t) -> ::c_int; 4447 iconv_open(tocode: *const ::c_char, fromcode: *const ::c_char) -> iconv_t4448 pub fn iconv_open(tocode: *const ::c_char, fromcode: *const ::c_char) -> iconv_t; iconv( cd: iconv_t, inbuf: *mut *mut ::c_char, inbytesleft: *mut ::size_t, outbuf: *mut *mut ::c_char, outbytesleft: *mut ::size_t, ) -> ::size_t4449 pub fn iconv( 4450 cd: iconv_t, 4451 inbuf: *mut *mut ::c_char, 4452 inbytesleft: *mut ::size_t, 4453 outbuf: *mut *mut ::c_char, 4454 outbytesleft: *mut ::size_t, 4455 ) -> ::size_t; iconv_close(cd: iconv_t) -> ::c_int4456 pub fn iconv_close(cd: iconv_t) -> ::c_int; 4457 getopt_long( argc: ::c_int, argv: *const *mut c_char, optstring: *const c_char, longopts: *const option, longindex: *mut ::c_int, ) -> ::c_int4458 pub fn getopt_long( 4459 argc: ::c_int, 4460 argv: *const *mut c_char, 4461 optstring: *const c_char, 4462 longopts: *const option, 4463 longindex: *mut ::c_int, 4464 ) -> ::c_int; 4465 backtrace(buf: *mut *mut ::c_void, sz: ::c_int) -> ::c_int4466 pub fn backtrace(buf: *mut *mut ::c_void, sz: ::c_int) -> ::c_int; 4467 reboot(how_to: ::c_int) -> ::c_int4468 pub fn reboot(how_to: ::c_int) -> ::c_int; 4469 getloadavg(loadavg: *mut ::c_double, nelem: ::c_int) -> ::c_int4470 pub fn getloadavg(loadavg: *mut ::c_double, nelem: ::c_int) -> ::c_int; 4471 regexec( preg: *const ::regex_t, input: *const ::c_char, nmatch: ::size_t, pmatch: *mut regmatch_t, eflags: ::c_int, ) -> ::c_int4472 pub fn regexec( 4473 preg: *const ::regex_t, 4474 input: *const ::c_char, 4475 nmatch: ::size_t, 4476 pmatch: *mut regmatch_t, 4477 eflags: ::c_int, 4478 ) -> ::c_int; 4479 regerror( errcode: ::c_int, preg: *const ::regex_t, errbuf: *mut ::c_char, errbuf_size: ::size_t, ) -> ::size_t4480 pub fn regerror( 4481 errcode: ::c_int, 4482 preg: *const ::regex_t, 4483 errbuf: *mut ::c_char, 4484 errbuf_size: ::size_t, 4485 ) -> ::size_t; 4486 regfree(preg: *mut ::regex_t)4487 pub fn regfree(preg: *mut ::regex_t); 4488 glob( pattern: *const c_char, flags: ::c_int, errfunc: ::Option<extern "C" fn(epath: *const c_char, errno: ::c_int) -> ::c_int>, pglob: *mut ::glob_t, ) -> ::c_int4489 pub fn glob( 4490 pattern: *const c_char, 4491 flags: ::c_int, 4492 errfunc: ::Option<extern "C" fn(epath: *const c_char, errno: ::c_int) -> ::c_int>, 4493 pglob: *mut ::glob_t, 4494 ) -> ::c_int; globfree(pglob: *mut ::glob_t)4495 pub fn globfree(pglob: *mut ::glob_t); 4496 glob64( pattern: *const ::c_char, flags: ::c_int, errfunc: ::Option<extern "C" fn(epath: *const ::c_char, errno: ::c_int) -> ::c_int>, pglob: *mut glob64_t, ) -> ::c_int4497 pub fn glob64( 4498 pattern: *const ::c_char, 4499 flags: ::c_int, 4500 errfunc: ::Option<extern "C" fn(epath: *const ::c_char, errno: ::c_int) -> ::c_int>, 4501 pglob: *mut glob64_t, 4502 ) -> ::c_int; globfree64(pglob: *mut glob64_t)4503 pub fn globfree64(pglob: *mut glob64_t); 4504 getxattr( path: *const c_char, name: *const c_char, value: *mut ::c_void, size: ::size_t, ) -> ::ssize_t4505 pub fn getxattr( 4506 path: *const c_char, 4507 name: *const c_char, 4508 value: *mut ::c_void, 4509 size: ::size_t, 4510 ) -> ::ssize_t; lgetxattr( path: *const c_char, name: *const c_char, value: *mut ::c_void, size: ::size_t, ) -> ::ssize_t4511 pub fn lgetxattr( 4512 path: *const c_char, 4513 name: *const c_char, 4514 value: *mut ::c_void, 4515 size: ::size_t, 4516 ) -> ::ssize_t; fgetxattr( filedes: ::c_int, name: *const c_char, value: *mut ::c_void, size: ::size_t, ) -> ::ssize_t4517 pub fn fgetxattr( 4518 filedes: ::c_int, 4519 name: *const c_char, 4520 value: *mut ::c_void, 4521 size: ::size_t, 4522 ) -> ::ssize_t; setxattr( path: *const c_char, name: *const c_char, value: *const ::c_void, size: ::size_t, flags: ::c_int, ) -> ::c_int4523 pub fn setxattr( 4524 path: *const c_char, 4525 name: *const c_char, 4526 value: *const ::c_void, 4527 size: ::size_t, 4528 flags: ::c_int, 4529 ) -> ::c_int; lsetxattr( path: *const c_char, name: *const c_char, value: *const ::c_void, size: ::size_t, flags: ::c_int, ) -> ::c_int4530 pub fn lsetxattr( 4531 path: *const c_char, 4532 name: *const c_char, 4533 value: *const ::c_void, 4534 size: ::size_t, 4535 flags: ::c_int, 4536 ) -> ::c_int; fsetxattr( filedes: ::c_int, name: *const c_char, value: *const ::c_void, size: ::size_t, flags: ::c_int, ) -> ::c_int4537 pub fn fsetxattr( 4538 filedes: ::c_int, 4539 name: *const c_char, 4540 value: *const ::c_void, 4541 size: ::size_t, 4542 flags: ::c_int, 4543 ) -> ::c_int; listxattr(path: *const c_char, list: *mut c_char, size: ::size_t) -> ::ssize_t4544 pub fn listxattr(path: *const c_char, list: *mut c_char, size: ::size_t) -> ::ssize_t; llistxattr(path: *const c_char, list: *mut c_char, size: ::size_t) -> ::ssize_t4545 pub fn llistxattr(path: *const c_char, list: *mut c_char, size: ::size_t) -> ::ssize_t; flistxattr(filedes: ::c_int, list: *mut c_char, size: ::size_t) -> ::ssize_t4546 pub fn flistxattr(filedes: ::c_int, list: *mut c_char, size: ::size_t) -> ::ssize_t; removexattr(path: *const c_char, name: *const c_char) -> ::c_int4547 pub fn removexattr(path: *const c_char, name: *const c_char) -> ::c_int; lremovexattr(path: *const c_char, name: *const c_char) -> ::c_int4548 pub fn lremovexattr(path: *const c_char, name: *const c_char) -> ::c_int; fremovexattr(filedes: ::c_int, name: *const c_char) -> ::c_int4549 pub fn fremovexattr(filedes: ::c_int, name: *const c_char) -> ::c_int; 4550 dirname(path: *mut ::c_char) -> *mut ::c_char4551 pub fn dirname(path: *mut ::c_char) -> *mut ::c_char; 4552 /// POSIX version of `basename(3)`, defined in `libgen.h`. 4553 #[link_name = "__xpg_basename"] posix_basename(path: *mut ::c_char) -> *mut ::c_char4554 pub fn posix_basename(path: *mut ::c_char) -> *mut ::c_char; 4555 /// GNU version of `basename(3)`, defined in `string.h`. 4556 #[link_name = "basename"] gnu_basename(path: *const ::c_char) -> *mut ::c_char4557 pub fn gnu_basename(path: *const ::c_char) -> *mut ::c_char; 4558 dlmopen(lmid: Lmid_t, filename: *const ::c_char, flag: ::c_int) -> *mut ::c_void4559 pub fn dlmopen(lmid: Lmid_t, filename: *const ::c_char, flag: ::c_int) -> *mut ::c_void; dlinfo(handle: *mut ::c_void, request: ::c_int, info: *mut ::c_void) -> ::c_int4560 pub fn dlinfo(handle: *mut ::c_void, request: ::c_int, info: *mut ::c_void) -> ::c_int; dladdr1( addr: *const ::c_void, info: *mut ::Dl_info, extra_info: *mut *mut ::c_void, flags: ::c_int, ) -> ::c_int4561 pub fn dladdr1( 4562 addr: *const ::c_void, 4563 info: *mut ::Dl_info, 4564 extra_info: *mut *mut ::c_void, 4565 flags: ::c_int, 4566 ) -> ::c_int; 4567 duplocale(base: ::locale_t) -> ::locale_t4568 pub fn duplocale(base: ::locale_t) -> ::locale_t; freelocale(loc: ::locale_t)4569 pub fn freelocale(loc: ::locale_t); newlocale(mask: ::c_int, locale: *const ::c_char, base: ::locale_t) -> ::locale_t4570 pub fn newlocale(mask: ::c_int, locale: *const ::c_char, base: ::locale_t) -> ::locale_t; uselocale(loc: ::locale_t) -> ::locale_t4571 pub fn uselocale(loc: ::locale_t) -> ::locale_t; nl_langinfo(item: ::nl_item) -> *mut ::c_char4572 pub fn nl_langinfo(item: ::nl_item) -> *mut ::c_char; nl_langinfo_l(item: ::nl_item, locale: ::locale_t) -> *mut ::c_char4573 pub fn nl_langinfo_l(item: ::nl_item, locale: ::locale_t) -> *mut ::c_char; 4574 dl_iterate_phdr( callback: ::Option< unsafe extern "C" fn( info: *mut ::dl_phdr_info, size: ::size_t, data: *mut ::c_void, ) -> ::c_int, >, data: *mut ::c_void, ) -> ::c_int4575 pub fn dl_iterate_phdr( 4576 callback: ::Option< 4577 unsafe extern "C" fn( 4578 info: *mut ::dl_phdr_info, 4579 size: ::size_t, 4580 data: *mut ::c_void, 4581 ) -> ::c_int, 4582 >, 4583 data: *mut ::c_void, 4584 ) -> ::c_int; 4585 gnu_get_libc_release() -> *const ::c_char4586 pub fn gnu_get_libc_release() -> *const ::c_char; gnu_get_libc_version() -> *const ::c_char4587 pub fn gnu_get_libc_version() -> *const ::c_char; 4588 } 4589 4590 safe_f! { 4591 pub {const} fn makedev(major: ::c_uint, minor: ::c_uint) -> ::dev_t { 4592 let major = major as ::dev_t; 4593 let minor = minor as ::dev_t; 4594 let mut dev = 0; 4595 dev |= major << 8; 4596 dev |= minor; 4597 dev 4598 } 4599 4600 pub fn SIGRTMAX() -> ::c_int { 4601 unsafe { __libc_current_sigrtmax() } 4602 } 4603 4604 pub fn SIGRTMIN() -> ::c_int { 4605 unsafe { __libc_current_sigrtmin() } 4606 } 4607 4608 pub {const} fn WIFSTOPPED(status: ::c_int) -> bool { 4609 (status & 0xff) == 0x7f 4610 } 4611 4612 pub {const} fn WSTOPSIG(status: ::c_int) -> ::c_int { 4613 (status >> 8) & 0xff 4614 } 4615 4616 pub {const} fn WIFCONTINUED(status: ::c_int) -> bool { 4617 status == 0xffff 4618 } 4619 4620 pub {const} fn WIFSIGNALED(status: ::c_int) -> bool { 4621 ((status & 0x7f) + 1) as i8 >= 2 4622 } 4623 4624 pub {const} fn WTERMSIG(status: ::c_int) -> ::c_int { 4625 status & 0x7f 4626 } 4627 4628 pub {const} fn WIFEXITED(status: ::c_int) -> bool { 4629 (status & 0x7f) == 0 4630 } 4631 4632 pub {const} fn WEXITSTATUS(status: ::c_int) -> ::c_int { 4633 (status >> 8) & 0xff 4634 } 4635 4636 pub {const} fn WCOREDUMP(status: ::c_int) -> bool { 4637 (status & 0x80) != 0 4638 } 4639 4640 pub {const} fn W_EXITCODE(ret: ::c_int, sig: ::c_int) -> ::c_int { 4641 (ret << 8) | sig 4642 } 4643 4644 pub {const} fn W_STOPCODE(sig: ::c_int) -> ::c_int { 4645 (sig << 8) | 0x7f 4646 } 4647 4648 pub {const} fn QCMD(cmd: ::c_int, type_: ::c_int) -> ::c_int { 4649 (cmd << 8) | (type_ & 0x00ff) 4650 } 4651 4652 pub {const} fn IPOPT_COPIED(o: u8) -> u8 { 4653 o & IPOPT_COPY 4654 } 4655 4656 pub {const} fn IPOPT_CLASS(o: u8) -> u8 { 4657 o & IPOPT_CLASS_MASK 4658 } 4659 4660 pub {const} fn IPOPT_NUMBER(o: u8) -> u8 { 4661 o & IPOPT_NUMBER_MASK 4662 } 4663 4664 pub {const} fn IPTOS_ECN(x: u8) -> u8 { 4665 x & ::IPTOS_ECN_MASK 4666 } 4667 } 4668 4669 cfg_if! { 4670 if #[cfg(libc_align)] { 4671 mod align; 4672 pub use self::align::*; 4673 } else { 4674 mod no_align; 4675 pub use self::no_align::*; 4676 } 4677 } 4678 4679 cfg_if! { 4680 if #[cfg(target_pointer_width = "64")] { 4681 mod b64; 4682 pub use self::b64::*; 4683 } else { 4684 mod b32; 4685 pub use self::b32::*; 4686 } 4687 } 4688