Skip to content

Commit

Permalink
Move strftime, strftime_l, strptime to linux_like
Browse files Browse the repository at this point in the history
  • Loading branch information
pcc authored and tgross35 committed Aug 29, 2024
1 parent 5431bdb commit 5429147
Show file tree
Hide file tree
Showing 6 changed files with 18 additions and 36 deletions.
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

0 comments on commit 5429147

Please sign in to comment.