* lcc and q3asm now build with MinGW

This commit is contained in:
Tim Angus 2005-10-04 01:49:02 +00:00
parent c07dc8dbee
commit b1cef6352e
4 changed files with 15 additions and 7 deletions

View file

@ -280,7 +280,11 @@ static int callsys(char **av) {
fprintf(stderr, "\n"); fprintf(stderr, "\n");
} }
if (verbose < 2) if (verbose < 2)
#ifndef WIN32
status = _spawnvp(_P_WAIT, argv[0], argv); status = _spawnvp(_P_WAIT, argv[0], argv);
#else
status = _spawnvp(_P_WAIT, argv[0], (const char* const*)argv);
#endif
if (status == -1) { if (status == -1) {
fprintf(stderr, "%s: ", progname); fprintf(stderr, "%s: ", progname);
perror(argv[0]); perror(argv[0]);
@ -521,6 +525,9 @@ static void help(void) {
static void initinputs(void) { static void initinputs(void) {
char *s = getenv("LCCINPUTS"); char *s = getenv("LCCINPUTS");
List b; List b;
#ifdef WIN32
List list;
#endif
if (s == 0 || (s = inputs)[0] == 0) if (s == 0 || (s = inputs)[0] == 0)
s = "."; s = ".";
@ -538,7 +545,7 @@ static void initinputs(void) {
} while (b != lccinputs); } while (b != lccinputs);
} }
#ifdef WIN32 #ifdef WIN32
if (list = b = path2list(getenv("include"))) if ((list = b = path2list(getenv("include"))))
do { do {
b = b->link; b = b->link;
ilist = append(stringf("-I\"%s\"", b->str), ilist); ilist = append(stringf("-I\"%s\"", b->str), ilist);

View file

@ -4,10 +4,10 @@ TEMPDIR=/tmp
A=.a A=.a
O=.o O=.o
E= E=
CC=cc CC=gcc
CFLAGS=-O2 -Wall -fno-strict-aliasing CFLAGS=-O2 -Wall -fno-strict-aliasing
LDFLAGS= LDFLAGS=
LD=cc LD=gcc
AR=ar ruv AR=ar ruv
RANLIB=ranlib RANLIB=ranlib
DIFF=diff DIFF=diff

View file

@ -636,9 +636,10 @@ int Q_filelength (FILE *f)
return end; return end;
} }
#ifndef MAXPATH #ifdef MAX_PATH
#define MAX_PATH 4096 #undef MAX_PATH
#endif #endif
#define MAX_PATH 4096
static FILE* myfopen(const char* filename, const char* mode) static FILE* myfopen(const char* filename, const char* mode)
{ {
char* p; char* p;

View file

@ -24,7 +24,7 @@ Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
#ifndef __CMDLIB__ #ifndef __CMDLIB__
#define __CMDLIB__ #define __CMDLIB__
#ifdef _WIN32 #ifdef _MSC_VER
#pragma warning(disable : 4244) // MIPS #pragma warning(disable : 4244) // MIPS
#pragma warning(disable : 4136) // X86 #pragma warning(disable : 4136) // X86
#pragma warning(disable : 4051) // ALPHA #pragma warning(disable : 4051) // ALPHA
@ -44,7 +44,7 @@ Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
#include <time.h> #include <time.h>
#include <stdarg.h> #include <stdarg.h>
#ifdef _WIN32 #ifdef _MSC_VER
#pragma intrinsic( memset, memcpy ) #pragma intrinsic( memset, memcpy )