Merge pull request #1653 from ArniDagur/shadow_reenterant
Add reenterant shadow.h functions
This commit is contained in:
commit
598939dd5e
|
@ -1087,6 +1087,26 @@ cfg_if! {
|
|||
pub const PTHREAD_MUTEX_ADAPTIVE_NP: ::c_int = 3;
|
||||
|
||||
extern "C" {
|
||||
pub fn fgetspent_r(
|
||||
fp: *mut ::FILE,
|
||||
spbuf: *mut ::spwd,
|
||||
buf: *mut ::c_char,
|
||||
buflen: ::size_t,
|
||||
spbufp: *mut *mut ::spwd,
|
||||
) -> ::c_int;
|
||||
pub fn sgetspent_r(
|
||||
s: *const ::c_char,
|
||||
spbuf: *mut ::spwd,
|
||||
buf: *mut ::c_char,
|
||||
buflen: ::size_t,
|
||||
spbufp: *mut *mut ::spwd,
|
||||
) -> ::c_int;
|
||||
pub fn getspent_r(
|
||||
spbuf: *mut ::spwd,
|
||||
buf: *mut ::c_char,
|
||||
buflen: ::size_t,
|
||||
spbufp: *mut *mut ::spwd,
|
||||
) -> ::c_int;
|
||||
pub fn qsort_r(
|
||||
base: *mut ::c_void,
|
||||
num: ::size_t,
|
||||
|
|
|
@ -2587,7 +2587,17 @@ extern "C" {
|
|||
pub fn endspent();
|
||||
pub fn getspent() -> *mut spwd;
|
||||
|
||||
pub fn getspnam(__name: *const ::c_char) -> *mut spwd;
|
||||
pub fn getspnam(name: *const ::c_char) -> *mut spwd;
|
||||
// Only `getspnam_r` is implemented for musl, out of all of the reenterant
|
||||
// functions from `shadow.h`.
|
||||
// https://git.musl-libc.org/cgit/musl/tree/include/shadow.h
|
||||
pub fn getspnam_r(
|
||||
name: *const ::c_char,
|
||||
spbuf: *mut spwd,
|
||||
buf: *mut ::c_char,
|
||||
buflen: ::size_t,
|
||||
spbufp: *mut *mut spwd,
|
||||
) -> ::c_int;
|
||||
|
||||
pub fn shm_open(
|
||||
name: *const c_char,
|
||||
|
|
Loading…
Reference in New Issue