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>
This commit is contained in:
parent
dea90380f4
commit
be3e2f9d2d
2 changed files with 18 additions and 1 deletions
|
@ -49,6 +49,9 @@
|
|||
#define HAVE_DECL_STRNCASECMP 1
|
||||
#define HAVE_DECL_STRNICMP 1
|
||||
#define HAVE_INTTYPES_H 1
|
||||
#ifndef __LINUX__
|
||||
#define HAVE_IO_H 1
|
||||
#endif
|
||||
#define HAVE_LIMITS_H 1
|
||||
#define HAVE_MEMORY_H 1
|
||||
#define HAVE_SNPRINTF 1
|
||||
|
@ -71,4 +74,16 @@
|
|||
#define STDC_HEADERS 1
|
||||
#define inline __inline
|
||||
|
||||
#define HAVE_ACCESS
|
||||
#define HAVE_STRUCT_STAT
|
||||
#define HAVE_STAT
|
||||
#define HAVE_FSTAT
|
||||
#define HAVE_FILENO
|
||||
#ifdef __LINUX__
|
||||
#define HAVE_FTRUNCATE
|
||||
#else
|
||||
#define HAVE_CHSIZE
|
||||
#define HAVE__CHSIZE
|
||||
#endif
|
||||
|
||||
#endif /* NASM_CONFIG_WATCOM_H */
|
||||
|
|
|
@ -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)
|
||||
|
|
Loading…
Reference in a new issue