Skip to content

Commit

Permalink
Merge pull request rust-lang#3832 from tgross35/backport-apple-crt-ex…
Browse files Browse the repository at this point in the history
…terns

[0.2] Apple: add `_NSGetArgv`, `_NSGetArgc` and `_NSGetProgname`
  • Loading branch information
tgross35 authored Aug 16, 2024
2 parents be5dd84 + bff183c commit c6606f8
Show file tree
Hide file tree
Showing 2 changed files with 8 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 @@ -1695,8 +1695,11 @@ _CS_PATH
_IOFBF
_IOLBF
_IONBF
_NSGetArgc
_NSGetArgv
_NSGetEnviron
_NSGetExecutablePath
_NSGetProgname
_POSIX_VDISABLE
_PTHREAD_COND_SIG_init
_PTHREAD_MUTEX_SIG_init
Expand Down
5 changes: 5 additions & 0 deletions src/unix/bsd/apple/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -6377,7 +6377,12 @@ extern "C" {
pub fn getentropy(buf: *mut ::c_void, buflen: ::size_t) -> ::c_int;

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 c6606f8

Please sign in to comment.