Skip to content

Commit a1423ca

Browse files
committed
add fmemopen, open_memstream, and open_wmemstream for POSIX.1-2008
1 parent ab3c229 commit a1423ca

File tree

1 file changed

+13
-0
lines changed

1 file changed

+13
-0
lines changed

src/unix/mod.rs

+13
Original file line numberDiff line numberDiff line change
@@ -419,6 +419,19 @@ extern "C" {
419419
mode: *const c_char,
420420
file: *mut FILE,
421421
) -> *mut FILE;
422+
pub fn fmemopen(
423+
buf: *mut c_void,
424+
size: size_t,
425+
mode: *const c_char,
426+
) -> *mut FILE;
427+
pub fn open_memstream(
428+
ptr: *mut *mut c_char,
429+
sizeloc: *mut size_t,
430+
) -> *mut FILE;
431+
pub fn open_wmemstream(
432+
ptr: *mut *mut wchar_t,
433+
sizeloc: *mut size_t,
434+
) -> *mut FILE;
422435
pub fn fflush(file: *mut FILE) -> c_int;
423436
pub fn fclose(file: *mut FILE) -> c_int;
424437
pub fn remove(filename: *const c_char) -> c_int;

0 commit comments

Comments
 (0)