Merge branch 'fix-gnu-make-glob' into 'master'
fix: GNU seems to prefer its own glob.h See merge request redox-os/relibc!598
This commit is contained in:
@@ -41,6 +41,7 @@ pub const GLOB_ABORTED: c_int = 2;
|
|||||||
// Pattern does not match any existing pathname, and GLOB_NOCHECK was not set
|
// Pattern does not match any existing pathname, and GLOB_NOCHECK was not set
|
||||||
pub const GLOB_NOMATCH: c_int = 3;
|
pub const GLOB_NOMATCH: c_int = 3;
|
||||||
|
|
||||||
|
#[linkage = "weak"] // GNU prefers its own glob e.g. in Make
|
||||||
#[repr(C)]
|
#[repr(C)]
|
||||||
#[derive(Debug)]
|
#[derive(Debug)]
|
||||||
pub struct glob_t {
|
pub struct glob_t {
|
||||||
@@ -52,6 +53,7 @@ pub struct glob_t {
|
|||||||
__opaque: *mut c_void, // Vec<*mut c_char>
|
__opaque: *mut c_void, // Vec<*mut c_char>
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#[linkage = "weak"] // GNU prefers its own glob e.g. in Make
|
||||||
#[no_mangle]
|
#[no_mangle]
|
||||||
pub unsafe extern "C" fn glob(
|
pub unsafe extern "C" fn glob(
|
||||||
pattern: *const c_char,
|
pattern: *const c_char,
|
||||||
@@ -145,6 +147,7 @@ pub unsafe extern "C" fn glob(
|
|||||||
0
|
0
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#[linkage = "weak"] // GNU prefers its own glob e.g. in Make
|
||||||
#[no_mangle]
|
#[no_mangle]
|
||||||
pub unsafe extern "C" fn globfree(pglob: *mut glob_t) {
|
pub unsafe extern "C" fn globfree(pglob: *mut glob_t) {
|
||||||
// Retake ownership
|
// Retake ownership
|
||||||
|
|||||||
Reference in New Issue
Block a user