Skip to content

Commit 5fe832a

Browse files
committed
Auto merge of #2486 - devnexen:strtonum_big_sur, r=Amanieu
darwin add strtonum from Big Sur
2 parents 89d8c5e + c8f1963 commit 5fe832a

File tree

2 files changed

+9
-0
lines changed

2 files changed

+9
-0
lines changed

libc-test/semver/apple.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1939,6 +1939,7 @@ strcasestr
19391939
strncasecmp
19401940
strndup
19411941
strsignal
1942+
strtonum
19421943
sync
19431944
syscall
19441945
sysctl

src/unix/bsd/apple/mod.rs

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5203,6 +5203,14 @@ extern "C" {
52035203
pub fn memset_pattern8(b: *mut ::c_void, pattern8: *const ::c_void, len: ::size_t);
52045204
pub fn memset_pattern16(b: *mut ::c_void, pattern16: *const ::c_void, len: ::size_t);
52055205

5206+
// Inherited from BSD but available from Big Sur only
5207+
pub fn strtonum(
5208+
__numstr: *const ::c_char,
5209+
__minval: ::c_longlong,
5210+
__maxval: ::c_longlong,
5211+
errstrp: *mut *const ::c_char,
5212+
) -> ::c_longlong;
5213+
52065214
pub fn mstats() -> mstats;
52075215
pub fn malloc_printf(format: *const ::c_char, ...);
52085216
pub fn malloc_zone_check(zone: *mut ::malloc_zone_t) -> ::boolean_t;

0 commit comments

Comments
 (0)