diff options
| author | Conrad Meyer <cem@FreeBSD.org> | 2016-05-11 14:38:27 +0000 |
|---|---|---|
| committer | Conrad Meyer <cem@FreeBSD.org> | 2016-05-11 14:38:27 +0000 |
| commit | 877a840c080f5064aa0c9b1d326f306059f0a186 (patch) | |
| tree | ef3e872e8311fe76a4880b6ec63e08f1a14167d3 /include | |
| parent | f90a20b4b8cd5da5306a735888dd25feb3628046 (diff) | |
Notes
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 f55aaf7c72741..724138631c369 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>. */ |
