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