X-Git-Url: http://git.osdn.net/view?a=blobdiff_plain;f=include%2Fstdio.h;h=2932c76f0ee391e1ec8d8d3ae3bc80645d43c669;hb=061843340fbf2493bb615e20e66f60c5d1ef0455;hp=884d2e6a72768b5ea0d78fb1aef88abd969ba92b;hpb=4000b0107ddd7fe733fa31d4f078c6fcd35851d6;p=android-x86%2Fexternal-musl-libc.git diff --git a/include/stdio.h b/include/stdio.h index 884d2e6a..2932c76f 100644 --- a/include/stdio.h +++ b/include/stdio.h @@ -182,6 +182,20 @@ int vasprintf(char **, const char *, __isoc_va_list); #ifdef _GNU_SOURCE char *fgets_unlocked(char *, int, FILE *); int fputs_unlocked(const char *, FILE *); + +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 *, off_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); #endif #if defined(_LARGEFILE64_SOURCE) || defined(_GNU_SOURCE)