diff options
-rw-r--r-- | .github/workflows/bors.yml | 26 | ||||
-rw-r--r-- | ci/semver.sh | 75 | ||||
-rw-r--r-- | libc-test/build.rs | 5 | ||||
-rw-r--r-- | libc-test/semver/apple.txt | 2 | ||||
-rw-r--r-- | libc-test/semver/linux-gnu.txt | 2 | ||||
-rw-r--r-- | src/unix/bsd/apple/mod.rs | 8 | ||||
-rw-r--r-- | src/unix/nto/mod.rs | 1 |
7 files changed, 16 insertions, 103 deletions
diff --git a/.github/workflows/bors.yml b/.github/workflows/bors.yml index fc9a5b6ec3..49a06de686 100644 --- a/.github/workflows/bors.yml +++ b/.github/workflows/bors.yml @@ -317,32 +317,6 @@ jobs: run: LIBC_CI=1 TOOLCHAIN=${{ matrix.toolchain }} WIN_TARGET=${{ matrix.target }} sh ./ci/build.sh shell: bash - semver_linux: - if: ${{ false }} # This is currently broken - name: Semver Linux - runs-on: ubuntu-22.04 - continue-on-error: true - steps: - - uses: actions/checkout@v3 - - name: Setup Rust toolchain - # Should update the semverver revision in semver.sh if we touch nightly ver. - run: TOOLCHAIN=nightly-2022-05-23 sh ./ci/install-rust.sh - - name: Check breaking changes - run: sh ci/semver.sh linux - - semver_macos: - if: ${{ false }} # This is currently broken - name: Semver macOS - runs-on: macos-12 - continue-on-error: true - steps: - - uses: actions/checkout@v3 - - name: Setup Rust toolchain - # Pin nightly version to make semverver compilable. - run: TOOLCHAIN=nightly-2022-05-23 sh ./ci/install-rust.sh - - name: Check breaking changes - run: sh ci/semver.sh macos - docs: permissions: actions: write # to cancel workflows (rust-lang/simpleinfra/github-actions/cancel-outdated-builds) diff --git a/ci/semver.sh b/ci/semver.sh deleted file mode 100644 index 9f81d335ca..0000000000 --- a/ci/semver.sh +++ /dev/null @@ -1,75 +0,0 @@ -#!/usr/bin/env sh - -# Checks that libc does not contain breaking changes for the following targets. - -set -ex - -OS=${1} - -echo "Testing Semver on ${OS}" - -if ! rustc --version | grep -E "nightly" ; then - echo "Building semverver requires a nightly Rust toolchain" - exit 1 -fi - -rustup component add rustc-dev llvm-tools-preview - -# Should update the nightly version in bors CI config if we touch this. -cargo install semverver --version=0.1.50 - -TARGETS= -case "${OS}" in - *linux*) - TARGETS="\ -aarch64-unknown-fuchsia \ -aarch64-linux-android \ -aarch64-unknown-linux-gnu \ -aarch64-unknown-linux-musl \ -armv7-linux-androideabi \ -armv7-unknown-linux-gnueabihf \ -i586-unknown-linux-gnu \ -i586-unknown-linux-musl \ -i686-linux-android \ -i686-unknown-freebsd \ -i686-unknown-linux-gnu \ -i686-unknown-linux-musl \ -i686-pc-windows-gnu \ -x86_64-unknown-freebsd \ -x86_64-unknown-linux-gnu \ -x86_64-unknown-linux-musl \ -x86_64-unknown-netbsd \ -x86_64-pc-solaris \ -x86_64-unknown-fuchsia \ -x86_64-pc-windows-gnu \ -x86_64-unknown-linux-gnux32 \ -x86_64-unknown-redox \ -x86_64-fortanix-unknown-sgx \ -wasm32-unknown-unknown \ -" - ;; - *macos*) - TARGETS="\ -aarch64-apple-ios \ -x86_64-apple-darwin \ -x86_64-apple-ios \ -" - ;; -esac - -for TARGET in $TARGETS; do - # FIXME: rustup often fails to download some artifacts due to network - # issues, so we retry this N times. - N=5 - n=0 - until [ $n -ge $N ] - do - if rustup target add "${TARGET}" ; then - break - fi - n=$((n+1)) - sleep 1 - done - - cargo semver --api-guidelines --target="${TARGET}" -done diff --git a/libc-test/build.rs b/libc-test/build.rs index 3534579425..4e67c6eb5d 100644 --- a/libc-test/build.rs +++ b/libc-test/build.rs @@ -240,6 +240,7 @@ fn test_apple(target: &str) { "pthread.h", "pthread_spis.h", "pthread/introspection.h", + "pthread/spawn.h", "pthread/stack_np.h", "pwd.h", "regex.h", @@ -2274,6 +2275,10 @@ fn test_freebsd(target: &str) { // Added in FreeBSD 14 "IFCAP_NV" if Some(14) > freebsd_ver => true, + // Removed in https://reviews.freebsd.org/D38574 and https://reviews.freebsd.org/D38822 + // We maybe should deprecate them once a stable release ships them. + "IP_BINDMULTI" | "IP_RSS_LISTEN_BUCKET" => true, + _ => false, } }); diff --git a/libc-test/semver/apple.txt b/libc-test/semver/apple.txt index 106a0d2eaf..b697b893ae 100644 --- a/libc-test/semver/apple.txt +++ b/libc-test/semver/apple.txt @@ -2033,12 +2033,14 @@ posix_spawn_file_actions_destroy posix_spawn_file_actions_init posix_spawn_file_actions_t posix_spawnattr_destroy +posix_spawnattr_get_qos_class_np posix_spawnattr_getarchpref_np posix_spawnattr_getflags posix_spawnattr_getpgroup posix_spawnattr_getsigdefault posix_spawnattr_getsigmask posix_spawnattr_init +posix_spawnattr_set_qos_class_np posix_spawnattr_setarchpref_np posix_spawnattr_setflags posix_spawnattr_setpgroup diff --git a/libc-test/semver/linux-gnu.txt b/libc-test/semver/linux-gnu.txt index 736a8d2a56..f34e0681c3 100644 --- a/libc-test/semver/linux-gnu.txt +++ b/libc-test/semver/linux-gnu.txt @@ -669,4 +669,4 @@ strftime strptime dirname posix_basename -gnu_basename
\ No newline at end of file +gnu_basename diff --git a/src/unix/bsd/apple/mod.rs b/src/unix/bsd/apple/mod.rs index 540bf9dcb5..519a993465 100644 --- a/src/unix/bsd/apple/mod.rs +++ b/src/unix/bsd/apple/mod.rs @@ -5563,6 +5563,14 @@ extern "C" { subpref: *mut ::cpu_subtype_t, ocount: *mut ::size_t, ) -> ::c_int; + pub fn posix_spawnattr_set_qos_class_np( + attr: *mut posix_spawnattr_t, + qos_class: ::qos_class_t, + ) -> ::c_int; + pub fn posix_spawnattr_get_qos_class_np( + attr: *const posix_spawnattr_t, + qos_class: *mut ::qos_class_t, + ) -> ::c_int; pub fn posix_spawn_file_actions_init(actions: *mut posix_spawn_file_actions_t) -> ::c_int; pub fn posix_spawn_file_actions_destroy(actions: *mut posix_spawn_file_actions_t) -> ::c_int; diff --git a/src/unix/nto/mod.rs b/src/unix/nto/mod.rs index 45e97ceace..b8fcf9df8e 100644 --- a/src/unix/nto/mod.rs +++ b/src/unix/nto/mod.rs @@ -2748,7 +2748,6 @@ extern "C" { pub fn strerror_r(errnum: ::c_int, buf: *mut c_char, buflen: ::size_t) -> ::c_int; pub fn abs(i: ::c_int) -> ::c_int; - pub fn atof(s: *const ::c_char) -> ::c_double; pub fn labs(i: ::c_long) -> ::c_long; pub fn rand() -> ::c_int; pub fn srand(seed: ::c_uint); |