Skip to content

Commit

Permalink
strftime_l for Linux glibc/musl
Browse files Browse the repository at this point in the history
  • Loading branch information
devnexen committed Dec 16, 2023
1 parent ccdae50 commit b20c637
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
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
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
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
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 b20c637

Please sign in to comment.