Skip to content

Commit bff183c

Browse files
madsmtmtgross35
authored andcommitted
Add _NSGetArgv, _NSGetArgc and _NSGetProgname from crt_externs.h
Available in the headers on all Apple platforms. (backport <#3702>) (cherry picked from commit 4333c2f)
1 parent be5dd84 commit bff183c

File tree

2 files changed

+8
-0
lines changed

2 files changed

+8
-0
lines changed

libc-test/semver/apple.txt

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1695,8 +1695,11 @@ _CS_PATH
16951695
_IOFBF
16961696
_IOLBF
16971697
_IONBF
1698+
_NSGetArgc
1699+
_NSGetArgv
16981700
_NSGetEnviron
16991701
_NSGetExecutablePath
1702+
_NSGetProgname
17001703
_POSIX_VDISABLE
17011704
_PTHREAD_COND_SIG_init
17021705
_PTHREAD_MUTEX_SIG_init

src/unix/bsd/apple/mod.rs

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6377,7 +6377,12 @@ extern "C" {
63776377
pub fn getentropy(buf: *mut ::c_void, buflen: ::size_t) -> ::c_int;
63786378

63796379
pub fn _NSGetExecutablePath(buf: *mut ::c_char, bufsize: *mut u32) -> ::c_int;
6380+
6381+
// crt_externs.h
6382+
pub fn _NSGetArgv() -> *mut *mut *mut ::c_char;
6383+
pub fn _NSGetArgc() -> *mut ::c_int;
63806384
pub fn _NSGetEnviron() -> *mut *mut *mut ::c_char;
6385+
pub fn _NSGetProgname() -> *mut *mut ::c_char;
63816386

63826387
pub fn mach_vm_map(
63836388
target_task: ::vm_map_t,

0 commit comments

Comments
 (0)