Skip to content

Commit 11b9d5e

Browse files
committed
Add _NSGetArgv, _NSGetArgc and _NSGetProgname from crt_externs.h
Available in the headers on all Apple platforms.
1 parent 7646277 commit 11b9d5e

File tree

2 files changed

+9
-0
lines changed

2 files changed

+9
-0
lines changed

libc-test/semver/apple.txt

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1686,8 +1686,11 @@ _CS_PATH
16861686
_IOFBF
16871687
_IOLBF
16881688
_IONBF
1689+
_NSGetArgc
1690+
_NSGetArgv
16891691
_NSGetEnviron
16901692
_NSGetExecutablePath
1693+
_NSGetProgname
16911694
_POSIX_VDISABLE
16921695
_PTHREAD_COND_SIG_init
16931696
_PTHREAD_MUTEX_SIG_init

src/unix/bsd/apple/mod.rs

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6322,8 +6322,14 @@ extern "C" {
63226322
pub fn CCRandomGenerateBytes(bytes: *mut ::c_void, size: ::size_t) -> ::CCRNGStatus;
63236323
pub fn getentropy(buf: *mut ::c_void, buflen: ::size_t) -> ::c_int;
63246324

6325+
// dyld.h
63256326
pub fn _NSGetExecutablePath(buf: *mut ::c_char, bufsize: *mut u32) -> ::c_int;
6327+
6328+
// crt_externs.h
6329+
pub fn _NSGetArgv() -> *mut *mut *mut ::c_char;
6330+
pub fn _NSGetArgc() -> *mut ::c_int;
63266331
pub fn _NSGetEnviron() -> *mut *mut *mut ::c_char;
6332+
pub fn _NSGetProgname() -> *mut *mut ::c_char;
63276333

63286334
pub fn mach_vm_map(
63296335
target_task: ::vm_map_t,

0 commit comments

Comments
 (0)