diff options
author | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-06-19 09:25:56 +0000 |
---|---|---|
committer | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-06-19 09:25:56 +0000 |
commit | 018c4950b9406055dec02ef0fb52f132e2bb1e2c (patch) | |
tree | a835ebdf2088ef88fa681f8fad45f09922c1ae9a /vendor/errno | |
parent | Adding debian version 1.75.0+dfsg1-5. (diff) | |
download | rustc-018c4950b9406055dec02ef0fb52f132e2bb1e2c.tar.xz rustc-018c4950b9406055dec02ef0fb52f132e2bb1e2c.zip |
Merging upstream version 1.76.0+dfsg1.
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'vendor/errno')
-rw-r--r-- | vendor/errno/.cargo-checksum.json | 2 | ||||
-rw-r--r-- | vendor/errno/CHANGELOG.md | 26 | ||||
-rw-r--r-- | vendor/errno/Cargo.toml | 6 | ||||
-rw-r--r-- | vendor/errno/README.md | 2 | ||||
-rw-r--r-- | vendor/errno/clippy.toml | 2 | ||||
-rw-r--r-- | vendor/errno/src/unix.rs | 28 | ||||
-rw-r--r-- | vendor/errno/src/wasi.rs | 8 |
7 files changed, 52 insertions, 22 deletions
diff --git a/vendor/errno/.cargo-checksum.json b/vendor/errno/.cargo-checksum.json index 15c4378d0..8e3161fc1 100644 --- a/vendor/errno/.cargo-checksum.json +++ b/vendor/errno/.cargo-checksum.json @@ -1 +1 @@ -{"files":{"CHANGELOG.md":"0e7e9b66ccefbe89e04196022c35a799cd6cd9399fc72935efab6b76544d89cc","Cargo.toml":"a93ea470beb86eabc94f7a4bacc40d7837b336a77dc8c02317da75c26386ad88","LICENSE-APACHE":"a60eea817514531668d7e00765731449fe14d059d3249e0bc93b36de45f759f2","LICENSE-MIT":"8764a597675778ddfd4e25f81b08a05dbcf089ac05662df7613fe67f150e3aa2","README.md":"96a40903ea0fe68cf512d176a230f4a37df76de262f047f01a46f31de75402bd","clippy.toml":"2c27890fbf0454bb2405bdb013b1daeb78d57c5844b964bcac9afcc125fa46e4","src/hermit.rs":"ad03355bc4d79c180ab3210e1d3edd538eccaaea8d4f9a9b7eb8a0dc2d39b5df","src/lib.rs":"318f864b8cb9296c85f70f9dfb855c552303630b3a9390f147bb4b581b8d8b5c","src/unix.rs":"dc11866f338b4b40ebafb3fc8a2ac7079ea932fe8090d9cae37e4b10d97fca5a","src/wasi.rs":"c606886ebda52b5dc7682c0f3aaf51e146692455acd5e303812cf0d634589d05","src/windows.rs":"7cbcdb8e74582f357fa945bb1c44c4d19c1a10bec958da1223305bf68ec35baf"},"package":"ac3e13f66a2f95e32a39eaa81f6b95d42878ca0e1db0c7543723dfe12557e860"}
\ No newline at end of file +{"files":{"CHANGELOG.md":"b640a4e74c65505290775558e36ede1968ed26a551edaf7574f661891920ff48","Cargo.toml":"329c6992879c5c2ac32dd09263f4d9cad0da477ac9c44e50e6ae503fd9616467","LICENSE-APACHE":"a60eea817514531668d7e00765731449fe14d059d3249e0bc93b36de45f759f2","LICENSE-MIT":"8764a597675778ddfd4e25f81b08a05dbcf089ac05662df7613fe67f150e3aa2","README.md":"a1817eb8a0b2208d3f3989202b6af03c8261747b281039d4c7790649b587fd0b","clippy.toml":"6409bb805741d8bedfb1e58eb0ce4b63bd1d384ad5e29b7a3c0997a872f31206","src/hermit.rs":"ad03355bc4d79c180ab3210e1d3edd538eccaaea8d4f9a9b7eb8a0dc2d39b5df","src/lib.rs":"318f864b8cb9296c85f70f9dfb855c552303630b3a9390f147bb4b581b8d8b5c","src/unix.rs":"6ee5c13893fa1114fa1782239f2539f1b0a9554e5ed45cf0ee78729145882032","src/wasi.rs":"c83052e5c45c31e2a4630c00a4d0b92f39205774a4d419b4aa5c06dc5992280c","src/windows.rs":"7cbcdb8e74582f357fa945bb1c44c4d19c1a10bec958da1223305bf68ec35baf"},"package":"a258e46cdc063eb8519c00b9fc845fc47bcfca4130e2f08e88665ceda8474245"}
\ No newline at end of file diff --git a/vendor/errno/CHANGELOG.md b/vendor/errno/CHANGELOG.md index fa43eec6e..e3add31bd 100644 --- a/vendor/errno/CHANGELOG.md +++ b/vendor/errno/CHANGELOG.md @@ -1,5 +1,26 @@ # [Unreleased] +# [0.3.8] - 2023-11-27 + +- Update to windows-sys 0.52. + [#91](https://github.com/lambda-fairy/rust-errno/pull/91) + +- Update minimum Rust version to 1.56 + [#91](https://github.com/lambda-fairy/rust-errno/pull/91) + +# [0.3.7] - 2023-11-15 + +- Fix `to_string()` handling for unknown error codes + [#88](https://github.com/lambda-fairy/rust-errno/pull/88) + +# [0.3.6] - 2023-11-07 + +- Add support for tvOS and watchOS + [#84](https://github.com/lambda-fairy/rust-errno/pull/84) + +- Added support for vita target + [#86](https://github.com/lambda-fairy/rust-errno/pull/86) + # [0.3.5] - 2023-10-08 - Use __errno_location on DragonFly BSD @@ -62,7 +83,10 @@ - Optionally support no_std [#31](https://github.com/lambda-fairy/rust-errno/pull/31) -[Unreleased]: https://github.com/lambda-fairy/rust-errno/compare/v0.3.5...HEAD +[Unreleased]: https://github.com/lambda-fairy/rust-errno/compare/v0.3.8...HEAD +[0.3.8]: https://github.com/lambda-fairy/rust-errno/compare/v0.3.7...v0.3.8 +[0.3.7]: https://github.com/lambda-fairy/rust-errno/compare/v0.3.6...v0.3.7 +[0.3.6]: https://github.com/lambda-fairy/rust-errno/compare/v0.3.5...v0.3.6 [0.3.5]: https://github.com/lambda-fairy/rust-errno/compare/v0.3.4...v0.3.5 [0.3.4]: https://github.com/lambda-fairy/rust-errno/compare/v0.3.3...v0.3.4 [0.3.3]: https://github.com/lambda-fairy/rust-errno/compare/v0.3.2...v0.3.3 diff --git a/vendor/errno/Cargo.toml b/vendor/errno/Cargo.toml index d35ef19cd..e1d0bf515 100644 --- a/vendor/errno/Cargo.toml +++ b/vendor/errno/Cargo.toml @@ -11,9 +11,9 @@ [package] edition = "2018" -rust-version = "1.48" +rust-version = "1.56" name = "errno" -version = "0.3.5" +version = "0.3.8" authors = ["Chris Wong <lambda.fairy@gmail.com>"] description = "Cross-platform interface to the `errno` variable." documentation = "https://docs.rs/errno" @@ -42,7 +42,7 @@ version = "0.2" default-features = false [target."cfg(windows)".dependencies.windows-sys] -version = "0.48" +version = "0.52" features = [ "Win32_Foundation", "Win32_System_Diagnostics_Debug", diff --git a/vendor/errno/README.md b/vendor/errno/README.md index 48def1052..6a9a42c3c 100644 --- a/vendor/errno/README.md +++ b/vendor/errno/README.md @@ -1,6 +1,6 @@ # errno [![CI](https://github.com/lambda-fairy/rust-errno/actions/workflows/main.yml/badge.svg)](https://github.com/lambda-fairy/rust-errno/actions/workflows/main.yml) [![Cargo](https://img.shields.io/crates/v/errno.svg)](https://crates.io/crates/errno) -Cross-platform interface to the [`errno`][errno] variable. Works on Rust 1.48 or newer. +Cross-platform interface to the [`errno`][errno] variable. Works on Rust 1.56 or newer. Documentation is available at <https://docs.rs/errno>. diff --git a/vendor/errno/clippy.toml b/vendor/errno/clippy.toml index f691ea3d2..62ca74234 100644 --- a/vendor/errno/clippy.toml +++ b/vendor/errno/clippy.toml @@ -1 +1 @@ -msrv = "1.48" +msrv = "1.56" diff --git a/vendor/errno/src/unix.rs b/vendor/errno/src/unix.rs index 86a35d9be..18951e424 100644 --- a/vendor/errno/src/unix.rs +++ b/vendor/errno/src/unix.rs @@ -13,7 +13,7 @@ // except according to those terms. use core::str; -use libc::{self, c_char, c_int, size_t, strlen}; +use libc::{self, c_int, size_t, strerror_r, strlen}; use crate::Errno; @@ -30,8 +30,13 @@ where { let mut buf = [0u8; 1024]; let c_str = unsafe { - if strerror_r(err.0, buf.as_mut_ptr() as *mut _, buf.len() as size_t) < 0 { - let fm_err = errno(); + let rc = strerror_r(err.0, buf.as_mut_ptr() as *mut _, buf.len() as size_t); + if rc != 0 { + // Handle negative return codes for compatibility with glibc < 2.13 + let fm_err = match rc < 0 { + true => errno(), + false => Errno(rc), + }; if fm_err != Errno(libc::ERANGE) { return callback(Err(fm_err)); } @@ -56,7 +61,13 @@ pub fn set_errno(Errno(errno): Errno) { extern "C" { #[cfg_attr( - any(target_os = "macos", target_os = "ios", target_os = "freebsd"), + any( + target_os = "macos", + target_os = "ios", + target_os = "tvos", + target_os = "watchos", + target_os = "freebsd" + ), link_name = "__error" )] #[cfg_attr( @@ -65,7 +76,8 @@ extern "C" { target_os = "netbsd", target_os = "bitrig", target_os = "android", - target_os = "espidf" + target_os = "espidf", + target_env = "newlib" ), link_name = "__errno" )] @@ -86,10 +98,4 @@ extern "C" { #[cfg_attr(target_os = "aix", link_name = "_Errno")] #[cfg_attr(target_os = "nto", link_name = "__get_errno_ptr")] fn errno_location() -> *mut c_int; - - #[cfg_attr( - any(target_os = "linux", target_os = "hurd"), - link_name = "__xpg_strerror_r" - )] - fn strerror_r(errnum: c_int, buf: *mut c_char, buflen: size_t) -> c_int; } diff --git a/vendor/errno/src/wasi.rs b/vendor/errno/src/wasi.rs index b18fa9b2c..404d7d519 100644 --- a/vendor/errno/src/wasi.rs +++ b/vendor/errno/src/wasi.rs @@ -13,7 +13,7 @@ // except according to those terms. use core::str; -use libc::{self, c_char, c_int, size_t, strlen}; +use libc::{self, c_int, size_t, strerror_r, strlen}; use crate::Errno; @@ -30,8 +30,9 @@ where { let mut buf = [0u8; 1024]; let c_str = unsafe { - if strerror_r(err.0, buf.as_mut_ptr() as *mut _, buf.len() as size_t) < 0 { - let fm_err = errno(); + let rc = strerror_r(err.0, buf.as_mut_ptr() as *mut _, buf.len() as size_t); + if rc != 0 { + let fm_err = Errno(rc); if fm_err != Errno(libc::ERANGE) { return callback(Err(fm_err)); } @@ -56,5 +57,4 @@ pub fn set_errno(Errno(new_errno): Errno) { extern "C" { fn __errno_location() -> *mut c_int; - fn strerror_r(errnum: c_int, buf: *mut c_char, buflen: size_t) -> c_int; } |