Add fopencookie() to stdio.h

We already export it in libroot, and libassuan seems to require it.
This commit is contained in:
François Revol 2014-11-19 15:13:45 +01:00
parent b02efcef88
commit e1f303c5ec

View File

@ -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);