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