Skip to content

Commit 07e3912

Browse files
committed
Auto merge of #3483 - devnexen:strftime_bsd, r=JohnTitor
strftime* api for *BSD close #3459
2 parents ccdae50 + aff5e66 commit 07e3912

File tree

7 files changed

+23
-6
lines changed

7 files changed

+23
-6
lines changed

libc-test/semver/apple.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2225,6 +2225,7 @@ statfs
22252225
strcasecmp
22262226
strcasestr
22272227
strftime
2228+
strftime_l
22282229
strncasecmp
22292230
strndup
22302231
strptime

libc-test/semver/dragonfly.txt

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1547,6 +1547,8 @@ stack_t
15471547
statfs
15481548
strcasecmp
15491549
strcasestr
1550+
strftime
1551+
strftime_l
15501552
strncasecmp
15511553
strndup
15521554
strsignal

libc-test/semver/freebsd.txt

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2204,6 +2204,8 @@ statfs
22042204
strcasecmp
22052205
strcasestr
22062206
strchrnul
2207+
strftime
2208+
strftime_l
22072209
strncasecmp
22082210
strndup
22092211
strsignal

libc-test/semver/netbsd.txt

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1551,6 +1551,8 @@ stack_t
15511551
strcasecmp
15521552
strcasestr
15531553
string_to_flags
1554+
strftime
1555+
strftime_l
15541556
strncasecmp
15551557
strndup
15561558
strpct

libc-test/semver/openbsd.txt

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1250,6 +1250,8 @@ stack_t
12501250
statfs
12511251
strcasecmp
12521252
strcasestr
1253+
strftime
1254+
strftime_l
12531255
strncasecmp
12541256
strndup
12551257
strsignal

src/unix/bsd/apple/mod.rs

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -5604,12 +5604,6 @@ extern "C" {
56045604
pub fn asctime(tm: *const ::tm) -> *mut ::c_char;
56055605
pub fn ctime(clock: *const time_t) -> *mut ::c_char;
56065606
pub fn getdate(datestr: *const ::c_char) -> *mut ::tm;
5607-
pub fn strftime(
5608-
buf: *mut ::c_char,
5609-
maxsize: ::size_t,
5610-
format: *const ::c_char,
5611-
timeptr: *const ::tm,
5612-
) -> ::size_t;
56135607
pub fn strptime(
56145608
buf: *const ::c_char,
56155609
format: *const ::c_char,

src/unix/bsd/mod.rs

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -899,6 +899,20 @@ extern "C" {
899899
longopts: *const option,
900900
longindex: *mut ::c_int,
901901
) -> ::c_int;
902+
903+
pub fn strftime(
904+
buf: *mut ::c_char,
905+
maxsize: ::size_t,
906+
format: *const ::c_char,
907+
timeptr: *const ::tm,
908+
) -> ::size_t;
909+
pub fn strftime_l(
910+
buf: *mut ::c_char,
911+
maxsize: ::size_t,
912+
format: *const ::c_char,
913+
timeptr: *const ::tm,
914+
locale: ::locale_t,
915+
) -> ::size_t;
902916
}
903917

904918
cfg_if! {

0 commit comments

Comments
 (0)