Skip to content

[main]: Move strftime, strftime_l, strptime to linux_like #3884

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

Merged
merged 1 commit into from
Aug 29, 2024
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.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 0 additions & 3 deletions libc-test/semver/linux-gnu.txt
Original file line number Diff line number Diff line change
Expand Up @@ -704,9 +704,6 @@ euidaccess
eaccess
asctime_r
ctime_r
strftime
strftime_l
strptime
dirname
posix_basename
gnu_basename
Expand Down
3 changes: 0 additions & 3 deletions libc-test/semver/linux-musl.txt
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,4 @@ pututxline
pwritev64
reallocarray
setutxent
strftime
strftime_l
strptime
timex
3 changes: 3 additions & 0 deletions libc-test/semver/linux.txt
Original file line number Diff line number Diff line change
Expand Up @@ -3941,8 +3941,11 @@ statvfs64
strcasecmp
strcasestr
strchrnul
strftime
strftime_l
strncasecmp
strndup
strptime
strsignal
swapoff
swapon
Expand Down
15 changes: 0 additions & 15 deletions src/unix/linux_like/linux/gnu/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1472,21 +1472,6 @@ extern "C" {
pub fn asctime_r(tm: *const ::tm, buf: *mut ::c_char) -> *mut ::c_char;
pub fn ctime_r(timep: *const time_t, buf: *mut ::c_char) -> *mut ::c_char;

pub fn strftime(
s: *mut ::c_char,
max: ::size_t,
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 confstr(name: ::c_int, buf: *mut ::c_char, len: ::size_t) -> ::size_t;
pub fn dirname(path: *mut ::c_char) -> *mut ::c_char;
/// POSIX version of `basename(3)`, defined in `libgen.h`.
Expand Down
15 changes: 0 additions & 15 deletions src/unix/linux_like/linux/musl/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -878,21 +878,6 @@ extern "C" {

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

pub fn strftime(
s: *mut ::c_char,
max: ::size_t,
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;
pub fn basename(path: *mut ::c_char) -> *mut ::c_char;

Expand Down
15 changes: 15 additions & 0 deletions src/unix/linux_like/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1766,6 +1766,21 @@ extern "C" {
pub fn uname(buf: *mut ::utsname) -> ::c_int;

pub fn strchrnul(s: *const ::c_char, c: ::c_int) -> *mut ::c_char;

pub fn strftime(
s: *mut ::c_char,
max: ::size_t,
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;
}

// LFS64 extensions
Expand Down