From 665d4c9b6e3ff5e36439e33dc5a0ee2a7c84ccff Mon Sep 17 00:00:00 2001 From: Lieuwe Rooijakkers Date: Sun, 21 Jul 2024 21:06:49 +0200 Subject: read_file: openOptions --- src/io/read_file.h | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) (limited to 'src/io/read_file.h') diff --git a/src/io/read_file.h b/src/io/read_file.h index 201ae5b..89f738b 100644 --- a/src/io/read_file.h +++ b/src/io/read_file.h @@ -3,6 +3,11 @@ #include #include +enum allow_flags { + O_NOALLOWMAP = 1 << 0, + O_NOALLOWSPONGE = 1 << 1, +}; + enum mapping_type { MT_MMAP, MT_OWNED, @@ -14,6 +19,6 @@ struct filebuf { enum mapping_type mapping_type; }; -struct filebuf *stream_to_filebuf(FILE *restrict stream); -struct filebuf *file_to_filebuf(char *fname); +struct filebuf *stream_to_filebuf(FILE *restrict stream, int openOptions); +struct filebuf *file_to_filebuf(char *fname, int openOptions); void free_filebuf(struct filebuf *filebuf); -- cgit v1.2.3-70-g09d2