Skip to content

Commit

Permalink
Add _NSGetArgv, _NSGetArgc and _NSGetProgname from crt_externs.h
Browse files Browse the repository at this point in the history
Applicable on Apple platforms
  • Loading branch information
madsmtm committed May 15, 2024
1 parent 7646277 commit 0e391e5
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 0 deletions.
3 changes: 3 additions & 0 deletions libc-test/semver/apple.txt
Original file line number Diff line number Diff line change
Expand Up @@ -1686,8 +1686,11 @@ _CS_PATH
_IOFBF
_IOLBF
_IONBF
_NSGetArgc
_NSGetArgv
_NSGetEnviron
_NSGetExecutablePath
_NSGetProgname
_POSIX_VDISABLE
_PTHREAD_COND_SIG_init
_PTHREAD_MUTEX_SIG_init
Expand Down
6 changes: 6 additions & 0 deletions src/unix/bsd/apple/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -6322,8 +6322,14 @@ extern "C" {
pub fn CCRandomGenerateBytes(bytes: *mut ::c_void, size: ::size_t) -> ::CCRNGStatus;
pub fn getentropy(buf: *mut ::c_void, buflen: ::size_t) -> ::c_int;

// dyld.h
pub fn _NSGetExecutablePath(buf: *mut ::c_char, bufsize: *mut u32) -> ::c_int;

// crt_externs.h
pub fn _NSGetArgv() -> *mut *mut *mut ::c_char;
pub fn _NSGetArgc() -> *mut ::c_int;
pub fn _NSGetEnviron() -> *mut *mut *mut ::c_char;
pub fn _NSGetProgname() -> *mut *mut ::c_char;

pub fn mach_vm_map(
target_task: ::vm_map_t,
Expand Down

0 comments on commit 0e391e5

Please sign in to comment.