Skip to content

Commit 05d807f

Browse files
committed
Auto merge of #3484 - devnexen:strftime_l_linux, r=JohnTitor
strftime_l for Linux glibc/musl
2 parents 07e3912 + b20c637 commit 05d807f

File tree

4 files changed

+16
-0
lines changed

4 files changed

+16
-0
lines changed

libc-test/semver/linux-gnu.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -691,6 +691,7 @@ eaccess
691691
asctime_r
692692
ctime_r
693693
strftime
694+
strftime_l
694695
strptime
695696
dirname
696697
posix_basename

libc-test/semver/linux-musl.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -78,6 +78,7 @@ euidaccess
7878
eaccess
7979
asctime_r
8080
strftime
81+
strftime_l
8182
strptime
8283
dirname
8384
basename

src/unix/linux_like/linux/gnu/mod.rs

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1462,6 +1462,13 @@ extern "C" {
14621462
format: *const ::c_char,
14631463
tm: *const ::tm,
14641464
) -> ::size_t;
1465+
pub fn strftime_l(
1466+
s: *mut ::c_char,
1467+
max: ::size_t,
1468+
format: *const ::c_char,
1469+
tm: *const ::tm,
1470+
locale: ::locale_t,
1471+
) -> ::size_t;
14651472
pub fn strptime(s: *const ::c_char, format: *const ::c_char, tm: *mut ::tm) -> *mut ::c_char;
14661473

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

src/unix/linux_like/linux/musl/mod.rs

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -889,6 +889,13 @@ extern "C" {
889889
format: *const ::c_char,
890890
tm: *const ::tm,
891891
) -> ::size_t;
892+
pub fn strftime_l(
893+
s: *mut ::c_char,
894+
max: ::size_t,
895+
format: *const ::c_char,
896+
tm: *const ::tm,
897+
locale: ::locale_t,
898+
) -> ::size_t;
892899
pub fn strptime(s: *const ::c_char, format: *const ::c_char, tm: *mut ::tm) -> *mut ::c_char;
893900

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

0 commit comments

Comments
 (0)