From 5d4b6bc2ee1a1dbb683fda7cecba1f72ef7f6215 Mon Sep 17 00:00:00 2001 From: auronandace Date: Mon, 22 Dec 2025 10:12:50 +0000 Subject: [PATCH] update and add spec links for glob and setjmp --- src/header/glob/mod.rs | 7 ++++++- src/header/setjmp/mod.rs | 6 +++++- 2 files changed, 11 insertions(+), 2 deletions(-) diff --git a/src/header/glob/mod.rs b/src/header/glob/mod.rs index 38dbcd62dc..3606f4aa3f 100644 --- a/src/header/glob/mod.rs +++ b/src/header/glob/mod.rs @@ -1,4 +1,6 @@ -//! glob implementation, following https://pubs.opengroup.org/onlinepubs/9699919799/functions/glob.html +//! `glob.h` implementation. +//! +//! See . #![deny(unsafe_op_in_unsafe_fn)] @@ -41,6 +43,7 @@ pub const GLOB_ABORTED: c_int = 2; // Pattern does not match any existing pathname, and GLOB_NOCHECK was not set pub const GLOB_NOMATCH: c_int = 3; +/// See . #[derive(Debug)] #[repr(C)] pub struct glob_t { @@ -52,6 +55,7 @@ pub struct glob_t { __opaque: *mut c_void, // Vec<*mut c_char> } +/// See . #[linkage = "weak"] // GNU prefers its own glob e.g. in Make #[unsafe(no_mangle)] pub unsafe extern "C" fn glob( @@ -146,6 +150,7 @@ pub unsafe extern "C" fn glob( 0 } +/// See . #[linkage = "weak"] // GNU prefers its own glob e.g. in Make #[unsafe(no_mangle)] pub unsafe extern "C" fn globfree(pglob: *mut glob_t) { diff --git a/src/header/setjmp/mod.rs b/src/header/setjmp/mod.rs index c6ab32a478..32679f4008 100644 --- a/src/header/setjmp/mod.rs +++ b/src/header/setjmp/mod.rs @@ -1,4 +1,6 @@ -//! setjmp implementation for Redox, following http://pubs.opengroup.org/onlinepubs/7908799/xsh/setjmp.h.html +//! `setjmp.h` implementation. +//! +//! See . use core::arch::global_asm; @@ -22,6 +24,8 @@ platform_specific! { //Each platform has different sizes for sigjmp_buf, currently only x86_64 is supported unsafe extern "C" { + /// See . pub fn setjmp(jb: *mut u64) -> i32; + /// See . pub fn longjmp(jb: *mut u64, ret: i32); }