diff options
author | Ozkan Sezer <sezero@users.sourceforge.net> | 2019-08-07 12:51:28 +0300 |
---|---|---|
committer | H. Peter Anvin (Intel) <hpa@zytor.com> | 2019-08-07 17:53:38 -0700 |
commit | be3e2f9d2d9c88b3a50c19636b924ac58e68c516 (patch) | |
tree | 61044cf7a5da92a24ac43c1131ecb467fb68b9d8 /nasmlib | |
parent | dea90380f42ae3318e54fc9afd59c6dbc90aa55e (diff) | |
download | nasm-be3e2f9d2d9c88b3a50c19636b924ac58e68c516.tar.gz |
update watcom config file.
also a tiny change to nasm_file_exists() so that it builds with c89
compilers.
Signed-off-by: H. Peter Anvin (Intel) <hpa@zytor.com>
Diffstat (limited to 'nasmlib')
-rw-r--r-- | nasmlib/file.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/nasmlib/file.c b/nasmlib/file.c index 2e662a19..e2e6c553 100644 --- a/nasmlib/file.c +++ b/nasmlib/file.c @@ -224,6 +224,9 @@ static const os_fopenflag fopenflags_rb[3] = { 'r', 'b', 0 }; */ bool nasm_file_exists(const char *filename) { +#ifndef os_access + FILE *f; +#endif os_filename osfname; bool exists; @@ -234,7 +237,6 @@ bool nasm_file_exists(const char *filename) #ifdef os_access exists = os_access(osfname, R_OK) == 0; #else - FILE *f; f = os_fopen(osfname, fopenflags_rb); exists = f != NULL; if (f) |