Skip to content

Commit

Permalink
Auto merge of rust-lang#3484 - devnexen:strftime_l_linux, r=JohnTitor
Browse files Browse the repository at this point in the history
strftime_l for Linux glibc/musl
  • Loading branch information
bors committed Dec 17, 2023
2 parents 07e3912 + b20c637 commit 05d807f
Show file tree
Hide file tree
Showing 4 changed files with 16 additions and 0 deletions.
1 change: 1 addition & 0 deletions libc-test/semver/linux-gnu.txt
Original file line number Diff line number Diff line change
Expand Up @@ -691,6 +691,7 @@ eaccess
asctime_r
ctime_r
strftime
strftime_l
strptime
dirname
posix_basename
Expand Down
1 change: 1 addition & 0 deletions libc-test/semver/linux-musl.txt
Original file line number Diff line number Diff line change
Expand Up @@ -78,6 +78,7 @@ euidaccess
eaccess
asctime_r
strftime
strftime_l
strptime
dirname
basename
7 changes: 7 additions & 0 deletions src/unix/linux_like/linux/gnu/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1462,6 +1462,13 @@ extern "C" {
format: *const ::c_char,
tm: *const ::tm,
) -> ::size_t;
pub fn strftime_l(
s: *mut ::c_char,
max: ::size_t,
format: *const ::c_char,
tm: *const ::tm,
locale: ::locale_t,
) -> ::size_t;
pub fn strptime(s: *const ::c_char, format: *const ::c_char, tm: *mut ::tm) -> *mut ::c_char;

pub fn dirname(path: *mut ::c_char) -> *mut ::c_char;
Expand Down
7 changes: 7 additions & 0 deletions src/unix/linux_like/linux/musl/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -889,6 +889,13 @@ extern "C" {
format: *const ::c_char,
tm: *const ::tm,
) -> ::size_t;
pub fn strftime_l(
s: *mut ::c_char,
max: ::size_t,
format: *const ::c_char,
tm: *const ::tm,
locale: ::locale_t,
) -> ::size_t;
pub fn strptime(s: *const ::c_char, format: *const ::c_char, tm: *mut ::tm) -> *mut ::c_char;

pub fn dirname(path: *mut ::c_char) -> *mut ::c_char;
Expand Down

0 comments on commit 05d807f

Please sign in to comment.