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 223 s_no_extra_traits! { 224 pub struct sockaddr_storage { 225 pub ss_len: u8, 226 pub ss_family: ::sa_family_t, 227 __ss_pad1: [u8; 6], 228 __ss_align: i64, 229 __ss_pad2: [u8; 112], 230 } 231 } 232 233 cfg_if! { 234 if #[cfg(feature = "extra_traits")] { 235 impl PartialEq for sockaddr_storage { 236 fn eq(&self, other: &sockaddr_storage) -> bool { 237 self.ss_len == other.ss_len 238 && self.ss_family == other.ss_family 239 && self.__ss_pad1 == other.__ss_pad1 240 && self.__ss_align == other.__ss_align 241 && self 242 .__ss_pad2 243 .iter() 244 .zip(other.__ss_pad2.iter()) 245 .all(|(a, b)| a == b) 246 } 247 } 248 impl Eq for sockaddr_storage {} 249 impl ::fmt::Debug for sockaddr_storage { 250 fn fmt(&self, f: &mut ::fmt::Formatter) -> ::fmt::Result { 251 f.debug_struct("sockaddr_storage") 252 .field("ss_len", &self.ss_len) 253 .field("ss_family", &self.ss_family) 254 .field("__ss_pad1", &self.__ss_pad1) 255 .field("__ss_align", &self.__ss_align) 256 // FIXME: .field("__ss_pad2", &self.__ss_pad2) 257 .finish() 258 } 259 } 260 impl ::hash::Hash for sockaddr_storage { 261 fn hash<H: ::hash::Hasher>(&self, state: &mut H) { 262 self.ss_len.hash(state); 263 self.ss_family.hash(state); 264 self.__ss_pad1.hash(state); 265 self.__ss_align.hash(state); 266 self.__ss_pad2.hash(state); 267 } 268 } 269 } 270 } 271 272 #[deprecated( 273 since = "0.2.64", 274 note = "Can vary at runtime. Use sysconf(3) instead" 275 )] 276 pub const AIO_LISTIO_MAX: ::c_int = 16; 277 pub const AIO_CANCELED: ::c_int = 1; 278 pub const AIO_NOTCANCELED: ::c_int = 2; 279 pub const AIO_ALLDONE: ::c_int = 3; 280 pub const LIO_NOP: ::c_int = 0; 281 pub const LIO_WRITE: ::c_int = 1; 282 pub const LIO_READ: ::c_int = 2; 283 pub const LIO_WAIT: ::c_int = 1; 284 pub const LIO_NOWAIT: ::c_int = 0; 285 286 pub const SIGEV_NONE: ::c_int = 0; 287 pub const SIGEV_SIGNAL: ::c_int = 1; 288 pub const SIGEV_THREAD: ::c_int = 2; 289 pub const SIGEV_KEVENT: ::c_int = 3; 290 291 pub const CODESET: ::nl_item = 0; 292 pub const D_T_FMT: ::nl_item = 1; 293 pub const D_FMT: ::nl_item = 2; 294 pub const T_FMT: ::nl_item = 3; 295 pub const T_FMT_AMPM: ::nl_item = 4; 296 pub const AM_STR: ::nl_item = 5; 297 pub const PM_STR: ::nl_item = 6; 298 299 pub const DAY_1: ::nl_item = 7; 300 pub const DAY_2: ::nl_item = 8; 301 pub const DAY_3: ::nl_item = 9; 302 pub const DAY_4: ::nl_item = 10; 303 pub const DAY_5: ::nl_item = 11; 304 pub const DAY_6: ::nl_item = 12; 305 pub const DAY_7: ::nl_item = 13; 306 307 pub const ABDAY_1: ::nl_item = 14; 308 pub const ABDAY_2: ::nl_item = 15; 309 pub const ABDAY_3: ::nl_item = 16; 310 pub const ABDAY_4: ::nl_item = 17; 311 pub const ABDAY_5: ::nl_item = 18; 312 pub const ABDAY_6: ::nl_item = 19; 313 pub const ABDAY_7: ::nl_item = 20; 314 315 pub const MON_1: ::nl_item = 21; 316 pub const MON_2: ::nl_item = 22; 317 pub const MON_3: ::nl_item = 23; 318 pub const MON_4: ::nl_item = 24; 319 pub const MON_5: ::nl_item = 25; 320 pub const MON_6: ::nl_item = 26; 321 pub const MON_7: ::nl_item = 27; 322 pub const MON_8: ::nl_item = 28; 323 pub const MON_9: ::nl_item = 29; 324 pub const MON_10: ::nl_item = 30; 325 pub const MON_11: ::nl_item = 31; 326 pub const MON_12: ::nl_item = 32; 327 328 pub const ABMON_1: ::nl_item = 33; 329 pub const ABMON_2: ::nl_item = 34; 330 pub const ABMON_3: ::nl_item = 35; 331 pub const ABMON_4: ::nl_item = 36; 332 pub const ABMON_5: ::nl_item = 37; 333 pub const ABMON_6: ::nl_item = 38; 334 pub const ABMON_7: ::nl_item = 39; 335 pub const ABMON_8: ::nl_item = 40; 336 pub const ABMON_9: ::nl_item = 41; 337 pub const ABMON_10: ::nl_item = 42; 338 pub const ABMON_11: ::nl_item = 43; 339 pub const ABMON_12: ::nl_item = 44; 340 341 pub const ERA: ::nl_item = 45; 342 pub const ERA_D_FMT: ::nl_item = 46; 343 pub const ERA_D_T_FMT: ::nl_item = 47; 344 pub const ERA_T_FMT: ::nl_item = 48; 345 pub const ALT_DIGITS: ::nl_item = 49; 346 347 pub const RADIXCHAR: ::nl_item = 50; 348 pub const THOUSEP: ::nl_item = 51; 349 350 pub const YESEXPR: ::nl_item = 52; 351 pub const NOEXPR: ::nl_item = 53; 352 353 pub const YESSTR: ::nl_item = 54; 354 pub const NOSTR: ::nl_item = 55; 355 356 pub const CRNCYSTR: ::nl_item = 56; 357 358 pub const D_MD_ORDER: ::nl_item = 57; 359 360 pub const ALTMON_1: ::nl_item = 58; 361 pub const ALTMON_2: ::nl_item = 59; 362 pub const ALTMON_3: ::nl_item = 60; 363 pub const ALTMON_4: ::nl_item = 61; 364 pub const ALTMON_5: ::nl_item = 62; 365 pub const ALTMON_6: ::nl_item = 63; 366 pub const ALTMON_7: ::nl_item = 64; 367 pub const ALTMON_8: ::nl_item = 65; 368 pub const ALTMON_9: ::nl_item = 66; 369 pub const ALTMON_10: ::nl_item = 67; 370 pub const ALTMON_11: ::nl_item = 68; 371 pub const ALTMON_12: ::nl_item = 69; 372 373 pub const EXIT_FAILURE: ::c_int = 1; 374 pub const EXIT_SUCCESS: ::c_int = 0; 375 pub const EOF: ::c_int = -1; 376 pub const SEEK_SET: ::c_int = 0; 377 pub const SEEK_CUR: ::c_int = 1; 378 pub const SEEK_END: ::c_int = 2; 379 pub const SEEK_DATA: ::c_int = 3; 380 pub const SEEK_HOLE: ::c_int = 4; 381 pub const _IOFBF: ::c_int = 0; 382 pub const _IONBF: ::c_int = 2; 383 pub const _IOLBF: ::c_int = 1; 384 pub const BUFSIZ: ::c_uint = 1024; 385 pub const FOPEN_MAX: ::c_uint = 20; 386 pub const FILENAME_MAX: ::c_uint = 1024; 387 pub const L_tmpnam: ::c_uint = 1024; 388 pub const TMP_MAX: ::c_uint = 308915776; 389 390 pub const O_NOCTTY: ::c_int = 32768; 391 pub const O_DIRECT: ::c_int = 0x00010000; 392 393 pub const S_IFIFO: mode_t = 4096; 394 pub const S_IFCHR: mode_t = 8192; 395 pub const S_IFBLK: mode_t = 24576; 396 pub const S_IFDIR: mode_t = 16384; 397 pub const S_IFREG: mode_t = 32768; 398 pub const S_IFLNK: mode_t = 40960; 399 pub const S_IFSOCK: mode_t = 49152; 400 pub const S_IFMT: mode_t = 61440; 401 pub const S_IEXEC: mode_t = 64; 402 pub const S_IWRITE: mode_t = 128; 403 pub const S_IREAD: mode_t = 256; 404 pub const S_IRWXU: mode_t = 448; 405 pub const S_IXUSR: mode_t = 64; 406 pub const S_IWUSR: mode_t = 128; 407 pub const S_IRUSR: mode_t = 256; 408 pub const S_IRWXG: mode_t = 56; 409 pub const S_IXGRP: mode_t = 8; 410 pub const S_IWGRP: mode_t = 16; 411 pub const S_IRGRP: mode_t = 32; 412 pub const S_IRWXO: mode_t = 7; 413 pub const S_IXOTH: mode_t = 1; 414 pub const S_IWOTH: mode_t = 2; 415 pub const S_IROTH: mode_t = 4; 416 pub const F_OK: ::c_int = 0; 417 pub const R_OK: ::c_int = 4; 418 pub const W_OK: ::c_int = 2; 419 pub const X_OK: ::c_int = 1; 420 pub const STDIN_FILENO: ::c_int = 0; 421 pub const STDOUT_FILENO: ::c_int = 1; 422 pub const STDERR_FILENO: ::c_int = 2; 423 pub const F_LOCK: ::c_int = 1; 424 pub const F_TEST: ::c_int = 3; 425 pub const F_TLOCK: ::c_int = 2; 426 pub const F_ULOCK: ::c_int = 0; 427 pub const F_DUPFD_CLOEXEC: ::c_int = 17; 428 pub const SIGHUP: ::c_int = 1; 429 pub const SIGINT: ::c_int = 2; 430 pub const SIGQUIT: ::c_int = 3; 431 pub const SIGILL: ::c_int = 4; 432 pub const SIGABRT: ::c_int = 6; 433 pub const SIGEMT: ::c_int = 7; 434 pub const SIGFPE: ::c_int = 8; 435 pub const SIGKILL: ::c_int = 9; 436 pub const SIGSEGV: ::c_int = 11; 437 pub const SIGPIPE: ::c_int = 13; 438 pub const SIGALRM: ::c_int = 14; 439 pub const SIGTERM: ::c_int = 15; 440 441 pub const PROT_NONE: ::c_int = 0; 442 pub const PROT_READ: ::c_int = 1; 443 pub const PROT_WRITE: ::c_int = 2; 444 pub const PROT_EXEC: ::c_int = 4; 445 446 pub const MAP_FILE: ::c_int = 0x0000; 447 pub const MAP_SHARED: ::c_int = 0x0001; 448 pub const MAP_PRIVATE: ::c_int = 0x0002; 449 pub const MAP_FIXED: ::c_int = 0x0010; 450 pub const MAP_ANON: ::c_int = 0x1000; 451 pub const MAP_ANONYMOUS: ::c_int = MAP_ANON; 452 453 pub const MAP_FAILED: *mut ::c_void = !0 as *mut ::c_void; 454 455 pub const MCL_CURRENT: ::c_int = 0x0001; 456 pub const MCL_FUTURE: ::c_int = 0x0002; 457 458 pub const MS_SYNC: ::c_int = 0x0000; 459 pub const MS_ASYNC: ::c_int = 0x0001; 460 pub const MS_INVALIDATE: ::c_int = 0x0002; 461 462 pub const EPERM: ::c_int = 1; 463 pub const ENOENT: ::c_int = 2; 464 pub const ESRCH: ::c_int = 3; 465 pub const EINTR: ::c_int = 4; 466 pub const EIO: ::c_int = 5; 467 pub const ENXIO: ::c_int = 6; 468 pub const E2BIG: ::c_int = 7; 469 pub const ENOEXEC: ::c_int = 8; 470 pub const EBADF: ::c_int = 9; 471 pub const ECHILD: ::c_int = 10; 472 pub const EDEADLK: ::c_int = 11; 473 pub const ENOMEM: ::c_int = 12; 474 pub const EACCES: ::c_int = 13; 475 pub const EFAULT: ::c_int = 14; 476 pub const ENOTBLK: ::c_int = 15; 477 pub const EBUSY: ::c_int = 16; 478 pub const EEXIST: ::c_int = 17; 479 pub const EXDEV: ::c_int = 18; 480 pub const ENODEV: ::c_int = 19; 481 pub const ENOTDIR: ::c_int = 20; 482 pub const EISDIR: ::c_int = 21; 483 pub const EINVAL: ::c_int = 22; 484 pub const ENFILE: ::c_int = 23; 485 pub const EMFILE: ::c_int = 24; 486 pub const ENOTTY: ::c_int = 25; 487 pub const ETXTBSY: ::c_int = 26; 488 pub const EFBIG: ::c_int = 27; 489 pub const ENOSPC: ::c_int = 28; 490 pub const ESPIPE: ::c_int = 29; 491 pub const EROFS: ::c_int = 30; 492 pub const EMLINK: ::c_int = 31; 493 pub const EPIPE: ::c_int = 32; 494 pub const EDOM: ::c_int = 33; 495 pub const ERANGE: ::c_int = 34; 496 pub const EAGAIN: ::c_int = 35; 497 pub const EWOULDBLOCK: ::c_int = 35; 498 pub const EINPROGRESS: ::c_int = 36; 499 pub const EALREADY: ::c_int = 37; 500 pub const ENOTSOCK: ::c_int = 38; 501 pub const EDESTADDRREQ: ::c_int = 39; 502 pub const EMSGSIZE: ::c_int = 40; 503 pub const EPROTOTYPE: ::c_int = 41; 504 pub const ENOPROTOOPT: ::c_int = 42; 505 pub const EPROTONOSUPPORT: ::c_int = 43; 506 pub const ESOCKTNOSUPPORT: ::c_int = 44; 507 pub const EOPNOTSUPP: ::c_int = 45; 508 pub const ENOTSUP: ::c_int = EOPNOTSUPP; 509 pub const EPFNOSUPPORT: ::c_int = 46; 510 pub const EAFNOSUPPORT: ::c_int = 47; 511 pub const EADDRINUSE: ::c_int = 48; 512 pub const EADDRNOTAVAIL: ::c_int = 49; 513 pub const ENETDOWN: ::c_int = 50; 514 pub const ENETUNREACH: ::c_int = 51; 515 pub const ENETRESET: ::c_int = 52; 516 pub const ECONNABORTED: ::c_int = 53; 517 pub const ECONNRESET: ::c_int = 54; 518 pub const ENOBUFS: ::c_int = 55; 519 pub const EISCONN: ::c_int = 56; 520 pub const ENOTCONN: ::c_int = 57; 521 pub const ESHUTDOWN: ::c_int = 58; 522 pub const ETOOMANYREFS: ::c_int = 59; 523 pub const ETIMEDOUT: ::c_int = 60; 524 pub const ECONNREFUSED: ::c_int = 61; 525 pub const ELOOP: ::c_int = 62; 526 pub const ENAMETOOLONG: ::c_int = 63; 527 pub const EHOSTDOWN: ::c_int = 64; 528 pub const EHOSTUNREACH: ::c_int = 65; 529 pub const ENOTEMPTY: ::c_int = 66; 530 pub const EPROCLIM: ::c_int = 67; 531 pub const EUSERS: ::c_int = 68; 532 pub const EDQUOT: ::c_int = 69; 533 pub const ESTALE: ::c_int = 70; 534 pub const EREMOTE: ::c_int = 71; 535 pub const EBADRPC: ::c_int = 72; 536 pub const ERPCMISMATCH: ::c_int = 73; 537 pub const EPROGUNAVAIL: ::c_int = 74; 538 pub const EPROGMISMATCH: ::c_int = 75; 539 pub const EPROCUNAVAIL: ::c_int = 76; 540 pub const ENOLCK: ::c_int = 77; 541 pub const ENOSYS: ::c_int = 78; 542 pub const EFTYPE: ::c_int = 79; 543 pub const EAUTH: ::c_int = 80; 544 pub const ENEEDAUTH: ::c_int = 81; 545 pub const EIDRM: ::c_int = 82; 546 pub const ENOMSG: ::c_int = 83; 547 pub const EOVERFLOW: ::c_int = 84; 548 pub const ECANCELED: ::c_int = 85; 549 pub const EILSEQ: ::c_int = 86; 550 pub const ENOATTR: ::c_int = 87; 551 pub const EDOOFUS: ::c_int = 88; 552 pub const EBADMSG: ::c_int = 89; 553 pub const EMULTIHOP: ::c_int = 90; 554 pub const ENOLINK: ::c_int = 91; 555 pub const EPROTO: ::c_int = 92; 556 557 pub const POLLSTANDARD: ::c_short = ::POLLIN 558 | ::POLLPRI 559 | ::POLLOUT 560 | ::POLLRDNORM 561 | ::POLLRDBAND 562 | ::POLLWRBAND 563 | ::POLLERR 564 | ::POLLHUP 565 | ::POLLNVAL; 566 567 pub const EAI_AGAIN: ::c_int = 2; 568 pub const EAI_BADFLAGS: ::c_int = 3; 569 pub const EAI_FAIL: ::c_int = 4; 570 pub const EAI_FAMILY: ::c_int = 5; 571 pub const EAI_MEMORY: ::c_int = 6; 572 pub const EAI_NONAME: ::c_int = 8; 573 pub const EAI_SERVICE: ::c_int = 9; 574 pub const EAI_SOCKTYPE: ::c_int = 10; 575 pub const EAI_SYSTEM: ::c_int = 11; 576 pub const EAI_OVERFLOW: ::c_int = 14; 577 578 pub const F_DUPFD: ::c_int = 0; 579 pub const F_GETFD: ::c_int = 1; 580 pub const F_SETFD: ::c_int = 2; 581 pub const F_GETFL: ::c_int = 3; 582 pub const F_SETFL: ::c_int = 4; 583 584 pub const SIGTRAP: ::c_int = 5; 585 586 pub const GLOB_APPEND: ::c_int = 0x0001; 587 pub const GLOB_DOOFFS: ::c_int = 0x0002; 588 pub const GLOB_ERR: ::c_int = 0x0004; 589 pub const GLOB_MARK: ::c_int = 0x0008; 590 pub const GLOB_NOCHECK: ::c_int = 0x0010; 591 pub const GLOB_NOSORT: ::c_int = 0x0020; 592 pub const GLOB_NOESCAPE: ::c_int = 0x2000; 593 594 pub const GLOB_NOSPACE: ::c_int = -1; 595 pub const GLOB_ABORTED: ::c_int = -2; 596 pub const GLOB_NOMATCH: ::c_int = -3; 597 598 pub const POSIX_MADV_NORMAL: ::c_int = 0; 599 pub const POSIX_MADV_RANDOM: ::c_int = 1; 600 pub const POSIX_MADV_SEQUENTIAL: ::c_int = 2; 601 pub const POSIX_MADV_WILLNEED: ::c_int = 3; 602 pub const POSIX_MADV_DONTNEED: ::c_int = 4; 603 604 pub const PTHREAD_PROCESS_PRIVATE: ::c_int = 0; 605 pub const PTHREAD_PROCESS_SHARED: ::c_int = 1; 606 pub const PTHREAD_CREATE_JOINABLE: ::c_int = 0; 607 pub const PTHREAD_CREATE_DETACHED: ::c_int = 1; 608 609 pub const RLIMIT_CPU: ::c_int = 0; 610 pub const RLIMIT_FSIZE: ::c_int = 1; 611 pub const RLIMIT_DATA: ::c_int = 2; 612 pub const RLIMIT_STACK: ::c_int = 3; 613 pub const RLIMIT_CORE: ::c_int = 4; 614 pub const RLIMIT_RSS: ::c_int = 5; 615 pub const RLIMIT_MEMLOCK: ::c_int = 6; 616 pub const RLIMIT_NPROC: ::c_int = 7; 617 pub const RLIMIT_NOFILE: ::c_int = 8; 618 pub const RLIMIT_SBSIZE: ::c_int = 9; 619 pub const RLIMIT_VMEM: ::c_int = 10; 620 pub const RLIMIT_AS: ::c_int = RLIMIT_VMEM; 621 pub const RLIM_INFINITY: rlim_t = 0x7fff_ffff_ffff_ffff; 622 623 pub const RUSAGE_SELF: ::c_int = 0; 624 pub const RUSAGE_CHILDREN: ::c_int = -1; 625 626 pub const MADV_NORMAL: ::c_int = 0; 627 pub const MADV_RANDOM: ::c_int = 1; 628 pub const MADV_SEQUENTIAL: ::c_int = 2; 629 pub const MADV_WILLNEED: ::c_int = 3; 630 pub const MADV_DONTNEED: ::c_int = 4; 631 pub const MADV_FREE: ::c_int = 5; 632 pub const MADV_NOSYNC: ::c_int = 6; 633 pub const MADV_AUTOSYNC: ::c_int = 7; 634 pub const MADV_NOCORE: ::c_int = 8; 635 pub const MADV_CORE: ::c_int = 9; 636 637 pub const MINCORE_INCORE: ::c_int = 0x1; 638 pub const MINCORE_REFERENCED: ::c_int = 0x2; 639 pub const MINCORE_MODIFIED: ::c_int = 0x4; 640 pub const MINCORE_REFERENCED_OTHER: ::c_int = 0x8; 641 pub const MINCORE_MODIFIED_OTHER: ::c_int = 0x10; 642 pub const MINCORE_SUPER: ::c_int = 0x20; 643 644 pub const AF_UNSPEC: ::c_int = 0; 645 pub const AF_LOCAL: ::c_int = 1; 646 pub const AF_UNIX: ::c_int = AF_LOCAL; 647 pub const AF_INET: ::c_int = 2; 648 pub const AF_IMPLINK: ::c_int = 3; 649 pub const AF_PUP: ::c_int = 4; 650 pub const AF_CHAOS: ::c_int = 5; 651 pub const AF_NETBIOS: ::c_int = 6; 652 pub const AF_ISO: ::c_int = 7; 653 pub const AF_OSI: ::c_int = AF_ISO; 654 pub const AF_ECMA: ::c_int = 8; 655 pub const AF_DATAKIT: ::c_int = 9; 656 pub const AF_CCITT: ::c_int = 10; 657 pub const AF_SNA: ::c_int = 11; 658 pub const AF_DECnet: ::c_int = 12; 659 pub const AF_DLI: ::c_int = 13; 660 pub const AF_LAT: ::c_int = 14; 661 pub const AF_HYLINK: ::c_int = 15; 662 pub const AF_APPLETALK: ::c_int = 16; 663 pub const AF_ROUTE: ::c_int = 17; 664 pub const AF_LINK: ::c_int = 18; 665 pub const pseudo_AF_XTP: ::c_int = 19; 666 pub const AF_COIP: ::c_int = 20; 667 pub const AF_CNT: ::c_int = 21; 668 pub const pseudo_AF_RTIP: ::c_int = 22; 669 pub const AF_IPX: ::c_int = 23; 670 pub const AF_SIP: ::c_int = 24; 671 pub const pseudo_AF_PIP: ::c_int = 25; 672 pub const AF_ISDN: ::c_int = 26; 673 pub const AF_E164: ::c_int = AF_ISDN; 674 pub const pseudo_AF_KEY: ::c_int = 27; 675 pub const AF_INET6: ::c_int = 28; 676 pub const AF_NATM: ::c_int = 29; 677 pub const AF_ATM: ::c_int = 30; 678 pub const pseudo_AF_HDRCMPLT: ::c_int = 31; 679 pub const AF_NETGRAPH: ::c_int = 32; 680 681 pub const PF_UNSPEC: ::c_int = AF_UNSPEC; 682 pub const PF_LOCAL: ::c_int = AF_LOCAL; 683 pub const PF_UNIX: ::c_int = PF_LOCAL; 684 pub const PF_INET: ::c_int = AF_INET; 685 pub const PF_IMPLINK: ::c_int = AF_IMPLINK; 686 pub const PF_PUP: ::c_int = AF_PUP; 687 pub const PF_CHAOS: ::c_int = AF_CHAOS; 688 pub const PF_NETBIOS: ::c_int = AF_NETBIOS; 689 pub const PF_ISO: ::c_int = AF_ISO; 690 pub const PF_OSI: ::c_int = AF_ISO; 691 pub const PF_ECMA: ::c_int = AF_ECMA; 692 pub const PF_DATAKIT: ::c_int = AF_DATAKIT; 693 pub const PF_CCITT: ::c_int = AF_CCITT; 694 pub const PF_SNA: ::c_int = AF_SNA; 695 pub const PF_DECnet: ::c_int = AF_DECnet; 696 pub const PF_DLI: ::c_int = AF_DLI; 697 pub const PF_LAT: ::c_int = AF_LAT; 698 pub const PF_HYLINK: ::c_int = AF_HYLINK; 699 pub const PF_APPLETALK: ::c_int = AF_APPLETALK; 700 pub const PF_ROUTE: ::c_int = AF_ROUTE; 701 pub const PF_LINK: ::c_int = AF_LINK; 702 pub const PF_XTP: ::c_int = pseudo_AF_XTP; 703 pub const PF_COIP: ::c_int = AF_COIP; 704 pub const PF_CNT: ::c_int = AF_CNT; 705 pub const PF_SIP: ::c_int = AF_SIP; 706 pub const PF_IPX: ::c_int = AF_IPX; 707 pub const PF_RTIP: ::c_int = pseudo_AF_RTIP; 708 pub const PF_PIP: ::c_int = pseudo_AF_PIP; 709 pub const PF_ISDN: ::c_int = AF_ISDN; 710 pub const PF_KEY: ::c_int = pseudo_AF_KEY; 711 pub const PF_INET6: ::c_int = AF_INET6; 712 pub const PF_NATM: ::c_int = AF_NATM; 713 pub const PF_ATM: ::c_int = AF_ATM; 714 pub const PF_NETGRAPH: ::c_int = AF_NETGRAPH; 715 716 pub const PT_TRACE_ME: ::c_int = 0; 717 pub const PT_READ_I: ::c_int = 1; 718 pub const PT_READ_D: ::c_int = 2; 719 pub const PT_WRITE_I: ::c_int = 4; 720 pub const PT_WRITE_D: ::c_int = 5; 721 pub const PT_CONTINUE: ::c_int = 7; 722 pub const PT_KILL: ::c_int = 8; 723 pub const PT_STEP: ::c_int = 9; 724 pub const PT_ATTACH: ::c_int = 10; 725 pub const PT_DETACH: ::c_int = 11; 726 pub const PT_IO: ::c_int = 12; 727 728 pub const SOMAXCONN: ::c_int = 128; 729 730 pub const MSG_OOB: ::c_int = 0x00000001; 731 pub const MSG_PEEK: ::c_int = 0x00000002; 732 pub const MSG_DONTROUTE: ::c_int = 0x00000004; 733 pub const MSG_EOR: ::c_int = 0x00000008; 734 pub const MSG_TRUNC: ::c_int = 0x00000010; 735 pub const MSG_CTRUNC: ::c_int = 0x00000020; 736 pub const MSG_WAITALL: ::c_int = 0x00000040; 737 pub const MSG_DONTWAIT: ::c_int = 0x00000080; 738 pub const MSG_EOF: ::c_int = 0x00000100; 739 740 pub const SCM_TIMESTAMP: ::c_int = 0x02; 741 742 pub const SOCK_STREAM: ::c_int = 1; 743 pub const SOCK_DGRAM: ::c_int = 2; 744 pub const SOCK_RAW: ::c_int = 3; 745 pub const SOCK_RDM: ::c_int = 4; 746 pub const SOCK_SEQPACKET: ::c_int = 5; 747 pub const SOCK_CLOEXEC: ::c_int = 0x10000000; 748 pub const SOCK_NONBLOCK: ::c_int = 0x20000000; 749 pub const SOCK_MAXADDRLEN: ::c_int = 255; 750 pub const IP_TTL: ::c_int = 4; 751 pub const IP_HDRINCL: ::c_int = 2; 752 pub const IP_RECVDSTADDR: ::c_int = 7; 753 pub const IP_SENDSRCADDR: ::c_int = IP_RECVDSTADDR; 754 pub const IP_ADD_MEMBERSHIP: ::c_int = 12; 755 pub const IP_DROP_MEMBERSHIP: ::c_int = 13; 756 pub const IP_RECVIF: ::c_int = 20; 757 pub const IPV6_JOIN_GROUP: ::c_int = 12; 758 pub const IPV6_LEAVE_GROUP: ::c_int = 13; 759 pub const IPV6_RECVPKTINFO: ::c_int = 36; 760 pub const IPV6_PKTINFO: ::c_int = 46; 761 pub const IPV6_RECVTCLASS: ::c_int = 57; 762 pub const IPV6_TCLASS: ::c_int = 61; 763 764 pub const TCP_NOPUSH: ::c_int = 4; 765 pub const TCP_NOOPT: ::c_int = 8; 766 pub const TCP_KEEPIDLE: ::c_int = 256; 767 pub const TCP_KEEPINTVL: ::c_int = 512; 768 pub const TCP_KEEPCNT: ::c_int = 1024; 769 770 pub const SOL_SOCKET: ::c_int = 0xffff; 771 pub const SO_DEBUG: ::c_int = 0x01; 772 pub const SO_ACCEPTCONN: ::c_int = 0x0002; 773 pub const SO_REUSEADDR: ::c_int = 0x0004; 774 pub const SO_KEEPALIVE: ::c_int = 0x0008; 775 pub const SO_DONTROUTE: ::c_int = 0x0010; 776 pub const SO_BROADCAST: ::c_int = 0x0020; 777 pub const SO_USELOOPBACK: ::c_int = 0x0040; 778 pub const SO_LINGER: ::c_int = 0x0080; 779 pub const SO_OOBINLINE: ::c_int = 0x0100; 780 pub const SO_REUSEPORT: ::c_int = 0x0200; 781 pub const SO_TIMESTAMP: ::c_int = 0x0400; 782 pub const SO_NOSIGPIPE: ::c_int = 0x0800; 783 pub const SO_ACCEPTFILTER: ::c_int = 0x1000; 784 pub const SO_SNDBUF: ::c_int = 0x1001; 785 pub const SO_RCVBUF: ::c_int = 0x1002; 786 pub const SO_SNDLOWAT: ::c_int = 0x1003; 787 pub const SO_RCVLOWAT: ::c_int = 0x1004; 788 pub const SO_SNDTIMEO: ::c_int = 0x1005; 789 pub const SO_RCVTIMEO: ::c_int = 0x1006; 790 pub const SO_ERROR: ::c_int = 0x1007; 791 pub const SO_TYPE: ::c_int = 0x1008; 792 793 pub const SHUT_RD: ::c_int = 0; 794 pub const SHUT_WR: ::c_int = 1; 795 pub const SHUT_RDWR: ::c_int = 2; 796 797 pub const LOCK_SH: ::c_int = 1; 798 pub const LOCK_EX: ::c_int = 2; 799 pub const LOCK_NB: ::c_int = 4; 800 pub const LOCK_UN: ::c_int = 8; 801 802 pub const MAP_COPY: ::c_int = 0x0002; 803 #[doc(hidden)] 804 #[deprecated(since = "0.2.54", note = "Removed in FreeBSD 11")] 805 pub const MAP_RENAME: ::c_int = 0x0020; 806 #[doc(hidden)] 807 #[deprecated(since = "0.2.54", note = "Removed in FreeBSD 11")] 808 pub const MAP_NORESERVE: ::c_int = 0x0040; 809 pub const MAP_HASSEMAPHORE: ::c_int = 0x0200; 810 pub const MAP_STACK: ::c_int = 0x0400; 811 pub const MAP_NOSYNC: ::c_int = 0x0800; 812 pub const MAP_NOCORE: ::c_int = 0x020000; 813 814 pub const IPPROTO_RAW: ::c_int = 255; 815 816 pub const _PC_LINK_MAX: ::c_int = 1; 817 pub const _PC_MAX_CANON: ::c_int = 2; 818 pub const _PC_MAX_INPUT: ::c_int = 3; 819 pub const _PC_NAME_MAX: ::c_int = 4; 820 pub const _PC_PATH_MAX: ::c_int = 5; 821 pub const _PC_PIPE_BUF: ::c_int = 6; 822 pub const _PC_CHOWN_RESTRICTED: ::c_int = 7; 823 pub const _PC_NO_TRUNC: ::c_int = 8; 824 pub const _PC_VDISABLE: ::c_int = 9; 825 pub const _PC_ALLOC_SIZE_MIN: ::c_int = 10; 826 pub const _PC_FILESIZEBITS: ::c_int = 12; 827 pub const _PC_REC_INCR_XFER_SIZE: ::c_int = 14; 828 pub const _PC_REC_MAX_XFER_SIZE: ::c_int = 15; 829 pub const _PC_REC_MIN_XFER_SIZE: ::c_int = 16; 830 pub const _PC_REC_XFER_ALIGN: ::c_int = 17; 831 pub const _PC_SYMLINK_MAX: ::c_int = 18; 832 pub const _PC_MIN_HOLE_SIZE: ::c_int = 21; 833 pub const _PC_ASYNC_IO: ::c_int = 53; 834 pub const _PC_PRIO_IO: ::c_int = 54; 835 pub const _PC_SYNC_IO: ::c_int = 55; 836 pub const _PC_ACL_EXTENDED: ::c_int = 59; 837 pub const _PC_ACL_PATH_MAX: ::c_int = 60; 838 pub const _PC_CAP_PRESENT: ::c_int = 61; 839 pub const _PC_INF_PRESENT: ::c_int = 62; 840 pub const _PC_MAC_PRESENT: ::c_int = 63; 841 842 pub const _SC_ARG_MAX: ::c_int = 1; 843 pub const _SC_CHILD_MAX: ::c_int = 2; 844 pub const _SC_CLK_TCK: ::c_int = 3; 845 pub const _SC_NGROUPS_MAX: ::c_int = 4; 846 pub const _SC_OPEN_MAX: ::c_int = 5; 847 pub const _SC_JOB_CONTROL: ::c_int = 6; 848 pub const _SC_SAVED_IDS: ::c_int = 7; 849 pub const _SC_VERSION: ::c_int = 8; 850 pub const _SC_BC_BASE_MAX: ::c_int = 9; 851 pub const _SC_BC_DIM_MAX: ::c_int = 10; 852 pub const _SC_BC_SCALE_MAX: ::c_int = 11; 853 pub const _SC_BC_STRING_MAX: ::c_int = 12; 854 pub const _SC_COLL_WEIGHTS_MAX: ::c_int = 13; 855 pub const _SC_EXPR_NEST_MAX: ::c_int = 14; 856 pub const _SC_LINE_MAX: ::c_int = 15; 857 pub const _SC_RE_DUP_MAX: ::c_int = 16; 858 pub const _SC_2_VERSION: ::c_int = 17; 859 pub const _SC_2_C_BIND: ::c_int = 18; 860 pub const _SC_2_C_DEV: ::c_int = 19; 861 pub const _SC_2_CHAR_TERM: ::c_int = 20; 862 pub const _SC_2_FORT_DEV: ::c_int = 21; 863 pub const _SC_2_FORT_RUN: ::c_int = 22; 864 pub const _SC_2_LOCALEDEF: ::c_int = 23; 865 pub const _SC_2_SW_DEV: ::c_int = 24; 866 pub const _SC_2_UPE: ::c_int = 25; 867 pub const _SC_STREAM_MAX: ::c_int = 26; 868 pub const _SC_TZNAME_MAX: ::c_int = 27; 869 pub const _SC_ASYNCHRONOUS_IO: ::c_int = 28; 870 pub const _SC_MAPPED_FILES: ::c_int = 29; 871 pub const _SC_MEMLOCK: ::c_int = 30; 872 pub const _SC_MEMLOCK_RANGE: ::c_int = 31; 873 pub const _SC_MEMORY_PROTECTION: ::c_int = 32; 874 pub const _SC_MESSAGE_PASSING: ::c_int = 33; 875 pub const _SC_PRIORITIZED_IO: ::c_int = 34; 876 pub const _SC_PRIORITY_SCHEDULING: ::c_int = 35; 877 pub const _SC_REALTIME_SIGNALS: ::c_int = 36; 878 pub const _SC_SEMAPHORES: ::c_int = 37; 879 pub const _SC_FSYNC: ::c_int = 38; 880 pub const _SC_SHARED_MEMORY_OBJECTS: ::c_int = 39; 881 pub const _SC_SYNCHRONIZED_IO: ::c_int = 40; 882 pub const _SC_TIMERS: ::c_int = 41; 883 pub const _SC_AIO_LISTIO_MAX: ::c_int = 42; 884 pub const _SC_AIO_MAX: ::c_int = 43; 885 pub const _SC_AIO_PRIO_DELTA_MAX: ::c_int = 44; 886 pub const _SC_DELAYTIMER_MAX: ::c_int = 45; 887 pub const _SC_MQ_OPEN_MAX: ::c_int = 46; 888 pub const _SC_PAGESIZE: ::c_int = 47; 889 pub const _SC_PAGE_SIZE: ::c_int = _SC_PAGESIZE; 890 pub const _SC_RTSIG_MAX: ::c_int = 48; 891 pub const _SC_SEM_NSEMS_MAX: ::c_int = 49; 892 pub const _SC_SEM_VALUE_MAX: ::c_int = 50; 893 pub const _SC_SIGQUEUE_MAX: ::c_int = 51; 894 pub const _SC_TIMER_MAX: ::c_int = 52; 895 pub const _SC_IOV_MAX: ::c_int = 56; 896 pub const _SC_NPROCESSORS_CONF: ::c_int = 57; 897 pub const _SC_2_PBS: ::c_int = 59; 898 pub const _SC_2_PBS_ACCOUNTING: ::c_int = 60; 899 pub const _SC_2_PBS_CHECKPOINT: ::c_int = 61; 900 pub const _SC_2_PBS_LOCATE: ::c_int = 62; 901 pub const _SC_2_PBS_MESSAGE: ::c_int = 63; 902 pub const _SC_2_PBS_TRACK: ::c_int = 64; 903 pub const _SC_ADVISORY_INFO: ::c_int = 65; 904 pub const _SC_BARRIERS: ::c_int = 66; 905 pub const _SC_CLOCK_SELECTION: ::c_int = 67; 906 pub const _SC_CPUTIME: ::c_int = 68; 907 pub const _SC_FILE_LOCKING: ::c_int = 69; 908 pub const _SC_NPROCESSORS_ONLN: ::c_int = 58; 909 pub const _SC_GETGR_R_SIZE_MAX: ::c_int = 70; 910 pub const _SC_GETPW_R_SIZE_MAX: ::c_int = 71; 911 pub const _SC_HOST_NAME_MAX: ::c_int = 72; 912 pub const _SC_LOGIN_NAME_MAX: ::c_int = 73; 913 pub const _SC_MONOTONIC_CLOCK: ::c_int = 74; 914 pub const _SC_MQ_PRIO_MAX: ::c_int = 75; 915 pub const _SC_READER_WRITER_LOCKS: ::c_int = 76; 916 pub const _SC_REGEXP: ::c_int = 77; 917 pub const _SC_SHELL: ::c_int = 78; 918 pub const _SC_SPAWN: ::c_int = 79; 919 pub const _SC_SPIN_LOCKS: ::c_int = 80; 920 pub const _SC_SPORADIC_SERVER: ::c_int = 81; 921 pub const _SC_THREAD_ATTR_STACKADDR: ::c_int = 82; 922 pub const _SC_THREAD_ATTR_STACKSIZE: ::c_int = 83; 923 pub const _SC_THREAD_DESTRUCTOR_ITERATIONS: ::c_int = 85; 924 pub const _SC_THREAD_KEYS_MAX: ::c_int = 86; 925 pub const _SC_THREAD_PRIO_INHERIT: ::c_int = 87; 926 pub const _SC_THREAD_PRIO_PROTECT: ::c_int = 88; 927 pub const _SC_THREAD_PRIORITY_SCHEDULING: ::c_int = 89; 928 pub const _SC_THREAD_PROCESS_SHARED: ::c_int = 90; 929 pub const _SC_THREAD_SAFE_FUNCTIONS: ::c_int = 91; 930 pub const _SC_THREAD_SPORADIC_SERVER: ::c_int = 92; 931 pub const _SC_THREAD_STACK_MIN: ::c_int = 93; 932 pub const _SC_THREAD_THREADS_MAX: ::c_int = 94; 933 pub const _SC_TIMEOUTS: ::c_int = 95; 934 pub const _SC_THREADS: ::c_int = 96; 935 pub const _SC_TRACE: ::c_int = 97; 936 pub const _SC_TRACE_EVENT_FILTER: ::c_int = 98; 937 pub const _SC_TRACE_INHERIT: ::c_int = 99; 938 pub const _SC_TRACE_LOG: ::c_int = 100; 939 pub const _SC_TTY_NAME_MAX: ::c_int = 101; 940 pub const _SC_TYPED_MEMORY_OBJECTS: ::c_int = 102; 941 pub const _SC_V6_ILP32_OFF32: ::c_int = 103; 942 pub const _SC_V6_ILP32_OFFBIG: ::c_int = 104; 943 pub const _SC_V6_LP64_OFF64: ::c_int = 105; 944 pub const _SC_V6_LPBIG_OFFBIG: ::c_int = 106; 945 pub const _SC_ATEXIT_MAX: ::c_int = 107; 946 pub const _SC_XOPEN_CRYPT: ::c_int = 108; 947 pub const _SC_XOPEN_ENH_I18N: ::c_int = 109; 948 pub const _SC_XOPEN_LEGACY: ::c_int = 110; 949 pub const _SC_XOPEN_REALTIME: ::c_int = 111; 950 pub const _SC_XOPEN_REALTIME_THREADS: ::c_int = 112; 951 pub const _SC_XOPEN_SHM: ::c_int = 113; 952 pub const _SC_XOPEN_STREAMS: ::c_int = 114; 953 pub const _SC_XOPEN_UNIX: ::c_int = 115; 954 pub const _SC_XOPEN_VERSION: ::c_int = 116; 955 pub const _SC_XOPEN_XCU_VERSION: ::c_int = 117; 956 pub const _SC_IPV6: ::c_int = 118; 957 pub const _SC_RAW_SOCKETS: ::c_int = 119; 958 pub const _SC_SYMLOOP_MAX: ::c_int = 120; 959 pub const _SC_PHYS_PAGES: ::c_int = 121; 960 961 pub const PTHREAD_MUTEX_INITIALIZER: pthread_mutex_t = 0 as *mut _; 962 pub const PTHREAD_COND_INITIALIZER: pthread_cond_t = 0 as *mut _; 963 pub const PTHREAD_RWLOCK_INITIALIZER: pthread_rwlock_t = 0 as *mut _; 964 pub const PTHREAD_MUTEX_ERRORCHECK: ::c_int = 1; 965 pub const PTHREAD_MUTEX_RECURSIVE: ::c_int = 2; 966 pub const PTHREAD_MUTEX_NORMAL: ::c_int = 3; 967 pub const PTHREAD_MUTEX_DEFAULT: ::c_int = PTHREAD_MUTEX_ERRORCHECK; 968 969 pub const SCHED_FIFO: ::c_int = 1; 970 pub const SCHED_OTHER: ::c_int = 2; 971 pub const SCHED_RR: ::c_int = 3; 972 973 pub const FD_SETSIZE: usize = 1024; 974 975 pub const ST_NOSUID: ::c_ulong = 2; 976 977 pub const NI_MAXHOST: ::size_t = 1025; 978 979 pub const RTLD_LOCAL: ::c_int = 0; 980 pub const RTLD_NODELETE: ::c_int = 0x1000; 981 pub const RTLD_NOLOAD: ::c_int = 0x2000; 982 pub const RTLD_GLOBAL: ::c_int = 0x100; 983 984 pub const LOG_NTP: ::c_int = 12 << 3; 985 pub const LOG_SECURITY: ::c_int = 13 << 3; 986 pub const LOG_CONSOLE: ::c_int = 14 << 3; 987 pub const LOG_NFACILITIES: ::c_int = 24; 988 989 pub const TIOCEXCL: ::c_uint = 0x2000740d; 990 pub const TIOCNXCL: ::c_uint = 0x2000740e; 991 pub const TIOCFLUSH: ::c_ulong = 0x80047410; 992 pub const TIOCGETA: ::c_uint = 0x402c7413; 993 pub const TIOCSETA: ::c_ulong = 0x802c7414; 994 pub const TIOCSETAW: ::c_ulong = 0x802c7415; 995 pub const TIOCSETAF: ::c_ulong = 0x802c7416; 996 pub const TIOCGETD: ::c_uint = 0x4004741a; 997 pub const TIOCSETD: ::c_ulong = 0x8004741b; 998 pub const TIOCGDRAINWAIT: ::c_uint = 0x40047456; 999 pub const TIOCSDRAINWAIT: ::c_ulong = 0x80047457; 1000 pub const TIOCTIMESTAMP: ::c_uint = 0x40107459; 1001 pub const TIOCMGDTRWAIT: ::c_uint = 0x4004745a; 1002 pub const TIOCMSDTRWAIT: ::c_ulong = 0x8004745b; 1003 pub const TIOCDRAIN: ::c_uint = 0x2000745e; 1004 pub const TIOCEXT: ::c_ulong = 0x80047460; 1005 pub const TIOCSCTTY: ::c_uint = 0x20007461; 1006 pub const TIOCCONS: ::c_ulong = 0x80047462; 1007 pub const TIOCGSID: ::c_uint = 0x40047463; 1008 pub const TIOCSTAT: ::c_uint = 0x20007465; 1009 pub const TIOCUCNTL: ::c_ulong = 0x80047466; 1010 pub const TIOCSWINSZ: ::c_ulong = 0x80087467; 1011 pub const TIOCGWINSZ: ::c_uint = 0x40087468; 1012 pub const TIOCMGET: ::c_uint = 0x4004746a; 1013 pub const TIOCM_LE: ::c_int = 0x1; 1014 pub const TIOCM_DTR: ::c_int = 0x2; 1015 pub const TIOCM_RTS: ::c_int = 0x4; 1016 pub const TIOCM_ST: ::c_int = 0x8; 1017 pub const TIOCM_SR: ::c_int = 0x10; 1018 pub const TIOCM_CTS: ::c_int = 0x20; 1019 pub const TIOCM_RI: ::c_int = 0x80; 1020 pub const TIOCM_DSR: ::c_int = 0x100; 1021 pub const TIOCM_CD: ::c_int = 0x40; 1022 pub const TIOCM_CAR: ::c_int = 0x40; 1023 pub const TIOCM_RNG: ::c_int = 0x80; 1024 pub const TIOCMBIC: ::c_ulong = 0x8004746b; 1025 pub const TIOCMBIS: ::c_ulong = 0x8004746c; 1026 pub const TIOCMSET: ::c_ulong = 0x8004746d; 1027 pub const TIOCSTART: ::c_uint = 0x2000746e; 1028 pub const TIOCSTOP: ::c_uint = 0x2000746f; 1029 pub const TIOCPKT: ::c_ulong = 0x80047470; 1030 pub const TIOCPKT_DATA: ::c_int = 0x0; 1031 pub const TIOCPKT_FLUSHREAD: ::c_int = 0x1; 1032 pub const TIOCPKT_FLUSHWRITE: ::c_int = 0x2; 1033 pub const TIOCPKT_STOP: ::c_int = 0x4; 1034 pub const TIOCPKT_START: ::c_int = 0x8; 1035 pub const TIOCPKT_NOSTOP: ::c_int = 0x10; 1036 pub const TIOCPKT_DOSTOP: ::c_int = 0x20; 1037 pub const TIOCPKT_IOCTL: ::c_int = 0x40; 1038 pub const TIOCNOTTY: ::c_uint = 0x20007471; 1039 pub const TIOCSTI: ::c_ulong = 0x80017472; 1040 pub const TIOCOUTQ: ::c_uint = 0x40047473; 1041 pub const TIOCSPGRP: ::c_ulong = 0x80047476; 1042 pub const TIOCGPGRP: ::c_uint = 0x40047477; 1043 pub const TIOCCDTR: ::c_uint = 0x20007478; 1044 pub const TIOCSDTR: ::c_uint = 0x20007479; 1045 pub const TIOCCBRK: ::c_uint = 0x2000747a; 1046 pub const TIOCSBRK: ::c_uint = 0x2000747b; 1047 pub const TTYDISC: ::c_int = 0x0; 1048 pub const SLIPDISC: ::c_int = 0x4; 1049 pub const PPPDISC: ::c_int = 0x5; 1050 pub const NETGRAPHDISC: ::c_int = 0x6; 1051 1052 pub const BIOCGRSIG: ::c_ulong = 0x40044272; 1053 pub const BIOCSRSIG: ::c_ulong = 0x80044273; 1054 pub const BIOCSDLT: ::c_ulong = 0x80044278; 1055 pub const BIOCGSEESENT: ::c_ulong = 0x40044276; 1056 pub const BIOCSSEESENT: ::c_ulong = 0x80044277; 1057 pub const BIOCSETF: ::c_ulong = 0x80104267; 1058 pub const BIOCGDLTLIST: ::c_ulong = 0xc0104279; 1059 pub const BIOCSRTIMEOUT: ::c_ulong = 0x8010426d; 1060 pub const BIOCGRTIMEOUT: ::c_ulong = 0x4010426e; 1061 1062 pub const FIODTYPE: ::c_ulong = 0x4004667a; 1063 pub const FIOGETLBA: ::c_ulong = 0x40046679; 1064 pub const FIODGNAME: ::c_ulong = 0x80106678; 1065 1066 pub const B0: speed_t = 0; 1067 pub const B50: speed_t = 50; 1068 pub const B75: speed_t = 75; 1069 pub const B110: speed_t = 110; 1070 pub const B134: speed_t = 134; 1071 pub const B150: speed_t = 150; 1072 pub const B200: speed_t = 200; 1073 pub const B300: speed_t = 300; 1074 pub const B600: speed_t = 600; 1075 pub const B1200: speed_t = 1200; 1076 pub const B1800: speed_t = 1800; 1077 pub const B2400: speed_t = 2400; 1078 pub const B4800: speed_t = 4800; 1079 pub const B9600: speed_t = 9600; 1080 pub const B19200: speed_t = 19200; 1081 pub const B38400: speed_t = 38400; 1082 pub const B7200: speed_t = 7200; 1083 pub const B14400: speed_t = 14400; 1084 pub const B28800: speed_t = 28800; 1085 pub const B57600: speed_t = 57600; 1086 pub const B76800: speed_t = 76800; 1087 pub const B115200: speed_t = 115200; 1088 pub const B230400: speed_t = 230400; 1089 pub const EXTA: speed_t = 19200; 1090 pub const EXTB: speed_t = 38400; 1091 1092 pub const SEM_FAILED: *mut sem_t = 0 as *mut sem_t; 1093 1094 pub const CRTSCTS: ::tcflag_t = 0x00030000; 1095 pub const CCTS_OFLOW: ::tcflag_t = 0x00010000; 1096 pub const CRTS_IFLOW: ::tcflag_t = 0x00020000; 1097 pub const CDTR_IFLOW: ::tcflag_t = 0x00040000; 1098 pub const CDSR_OFLOW: ::tcflag_t = 0x00080000; 1099 pub const CCAR_OFLOW: ::tcflag_t = 0x00100000; 1100 pub const VERASE2: usize = 7; 1101 pub const OCRNL: ::tcflag_t = 0x10; 1102 pub const ONOCR: ::tcflag_t = 0x20; 1103 pub const ONLRET: ::tcflag_t = 0x40; 1104 1105 pub const CMGROUP_MAX: usize = 16; 1106 1107 // https://github.com/freebsd/freebsd/blob/master/sys/net/bpf.h 1108 // sizeof(long) 1109 pub const BPF_ALIGNMENT: ::c_int = 8; 1110 1111 // Values for rtprio struct (prio field) and syscall (function argument) 1112 pub const RTP_PRIO_MIN: ::c_ushort = 0; 1113 pub const RTP_PRIO_MAX: ::c_ushort = 31; 1114 pub const RTP_LOOKUP: ::c_int = 0; 1115 pub const RTP_SET: ::c_int = 1; 1116 1117 // Flags for chflags(2) 1118 pub const UF_SETTABLE: ::c_ulong = 0x0000ffff; 1119 pub const UF_NODUMP: ::c_ulong = 0x00000001; 1120 pub const UF_IMMUTABLE: ::c_ulong = 0x00000002; 1121 pub const UF_APPEND: ::c_ulong = 0x00000004; 1122 pub const UF_OPAQUE: ::c_ulong = 0x00000008; 1123 pub const UF_NOUNLINK: ::c_ulong = 0x00000010; 1124 pub const SF_SETTABLE: ::c_ulong = 0xffff0000; 1125 pub const SF_ARCHIVED: ::c_ulong = 0x00010000; 1126 pub const SF_IMMUTABLE: ::c_ulong = 0x00020000; 1127 pub const SF_APPEND: ::c_ulong = 0x00040000; 1128 pub const SF_NOUNLINK: ::c_ulong = 0x00100000; 1129 1130 pub const TIMER_ABSTIME: ::c_int = 1; 1131 1132 //<sys/timex.h> 1133 pub const NTP_API: ::c_int = 4; 1134 pub const MAXPHASE: ::c_long = 500000000; 1135 pub const MAXFREQ: ::c_long = 500000; 1136 pub const MINSEC: ::c_int = 256; 1137 pub const MAXSEC: ::c_int = 2048; 1138 pub const NANOSECOND: ::c_long = 1000000000; 1139 pub const SCALE_PPM: ::c_int = 65; 1140 pub const MAXTC: ::c_int = 10; 1141 pub const MOD_OFFSET: ::c_uint = 0x0001; 1142 pub const MOD_FREQUENCY: ::c_uint = 0x0002; 1143 pub const MOD_MAXERROR: ::c_uint = 0x0004; 1144 pub const MOD_ESTERROR: ::c_uint = 0x0008; 1145 pub const MOD_STATUS: ::c_uint = 0x0010; 1146 pub const MOD_TIMECONST: ::c_uint = 0x0020; 1147 pub const MOD_PPSMAX: ::c_uint = 0x0040; 1148 pub const MOD_TAI: ::c_uint = 0x0080; 1149 pub const MOD_MICRO: ::c_uint = 0x1000; 1150 pub const MOD_NANO: ::c_uint = 0x2000; 1151 pub const MOD_CLKB: ::c_uint = 0x4000; 1152 pub const MOD_CLKA: ::c_uint = 0x8000; 1153 pub const STA_PLL: ::c_int = 0x0001; 1154 pub const STA_PPSFREQ: ::c_int = 0x0002; 1155 pub const STA_PPSTIME: ::c_int = 0x0004; 1156 pub const STA_FLL: ::c_int = 0x0008; 1157 pub const STA_INS: ::c_int = 0x0010; 1158 pub const STA_DEL: ::c_int = 0x0020; 1159 pub const STA_UNSYNC: ::c_int = 0x0040; 1160 pub const STA_FREQHOLD: ::c_int = 0x0080; 1161 pub const STA_PPSSIGNAL: ::c_int = 0x0100; 1162 pub const STA_PPSJITTER: ::c_int = 0x0200; 1163 pub const STA_PPSWANDER: ::c_int = 0x0400; 1164 pub const STA_PPSERROR: ::c_int = 0x0800; 1165 pub const STA_CLOCKERR: ::c_int = 0x1000; 1166 pub const STA_NANO: ::c_int = 0x2000; 1167 pub const STA_MODE: ::c_int = 0x4000; 1168 pub const STA_CLK: ::c_int = 0x8000; 1169 pub const STA_RONLY: ::c_int = STA_PPSSIGNAL 1170 | STA_PPSJITTER 1171 | STA_PPSWANDER 1172 | STA_PPSERROR 1173 | STA_CLOCKERR 1174 | STA_NANO 1175 | STA_MODE 1176 | STA_CLK; 1177 pub const TIME_OK: ::c_int = 0; 1178 pub const TIME_INS: ::c_int = 1; 1179 pub const TIME_DEL: ::c_int = 2; 1180 pub const TIME_OOP: ::c_int = 3; 1181 pub const TIME_WAIT: ::c_int = 4; 1182 pub const TIME_ERROR: ::c_int = 5; 1183 1184 f! { 1185 pub fn WIFCONTINUED(status: ::c_int) -> bool { 1186 status == 0x13 1187 } 1188 1189 pub fn WSTOPSIG(status: ::c_int) -> ::c_int { 1190 status >> 8 1191 } 1192 1193 pub fn WIFSIGNALED(status: ::c_int) -> bool { 1194 (status & 0o177) != 0o177 && (status & 0o177) != 0 1195 } 1196 1197 pub fn WIFSTOPPED(status: ::c_int) -> bool { 1198 (status & 0o177) == 0o177 1199 } 1200 } 1201 1202 extern "C" { sem_destroy(sem: *mut sem_t) -> ::c_int1203 pub fn sem_destroy(sem: *mut sem_t) -> ::c_int; sem_init( sem: *mut sem_t, pshared: ::c_int, value: ::c_uint, ) -> ::c_int1204 pub fn sem_init( 1205 sem: *mut sem_t, 1206 pshared: ::c_int, 1207 value: ::c_uint, 1208 ) -> ::c_int; 1209 daemon(nochdir: ::c_int, noclose: ::c_int) -> ::c_int1210 pub fn daemon(nochdir: ::c_int, noclose: ::c_int) -> ::c_int; gettimeofday(tp: *mut ::timeval, tz: *mut ::timezone) -> ::c_int1211 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_int1212 pub fn accept4( 1213 s: ::c_int, 1214 addr: *mut ::sockaddr, 1215 addrlen: *mut ::socklen_t, 1216 flags: ::c_int, 1217 ) -> ::c_int; aio_read(aiocbp: *mut aiocb) -> ::c_int1218 pub fn aio_read(aiocbp: *mut aiocb) -> ::c_int; aio_write(aiocbp: *mut aiocb) -> ::c_int1219 pub fn aio_write(aiocbp: *mut aiocb) -> ::c_int; aio_fsync(op: ::c_int, aiocbp: *mut aiocb) -> ::c_int1220 pub fn aio_fsync(op: ::c_int, aiocbp: *mut aiocb) -> ::c_int; aio_error(aiocbp: *const aiocb) -> ::c_int1221 pub fn aio_error(aiocbp: *const aiocb) -> ::c_int; aio_return(aiocbp: *mut aiocb) -> ::ssize_t1222 pub fn aio_return(aiocbp: *mut aiocb) -> ::ssize_t; aio_suspend( aiocb_list: *const *const aiocb, nitems: ::c_int, timeout: *const ::timespec, ) -> ::c_int1223 pub fn aio_suspend( 1224 aiocb_list: *const *const aiocb, 1225 nitems: ::c_int, 1226 timeout: *const ::timespec, 1227 ) -> ::c_int; aio_cancel(fd: ::c_int, aiocbp: *mut aiocb) -> ::c_int1228 pub fn aio_cancel(fd: ::c_int, aiocbp: *mut aiocb) -> ::c_int; chflags(path: *const ::c_char, flags: ::c_ulong) -> ::c_int1229 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_int1230 pub fn chflagsat( 1231 fd: ::c_int, 1232 path: *const ::c_char, 1233 flags: ::c_ulong, 1234 atflag: ::c_int, 1235 ) -> ::c_int; dirfd(dirp: *mut ::DIR) -> ::c_int1236 pub fn dirfd(dirp: *mut ::DIR) -> ::c_int; duplocale(base: ::locale_t) -> ::locale_t1237 pub fn duplocale(base: ::locale_t) -> ::locale_t; endutxent()1238 pub fn endutxent(); fchflags(fd: ::c_int, flags: ::c_ulong) -> ::c_int1239 pub fn fchflags(fd: ::c_int, flags: ::c_ulong) -> ::c_int; futimens(fd: ::c_int, times: *const ::timespec) -> ::c_int1240 pub fn futimens(fd: ::c_int, times: *const ::timespec) -> ::c_int; getdomainname(name: *mut ::c_char, len: ::c_int) -> ::c_int1241 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_int1242 pub fn getgrent_r( 1243 grp: *mut ::group, 1244 buf: *mut ::c_char, 1245 buflen: ::size_t, 1246 result: *mut *mut ::group, 1247 ) -> ::c_int; 1248 #[cfg_attr(target_os = "netbsd", link_name = "__getpwent_r50")] 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; mq_close(mqd: ::mqd_t) -> ::c_int1315 pub fn mq_close(mqd: ::mqd_t) -> ::c_int; mq_getattr(mqd: ::mqd_t, attr: *mut ::mq_attr) -> ::c_int1316 pub fn mq_getattr(mqd: ::mqd_t, attr: *mut ::mq_attr) -> ::c_int; mq_notify(mqd: ::mqd_t, notification: *const ::sigevent) -> ::c_int1317 pub fn mq_notify(mqd: ::mqd_t, notification: *const ::sigevent) 1318 -> ::c_int; mq_open(name: *const ::c_char, oflag: ::c_int, ...) -> ::mqd_t1319 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_t1320 pub fn mq_receive( 1321 mqd: ::mqd_t, 1322 msg_ptr: *mut ::c_char, 1323 msg_len: ::size_t, 1324 msg_prio: *mut ::c_uint, 1325 ) -> ::ssize_t; mq_send( mqd: ::mqd_t, msg_ptr: *const ::c_char, msg_len: ::size_t, msg_prio: ::c_uint, ) -> ::c_int1326 pub fn mq_send( 1327 mqd: ::mqd_t, 1328 msg_ptr: *const ::c_char, 1329 msg_len: ::size_t, 1330 msg_prio: ::c_uint, 1331 ) -> ::c_int; mq_setattr( mqd: ::mqd_t, newattr: *const ::mq_attr, oldattr: *mut ::mq_attr, ) -> ::c_int1332 pub fn mq_setattr( 1333 mqd: ::mqd_t, 1334 newattr: *const ::mq_attr, 1335 oldattr: *mut ::mq_attr, 1336 ) -> ::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_t1337 pub fn mq_timedreceive( 1338 mqd: ::mqd_t, 1339 msg_ptr: *mut ::c_char, 1340 msg_len: ::size_t, 1341 msg_prio: *mut ::c_uint, 1342 abs_timeout: *const ::timespec, 1343 ) -> ::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_int1344 pub fn mq_timedsend( 1345 mqd: ::mqd_t, 1346 msg_ptr: *const ::c_char, 1347 msg_len: ::size_t, 1348 msg_prio: ::c_uint, 1349 abs_timeout: *const ::timespec, 1350 ) -> ::c_int; mq_unlink(name: *const ::c_char) -> ::c_int1351 pub fn mq_unlink(name: *const ::c_char) -> ::c_int; mincore( addr: *const ::c_void, len: ::size_t, vec: *mut ::c_char, ) -> ::c_int1352 pub fn mincore( 1353 addr: *const ::c_void, 1354 len: ::size_t, 1355 vec: *mut ::c_char, 1356 ) -> ::c_int; newlocale( mask: ::c_int, locale: *const ::c_char, base: ::locale_t, ) -> ::locale_t1357 pub fn newlocale( 1358 mask: ::c_int, 1359 locale: *const ::c_char, 1360 base: ::locale_t, 1361 ) -> ::locale_t; nl_langinfo_l(item: ::nl_item, locale: ::locale_t) -> *mut ::c_char1362 pub fn nl_langinfo_l(item: ::nl_item, locale: ::locale_t) 1363 -> *mut ::c_char; pipe2(fds: *mut ::c_int, flags: ::c_int) -> ::c_int1364 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_int1365 pub fn ppoll( 1366 fds: *mut ::pollfd, 1367 nfds: ::nfds_t, 1368 timeout: *const ::timespec, 1369 sigmask: *const sigset_t, 1370 ) -> ::c_int; preadv( fd: ::c_int, iov: *const ::iovec, iovcnt: ::c_int, offset: ::off_t, ) -> ::ssize_t1371 pub fn preadv( 1372 fd: ::c_int, 1373 iov: *const ::iovec, 1374 iovcnt: ::c_int, 1375 offset: ::off_t, 1376 ) -> ::ssize_t; pthread_attr_get_np( tid: ::pthread_t, attr: *mut ::pthread_attr_t, ) -> ::c_int1377 pub fn pthread_attr_get_np( 1378 tid: ::pthread_t, 1379 attr: *mut ::pthread_attr_t, 1380 ) -> ::c_int; pthread_attr_getguardsize( attr: *const ::pthread_attr_t, guardsize: *mut ::size_t, ) -> ::c_int1381 pub fn pthread_attr_getguardsize( 1382 attr: *const ::pthread_attr_t, 1383 guardsize: *mut ::size_t, 1384 ) -> ::c_int; pthread_attr_getstack( attr: *const ::pthread_attr_t, stackaddr: *mut *mut ::c_void, stacksize: *mut ::size_t, ) -> ::c_int1385 pub fn pthread_attr_getstack( 1386 attr: *const ::pthread_attr_t, 1387 stackaddr: *mut *mut ::c_void, 1388 stacksize: *mut ::size_t, 1389 ) -> ::c_int; pthread_condattr_getclock( attr: *const pthread_condattr_t, clock_id: *mut clockid_t, ) -> ::c_int1390 pub fn pthread_condattr_getclock( 1391 attr: *const pthread_condattr_t, 1392 clock_id: *mut clockid_t, 1393 ) -> ::c_int; pthread_condattr_getpshared( attr: *const pthread_condattr_t, pshared: *mut ::c_int, ) -> ::c_int1394 pub fn pthread_condattr_getpshared( 1395 attr: *const pthread_condattr_t, 1396 pshared: *mut ::c_int, 1397 ) -> ::c_int; pthread_condattr_setclock( attr: *mut pthread_condattr_t, clock_id: ::clockid_t, ) -> ::c_int1398 pub fn pthread_condattr_setclock( 1399 attr: *mut pthread_condattr_t, 1400 clock_id: ::clockid_t, 1401 ) -> ::c_int; pthread_condattr_setpshared( attr: *mut pthread_condattr_t, pshared: ::c_int, ) -> ::c_int1402 pub fn pthread_condattr_setpshared( 1403 attr: *mut pthread_condattr_t, 1404 pshared: ::c_int, 1405 ) -> ::c_int; pthread_main_np() -> ::c_int1406 pub fn pthread_main_np() -> ::c_int; pthread_mutex_timedlock( lock: *mut pthread_mutex_t, abstime: *const ::timespec, ) -> ::c_int1407 pub fn pthread_mutex_timedlock( 1408 lock: *mut pthread_mutex_t, 1409 abstime: *const ::timespec, 1410 ) -> ::c_int; pthread_mutexattr_getpshared( attr: *const pthread_mutexattr_t, pshared: *mut ::c_int, ) -> ::c_int1411 pub fn pthread_mutexattr_getpshared( 1412 attr: *const pthread_mutexattr_t, 1413 pshared: *mut ::c_int, 1414 ) -> ::c_int; pthread_mutexattr_setpshared( attr: *mut pthread_mutexattr_t, pshared: ::c_int, ) -> ::c_int1415 pub fn pthread_mutexattr_setpshared( 1416 attr: *mut pthread_mutexattr_t, 1417 pshared: ::c_int, 1418 ) -> ::c_int; pthread_rwlockattr_getpshared( attr: *const pthread_rwlockattr_t, val: *mut ::c_int, ) -> ::c_int1419 pub fn pthread_rwlockattr_getpshared( 1420 attr: *const pthread_rwlockattr_t, 1421 val: *mut ::c_int, 1422 ) -> ::c_int; pthread_rwlockattr_setpshared( attr: *mut pthread_rwlockattr_t, val: ::c_int, ) -> ::c_int1423 pub fn pthread_rwlockattr_setpshared( 1424 attr: *mut pthread_rwlockattr_t, 1425 val: ::c_int, 1426 ) -> ::c_int; pthread_set_name_np(tid: ::pthread_t, name: *const ::c_char)1427 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_int1428 pub fn ptrace( 1429 request: ::c_int, 1430 pid: ::pid_t, 1431 addr: *mut ::c_char, 1432 data: ::c_int, 1433 ) -> ::c_int; pututxline(ut: *const utmpx) -> *mut utmpx1434 pub fn pututxline(ut: *const utmpx) -> *mut utmpx; pwritev( fd: ::c_int, iov: *const ::iovec, iovcnt: ::c_int, offset: ::off_t, ) -> ::ssize_t1435 pub fn pwritev( 1436 fd: ::c_int, 1437 iov: *const ::iovec, 1438 iovcnt: ::c_int, 1439 offset: ::off_t, 1440 ) -> ::ssize_t; querylocale(mask: ::c_int, loc: ::locale_t) -> *const ::c_char1441 pub fn querylocale(mask: ::c_int, loc: ::locale_t) -> *const ::c_char; rtprio( function: ::c_int, pid: ::pid_t, rtp: *mut rtprio, ) -> ::c_int1442 pub fn rtprio( 1443 function: ::c_int, 1444 pid: ::pid_t, 1445 rtp: *mut rtprio, 1446 ) -> ::c_int; sched_getscheduler(pid: ::pid_t) -> ::c_int1447 pub fn sched_getscheduler(pid: ::pid_t) -> ::c_int; sched_setscheduler( pid: ::pid_t, policy: ::c_int, param: *const ::sched_param, ) -> ::c_int1448 pub fn sched_setscheduler( 1449 pid: ::pid_t, 1450 policy: ::c_int, 1451 param: *const ::sched_param, 1452 ) -> ::c_int; sem_getvalue(sem: *mut sem_t, sval: *mut ::c_int) -> ::c_int1453 pub fn sem_getvalue(sem: *mut sem_t, sval: *mut ::c_int) -> ::c_int; sem_timedwait( sem: *mut sem_t, abstime: *const ::timespec, ) -> ::c_int1454 pub fn sem_timedwait( 1455 sem: *mut sem_t, 1456 abstime: *const ::timespec, 1457 ) -> ::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_int1458 pub fn sendfile( 1459 fd: ::c_int, 1460 s: ::c_int, 1461 offset: ::off_t, 1462 nbytes: ::size_t, 1463 hdtr: *mut ::sf_hdtr, 1464 sbytes: *mut ::off_t, 1465 flags: ::c_int, 1466 ) -> ::c_int; setdomainname(name: *const ::c_char, len: ::c_int) -> ::c_int1467 pub fn setdomainname(name: *const ::c_char, len: ::c_int) -> ::c_int; sethostname(name: *const ::c_char, len: ::c_int) -> ::c_int1468 pub fn sethostname(name: *const ::c_char, len: ::c_int) -> ::c_int; setpriority(which: ::c_int, who: ::c_int, prio: ::c_int) -> ::c_int1469 pub fn setpriority(which: ::c_int, who: ::c_int, prio: ::c_int) 1470 -> ::c_int; setresgid(rgid: ::gid_t, egid: ::gid_t, sgid: ::gid_t) -> ::c_int1471 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_int1472 pub fn setresuid(ruid: ::uid_t, euid: ::uid_t, suid: ::uid_t) -> ::c_int; settimeofday( tv: *const ::timeval, tz: *const ::timezone, ) -> ::c_int1473 pub fn settimeofday( 1474 tv: *const ::timeval, 1475 tz: *const ::timezone, 1476 ) -> ::c_int; setutxent()1477 pub fn setutxent(); shm_open( name: *const ::c_char, oflag: ::c_int, mode: ::mode_t, ) -> ::c_int1478 pub fn shm_open( 1479 name: *const ::c_char, 1480 oflag: ::c_int, 1481 mode: ::mode_t, 1482 ) -> ::c_int; sigtimedwait( set: *const sigset_t, info: *mut siginfo_t, timeout: *const ::timespec, ) -> ::c_int1483 pub fn sigtimedwait( 1484 set: *const sigset_t, 1485 info: *mut siginfo_t, 1486 timeout: *const ::timespec, 1487 ) -> ::c_int; sigwaitinfo(set: *const sigset_t, info: *mut siginfo_t) -> ::c_int1488 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_int1489 pub fn sysctl( 1490 name: *const ::c_int, 1491 namelen: ::c_uint, 1492 oldp: *mut ::c_void, 1493 oldlenp: *mut ::size_t, 1494 newp: *const ::c_void, 1495 newlen: ::size_t, 1496 ) -> ::c_int; sysctlbyname( name: *const ::c_char, oldp: *mut ::c_void, oldlenp: *mut ::size_t, newp: *const ::c_void, newlen: ::size_t, ) -> ::c_int1497 pub fn sysctlbyname( 1498 name: *const ::c_char, 1499 oldp: *mut ::c_void, 1500 oldlenp: *mut ::size_t, 1501 newp: *const ::c_void, 1502 newlen: ::size_t, 1503 ) -> ::c_int; sysctlnametomib( name: *const ::c_char, mibp: *mut ::c_int, sizep: *mut ::size_t, ) -> ::c_int1504 pub fn sysctlnametomib( 1505 name: *const ::c_char, 1506 mibp: *mut ::c_int, 1507 sizep: *mut ::size_t, 1508 ) -> ::c_int; uselocale(loc: ::locale_t) -> ::locale_t1509 pub fn uselocale(loc: ::locale_t) -> ::locale_t; utimensat( dirfd: ::c_int, path: *const ::c_char, times: *const ::timespec, flag: ::c_int, ) -> ::c_int1510 pub fn utimensat( 1511 dirfd: ::c_int, 1512 path: *const ::c_char, 1513 times: *const ::timespec, 1514 flag: ::c_int, 1515 ) -> ::c_int; 1516 ntp_adjtime(buf: *mut timex) -> ::c_int1517 pub fn ntp_adjtime(buf: *mut timex) -> ::c_int; ntp_gettime(buf: *mut ntptimeval) -> ::c_int1518 pub fn ntp_gettime(buf: *mut ntptimeval) -> ::c_int; 1519 } 1520 1521 #[link(name = "util")] 1522 extern "C" { openpty( amaster: *mut ::c_int, aslave: *mut ::c_int, name: *mut ::c_char, termp: *mut termios, winp: *mut ::winsize, ) -> ::c_int1523 pub fn openpty( 1524 amaster: *mut ::c_int, 1525 aslave: *mut ::c_int, 1526 name: *mut ::c_char, 1527 termp: *mut termios, 1528 winp: *mut ::winsize, 1529 ) -> ::c_int; forkpty( amaster: *mut ::c_int, name: *mut ::c_char, termp: *mut termios, winp: *mut ::winsize, ) -> ::pid_t1530 pub fn forkpty( 1531 amaster: *mut ::c_int, 1532 name: *mut ::c_char, 1533 termp: *mut termios, 1534 winp: *mut ::winsize, 1535 ) -> ::pid_t; login_tty(fd: ::c_int) -> ::c_int1536 pub fn login_tty(fd: ::c_int) -> ::c_int; 1537 } 1538 1539 cfg_if! { 1540 if #[cfg(target_os = "freebsd")] { 1541 mod freebsd; 1542 pub use self::freebsd::*; 1543 } else if #[cfg(target_os = "dragonfly")] { 1544 mod dragonfly; 1545 pub use self::dragonfly::*; 1546 } else { 1547 // ... 1548 } 1549 } 1550