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

Move strftime, strftime_l, strptime to linux_like #3600

Merged
merged 1 commit into from
Apr 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.
Jump to
Jump to file
Failed to load files.
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 @@ -691,9 +691,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 @@ -77,8 +77,5 @@ timex
euidaccess
eaccess
asctime_r
strftime
strftime_l
strptime
dirname
basename
3 changes: 3 additions & 0 deletions libc-test/semver/linux.txt
Original file line number Diff line number Diff line change
Expand Up @@ -3832,8 +3832,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 @@ -1478,21 +1478,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 dirname(path: *mut ::c_char) -> *mut ::c_char;
/// POSIX version of `basename(3)`, defined in `libgen.h`.
#[link_name = "__xpg_basename"]
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 @@ -883,21 +883,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 @@ -1795,6 +1795,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