Skip to content

Commit

Permalink
Backed out changeset b499c3ab3eae (bug 1567739) for causing build bus…
Browse files Browse the repository at this point in the history
…tages CLOSED TREE
  • Loading branch information
bogdant-old committed Jul 21, 2019
1 parent 007e942 commit ed4ac30
Show file tree
Hide file tree
Showing 104 changed files with 5,710 additions and 7,792 deletions.
142 changes: 71 additions & 71 deletions Cargo.lock

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion third_party/rust/libc/.cargo-checksum.json

Large diffs are not rendered by default.

9 changes: 4 additions & 5 deletions third_party/rust/libc/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
# When uploading crates to the registry Cargo will automatically
# "normalize" Cargo.toml files for maximal compatibility
# with all versions of Cargo and also rewrite `path` dependencies
# to registry (e.g., crates.io) dependencies
# to registry (e.g. crates.io) dependencies
#
# If you believe there's an error in this file please file an
# issue against the rust-lang/cargo repository. If you're
Expand All @@ -12,7 +12,7 @@

[package]
name = "libc"
version = "0.2.60"
version = "0.2.51"
authors = ["The Rust Project Developers"]
build = "build.rs"
exclude = ["/ci/*", "/.travis.yml", "/appveyor.yml"]
Expand All @@ -30,11 +30,10 @@ optional = true

[features]
align = []
default = ["std"]
default = ["use_std"]
extra_traits = []
rustc-dep-of-std = ["align", "rustc-std-workspace-core"]
std = []
use_std = ["std"]
use_std = []
[badges.appveyor]
project_name = "rust-lang-libs/libc"
repository = "rust-lang/libc"
Expand Down
6 changes: 2 additions & 4 deletions third_party/rust/libc/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -28,15 +28,13 @@ libc = "0.2"

## Features

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

* `extra_traits`: all `struct`s implemented in `libc` are `Copy` and `Clone`.
This feature derives `Debug`, `Eq`, `Hash`, and `PartialEq`.

* **deprecated**: `use_std` is deprecated, and is equivalent to `std`.

## Rust version support

The minimum supported Rust toolchain version is **Rust 1.13.0** . APIs requiring
Expand All @@ -56,7 +54,7 @@ newer Rust features are only available on newer Rust toolchains:
[Platform-specific documentation (master branch)][docs.master].

See
[`ci/build.sh`](https://github.com/rust-lang/libc/blob/master/ci/build.sh)
[`ci/build.sh`](https://github.com/rust-lang/libc/blob/master/libc-test/build.rs)
for the platforms on which `libc` is guaranteed to build for each Rust
toolchain. The test-matrix at [Travis-CI], [Appveyor], and [Cirrus-CI] show the
platforms in which `libc` tests are run.
Expand Down
46 changes: 3 additions & 43 deletions third_party/rust/libc/build.rs
Original file line number Diff line number Diff line change
Expand Up @@ -5,21 +5,9 @@ use std::str;
fn main() {
let rustc_minor_ver =
rustc_minor_version().expect("Failed to get rustc version");
let rustc_dep_of_std = env::var("CARGO_FEATURE_RUSTC_DEP_OF_STD").is_ok();
let align_cargo_feature = env::var("CARGO_FEATURE_ALIGN").is_ok();

if env::var("CARGO_FEATURE_USE_STD").is_ok() {
println!(
"cargo:warning=\"libc's use_std cargo feature is deprecated since libc 0.2.55; \
please consider using the `std` cargo feature instead\""
);
}

if env::var("LIBC_CI").is_ok() {
if let Some(12) = which_freebsd() {
println!("cargo:rustc-cfg=freebsd12");
}
}
let rustc_dep_of_std =
std::env::var("CARGO_FEATURE_RUSTC_DEP_OF_STD").is_ok();
let align_cargo_feature = std::env::var("CARGO_FEATURE_ALIGN").is_ok();

// Rust >= 1.15 supports private module use:
if rustc_minor_ver >= 15 || rustc_dep_of_std {
Expand Down Expand Up @@ -52,11 +40,6 @@ fn main() {
if rustc_minor_ver >= 33 || rustc_dep_of_std {
println!("cargo:rustc-cfg=libc_packedN");
}

// #[thread_local] is currently unstable
if rustc_dep_of_std {
println!("cargo:rustc-cfg=libc_thread_local");
}
}

fn rustc_minor_version() -> Option<u32> {
Expand All @@ -80,26 +63,3 @@ fn rustc_minor_version() -> Option<u32> {

otry!(pieces.next()).parse().ok()
}

fn which_freebsd() -> Option<i32> {
let output = std::process::Command::new("freebsd-version").output().ok();
if output.is_none() {
return None;
}
let output = output.unwrap();
if !output.status.success() {
return None;
}

let stdout = String::from_utf8(output.stdout).ok();
if stdout.is_none() {
return None;
}
let stdout = stdout.unwrap();

match &stdout {
s if s.starts_with("11") => Some(11),
s if s.starts_with("12") => Some(12),
_ => None,
}
}
9 changes: 9 additions & 0 deletions third_party/rust/libc/src/cloudabi/mod.rs
Original file line number Diff line number Diff line change
@@ -1,3 +1,12 @@
pub type int8_t = i8;
pub type int16_t = i16;
pub type int32_t = i32;
pub type int64_t = i64;
pub type uint8_t = u8;
pub type uint16_t = u16;
pub type uint32_t = u32;
pub type uint64_t = u64;

pub type c_schar = i8;
pub type c_uchar = u8;
pub type c_short = i16;
Expand Down
44 changes: 0 additions & 44 deletions third_party/rust/libc/src/fixed_width_ints.rs

This file was deleted.

Loading

0 comments on commit ed4ac30

Please sign in to comment.