Skip to content

Commit

Permalink
Merge branch 'rust-lang:main' into linux_wireless
Browse files Browse the repository at this point in the history
  • Loading branch information
Brijeshkrishna committed Jan 5, 2024
2 parents 539a194 + e077dbf commit b452d97
Show file tree
Hide file tree
Showing 56 changed files with 2,056 additions and 315 deletions.
14 changes: 7 additions & 7 deletions .cirrus.yml
Original file line number Diff line number Diff line change
@@ -1,21 +1,21 @@
task:
name: nightly x86_64-unknown-freebsd-12
name: nightly x86_64-unknown-freebsd-13
freebsd_instance:
image_family: freebsd-12-4
image_family: freebsd-13-2
setup_script:
- pkg install -y libnghttp2 curl
- curl https://sh.rustup.rs -sSf --output rustup.sh
- sh rustup.sh --default-toolchain nightly -y --profile=minimal
- sh rustup.sh -y --default-toolchain nightly --profile=minimal
- . $HOME/.cargo/env
test_script:
- . $HOME/.cargo/env
- LIBC_CI=1 sh ci/run.sh x86_64-unknown-freebsd
- sh ci/run.sh x86_64-unknown-freebsd

task:
name: nightly x86_64-unknown-freebsd-13
name: nightly x86_64-unknown-freebsd-14
freebsd_instance:
image_family: freebsd-13-2
image: freebsd-14-0-release-amd64-ufs
setup_script:
- pkg install -y libnghttp2 curl
- curl https://sh.rustup.rs -sSf --output rustup.sh
Expand All @@ -27,9 +27,9 @@ task:
- sh ci/run.sh x86_64-unknown-freebsd

task:
name: nightly x86_64-unknown-freebsd-14
name: nightly x86_64-unknown-freebsd-15
freebsd_instance:
image: freebsd-14-0-rc1-amd64
image_family: freebsd-15-0-snap
setup_script:
- pkg install -y libnghttp2 curl
- curl https://sh.rustup.rs -sSf --output rustup.sh
Expand Down
11 changes: 7 additions & 4 deletions .github/PULL_REQUEST_TEMPLATE.md
Original file line number Diff line number Diff line change
@@ -1,11 +1,14 @@
Thanks for considering submitting a PR!

We have the [contribution guide](https://github.com/rust-lang/libc/blob/main/CONTRIBUTING.md). Please read it if you're new here!

Here's a checklist for things that will be checked during review or continuous integration.

- \[ ] Edit corresponding file(s) under `libc-test/semver` when you add/remove item(s)
- \[ ] Your PR doesn't contain any *unstable* values like `*LAST` or `*MAX` (see [#3131](https://github.com/rust-lang/libc/issues/3131))
- \[ ] If your PR increments version number, it must not contain any other changes
- \[ ] `rustc ci/style.rs && ./style src`
- \[ ] Edit corresponding file(s) under `libc-test/semver` when you add/remove item(s), e.g. edit `linux.txt` if you add an item to `src/unix/linux_like/linux/mod.rs`
- \[ ] Your PR doesn't contain any private or *unstable* values like `*LAST` or `*MAX` (see [#3131](https://github.com/rust-lang/libc/issues/3131))
- \[ ] If your PR has a breaking change, please clarify it
- \[ ] If your PR increments version number, it must NOT contain any other changes (otherwise a release could be delayed)
- \[ ] Make sure `ci/style.sh` passes
- \[ ] `cd libc-test && cargo test`
- (this might fail on your env due to environment difference between your env and CI. Ignore failures if you are not sure)

Expand Down
10 changes: 4 additions & 6 deletions .github/workflows/bors.yml
Original file line number Diff line number Diff line change
Expand Up @@ -73,12 +73,10 @@ jobs:
ARCH_BITS: 64
ARCH: x86_64
- target: x86_64-pc-windows-msvc
# Disabled because broken:
# https://github.com/rust-lang/libc/issues/1592
#- target: i686-pc-windows-gnu
# env:
# ARCH_BITS: 32
# ARCH: i686
- target: i686-pc-windows-gnu
env:
ARCH_BITS: 32
ARCH: i686
- target: i686-pc-windows-msvc
steps:
- uses: rust-lang/simpleinfra/github-actions/cancel-outdated-builds@HEAD
Expand Down
10 changes: 4 additions & 6 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -58,12 +58,10 @@ jobs:
ARCH_BITS: 64
ARCH: x86_64
- target: x86_64-pc-windows-msvc
# Disabled because broken:
# https://github.com/rust-lang/libc/issues/1592
#- target: i686-pc-windows-gnu
# env:
# ARCH_BITS: 32
# ARCH: i686
- target: i686-pc-windows-gnu
env:
ARCH_BITS: 32
ARCH: i686
- target: i686-pc-windows-msvc
steps:
- uses: actions/checkout@v4
Expand Down
2 changes: 1 addition & 1 deletion CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ We have two automated tests running on [GitHub Actions](https://github.com/rust-
- `cd libc-test && cargo test`
- Use the `skip_*()` functions in `build.rs` if you really need a workaround.
2. Style checker
- `rustc ci/style.rs && ./style src`
- [`sh ci/style.sh`](https://github.com/rust-lang/libc/blob/main/ci/style.sh)

## Breaking change policy

Expand Down
3 changes: 2 additions & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "libc"
version = "0.2.150"
version = "0.2.151"
authors = ["The Rust Project Developers"]
license = "MIT OR Apache-2.0"
readme = "README.md"
Expand All @@ -19,6 +19,7 @@ Raw FFI bindings to platform libraries like libc.
features = ["const-extern-fn", "extra_traits"]
default-target = "x86_64-unknown-linux-gnu"
targets = [
"aarch64-apple-darwin",
"aarch64-apple-ios",
"aarch64-linux-android",
"aarch64-pc-windows-msvc",
Expand Down
8 changes: 7 additions & 1 deletion build.rs
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ const ALLOWED_CFGS: &'static [&'static str] = &[
"freebsd12",
"freebsd13",
"freebsd14",
"freebsd15",
"libc_align",
"libc_cfg_target_vendor",
"libc_const_extern_fn",
Expand Down Expand Up @@ -70,6 +71,7 @@ fn main() {
Some(12) if libc_ci || rustc_dep_of_std => set_cfg("freebsd12"),
Some(13) if libc_ci => set_cfg("freebsd13"),
Some(14) if libc_ci => set_cfg("freebsd14"),
Some(15) if libc_ci => set_cfg("freebsd15"),
Some(_) | None => set_cfg("freebsd11"),
}

Expand Down Expand Up @@ -252,6 +254,7 @@ fn which_freebsd() -> Option<i32> {
s if s.starts_with("12") => Some(12),
s if s.starts_with("13") => Some(13),
s if s.starts_with("14") => Some(14),
s if s.starts_with("15") => Some(15),
_ => None,
}
}
Expand All @@ -274,7 +277,10 @@ fn emcc_version_code() -> Option<u64> {
return None;
}
let version = stdout.unwrap();
let mut pieces = version.trim().split('.');

// Some Emscripten versions come with `-git` attached, so split the
// version string also on the `-` char.
let mut pieces = version.trim().split(|c| c == '.' || c == '-');

let major = pieces.next().and_then(|x| x.parse().ok()).unwrap_or(0);
let minor = pieces.next().and_then(|x| x.parse().ok()).unwrap_or(0);
Expand Down
7 changes: 3 additions & 4 deletions libc-test/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "libc-test"
version = "0.2.150"
version = "0.2.151"
authors = ["The Rust Project Developers"]
license = "MIT OR Apache-2.0"
build = "build.rs"
Expand All @@ -12,12 +12,11 @@ A test crate for the libc crate.

[dependencies.libc]
path = ".."
version = "0.2.150"
version = "0.2.151"
default-features = false

[build-dependencies]
# FIXME: 1.0.84 has a bug about macOS version detection.
cc = "=1.0.83"
cc = "1.0.83"
# FIXME: Use fork ctest until the maintainer gets back.
ctest2 = "0.4.3"

Expand Down

0 comments on commit b452d97

Please sign in to comment.