Git Product home page Git Product logo

libc's Introduction

libc - Raw FFI bindings to platforms' system libraries

GHA Status Cirrus CI Status Latest Version Documentation License

libc provides all of the definitions necessary to easily interoperate with C code (or "C-like" code) on each of the platforms that Rust supports. This includes type definitions (e.g. c_int), constants (e.g. EINVAL) as well as function headers (e.g. malloc).

This crate exports all underlying platform types, functions, and constants under the crate root, so all items are accessible as libc::foo. The types and values of all the exported APIs match the platform that libc is compiled for.

More detailed information about the design of this library can be found in its associated RFC.

v0.3 Roadmap

The main branch is now for v0.3 which has some breaking changes.

For v0.2, please submit PRs to the libc-0.2 branch instead. We will stop making new v0.2 releases once we release v0.3 on crates.io.

See the tracking issue for details.

Usage

Add the following to your Cargo.toml:

[dependencies]
libc = "0.2"

Features

  • std: by default libc links to the standard library. Disable this feature to remove this dependency and be able to use libc in #![no_std] crates.

  • extra_traits: all structs implemented in libc are Copy and Clone. This feature derives Debug, Eq, Hash, and PartialEq.

  • const-extern-fn: Changes some extern fns into const extern fns. If you use Rust >= 1.62, this feature is implicitly enabled. Otherwise it requires a nightly rustc.

Rust version support

The minimum supported Rust toolchain version is currently Rust 1.71.0 (libc does not currently have any policy regarding changes to the minimum supported Rust version; such policy is a work in progress).

Platform support

You can see the platform(target)-specific docs on docs.rs, select a platform you want to see.

See ci/build.sh for the platforms on which libc is guaranteed to build for each Rust toolchain. The test-matrix at GitHub Actions and Cirrus CI show the platforms in which libc tests are run.

License

This project is licensed under either of

at your option.

Contributing

We welcome all people who want to contribute. Please see the contributing instructions for more information.

Contributions in any form (issues, pull requests, etc.) to this project must adhere to Rust's Code of Conduct.

Unless you explicitly state otherwise, any contribution intentionally submitted for inclusion in libc by you, as defined in the Apache-2.0 license, shall be dual licensed as above, without any additional terms or conditions.

libc's People

Contributors

alexcrichton avatar amanieu avatar asomers avatar bors avatar bossmc avatar cactorium avatar coolreader18 avatar devnexen avatar faern avatar gnzlbg avatar grayjack avatar guillaumegomez avatar jackpot51 avatar jakllsch avatar johntitor avatar joshtriplett avatar kamalmarhubi avatar malbarbo avatar marmistrz avatar mneumann avatar palfrey avatar raphaelcohn avatar rtzoeller avatar semarie avatar skrap avatar stevelauc avatar sunfishcode avatar susurrus avatar thomasdezeeuw avatar valpackett avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

libc's Issues

Adding in a lot of *nix ioctl constants

I've started working on including all the constants in the ioctl.h and related headers (see https://github.com/derekdreery/libc), I've spent quite a long time on it, so before I do any more I'd like to make sure I'm doing something useful. Currently the library is not building because I'm using size_of in a constant context (shouldn't the size of all types be available at compile-time?). I need to calculate the size of the structs by hand and include that in.

There are some issues (all request codes should be c_ulong looking at the sys/ioctl.h definition of ioctl). I'll work on fixing these if the code will be useful.

Thanks

Linking fails on 64-bit Windows using 32-bit Rust

I'm on 64-bit Windows, but using 32-bit Rust nightly (rustc 1.1.0-nightly (0d7d3ec9d 2015-05-02) (built 2015-05-03)), because I need a 32-bit target binary.

Trying to compile a library [*] that references libc (via Cargo depency) gives the following linking error:

error: linking with `gcc` failed: exit code: 1
note: "gcc" "-Wl,--enable-long-section-names" "-fno-use-linker-plugin" "-Wl,--nx
compat" "-Wl,--large-address-aware" "-shared-libgcc" "-L" "C:\Program Files (x86
)\Rust nightly 1.1\bin\rustlib\i686-pc-windows-gnu\lib" "-o" "C:\Users\Patrick\D
ocuments\Rust\testlibc\target\debug\testlibc-c7065bc1f5bc856b.exe" "C:\Users\Pat
rick\Documents\Rust\testlibc\target\debug\testlibc-c7065bc1f5bc856b.o" "-Wl,--gc
-sections" "C:\Program Files (x86)\Rust nightly 1.1\bin\rustlib\i686-pc-windows-
gnu\lib\libtest-4e7c5e5c.rlib" "C:\Program Files (x86)\Rust nightly 1.1\bin\rust
lib\i686-pc-windows-gnu\lib\libserialize-4e7c5e5c.rlib" "C:\Program Files (x86)\
Rust nightly 1.1\bin\rustlib\i686-pc-windows-gnu\lib\libterm-4e7c5e5c.rlib" "C:\
Program Files (x86)\Rust nightly 1.1\bin\rustlib\i686-pc-windows-gnu\lib\liblog-
4e7c5e5c.rlib" "C:\Program Files (x86)\Rust nightly 1.1\bin\rustlib\i686-pc-wind
ows-gnu\lib\libgetopts-4e7c5e5c.rlib" "C:\Program Files (x86)\Rust nightly 1.1\b
in\rustlib\i686-pc-windows-gnu\lib\libstd-4e7c5e5c.rlib" "C:\Program Files (x86)
\Rust nightly 1.1\bin\rustlib\i686-pc-windows-gnu\lib\libcollections-4e7c5e5c.rl
ib" "C:\Program Files (x86)\Rust nightly 1.1\bin\rustlib\i686-pc-windows-gnu\lib
\librustc_unicode-4e7c5e5c.rlib" "C:\Program Files (x86)\Rust nightly 1.1\bin\ru
stlib\i686-pc-windows-gnu\lib\librand-4e7c5e5c.rlib" "C:\Program Files (x86)\Rus
t nightly 1.1\bin\rustlib\i686-pc-windows-gnu\lib\liballoc-4e7c5e5c.rlib" "C:\Pr
ogram Files (x86)\Rust nightly 1.1\bin\rustlib\i686-pc-windows-gnu\lib\liblibc-4
e7c5e5c.rlib" "C:\Program Files (x86)\Rust nightly 1.1\bin\rustlib\i686-pc-windo
ws-gnu\lib\libcore-4e7c5e5c.rlib" "-L" "C:\Users\Patrick\Documents\Rust\testlibc
\target\debug" "-L" "C:\Users\Patrick\Documents\Rust\testlibc\target\debug\deps"
 "-L" "\\?\C:\Program Files (x86)\Rust nightly 1.1\bin\rustlib\i686-pc-windows-g
nu\lib" "-L" "C:\Users\Patrick\Documents\Rust\testlibc\.rust\bin\i686-pc-windows
-gnu" "-L" "C:\Users\Patrick\Documents\Rust\testlibc\bin\i686-pc-windows-gnu" "-
Wl,--whole-archive" "-Wl,-Bstatic" "-Wl,--no-whole-archive" "-Wl,-Bdynamic" "-lk
ernel32" "-lws2_32" "-luserenv" "-lcompiler-rt"
note: ld: cannot find crt2.o: No such file or directory
ld: cannot find crtbegin.o: No such file or directory
ld: cannot find crtend.o: No such file or directory

It seems to reference the correct files in C:\Program Files (x86)\Rust nightly 1.1\bin\rustlib\i686-pc-windows-gnu\lib\, and I verified that crt2.o etc are in there.

Also, I have 64-bit Rust installed in parallel (in C:\Program Files\Rust nightly 1.1), might that be the reason?

[*] I could reduce it to an empty library, though the error originally occured when I tried to use user32-sys from https://github.com/retep998/winapi-rs

I need wait and waitpid in posix88::unistd

Just wondering if you can update this lib to rust @ commit a5cac55be451a32a5956339009c49ac4fcaaef5c, this introduces definitions for wait() and waitpid() into libstd::funcs::posix88::unistd that I need for a project I am working on.

Thanks.

include printf

Is there a reason that printf is not exposed in the crate? It can be used anyway at least on some platforms.

macosx libc::sysconf(84) as usize // result 18446744073709551615

|- 1-|
|- 2-| extern crate libc;
|- 3-| fn get_num_cpus() -> usize {
|- 4-| unsafe {
|- 5-| libc::sysconf(84) as usize
|- 6-| }
|- 7-| }
|- 8-|
|- 9-| fn main() {
|-10-| println!("{}", get_num_cpus());//18446744073709551615
|-11-| }

Darwin matoMacBook-Pro.local 13.3.0 Darwin Kernel Version 13.3.0: Tue Jun 3 21:27:35 PDT 2014; root:xnu-2422.110.17~1/RELEASE_X86_64 x86_64

eventfd() unsigned int

In Linux note 'man 2 eventfd'.
int eventfd(unsigned int initval, int flags);

You'll see this is incorrectly defined here:
src/unix/notbsd/linux/other/mod.rs

(the bug is that c_int should be c_uint)

c_int instead of c_uint for CLONE_*

These are the correct definitions:

pub const CLONE_NEWUTS: ::c_int = 0x04000000;
pub const CLONE_NEWIPC: ::c_int = 0x08000000;
pub const CLONE_NEWUSER: ::c_int = 0x10000000;
pub const CLONE_NEWPID: ::c_int = 0x20000000;
pub const CLONE_NEWNET: ::c_int = 0x40000000;
pub const CLONE_IO: ::c_int = 0x80000000;

These are #define in vi /usr/include/linux/sched.h

They must be c_int because:

  • int unshare(int flags);
  • int clone(int (*fn)(void *), void *child_stack, int flags, ...

posix_fadvise() and POSIX_FADV_*

I'm working on an application which will be reading many small files, but only once each. I'd like to be able to use posix_fadvise(fd, 0, 0, POSIX_FADV_WILLNEED) to tell the kernel to asynchronously prefetch the file so when it comes time to access it, it will already have been pulled into the page cache in its entirety (less than 1MB on average) and can be read with minimal blocking.

I was going to implement this myself and issue a PR, but I noticed the semantically similar posix_madvise() has its constants (POSIX_MADV_*) duplicated across the Linux and various BSD/misc *nix modules and I'm not sure why because they have the same values AFAICT.

Add BSD CI

I'd love to add CI for BSD variants like FreeBSD, Bitrig, OpenBSD, DragonFlyBSD, etc, but currently I don't know how to run binaries targeting these platforms.

Here's a tracking issue trying to figure this out!

cc @dhuseby, @semarie

0.2.3 isn't building on FreeBSD

0.2.2 builds just fine.

System Info (uname):
FreeBSD 10.2-RELEASE FreeBSD 10.2-RELEASE #0 r286666: Wed Aug 12 15:26:37 UTC 2015 [email protected]:/usr/obj/usr/src/sys/GENERIC amd64 amd64 GENERIC 1002000 1002000

   Compiling libc v0.2.3 (file:///root/libc)
     Running `rustc src/lib.rs --crate-name libc --crate-type lib -g --cfg feature=\"default\" --out-dir /root/libc/target/debug --emit=dep-info,link -L dependency=/root/libc/target/debug -L dependency=/root/libc/target/debug/deps`
src/unix/mod.rs:653:40: 653:49 error: use of undeclared type name `termios` [E0412]
src/unix/mod.rs:653     pub fn cfgetispeed(termios: *const ::termios) -> ::speed_t;
                                                           ^~~~~~~~~
src/macros.rs:26:9: 26:75 note: in this expansion of __cfg_if_apply! (defined in src/macros.rs)
src/macros.rs:27:9: 27:60 note: in this expansion of __cfg_if_items! (defined in src/macros.rs)
src/macros.rs:15:9: 19:10 note: in this expansion of __cfg_if_items! (defined in src/macros.rs)
src/lib.rs:239:1: 247:2 note: in this expansion of cfg_if! (defined in src/macros.rs)
src/unix/mod.rs:653:40: 653:49 help: run `rustc --explain E0412` to see a detailed explanation
src/unix/mod.rs:653:54: 653:63 error: use of undeclared type name `speed_t` [E0412]
src/unix/mod.rs:653     pub fn cfgetispeed(termios: *const ::termios) -> ::speed_t;
                                                                         ^~~~~~~~~
src/macros.rs:26:9: 26:75 note: in this expansion of __cfg_if_apply! (defined in src/macros.rs)
src/macros.rs:27:9: 27:60 note: in this expansion of __cfg_if_items! (defined in src/macros.rs)
src/macros.rs:15:9: 19:10 note: in this expansion of __cfg_if_items! (defined in src/macros.rs)
src/lib.rs:239:1: 247:2 note: in this expansion of cfg_if! (defined in src/macros.rs)
src/unix/mod.rs:653:54: 653:63 help: run `rustc --explain E0412` to see a detailed explanation
src/unix/mod.rs:654:40: 654:49 error: use of undeclared type name `termios` [E0412]
src/unix/mod.rs:654     pub fn cfgetospeed(termios: *const ::termios) -> ::speed_t;
                                                           ^~~~~~~~~
src/macros.rs:26:9: 26:75 note: in this expansion of __cfg_if_apply! (defined in src/macros.rs)
src/macros.rs:27:9: 27:60 note: in this expansion of __cfg_if_items! (defined in src/macros.rs)
src/macros.rs:15:9: 19:10 note: in this expansion of __cfg_if_items! (defined in src/macros.rs)
src/lib.rs:239:1: 247:2 note: in this expansion of cfg_if! (defined in src/macros.rs)
src/unix/mod.rs:654:40: 654:49 help: run `rustc --explain E0412` to see a detailed explanation
src/unix/mod.rs:654:54: 654:63 error: use of undeclared type name `speed_t` [E0412]
src/unix/mod.rs:654     pub fn cfgetospeed(termios: *const ::termios) -> ::speed_t;
                                                                         ^~~~~~~~~
src/macros.rs:26:9: 26:75 note: in this expansion of __cfg_if_apply! (defined in src/macros.rs)
src/macros.rs:27:9: 27:60 note: in this expansion of __cfg_if_items! (defined in src/macros.rs)
src/macros.rs:15:9: 19:10 note: in this expansion of __cfg_if_items! (defined in src/macros.rs)
src/lib.rs:239:1: 247:2 note: in this expansion of cfg_if! (defined in src/macros.rs)
src/unix/mod.rs:654:54: 654:63 help: run `rustc --explain E0412` to see a detailed explanation
src/unix/mod.rs:655:38: 655:47 error: use of undeclared type name `termios` [E0412]
src/unix/mod.rs:655     pub fn cfsetispeed(termios: *mut ::termios, speed: ::speed_t) -> ::c_int;
                                                         ^~~~~~~~~
src/macros.rs:26:9: 26:75 note: in this expansion of __cfg_if_apply! (defined in src/macros.rs)
src/macros.rs:27:9: 27:60 note: in this expansion of __cfg_if_items! (defined in src/macros.rs)
src/macros.rs:15:9: 19:10 note: in this expansion of __cfg_if_items! (defined in src/macros.rs)
src/lib.rs:239:1: 247:2 note: in this expansion of cfg_if! (defined in src/macros.rs)
src/unix/mod.rs:655:38: 655:47 help: run `rustc --explain E0412` to see a detailed explanation
src/unix/mod.rs:655:56: 655:65 error: use of undeclared type name `speed_t` [E0412]
src/unix/mod.rs:655     pub fn cfsetispeed(termios: *mut ::termios, speed: ::speed_t) -> ::c_int;
                                                                           ^~~~~~~~~
src/macros.rs:26:9: 26:75 note: in this expansion of __cfg_if_apply! (defined in src/macros.rs)
src/macros.rs:27:9: 27:60 note: in this expansion of __cfg_if_items! (defined in src/macros.rs)
src/macros.rs:15:9: 19:10 note: in this expansion of __cfg_if_items! (defined in src/macros.rs)
src/lib.rs:239:1: 247:2 note: in this expansion of cfg_if! (defined in src/macros.rs)
src/unix/mod.rs:655:56: 655:65 help: run `rustc --explain E0412` to see a detailed explanation
src/unix/mod.rs:656:38: 656:47 error: use of undeclared type name `termios` [E0412]
src/unix/mod.rs:656     pub fn cfsetospeed(termios: *mut ::termios, speed: ::speed_t) -> ::c_int;
                                                         ^~~~~~~~~
src/macros.rs:26:9: 26:75 note: in this expansion of __cfg_if_apply! (defined in src/macros.rs)
src/macros.rs:27:9: 27:60 note: in this expansion of __cfg_if_items! (defined in src/macros.rs)
src/macros.rs:15:9: 19:10 note: in this expansion of __cfg_if_items! (defined in src/macros.rs)
src/lib.rs:239:1: 247:2 note: in this expansion of cfg_if! (defined in src/macros.rs)
src/unix/mod.rs:656:38: 656:47 help: run `rustc --explain E0412` to see a detailed explanation
src/unix/mod.rs:656:56: 656:65 error: use of undeclared type name `speed_t` [E0412]
src/unix/mod.rs:656     pub fn cfsetospeed(termios: *mut ::termios, speed: ::speed_t) -> ::c_int;
                                                                           ^~~~~~~~~
src/macros.rs:26:9: 26:75 note: in this expansion of __cfg_if_apply! (defined in src/macros.rs)
src/macros.rs:27:9: 27:60 note: in this expansion of __cfg_if_items! (defined in src/macros.rs)
src/macros.rs:15:9: 19:10 note: in this expansion of __cfg_if_items! (defined in src/macros.rs)
src/lib.rs:239:1: 247:2 note: in this expansion of cfg_if! (defined in src/macros.rs)
src/unix/mod.rs:656:56: 656:65 help: run `rustc --explain E0412` to see a detailed explanation
src/unix/mod.rs:657:49: 657:58 error: use of undeclared type name `termios` [E0412]
src/unix/mod.rs:657     pub fn tcgetattr(fd: ::c_int, termios: *mut ::termios) -> ::c_int;
                                                                    ^~~~~~~~~
src/macros.rs:26:9: 26:75 note: in this expansion of __cfg_if_apply! (defined in src/macros.rs)
src/macros.rs:27:9: 27:60 note: in this expansion of __cfg_if_items! (defined in src/macros.rs)
src/macros.rs:15:9: 19:10 note: in this expansion of __cfg_if_items! (defined in src/macros.rs)
src/lib.rs:239:1: 247:2 note: in this expansion of cfg_if! (defined in src/macros.rs)
src/unix/mod.rs:657:49: 657:58 help: run `rustc --explain E0412` to see a detailed explanation
src/unix/mod.rs:660:38: 660:47 error: use of undeclared type name `termios` [E0412]
src/unix/mod.rs:660                      termios: *const ::termios) -> ::c_int;
                                                         ^~~~~~~~~
src/macros.rs:26:9: 26:75 note: in this expansion of __cfg_if_apply! (defined in src/macros.rs)
src/macros.rs:27:9: 27:60 note: in this expansion of __cfg_if_items! (defined in src/macros.rs)
src/macros.rs:15:9: 19:10 note: in this expansion of __cfg_if_items! (defined in src/macros.rs)
src/lib.rs:239:1: 247:2 note: in this expansion of cfg_if! (defined in src/macros.rs)
src/unix/mod.rs:660:38: 660:47 help: run `rustc --explain E0412` to see a detailed explanation
src/unix/bsd/mod.rs:241:19: 241:29 error: use of undeclared type name `tcflag_t` [E0412]
src/unix/bsd/mod.rs:241 pub const IGNBRK: ::tcflag_t = 0x00000001;
                                          ^~~~~~~~~~
src/macros.rs:26:9: 26:75 note: in this expansion of __cfg_if_apply! (defined in src/macros.rs)
src/macros.rs:27:9: 27:60 note: in this expansion of __cfg_if_items! (defined in src/macros.rs)
src/macros.rs:15:9: 19:10 note: in this expansion of __cfg_if_items! (defined in src/macros.rs)
src/unix/mod.rs:666:1: 682:2 note: in this expansion of cfg_if! (defined in src/macros.rs)
src/macros.rs:26:9: 26:75 note: in this expansion of __cfg_if_apply! (defined in src/macros.rs)
src/macros.rs:27:9: 27:60 note: in this expansion of __cfg_if_items! (defined in src/macros.rs)
src/macros.rs:15:9: 19:10 note: in this expansion of __cfg_if_items! (defined in src/macros.rs)
src/lib.rs:239:1: 247:2 note: in this expansion of cfg_if! (defined in src/macros.rs)
src/unix/bsd/mod.rs:241:19: 241:29 help: run `rustc --explain E0412` to see a detailed explanation
src/unix/bsd/mod.rs:242:19: 242:29 error: use of undeclared type name `tcflag_t` [E0412]
src/unix/bsd/mod.rs:242 pub const BRKINT: ::tcflag_t = 0x00000002;
                                          ^~~~~~~~~~
src/macros.rs:26:9: 26:75 note: in this expansion of __cfg_if_apply! (defined in src/macros.rs)
src/macros.rs:27:9: 27:60 note: in this expansion of __cfg_if_items! (defined in src/macros.rs)
src/macros.rs:15:9: 19:10 note: in this expansion of __cfg_if_items! (defined in src/macros.rs)
src/unix/mod.rs:666:1: 682:2 note: in this expansion of cfg_if! (defined in src/macros.rs)
src/macros.rs:26:9: 26:75 note: in this expansion of __cfg_if_apply! (defined in src/macros.rs)
src/macros.rs:27:9: 27:60 note: in this expansion of __cfg_if_items! (defined in src/macros.rs)
src/macros.rs:15:9: 19:10 note: in this expansion of __cfg_if_items! (defined in src/macros.rs)
src/lib.rs:239:1: 247:2 note: in this expansion of cfg_if! (defined in src/macros.rs)
src/unix/bsd/mod.rs:242:19: 242:29 help: run `rustc --explain E0412` to see a detailed explanation
src/unix/bsd/mod.rs:243:19: 243:29 error: use of undeclared type name `tcflag_t` [E0412]
src/unix/bsd/mod.rs:243 pub const IGNPAR: ::tcflag_t = 0x00000004;
                                          ^~~~~~~~~~
src/macros.rs:26:9: 26:75 note: in this expansion of __cfg_if_apply! (defined in src/macros.rs)
src/macros.rs:27:9: 27:60 note: in this expansion of __cfg_if_items! (defined in src/macros.rs)
src/macros.rs:15:9: 19:10 note: in this expansion of __cfg_if_items! (defined in src/macros.rs)
src/unix/mod.rs:666:1: 682:2 note: in this expansion of cfg_if! (defined in src/macros.rs)
src/macros.rs:26:9: 26:75 note: in this expansion of __cfg_if_apply! (defined in src/macros.rs)
src/macros.rs:27:9: 27:60 note: in this expansion of __cfg_if_items! (defined in src/macros.rs)
src/macros.rs:15:9: 19:10 note: in this expansion of __cfg_if_items! (defined in src/macros.rs)
src/lib.rs:239:1: 247:2 note: in this expansion of cfg_if! (defined in src/macros.rs)
src/unix/bsd/mod.rs:243:19: 243:29 help: run `rustc --explain E0412` to see a detailed explanation
src/unix/bsd/mod.rs:244:19: 244:29 error: use of undeclared type name `tcflag_t` [E0412]
src/unix/bsd/mod.rs:244 pub const PARMRK: ::tcflag_t = 0x00000008;
                                          ^~~~~~~~~~
src/macros.rs:26:9: 26:75 note: in this expansion of __cfg_if_apply! (defined in src/macros.rs)
src/macros.rs:27:9: 27:60 note: in this expansion of __cfg_if_items! (defined in src/macros.rs)
src/macros.rs:15:9: 19:10 note: in this expansion of __cfg_if_items! (defined in src/macros.rs)
src/unix/mod.rs:666:1: 682:2 note: in this expansion of cfg_if! (defined in src/macros.rs)
src/macros.rs:26:9: 26:75 note: in this expansion of __cfg_if_apply! (defined in src/macros.rs)
src/macros.rs:27:9: 27:60 note: in this expansion of __cfg_if_items! (defined in src/macros.rs)
src/macros.rs:15:9: 19:10 note: in this expansion of __cfg_if_items! (defined in src/macros.rs)
src/lib.rs:239:1: 247:2 note: in this expansion of cfg_if! (defined in src/macros.rs)
src/unix/bsd/mod.rs:244:19: 244:29 help: run `rustc --explain E0412` to see a detailed explanation
src/unix/bsd/mod.rs:245:18: 245:28 error: use of undeclared type name `tcflag_t` [E0412]
src/unix/bsd/mod.rs:245 pub const INPCK: ::tcflag_t = 0x00000010;
                                         ^~~~~~~~~~
src/macros.rs:26:9: 26:75 note: in this expansion of __cfg_if_apply! (defined in src/macros.rs)
src/macros.rs:27:9: 27:60 note: in this expansion of __cfg_if_items! (defined in src/macros.rs)
src/macros.rs:15:9: 19:10 note: in this expansion of __cfg_if_items! (defined in src/macros.rs)
src/unix/mod.rs:666:1: 682:2 note: in this expansion of cfg_if! (defined in src/macros.rs)
src/macros.rs:26:9: 26:75 note: in this expansion of __cfg_if_apply! (defined in src/macros.rs)
src/macros.rs:27:9: 27:60 note: in this expansion of __cfg_if_items! (defined in src/macros.rs)
src/macros.rs:15:9: 19:10 note: in this expansion of __cfg_if_items! (defined in src/macros.rs)
src/lib.rs:239:1: 247:2 note: in this expansion of cfg_if! (defined in src/macros.rs)
src/unix/bsd/mod.rs:245:18: 245:28 help: run `rustc --explain E0412` to see a detailed explanation
src/unix/bsd/mod.rs:246:19: 246:29 error: use of undeclared type name `tcflag_t` [E0412]
src/unix/bsd/mod.rs:246 pub const ISTRIP: ::tcflag_t = 0x00000020;
                                          ^~~~~~~~~~
src/macros.rs:26:9: 26:75 note: in this expansion of __cfg_if_apply! (defined in src/macros.rs)
src/macros.rs:27:9: 27:60 note: in this expansion of __cfg_if_items! (defined in src/macros.rs)
src/macros.rs:15:9: 19:10 note: in this expansion of __cfg_if_items! (defined in src/macros.rs)
src/unix/mod.rs:666:1: 682:2 note: in this expansion of cfg_if! (defined in src/macros.rs)
src/macros.rs:26:9: 26:75 note: in this expansion of __cfg_if_apply! (defined in src/macros.rs)
src/macros.rs:27:9: 27:60 note: in this expansion of __cfg_if_items! (defined in src/macros.rs)
src/macros.rs:15:9: 19:10 note: in this expansion of __cfg_if_items! (defined in src/macros.rs)
src/lib.rs:239:1: 247:2 note: in this expansion of cfg_if! (defined in src/macros.rs)
src/unix/bsd/mod.rs:246:19: 246:29 help: run `rustc --explain E0412` to see a detailed explanation
src/unix/bsd/mod.rs:247:18: 247:28 error: use of undeclared type name `tcflag_t` [E0412]
src/unix/bsd/mod.rs:247 pub const INLCR: ::tcflag_t = 0x00000040;
                                         ^~~~~~~~~~
src/macros.rs:26:9: 26:75 note: in this expansion of __cfg_if_apply! (defined in src/macros.rs)
src/macros.rs:27:9: 27:60 note: in this expansion of __cfg_if_items! (defined in src/macros.rs)
src/macros.rs:15:9: 19:10 note: in this expansion of __cfg_if_items! (defined in src/macros.rs)
src/unix/mod.rs:666:1: 682:2 note: in this expansion of cfg_if! (defined in src/macros.rs)
src/macros.rs:26:9: 26:75 note: in this expansion of __cfg_if_apply! (defined in src/macros.rs)
src/macros.rs:27:9: 27:60 note: in this expansion of __cfg_if_items! (defined in src/macros.rs)
src/macros.rs:15:9: 19:10 note: in this expansion of __cfg_if_items! (defined in src/macros.rs)
src/lib.rs:239:1: 247:2 note: in this expansion of cfg_if! (defined in src/macros.rs)
src/unix/bsd/mod.rs:247:18: 247:28 help: run `rustc --explain E0412` to see a detailed explanation
src/unix/bsd/mod.rs:248:18: 248:28 error: use of undeclared type name `tcflag_t` [E0412]
src/unix/bsd/mod.rs:248 pub const IGNCR: ::tcflag_t = 0x00000080;
                                         ^~~~~~~~~~
src/macros.rs:26:9: 26:75 note: in this expansion of __cfg_if_apply! (defined in src/macros.rs)
src/macros.rs:27:9: 27:60 note: in this expansion of __cfg_if_items! (defined in src/macros.rs)
src/macros.rs:15:9: 19:10 note: in this expansion of __cfg_if_items! (defined in src/macros.rs)
src/unix/mod.rs:666:1: 682:2 note: in this expansion of cfg_if! (defined in src/macros.rs)
src/macros.rs:26:9: 26:75 note: in this expansion of __cfg_if_apply! (defined in src/macros.rs)
src/macros.rs:27:9: 27:60 note: in this expansion of __cfg_if_items! (defined in src/macros.rs)
src/macros.rs:15:9: 19:10 note: in this expansion of __cfg_if_items! (defined in src/macros.rs)
src/lib.rs:239:1: 247:2 note: in this expansion of cfg_if! (defined in src/macros.rs)
src/unix/bsd/mod.rs:248:18: 248:28 help: run `rustc --explain E0412` to see a detailed explanation
src/unix/bsd/mod.rs:249:18: 249:28 error: use of undeclared type name `tcflag_t` [E0412]
src/unix/bsd/mod.rs:249 pub const ICRNL: ::tcflag_t = 0x00000100;
                                         ^~~~~~~~~~
src/macros.rs:26:9: 26:75 note: in this expansion of __cfg_if_apply! (defined in src/macros.rs)
src/macros.rs:27:9: 27:60 note: in this expansion of __cfg_if_items! (defined in src/macros.rs)
src/macros.rs:15:9: 19:10 note: in this expansion of __cfg_if_items! (defined in src/macros.rs)
src/unix/mod.rs:666:1: 682:2 note: in this expansion of cfg_if! (defined in src/macros.rs)
src/macros.rs:26:9: 26:75 note: in this expansion of __cfg_if_apply! (defined in src/macros.rs)
src/macros.rs:27:9: 27:60 note: in this expansion of __cfg_if_items! (defined in src/macros.rs)
src/macros.rs:15:9: 19:10 note: in this expansion of __cfg_if_items! (defined in src/macros.rs)
src/lib.rs:239:1: 247:2 note: in this expansion of cfg_if! (defined in src/macros.rs)
src/unix/bsd/mod.rs:249:18: 249:28 help: run `rustc --explain E0412` to see a detailed explanation
src/unix/bsd/mod.rs:250:17: 250:27 error: use of undeclared type name `tcflag_t` [E0412]
src/unix/bsd/mod.rs:250 pub const IXON: ::tcflag_t = 0x00000200;
                                        ^~~~~~~~~~
src/macros.rs:26:9: 26:75 note: in this expansion of __cfg_if_apply! (defined in src/macros.rs)
src/macros.rs:27:9: 27:60 note: in this expansion of __cfg_if_items! (defined in src/macros.rs)
src/macros.rs:15:9: 19:10 note: in this expansion of __cfg_if_items! (defined in src/macros.rs)
src/unix/mod.rs:666:1: 682:2 note: in this expansion of cfg_if! (defined in src/macros.rs)
src/macros.rs:26:9: 26:75 note: in this expansion of __cfg_if_apply! (defined in src/macros.rs)
src/macros.rs:27:9: 27:60 note: in this expansion of __cfg_if_items! (defined in src/macros.rs)
src/macros.rs:15:9: 19:10 note: in this expansion of __cfg_if_items! (defined in src/macros.rs)
src/lib.rs:239:1: 247:2 note: in this expansion of cfg_if! (defined in src/macros.rs)
src/unix/bsd/mod.rs:250:17: 250:27 help: run `rustc --explain E0412` to see a detailed explanation
src/unix/bsd/mod.rs:251:18: 251:28 error: use of undeclared type name `tcflag_t` [E0412]
src/unix/bsd/mod.rs:251 pub const IXOFF: ::tcflag_t = 0x00000400;
                                         ^~~~~~~~~~
src/macros.rs:26:9: 26:75 note: in this expansion of __cfg_if_apply! (defined in src/macros.rs)
src/macros.rs:27:9: 27:60 note: in this expansion of __cfg_if_items! (defined in src/macros.rs)
src/macros.rs:15:9: 19:10 note: in this expansion of __cfg_if_items! (defined in src/macros.rs)
src/unix/mod.rs:666:1: 682:2 note: in this expansion of cfg_if! (defined in src/macros.rs)
src/macros.rs:26:9: 26:75 note: in this expansion of __cfg_if_apply! (defined in src/macros.rs)
src/macros.rs:27:9: 27:60 note: in this expansion of __cfg_if_items! (defined in src/macros.rs)
src/macros.rs:15:9: 19:10 note: in this expansion of __cfg_if_items! (defined in src/macros.rs)
src/lib.rs:239:1: 247:2 note: in this expansion of cfg_if! (defined in src/macros.rs)
src/unix/bsd/mod.rs:251:18: 251:28 help: run `rustc --explain E0412` to see a detailed explanation
src/unix/bsd/mod.rs:252:18: 252:28 error: use of undeclared type name `tcflag_t` [E0412]
src/unix/bsd/mod.rs:252 pub const IXANY: ::tcflag_t = 0x00000800;
                                         ^~~~~~~~~~
src/macros.rs:26:9: 26:75 note: in this expansion of __cfg_if_apply! (defined in src/macros.rs)
src/macros.rs:27:9: 27:60 note: in this expansion of __cfg_if_items! (defined in src/macros.rs)
src/macros.rs:15:9: 19:10 note: in this expansion of __cfg_if_items! (defined in src/macros.rs)
src/unix/mod.rs:666:1: 682:2 note: in this expansion of cfg_if! (defined in src/macros.rs)
src/macros.rs:26:9: 26:75 note: in this expansion of __cfg_if_apply! (defined in src/macros.rs)
src/macros.rs:27:9: 27:60 note: in this expansion of __cfg_if_items! (defined in src/macros.rs)
src/macros.rs:15:9: 19:10 note: in this expansion of __cfg_if_items! (defined in src/macros.rs)
src/lib.rs:239:1: 247:2 note: in this expansion of cfg_if! (defined in src/macros.rs)
src/unix/bsd/mod.rs:252:18: 252:28 help: run `rustc --explain E0412` to see a detailed explanation
src/unix/bsd/mod.rs:253:20: 253:30 error: use of undeclared type name `tcflag_t` [E0412]
src/unix/bsd/mod.rs:253 pub const IMAXBEL: ::tcflag_t = 0x00002000;
                                           ^~~~~~~~~~
src/macros.rs:26:9: 26:75 note: in this expansion of __cfg_if_apply! (defined in src/macros.rs)
src/macros.rs:27:9: 27:60 note: in this expansion of __cfg_if_items! (defined in src/macros.rs)
src/macros.rs:15:9: 19:10 note: in this expansion of __cfg_if_items! (defined in src/macros.rs)
src/unix/mod.rs:666:1: 682:2 note: in this expansion of cfg_if! (defined in src/macros.rs)
src/macros.rs:26:9: 26:75 note: in this expansion of __cfg_if_apply! (defined in src/macros.rs)
src/macros.rs:27:9: 27:60 note: in this expansion of __cfg_if_items! (defined in src/macros.rs)
src/macros.rs:15:9: 19:10 note: in this expansion of __cfg_if_items! (defined in src/macros.rs)
src/lib.rs:239:1: 247:2 note: in this expansion of cfg_if! (defined in src/macros.rs)
src/unix/bsd/mod.rs:253:20: 253:30 help: run `rustc --explain E0412` to see a detailed explanation
src/unix/bsd/mod.rs:254:18: 254:28 error: use of undeclared type name `tcflag_t` [E0412]
src/unix/bsd/mod.rs:254 pub const OPOST: ::tcflag_t = 0x1;
                                         ^~~~~~~~~~
src/macros.rs:26:9: 26:75 note: in this expansion of __cfg_if_apply! (defined in src/macros.rs)
src/macros.rs:27:9: 27:60 note: in this expansion of __cfg_if_items! (defined in src/macros.rs)
src/macros.rs:15:9: 19:10 note: in this expansion of __cfg_if_items! (defined in src/macros.rs)
src/unix/mod.rs:666:1: 682:2 note: in this expansion of cfg_if! (defined in src/macros.rs)
src/macros.rs:26:9: 26:75 note: in this expansion of __cfg_if_apply! (defined in src/macros.rs)
src/macros.rs:27:9: 27:60 note: in this expansion of __cfg_if_items! (defined in src/macros.rs)
src/macros.rs:15:9: 19:10 note: in this expansion of __cfg_if_items! (defined in src/macros.rs)
src/lib.rs:239:1: 247:2 note: in this expansion of cfg_if! (defined in src/macros.rs)
src/unix/bsd/mod.rs:254:18: 254:28 help: run `rustc --explain E0412` to see a detailed explanation
src/unix/bsd/mod.rs:255:18: 255:28 error: use of undeclared type name `tcflag_t` [E0412]
src/unix/bsd/mod.rs:255 pub const ONLCR: ::tcflag_t = 0x2;
                                         ^~~~~~~~~~
src/macros.rs:26:9: 26:75 note: in this expansion of __cfg_if_apply! (defined in src/macros.rs)
src/macros.rs:27:9: 27:60 note: in this expansion of __cfg_if_items! (defined in src/macros.rs)
src/macros.rs:15:9: 19:10 note: in this expansion of __cfg_if_items! (defined in src/macros.rs)
src/unix/mod.rs:666:1: 682:2 note: in this expansion of cfg_if! (defined in src/macros.rs)
src/macros.rs:26:9: 26:75 note: in this expansion of __cfg_if_apply! (defined in src/macros.rs)
src/macros.rs:27:9: 27:60 note: in this expansion of __cfg_if_items! (defined in src/macros.rs)
src/macros.rs:15:9: 19:10 note: in this expansion of __cfg_if_items! (defined in src/macros.rs)
src/lib.rs:239:1: 247:2 note: in this expansion of cfg_if! (defined in src/macros.rs)
src/unix/bsd/mod.rs:255:18: 255:28 help: run `rustc --explain E0412` to see a detailed explanation
src/unix/bsd/mod.rs:256:18: 256:28 error: use of undeclared type name `tcflag_t` [E0412]
src/unix/bsd/mod.rs:256 pub const CSIZE: ::tcflag_t = 0x00000300;
                                         ^~~~~~~~~~
src/macros.rs:26:9: 26:75 note: in this expansion of __cfg_if_apply! (defined in src/macros.rs)
src/macros.rs:27:9: 27:60 note: in this expansion of __cfg_if_items! (defined in src/macros.rs)
src/macros.rs:15:9: 19:10 note: in this expansion of __cfg_if_items! (defined in src/macros.rs)
src/unix/mod.rs:666:1: 682:2 note: in this expansion of cfg_if! (defined in src/macros.rs)
src/macros.rs:26:9: 26:75 note: in this expansion of __cfg_if_apply! (defined in src/macros.rs)
src/macros.rs:27:9: 27:60 note: in this expansion of __cfg_if_items! (defined in src/macros.rs)
src/macros.rs:15:9: 19:10 note: in this expansion of __cfg_if_items! (defined in src/macros.rs)
src/lib.rs:239:1: 247:2 note: in this expansion of cfg_if! (defined in src/macros.rs)
src/unix/bsd/mod.rs:256:18: 256:28 help: run `rustc --explain E0412` to see a detailed explanation
src/unix/bsd/mod.rs:257:16: 257:26 error: use of undeclared type name `tcflag_t` [E0412]
src/unix/bsd/mod.rs:257 pub const CS5: ::tcflag_t = 0x00000000;
                                       ^~~~~~~~~~
src/macros.rs:26:9: 26:75 note: in this expansion of __cfg_if_apply! (defined in src/macros.rs)
src/macros.rs:27:9: 27:60 note: in this expansion of __cfg_if_items! (defined in src/macros.rs)
src/macros.rs:15:9: 19:10 note: in this expansion of __cfg_if_items! (defined in src/macros.rs)
src/unix/mod.rs:666:1: 682:2 note: in this expansion of cfg_if! (defined in src/macros.rs)
src/macros.rs:26:9: 26:75 note: in this expansion of __cfg_if_apply! (defined in src/macros.rs)
src/macros.rs:27:9: 27:60 note: in this expansion of __cfg_if_items! (defined in src/macros.rs)
src/macros.rs:15:9: 19:10 note: in this expansion of __cfg_if_items! (defined in src/macros.rs)
src/lib.rs:239:1: 247:2 note: in this expansion of cfg_if! (defined in src/macros.rs)
src/unix/bsd/mod.rs:257:16: 257:26 help: run `rustc --explain E0412` to see a detailed explanation
src/unix/bsd/mod.rs:258:16: 258:26 error: use of undeclared type name `tcflag_t` [E0412]
src/unix/bsd/mod.rs:258 pub const CS6: ::tcflag_t = 0x00000100;
                                       ^~~~~~~~~~
src/macros.rs:26:9: 26:75 note: in this expansion of __cfg_if_apply! (defined in src/macros.rs)
src/macros.rs:27:9: 27:60 note: in this expansion of __cfg_if_items! (defined in src/macros.rs)
src/macros.rs:15:9: 19:10 note: in this expansion of __cfg_if_items! (defined in src/macros.rs)
src/unix/mod.rs:666:1: 682:2 note: in this expansion of cfg_if! (defined in src/macros.rs)
src/macros.rs:26:9: 26:75 note: in this expansion of __cfg_if_apply! (defined in src/macros.rs)
src/macros.rs:27:9: 27:60 note: in this expansion of __cfg_if_items! (defined in src/macros.rs)
src/macros.rs:15:9: 19:10 note: in this expansion of __cfg_if_items! (defined in src/macros.rs)
src/lib.rs:239:1: 247:2 note: in this expansion of cfg_if! (defined in src/macros.rs)
src/unix/bsd/mod.rs:258:16: 258:26 help: run `rustc --explain E0412` to see a detailed explanation
src/unix/bsd/mod.rs:259:16: 259:26 error: use of undeclared type name `tcflag_t` [E0412]
src/unix/bsd/mod.rs:259 pub const CS7: ::tcflag_t = 0x00000200;
                                       ^~~~~~~~~~
src/macros.rs:26:9: 26:75 note: in this expansion of __cfg_if_apply! (defined in src/macros.rs)
src/macros.rs:27:9: 27:60 note: in this expansion of __cfg_if_items! (defined in src/macros.rs)
src/macros.rs:15:9: 19:10 note: in this expansion of __cfg_if_items! (defined in src/macros.rs)
src/unix/mod.rs:666:1: 682:2 note: in this expansion of cfg_if! (defined in src/macros.rs)
src/macros.rs:26:9: 26:75 note: in this expansion of __cfg_if_apply! (defined in src/macros.rs)
src/macros.rs:27:9: 27:60 note: in this expansion of __cfg_if_items! (defined in src/macros.rs)
src/macros.rs:15:9: 19:10 note: in this expansion of __cfg_if_items! (defined in src/macros.rs)
src/lib.rs:239:1: 247:2 note: in this expansion of cfg_if! (defined in src/macros.rs)
src/unix/bsd/mod.rs:259:16: 259:26 help: run `rustc --explain E0412` to see a detailed explanation
src/unix/bsd/mod.rs:260:16: 260:26 error: use of undeclared type name `tcflag_t` [E0412]
src/unix/bsd/mod.rs:260 pub const CS8: ::tcflag_t = 0x00000300;
                                       ^~~~~~~~~~
src/macros.rs:26:9: 26:75 note: in this expansion of __cfg_if_apply! (defined in src/macros.rs)
src/macros.rs:27:9: 27:60 note: in this expansion of __cfg_if_items! (defined in src/macros.rs)
src/macros.rs:15:9: 19:10 note: in this expansion of __cfg_if_items! (defined in src/macros.rs)
src/unix/mod.rs:666:1: 682:2 note: in this expansion of cfg_if! (defined in src/macros.rs)
src/macros.rs:26:9: 26:75 note: in this expansion of __cfg_if_apply! (defined in src/macros.rs)
src/macros.rs:27:9: 27:60 note: in this expansion of __cfg_if_items! (defined in src/macros.rs)
src/macros.rs:15:9: 19:10 note: in this expansion of __cfg_if_items! (defined in src/macros.rs)
src/lib.rs:239:1: 247:2 note: in this expansion of cfg_if! (defined in src/macros.rs)
src/unix/bsd/mod.rs:260:16: 260:26 help: run `rustc --explain E0412` to see a detailed explanation
src/unix/bsd/mod.rs:261:19: 261:29 error: use of undeclared type name `tcflag_t` [E0412]
src/unix/bsd/mod.rs:261 pub const CSTOPB: ::tcflag_t = 0x00000400;
                                          ^~~~~~~~~~
src/macros.rs:26:9: 26:75 note: in this expansion of __cfg_if_apply! (defined in src/macros.rs)
src/macros.rs:27:9: 27:60 note: in this expansion of __cfg_if_items! (defined in src/macros.rs)
src/macros.rs:15:9: 19:10 note: in this expansion of __cfg_if_items! (defined in src/macros.rs)
src/unix/mod.rs:666:1: 682:2 note: in this expansion of cfg_if! (defined in src/macros.rs)
src/macros.rs:26:9: 26:75 note: in this expansion of __cfg_if_apply! (defined in src/macros.rs)
src/macros.rs:27:9: 27:60 note: in this expansion of __cfg_if_items! (defined in src/macros.rs)
src/macros.rs:15:9: 19:10 note: in this expansion of __cfg_if_items! (defined in src/macros.rs)
src/lib.rs:239:1: 247:2 note: in this expansion of cfg_if! (defined in src/macros.rs)
src/unix/bsd/mod.rs:261:19: 261:29 help: run `rustc --explain E0412` to see a detailed explanation
src/unix/bsd/mod.rs:262:18: 262:28 error: use of undeclared type name `tcflag_t` [E0412]
src/unix/bsd/mod.rs:262 pub const CREAD: ::tcflag_t = 0x00000800;
                                         ^~~~~~~~~~
src/macros.rs:26:9: 26:75 note: in this expansion of __cfg_if_apply! (defined in src/macros.rs)
src/macros.rs:27:9: 27:60 note: in this expansion of __cfg_if_items! (defined in src/macros.rs)
src/macros.rs:15:9: 19:10 note: in this expansion of __cfg_if_items! (defined in src/macros.rs)
src/unix/mod.rs:666:1: 682:2 note: in this expansion of cfg_if! (defined in src/macros.rs)
src/macros.rs:26:9: 26:75 note: in this expansion of __cfg_if_apply! (defined in src/macros.rs)
src/macros.rs:27:9: 27:60 note: in this expansion of __cfg_if_items! (defined in src/macros.rs)
src/macros.rs:15:9: 19:10 note: in this expansion of __cfg_if_items! (defined in src/macros.rs)
src/lib.rs:239:1: 247:2 note: in this expansion of cfg_if! (defined in src/macros.rs)
src/unix/bsd/mod.rs:262:18: 262:28 help: run `rustc --explain E0412` to see a detailed explanation
src/unix/bsd/mod.rs:263:19: 263:29 error: use of undeclared type name `tcflag_t` [E0412]
src/unix/bsd/mod.rs:263 pub const PARENB: ::tcflag_t = 0x00001000;
                                          ^~~~~~~~~~
src/macros.rs:26:9: 26:75 note: in this expansion of __cfg_if_apply! (defined in src/macros.rs)
src/macros.rs:27:9: 27:60 note: in this expansion of __cfg_if_items! (defined in src/macros.rs)
src/macros.rs:15:9: 19:10 note: in this expansion of __cfg_if_items! (defined in src/macros.rs)
src/unix/mod.rs:666:1: 682:2 note: in this expansion of cfg_if! (defined in src/macros.rs)
src/macros.rs:26:9: 26:75 note: in this expansion of __cfg_if_apply! (defined in src/macros.rs)
src/macros.rs:27:9: 27:60 note: in this expansion of __cfg_if_items! (defined in src/macros.rs)
src/macros.rs:15:9: 19:10 note: in this expansion of __cfg_if_items! (defined in src/macros.rs)
src/lib.rs:239:1: 247:2 note: in this expansion of cfg_if! (defined in src/macros.rs)
src/unix/bsd/mod.rs:263:19: 263:29 help: run `rustc --explain E0412` to see a detailed explanation
src/unix/bsd/mod.rs:264:19: 264:29 error: use of undeclared type name `tcflag_t` [E0412]
src/unix/bsd/mod.rs:264 pub const PARODD: ::tcflag_t = 0x00002000;
                                          ^~~~~~~~~~
src/macros.rs:26:9: 26:75 note: in this expansion of __cfg_if_apply! (defined in src/macros.rs)
src/macros.rs:27:9: 27:60 note: in this expansion of __cfg_if_items! (defined in src/macros.rs)
src/macros.rs:15:9: 19:10 note: in this expansion of __cfg_if_items! (defined in src/macros.rs)
src/unix/mod.rs:666:1: 682:2 note: in this expansion of cfg_if! (defined in src/macros.rs)
src/macros.rs:26:9: 26:75 note: in this expansion of __cfg_if_apply! (defined in src/macros.rs)
src/macros.rs:27:9: 27:60 note: in this expansion of __cfg_if_items! (defined in src/macros.rs)
src/macros.rs:15:9: 19:10 note: in this expansion of __cfg_if_items! (defined in src/macros.rs)
src/lib.rs:239:1: 247:2 note: in this expansion of cfg_if! (defined in src/macros.rs)
src/unix/bsd/mod.rs:264:19: 264:29 help: run `rustc --explain E0412` to see a detailed explanation
src/unix/bsd/mod.rs:265:18: 265:28 error: use of undeclared type name `tcflag_t` [E0412]
src/unix/bsd/mod.rs:265 pub const HUPCL: ::tcflag_t = 0x00004000;
                                         ^~~~~~~~~~
src/macros.rs:26:9: 26:75 note: in this expansion of __cfg_if_apply! (defined in src/macros.rs)
src/macros.rs:27:9: 27:60 note: in this expansion of __cfg_if_items! (defined in src/macros.rs)
src/macros.rs:15:9: 19:10 note: in this expansion of __cfg_if_items! (defined in src/macros.rs)
src/unix/mod.rs:666:1: 682:2 note: in this expansion of cfg_if! (defined in src/macros.rs)
src/macros.rs:26:9: 26:75 note: in this expansion of __cfg_if_apply! (defined in src/macros.rs)
src/macros.rs:27:9: 27:60 note: in this expansion of __cfg_if_items! (defined in src/macros.rs)
src/macros.rs:15:9: 19:10 note: in this expansion of __cfg_if_items! (defined in src/macros.rs)
src/lib.rs:239:1: 247:2 note: in this expansion of cfg_if! (defined in src/macros.rs)
src/unix/bsd/mod.rs:265:18: 265:28 help: run `rustc --explain E0412` to see a detailed explanation
src/unix/bsd/mod.rs:266:19: 266:29 error: use of undeclared type name `tcflag_t` [E0412]
src/unix/bsd/mod.rs:266 pub const CLOCAL: ::tcflag_t = 0x00008000;
                                          ^~~~~~~~~~
src/macros.rs:26:9: 26:75 note: in this expansion of __cfg_if_apply! (defined in src/macros.rs)
src/macros.rs:27:9: 27:60 note: in this expansion of __cfg_if_items! (defined in src/macros.rs)
src/macros.rs:15:9: 19:10 note: in this expansion of __cfg_if_items! (defined in src/macros.rs)
src/unix/mod.rs:666:1: 682:2 note: in this expansion of cfg_if! (defined in src/macros.rs)
src/macros.rs:26:9: 26:75 note: in this expansion of __cfg_if_apply! (defined in src/macros.rs)
src/macros.rs:27:9: 27:60 note: in this expansion of __cfg_if_items! (defined in src/macros.rs)
src/macros.rs:15:9: 19:10 note: in this expansion of __cfg_if_items! (defined in src/macros.rs)
src/lib.rs:239:1: 247:2 note: in this expansion of cfg_if! (defined in src/macros.rs)
src/unix/bsd/mod.rs:266:19: 266:29 help: run `rustc --explain E0412` to see a detailed explanation
src/unix/bsd/mod.rs:267:19: 267:29 error: use of undeclared type name `tcflag_t` [E0412]
src/unix/bsd/mod.rs:267 pub const ECHOKE: ::tcflag_t = 0x00000001;
                                          ^~~~~~~~~~
src/macros.rs:26:9: 26:75 note: in this expansion of __cfg_if_apply! (defined in src/macros.rs)
src/macros.rs:27:9: 27:60 note: in this expansion of __cfg_if_items! (defined in src/macros.rs)
src/macros.rs:15:9: 19:10 note: in this expansion of __cfg_if_items! (defined in src/macros.rs)
src/unix/mod.rs:666:1: 682:2 note: in this expansion of cfg_if! (defined in src/macros.rs)
src/macros.rs:26:9: 26:75 note: in this expansion of __cfg_if_apply! (defined in src/macros.rs)
src/macros.rs:27:9: 27:60 note: in this expansion of __cfg_if_items! (defined in src/macros.rs)
src/macros.rs:15:9: 19:10 note: in this expansion of __cfg_if_items! (defined in src/macros.rs)
src/lib.rs:239:1: 247:2 note: in this expansion of cfg_if! (defined in src/macros.rs)
src/unix/bsd/mod.rs:267:19: 267:29 help: run `rustc --explain E0412` to see a detailed explanation
src/unix/bsd/mod.rs:268:18: 268:28 error: use of undeclared type name `tcflag_t` [E0412]
src/unix/bsd/mod.rs:268 pub const ECHOE: ::tcflag_t = 0x00000002;
                                         ^~~~~~~~~~
src/macros.rs:26:9: 26:75 note: in this expansion of __cfg_if_apply! (defined in src/macros.rs)
src/macros.rs:27:9: 27:60 note: in this expansion of __cfg_if_items! (defined in src/macros.rs)
src/macros.rs:15:9: 19:10 note: in this expansion of __cfg_if_items! (defined in src/macros.rs)
src/unix/mod.rs:666:1: 682:2 note: in this expansion of cfg_if! (defined in src/macros.rs)
src/macros.rs:26:9: 26:75 note: in this expansion of __cfg_if_apply! (defined in src/macros.rs)
src/macros.rs:27:9: 27:60 note: in this expansion of __cfg_if_items! (defined in src/macros.rs)
src/macros.rs:15:9: 19:10 note: in this expansion of __cfg_if_items! (defined in src/macros.rs)
src/lib.rs:239:1: 247:2 note: in this expansion of cfg_if! (defined in src/macros.rs)
src/unix/bsd/mod.rs:268:18: 268:28 help: run `rustc --explain E0412` to see a detailed explanation
src/unix/bsd/mod.rs:269:18: 269:28 error: use of undeclared type name `tcflag_t` [E0412]
src/unix/bsd/mod.rs:269 pub const ECHOK: ::tcflag_t = 0x00000004;
                                         ^~~~~~~~~~
src/macros.rs:26:9: 26:75 note: in this expansion of __cfg_if_apply! (defined in src/macros.rs)
src/macros.rs:27:9: 27:60 note: in this expansion of __cfg_if_items! (defined in src/macros.rs)
src/macros.rs:15:9: 19:10 note: in this expansion of __cfg_if_items! (defined in src/macros.rs)
src/unix/mod.rs:666:1: 682:2 note: in this expansion of cfg_if! (defined in src/macros.rs)
src/macros.rs:26:9: 26:75 note: in this expansion of __cfg_if_apply! (defined in src/macros.rs)
src/macros.rs:27:9: 27:60 note: in this expansion of __cfg_if_items! (defined in src/macros.rs)
src/macros.rs:15:9: 19:10 note: in this expansion of __cfg_if_items! (defined in src/macros.rs)
src/lib.rs:239:1: 247:2 note: in this expansion of cfg_if! (defined in src/macros.rs)
src/unix/bsd/mod.rs:269:18: 269:28 help: run `rustc --explain E0412` to see a detailed explanation
src/unix/bsd/mod.rs:270:17: 270:27 error: use of undeclared type name `tcflag_t` [E0412]
src/unix/bsd/mod.rs:270 pub const ECHO: ::tcflag_t = 0x00000008;
                                        ^~~~~~~~~~
src/macros.rs:26:9: 26:75 note: in this expansion of __cfg_if_apply! (defined in src/macros.rs)
src/macros.rs:27:9: 27:60 note: in this expansion of __cfg_if_items! (defined in src/macros.rs)
src/macros.rs:15:9: 19:10 note: in this expansion of __cfg_if_items! (defined in src/macros.rs)
src/unix/mod.rs:666:1: 682:2 note: in this expansion of cfg_if! (defined in src/macros.rs)
src/macros.rs:26:9: 26:75 note: in this expansion of __cfg_if_apply! (defined in src/macros.rs)
src/macros.rs:27:9: 27:60 note: in this expansion of __cfg_if_items! (defined in src/macros.rs)
src/macros.rs:15:9: 19:10 note: in this expansion of __cfg_if_items! (defined in src/macros.rs)
src/lib.rs:239:1: 247:2 note: in this expansion of cfg_if! (defined in src/macros.rs)
src/unix/bsd/mod.rs:270:17: 270:27 help: run `rustc --explain E0412` to see a detailed explanation
src/unix/bsd/mod.rs:271:19: 271:29 error: use of undeclared type name `tcflag_t` [E0412]
src/unix/bsd/mod.rs:271 pub const ECHONL: ::tcflag_t = 0x00000010;
                                          ^~~~~~~~~~
src/macros.rs:26:9: 26:75 note: in this expansion of __cfg_if_apply! (defined in src/macros.rs)
src/macros.rs:27:9: 27:60 note: in this expansion of __cfg_if_items! (defined in src/macros.rs)
src/macros.rs:15:9: 19:10 note: in this expansion of __cfg_if_items! (defined in src/macros.rs)
src/unix/mod.rs:666:1: 682:2 note: in this expansion of cfg_if! (defined in src/macros.rs)
src/macros.rs:26:9: 26:75 note: in this expansion of __cfg_if_apply! (defined in src/macros.rs)
src/macros.rs:27:9: 27:60 note: in this expansion of __cfg_if_items! (defined in src/macros.rs)
src/macros.rs:15:9: 19:10 note: in this expansion of __cfg_if_items! (defined in src/macros.rs)
src/lib.rs:239:1: 247:2 note: in this expansion of cfg_if! (defined in src/macros.rs)
src/unix/bsd/mod.rs:271:19: 271:29 help: run `rustc --explain E0412` to see a detailed explanation
src/unix/bsd/mod.rs:272:20: 272:30 error: use of undeclared type name `tcflag_t` [E0412]
src/unix/bsd/mod.rs:272 pub const ECHOPRT: ::tcflag_t = 0x00000020;
                                           ^~~~~~~~~~
src/macros.rs:26:9: 26:75 note: in this expansion of __cfg_if_apply! (defined in src/macros.rs)
src/macros.rs:27:9: 27:60 note: in this expansion of __cfg_if_items! (defined in src/macros.rs)
src/macros.rs:15:9: 19:10 note: in this expansion of __cfg_if_items! (defined in src/macros.rs)
src/unix/mod.rs:666:1: 682:2 note: in this expansion of cfg_if! (defined in src/macros.rs)
src/macros.rs:26:9: 26:75 note: in this expansion of __cfg_if_apply! (defined in src/macros.rs)
src/macros.rs:27:9: 27:60 note: in this expansion of __cfg_if_items! (defined in src/macros.rs)
src/macros.rs:15:9: 19:10 note: in this expansion of __cfg_if_items! (defined in src/macros.rs)
src/lib.rs:239:1: 247:2 note: in this expansion of cfg_if! (defined in src/macros.rs)
src/unix/bsd/mod.rs:272:20: 272:30 help: run `rustc --explain E0412` to see a detailed explanation
src/unix/bsd/mod.rs:273:20: 273:30 error: use of undeclared type name `tcflag_t` [E0412]
src/unix/bsd/mod.rs:273 pub const ECHOCTL: ::tcflag_t = 0x00000040;
                                           ^~~~~~~~~~
src/macros.rs:26:9: 26:75 note: in this expansion of __cfg_if_apply! (defined in src/macros.rs)
src/macros.rs:27:9: 27:60 note: in this expansion of __cfg_if_items! (defined in src/macros.rs)
src/macros.rs:15:9: 19:10 note: in this expansion of __cfg_if_items! (defined in src/macros.rs)
src/unix/mod.rs:666:1: 682:2 note: in this expansion of cfg_if! (defined in src/macros.rs)
src/macros.rs:26:9: 26:75 note: in this expansion of __cfg_if_apply! (defined in src/macros.rs)
src/macros.rs:27:9: 27:60 note: in this expansion of __cfg_if_items! (defined in src/macros.rs)
src/macros.rs:15:9: 19:10 note: in this expansion of __cfg_if_items! (defined in src/macros.rs)
src/lib.rs:239:1: 247:2 note: in this expansion of cfg_if! (defined in src/macros.rs)
src/unix/bsd/mod.rs:273:20: 273:30 help: run `rustc --explain E0412` to see a detailed explanation
src/unix/bsd/mod.rs:274:17: 274:27 error: use of undeclared type name `tcflag_t` [E0412]
src/unix/bsd/mod.rs:274 pub const ISIG: ::tcflag_t = 0x00000080;
                                        ^~~~~~~~~~
src/macros.rs:26:9: 26:75 note: in this expansion of __cfg_if_apply! (defined in src/macros.rs)
src/macros.rs:27:9: 27:60 note: in this expansion of __cfg_if_items! (defined in src/macros.rs)
src/macros.rs:15:9: 19:10 note: in this expansion of __cfg_if_items! (defined in src/macros.rs)
src/unix/mod.rs:666:1: 682:2 note: in this expansion of cfg_if! (defined in src/macros.rs)
src/macros.rs:26:9: 26:75 note: in this expansion of __cfg_if_apply! (defined in src/macros.rs)
src/macros.rs:27:9: 27:60 note: in this expansion of __cfg_if_items! (defined in src/macros.rs)
src/macros.rs:15:9: 19:10 note: in this expansion of __cfg_if_items! (defined in src/macros.rs)
src/lib.rs:239:1: 247:2 note: in this expansion of cfg_if! (defined in src/macros.rs)
src/unix/bsd/mod.rs:274:17: 274:27 help: run `rustc --explain E0412` to see a detailed explanation
src/unix/bsd/mod.rs:275:19: 275:29 error: use of undeclared type name `tcflag_t` [E0412]
src/unix/bsd/mod.rs:275 pub const ICANON: ::tcflag_t = 0x00000100;
                                          ^~~~~~~~~~
src/macros.rs:26:9: 26:75 note: in this expansion of __cfg_if_apply! (defined in src/macros.rs)
src/macros.rs:27:9: 27:60 note: in this expansion of __cfg_if_items! (defined in src/macros.rs)
src/macros.rs:15:9: 19:10 note: in this expansion of __cfg_if_items! (defined in src/macros.rs)
src/unix/mod.rs:666:1: 682:2 note: in this expansion of cfg_if! (defined in src/macros.rs)
src/macros.rs:26:9: 26:75 note: in this expansion of __cfg_if_apply! (defined in src/macros.rs)
src/macros.rs:27:9: 27:60 note: in this expansion of __cfg_if_items! (defined in src/macros.rs)
src/macros.rs:15:9: 19:10 note: in this expansion of __cfg_if_items! (defined in src/macros.rs)
src/lib.rs:239:1: 247:2 note: in this expansion of cfg_if! (defined in src/macros.rs)
src/unix/bsd/mod.rs:275:19: 275:29 help: run `rustc --explain E0412` to see a detailed explanation
src/unix/bsd/mod.rs:276:19: 276:29 error: use of undeclared type name `tcflag_t` [E0412]
src/unix/bsd/mod.rs:276 pub const IEXTEN: ::tcflag_t = 0x00000400;
                                          ^~~~~~~~~~
src/macros.rs:26:9: 26:75 note: in this expansion of __cfg_if_apply! (defined in src/macros.rs)
src/macros.rs:27:9: 27:60 note: in this expansion of __cfg_if_items! (defined in src/macros.rs)
src/macros.rs:15:9: 19:10 note: in this expansion of __cfg_if_items! (defined in src/macros.rs)
src/unix/mod.rs:666:1: 682:2 note: in this expansion of cfg_if! (defined in src/macros.rs)
src/macros.rs:26:9: 26:75 note: in this expansion of __cfg_if_apply! (defined in src/macros.rs)
src/macros.rs:27:9: 27:60 note: in this expansion of __cfg_if_items! (defined in src/macros.rs)
src/macros.rs:15:9: 19:10 note: in this expansion of __cfg_if_items! (defined in src/macros.rs)
src/lib.rs:239:1: 247:2 note: in this expansion of cfg_if! (defined in src/macros.rs)
src/unix/bsd/mod.rs:276:19: 276:29 help: run `rustc --explain E0412` to see a detailed explanation
src/unix/bsd/mod.rs:277:20: 277:30 error: use of undeclared type name `tcflag_t` [E0412]
src/unix/bsd/mod.rs:277 pub const EXTPROC: ::tcflag_t = 0x00000800;
                                           ^~~~~~~~~~
src/macros.rs:26:9: 26:75 note: in this expansion of __cfg_if_apply! (defined in src/macros.rs)
src/macros.rs:27:9: 27:60 note: in this expansion of __cfg_if_items! (defined in src/macros.rs)
src/macros.rs:15:9: 19:10 note: in this expansion of __cfg_if_items! (defined in src/macros.rs)
src/unix/mod.rs:666:1: 682:2 note: in this expansion of cfg_if! (defined in src/macros.rs)
src/macros.rs:26:9: 26:75 note: in this expansion of __cfg_if_apply! (defined in src/macros.rs)
src/macros.rs:27:9: 27:60 note: in this expansion of __cfg_if_items! (defined in src/macros.rs)
src/macros.rs:15:9: 19:10 note: in this expansion of __cfg_if_items! (defined in src/macros.rs)
src/lib.rs:239:1: 247:2 note: in this expansion of cfg_if! (defined in src/macros.rs)
src/unix/bsd/mod.rs:277:20: 277:30 help: run `rustc --explain E0412` to see a detailed explanation
src/unix/bsd/mod.rs:278:19: 278:29 error: use of undeclared type name `tcflag_t` [E0412]
src/unix/bsd/mod.rs:278 pub const TOSTOP: ::tcflag_t = 0x00400000;
                                          ^~~~~~~~~~
src/macros.rs:26:9: 26:75 note: in this expansion of __cfg_if_apply! (defined in src/macros.rs)
src/macros.rs:27:9: 27:60 note: in this expansion of __cfg_if_items! (defined in src/macros.rs)
src/macros.rs:15:9: 19:10 note: in this expansion of __cfg_if_items! (defined in src/macros.rs)
src/unix/mod.rs:666:1: 682:2 note: in this expansion of cfg_if! (defined in src/macros.rs)
src/macros.rs:26:9: 26:75 note: in this expansion of __cfg_if_apply! (defined in src/macros.rs)
src/macros.rs:27:9: 27:60 note: in this expansion of __cfg_if_items! (defined in src/macros.rs)
src/macros.rs:15:9: 19:10 note: in this expansion of __cfg_if_items! (defined in src/macros.rs)
src/lib.rs:239:1: 247:2 note: in this expansion of cfg_if! (defined in src/macros.rs)
src/unix/bsd/mod.rs:278:19: 278:29 help: run `rustc --explain E0412` to see a detailed explanation
src/unix/bsd/mod.rs:279:19: 279:29 error: use of undeclared type name `tcflag_t` [E0412]
src/unix/bsd/mod.rs:279 pub const FLUSHO: ::tcflag_t = 0x00800000;
                                          ^~~~~~~~~~
src/macros.rs:26:9: 26:75 note: in this expansion of __cfg_if_apply! (defined in src/macros.rs)
src/macros.rs:27:9: 27:60 note: in this expansion of __cfg_if_items! (defined in src/macros.rs)
src/macros.rs:15:9: 19:10 note: in this expansion of __cfg_if_items! (defined in src/macros.rs)
src/unix/mod.rs:666:1: 682:2 note: in this expansion of cfg_if! (defined in src/macros.rs)
src/macros.rs:26:9: 26:75 note: in this expansion of __cfg_if_apply! (defined in src/macros.rs)
src/macros.rs:27:9: 27:60 note: in this expansion of __cfg_if_items! (defined in src/macros.rs)
src/macros.rs:15:9: 19:10 note: in this expansion of __cfg_if_items! (defined in src/macros.rs)
src/lib.rs:239:1: 247:2 note: in this expansion of cfg_if! (defined in src/macros.rs)
src/unix/bsd/mod.rs:279:19: 279:29 help: run `rustc --explain E0412` to see a detailed explanation
src/unix/bsd/mod.rs:280:19: 280:29 error: use of undeclared type name `tcflag_t` [E0412]
src/unix/bsd/mod.rs:280 pub const PENDIN: ::tcflag_t = 0x20000000;
                                          ^~~~~~~~~~
src/macros.rs:26:9: 26:75 note: in this expansion of __cfg_if_apply! (defined in src/macros.rs)
src/macros.rs:27:9: 27:60 note: in this expansion of __cfg_if_items! (defined in src/macros.rs)
src/macros.rs:15:9: 19:10 note: in this expansion of __cfg_if_items! (defined in src/macros.rs)
src/unix/mod.rs:666:1: 682:2 note: in this expansion of cfg_if! (defined in src/macros.rs)
src/macros.rs:26:9: 26:75 note: in this expansion of __cfg_if_apply! (defined in src/macros.rs)
src/macros.rs:27:9: 27:60 note: in this expansion of __cfg_if_items! (defined in src/macros.rs)
src/macros.rs:15:9: 19:10 note: in this expansion of __cfg_if_items! (defined in src/macros.rs)
src/lib.rs:239:1: 247:2 note: in this expansion of cfg_if! (defined in src/macros.rs)
src/unix/bsd/mod.rs:280:19: 280:29 help: run `rustc --explain E0412` to see a detailed explanation
src/unix/bsd/mod.rs:281:19: 281:29 error: use of undeclared type name `tcflag_t` [E0412]
src/unix/bsd/mod.rs:281 pub const NOFLSH: ::tcflag_t = 0x80000000;
                                          ^~~~~~~~~~
src/macros.rs:26:9: 26:75 note: in this expansion of __cfg_if_apply! (defined in src/macros.rs)
src/macros.rs:27:9: 27:60 note: in this expansion of __cfg_if_items! (defined in src/macros.rs)
src/macros.rs:15:9: 19:10 note: in this expansion of __cfg_if_items! (defined in src/macros.rs)
src/unix/mod.rs:666:1: 682:2 note: in this expansion of cfg_if! (defined in src/macros.rs)
src/macros.rs:26:9: 26:75 note: in this expansion of __cfg_if_apply! (defined in src/macros.rs)
src/macros.rs:27:9: 27:60 note: in this expansion of __cfg_if_items! (defined in src/macros.rs)
src/macros.rs:15:9: 19:10 note: in this expansion of __cfg_if_items! (defined in src/macros.rs)
src/lib.rs:239:1: 247:2 note: in this expansion of cfg_if! (defined in src/macros.rs)
src/unix/bsd/mod.rs:281:19: 281:29 help: run `rustc --explain E0412` to see a detailed explanation
src/unix/bsd/freebsdlike/mod.rs:550:30: 550:36 error: use of undeclared type name `c_char` [E0412]
src/unix/bsd/freebsdlike/mod.rs:550                    vec: *mut c_char) -> ::c_int;
                                                                 ^~~~~~
src/macros.rs:26:9: 26:75 note: in this expansion of __cfg_if_apply! (defined in src/macros.rs)
src/macros.rs:27:9: 27:60 note: in this expansion of __cfg_if_items! (defined in src/macros.rs)
src/macros.rs:15:9: 19:10 note: in this expansion of __cfg_if_items! (defined in src/macros.rs)
src/unix/bsd/mod.rs:336:1: 350:2 note: in this expansion of cfg_if! (defined in src/macros.rs)
src/macros.rs:26:9: 26:75 note: in this expansion of __cfg_if_apply! (defined in src/macros.rs)
src/macros.rs:27:9: 27:60 note: in this expansion of __cfg_if_items! (defined in src/macros.rs)
src/macros.rs:15:9: 19:10 note: in this expansion of __cfg_if_items! (defined in src/macros.rs)
src/unix/mod.rs:666:1: 682:2 note: in this expansion of cfg_if! (defined in src/macros.rs)
src/macros.rs:26:9: 26:75 note: in this expansion of __cfg_if_apply! (defined in src/macros.rs)
src/macros.rs:27:9: 27:60 note: in this expansion of __cfg_if_items! (defined in src/macros.rs)
src/macros.rs:15:9: 19:10 note: in this expansion of __cfg_if_items! (defined in src/macros.rs)
src/lib.rs:239:1: 247:2 note: in this expansion of cfg_if! (defined in src/macros.rs)
src/unix/bsd/freebsdlike/mod.rs:550:30: 550:36 help: run `rustc --explain E0412` to see a detailed explanation
src/unix/bsd/freebsdlike/mod.rs:551:41: 551:47 error: use of undeclared type name `c_char` [E0412]
src/unix/bsd/freebsdlike/mod.rs:551     pub fn sysctlnametomib(name: *const c_char,
                                                                            ^~~~~~
src/macros.rs:26:9: 26:75 note: in this expansion of __cfg_if_apply! (defined in src/macros.rs)
src/macros.rs:27:9: 27:60 note: in this expansion of __cfg_if_items! (defined in src/macros.rs)
src/macros.rs:15:9: 19:10 note: in this expansion of __cfg_if_items! (defined in src/macros.rs)
src/unix/bsd/mod.rs:336:1: 350:2 note: in this expansion of cfg_if! (defined in src/macros.rs)
src/macros.rs:26:9: 26:75 note: in this expansion of __cfg_if_apply! (defined in src/macros.rs)
src/macros.rs:27:9: 27:60 note: in this expansion of __cfg_if_items! (defined in src/macros.rs)
src/macros.rs:15:9: 19:10 note: in this expansion of __cfg_if_items! (defined in src/macros.rs)
src/unix/mod.rs:666:1: 682:2 note: in this expansion of cfg_if! (defined in src/macros.rs)
src/macros.rs:26:9: 26:75 note: in this expansion of __cfg_if_apply! (defined in src/macros.rs)
src/macros.rs:27:9: 27:60 note: in this expansion of __cfg_if_items! (defined in src/macros.rs)
src/macros.rs:15:9: 19:10 note: in this expansion of __cfg_if_items! (defined in src/macros.rs)
src/lib.rs:239:1: 247:2 note: in this expansion of cfg_if! (defined in src/macros.rs)
src/unix/bsd/freebsdlike/mod.rs:551:41: 551:47 help: run `rustc --explain E0412` to see a detailed explanation
error: aborting due to 53 previous errors
Could not compile `libc`.

Caused by:
  Process didn't exit successfully: `rustc src/lib.rs --crate-name libc --crate-type lib -g --cfg feature="default" --out-dir /root/libc/target/debug --emit=dep-info,link -L dependency=/root/libc/target/debug -L dependency=/root/libc/target/debug/deps` (exit code: 101)

libc should provide libc::c_bool

The libc crate should export a type c_bool, defined to have the same representation as the C and C++ bool type on the current platform, analogous to c_int and so on.

broken FreeBSD build

from http://buildbot.rust-lang.org/builders/auto-freebsd10_32-1/builds/1589/steps/compile/logs/stdio

../src/liblibc/src/unix/bsd/freebsdlike/freebsd.rs:3:32: 3:36 error: binary operation `+` cannot be applied to type `_` [E0369]
../src/liblibc/src/unix/bsd/freebsdlike/freebsd.rs:3 pub const SIGSTKSZ: ::size_t = 2048 /* MINSIGSTKSZ */ + 32768;
                                                                                    ^~~~
../src/liblibc/src/macros.rs:26:9: 26:75 note: in this expansion of __cfg_if_apply! (defined in ../src/liblibc/src/macros.rs)
../src/liblibc/src/macros.rs:15:9: 19:10 note: in this expansion of __cfg_if_items! (defined in ../src/liblibc/src/macros.rs)
../src/liblibc/src/unix/bsd/freebsdlike/mod.rs:553:1: 563:2 note: in this expansion of cfg_if! (defined in ../src/liblibc/src/macros.rs)
../src/liblibc/src/macros.rs:26:9: 26:75 note: in this expansion of __cfg_if_apply! (defined in ../src/liblibc/src/macros.rs)
../src/liblibc/src/macros.rs:27:9: 27:60 note: in this expansion of __cfg_if_items! (defined in ../src/liblibc/src/macros.rs)
../src/liblibc/src/macros.rs:15:9: 19:10 note: in this expansion of __cfg_if_items! (defined in ../src/liblibc/src/macros.rs)
../src/liblibc/src/unix/bsd/mod.rs:168:1: 182:2 note: in this expansion of cfg_if! (defined in ../src/liblibc/src/macros.rs)
../src/liblibc/src/macros.rs:26:9: 26:75 note: in this expansion of __cfg_if_apply! (defined in ../src/liblibc/src/macros.rs)
../src/liblibc/src/macros.rs:27:9: 27:60 note: in this expansion of __cfg_if_items! (defined in ../src/liblibc/src/macros.rs)
../src/liblibc/src/macros.rs:15:9: 19:10 note: in this expansion of __cfg_if_items! (defined in ../src/liblibc/src/macros.rs)
../src/liblibc/src/unix/mod.rs:582:1: 598:2 note: in this expansion of cfg_if! (defined in ../src/liblibc/src/macros.rs)
../src/liblibc/src/macros.rs:26:9: 26:75 note: in this expansion of __cfg_if_apply! (defined in ../src/liblibc/src/macros.rs)
../src/liblibc/src/macros.rs:27:9: 27:60 note: in this expansion of __cfg_if_items! (defined in ../src/liblibc/src/macros.rs)
../src/liblibc/src/macros.rs:15:9: 19:10 note: in this expansion of __cfg_if_items! (defined in ../src/liblibc/src/macros.rs)
../src/liblibc/src/lib.rs:237:1: 245:2 note: in this expansion of cfg_if! (defined in ../src/liblibc/src/macros.rs)
../src/liblibc/src/unix/bsd/freebsdlike/freebsd.rs:3:32: 3:36 note: an implementation of `std::ops::Add` might be missing for `_`
../src/liblibc/src/unix/bsd/freebsdlike/freebsd.rs:3 pub const SIGSTKSZ: ::size_t = 2048 /* MINSIGSTKSZ */ + 32768;
                                                                                    ^~~~
../src/liblibc/src/macros.rs:26:9: 26:75 note: in this expansion of __cfg_if_apply! (defined in ../src/liblibc/src/macros.rs)
../src/liblibc/src/macros.rs:15:9: 19:10 note: in this expansion of __cfg_if_items! (defined in ../src/liblibc/src/macros.rs)
../src/liblibc/src/unix/bsd/freebsdlike/mod.rs:553:1: 563:2 note: in this expansion of cfg_if! (defined in ../src/liblibc/src/macros.rs)
../src/liblibc/src/macros.rs:26:9: 26:75 note: in this expansion of __cfg_if_apply! (defined in ../src/liblibc/src/macros.rs)
../src/liblibc/src/macros.rs:27:9: 27:60 note: in this expansion of __cfg_if_items! (defined in ../src/liblibc/src/macros.rs)
../src/liblibc/src/macros.rs:15:9: 19:10 note: in this expansion of __cfg_if_items! (defined in ../src/liblibc/src/macros.rs)
../src/liblibc/src/unix/bsd/mod.rs:168:1: 182:2 note: in this expansion of cfg_if! (defined in ../src/liblibc/src/macros.rs)
../src/liblibc/src/macros.rs:26:9: 26:75 note: in this expansion of __cfg_if_apply! (defined in ../src/liblibc/src/macros.rs)
../src/liblibc/src/macros.rs:27:9: 27:60 note: in this expansion of __cfg_if_items! (defined in ../src/liblibc/src/macros.rs)
../src/liblibc/src/macros.rs:15:9: 19:10 note: in this expansion of __cfg_if_items! (defined in ../src/liblibc/src/macros.rs)
../src/liblibc/src/unix/mod.rs:582:1: 598:2 note: in this expansion of cfg_if! (defined in ../src/liblibc/src/macros.rs)
../src/liblibc/src/macros.rs:26:9: 26:75 note: in this expansion of __cfg_if_apply! (defined in ../src/liblibc/src/macros.rs)
../src/liblibc/src/macros.rs:27:9: 27:60 note: in this expansion of __cfg_if_items! (defined in ../src/liblibc/src/macros.rs)
../src/liblibc/src/macros.rs:15:9: 19:10 note: in this expansion of __cfg_if_items! (defined in ../src/liblibc/src/macros.rs)
../src/liblibc/src/lib.rs:237:1: 245:2 note: in this expansion of cfg_if! (defined in ../src/liblibc/src/macros.rs)

Outstanding PowerPC64 testcase failures

With powerpc64 fully bootstrapped, I was able to go back and build the libc tests. It shows a number of things we need to move into the arch specific files. Note: I also had to make a couple of changes to struct ipc_perm to get the tests to build (some fields are different sizes), so it needs to be moved too.

bad MCL_CURRENT value at byte 0: rust: 1 (0x1) != c 0 (0x0)
bad MCL_CURRENT value at byte 1: rust: 0 (0x0) != c 32 (0x20)
bad MCL_FUTURE value at byte 0: rust: 2 (0x2) != c 0 (0x0)
bad MCL_FUTURE value at byte 1: rust: 0 (0x0) != c 64 (0x40)
bad SIGSTKSZ value at byte 1: rust: 32 (0x20) != c 64 (0x40)
bad CBAUD value at byte 0: rust: 15 (0xf) != c 255 (0xff)
bad CBAUD value at byte 1: rust: 16 (0x10) != c 0 (0x0)
bad TAB1 value at byte 1: rust: 8 (0x8) != c 4 (0x4)
bad TAB2 value at byte 1: rust: 16 (0x10) != c 8 (0x8)
bad TAB3 value at byte 1: rust: 24 (0x18) != c 12 (0xc)
bad CR1 value at byte 1: rust: 2 (0x2) != c 16 (0x10)
bad CR2 value at byte 1: rust: 4 (0x4) != c 32 (0x20)
bad CR3 value at byte 1: rust: 6 (0x6) != c 48 (0x30)
bad FF1 value at byte 1: rust: 128 (0x80) != c 64 (0x40)
bad BS1 value at byte 1: rust: 32 (0x20) != c 128 (0x80)
bad VT1 value at byte 1: rust: 64 (0x40) != c 0 (0x0)
bad VT1 value at byte 2: rust: 0 (0x0) != c 1 (0x1)
bad VWERASE value at byte 0: rust: 14 (0xe) != c 10 (0xa)
bad VREPRINT value at byte 0: rust: 12 (0xc) != c 11 (0xb)
bad VSUSP value at byte 0: rust: 10 (0xa) != c 12 (0xc)
bad VSTART value at byte 0: rust: 8 (0x8) != c 13 (0xd)
bad VSTOP value at byte 0: rust: 9 (0x9) != c 14 (0xe)
bad VDISCARD value at byte 0: rust: 13 (0xd) != c 16 (0x10)
bad VTIME value at byte 0: rust: 5 (0x5) != c 7 (0x7)
bad IXON value at byte 1: rust: 4 (0x4) != c 2 (0x2)
bad IXOFF value at byte 1: rust: 16 (0x10) != c 4 (0x4)
bad ONLCR value at byte 0: rust: 4 (0x4) != c 2 (0x2)
bad CSIZE value at byte 0: rust: 48 (0x30) != c 0 (0x0)
bad CSIZE value at byte 1: rust: 0 (0x0) != c 3 (0x3)
bad CS6 value at byte 0: rust: 16 (0x10) != c 0 (0x0)
bad CS6 value at byte 1: rust: 0 (0x0) != c 1 (0x1)
bad CS7 value at byte 0: rust: 32 (0x20) != c 0 (0x0)
bad CS7 value at byte 1: rust: 0 (0x0) != c 2 (0x2)
bad CS8 value at byte 0: rust: 48 (0x30) != c 0 (0x0)
bad CS8 value at byte 1: rust: 0 (0x0) != c 3 (0x3)
bad CSTOPB value at byte 0: rust: 64 (0x40) != c 0 (0x0)
bad CSTOPB value at byte 1: rust: 0 (0x0) != c 4 (0x4)
bad CREAD value at byte 0: rust: 128 (0x80) != c 0 (0x0)
bad CREAD value at byte 1: rust: 0 (0x0) != c 8 (0x8)
bad PARENB value at byte 1: rust: 1 (0x1) != c 16 (0x10)
bad PARODD value at byte 1: rust: 2 (0x2) != c 32 (0x20)
bad HUPCL value at byte 1: rust: 4 (0x4) != c 64 (0x40)
bad CLOCAL value at byte 1: rust: 8 (0x8) != c 128 (0x80)
bad ECHOKE value at byte 0: rust: 0 (0x0) != c 1 (0x1)
bad ECHOKE value at byte 1: rust: 8 (0x8) != c 0 (0x0)
bad ECHOE value at byte 0: rust: 16 (0x10) != c 2 (0x2)
bad ECHOK value at byte 0: rust: 32 (0x20) != c 4 (0x4)
bad ECHONL value at byte 0: rust: 64 (0x40) != c 16 (0x10)
bad ECHOPRT value at byte 0: rust: 0 (0x0) != c 32 (0x20)
bad ECHOPRT value at byte 1: rust: 4 (0x4) != c 0 (0x0)
bad ECHOCTL value at byte 0: rust: 0 (0x0) != c 64 (0x40)
bad ECHOCTL value at byte 1: rust: 2 (0x2) != c 0 (0x0)
bad ISIG value at byte 0: rust: 1 (0x1) != c 128 (0x80)
bad ICANON value at byte 0: rust: 2 (0x2) != c 0 (0x0)
bad ICANON value at byte 1: rust: 0 (0x0) != c 1 (0x1)
bad PENDIN value at byte 1: rust: 64 (0x40) != c 0 (0x0)
bad PENDIN value at byte 3: rust: 0 (0x0) != c 32 (0x20)
bad NOFLSH value at byte 0: rust: 128 (0x80) != c 0 (0x0)
bad NOFLSH value at byte 3: rust: 0 (0x0) != c 128 (0x80)
bad VEOL value at byte 0: rust: 11 (0xb) != c 6 (0x6)
bad VEOL2 value at byte 0: rust: 16 (0x10) != c 8 (0x8)
bad VMIN value at byte 0: rust: 6 (0x6) != c 5 (0x5)
bad IEXTEN value at byte 1: rust: 128 (0x80) != c 4 (0x4)
bad TOSTOP value at byte 1: rust: 1 (0x1) != c 0 (0x0)
bad TOSTOP value at byte 2: rust: 0 (0x0) != c 64 (0x40)
bad FLUSHO value at byte 1: rust: 16 (0x10) != c 0 (0x0)
bad FLUSHO value at byte 2: rust: 0 (0x0) != c 128 (0x80)
bad EXTPROC value at byte 2: rust: 1 (0x1) != c 0 (0x0)
bad EXTPROC value at byte 3: rust: 0 (0x0) != c 16 (0x10)
bad TCGETS value at byte 0: rust: 1 (0x1) != c 19 (0x13)
bad TCGETS value at byte 1: rust: 84 (0x54) != c 116 (0x74)
bad TCGETS value at byte 2: rust: 0 (0x0) != c 60 (0x3c)
bad TCGETS value at byte 3: rust: 0 (0x0) != c 64 (0x40)
bad TCSETS value at byte 0: rust: 2 (0x2) != c 20 (0x14)
bad TCSETS value at byte 1: rust: 84 (0x54) != c 116 (0x74)
bad TCSETS value at byte 2: rust: 0 (0x0) != c 60 (0x3c)
bad TCSETS value at byte 3: rust: 0 (0x0) != c 128 (0x80)
bad TCSETSW value at byte 0: rust: 3 (0x3) != c 21 (0x15)
bad TCSETSW value at byte 1: rust: 84 (0x54) != c 116 (0x74)
bad TCSETSW value at byte 2: rust: 0 (0x0) != c 60 (0x3c)
bad TCSETSW value at byte 3: rust: 0 (0x0) != c 128 (0x80)
bad TCSETSF value at byte 0: rust: 4 (0x4) != c 22 (0x16)
bad TCSETSF value at byte 1: rust: 84 (0x54) != c 116 (0x74)
bad TCSETSF value at byte 2: rust: 0 (0x0) != c 60 (0x3c)
bad TCSETSF value at byte 3: rust: 0 (0x0) != c 128 (0x80)
bad TCGETA value at byte 0: rust: 5 (0x5) != c 23 (0x17)
bad TCGETA value at byte 1: rust: 84 (0x54) != c 116 (0x74)
bad TCGETA value at byte 2: rust: 0 (0x0) != c 20 (0x14)
bad TCGETA value at byte 3: rust: 0 (0x0) != c 64 (0x40)
bad TCSETA value at byte 0: rust: 6 (0x6) != c 24 (0x18)
bad TCSETA value at byte 1: rust: 84 (0x54) != c 116 (0x74)
bad TCSETA value at byte 2: rust: 0 (0x0) != c 20 (0x14)
bad TCSETA value at byte 3: rust: 0 (0x0) != c 128 (0x80)
bad TCSETAW value at byte 0: rust: 7 (0x7) != c 25 (0x19)
bad TCSETAW value at byte 1: rust: 84 (0x54) != c 116 (0x74)
bad TCSETAW value at byte 2: rust: 0 (0x0) != c 20 (0x14)
bad TCSETAW value at byte 3: rust: 0 (0x0) != c 128 (0x80)
bad TCSETAF value at byte 0: rust: 8 (0x8) != c 28 (0x1c)
bad TCSETAF value at byte 1: rust: 84 (0x54) != c 116 (0x74)
bad TCSETAF value at byte 2: rust: 0 (0x0) != c 20 (0x14)
bad TCSETAF value at byte 3: rust: 0 (0x0) != c 128 (0x80)
bad TCSBRK value at byte 0: rust: 9 (0x9) != c 29 (0x1d)
bad TCSBRK value at byte 1: rust: 84 (0x54) != c 116 (0x74)
bad TCSBRK value at byte 3: rust: 0 (0x0) != c 32 (0x20)
bad TCXONC value at byte 0: rust: 10 (0xa) != c 30 (0x1e)
bad TCXONC value at byte 1: rust: 84 (0x54) != c 116 (0x74)
bad TCXONC value at byte 3: rust: 0 (0x0) != c 32 (0x20)
bad TCFLSH value at byte 0: rust: 11 (0xb) != c 31 (0x1f)
bad TCFLSH value at byte 1: rust: 84 (0x54) != c 116 (0x74)
bad TCFLSH value at byte 3: rust: 0 (0x0) != c 32 (0x20)
bad TIOCINQ value at byte 0: rust: 27 (0x1b) != c 127 (0x7f)
bad TIOCINQ value at byte 1: rust: 84 (0x54) != c 102 (0x66)
bad TIOCINQ value at byte 2: rust: 0 (0x0) != c 4 (0x4)
bad TIOCINQ value at byte 3: rust: 0 (0x0) != c 64 (0x40)
bad TIOCGPGRP value at byte 0: rust: 15 (0xf) != c 119 (0x77)
bad TIOCGPGRP value at byte 1: rust: 84 (0x54) != c 116 (0x74)
bad TIOCGPGRP value at byte 2: rust: 0 (0x0) != c 4 (0x4)
bad TIOCGPGRP value at byte 3: rust: 0 (0x0) != c 64 (0x40)
bad TIOCSPGRP value at byte 0: rust: 16 (0x10) != c 118 (0x76)
bad TIOCSPGRP value at byte 1: rust: 84 (0x54) != c 116 (0x74)
bad TIOCSPGRP value at byte 2: rust: 0 (0x0) != c 4 (0x4)
bad TIOCSPGRP value at byte 3: rust: 0 (0x0) != c 128 (0x80)
bad TIOCOUTQ value at byte 0: rust: 17 (0x11) != c 115 (0x73)
bad TIOCOUTQ value at byte 1: rust: 84 (0x54) != c 116 (0x74)
bad TIOCOUTQ value at byte 2: rust: 0 (0x0) != c 4 (0x4)
bad TIOCOUTQ value at byte 3: rust: 0 (0x0) != c 64 (0x40)
bad TIOCGWINSZ value at byte 0: rust: 19 (0x13) != c 104 (0x68)
bad TIOCGWINSZ value at byte 1: rust: 84 (0x54) != c 116 (0x74)
bad TIOCGWINSZ value at byte 2: rust: 0 (0x0) != c 8 (0x8)
bad TIOCGWINSZ value at byte 3: rust: 0 (0x0) != c 64 (0x40)
bad TIOCSWINSZ value at byte 0: rust: 20 (0x14) != c 103 (0x67)
bad TIOCSWINSZ value at byte 1: rust: 84 (0x54) != c 116 (0x74)
bad TIOCSWINSZ value at byte 2: rust: 0 (0x0) != c 8 (0x8)
bad TIOCSWINSZ value at byte 3: rust: 0 (0x0) != c 128 (0x80)
bad FIONREAD value at byte 0: rust: 27 (0x1b) != c 127 (0x7f)
bad FIONREAD value at byte 1: rust: 84 (0x54) != c 102 (0x66)
bad FIONREAD value at byte 2: rust: 0 (0x0) != c 4 (0x4)
bad FIONREAD value at byte 3: rust: 0 (0x0) != c 64 (0x40)
bad ipc_perm size: rust: 56 (0x38) != c 48 (0x30)
bad field offset __seq of ipc_perm: rust: 28 (0x1c) != c 24 (0x18)
bad field type __seq of ipc_perm: rust: 0x1c != c 0x18
bad shmid_ds size: rust: 120 (0x78) != c 112 (0x70)
bad field size shm_perm of shmid_ds: rust: 56 (0x38) != c 48 (0x30)
bad field offset shm_segsz of shmid_ds: rust: 56 (0x38) != c 72 (0x48)
bad field type shm_segsz of shmid_ds: rust: 0x38 != c 0x48
bad field offset shm_atime of shmid_ds: rust: 64 (0x40) != c 48 (0x30)
bad field type shm_atime of shmid_ds: rust: 0x40 != c 0x30
bad field offset shm_dtime of shmid_ds: rust: 72 (0x48) != c 56 (0x38)
bad field type shm_dtime of shmid_ds: rust: 0x48 != c 0x38
bad field offset shm_ctime of shmid_ds: rust: 80 (0x50) != c 64 (0x40)
bad field type shm_ctime of shmid_ds: rust: 0x50 != c 0x40
bad field offset shm_cpid of shmid_ds: rust: 88 (0x58) != c 80 (0x50)
bad field type shm_cpid of shmid_ds: rust: 0x58 != c 0x50
bad field offset shm_lpid of shmid_ds: rust: 92 (0x5c) != c 84 (0x54)
bad field type shm_lpid of shmid_ds: rust: 0x5c != c 0x54
bad field offset shm_nattch of shmid_ds: rust: 96 (0x60) != c 88 (0x58)
bad field type shm_nattch of shmid_ds: rust: 0x60 != c 0x58

Add rumprun CI

It looks like the rumprun target for the compiler is pretty cool, can we add CI for it to make sure the bindings here are correct? There's a few steps to this:

  • The CI needs to be able to get a Rust compiler that can target rumprun. This should be relatively easy, however, as we can just pin to a particular nightly and upload the target libraries (e.g. what iOS does today).
  • CI needs to be able to run the resulting binary, but if I understand rumprun correctly that should in theory be possible through just using qemu?

cc @gandro

freopen() appears to be unusable (No stdin/stdout/stderr consts)

freopen() is the POSIX libc function for redirecting stdin, stdout & stderr. The libc function takes a value of libc::FILE for the file field. libc::FILE is an empty enum, and there are no consts for stdin/stdout/stderr as there are in C. I cannot figure out how to call freopen() correctly.

Is this a genuine bug or am I missing the correct way to do this?

libc::c_void and std::os::raw::c_void are incompatible

extern crate libc;

use std::os::raw;
use std::ptr;

fn main() {
    let a: *mut raw::c_void = ptr::null_mut();
    let b: *mut libc::c_void = a;
}
error: mismatched types:
 expected `*mut libc::c_void`,
    found `*mut std::os::raw::c_void`
(expected enum `libc::c_void`,
    found enum `std::os::raw::c_void`)

Since c_void is defined in the standard library, I'd expect this crate to be compatible with it. Could we change libc::c_void to be a re-export of std::os::raw::c_void?

libc 0.1.9 includes an incompatible change

libc 0.1.9 includes at least one incompatible change over 0.1.8 (a change to the function signature of libc::funcs::bsd44::ioctl). According to Rust's version of semver, the 0.1.9 release should have incremented the minor version number.

libc 0.1.11 does not compile on stable release channel

$ rustc --version
rustc 1.3.0 (9a92aaf19 2015-09-15)
$ cargo --version
cargo 0.4.0-nightly (553b363 2015-08-03) (built 2015-08-02)
$ tail -2 Cargo.toml
[dependencies]
libc = "0.1.11"
$ cargo build
   Compiling libc v0.1.11
/Users/michael/.multirust/toolchains/stable/cargo/registry/src/github.com-0a35038f75765ae4/libc-0.1.11/rust/src/liblibc/lib.rs:27:1: 27:31 error: #[feature] may not be used on the stable release channel
/Users/michael/.multirust/toolchains/stable/cargo/registry/src/github.com-0a35038f75765ae4/libc-0.1.11/rust/src/liblibc/lib.rs:27 #![feature(cfg_target_vendor)]
                                                                                                                                  ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
error: aborting due to previous error
Could not compile `libc`.

To learn more, run the command again with --verbose.

This was likely caused by rust-lang/rust@c099cfa.

0.1.10 still works.

$ tail -2 Cargo.toml
[dependencies]
libc = "=0.1.10"
$ cargo build
    Updating registry `https://github.com/rust-lang/crates.io-index`
   Compiling libc v0.1.10
   Compiling foo v0.1.0 (file:///Users/michael/tmp/foo)

Explicitly namespace OS-specific definitions

There are reexports at the top level that are only available in Unix or Windows:

#[cfg(unix)] pub use consts::os::sysconf::*;

#[cfg(unix)] pub use funcs::posix88::mman::*;
#[cfg(unix)] pub use funcs::posix88::dirent::*;
#[cfg(unix)] pub use funcs::posix88::net::*;
#[cfg(unix)] pub use funcs::posix01::stat_::*;
#[cfg(unix)] pub use funcs::posix01::unistd::*;
#[cfg(unix)] pub use funcs::posix01::resource::*;


#[cfg(windows)] pub use funcs::extra::kernel32::*;
#[cfg(windows)] pub use funcs::extra::winsock::*;
#[cfg(windows)] pub use funcs::extra::msvcrt::*;

For clarity, and following the convention in std, these are better exported for public use in explicitly OS-specific modules os::unix and os::windows, and the top-level reexports deprecated.

build.rs should be used

We should be using build.rs to link to the relevant external libraries instead of using #[link] extern{} thing.

Include build instructions

It doesn't appear to be as simple as "git clone;cargo build" because there's some git subtree stuff needed to pull in from the main rust git? A little hint on this would be great 😄

MS_RMT_MASK changed in Linux 4.0

Hi,
In Linux < 4.0, the MS_RMT_MASK is correct,
in Linux >= 4.0, the MS_RMT_MASK was changed to 0x2800051 to support the lazytime option.

I needed to change that in order to make the test run here. Probably this is the more compatible way as well, but I'm not sure if I can just change it without breaking tests running on older kernels...?

Verify libc builds with --cfg stdbuild

Android CI only check whether tests can be run and pass, but do not check whether library actually builds under Android.

This is important to test, because e.g. librt does not exist in Android devkit (and liblibc does not actually use it either) and we still try to link to it since #66.

Travis CI Mac and MIPS builds fail for unmodified master

In pull request #128, the Travis CI builds failed in a way that didn't seem to have anything to do with my patch, so I reverted my changes and re-pushed with a tree identical to master. The same builds failed in the same way.

According to the build results, the Mac ARCH=x86_64 build fails with the following message:

/Users/travis/.cargo/registry/src/github.com-88ac128001ac3a9a/bitflags-0.3.3/src/lib.rs:1:1: 1:1 error: the crate std has been compiled with rustc 1.7.0-nightly (d4b67cd7c 2016-01-01), which is incompatible with this version of rustc [E0514]

The Mac ARCH=i686 build fails with the message:

src/lib.rs:1:1: 1:1 error: the crate std has been compiled with rustc 1.7.0-nightly (d4b67cd7c 2016-01-01), which is incompatible with this version of rustc [E0514]

and the TARGET=mips-unknown-linux-gnu build fails with the messages:

/usr/lib/gcc/mips-linux-gnu/4.4.5/../../../../mips-linux-gnu/bin/ld: Dwarf Error: found dwarf version '4', this reader only handles version 2 and 3 information.
/usr/lib/gcc/mips-linux-gnu/4.4.5/../../../../mips-linux-gnu/bin/ld: Dwarf Error: found dwarf version '0', this reader only handles version 2 and 3 information.
/home/travis/rust/lib/rustlib/mips-unknown-linux-gnu/lib/liballoc_jemalloc-17a8ccbd.rlib(jemalloc.pic.o): In function malloc_conf_init': /buildslave/rust-buildbot/slave/nightly-dist-rustc-cross-linux/build/src/jemalloc/src/jemalloc.c:(.text.malloc_conf_init+0x94): undefined reference tosecure_getenv'
/usr/lib/gcc/mips-linux-gnu/4.4.5/../../../../mips-linux-gnu/bin/ld: Dwarf Error: found dwarf version '0', this reader only handles version 2 and 3 information.
/usr/lib/gcc/mips-linux-gnu/4.4.5/../../../../mips-linux-gnu/bin/ld: Dwarf Error: found dwarf version '3072', this reader only handles version 2 and 3 information.
/buildslave/rust-buildbot/slave/nightly-dist-rustc-cross-linux/build/src/jemalloc/src/jemalloc.c:(.text.malloc_conf_init+0x98): undefined reference to `secure_getenv'
collect2: ld returned 1 exit status

after many warnings similar to:

/usr/lib/gcc/mips-linux-gnu/4.4.5/../../../../mips-linux-gnu/bin/ld: Warning: /home/travis/build/rust-lang-nursery/libc/libc-test/target/mips-unknown-linux-gnu/debug/libc_test uses hard float, /home/travis/rust/lib/rustlib/mips-unknown-linux-gnu/lib/libcompiler-rt.a(mulodi4.o) uses soft float

Can we have windows in_addr and friends back?

c4d4c70 removed a bunch of Windows-specific stuff, the view presumably being that it all better belonged in winapi.

Did this overshoot, though, in removing in_addr and friends? Is in_addr really a Windows-specific API?

For those of us trying to write cross-platform low-level code it's a right pain to have to deal with a libc::in_addr on unix and whatever the winapi equivalent is on windows.

Specifically the ones that I care about are the in_addr, in6_addr, sockaddr, sockaddr_in and sockaddr_in6.

Default trait for addrinfo?

Hi!

Getting my feet wet with Rust here :-) I ran into a slight inconvenience when using a addrinfo struct for passing it as hints for getaddrinfo: different platforms have different fields, so fully initializing the struct would requite some [cfg] trickery, if I'm not mistaken.

So, I was thinking that adding the Default trait to addrinfo would help here, since I could write something like:

let mut hints: libc::addrinfo = Default::default();
hints.ai_family = af;
hints.ai_socktype = typ;
hints.ai_protocol = proto;

vs

    let hints = libc::addrinfo {
        ai_family : af,
        ai_socktype : typ,
        ai_protocol : proto,
        ai_flags : 0,
        ai_addrlen : 0,
        ai_addr : ptr::null_mut(),
        ai_canonname : ptr::null_mut(),
        ai_next : ptr::null_mut(),
    };

Does this make any sense? If so, I'd be happy to try and make a PR :-)

Thanks!

netbsd doesn't declare pthread_setname_np, which libstd uses

Cross-Compiling current rustc libstd to netbsd fails with this (actual target being x86_64-rumprun-netbsd:

src/libstd/sys/unix/thread.rs:124:13: 124:37 error: unresolved name `libc::pthread_setname_np` [E0425]
src/libstd/sys/unix/thread.rs:124             libc::pthread_setname_np(libc::pthread_self(), cname.as_ptr(),

netbsd documents the function, so adding it should work.

Passing c_chars to C/C++ results in random gibberish

Using CString, I am passing c_chars to a function in C++ (defined with extern "C" of course). I tried debugging and on the Rust side, the strings get printed correctly, while on the C++ side it results in
^X0�;�^? @��D�^?. Sometimes only one argument gets corrupted, sometimes two (like here). The weirdest thing is that after this, the arguments get passed correctly, but not to the right place. So if I have 4 arguments in C and the first 2 get corrupted, the third one will actually be the value of the fist one in Rust.
Is this a nul terminator issue? Quoting the CString documentation:

An instance of this type is a static guarantee that the underlying bytes contain no interior 0 bytes and the final byte is 0.

Always depends on std when built with cargo

The following lines mean that libc always depends on std when built with cargo...

#![cfg_attr(not(feature = "cargo-build"), no_std)]

...

#[cfg(feature = "cargo-build")] extern crate std as core;
#[cfg(not(feature = "cargo-build"))] extern crate core;

... which doesn't work when using cargo with a no_std crate and an alternative target (without a cross-compiled std crate, but that's ultimately not what I want anyway).

In an attempt to hack around this, I added the following to my Cargo.toml:

[dependencies.libc]
version = "0.1"
features = []
default-features = false

But this is the build command line:

rustc /home/jdub/.cargo/registry/src/github.com-0a35038f75765ae4/libc-0.1.8/rust/src/liblibc/lib.rs --crate-name libc --crate-type lib -g --cfg feature="default" --cfg feature="cargo-build" -C metadata=ef5cbad4ef5c7a1e -C extra-filename=-ef5cbad4ef5c7a1e --out-dir /home/jdub/src/derp/acpica/target/i686-unknown-linux-gnu/debug/deps --emit=dep-info,link --target ../derp/i686-unknown-linux-gnu.json -L dependency=/home/jdub/src/derp/acpica/target/i686-unknown-linux-gnu/debug/deps -L dependency=/home/jdub/src/derp/acpica/target/i686-unknown-linux-gnu/debug/deps -Awarnings

Part of the challenge here is that the libc crate is just a slim wrapper around the Rust's liblibc, so changing things is probably difficult.

Thoughts or suggestions, though? Should I not use the libc crate at all?

Outdated MIPS toolchain

I think we waste too much time on workarounds for its problems. It was built when debian squeezy was all the rage (almost 5 years ago). Let's just drop it and use something more modern.

Linux-mips website has a list of toolchains we can use.
I created a branch using CodeScape MIPS SDK. It currently fails on linking stage, but I thought it would be a good idea to ask of your opinion before researching it further.

Support SOCK_NONBLOCK and SOCK_CLOEXEC

These values provide convenience when created sockets via socket to add non blocking and closing--on-exec flags as it saves calling fcntl(2).

I am happy to write a patch for this if you accept this issue. There are some gotchas because

SOCK_NONBLOCK != O_NONBLOCK
SOCK_CLOEXEC != FD_CLOEXEC

for certain architectures.

This is due to socket flag state would be be overridden so it uses a different enumerate value.

Missing select family of functions

Looks like this belongs either in bsd42 or posix01.

From select(2) of Linux man pages:

/* According to POSIX.1-2001 */
#include <sys/select.h>

/* According to earlier standards */
#include <sys/time.h>
#include <sys/types.h>
#include <unistd.h>

int select(int nfds, fd_set *readfds, fd_set *writefds,
           fd_set *exceptfds, struct timeval *timeout);

void FD_CLR(int fd, fd_set *set);
int  FD_ISSET(int fd, fd_set *set);
void FD_SET(int fd, fd_set *set);
void FD_ZERO(fd_set *set);

From select(2) of BSD System Calls Manual:

     #include <sys/select.h>

     void
     FD_CLR(fd, fd_set *fdset);

     void
     FD_COPY(fd_set *fdset_orig, fd_set *fdset_copy);

     int
     FD_ISSET(fd, fd_set *fdset);

     void
     FD_SET(fd, fd_set *fdset);

     void
     FD_ZERO(fd_set *fdset);

     int
     select(int nfds, fd_set *restrict readfds, fd_set *restrict writefds, fd_set *restrict errorfds, struct timeval *restrict timeout);

And then on Windows, which only works for sockets:

int select(
  _In_    int                  nfds,
  _Inout_ fd_set               *readfds,
  _Inout_ fd_set               *writefds,
  _Inout_ fd_set               *exceptfds,
  _In_    const struct timeval *timeout
);

With FD_CLR, FD_ISSET, FD_SET, and FD_ZERO defined as macros on most (all?) platforms.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.