1 pub type mode_t = u16; 2 pub type pthread_attr_t = *mut ::c_void; 3 pub type rlim_t = i64; 4 pub type pthread_mutex_t = *mut ::c_void; 5 pub type pthread_mutexattr_t = *mut ::c_void; 6 pub type pthread_cond_t = *mut ::c_void; 7 pub type pthread_condattr_t = *mut ::c_void; 8 pub type pthread_rwlock_t = *mut ::c_void; 9 pub type pthread_rwlockattr_t = *mut ::c_void; 10 pub type pthread_key_t = ::c_int; 11 pub type tcflag_t = ::c_uint; 12 pub type speed_t = ::c_uint; 13 pub type nl_item = ::c_int; 14 pub type id_t = i64; 15 pub type vm_size_t = ::uintptr_t; 16 17 #[cfg_attr(feature = "extra_traits", derive(Debug))] 18 pub enum timezone {} 19 impl ::Copy for timezone {} 20 impl ::Clone for timezone { clone(&self) -> timezone21 fn clone(&self) -> timezone { 22 *self 23 } 24 } 25 26 impl siginfo_t { si_addr(&self) -> *mut ::c_void27 pub unsafe fn si_addr(&self) -> *mut ::c_void { 28 self.si_addr 29 } 30 si_value(&self) -> ::sigval31 pub unsafe fn si_value(&self) -> ::sigval { 32 self.si_value 33 } 34 } 35 36 s! { 37 pub struct in_addr { 38 pub s_addr: ::in_addr_t, 39 } 40 41 pub struct ip_mreq { 42 pub imr_multiaddr: in_addr, 43 pub imr_interface: in_addr, 44 } 45 46 pub struct glob_t { 47 pub gl_pathc: ::size_t, 48 pub gl_matchc: ::size_t, 49 pub gl_offs: ::size_t, 50 pub gl_flags: ::c_int, 51 pub gl_pathv: *mut *mut ::c_char, 52 __unused3: *mut ::c_void, 53 __unused4: *mut ::c_void, 54 __unused5: *mut ::c_void, 55 __unused6: *mut ::c_void, 56 __unused7: *mut ::c_void, 57 __unused8: *mut ::c_void, 58 } 59 60 pub struct addrinfo { 61 pub ai_flags: ::c_int, 62 pub ai_family: ::c_int, 63 pub ai_socktype: ::c_int, 64 pub ai_protocol: ::c_int, 65 pub ai_addrlen: ::socklen_t, 66 pub ai_canonname: *mut ::c_char, 67 pub ai_addr: *mut ::sockaddr, 68 pub ai_next: *mut addrinfo, 69 } 70 71 pub struct sigset_t { 72 bits: [u32; 4], 73 } 74 75 pub struct siginfo_t { 76 pub si_signo: ::c_int, 77 pub si_errno: ::c_int, 78 pub si_code: ::c_int, 79 pub si_pid: ::pid_t, 80 pub si_uid: ::uid_t, 81 pub si_status: ::c_int, 82 pub si_addr: *mut ::c_void, 83 pub si_value: ::sigval, 84 _pad1: ::c_long, 85 _pad2: [::c_int; 7], 86 } 87 88 pub struct sigaction { 89 pub sa_sigaction: ::sighandler_t, 90 pub sa_flags: ::c_int, 91 pub sa_mask: sigset_t, 92 } 93 94 pub struct sched_param { 95 pub sched_priority: ::c_int, 96 } 97 98 pub struct Dl_info { 99 pub dli_fname: *const ::c_char, 100 pub dli_fbase: *mut ::c_void, 101 pub dli_sname: *const ::c_char, 102 pub dli_saddr: *mut ::c_void, 103 } 104 105 pub struct sockaddr_in { 106 pub sin_len: u8, 107 pub sin_family: ::sa_family_t, 108 pub sin_port: ::in_port_t, 109 pub sin_addr: ::in_addr, 110 pub sin_zero: [::c_char; 8], 111 } 112 113 pub struct termios { 114 pub c_iflag: ::tcflag_t, 115 pub c_oflag: ::tcflag_t, 116 pub c_cflag: ::tcflag_t, 117 pub c_lflag: ::tcflag_t, 118 pub c_cc: [::cc_t; ::NCCS], 119 pub c_ispeed: ::speed_t, 120 pub c_ospeed: ::speed_t, 121 } 122 123 pub struct flock { 124 pub l_start: ::off_t, 125 pub l_len: ::off_t, 126 pub l_pid: ::pid_t, 127 pub l_type: ::c_short, 128 pub l_whence: ::c_short, 129 #[cfg(not(target_os = "dragonfly"))] 130 pub l_sysid: ::c_int, 131 } 132 133 pub struct sf_hdtr { 134 pub headers: *mut ::iovec, 135 pub hdr_cnt: ::c_int, 136 pub trailers: *mut ::iovec, 137 pub trl_cnt: ::c_int, 138 } 139 140 pub struct lconv { 141 pub decimal_point: *mut ::c_char, 142 pub thousands_sep: *mut ::c_char, 143 pub grouping: *mut ::c_char, 144 pub int_curr_symbol: *mut ::c_char, 145 pub currency_symbol: *mut ::c_char, 146 pub mon_decimal_point: *mut ::c_char, 147 pub mon_thousands_sep: *mut ::c_char, 148 pub mon_grouping: *mut ::c_char, 149 pub positive_sign: *mut ::c_char, 150 pub negative_sign: *mut ::c_char, 151 pub int_frac_digits: ::c_char, 152 pub frac_digits: ::c_char, 153 pub p_cs_precedes: ::c_char, 154 pub p_sep_by_space: ::c_char, 155 pub n_cs_precedes: ::c_char, 156 pub n_sep_by_space: ::c_char, 157 pub p_sign_posn: ::c_char, 158 pub n_sign_posn: ::c_char, 159 pub int_p_cs_precedes: ::c_char, 160 pub int_n_cs_precedes: ::c_char, 161 pub int_p_sep_by_space: ::c_char, 162 pub int_n_sep_by_space: ::c_char, 163 pub int_p_sign_posn: ::c_char, 164 pub int_n_sign_posn: ::c_char, 165 } 166 167 pub struct cmsgcred { 168 pub cmcred_pid: ::pid_t, 169 pub cmcred_uid: ::uid_t, 170 pub cmcred_euid: ::uid_t, 171 pub cmcred_gid: ::gid_t, 172 pub cmcred_ngroups: ::c_short, 173 pub cmcred_groups: [::gid_t; CMGROUP_MAX], 174 } 175 176 pub struct rtprio { 177 pub type_: ::c_ushort, 178 pub prio: ::c_ushort, 179 } 180 181 pub struct in6_pktinfo { 182 pub ipi6_addr: ::in6_addr, 183 pub ipi6_ifindex: ::c_uint, 184 } 185 186 pub struct arphdr { 187 pub ar_hrd: u16, 188 pub ar_pro: u16, 189 pub ar_hln: u8, 190 pub ar_pln: u8, 191 pub ar_op: u16, 192 } 193 194 pub struct timex { 195 pub modes: ::c_uint, 196 pub offset: ::c_long, 197 pub freq: ::c_long, 198 pub maxerror: ::c_long, 199 pub esterror: ::c_long, 200 pub status: ::c_int, 201 pub constant: ::c_long, 202 pub precision: ::c_long, 203 pub tolerance: ::c_long, 204 pub ppsfreq: ::c_long, 205 pub jitter: ::c_long, 206 pub shift: ::c_int, 207 pub stabil: ::c_long, 208 pub jitcnt: ::c_long, 209 pub calcnt: ::c_long, 210 pub errcnt: ::c_long, 211 pub stbcnt: ::c_long, 212 } 213 214 pub struct ntptimeval { 215 pub time: ::timespec, 216 pub maxerror: ::c_long, 217 pub esterror: ::c_long, 218 pub tai: ::c_long, 219 pub time_state: ::c_int, 220 } 221 222 pub struct ptrace_io_desc { 223 pub piod_op: ::c_int, 224 pub piod_offs: *mut ::c_void, 225 pub piod_addr: *mut ::c_void, 226 pub piod_len: ::size_t, 227 } 228 } 229 230 s_no_extra_traits! { 231 pub struct sockaddr_storage { 232 pub ss_len: u8, 233 pub ss_family: ::sa_family_t, 234 __ss_pad1: [u8; 6], 235 __ss_align: i64, 236 __ss_pad2: [u8; 112], 237 } 238 } 239 240 cfg_if! { 241 if #[cfg(feature = "extra_traits")] { 242 impl PartialEq for sockaddr_storage { 243 fn eq(&self, other: &sockaddr_storage) -> bool { 244 self.ss_len == other.ss_len 245 && self.ss_family == other.ss_family 246 && self.__ss_pad1 == other.__ss_pad1 247 && self.__ss_align == other.__ss_align 248 && self 249 .__ss_pad2 250 .iter() 251 .zip(other.__ss_pad2.iter()) 252 .all(|(a, b)| a == b) 253 } 254 } 255 impl Eq for sockaddr_storage {} 256 impl ::fmt::Debug for sockaddr_storage { 257 fn fmt(&self, f: &mut ::fmt::Formatter) -> ::fmt::Result { 258 f.debug_struct("sockaddr_storage") 259 .field("ss_len", &self.ss_len) 260 .field("ss_family", &self.ss_family) 261 .field("__ss_pad1", &self.__ss_pad1) 262 .field("__ss_align", &self.__ss_align) 263 // FIXME: .field("__ss_pad2", &self.__ss_pad2) 264 .finish() 265 } 266 } 267 impl ::hash::Hash for sockaddr_storage { 268 fn hash<H: ::hash::Hasher>(&self, state: &mut H) { 269 self.ss_len.hash(state); 270 self.ss_family.hash(state); 271 self.__ss_pad1.hash(state); 272 self.__ss_align.hash(state); 273 self.__ss_pad2.hash(state); 274 } 275 } 276 } 277 } 278 279 #[deprecated( 280 since = "0.2.64", 281 note = "Can vary at runtime. Use sysconf(3) instead" 282 )] 283 pub const AIO_LISTIO_MAX: ::c_int = 16; 284 pub const AIO_CANCELED: ::c_int = 1; 285 pub const AIO_NOTCANCELED: ::c_int = 2; 286 pub const AIO_ALLDONE: ::c_int = 3; 287 pub const LIO_NOP: ::c_int = 0; 288 pub const LIO_WRITE: ::c_int = 1; 289 pub const LIO_READ: ::c_int = 2; 290 pub const LIO_WAIT: ::c_int = 1; 291 pub const LIO_NOWAIT: ::c_int = 0; 292 293 pub const SIGEV_NONE: ::c_int = 0; 294 pub const SIGEV_SIGNAL: ::c_int = 1; 295 pub const SIGEV_THREAD: ::c_int = 2; 296 pub const SIGEV_KEVENT: ::c_int = 3; 297 298 pub const CODESET: ::nl_item = 0; 299 pub const D_T_FMT: ::nl_item = 1; 300 pub const D_FMT: ::nl_item = 2; 301 pub const T_FMT: ::nl_item = 3; 302 pub const T_FMT_AMPM: ::nl_item = 4; 303 pub const AM_STR: ::nl_item = 5; 304 pub const PM_STR: ::nl_item = 6; 305 306 pub const DAY_1: ::nl_item = 7; 307 pub const DAY_2: ::nl_item = 8; 308 pub const DAY_3: ::nl_item = 9; 309 pub const DAY_4: ::nl_item = 10; 310 pub const DAY_5: ::nl_item = 11; 311 pub const DAY_6: ::nl_item = 12; 312 pub const DAY_7: ::nl_item = 13; 313 314 pub const ABDAY_1: ::nl_item = 14; 315 pub const ABDAY_2: ::nl_item = 15; 316 pub const ABDAY_3: ::nl_item = 16; 317 pub const ABDAY_4: ::nl_item = 17; 318 pub const ABDAY_5: ::nl_item = 18; 319 pub const ABDAY_6: ::nl_item = 19; 320 pub const ABDAY_7: ::nl_item = 20; 321 322 pub const MON_1: ::nl_item = 21; 323 pub const MON_2: ::nl_item = 22; 324 pub const MON_3: ::nl_item = 23; 325 pub const MON_4: ::nl_item = 24; 326 pub const MON_5: ::nl_item = 25; 327 pub const MON_6: ::nl_item = 26; 328 pub const MON_7: ::nl_item = 27; 329 pub const MON_8: ::nl_item = 28; 330 pub const MON_9: ::nl_item = 29; 331 pub const MON_10: ::nl_item = 30; 332 pub const MON_11: ::nl_item = 31; 333 pub const MON_12: ::nl_item = 32; 334 335 pub const ABMON_1: ::nl_item = 33; 336 pub const ABMON_2: ::nl_item = 34; 337 pub const ABMON_3: ::nl_item = 35; 338 pub const ABMON_4: ::nl_item = 36; 339 pub const ABMON_5: ::nl_item = 37; 340 pub const ABMON_6: ::nl_item = 38; 341 pub const ABMON_7: ::nl_item = 39; 342 pub const ABMON_8: ::nl_item = 40; 343 pub const ABMON_9: ::nl_item = 41; 344 pub const ABMON_10: ::nl_item = 42; 345 pub const ABMON_11: ::nl_item = 43; 346 pub const ABMON_12: ::nl_item = 44; 347 348 pub const ERA: ::nl_item = 45; 349 pub const ERA_D_FMT: ::nl_item = 46; 350 pub const ERA_D_T_FMT: ::nl_item = 47; 351 pub const ERA_T_FMT: ::nl_item = 48; 352 pub const ALT_DIGITS: ::nl_item = 49; 353 354 pub const RADIXCHAR: ::nl_item = 50; 355 pub const THOUSEP: ::nl_item = 51; 356 357 pub const YESEXPR: ::nl_item = 52; 358 pub const NOEXPR: ::nl_item = 53; 359 360 pub const YESSTR: ::nl_item = 54; 361 pub const NOSTR: ::nl_item = 55; 362 363 pub const CRNCYSTR: ::nl_item = 56; 364 365 pub const D_MD_ORDER: ::nl_item = 57; 366 367 pub const ALTMON_1: ::nl_item = 58; 368 pub const ALTMON_2: ::nl_item = 59; 369 pub const ALTMON_3: ::nl_item = 60; 370 pub const ALTMON_4: ::nl_item = 61; 371 pub const ALTMON_5: ::nl_item = 62; 372 pub const ALTMON_6: ::nl_item = 63; 373 pub const ALTMON_7: ::nl_item = 64; 374 pub const ALTMON_8: ::nl_item = 65; 375 pub const ALTMON_9: ::nl_item = 66; 376 pub const ALTMON_10: ::nl_item = 67; 377 pub const ALTMON_11: ::nl_item = 68; 378 pub const ALTMON_12: ::nl_item = 69; 379 380 pub const EXIT_FAILURE: ::c_int = 1; 381 pub const EXIT_SUCCESS: ::c_int = 0; 382 pub const EOF: ::c_int = -1; 383 pub const SEEK_SET: ::c_int = 0; 384 pub const SEEK_CUR: ::c_int = 1; 385 pub const SEEK_END: ::c_int = 2; 386 pub const SEEK_DATA: ::c_int = 3; 387 pub const SEEK_HOLE: ::c_int = 4; 388 pub const _IOFBF: ::c_int = 0; 389 pub const _IONBF: ::c_int = 2; 390 pub const _IOLBF: ::c_int = 1; 391 pub const BUFSIZ: ::c_uint = 1024; 392 pub const FOPEN_MAX: ::c_uint = 20; 393 pub const FILENAME_MAX: ::c_uint = 1024; 394 pub const L_tmpnam: ::c_uint = 1024; 395 pub const TMP_MAX: ::c_uint = 308915776; 396 397 pub const O_NOCTTY: ::c_int = 32768; 398 pub const O_DIRECT: ::c_int = 0x00010000; 399 400 pub const S_IFIFO: mode_t = 4096; 401 pub const S_IFCHR: mode_t = 8192; 402 pub const S_IFBLK: mode_t = 24576; 403 pub const S_IFDIR: mode_t = 16384; 404 pub const S_IFREG: mode_t = 32768; 405 pub const S_IFLNK: mode_t = 40960; 406 pub const S_IFSOCK: mode_t = 49152; 407 pub const S_IFMT: mode_t = 61440; 408 pub const S_IEXEC: mode_t = 64; 409 pub const S_IWRITE: mode_t = 128; 410 pub const S_IREAD: mode_t = 256; 411 pub const S_IRWXU: mode_t = 448; 412 pub const S_IXUSR: mode_t = 64; 413 pub const S_IWUSR: mode_t = 128; 414 pub const S_IRUSR: mode_t = 256; 415 pub const S_IRWXG: mode_t = 56; 416 pub const S_IXGRP: mode_t = 8; 417 pub const S_IWGRP: mode_t = 16; 418 pub const S_IRGRP: mode_t = 32; 419 pub const S_IRWXO: mode_t = 7; 420 pub const S_IXOTH: mode_t = 1; 421 pub const S_IWOTH: mode_t = 2; 422 pub const S_IROTH: mode_t = 4; 423 pub const F_OK: ::c_int = 0; 424 pub const R_OK: ::c_int = 4; 425 pub const W_OK: ::c_int = 2; 426 pub const X_OK: ::c_int = 1; 427 pub const STDIN_FILENO: ::c_int = 0; 428 pub const STDOUT_FILENO: ::c_int = 1; 429 pub const STDERR_FILENO: ::c_int = 2; 430 pub const F_LOCK: ::c_int = 1; 431 pub const F_TEST: ::c_int = 3; 432 pub const F_TLOCK: ::c_int = 2; 433 pub const F_ULOCK: ::c_int = 0; 434 pub const F_DUPFD_CLOEXEC: ::c_int = 17; 435 pub const SIGHUP: ::c_int = 1; 436 pub const SIGINT: ::c_int = 2; 437 pub const SIGQUIT: ::c_int = 3; 438 pub const SIGILL: ::c_int = 4; 439 pub const SIGABRT: ::c_int = 6; 440 pub const SIGEMT: ::c_int = 7; 441 pub const SIGFPE: ::c_int = 8; 442 pub const SIGKILL: ::c_int = 9; 443 pub const SIGSEGV: ::c_int = 11; 444 pub const SIGPIPE: ::c_int = 13; 445 pub const SIGALRM: ::c_int = 14; 446 pub const SIGTERM: ::c_int = 15; 447 448 pub const PROT_NONE: ::c_int = 0; 449 pub const PROT_READ: ::c_int = 1; 450 pub const PROT_WRITE: ::c_int = 2; 451 pub const PROT_EXEC: ::c_int = 4; 452 453 pub const MAP_FILE: ::c_int = 0x0000; 454 pub const MAP_SHARED: ::c_int = 0x0001; 455 pub const MAP_PRIVATE: ::c_int = 0x0002; 456 pub const MAP_FIXED: ::c_int = 0x0010; 457 pub const MAP_ANON: ::c_int = 0x1000; 458 pub const MAP_ANONYMOUS: ::c_int = MAP_ANON; 459 460 pub const MAP_FAILED: *mut ::c_void = !0 as *mut ::c_void; 461 462 pub const MCL_CURRENT: ::c_int = 0x0001; 463 pub const MCL_FUTURE: ::c_int = 0x0002; 464 465 pub const MS_SYNC: ::c_int = 0x0000; 466 pub const MS_ASYNC: ::c_int = 0x0001; 467 pub const MS_INVALIDATE: ::c_int = 0x0002; 468 469 pub const EPERM: ::c_int = 1; 470 pub const ENOENT: ::c_int = 2; 471 pub const ESRCH: ::c_int = 3; 472 pub const EINTR: ::c_int = 4; 473 pub const EIO: ::c_int = 5; 474 pub const ENXIO: ::c_int = 6; 475 pub const E2BIG: ::c_int = 7; 476 pub const ENOEXEC: ::c_int = 8; 477 pub const EBADF: ::c_int = 9; 478 pub const ECHILD: ::c_int = 10; 479 pub const EDEADLK: ::c_int = 11; 480 pub const ENOMEM: ::c_int = 12; 481 pub const EACCES: ::c_int = 13; 482 pub const EFAULT: ::c_int = 14; 483 pub const ENOTBLK: ::c_int = 15; 484 pub const EBUSY: ::c_int = 16; 485 pub const EEXIST: ::c_int = 17; 486 pub const EXDEV: ::c_int = 18; 487 pub const ENODEV: ::c_int = 19; 488 pub const ENOTDIR: ::c_int = 20; 489 pub const EISDIR: ::c_int = 21; 490 pub const EINVAL: ::c_int = 22; 491 pub const ENFILE: ::c_int = 23; 492 pub const EMFILE: ::c_int = 24; 493 pub const ENOTTY: ::c_int = 25; 494 pub const ETXTBSY: ::c_int = 26; 495 pub const EFBIG: ::c_int = 27; 496 pub const ENOSPC: ::c_int = 28; 497 pub const ESPIPE: ::c_int = 29; 498 pub const EROFS: ::c_int = 30; 499 pub const EMLINK: ::c_int = 31; 500 pub const EPIPE: ::c_int = 32; 501 pub const EDOM: ::c_int = 33; 502 pub const ERANGE: ::c_int = 34; 503 pub const EAGAIN: ::c_int = 35; 504 pub const EWOULDBLOCK: ::c_int = 35; 505 pub const EINPROGRESS: ::c_int = 36; 506 pub const EALREADY: ::c_int = 37; 507 pub const ENOTSOCK: ::c_int = 38; 508 pub const EDESTADDRREQ: ::c_int = 39; 509 pub const EMSGSIZE: ::c_int = 40; 510 pub const EPROTOTYPE: ::c_int = 41; 511 pub const ENOPROTOOPT: ::c_int = 42; 512 pub const EPROTONOSUPPORT: ::c_int = 43; 513 pub const ESOCKTNOSUPPORT: ::c_int = 44; 514 pub const EOPNOTSUPP: ::c_int = 45; 515 pub const ENOTSUP: ::c_int = EOPNOTSUPP; 516 pub const EPFNOSUPPORT: ::c_int = 46; 517 pub const EAFNOSUPPORT: ::c_int = 47; 518 pub const EADDRINUSE: ::c_int = 48; 519 pub const EADDRNOTAVAIL: ::c_int = 49; 520 pub const ENETDOWN: ::c_int = 50; 521 pub const ENETUNREACH: ::c_int = 51; 522 pub const ENETRESET: ::c_int = 52; 523 pub const ECONNABORTED: ::c_int = 53; 524 pub const ECONNRESET: ::c_int = 54; 525 pub const ENOBUFS: ::c_int = 55; 526 pub const EISCONN: ::c_int = 56; 527 pub const ENOTCONN: ::c_int = 57; 528 pub const ESHUTDOWN: ::c_int = 58; 529 pub const ETOOMANYREFS: ::c_int = 59; 530 pub const ETIMEDOUT: ::c_int = 60; 531 pub const ECONNREFUSED: ::c_int = 61; 532 pub const ELOOP: ::c_int = 62; 533 pub const ENAMETOOLONG: ::c_int = 63; 534 pub const EHOSTDOWN: ::c_int = 64; 535 pub const EHOSTUNREACH: ::c_int = 65; 536 pub const ENOTEMPTY: ::c_int = 66; 537 pub const EPROCLIM: ::c_int = 67; 538 pub const EUSERS: ::c_int = 68; 539 pub const EDQUOT: ::c_int = 69; 540 pub const ESTALE: ::c_int = 70; 541 pub const EREMOTE: ::c_int = 71; 542 pub const EBADRPC: ::c_int = 72; 543 pub const ERPCMISMATCH: ::c_int = 73; 544 pub const EPROGUNAVAIL: ::c_int = 74; 545 pub const EPROGMISMATCH: ::c_int = 75; 546 pub const EPROCUNAVAIL: ::c_int = 76; 547 pub const ENOLCK: ::c_int = 77; 548 pub const ENOSYS: ::c_int = 78; 549 pub const EFTYPE: ::c_int = 79; 550 pub const EAUTH: ::c_int = 80; 551 pub const ENEEDAUTH: ::c_int = 81; 552 pub const EIDRM: ::c_int = 82; 553 pub const ENOMSG: ::c_int = 83; 554 pub const EOVERFLOW: ::c_int = 84; 555 pub const ECANCELED: ::c_int = 85; 556 pub const EILSEQ: ::c_int = 86; 557 pub const ENOATTR: ::c_int = 87; 558 pub const EDOOFUS: ::c_int = 88; 559 pub const EBADMSG: ::c_int = 89; 560 pub const EMULTIHOP: ::c_int = 90; 561 pub const ENOLINK: ::c_int = 91; 562 pub const EPROTO: ::c_int = 92; 563 564 pub const POLLSTANDARD: ::c_short = ::POLLIN 565 | ::POLLPRI 566 | ::POLLOUT 567 | ::POLLRDNORM 568 | ::POLLRDBAND 569 | ::POLLWRBAND 570 | ::POLLERR 571 | ::POLLHUP 572 | ::POLLNVAL; 573 574 pub const EAI_AGAIN: ::c_int = 2; 575 pub const EAI_BADFLAGS: ::c_int = 3; 576 pub const EAI_FAIL: ::c_int = 4; 577 pub const EAI_FAMILY: ::c_int = 5; 578 pub const EAI_MEMORY: ::c_int = 6; 579 pub const EAI_NONAME: ::c_int = 8; 580 pub const EAI_SERVICE: ::c_int = 9; 581 pub const EAI_SOCKTYPE: ::c_int = 10; 582 pub const EAI_SYSTEM: ::c_int = 11; 583 pub const EAI_OVERFLOW: ::c_int = 14; 584 585 pub const F_DUPFD: ::c_int = 0; 586 pub const F_GETFD: ::c_int = 1; 587 pub const F_SETFD: ::c_int = 2; 588 pub const F_GETFL: ::c_int = 3; 589 pub const F_SETFL: ::c_int = 4; 590 591 pub const SIGTRAP: ::c_int = 5; 592 593 pub const GLOB_APPEND: ::c_int = 0x0001; 594 pub const GLOB_DOOFFS: ::c_int = 0x0002; 595 pub const GLOB_ERR: ::c_int = 0x0004; 596 pub const GLOB_MARK: ::c_int = 0x0008; 597 pub const GLOB_NOCHECK: ::c_int = 0x0010; 598 pub const GLOB_NOSORT: ::c_int = 0x0020; 599 pub const GLOB_NOESCAPE: ::c_int = 0x2000; 600 601 pub const GLOB_NOSPACE: ::c_int = -1; 602 pub const GLOB_ABORTED: ::c_int = -2; 603 pub const GLOB_NOMATCH: ::c_int = -3; 604 605 pub const POSIX_MADV_NORMAL: ::c_int = 0; 606 pub const POSIX_MADV_RANDOM: ::c_int = 1; 607 pub const POSIX_MADV_SEQUENTIAL: ::c_int = 2; 608 pub const POSIX_MADV_WILLNEED: ::c_int = 3; 609 pub const POSIX_MADV_DONTNEED: ::c_int = 4; 610 611 pub const PTHREAD_PROCESS_PRIVATE: ::c_int = 0; 612 pub const PTHREAD_PROCESS_SHARED: ::c_int = 1; 613 pub const PTHREAD_CREATE_JOINABLE: ::c_int = 0; 614 pub const PTHREAD_CREATE_DETACHED: ::c_int = 1; 615 616 pub const RLIMIT_CPU: ::c_int = 0; 617 pub const RLIMIT_FSIZE: ::c_int = 1; 618 pub const RLIMIT_DATA: ::c_int = 2; 619 pub const RLIMIT_STACK: ::c_int = 3; 620 pub const RLIMIT_CORE: ::c_int = 4; 621 pub const RLIMIT_RSS: ::c_int = 5; 622 pub const RLIMIT_MEMLOCK: ::c_int = 6; 623 pub const RLIMIT_NPROC: ::c_int = 7; 624 pub const RLIMIT_NOFILE: ::c_int = 8; 625 pub const RLIMIT_SBSIZE: ::c_int = 9; 626 pub const RLIMIT_VMEM: ::c_int = 10; 627 pub const RLIMIT_AS: ::c_int = RLIMIT_VMEM; 628 pub const RLIM_INFINITY: rlim_t = 0x7fff_ffff_ffff_ffff; 629 630 pub const RUSAGE_SELF: ::c_int = 0; 631 pub const RUSAGE_CHILDREN: ::c_int = -1; 632 633 pub const MADV_NORMAL: ::c_int = 0; 634 pub const MADV_RANDOM: ::c_int = 1; 635 pub const MADV_SEQUENTIAL: ::c_int = 2; 636 pub const MADV_WILLNEED: ::c_int = 3; 637 pub const MADV_DONTNEED: ::c_int = 4; 638 pub const MADV_FREE: ::c_int = 5; 639 pub const MADV_NOSYNC: ::c_int = 6; 640 pub const MADV_AUTOSYNC: ::c_int = 7; 641 pub const MADV_NOCORE: ::c_int = 8; 642 pub const MADV_CORE: ::c_int = 9; 643 644 pub const MINCORE_INCORE: ::c_int = 0x1; 645 pub const MINCORE_REFERENCED: ::c_int = 0x2; 646 pub const MINCORE_MODIFIED: ::c_int = 0x4; 647 pub const MINCORE_REFERENCED_OTHER: ::c_int = 0x8; 648 pub const MINCORE_MODIFIED_OTHER: ::c_int = 0x10; 649 pub const MINCORE_SUPER: ::c_int = 0x20; 650 651 pub const AF_UNSPEC: ::c_int = 0; 652 pub const AF_LOCAL: ::c_int = 1; 653 pub const AF_UNIX: ::c_int = AF_LOCAL; 654 pub const AF_INET: ::c_int = 2; 655 pub const AF_IMPLINK: ::c_int = 3; 656 pub const AF_PUP: ::c_int = 4; 657 pub const AF_CHAOS: ::c_int = 5; 658 pub const AF_NETBIOS: ::c_int = 6; 659 pub const AF_ISO: ::c_int = 7; 660 pub const AF_OSI: ::c_int = AF_ISO; 661 pub const AF_ECMA: ::c_int = 8; 662 pub const AF_DATAKIT: ::c_int = 9; 663 pub const AF_CCITT: ::c_int = 10; 664 pub const AF_SNA: ::c_int = 11; 665 pub const AF_DECnet: ::c_int = 12; 666 pub const AF_DLI: ::c_int = 13; 667 pub const AF_LAT: ::c_int = 14; 668 pub const AF_HYLINK: ::c_int = 15; 669 pub const AF_APPLETALK: ::c_int = 16; 670 pub const AF_ROUTE: ::c_int = 17; 671 pub const AF_LINK: ::c_int = 18; 672 pub const pseudo_AF_XTP: ::c_int = 19; 673 pub const AF_COIP: ::c_int = 20; 674 pub const AF_CNT: ::c_int = 21; 675 pub const pseudo_AF_RTIP: ::c_int = 22; 676 pub const AF_IPX: ::c_int = 23; 677 pub const AF_SIP: ::c_int = 24; 678 pub const pseudo_AF_PIP: ::c_int = 25; 679 pub const AF_ISDN: ::c_int = 26; 680 pub const AF_E164: ::c_int = AF_ISDN; 681 pub const pseudo_AF_KEY: ::c_int = 27; 682 pub const AF_INET6: ::c_int = 28; 683 pub const AF_NATM: ::c_int = 29; 684 pub const AF_ATM: ::c_int = 30; 685 pub const pseudo_AF_HDRCMPLT: ::c_int = 31; 686 pub const AF_NETGRAPH: ::c_int = 32; 687 688 pub const PF_UNSPEC: ::c_int = AF_UNSPEC; 689 pub const PF_LOCAL: ::c_int = AF_LOCAL; 690 pub const PF_UNIX: ::c_int = PF_LOCAL; 691 pub const PF_INET: ::c_int = AF_INET; 692 pub const PF_IMPLINK: ::c_int = AF_IMPLINK; 693 pub const PF_PUP: ::c_int = AF_PUP; 694 pub const PF_CHAOS: ::c_int = AF_CHAOS; 695 pub const PF_NETBIOS: ::c_int = AF_NETBIOS; 696 pub const PF_ISO: ::c_int = AF_ISO; 697 pub const PF_OSI: ::c_int = AF_ISO; 698 pub const PF_ECMA: ::c_int = AF_ECMA; 699 pub const PF_DATAKIT: ::c_int = AF_DATAKIT; 700 pub const PF_CCITT: ::c_int = AF_CCITT; 701 pub const PF_SNA: ::c_int = AF_SNA; 702 pub const PF_DECnet: ::c_int = AF_DECnet; 703 pub const PF_DLI: ::c_int = AF_DLI; 704 pub const PF_LAT: ::c_int = AF_LAT; 705 pub const PF_HYLINK: ::c_int = AF_HYLINK; 706 pub const PF_APPLETALK: ::c_int = AF_APPLETALK; 707 pub const PF_ROUTE: ::c_int = AF_ROUTE; 708 pub const PF_LINK: ::c_int = AF_LINK; 709 pub const PF_XTP: ::c_int = pseudo_AF_XTP; 710 pub const PF_COIP: ::c_int = AF_COIP; 711 pub const PF_CNT: ::c_int = AF_CNT; 712 pub const PF_SIP: ::c_int = AF_SIP; 713 pub const PF_IPX: ::c_int = AF_IPX; 714 pub const PF_RTIP: ::c_int = pseudo_AF_RTIP; 715 pub const PF_PIP: ::c_int = pseudo_AF_PIP; 716 pub const PF_ISDN: ::c_int = AF_ISDN; 717 pub const PF_KEY: ::c_int = pseudo_AF_KEY; 718 pub const PF_INET6: ::c_int = AF_INET6; 719 pub const PF_NATM: ::c_int = AF_NATM; 720 pub const PF_ATM: ::c_int = AF_ATM; 721 pub const PF_NETGRAPH: ::c_int = AF_NETGRAPH; 722 723 pub const PIOD_READ_D: ::c_int = 1; 724 pub const PIOD_WRITE_D: ::c_int = 2; 725 pub const PIOD_READ_I: ::c_int = 3; 726 pub const PIOD_WRITE_I: ::c_int = 4; 727 728 pub const PT_TRACE_ME: ::c_int = 0; 729 pub const PT_READ_I: ::c_int = 1; 730 pub const PT_READ_D: ::c_int = 2; 731 pub const PT_WRITE_I: ::c_int = 4; 732 pub const PT_WRITE_D: ::c_int = 5; 733 pub const PT_CONTINUE: ::c_int = 7; 734 pub const PT_KILL: ::c_int = 8; 735 pub const PT_STEP: ::c_int = 9; 736 pub const PT_ATTACH: ::c_int = 10; 737 pub const PT_DETACH: ::c_int = 11; 738 pub const PT_IO: ::c_int = 12; 739 740 pub const SOMAXCONN: ::c_int = 128; 741 742 pub const MSG_OOB: ::c_int = 0x00000001; 743 pub const MSG_PEEK: ::c_int = 0x00000002; 744 pub const MSG_DONTROUTE: ::c_int = 0x00000004; 745 pub const MSG_EOR: ::c_int = 0x00000008; 746 pub const MSG_TRUNC: ::c_int = 0x00000010; 747 pub const MSG_CTRUNC: ::c_int = 0x00000020; 748 pub const MSG_WAITALL: ::c_int = 0x00000040; 749 pub const MSG_DONTWAIT: ::c_int = 0x00000080; 750 pub const MSG_EOF: ::c_int = 0x00000100; 751 752 pub const SCM_TIMESTAMP: ::c_int = 0x02; 753 pub const SCM_CREDS: ::c_int = 0x03; 754 755 pub const SOCK_STREAM: ::c_int = 1; 756 pub const SOCK_DGRAM: ::c_int = 2; 757 pub const SOCK_RAW: ::c_int = 3; 758 pub const SOCK_RDM: ::c_int = 4; 759 pub const SOCK_SEQPACKET: ::c_int = 5; 760 pub const SOCK_CLOEXEC: ::c_int = 0x10000000; 761 pub const SOCK_NONBLOCK: ::c_int = 0x20000000; 762 pub const SOCK_MAXADDRLEN: ::c_int = 255; 763 pub const IP_TTL: ::c_int = 4; 764 pub const IP_HDRINCL: ::c_int = 2; 765 pub const IP_RECVDSTADDR: ::c_int = 7; 766 pub const IP_SENDSRCADDR: ::c_int = IP_RECVDSTADDR; 767 pub const IP_ADD_MEMBERSHIP: ::c_int = 12; 768 pub const IP_DROP_MEMBERSHIP: ::c_int = 13; 769 pub const IP_RECVIF: ::c_int = 20; 770 pub const IPV6_JOIN_GROUP: ::c_int = 12; 771 pub const IPV6_LEAVE_GROUP: ::c_int = 13; 772 pub const IPV6_CHECKSUM: ::c_int = 26; 773 pub const IPV6_RECVPKTINFO: ::c_int = 36; 774 pub const IPV6_PKTINFO: ::c_int = 46; 775 pub const IPV6_HOPLIMIT: ::c_int = 47; 776 pub const IPV6_RECVTCLASS: ::c_int = 57; 777 pub const IPV6_TCLASS: ::c_int = 61; 778 779 pub const TCP_NOPUSH: ::c_int = 4; 780 pub const TCP_NOOPT: ::c_int = 8; 781 pub const TCP_KEEPIDLE: ::c_int = 256; 782 pub const TCP_KEEPINTVL: ::c_int = 512; 783 pub const TCP_KEEPCNT: ::c_int = 1024; 784 785 pub const SOL_SOCKET: ::c_int = 0xffff; 786 pub const SO_DEBUG: ::c_int = 0x01; 787 pub const SO_ACCEPTCONN: ::c_int = 0x0002; 788 pub const SO_REUSEADDR: ::c_int = 0x0004; 789 pub const SO_KEEPALIVE: ::c_int = 0x0008; 790 pub const SO_DONTROUTE: ::c_int = 0x0010; 791 pub const SO_BROADCAST: ::c_int = 0x0020; 792 pub const SO_USELOOPBACK: ::c_int = 0x0040; 793 pub const SO_LINGER: ::c_int = 0x0080; 794 pub const SO_OOBINLINE: ::c_int = 0x0100; 795 pub const SO_REUSEPORT: ::c_int = 0x0200; 796 pub const SO_TIMESTAMP: ::c_int = 0x0400; 797 pub const SO_NOSIGPIPE: ::c_int = 0x0800; 798 pub const SO_ACCEPTFILTER: ::c_int = 0x1000; 799 pub const SO_SNDBUF: ::c_int = 0x1001; 800 pub const SO_RCVBUF: ::c_int = 0x1002; 801 pub const SO_SNDLOWAT: ::c_int = 0x1003; 802 pub const SO_RCVLOWAT: ::c_int = 0x1004; 803 pub const SO_SNDTIMEO: ::c_int = 0x1005; 804 pub const SO_RCVTIMEO: ::c_int = 0x1006; 805 pub const SO_ERROR: ::c_int = 0x1007; 806 pub const SO_TYPE: ::c_int = 0x1008; 807 808 pub const SHUT_RD: ::c_int = 0; 809 pub const SHUT_WR: ::c_int = 1; 810 pub const SHUT_RDWR: ::c_int = 2; 811 812 pub const LOCK_SH: ::c_int = 1; 813 pub const LOCK_EX: ::c_int = 2; 814 pub const LOCK_NB: ::c_int = 4; 815 pub const LOCK_UN: ::c_int = 8; 816 817 pub const MAP_COPY: ::c_int = 0x0002; 818 #[doc(hidden)] 819 #[deprecated(since = "0.2.54", note = "Removed in FreeBSD 11")] 820 pub const MAP_RENAME: ::c_int = 0x0020; 821 #[doc(hidden)] 822 #[deprecated(since = "0.2.54", note = "Removed in FreeBSD 11")] 823 pub const MAP_NORESERVE: ::c_int = 0x0040; 824 pub const MAP_HASSEMAPHORE: ::c_int = 0x0200; 825 pub const MAP_STACK: ::c_int = 0x0400; 826 pub const MAP_NOSYNC: ::c_int = 0x0800; 827 pub const MAP_NOCORE: ::c_int = 0x020000; 828 829 pub const IPPROTO_RAW: ::c_int = 255; 830 831 pub const _PC_LINK_MAX: ::c_int = 1; 832 pub const _PC_MAX_CANON: ::c_int = 2; 833 pub const _PC_MAX_INPUT: ::c_int = 3; 834 pub const _PC_NAME_MAX: ::c_int = 4; 835 pub const _PC_PATH_MAX: ::c_int = 5; 836 pub const _PC_PIPE_BUF: ::c_int = 6; 837 pub const _PC_CHOWN_RESTRICTED: ::c_int = 7; 838 pub const _PC_NO_TRUNC: ::c_int = 8; 839 pub const _PC_VDISABLE: ::c_int = 9; 840 pub const _PC_ALLOC_SIZE_MIN: ::c_int = 10; 841 pub const _PC_FILESIZEBITS: ::c_int = 12; 842 pub const _PC_REC_INCR_XFER_SIZE: ::c_int = 14; 843 pub const _PC_REC_MAX_XFER_SIZE: ::c_int = 15; 844 pub const _PC_REC_MIN_XFER_SIZE: ::c_int = 16; 845 pub const _PC_REC_XFER_ALIGN: ::c_int = 17; 846 pub const _PC_SYMLINK_MAX: ::c_int = 18; 847 pub const _PC_MIN_HOLE_SIZE: ::c_int = 21; 848 pub const _PC_ASYNC_IO: ::c_int = 53; 849 pub const _PC_PRIO_IO: ::c_int = 54; 850 pub const _PC_SYNC_IO: ::c_int = 55; 851 pub const _PC_ACL_EXTENDED: ::c_int = 59; 852 pub const _PC_ACL_PATH_MAX: ::c_int = 60; 853 pub const _PC_CAP_PRESENT: ::c_int = 61; 854 pub const _PC_INF_PRESENT: ::c_int = 62; 855 pub const _PC_MAC_PRESENT: ::c_int = 63; 856 857 pub const _SC_ARG_MAX: ::c_int = 1; 858 pub const _SC_CHILD_MAX: ::c_int = 2; 859 pub const _SC_CLK_TCK: ::c_int = 3; 860 pub const _SC_NGROUPS_MAX: ::c_int = 4; 861 pub const _SC_OPEN_MAX: ::c_int = 5; 862 pub const _SC_JOB_CONTROL: ::c_int = 6; 863 pub const _SC_SAVED_IDS: ::c_int = 7; 864 pub const _SC_VERSION: ::c_int = 8; 865 pub const _SC_BC_BASE_MAX: ::c_int = 9; 866 pub const _SC_BC_DIM_MAX: ::c_int = 10; 867 pub const _SC_BC_SCALE_MAX: ::c_int = 11; 868 pub const _SC_BC_STRING_MAX: ::c_int = 12; 869 pub const _SC_COLL_WEIGHTS_MAX: ::c_int = 13; 870 pub const _SC_EXPR_NEST_MAX: ::c_int = 14; 871 pub const _SC_LINE_MAX: ::c_int = 15; 872 pub const _SC_RE_DUP_MAX: ::c_int = 16; 873 pub const _SC_2_VERSION: ::c_int = 17; 874 pub const _SC_2_C_BIND: ::c_int = 18; 875 pub const _SC_2_C_DEV: ::c_int = 19; 876 pub const _SC_2_CHAR_TERM: ::c_int = 20; 877 pub const _SC_2_FORT_DEV: ::c_int = 21; 878 pub const _SC_2_FORT_RUN: ::c_int = 22; 879 pub const _SC_2_LOCALEDEF: ::c_int = 23; 880 pub const _SC_2_SW_DEV: ::c_int = 24; 881 pub const _SC_2_UPE: ::c_int = 25; 882 pub const _SC_STREAM_MAX: ::c_int = 26; 883 pub const _SC_TZNAME_MAX: ::c_int = 27; 884 pub const _SC_ASYNCHRONOUS_IO: ::c_int = 28; 885 pub const _SC_MAPPED_FILES: ::c_int = 29; 886 pub const _SC_MEMLOCK: ::c_int = 30; 887 pub const _SC_MEMLOCK_RANGE: ::c_int = 31; 888 pub const _SC_MEMORY_PROTECTION: ::c_int = 32; 889 pub const _SC_MESSAGE_PASSING: ::c_int = 33; 890 pub const _SC_PRIORITIZED_IO: ::c_int = 34; 891 pub const _SC_PRIORITY_SCHEDULING: ::c_int = 35; 892 pub const _SC_REALTIME_SIGNALS: ::c_int = 36; 893 pub const _SC_SEMAPHORES: ::c_int = 37; 894 pub const _SC_FSYNC: ::c_int = 38; 895 pub const _SC_SHARED_MEMORY_OBJECTS: ::c_int = 39; 896 pub const _SC_SYNCHRONIZED_IO: ::c_int = 40; 897 pub const _SC_TIMERS: ::c_int = 41; 898 pub const _SC_AIO_LISTIO_MAX: ::c_int = 42; 899 pub const _SC_AIO_MAX: ::c_int = 43; 900 pub const _SC_AIO_PRIO_DELTA_MAX: ::c_int = 44; 901 pub const _SC_DELAYTIMER_MAX: ::c_int = 45; 902 pub const _SC_MQ_OPEN_MAX: ::c_int = 46; 903 pub const _SC_PAGESIZE: ::c_int = 47; 904 pub const _SC_PAGE_SIZE: ::c_int = _SC_PAGESIZE; 905 pub const _SC_RTSIG_MAX: ::c_int = 48; 906 pub const _SC_SEM_NSEMS_MAX: ::c_int = 49; 907 pub const _SC_SEM_VALUE_MAX: ::c_int = 50; 908 pub const _SC_SIGQUEUE_MAX: ::c_int = 51; 909 pub const _SC_TIMER_MAX: ::c_int = 52; 910 pub const _SC_IOV_MAX: ::c_int = 56; 911 pub const _SC_NPROCESSORS_CONF: ::c_int = 57; 912 pub const _SC_2_PBS: ::c_int = 59; 913 pub const _SC_2_PBS_ACCOUNTING: ::c_int = 60; 914 pub const _SC_2_PBS_CHECKPOINT: ::c_int = 61; 915 pub const _SC_2_PBS_LOCATE: ::c_int = 62; 916 pub const _SC_2_PBS_MESSAGE: ::c_int = 63; 917 pub const _SC_2_PBS_TRACK: ::c_int = 64; 918 pub const _SC_ADVISORY_INFO: ::c_int = 65; 919 pub const _SC_BARRIERS: ::c_int = 66; 920 pub const _SC_CLOCK_SELECTION: ::c_int = 67; 921 pub const _SC_CPUTIME: ::c_int = 68; 922 pub const _SC_FILE_LOCKING: ::c_int = 69; 923 pub const _SC_NPROCESSORS_ONLN: ::c_int = 58; 924 pub const _SC_GETGR_R_SIZE_MAX: ::c_int = 70; 925 pub const _SC_GETPW_R_SIZE_MAX: ::c_int = 71; 926 pub const _SC_HOST_NAME_MAX: ::c_int = 72; 927 pub const _SC_LOGIN_NAME_MAX: ::c_int = 73; 928 pub const _SC_MONOTONIC_CLOCK: ::c_int = 74; 929 pub const _SC_MQ_PRIO_MAX: ::c_int = 75; 930 pub const _SC_READER_WRITER_LOCKS: ::c_int = 76; 931 pub const _SC_REGEXP: ::c_int = 77; 932 pub const _SC_SHELL: ::c_int = 78; 933 pub const _SC_SPAWN: ::c_int = 79; 934 pub const _SC_SPIN_LOCKS: ::c_int = 80; 935 pub const _SC_SPORADIC_SERVER: ::c_int = 81; 936 pub const _SC_THREAD_ATTR_STACKADDR: ::c_int = 82; 937 pub const _SC_THREAD_ATTR_STACKSIZE: ::c_int = 83; 938 pub const _SC_THREAD_DESTRUCTOR_ITERATIONS: ::c_int = 85; 939 pub const _SC_THREAD_KEYS_MAX: ::c_int = 86; 940 pub const _SC_THREAD_PRIO_INHERIT: ::c_int = 87; 941 pub const _SC_THREAD_PRIO_PROTECT: ::c_int = 88; 942 pub const _SC_THREAD_PRIORITY_SCHEDULING: ::c_int = 89; 943 pub const _SC_THREAD_PROCESS_SHARED: ::c_int = 90; 944 pub const _SC_THREAD_SAFE_FUNCTIONS: ::c_int = 91; 945 pub const _SC_THREAD_SPORADIC_SERVER: ::c_int = 92; 946 pub const _SC_THREAD_STACK_MIN: ::c_int = 93; 947 pub const _SC_THREAD_THREADS_MAX: ::c_int = 94; 948 pub const _SC_TIMEOUTS: ::c_int = 95; 949 pub const _SC_THREADS: ::c_int = 96; 950 pub const _SC_TRACE: ::c_int = 97; 951 pub const _SC_TRACE_EVENT_FILTER: ::c_int = 98; 952 pub const _SC_TRACE_INHERIT: ::c_int = 99; 953 pub const _SC_TRACE_LOG: ::c_int = 100; 954 pub const _SC_TTY_NAME_MAX: ::c_int = 101; 955 pub const _SC_TYPED_MEMORY_OBJECTS: ::c_int = 102; 956 pub const _SC_V6_ILP32_OFF32: ::c_int = 103; 957 pub const _SC_V6_ILP32_OFFBIG: ::c_int = 104; 958 pub const _SC_V6_LP64_OFF64: ::c_int = 105; 959 pub const _SC_V6_LPBIG_OFFBIG: ::c_int = 106; 960 pub const _SC_ATEXIT_MAX: ::c_int = 107; 961 pub const _SC_XOPEN_CRYPT: ::c_int = 108; 962 pub const _SC_XOPEN_ENH_I18N: ::c_int = 109; 963 pub const _SC_XOPEN_LEGACY: ::c_int = 110; 964 pub const _SC_XOPEN_REALTIME: ::c_int = 111; 965 pub const _SC_XOPEN_REALTIME_THREADS: ::c_int = 112; 966 pub const _SC_XOPEN_SHM: ::c_int = 113; 967 pub const _SC_XOPEN_STREAMS: ::c_int = 114; 968 pub const _SC_XOPEN_UNIX: ::c_int = 115; 969 pub const _SC_XOPEN_VERSION: ::c_int = 116; 970 pub const _SC_XOPEN_XCU_VERSION: ::c_int = 117; 971 pub const _SC_IPV6: ::c_int = 118; 972 pub const _SC_RAW_SOCKETS: ::c_int = 119; 973 pub const _SC_SYMLOOP_MAX: ::c_int = 120; 974 pub const _SC_PHYS_PAGES: ::c_int = 121; 975 976 pub const PTHREAD_MUTEX_INITIALIZER: pthread_mutex_t = 0 as *mut _; 977 pub const PTHREAD_COND_INITIALIZER: pthread_cond_t = 0 as *mut _; 978 pub const PTHREAD_RWLOCK_INITIALIZER: pthread_rwlock_t = 0 as *mut _; 979 pub const PTHREAD_MUTEX_ERRORCHECK: ::c_int = 1; 980 pub const PTHREAD_MUTEX_RECURSIVE: ::c_int = 2; 981 pub const PTHREAD_MUTEX_NORMAL: ::c_int = 3; 982 pub const PTHREAD_MUTEX_DEFAULT: ::c_int = PTHREAD_MUTEX_ERRORCHECK; 983 984 pub const SCHED_FIFO: ::c_int = 1; 985 pub const SCHED_OTHER: ::c_int = 2; 986 pub const SCHED_RR: ::c_int = 3; 987 988 pub const FD_SETSIZE: usize = 1024; 989 990 pub const ST_NOSUID: ::c_ulong = 2; 991 992 pub const NI_MAXHOST: ::size_t = 1025; 993 994 pub const RTLD_LOCAL: ::c_int = 0; 995 pub const RTLD_NODELETE: ::c_int = 0x1000; 996 pub const RTLD_NOLOAD: ::c_int = 0x2000; 997 pub const RTLD_GLOBAL: ::c_int = 0x100; 998 999 pub const LOG_NTP: ::c_int = 12 << 3; 1000 pub const LOG_SECURITY: ::c_int = 13 << 3; 1001 pub const LOG_CONSOLE: ::c_int = 14 << 3; 1002 pub const LOG_NFACILITIES: ::c_int = 24; 1003 1004 pub const TIOCEXCL: ::c_uint = 0x2000740d; 1005 pub const TIOCNXCL: ::c_uint = 0x2000740e; 1006 pub const TIOCFLUSH: ::c_ulong = 0x80047410; 1007 pub const TIOCGETA: ::c_uint = 0x402c7413; 1008 pub const TIOCSETA: ::c_ulong = 0x802c7414; 1009 pub const TIOCSETAW: ::c_ulong = 0x802c7415; 1010 pub const TIOCSETAF: ::c_ulong = 0x802c7416; 1011 pub const TIOCGETD: ::c_uint = 0x4004741a; 1012 pub const TIOCSETD: ::c_ulong = 0x8004741b; 1013 pub const TIOCGDRAINWAIT: ::c_uint = 0x40047456; 1014 pub const TIOCSDRAINWAIT: ::c_ulong = 0x80047457; 1015 pub const TIOCTIMESTAMP: ::c_uint = 0x40107459; 1016 pub const TIOCMGDTRWAIT: ::c_uint = 0x4004745a; 1017 pub const TIOCMSDTRWAIT: ::c_ulong = 0x8004745b; 1018 pub const TIOCDRAIN: ::c_uint = 0x2000745e; 1019 pub const TIOCEXT: ::c_ulong = 0x80047460; 1020 pub const TIOCSCTTY: ::c_uint = 0x20007461; 1021 pub const TIOCCONS: ::c_ulong = 0x80047462; 1022 pub const TIOCGSID: ::c_uint = 0x40047463; 1023 pub const TIOCSTAT: ::c_uint = 0x20007465; 1024 pub const TIOCUCNTL: ::c_ulong = 0x80047466; 1025 pub const TIOCSWINSZ: ::c_ulong = 0x80087467; 1026 pub const TIOCGWINSZ: ::c_uint = 0x40087468; 1027 pub const TIOCMGET: ::c_uint = 0x4004746a; 1028 pub const TIOCM_LE: ::c_int = 0x1; 1029 pub const TIOCM_DTR: ::c_int = 0x2; 1030 pub const TIOCM_RTS: ::c_int = 0x4; 1031 pub const TIOCM_ST: ::c_int = 0x8; 1032 pub const TIOCM_SR: ::c_int = 0x10; 1033 pub const TIOCM_CTS: ::c_int = 0x20; 1034 pub const TIOCM_RI: ::c_int = 0x80; 1035 pub const TIOCM_DSR: ::c_int = 0x100; 1036 pub const TIOCM_CD: ::c_int = 0x40; 1037 pub const TIOCM_CAR: ::c_int = 0x40; 1038 pub const TIOCM_RNG: ::c_int = 0x80; 1039 pub const TIOCMBIC: ::c_ulong = 0x8004746b; 1040 pub const TIOCMBIS: ::c_ulong = 0x8004746c; 1041 pub const TIOCMSET: ::c_ulong = 0x8004746d; 1042 pub const TIOCSTART: ::c_uint = 0x2000746e; 1043 pub const TIOCSTOP: ::c_uint = 0x2000746f; 1044 pub const TIOCPKT: ::c_ulong = 0x80047470; 1045 pub const TIOCPKT_DATA: ::c_int = 0x0; 1046 pub const TIOCPKT_FLUSHREAD: ::c_int = 0x1; 1047 pub const TIOCPKT_FLUSHWRITE: ::c_int = 0x2; 1048 pub const TIOCPKT_STOP: ::c_int = 0x4; 1049 pub const TIOCPKT_START: ::c_int = 0x8; 1050 pub const TIOCPKT_NOSTOP: ::c_int = 0x10; 1051 pub const TIOCPKT_DOSTOP: ::c_int = 0x20; 1052 pub const TIOCPKT_IOCTL: ::c_int = 0x40; 1053 pub const TIOCNOTTY: ::c_uint = 0x20007471; 1054 pub const TIOCSTI: ::c_ulong = 0x80017472; 1055 pub const TIOCOUTQ: ::c_uint = 0x40047473; 1056 pub const TIOCSPGRP: ::c_ulong = 0x80047476; 1057 pub const TIOCGPGRP: ::c_uint = 0x40047477; 1058 pub const TIOCCDTR: ::c_uint = 0x20007478; 1059 pub const TIOCSDTR: ::c_uint = 0x20007479; 1060 pub const TTYDISC: ::c_int = 0x0; 1061 pub const SLIPDISC: ::c_int = 0x4; 1062 pub const PPPDISC: ::c_int = 0x5; 1063 pub const NETGRAPHDISC: ::c_int = 0x6; 1064 1065 pub const BIOCGRSIG: ::c_ulong = 0x40044272; 1066 pub const BIOCSRSIG: ::c_ulong = 0x80044273; 1067 pub const BIOCSDLT: ::c_ulong = 0x80044278; 1068 pub const BIOCGSEESENT: ::c_ulong = 0x40044276; 1069 pub const BIOCSSEESENT: ::c_ulong = 0x80044277; 1070 pub const BIOCSETF: ::c_ulong = 0x80104267; 1071 pub const BIOCGDLTLIST: ::c_ulong = 0xc0104279; 1072 pub const BIOCSRTIMEOUT: ::c_ulong = 0x8010426d; 1073 pub const BIOCGRTIMEOUT: ::c_ulong = 0x4010426e; 1074 1075 pub const FIODTYPE: ::c_ulong = 0x4004667a; 1076 pub const FIOGETLBA: ::c_ulong = 0x40046679; 1077 pub const FIODGNAME: ::c_ulong = 0x80106678; 1078 1079 pub const B0: speed_t = 0; 1080 pub const B50: speed_t = 50; 1081 pub const B75: speed_t = 75; 1082 pub const B110: speed_t = 110; 1083 pub const B134: speed_t = 134; 1084 pub const B150: speed_t = 150; 1085 pub const B200: speed_t = 200; 1086 pub const B300: speed_t = 300; 1087 pub const B600: speed_t = 600; 1088 pub const B1200: speed_t = 1200; 1089 pub const B1800: speed_t = 1800; 1090 pub const B2400: speed_t = 2400; 1091 pub const B4800: speed_t = 4800; 1092 pub const B9600: speed_t = 9600; 1093 pub const B19200: speed_t = 19200; 1094 pub const B38400: speed_t = 38400; 1095 pub const B7200: speed_t = 7200; 1096 pub const B14400: speed_t = 14400; 1097 pub const B28800: speed_t = 28800; 1098 pub const B57600: speed_t = 57600; 1099 pub const B76800: speed_t = 76800; 1100 pub const B115200: speed_t = 115200; 1101 pub const B230400: speed_t = 230400; 1102 pub const EXTA: speed_t = 19200; 1103 pub const EXTB: speed_t = 38400; 1104 1105 pub const SEM_FAILED: *mut sem_t = 0 as *mut sem_t; 1106 1107 pub const CRTSCTS: ::tcflag_t = 0x00030000; 1108 pub const CCTS_OFLOW: ::tcflag_t = 0x00010000; 1109 pub const CRTS_IFLOW: ::tcflag_t = 0x00020000; 1110 pub const CDTR_IFLOW: ::tcflag_t = 0x00040000; 1111 pub const CDSR_OFLOW: ::tcflag_t = 0x00080000; 1112 pub const CCAR_OFLOW: ::tcflag_t = 0x00100000; 1113 pub const VERASE2: usize = 7; 1114 pub const OCRNL: ::tcflag_t = 0x10; 1115 pub const ONOCR: ::tcflag_t = 0x20; 1116 pub const ONLRET: ::tcflag_t = 0x40; 1117 1118 pub const CMGROUP_MAX: usize = 16; 1119 1120 // https://github.com/freebsd/freebsd/blob/master/sys/net/bpf.h 1121 // sizeof(long) 1122 pub const BPF_ALIGNMENT: ::c_int = 8; 1123 1124 // Values for rtprio struct (prio field) and syscall (function argument) 1125 pub const RTP_PRIO_MIN: ::c_ushort = 0; 1126 pub const RTP_PRIO_MAX: ::c_ushort = 31; 1127 pub const RTP_LOOKUP: ::c_int = 0; 1128 pub const RTP_SET: ::c_int = 1; 1129 1130 // Flags for chflags(2) 1131 pub const UF_SETTABLE: ::c_ulong = 0x0000ffff; 1132 pub const UF_NODUMP: ::c_ulong = 0x00000001; 1133 pub const UF_IMMUTABLE: ::c_ulong = 0x00000002; 1134 pub const UF_APPEND: ::c_ulong = 0x00000004; 1135 pub const UF_OPAQUE: ::c_ulong = 0x00000008; 1136 pub const UF_NOUNLINK: ::c_ulong = 0x00000010; 1137 pub const SF_SETTABLE: ::c_ulong = 0xffff0000; 1138 pub const SF_ARCHIVED: ::c_ulong = 0x00010000; 1139 pub const SF_IMMUTABLE: ::c_ulong = 0x00020000; 1140 pub const SF_APPEND: ::c_ulong = 0x00040000; 1141 pub const SF_NOUNLINK: ::c_ulong = 0x00100000; 1142 1143 pub const TIMER_ABSTIME: ::c_int = 1; 1144 1145 //<sys/timex.h> 1146 pub const NTP_API: ::c_int = 4; 1147 pub const MAXPHASE: ::c_long = 500000000; 1148 pub const MAXFREQ: ::c_long = 500000; 1149 pub const MINSEC: ::c_int = 256; 1150 pub const MAXSEC: ::c_int = 2048; 1151 pub const NANOSECOND: ::c_long = 1000000000; 1152 pub const SCALE_PPM: ::c_int = 65; 1153 pub const MAXTC: ::c_int = 10; 1154 pub const MOD_OFFSET: ::c_uint = 0x0001; 1155 pub const MOD_FREQUENCY: ::c_uint = 0x0002; 1156 pub const MOD_MAXERROR: ::c_uint = 0x0004; 1157 pub const MOD_ESTERROR: ::c_uint = 0x0008; 1158 pub const MOD_STATUS: ::c_uint = 0x0010; 1159 pub const MOD_TIMECONST: ::c_uint = 0x0020; 1160 pub const MOD_PPSMAX: ::c_uint = 0x0040; 1161 pub const MOD_TAI: ::c_uint = 0x0080; 1162 pub const MOD_MICRO: ::c_uint = 0x1000; 1163 pub const MOD_NANO: ::c_uint = 0x2000; 1164 pub const MOD_CLKB: ::c_uint = 0x4000; 1165 pub const MOD_CLKA: ::c_uint = 0x8000; 1166 pub const STA_PLL: ::c_int = 0x0001; 1167 pub const STA_PPSFREQ: ::c_int = 0x0002; 1168 pub const STA_PPSTIME: ::c_int = 0x0004; 1169 pub const STA_FLL: ::c_int = 0x0008; 1170 pub const STA_INS: ::c_int = 0x0010; 1171 pub const STA_DEL: ::c_int = 0x0020; 1172 pub const STA_UNSYNC: ::c_int = 0x0040; 1173 pub const STA_FREQHOLD: ::c_int = 0x0080; 1174 pub const STA_PPSSIGNAL: ::c_int = 0x0100; 1175 pub const STA_PPSJITTER: ::c_int = 0x0200; 1176 pub const STA_PPSWANDER: ::c_int = 0x0400; 1177 pub const STA_PPSERROR: ::c_int = 0x0800; 1178 pub const STA_CLOCKERR: ::c_int = 0x1000; 1179 pub const STA_NANO: ::c_int = 0x2000; 1180 pub const STA_MODE: ::c_int = 0x4000; 1181 pub const STA_CLK: ::c_int = 0x8000; 1182 pub const STA_RONLY: ::c_int = STA_PPSSIGNAL 1183 | STA_PPSJITTER 1184 | STA_PPSWANDER 1185 | STA_PPSERROR 1186 | STA_CLOCKERR 1187 | STA_NANO 1188 | STA_MODE 1189 | STA_CLK; 1190 pub const TIME_OK: ::c_int = 0; 1191 pub const TIME_INS: ::c_int = 1; 1192 pub const TIME_DEL: ::c_int = 2; 1193 pub const TIME_OOP: ::c_int = 3; 1194 pub const TIME_WAIT: ::c_int = 4; 1195 pub const TIME_ERROR: ::c_int = 5; 1196 1197 pub const REG_ENOSYS: ::c_int = -1; 1198 pub const REG_ILLSEQ: ::c_int = 17; 1199 1200 f! { 1201 pub fn WIFCONTINUED(status: ::c_int) -> bool { 1202 status == 0x13 1203 } 1204 1205 pub fn WSTOPSIG(status: ::c_int) -> ::c_int { 1206 status >> 8 1207 } 1208 1209 pub fn WIFSTOPPED(status: ::c_int) -> bool { 1210 (status & 0o177) == 0o177 1211 } 1212 } 1213 1214 extern "C" { sem_destroy(sem: *mut sem_t) -> ::c_int1215 pub fn sem_destroy(sem: *mut sem_t) -> ::c_int; sem_init( sem: *mut sem_t, pshared: ::c_int, value: ::c_uint, ) -> ::c_int1216 pub fn sem_init( 1217 sem: *mut sem_t, 1218 pshared: ::c_int, 1219 value: ::c_uint, 1220 ) -> ::c_int; 1221 daemon(nochdir: ::c_int, noclose: ::c_int) -> ::c_int1222 pub fn daemon(nochdir: ::c_int, noclose: ::c_int) -> ::c_int; gettimeofday(tp: *mut ::timeval, tz: *mut ::timezone) -> ::c_int1223 pub fn gettimeofday(tp: *mut ::timeval, tz: *mut ::timezone) -> ::c_int; accept4( s: ::c_int, addr: *mut ::sockaddr, addrlen: *mut ::socklen_t, flags: ::c_int, ) -> ::c_int1224 pub fn accept4( 1225 s: ::c_int, 1226 addr: *mut ::sockaddr, 1227 addrlen: *mut ::socklen_t, 1228 flags: ::c_int, 1229 ) -> ::c_int; chflags(path: *const ::c_char, flags: ::c_ulong) -> ::c_int1230 pub fn chflags(path: *const ::c_char, flags: ::c_ulong) -> ::c_int; chflagsat( fd: ::c_int, path: *const ::c_char, flags: ::c_ulong, atflag: ::c_int, ) -> ::c_int1231 pub fn chflagsat( 1232 fd: ::c_int, 1233 path: *const ::c_char, 1234 flags: ::c_ulong, 1235 atflag: ::c_int, 1236 ) -> ::c_int; dirfd(dirp: *mut ::DIR) -> ::c_int1237 pub fn dirfd(dirp: *mut ::DIR) -> ::c_int; duplocale(base: ::locale_t) -> ::locale_t1238 pub fn duplocale(base: ::locale_t) -> ::locale_t; endutxent()1239 pub fn endutxent(); fchflags(fd: ::c_int, flags: ::c_ulong) -> ::c_int1240 pub fn fchflags(fd: ::c_int, flags: ::c_ulong) -> ::c_int; futimens(fd: ::c_int, times: *const ::timespec) -> ::c_int1241 pub fn futimens(fd: ::c_int, times: *const ::timespec) -> ::c_int; getdomainname(name: *mut ::c_char, len: ::c_int) -> ::c_int1242 pub fn getdomainname(name: *mut ::c_char, len: ::c_int) -> ::c_int; getgrent_r( grp: *mut ::group, buf: *mut ::c_char, buflen: ::size_t, result: *mut *mut ::group, ) -> ::c_int1243 pub fn getgrent_r( 1244 grp: *mut ::group, 1245 buf: *mut ::c_char, 1246 buflen: ::size_t, 1247 result: *mut *mut ::group, 1248 ) -> ::c_int; getpwent_r( pwd: *mut ::passwd, buf: *mut ::c_char, buflen: ::size_t, result: *mut *mut ::passwd, ) -> ::c_int1249 pub fn getpwent_r( 1250 pwd: *mut ::passwd, 1251 buf: *mut ::c_char, 1252 buflen: ::size_t, 1253 result: *mut *mut ::passwd, 1254 ) -> ::c_int; getgrouplist( name: *const ::c_char, basegid: ::gid_t, groups: *mut ::gid_t, ngroups: *mut ::c_int, ) -> ::c_int1255 pub fn getgrouplist( 1256 name: *const ::c_char, 1257 basegid: ::gid_t, 1258 groups: *mut ::gid_t, 1259 ngroups: *mut ::c_int, 1260 ) -> ::c_int; getnameinfo( sa: *const ::sockaddr, salen: ::socklen_t, host: *mut ::c_char, hostlen: ::size_t, serv: *mut ::c_char, servlen: ::size_t, flags: ::c_int, ) -> ::c_int1261 pub fn getnameinfo( 1262 sa: *const ::sockaddr, 1263 salen: ::socklen_t, 1264 host: *mut ::c_char, 1265 hostlen: ::size_t, 1266 serv: *mut ::c_char, 1267 servlen: ::size_t, 1268 flags: ::c_int, 1269 ) -> ::c_int; getpriority(which: ::c_int, who: ::c_int) -> ::c_int1270 pub fn getpriority(which: ::c_int, who: ::c_int) -> ::c_int; getutxent() -> *mut utmpx1271 pub fn getutxent() -> *mut utmpx; getutxid(ut: *const utmpx) -> *mut utmpx1272 pub fn getutxid(ut: *const utmpx) -> *mut utmpx; getutxline(ut: *const utmpx) -> *mut utmpx1273 pub fn getutxline(ut: *const utmpx) -> *mut utmpx; initgroups(name: *const ::c_char, basegid: ::gid_t) -> ::c_int1274 pub fn initgroups(name: *const ::c_char, basegid: ::gid_t) -> ::c_int; 1275 #[cfg_attr( 1276 all(target_os = "freebsd", any(freebsd11, freebsd10)), 1277 link_name = "kevent@FBSD_1.0" 1278 )] kevent( kq: ::c_int, changelist: *const ::kevent, nchanges: ::c_int, eventlist: *mut ::kevent, nevents: ::c_int, timeout: *const ::timespec, ) -> ::c_int1279 pub fn kevent( 1280 kq: ::c_int, 1281 changelist: *const ::kevent, 1282 nchanges: ::c_int, 1283 eventlist: *mut ::kevent, 1284 nevents: ::c_int, 1285 timeout: *const ::timespec, 1286 ) -> ::c_int; lchflags(path: *const ::c_char, flags: ::c_ulong) -> ::c_int1287 pub fn lchflags(path: *const ::c_char, flags: ::c_ulong) -> ::c_int; lio_listio( mode: ::c_int, aiocb_list: *const *mut aiocb, nitems: ::c_int, sevp: *mut sigevent, ) -> ::c_int1288 pub fn lio_listio( 1289 mode: ::c_int, 1290 aiocb_list: *const *mut aiocb, 1291 nitems: ::c_int, 1292 sevp: *mut sigevent, 1293 ) -> ::c_int; lutimes(file: *const ::c_char, times: *const ::timeval) -> ::c_int1294 pub fn lutimes(file: *const ::c_char, times: *const ::timeval) -> ::c_int; memrchr( cx: *const ::c_void, c: ::c_int, n: ::size_t, ) -> *mut ::c_void1295 pub fn memrchr( 1296 cx: *const ::c_void, 1297 c: ::c_int, 1298 n: ::size_t, 1299 ) -> *mut ::c_void; mkfifoat( dirfd: ::c_int, pathname: *const ::c_char, mode: ::mode_t, ) -> ::c_int1300 pub fn mkfifoat( 1301 dirfd: ::c_int, 1302 pathname: *const ::c_char, 1303 mode: ::mode_t, 1304 ) -> ::c_int; 1305 #[cfg_attr( 1306 all(target_os = "freebsd", any(freebsd11, freebsd10)), 1307 link_name = "mknodat@FBSD_1.1" 1308 )] mknodat( dirfd: ::c_int, pathname: *const ::c_char, mode: ::mode_t, dev: dev_t, ) -> ::c_int1309 pub fn mknodat( 1310 dirfd: ::c_int, 1311 pathname: *const ::c_char, 1312 mode: ::mode_t, 1313 dev: dev_t, 1314 ) -> ::c_int; mincore( addr: *const ::c_void, len: ::size_t, vec: *mut ::c_char, ) -> ::c_int1315 pub fn mincore( 1316 addr: *const ::c_void, 1317 len: ::size_t, 1318 vec: *mut ::c_char, 1319 ) -> ::c_int; newlocale( mask: ::c_int, locale: *const ::c_char, base: ::locale_t, ) -> ::locale_t1320 pub fn newlocale( 1321 mask: ::c_int, 1322 locale: *const ::c_char, 1323 base: ::locale_t, 1324 ) -> ::locale_t; nl_langinfo_l(item: ::nl_item, locale: ::locale_t) -> *mut ::c_char1325 pub fn nl_langinfo_l(item: ::nl_item, locale: ::locale_t) 1326 -> *mut ::c_char; pipe2(fds: *mut ::c_int, flags: ::c_int) -> ::c_int1327 pub fn pipe2(fds: *mut ::c_int, flags: ::c_int) -> ::c_int; ppoll( fds: *mut ::pollfd, nfds: ::nfds_t, timeout: *const ::timespec, sigmask: *const sigset_t, ) -> ::c_int1328 pub fn ppoll( 1329 fds: *mut ::pollfd, 1330 nfds: ::nfds_t, 1331 timeout: *const ::timespec, 1332 sigmask: *const sigset_t, 1333 ) -> ::c_int; preadv( fd: ::c_int, iov: *const ::iovec, iovcnt: ::c_int, offset: ::off_t, ) -> ::ssize_t1334 pub fn preadv( 1335 fd: ::c_int, 1336 iov: *const ::iovec, 1337 iovcnt: ::c_int, 1338 offset: ::off_t, 1339 ) -> ::ssize_t; pthread_attr_get_np( tid: ::pthread_t, attr: *mut ::pthread_attr_t, ) -> ::c_int1340 pub fn pthread_attr_get_np( 1341 tid: ::pthread_t, 1342 attr: *mut ::pthread_attr_t, 1343 ) -> ::c_int; pthread_attr_getguardsize( attr: *const ::pthread_attr_t, guardsize: *mut ::size_t, ) -> ::c_int1344 pub fn pthread_attr_getguardsize( 1345 attr: *const ::pthread_attr_t, 1346 guardsize: *mut ::size_t, 1347 ) -> ::c_int; pthread_attr_getstack( attr: *const ::pthread_attr_t, stackaddr: *mut *mut ::c_void, stacksize: *mut ::size_t, ) -> ::c_int1348 pub fn pthread_attr_getstack( 1349 attr: *const ::pthread_attr_t, 1350 stackaddr: *mut *mut ::c_void, 1351 stacksize: *mut ::size_t, 1352 ) -> ::c_int; pthread_condattr_getclock( attr: *const pthread_condattr_t, clock_id: *mut clockid_t, ) -> ::c_int1353 pub fn pthread_condattr_getclock( 1354 attr: *const pthread_condattr_t, 1355 clock_id: *mut clockid_t, 1356 ) -> ::c_int; pthread_condattr_getpshared( attr: *const pthread_condattr_t, pshared: *mut ::c_int, ) -> ::c_int1357 pub fn pthread_condattr_getpshared( 1358 attr: *const pthread_condattr_t, 1359 pshared: *mut ::c_int, 1360 ) -> ::c_int; pthread_condattr_setclock( attr: *mut pthread_condattr_t, clock_id: ::clockid_t, ) -> ::c_int1361 pub fn pthread_condattr_setclock( 1362 attr: *mut pthread_condattr_t, 1363 clock_id: ::clockid_t, 1364 ) -> ::c_int; pthread_condattr_setpshared( attr: *mut pthread_condattr_t, pshared: ::c_int, ) -> ::c_int1365 pub fn pthread_condattr_setpshared( 1366 attr: *mut pthread_condattr_t, 1367 pshared: ::c_int, 1368 ) -> ::c_int; pthread_main_np() -> ::c_int1369 pub fn pthread_main_np() -> ::c_int; pthread_mutex_timedlock( lock: *mut pthread_mutex_t, abstime: *const ::timespec, ) -> ::c_int1370 pub fn pthread_mutex_timedlock( 1371 lock: *mut pthread_mutex_t, 1372 abstime: *const ::timespec, 1373 ) -> ::c_int; pthread_mutexattr_getpshared( attr: *const pthread_mutexattr_t, pshared: *mut ::c_int, ) -> ::c_int1374 pub fn pthread_mutexattr_getpshared( 1375 attr: *const pthread_mutexattr_t, 1376 pshared: *mut ::c_int, 1377 ) -> ::c_int; pthread_mutexattr_setpshared( attr: *mut pthread_mutexattr_t, pshared: ::c_int, ) -> ::c_int1378 pub fn pthread_mutexattr_setpshared( 1379 attr: *mut pthread_mutexattr_t, 1380 pshared: ::c_int, 1381 ) -> ::c_int; pthread_rwlockattr_getpshared( attr: *const pthread_rwlockattr_t, val: *mut ::c_int, ) -> ::c_int1382 pub fn pthread_rwlockattr_getpshared( 1383 attr: *const pthread_rwlockattr_t, 1384 val: *mut ::c_int, 1385 ) -> ::c_int; pthread_rwlockattr_setpshared( attr: *mut pthread_rwlockattr_t, val: ::c_int, ) -> ::c_int1386 pub fn pthread_rwlockattr_setpshared( 1387 attr: *mut pthread_rwlockattr_t, 1388 val: ::c_int, 1389 ) -> ::c_int; pthread_set_name_np(tid: ::pthread_t, name: *const ::c_char)1390 pub fn pthread_set_name_np(tid: ::pthread_t, name: *const ::c_char); ptrace( request: ::c_int, pid: ::pid_t, addr: *mut ::c_char, data: ::c_int, ) -> ::c_int1391 pub fn ptrace( 1392 request: ::c_int, 1393 pid: ::pid_t, 1394 addr: *mut ::c_char, 1395 data: ::c_int, 1396 ) -> ::c_int; pututxline(ut: *const utmpx) -> *mut utmpx1397 pub fn pututxline(ut: *const utmpx) -> *mut utmpx; pwritev( fd: ::c_int, iov: *const ::iovec, iovcnt: ::c_int, offset: ::off_t, ) -> ::ssize_t1398 pub fn pwritev( 1399 fd: ::c_int, 1400 iov: *const ::iovec, 1401 iovcnt: ::c_int, 1402 offset: ::off_t, 1403 ) -> ::ssize_t; querylocale(mask: ::c_int, loc: ::locale_t) -> *const ::c_char1404 pub fn querylocale(mask: ::c_int, loc: ::locale_t) -> *const ::c_char; rtprio( function: ::c_int, pid: ::pid_t, rtp: *mut rtprio, ) -> ::c_int1405 pub fn rtprio( 1406 function: ::c_int, 1407 pid: ::pid_t, 1408 rtp: *mut rtprio, 1409 ) -> ::c_int; sched_getscheduler(pid: ::pid_t) -> ::c_int1410 pub fn sched_getscheduler(pid: ::pid_t) -> ::c_int; sched_setscheduler( pid: ::pid_t, policy: ::c_int, param: *const ::sched_param, ) -> ::c_int1411 pub fn sched_setscheduler( 1412 pid: ::pid_t, 1413 policy: ::c_int, 1414 param: *const ::sched_param, 1415 ) -> ::c_int; sem_getvalue(sem: *mut sem_t, sval: *mut ::c_int) -> ::c_int1416 pub fn sem_getvalue(sem: *mut sem_t, sval: *mut ::c_int) -> ::c_int; sem_timedwait( sem: *mut sem_t, abstime: *const ::timespec, ) -> ::c_int1417 pub fn sem_timedwait( 1418 sem: *mut sem_t, 1419 abstime: *const ::timespec, 1420 ) -> ::c_int; sendfile( fd: ::c_int, s: ::c_int, offset: ::off_t, nbytes: ::size_t, hdtr: *mut ::sf_hdtr, sbytes: *mut ::off_t, flags: ::c_int, ) -> ::c_int1421 pub fn sendfile( 1422 fd: ::c_int, 1423 s: ::c_int, 1424 offset: ::off_t, 1425 nbytes: ::size_t, 1426 hdtr: *mut ::sf_hdtr, 1427 sbytes: *mut ::off_t, 1428 flags: ::c_int, 1429 ) -> ::c_int; setdomainname(name: *const ::c_char, len: ::c_int) -> ::c_int1430 pub fn setdomainname(name: *const ::c_char, len: ::c_int) -> ::c_int; sethostname(name: *const ::c_char, len: ::c_int) -> ::c_int1431 pub fn sethostname(name: *const ::c_char, len: ::c_int) -> ::c_int; setpriority(which: ::c_int, who: ::c_int, prio: ::c_int) -> ::c_int1432 pub fn setpriority(which: ::c_int, who: ::c_int, prio: ::c_int) 1433 -> ::c_int; setresgid(rgid: ::gid_t, egid: ::gid_t, sgid: ::gid_t) -> ::c_int1434 pub fn setresgid(rgid: ::gid_t, egid: ::gid_t, sgid: ::gid_t) -> ::c_int; setresuid(ruid: ::uid_t, euid: ::uid_t, suid: ::uid_t) -> ::c_int1435 pub fn setresuid(ruid: ::uid_t, euid: ::uid_t, suid: ::uid_t) -> ::c_int; settimeofday( tv: *const ::timeval, tz: *const ::timezone, ) -> ::c_int1436 pub fn settimeofday( 1437 tv: *const ::timeval, 1438 tz: *const ::timezone, 1439 ) -> ::c_int; setutxent()1440 pub fn setutxent(); shm_open( name: *const ::c_char, oflag: ::c_int, mode: ::mode_t, ) -> ::c_int1441 pub fn shm_open( 1442 name: *const ::c_char, 1443 oflag: ::c_int, 1444 mode: ::mode_t, 1445 ) -> ::c_int; sigtimedwait( set: *const sigset_t, info: *mut siginfo_t, timeout: *const ::timespec, ) -> ::c_int1446 pub fn sigtimedwait( 1447 set: *const sigset_t, 1448 info: *mut siginfo_t, 1449 timeout: *const ::timespec, 1450 ) -> ::c_int; sigwaitinfo(set: *const sigset_t, info: *mut siginfo_t) -> ::c_int1451 pub fn sigwaitinfo(set: *const sigset_t, info: *mut siginfo_t) -> ::c_int; sysctl( name: *const ::c_int, namelen: ::c_uint, oldp: *mut ::c_void, oldlenp: *mut ::size_t, newp: *const ::c_void, newlen: ::size_t, ) -> ::c_int1452 pub fn sysctl( 1453 name: *const ::c_int, 1454 namelen: ::c_uint, 1455 oldp: *mut ::c_void, 1456 oldlenp: *mut ::size_t, 1457 newp: *const ::c_void, 1458 newlen: ::size_t, 1459 ) -> ::c_int; sysctlbyname( name: *const ::c_char, oldp: *mut ::c_void, oldlenp: *mut ::size_t, newp: *const ::c_void, newlen: ::size_t, ) -> ::c_int1460 pub fn sysctlbyname( 1461 name: *const ::c_char, 1462 oldp: *mut ::c_void, 1463 oldlenp: *mut ::size_t, 1464 newp: *const ::c_void, 1465 newlen: ::size_t, 1466 ) -> ::c_int; sysctlnametomib( name: *const ::c_char, mibp: *mut ::c_int, sizep: *mut ::size_t, ) -> ::c_int1467 pub fn sysctlnametomib( 1468 name: *const ::c_char, 1469 mibp: *mut ::c_int, 1470 sizep: *mut ::size_t, 1471 ) -> ::c_int; uselocale(loc: ::locale_t) -> ::locale_t1472 pub fn uselocale(loc: ::locale_t) -> ::locale_t; utimensat( dirfd: ::c_int, path: *const ::c_char, times: *const ::timespec, flag: ::c_int, ) -> ::c_int1473 pub fn utimensat( 1474 dirfd: ::c_int, 1475 path: *const ::c_char, 1476 times: *const ::timespec, 1477 flag: ::c_int, 1478 ) -> ::c_int; 1479 ntp_adjtime(buf: *mut timex) -> ::c_int1480 pub fn ntp_adjtime(buf: *mut timex) -> ::c_int; ntp_gettime(buf: *mut ntptimeval) -> ::c_int1481 pub fn ntp_gettime(buf: *mut ntptimeval) -> ::c_int; 1482 } 1483 1484 #[link(name = "rt")] 1485 extern "C" { aio_read(aiocbp: *mut aiocb) -> ::c_int1486 pub fn aio_read(aiocbp: *mut aiocb) -> ::c_int; aio_write(aiocbp: *mut aiocb) -> ::c_int1487 pub fn aio_write(aiocbp: *mut aiocb) -> ::c_int; aio_fsync(op: ::c_int, aiocbp: *mut aiocb) -> ::c_int1488 pub fn aio_fsync(op: ::c_int, aiocbp: *mut aiocb) -> ::c_int; aio_error(aiocbp: *const aiocb) -> ::c_int1489 pub fn aio_error(aiocbp: *const aiocb) -> ::c_int; aio_return(aiocbp: *mut aiocb) -> ::ssize_t1490 pub fn aio_return(aiocbp: *mut aiocb) -> ::ssize_t; aio_suspend( aiocb_list: *const *const aiocb, nitems: ::c_int, timeout: *const ::timespec, ) -> ::c_int1491 pub fn aio_suspend( 1492 aiocb_list: *const *const aiocb, 1493 nitems: ::c_int, 1494 timeout: *const ::timespec, 1495 ) -> ::c_int; aio_cancel(fd: ::c_int, aiocbp: *mut aiocb) -> ::c_int1496 pub fn aio_cancel(fd: ::c_int, aiocbp: *mut aiocb) -> ::c_int; mq_close(mqd: ::mqd_t) -> ::c_int1497 pub fn mq_close(mqd: ::mqd_t) -> ::c_int; mq_getattr(mqd: ::mqd_t, attr: *mut ::mq_attr) -> ::c_int1498 pub fn mq_getattr(mqd: ::mqd_t, attr: *mut ::mq_attr) -> ::c_int; mq_notify(mqd: ::mqd_t, notification: *const ::sigevent) -> ::c_int1499 pub fn mq_notify(mqd: ::mqd_t, notification: *const ::sigevent) 1500 -> ::c_int; mq_open(name: *const ::c_char, oflag: ::c_int, ...) -> ::mqd_t1501 pub fn mq_open(name: *const ::c_char, oflag: ::c_int, ...) -> ::mqd_t; mq_receive( mqd: ::mqd_t, msg_ptr: *mut ::c_char, msg_len: ::size_t, msg_prio: *mut ::c_uint, ) -> ::ssize_t1502 pub fn mq_receive( 1503 mqd: ::mqd_t, 1504 msg_ptr: *mut ::c_char, 1505 msg_len: ::size_t, 1506 msg_prio: *mut ::c_uint, 1507 ) -> ::ssize_t; mq_send( mqd: ::mqd_t, msg_ptr: *const ::c_char, msg_len: ::size_t, msg_prio: ::c_uint, ) -> ::c_int1508 pub fn mq_send( 1509 mqd: ::mqd_t, 1510 msg_ptr: *const ::c_char, 1511 msg_len: ::size_t, 1512 msg_prio: ::c_uint, 1513 ) -> ::c_int; mq_setattr( mqd: ::mqd_t, newattr: *const ::mq_attr, oldattr: *mut ::mq_attr, ) -> ::c_int1514 pub fn mq_setattr( 1515 mqd: ::mqd_t, 1516 newattr: *const ::mq_attr, 1517 oldattr: *mut ::mq_attr, 1518 ) -> ::c_int; mq_timedreceive( mqd: ::mqd_t, msg_ptr: *mut ::c_char, msg_len: ::size_t, msg_prio: *mut ::c_uint, abs_timeout: *const ::timespec, ) -> ::ssize_t1519 pub fn mq_timedreceive( 1520 mqd: ::mqd_t, 1521 msg_ptr: *mut ::c_char, 1522 msg_len: ::size_t, 1523 msg_prio: *mut ::c_uint, 1524 abs_timeout: *const ::timespec, 1525 ) -> ::ssize_t; mq_timedsend( mqd: ::mqd_t, msg_ptr: *const ::c_char, msg_len: ::size_t, msg_prio: ::c_uint, abs_timeout: *const ::timespec, ) -> ::c_int1526 pub fn mq_timedsend( 1527 mqd: ::mqd_t, 1528 msg_ptr: *const ::c_char, 1529 msg_len: ::size_t, 1530 msg_prio: ::c_uint, 1531 abs_timeout: *const ::timespec, 1532 ) -> ::c_int; mq_unlink(name: *const ::c_char) -> ::c_int1533 pub fn mq_unlink(name: *const ::c_char) -> ::c_int; 1534 } 1535 1536 #[link(name = "util")] 1537 extern "C" { openpty( amaster: *mut ::c_int, aslave: *mut ::c_int, name: *mut ::c_char, termp: *mut termios, winp: *mut ::winsize, ) -> ::c_int1538 pub fn openpty( 1539 amaster: *mut ::c_int, 1540 aslave: *mut ::c_int, 1541 name: *mut ::c_char, 1542 termp: *mut termios, 1543 winp: *mut ::winsize, 1544 ) -> ::c_int; forkpty( amaster: *mut ::c_int, name: *mut ::c_char, termp: *mut termios, winp: *mut ::winsize, ) -> ::pid_t1545 pub fn forkpty( 1546 amaster: *mut ::c_int, 1547 name: *mut ::c_char, 1548 termp: *mut termios, 1549 winp: *mut ::winsize, 1550 ) -> ::pid_t; login_tty(fd: ::c_int) -> ::c_int1551 pub fn login_tty(fd: ::c_int) -> ::c_int; 1552 } 1553 1554 cfg_if! { 1555 if #[cfg(target_os = "freebsd")] { 1556 mod freebsd; 1557 pub use self::freebsd::*; 1558 } else if #[cfg(target_os = "dragonfly")] { 1559 mod dragonfly; 1560 pub use self::dragonfly::*; 1561 } else { 1562 // ... 1563 } 1564 } 1565