update and add spec links for glob and setjmp
This commit is contained in:
@@ -1,4 +1,6 @@
|
||||
//! glob implementation, following https://pubs.opengroup.org/onlinepubs/9699919799/functions/glob.html
|
||||
//! `glob.h` implementation.
|
||||
//!
|
||||
//! See <https://pubs.opengroup.org/onlinepubs/9799919799/basedefs/glob.h.html>.
|
||||
|
||||
#![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 <https://pubs.opengroup.org/onlinepubs/9799919799/basedefs/glob.h.html>.
|
||||
#[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 <https://pubs.opengroup.org/onlinepubs/9799919799/functions/glob.html>.
|
||||
#[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 <https://pubs.opengroup.org/onlinepubs/9799919799/functions/glob.html>.
|
||||
#[linkage = "weak"] // GNU prefers its own glob e.g. in Make
|
||||
#[unsafe(no_mangle)]
|
||||
pub unsafe extern "C" fn globfree(pglob: *mut glob_t) {
|
||||
|
||||
@@ -1,4 +1,6 @@
|
||||
//! setjmp implementation for Redox, following http://pubs.opengroup.org/onlinepubs/7908799/xsh/setjmp.h.html
|
||||
//! `setjmp.h` implementation.
|
||||
//!
|
||||
//! See <https://pubs.opengroup.org/onlinepubs/9799919799/basedefs/setjmp.h.html>.
|
||||
|
||||
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 <https://pubs.opengroup.org/onlinepubs/9799919799/functions/setjmp.html>.
|
||||
pub fn setjmp(jb: *mut u64) -> i32;
|
||||
/// See <https://pubs.opengroup.org/onlinepubs/9799919799/functions/longjmp.html>.
|
||||
pub fn longjmp(jb: *mut u64, ret: i32);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user