From ba5f22b1d70f17f3eecfd16fe6c7719f8dfeace1 Mon Sep 17 00:00:00 2001 From: Schneems Date: Sat, 27 Jun 2026 18:21:51 -0500 Subject: [PATCH 1/2] Bump POSIX spec links to the 2024 edition Comments and doc links across std, core, and a process test referenced the older issue 7 (2018 edition) of the POSIX spec, with one link still on issue 6. Point them all at the current issue 8 (2024 edition, IEEE Std 1003.1-2024) under onlinepubs/9799919799, and normalize the `9799919799.2024edition` URL variant to the canonical path. Links that carry a section anchor were verified against the 2024 edition, since section numbering shifts between editions: - Pathname Resolution moved from 4.13 (tag_04_13) to 4.16 (tag_04_16) - Field Splitting moved from tag_18_06_05 to tag_19_06_05 - LC_CTYPE (tag_07_03_01) was unchanged CI's linkchecker only validates intra-doc links, not external URLs, so each page and anchor was checked by hand. --- library/core/src/ascii/ascii_char.rs | 4 ++-- library/core/src/char/methods.rs | 4 ++-- library/core/src/num/mod.rs | 4 ++-- library/std/src/os/fd/owned.rs | 2 +- library/std/src/os/unix/process.rs | 2 +- library/std/src/path.rs | 2 +- library/std/src/sys/fs/unix.rs | 2 +- library/std/src/sys/pal/unix/conf.rs | 2 +- library/std/src/sys/pal/unix/sync/mutex.rs | 2 +- library/std/src/sys/path/unix.rs | 4 ++-- library/std/src/sys/process/unix/unix.rs | 2 +- library/std/src/sys/process/unix/unsupported/wait_status.rs | 2 +- library/std/src/sys/process/unix/vxworks.rs | 2 +- tests/ui/process/process-spawn-failure.rs | 2 +- 14 files changed, 18 insertions(+), 18 deletions(-) diff --git a/library/core/src/ascii/ascii_char.rs b/library/core/src/ascii/ascii_char.rs index abd80aef20bd3..de1adf9c9ec7c 100644 --- a/library/core/src/ascii/ascii_char.rs +++ b/library/core/src/ascii/ascii_char.rs @@ -1049,8 +1049,8 @@ impl AsciiChar { /// before using this function. /// /// [infra-aw]: https://infra.spec.whatwg.org/#ascii-whitespace - /// [pct]: https://pubs.opengroup.org/onlinepubs/9699919799/basedefs/V1_chap07.html#tag_07_03_01 - /// [bfs]: https://pubs.opengroup.org/onlinepubs/9699919799/utilities/V3_chap02.html#tag_18_06_05 + /// [pct]: https://pubs.opengroup.org/onlinepubs/9799919799/basedefs/V1_chap07.html#tag_07_03_01 + /// [bfs]: https://pubs.opengroup.org/onlinepubs/9799919799/utilities/V3_chap02.html#tag_19_06_05 /// /// # Examples /// diff --git a/library/core/src/char/methods.rs b/library/core/src/char/methods.rs index 8517df4da2afc..d0114c30a6b3c 100644 --- a/library/core/src/char/methods.rs +++ b/library/core/src/char/methods.rs @@ -2354,8 +2354,8 @@ impl char { /// before using this function. /// /// [infra-aw]: https://infra.spec.whatwg.org/#ascii-whitespace - /// [pct]: https://pubs.opengroup.org/onlinepubs/9699919799/basedefs/V1_chap07.html#tag_07_03_01 - /// [bfs]: https://pubs.opengroup.org/onlinepubs/9699919799/utilities/V3_chap02.html#tag_18_06_05 + /// [pct]: https://pubs.opengroup.org/onlinepubs/9799919799/basedefs/V1_chap07.html#tag_07_03_01 + /// [bfs]: https://pubs.opengroup.org/onlinepubs/9799919799/utilities/V3_chap02.html#tag_19_06_05 /// /// # Examples /// diff --git a/library/core/src/num/mod.rs b/library/core/src/num/mod.rs index 002c56083659c..59dfe6bd8d9b7 100644 --- a/library/core/src/num/mod.rs +++ b/library/core/src/num/mod.rs @@ -1125,8 +1125,8 @@ impl u8 { /// before using this function. /// /// [infra-aw]: https://infra.spec.whatwg.org/#ascii-whitespace - /// [pct]: https://pubs.opengroup.org/onlinepubs/9699919799/basedefs/V1_chap07.html#tag_07_03_01 - /// [bfs]: https://pubs.opengroup.org/onlinepubs/9699919799/utilities/V3_chap02.html#tag_18_06_05 + /// [pct]: https://pubs.opengroup.org/onlinepubs/9799919799/basedefs/V1_chap07.html#tag_07_03_01 + /// [bfs]: https://pubs.opengroup.org/onlinepubs/9799919799/utilities/V3_chap02.html#tag_19_06_05 /// /// # Examples /// diff --git a/library/std/src/os/fd/owned.rs b/library/std/src/os/fd/owned.rs index 703113783f198..c226a0dc2403f 100644 --- a/library/std/src/os/fd/owned.rs +++ b/library/std/src/os/fd/owned.rs @@ -199,7 +199,7 @@ impl Drop for OwnedFd { unsafe { // Note that errors are ignored when closing a file descriptor. According to POSIX 2024, // we can and indeed should retry `close` on `EINTR` - // (https://pubs.opengroup.org/onlinepubs/9799919799.2024edition/functions/close.html), + // (https://pubs.opengroup.org/onlinepubs/9799919799/functions/close.html), // but it is not clear yet how well widely-used implementations are conforming with this // mandate since older versions of POSIX left the state of the FD after an `EINTR` // unspecified. Ignoring errors is "fine" because some of the major Unices (in diff --git a/library/std/src/os/unix/process.rs b/library/std/src/os/unix/process.rs index b0a41502614f6..dfb12ae224e7b 100644 --- a/library/std/src/os/unix/process.rs +++ b/library/std/src/os/unix/process.rs @@ -100,7 +100,7 @@ pub impl(self) trait CommandExt { /// locations might not appear where intended. /// /// [POSIX fork() specification]: - /// https://pubs.opengroup.org/onlinepubs/9699919799/functions/fork.html + /// https://pubs.opengroup.org/onlinepubs/9799919799/functions/fork.html /// [`std::env`]: mod@crate::env /// [`Error::new`]: crate::io::Error::new /// [`Error::other`]: crate::io::Error::other diff --git a/library/std/src/path.rs b/library/std/src/path.rs index 2687a12919701..b3e2c2bd6c6a3 100644 --- a/library/std/src/path.rs +++ b/library/std/src/path.rs @@ -4137,7 +4137,7 @@ impl Error for NormalizeError {} /// Note that this [may change in the future][changes]. /// /// [changes]: io#platform-specific-behavior -/// [posix-semantics]: https://pubs.opengroup.org/onlinepubs/9699919799/basedefs/V1_chap04.html#tag_04_13 +/// [posix-semantics]: https://pubs.opengroup.org/onlinepubs/9799919799/basedefs/V1_chap04.html#tag_04_16 /// [windows-path]: https://docs.microsoft.com/en-us/windows/win32/api/fileapi/nf-fileapi-getfullpathnamew /// [cygwin-path]: https://cygwin.com/cygwin-api/func-cygwin-conv-path.html #[stable(feature = "absolute_path", since = "1.79.0")] diff --git a/library/std/src/sys/fs/unix.rs b/library/std/src/sys/fs/unix.rs index 3152a22534f6c..b1c821c5b65c2 100644 --- a/library/std/src/sys/fs/unix.rs +++ b/library/std/src/sys/fs/unix.rs @@ -1902,7 +1902,7 @@ impl fmt::Debug for File { // Format in octal, followed by the mode format used in `ls -l`. // // References: -// https://pubs.opengroup.org/onlinepubs/009696899/utilities/ls.html +// https://pubs.opengroup.org/onlinepubs/9799919799/utilities/ls.html // https://www.gnu.org/software/libc/manual/html_node/Testing-File-Type.html // https://www.gnu.org/software/libc/manual/html_node/Permission-Bits.html // diff --git a/library/std/src/sys/pal/unix/conf.rs b/library/std/src/sys/pal/unix/conf.rs index 4c00379a88439..4bd75fcd122bd 100644 --- a/library/std/src/sys/pal/unix/conf.rs +++ b/library/std/src/sys/pal/unix/conf.rs @@ -11,7 +11,7 @@ pub fn page_size() -> usize { /// `_CS_PATH` or `_CS_V[67]_ENV` in the future). /// /// [posix_confstr]: -/// https://pubs.opengroup.org/onlinepubs/9699919799/functions/confstr.html + /// https://pubs.opengroup.org/onlinepubs/9799919799/functions/confstr.html #[cfg(target_vendor = "apple")] pub fn confstr( key: crate::ffi::c_int, diff --git a/library/std/src/sys/pal/unix/sync/mutex.rs b/library/std/src/sys/pal/unix/sync/mutex.rs index 557e70af94ba7..145bfb1e22413 100644 --- a/library/std/src/sys/pal/unix/sync/mutex.rs +++ b/library/std/src/sys/pal/unix/sync/mutex.rs @@ -25,7 +25,7 @@ impl Mutex { // A pthread mutex initialized with PTHREAD_MUTEX_INITIALIZER will have // a type of PTHREAD_MUTEX_DEFAULT, which has undefined behavior if you // try to re-lock it from the same thread when you already hold a lock - // (https://pubs.opengroup.org/onlinepubs/9699919799/functions/pthread_mutex_init.html). + // (https://pubs.opengroup.org/onlinepubs/9799919799/functions/pthread_mutex_init.html). // This is the case even if PTHREAD_MUTEX_DEFAULT == PTHREAD_MUTEX_NORMAL // (https://github.com/rust-lang/rust/issues/33770#issuecomment-220847521) -- in that // case, `pthread_mutexattr_settype(PTHREAD_MUTEX_DEFAULT)` will of course be the same diff --git a/library/std/src/sys/path/unix.rs b/library/std/src/sys/path/unix.rs index b49c39a9253fa..5a8c0c77745e0 100644 --- a/library/std/src/sys/path/unix.rs +++ b/library/std/src/sys/path/unix.rs @@ -20,8 +20,8 @@ pub const HAS_PREFIXES: bool = false; pub(crate) fn absolute(path: &Path) -> io::Result { // This is mostly a wrapper around collecting `Path::components`, with // exceptions made where this conflicts with the POSIX specification. - // See 4.13 Pathname Resolution, IEEE Std 1003.1-2017 - // https://pubs.opengroup.org/onlinepubs/9699919799/basedefs/V1_chap04.html#tag_04_13 + // See 4.16 Pathname Resolution, IEEE Std 1003.1-2024 + // https://pubs.opengroup.org/onlinepubs/9799919799/basedefs/V1_chap04.html#tag_04_16 // Get the components, skipping the redundant leading "." component if it exists. let mut components = path.strip_prefix(".").unwrap_or(path).components(); diff --git a/library/std/src/sys/process/unix/unix.rs b/library/std/src/sys/process/unix/unix.rs index 529cdaf72cc6c..f19927f863935 100644 --- a/library/std/src/sys/process/unix/unix.rs +++ b/library/std/src/sys/process/unix/unix.rs @@ -1094,7 +1094,7 @@ impl ExitStatus { pub fn exit_ok(&self) -> Result<(), ExitStatusError> { // This assumes that WIFEXITED(status) && WEXITSTATUS==0 corresponds to status==0. This is // true on all actual versions of Unix, is widely assumed, and is specified in SuS - // https://pubs.opengroup.org/onlinepubs/9699919799/functions/wait.html. If it is not + // https://pubs.opengroup.org/onlinepubs/9799919799/functions/wait.html. If it is not // true for a platform pretending to be Unix, the tests (our doctests, and also // unix/tests.rs) will spot it. `ExitStatusError::code` assumes this too. match NonZero::try_from(self.0) { diff --git a/library/std/src/sys/process/unix/unsupported/wait_status.rs b/library/std/src/sys/process/unix/unsupported/wait_status.rs index f348d557e4b7e..ac54824875813 100644 --- a/library/std/src/sys/process/unix/unsupported/wait_status.rs +++ b/library/std/src/sys/process/unix/unsupported/wait_status.rs @@ -46,7 +46,7 @@ impl ExitStatus { pub fn exit_ok(&self) -> Result<(), ExitStatusError> { // This assumes that WIFEXITED(status) && WEXITSTATUS==0 corresponds to status==0. This is // true on all actual versions of Unix, is widely assumed, and is specified in SuS - // https://pubs.opengroup.org/onlinepubs/9699919799/functions/wait.html. If it is not + // https://pubs.opengroup.org/onlinepubs/9799919799/functions/wait.html. If it is not // true for a platform pretending to be Unix, the tests (our doctests, and also // unix/tests.rs) will spot it. `ExitStatusError::code` assumes this too. match NonZero::try_from(self.wait_status) { diff --git a/library/std/src/sys/process/unix/vxworks.rs b/library/std/src/sys/process/unix/vxworks.rs index c5acff2bdd3c5..e476f2850d901 100644 --- a/library/std/src/sys/process/unix/vxworks.rs +++ b/library/std/src/sys/process/unix/vxworks.rs @@ -211,7 +211,7 @@ impl ExitStatus { pub fn exit_ok(&self) -> Result<(), ExitStatusError> { // This assumes that WIFEXITED(status) && WEXITSTATUS==0 corresponds to status==0. This is // true on all actual versions of Unix, is widely assumed, and is specified in SuS - // https://pubs.opengroup.org/onlinepubs/9699919799/functions/wait.html. If it is not + // https://pubs.opengroup.org/onlinepubs/9799919799/functions/wait.html. If it is not // true for a platform pretending to be Unix, the tests (our doctests, and also // unix/tests.rs) will spot it. `ExitStatusError::code` assumes this too. match NonZero::try_from(self.0) { diff --git a/tests/ui/process/process-spawn-failure.rs b/tests/ui/process/process-spawn-failure.rs index ac2c34bc7836d..b3f0071670bc6 100644 --- a/tests/ui/process/process-spawn-failure.rs +++ b/tests/ui/process/process-spawn-failure.rs @@ -38,7 +38,7 @@ fn find_zombies() { extern crate libc; let my_pid = unsafe { libc::getpid() }; - // https://pubs.opengroup.org/onlinepubs/9699919799/utilities/ps.html + // https://pubs.opengroup.org/onlinepubs/9799919799/utilities/ps.html let ps_cmd_output = Command::new("ps").args(&["-A", "-o", "pid,ppid,args"]).output().unwrap(); let ps_output = String::from_utf8_lossy(&ps_cmd_output.stdout); // On AIX, the PPID is not always present, such as when a process is blocked From fb5277eccee076cf0b7b36f01c7d4f167aed3d21 Mon Sep 17 00:00:00 2001 From: Schneems Date: Sat, 27 Jun 2026 18:21:51 -0500 Subject: [PATCH 2/2] miri: bump POSIX spec links to the 2024 edition Update the remaining pubs.opengroup.org links in Miri's Unix shims from issue 7 (9699919799) to the current issue 8 / 2024 edition (9799919799). All are anchorless, so only the edition path changes. --- src/tools/miri/src/concurrency/thread.rs | 2 +- src/tools/miri/src/shims/unix/fs.rs | 2 +- src/tools/miri/src/shims/unix/sync.rs | 6 +++--- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/src/tools/miri/src/concurrency/thread.rs b/src/tools/miri/src/concurrency/thread.rs index 7d9001e73b30d..95cae885f1ea3 100644 --- a/src/tools/miri/src/concurrency/thread.rs +++ b/src/tools/miri/src/concurrency/thread.rs @@ -714,7 +714,7 @@ trait EvalContextPrivExt<'tcx>: MiriInterpCxExt<'tcx> { // "in the past" fire before any other thread can take an action. This ensures that for // `pthread_cond_timedwait`, "an error is returned if [...] the absolute time specified by // abstime has already been passed at the time of the call". - // + // let potential_sleep_time = this.unblock_expired_deadlines()?; let thread_manager = &mut this.machine.threads; diff --git a/src/tools/miri/src/shims/unix/fs.rs b/src/tools/miri/src/shims/unix/fs.rs index 659125fa3388c..0fc8d2666118e 100644 --- a/src/tools/miri/src/shims/unix/fs.rs +++ b/src/tools/miri/src/shims/unix/fs.rs @@ -1618,7 +1618,7 @@ pub trait EvalContextExt<'tcx>: crate::MiriInterpCxExt<'tcx> { // * Maximum number of times an application can call `tmpnam()` reliably. // * The value of `TMP_MAX` is at least 25. // * On XSI-conformant systems, the value of `TMP_MAX` is at least 10000. - // See . + // See . let max_attempts = this.eval_libc_u32("TMP_MAX"); // Get the raw bytes from the template -- as a byte slice, this is a string in the target diff --git a/src/tools/miri/src/shims/unix/sync.rs b/src/tools/miri/src/shims/unix/sync.rs index 4e351c1571218..abd099cb256fd 100644 --- a/src/tools/miri/src/shims/unix/sync.rs +++ b/src/tools/miri/src/shims/unix/sync.rs @@ -616,7 +616,7 @@ pub trait EvalContextExt<'tcx>: crate::MiriInterpCxExt<'tcx> { } else { // The mutex was locked by another thread or not locked at all. See // the “Unlock When Not Owner” column in - // https://pubs.opengroup.org/onlinepubs/9699919799/functions/pthread_mutex_unlock.html. + // https://pubs.opengroup.org/onlinepubs/9799919799/functions/pthread_mutex_unlock.html. match mutex.kind { MutexKind::Default => throw_ub_format!( @@ -702,7 +702,7 @@ pub trait EvalContextExt<'tcx>: crate::MiriInterpCxExt<'tcx> { // thread in any way. // // Relevant documentation: - // https://pubs.opengroup.org/onlinepubs/9699919799/functions/pthread_rwlock_wrlock.html + // https://pubs.opengroup.org/onlinepubs/9799919799/functions/pthread_rwlock_wrlock.html // An in-depth discussion on this topic: // https://github.com/rust-lang/rust/issues/53127 // @@ -777,7 +777,7 @@ pub trait EvalContextExt<'tcx>: crate::MiriInterpCxExt<'tcx> { if this.tcx.sess.target.os != Os::MacOs { // The default value of the clock attribute shall refer to the system // clock. - // https://pubs.opengroup.org/onlinepubs/9699919799/functions/pthread_condattr_setclock.html + // https://pubs.opengroup.org/onlinepubs/9799919799/functions/pthread_condattr_setclock.html let default_clock_id = this.eval_libc_i32("CLOCK_REALTIME"); condattr_set_clock_id(this, attr_op, default_clock_id)?; }