0
0
mirror of https://github.com/netwide-assembler/nasm.git synced 2025-10-10 00:25:06 -04:00

Add wrappers around fopen(), use mmap on glibc

Add wrappers to fopen().  The intent is to replace references to
FILE * with an internal structure which can also cache things like the
filename and, when needed, the full pathname and checksums.

Also, add the "m" flag if we are compiling for glibc, for speed.

Signed-off-by: H. Peter Anvin <hpa@zytor.com>
This commit is contained in:
H. Peter Anvin
2016-05-25 04:28:46 -07:00
parent 4976cd2518
commit 3e83cec90e
11 changed files with 69 additions and 20 deletions

View File

@@ -341,7 +341,7 @@ static void calc_md5(const char *const filename,
FILE *f;
MD5_CTX ctx;
f = pp_input_fopen(filename, "rb");
f = pp_input_fopen(filename, NF_BINARY);
if (!f)
goto done;