diff options
Diffstat (limited to 'include')
-rw-r--r-- | include/stdio.h | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/include/stdio.h b/include/stdio.h index f55aaf7..7241386 100644 --- a/include/stdio.h +++ b/include/stdio.h @@ -58,6 +58,11 @@ typedef __ssize_t ssize_t; #endif #endif +#ifndef _OFF64_T_DECLARED +#define _OFF64_T_DECLARED +typedef __off_t off64_t; +#endif + #if __POSIX_VISIBLE >= 200112 || __XSI_VISIBLE #ifndef _VA_LIST_DECLARED typedef __va_list va_list; @@ -427,6 +432,18 @@ FILE *funopen(const void *, #define fropen(cookie, fn) funopen(cookie, fn, 0, 0, 0) #define fwopen(cookie, fn) funopen(cookie, 0, fn, 0, 0) +typedef ssize_t (cookie_read_function_t)(void *, char *, size_t); +typedef ssize_t (cookie_write_function_t)(void *, const char *, size_t); +typedef int (cookie_seek_function_t)(void *, off64_t *, int); +typedef int (cookie_close_function_t)(void *); +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; +FILE *fopencookie(void *, const char *, cookie_io_functions_t); + /* * Portability hacks. See <sys/types.h>. */ |