diff options
author | sezero <sezero@users.sourceforge.net> | 2019-10-04 22:13:00 +0300 |
---|---|---|
committer | H. Peter Anvin (Intel) <hpa@zytor.com> | 2020-07-06 13:02:26 -0700 |
commit | 1969dab9c6d4b3d1e44850c013069ce2f088c23a (patch) | |
tree | 6ce0c8e5c7c150f7547f94316a8539d3d8b2cd8f | |
parent | 1348627b72f97585e515fef1307af3d0dd1111a5 (diff) | |
download | nasm-1969dab9c6d4b3d1e44850c013069ce2f088c23a.tar.gz |
portability: Watcom C portability updates
- config/watcom.h: update.
- Mkfiles/openwcom.mak: -wcd=124 to silence "Comparison result always 0"
warnings from error.h::debug_level()
Signed-off-by: H. Peter Anvin (Intel) <hpa@zytor.com>
-rw-r--r-- | Mkfiles/openwcom.mak | 4 | ||||
-rw-r--r-- | config/watcom.h | 30 |
2 files changed, 25 insertions, 9 deletions
diff --git a/Mkfiles/openwcom.mak b/Mkfiles/openwcom.mak index f5bdf085..262a0419 100644 --- a/Mkfiles/openwcom.mak +++ b/Mkfiles/openwcom.mak @@ -14,13 +14,13 @@ mandir = $(prefix)\man CC = *wcl386 DEBUG = -CFLAGS = -zq -6 -ox -wx -ze -fpi $(DEBUG) +CFLAGS = -zq -6 -ox -wx -wcd=124 -ze -fpi $(DEBUG) BUILD_CFLAGS = $(CFLAGS) $(%TARGET_CFLAGS) INTERNAL_CFLAGS = -I$(srcdir) -I. -I$(srcdir)\include -I$(srcdir)\x86 -Ix86 -I$(srcdir)\asm -Iasm -I$(srcdir)\disasm -I$(srcdir)\output ALL_CFLAGS = $(BUILD_CFLAGS) $(INTERNAL_CFLAGS) LD = *wlink LDEBUG = -LDFLAGS = op quiet $(%TARGET_LFLAGS) $(LDEBUG) +LDFLAGS = op q $(%TARGET_LFLAGS) $(LDEBUG) LIBS = STRIP = wstrip diff --git a/config/watcom.h b/config/watcom.h index 1ef2ee74..8d49026d 100644 --- a/config/watcom.h +++ b/config/watcom.h @@ -48,32 +48,39 @@ #define HAVE_DECL_STRLCPY 1 #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 +#if (__WATCOMC__ >= 1230) +#undef HAVE__BOOL /* need stdbool.h */ #define HAVE_STDBOOL_H 1 +#define HAVE_INTTYPES_H 1 #define HAVE_STDINT_H 1 +#define HAVE_UINTPTR_T 1 +#endif #define HAVE_STDLIB_H 1 -#define HAVE_STRCASECMP 1 #define HAVE_STRCSPN 1 #define HAVE_STRICMP 1 -#define HAVE_STRINGS_H 1 -#define HAVE_STRING_H 1 -#define HAVE_STRLCPY 1 -#define HAVE_STRNCASECMP 1 #define HAVE_STRNICMP 1 #define HAVE_STRSPN 1 +#define HAVE_STRING_H 1 +#if (__WATCOMC__ >= 1240) +#define HAVE_STRCASECMP 1 +#define HAVE_STRNCASECMP 1 +#define HAVE_STRLCPY 1 +#define HAVE_STRINGS_H 1 +#endif #define HAVE_SYS_STAT_H 1 #define HAVE_SYS_TYPES_H 1 +#define HAVE_FCNTL_H 1 #define HAVE_UNISTD_H 1 #define HAVE_VSNPRINTF 1 #define STDC_HEADERS 1 -#define inline __inline +#define HAVE__FULLPATH 1 #define HAVE_ACCESS #define HAVE_STRUCT_STAT #define HAVE_STAT @@ -85,5 +92,14 @@ #define HAVE_CHSIZE #define HAVE__CHSIZE #endif +#define HAVE_ISASCII +#define HAVE_ISCNTRL + +#if (__WATCOMC__ >= 1250) +#define restrict __restrict +#else +#define restrict +#endif +#define inline __inline #endif /* NASM_CONFIG_WATCOM_H */ |