diff --git a/headers/posix/stdio.h b/headers/posix/stdio.h index b5fa277f30..7f876f27cb 100644 --- a/headers/posix/stdio.h +++ b/headers/posix/stdio.h @@ -99,6 +99,17 @@ extern void perror(const char *errorPrefix); extern FILE *fmemopen(void *buf, size_t size, const char *mode); extern FILE *open_memstream(char **buf, size_t *size); +/* callback streams */ +#ifdef _GNU_SOURCE +typedef struct { + cookie_read_function_t *read; + cookie_write_function_t *write; + cookie_seek_function_t *seek; + cookie_close_function_t *close; +} cookie_io_functions_t; +extern FILE *fopencookie(void *cookie, const char *mode, cookie_io_functions_t io_funcs); +#endif /*_GNU_SOURCE*/ + /* file I/O */ extern int fflush(FILE *stream); extern int fflush_unlocked(FILE *stream);