From 93c998d9e862d0d8d69189f1580b6faed2ebd5e2 Mon Sep 17 00:00:00 2001 From: cuz Date: Sun, 19 Nov 2000 17:35:07 +0000 Subject: [PATCH] MingW fixes git-svn-id: svn://svn.cc65.org/cc65/trunk@447 b7a2c559-68d2-44c3-8de9-860c34a00d81 --- src/ar65/objfile.c | 6 ++++-- src/cl65/main.c | 4 ++-- src/common/xsprintf.c | 2 +- 3 files changed, 7 insertions(+), 5 deletions(-) diff --git a/src/ar65/objfile.c b/src/ar65/objfile.c index 93fcfbf42..1f5bd8abe 100644 --- a/src/ar65/objfile.c +++ b/src/ar65/objfile.c @@ -35,7 +35,7 @@ #include #include -#if defined(__WATCOMC__) || defined(_MSC_VER) +#if defined(__WATCOMC__) || defined(_MSC_VER) || defined(__MINGW32__) /* The Windows compilers have the file in the wrong directory */ # include #else @@ -45,8 +45,10 @@ #include #include -#include "../common/xmalloc.h" +/* common */ +#include "xmalloc.h" +/* ar65 */ #include "error.h" #include "objdata.h" #include "fileio.h" diff --git a/src/cl65/main.c b/src/cl65/main.c index 62ce40e2e..2f2003eac 100644 --- a/src/cl65/main.c +++ b/src/cl65/main.c @@ -38,7 +38,7 @@ #include #include #include -#if defined(__WATCOMC__) || defined(_MSC_VER) +#if defined(__WATCOMC__) || defined(_MSC_VER) || defined(__MINGW32__) # include /* DOS, OS/2 and Windows */ #else # include "spawn.h" /* All others */ @@ -336,7 +336,7 @@ static void Link (void) { unsigned I; - /* If we have a linker config file given, add it to the command line. + /* If we have a linker config file given, add it to the command line. * Otherwise pass the target to the linker if we have one. */ if (LinkerConfig) { diff --git a/src/common/xsprintf.c b/src/common/xsprintf.c index 4d891ad8b..1f85c65a4 100644 --- a/src/common/xsprintf.c +++ b/src/common/xsprintf.c @@ -66,7 +66,7 @@ int xvsprintf (char* Buf, size_t BufSize, const char* Format, va_list ap) { #if defined(__WATCOMC__) int Res = _vbprintf (Buf, BufSize, Format, ap); -#elif defined(__GNUC__) && !defined(__GO32__) +#elif defined(__GNUC__) && !defined(__GO32__) && !defined(__MINGW32__) int Res = vsnprintf (Buf, BufSize, Format, ap); #elif defined(_MSC_VER) int Res = _vsnprintf (Buf, BufSize, Format, ap);