summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorH. Peter Anvin <hpa@linux.intel.com>2016-02-18 14:40:37 -0800
committerH. Peter Anvin <hpa@linux.intel.com>2016-02-18 14:40:37 -0800
commit73b22f5c1c8372bc5fc64962d38a75e9d6998f69 (patch)
treebda4fd97931900b0991aa51a7e76104a2c6650e6
parente65e81b172ceed17621c0f0ca4392a531018071e (diff)
downloadnasm-73b22f5c1c8372bc5fc64962d38a75e9d6998f69.tar.gz
Windows portability fixes
Windows needs strsep() and defines a P_WAIT constant that we need to undefine. Signed-off-by: H. Peter Anvin <hpa@linux.intel.com>
-rw-r--r--configure.in2
-rw-r--r--nasm.h4
2 files changed, 5 insertions, 1 deletions
diff --git a/configure.in b/configure.in
index 98e151ca..38306c2d 100644
--- a/configure.in
+++ b/configure.in
@@ -129,6 +129,7 @@ AC_CHECK_FUNCS(strspn, ,
AC_CHECK_FUNCS(strcasecmp stricmp)
AC_CHECK_FUNCS(strncasecmp strnicmp)
+AC_CHECK_FUNCS(strsep)
AC_CHECK_FUNCS(getuid)
AC_CHECK_FUNCS(getgid)
@@ -153,7 +154,6 @@ AC_SUBST([LIBOBJDIR], [lib/])
PA_REPLACE_FUNC([vsnprintf _vsnprintf])
PA_REPLACE_FUNC([snprintf _snprintf])
PA_REPLACE_FUNC([strlcpy])
-PA_REPLACE_FUNC([strsep])
dnl Check for functions that might not be declared in the headers for
dnl various idiotic reasons (mostly because of library authors
diff --git a/nasm.h b/nasm.h
index 517d924e..9e4fa965 100644
--- a/nasm.h
+++ b/nasm.h
@@ -479,6 +479,10 @@ enum vex_class {
* prefixes, we must ensure the enumerations for prefixes and
* register names do not overlap.
*/
+#ifdef P_WAIT
+# undef P_WAIT /* Macro defined on some Windows versions */
+#endif
+
enum prefixes { /* instruction prefixes */
P_none = 0,
PREFIX_ENUM_START = REG_ENUM_LIMIT,