Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

strftime_l for Linux glibc/musl #3484

Merged
merged 1 commit into from Dec 17, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
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