Skip to content

Commit 535e82b

Browse files
authored
Merge pull request #3884 from tgross35/main-strxtime
[main]: Move strftime, strftime_l, strptime to linux_like
2 parents 56e06a7 + 5429147 commit 535e82b

File tree

6 files changed

+18
-36
lines changed

6 files changed

+18
-36
lines changed

libc-test/semver/linux-gnu.txt

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -704,9 +704,6 @@ euidaccess
704704
eaccess
705705
asctime_r
706706
ctime_r
707-
strftime
708-
strftime_l
709-
strptime
710707
dirname
711708
posix_basename
712709
gnu_basename

libc-test/semver/linux-musl.txt

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -84,7 +84,4 @@ pututxline
8484
pwritev64
8585
reallocarray
8686
setutxent
87-
strftime
88-
strftime_l
89-
strptime
9087
timex

libc-test/semver/linux.txt

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3943,8 +3943,11 @@ statvfs64
39433943
strcasecmp
39443944
strcasestr
39453945
strchrnul
3946+
strftime
3947+
strftime_l
39463948
strncasecmp
39473949
strndup
3950+
strptime
39483951
strsignal
39493952
swapoff
39503953
swapon

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

Lines changed: 0 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -1472,21 +1472,6 @@ extern "C" {
14721472
pub fn asctime_r(tm: *const ::tm, buf: *mut ::c_char) -> *mut ::c_char;
14731473
pub fn ctime_r(timep: *const time_t, buf: *mut ::c_char) -> *mut ::c_char;
14741474

1475-
pub fn strftime(
1476-
s: *mut ::c_char,
1477-
max: ::size_t,
1478-
format: *const ::c_char,
1479-
tm: *const ::tm,
1480-
) -> ::size_t;
1481-
pub fn strftime_l(
1482-
s: *mut ::c_char,
1483-
max: ::size_t,
1484-
format: *const ::c_char,
1485-
tm: *const ::tm,
1486-
locale: ::locale_t,
1487-
) -> ::size_t;
1488-
pub fn strptime(s: *const ::c_char, format: *const ::c_char, tm: *mut ::tm) -> *mut ::c_char;
1489-
14901475
pub fn confstr(name: ::c_int, buf: *mut ::c_char, len: ::size_t) -> ::size_t;
14911476
pub fn dirname(path: *mut ::c_char) -> *mut ::c_char;
14921477
/// POSIX version of `basename(3)`, defined in `libgen.h`.

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

Lines changed: 0 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -878,21 +878,6 @@ extern "C" {
878878

879879
pub fn asctime_r(tm: *const ::tm, buf: *mut ::c_char) -> *mut ::c_char;
880880

881-
pub fn strftime(
882-
s: *mut ::c_char,
883-
max: ::size_t,
884-
format: *const ::c_char,
885-
tm: *const ::tm,
886-
) -> ::size_t;
887-
pub fn strftime_l(
888-
s: *mut ::c_char,
889-
max: ::size_t,
890-
format: *const ::c_char,
891-
tm: *const ::tm,
892-
locale: ::locale_t,
893-
) -> ::size_t;
894-
pub fn strptime(s: *const ::c_char, format: *const ::c_char, tm: *mut ::tm) -> *mut ::c_char;
895-
896881
pub fn dirname(path: *mut ::c_char) -> *mut ::c_char;
897882
pub fn basename(path: *mut ::c_char) -> *mut ::c_char;
898883

src/unix/linux_like/mod.rs

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1766,6 +1766,21 @@ extern "C" {
17661766
pub fn uname(buf: *mut ::utsname) -> ::c_int;
17671767

17681768
pub fn strchrnul(s: *const ::c_char, c: ::c_int) -> *mut ::c_char;
1769+
1770+
pub fn strftime(
1771+
s: *mut ::c_char,
1772+
max: ::size_t,
1773+
format: *const ::c_char,
1774+
tm: *const ::tm,
1775+
) -> ::size_t;
1776+
pub fn strftime_l(
1777+
s: *mut ::c_char,
1778+
max: ::size_t,
1779+
format: *const ::c_char,
1780+
tm: *const ::tm,
1781+
locale: ::locale_t,
1782+
) -> ::size_t;
1783+
pub fn strptime(s: *const ::c_char, format: *const ::c_char, tm: *mut ::tm) -> *mut ::c_char;
17691784
}
17701785

17711786
// LFS64 extensions

0 commit comments

Comments
 (0)