- Oct 25, 2020
-
-
Yuki Okushi authored
-
- Oct 16, 2020
-
-
Eduardo Sánchez Muñoz authored
-
- Aug 20, 2020
-
-
Josh Triplett authored
-
- Jul 27, 2020
-
-
Glenn Hope authored
Fix styling Re-run CI
-
- Oct 29, 2019
-
-
Aaron Hill authored
Co-Authored-By:
gnzlbg <gnzlbg@users.noreply.github.com>
-
- Oct 28, 2019
-
-
Aaron Hill authored
Add a new feature to enable this, since `const extern fn` support is unstable
-
- May 24, 2019
-
-
gnzlbg authored
Closes #981 .
-
- Feb 20, 2019
-
-
gnzlbg authored
-
- Feb 13, 2019
-
-
gnzlbg authored
-
- Feb 07, 2019
-
-
gnzlbg authored
This PR fixes the build on all platforms and all Rust version down to the minimum Rust version supported by libc: Rust 1.13.0. The `build.rs` is extended with logic to detect the newer Rust features used by `libc` since Rust 1.13.0: * Rust 1.19.0: `untagged_unions`. APIs using untagged unions are gated on `cfg(libc_unions)` and not available on older Rust versions. * Rust 1.25.0: `repr(align)`. Because `repr(align)` cannot be parsed by older Rust versions, all uses of `repr(align)` are split into `align.rs` and `no_align.rs` modules, which are gated on the `cfg(libc_align)` at the top level. These modules sometimes contain macros that are expanded at the top level to avoid privacy issues (`pub(crate)` is not available in older Rust versions). Closes #1242 . * Rust : `const` `mem::size_of`. These uses are worked around with hardcoded constants on older Rust versions. Also, `repr(packed)` structs cannot automatically `derive()` some traits like `Debug`. These have been moved into `s_no_extra_traits!` and the lint of missing `Debug` implementations on public items is silenced for these. We can manually implement the `extra_traits` for these in a follow up PR. This is tracked in #1243. Also, `extra_traits` does not enable `align` manually anymore. Since `f64::to_bits` is not available in older Rust versions, its usage has been replaced with a `transmute` to an `u64` which is what that method does under the hood. Closes #1232 .
-
gnzlbg authored
-
- Feb 03, 2019
-
-
Bryant Mairs authored
-
- Feb 02, 2019
-
-
Bryant Mairs authored
-
Bryant Mairs authored
-
- Nov 19, 2018
-
-
gnzlbg authored
-
- Nov 10, 2018
-
-
gnzlbg authored
-
- Jul 29, 2018
-
-
Linus Färnstrand authored
-
- Jul 16, 2018
-
-
alesharik authored
-
- Mar 18, 2018
-
-
Francis Gagné authored
The libc crate is used as a dependency of the Rust compiler. Its build system passes `--cfg dox` to all crates when generating their documentation. libc's documentation is generated when the build system is asked to generate the compiler documentation because `cargo doc` automatically documents all dependencies. When the dox configuration option is enabled, libc disables its dependency on the core crate and provides the necessary definitions itself. The dox configuration option is meant for generating documentation for a multitude of targets even if the core crate for that target is not installed. However, when documenting the compiler, it's not necessary to do that; we can just use core or std as usual. This change is motivated by the changes made to the compiler in rust-lang/rust#48171. With these changes, it's necessary to provide implementations of the Clone and Copy traits for some primitive types in the library that defines these traits (previously, these implementations were provided by the compiler). Normally, these traits (and thus the implementations) are provided by core, so any crate that uses `#![no_core]` must now provide its own copy of the implementations. Because libc doesn't provide its own copy of the implementations yet, and because the compiler's build system passes `--cfg dox` to libc, generating the documentation for the compiler fails when generating documentation for libc. By renaming the configuration option, libc will use core or std and will thus have the necessary definitions for the documentation to be generated successfully.
-
- Aug 21, 2017
-
-
Bryant Mairs authored
We now create an additional binary `linux_fcntl` for testing this since there are header conflicts when including all necessary headers. This binary is run on all platforms even though it's empty on all non- Android/non-Linux platforms. Testing has been switched from a custom binary to using a runner-less test (or pair of tests). This means that for local development a simple `cd libc-test && cargo test` will run all the tests. CI has also been updated here to reflect that.
-
- Feb 29, 2016
-
-
Sebastian Wicki authored
Since #[cfg] attributes are short-circuting, cfg_if! should not change the order in which the predicates are listed. This enables the use of unstable cfg attributes in cfg_if!, which is useful when building libstd.
-
- Dec 02, 2015
-
-
Alex Crichton authored
-
- Oct 30, 2015
-
-
Alex Crichton authored
-
- Sep 17, 2015
-
-
Alex Crichton authored
-
- Sep 11, 2015
-
-
Alex Crichton authored
[ci skip]
-
Alex Crichton authored
-
Alex Crichton authored
-