open_memstream(3) Library Functions Manual open_memstream(3) open_memstream, open_wmemstream - LIBRARY Standard C library (libc, -lc) #include FILE *open_memstream(char **ptr, size_t *sizeloc); #include FILE *open_wmemstream(wchar_t **ptr, size_t *sizeloc); glibc (. feature_test_macros(7)): open_memstream(), open_wmemstream(): glibc 2.10: _POSIX_C_SOURCE >= 200809L glibc 2.10: _BSD_SOURCE open_memstream() . . . free(3). ptr sizeloc , . (fflush(3)) (fclose(3)). , . , , . null . , sizeloc. , ( ). . fseek(3) fseeko(3). null. open_wmemstream() open_memstream(), , . open_memstream() open_wmemstream() FILE. NULL errno . attributes(7). +----------------------------+----------------------------------------------------------+--------------------------+ | | | | +----------------------------+----------------------------------------------------------+--------------------------+ |open_memstream(), | | MT-Safe | |open_wmemstream() | | | +----------------------------+----------------------------------------------------------+--------------------------+ POSIX.1-2008. open_memstream() glibc 1.0.x. open_wmemstream() glibc 2.4. , , (. ., fileno(3), ). Before glibc 2.7, seeking past the end of a stream created by open_memstream() does not enlarge the buffer; instead the fseek(3) call fails, returning -1. fmemopen(3). . fmemopen(3), fopen(3), setbuf(3) Azamat Hackimov , Konstantin Shvaykovskiy , Yuri Kozlov ; GNU 3 , . . , , . Linux man-pages 6.06 28 2023 . open_memstream(3)