Skip to content

Commit f3b852f

Browse files
Enable strftime, mkostemp[s] on Redox
Redox's relibc supports: * mkostemp * mkostemps * strftime
1 parent 458c5a0 commit f3b852f

File tree

2 files changed

+11
-0
lines changed

2 files changed

+11
-0
lines changed

libc-test/semver/redox.txt

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -224,6 +224,8 @@ lockf
224224
login_tty
225225
madvise
226226
memalign
227+
mkostemp
228+
mkostemps
227229
nice
228230
open_memstream
229231
open_wmemstream
@@ -240,6 +242,7 @@ sigtimedwait
240242
sigwait
241243
strcasecmp
242244
strcasestr
245+
strftime
243246
strlcat
244247
strlcpy
245248
strncasecmp

src/unix/redox/mod.rs

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1207,6 +1207,8 @@ extern "C" {
12071207
tokens: *const *mut c_char,
12081208
valuep: *mut *mut c_char,
12091209
) -> c_int;
1210+
pub fn mkostemp(template: *mut c_char, flags: c_int) -> c_int;
1211+
pub fn mkostemps(template: *mut c_char, suffixlen: c_int, flags: c_int) -> c_int;
12101212
pub fn reallocarray(ptr: *mut c_void, nmemb: size_t, size: size_t) -> *mut c_void;
12111213

12121214
// string.h
@@ -1276,6 +1278,12 @@ extern "C" {
12761278
// time.h
12771279
pub fn gettimeofday(tp: *mut crate::timeval, tz: *mut crate::timezone) -> c_int;
12781280
pub fn clock_gettime(clk_id: crate::clockid_t, tp: *mut crate::timespec) -> c_int;
1281+
pub fn strftime(
1282+
s: *mut c_char,
1283+
max: size_t,
1284+
format: *const c_char,
1285+
tm: *const crate::tm,
1286+
) -> size_t;
12791287

12801288
// utmp.h
12811289
pub fn login_tty(fd: c_int) -> c_int;

0 commit comments

Comments
 (0)