diff --git a/dmd2/mars.h b/dmd2/mars.h index bce130fc..09d3bf47 100644 --- a/dmd2/mars.h +++ b/dmd2/mars.h @@ -365,7 +365,7 @@ extern Global global; /* Set if Windows Structured Exception Handling C extensions are supported. * Apparently, VC has dropped support for these? */ -#define WINDOWS_SEH _WIN32 +#define WINDOWS_SEH (_WIN32 && !defined(__MINGW32__)) #include "longdouble.h" diff --git a/dmd2/root/response.c b/dmd2/root/response.c index 94d4c39a..e2e91b92 100644 --- a/dmd2/root/response.c +++ b/dmd2/root/response.c @@ -29,7 +29,7 @@ #include #endif -#if _MSC_VER +#if _MSC_VER || defined(__MINGW32__) #include #include #include diff --git a/dmd2/root/speller.c b/dmd2/root/speller.c index 7f7a0a7b..15a65b00 100644 --- a/dmd2/root/speller.c +++ b/dmd2/root/speller.c @@ -14,6 +14,8 @@ #if __sun || _MSC_VER #include +#elif __MINGW32__ +#include #endif #include "speller.h" diff --git a/driver/linker.cpp b/driver/linker.cpp index 056dcbb6..f61e7b77 100644 --- a/driver/linker.cpp +++ b/driver/linker.cpp @@ -411,7 +411,7 @@ int runExecutable() int status = executeToolAndWait(gExePath, opts::runargs, global.params.verbose); if (status < 0) { -#if defined(_MSC_VER) +#if defined(_MSC_VER) || defined(__MINGW32__) error("program received signal %d", -status); #else error("program received signal %d (%s)", -status, strsignal(-status));