r133 - in trunk: lcc lcc/etc q3asm

DONOTREPLY at icculus.org DONOTREPLY at icculus.org
Mon Oct 3 21:49:02 EDT 2005


Author: tma
Date: 2005-10-03 21:49:02 -0400 (Mon, 03 Oct 2005)
New Revision: 133

Modified:
   trunk/lcc/etc/lcc.c
   trunk/lcc/makefile
   trunk/q3asm/cmdlib.c
   trunk/q3asm/cmdlib.h
Log:
* lcc and q3asm now build with MinGW


Modified: trunk/lcc/etc/lcc.c
===================================================================
--- trunk/lcc/etc/lcc.c	2005-10-04 01:21:34 UTC (rev 132)
+++ trunk/lcc/etc/lcc.c	2005-10-04 01:49:02 UTC (rev 133)
@@ -280,7 +280,11 @@
 			fprintf(stderr, "\n");
 		}
 		if (verbose < 2)
+#ifndef WIN32
 			status = _spawnvp(_P_WAIT, argv[0], argv);
+#else
+			status = _spawnvp(_P_WAIT, argv[0], (const char* const*)argv);
+#endif
 		if (status == -1) {
 			fprintf(stderr, "%s: ", progname);
 			perror(argv[0]);
@@ -521,6 +525,9 @@
 static void initinputs(void) {
 	char *s = getenv("LCCINPUTS");
 	List b;
+#ifdef WIN32
+	List list;
+#endif
 
 	if (s == 0 || (s = inputs)[0] == 0)
 		s = ".";
@@ -538,7 +545,7 @@
 			} while (b != lccinputs);
 	}
 #ifdef WIN32
-	if (list = b = path2list(getenv("include")))
+	if ((list = b = path2list(getenv("include"))))
 		do {
 			b = b->link;
 			ilist = append(stringf("-I\"%s\"", b->str), ilist);

Modified: trunk/lcc/makefile
===================================================================
--- trunk/lcc/makefile	2005-10-04 01:21:34 UTC (rev 132)
+++ trunk/lcc/makefile	2005-10-04 01:49:02 UTC (rev 133)
@@ -4,10 +4,10 @@
 A=.a
 O=.o
 E=
-CC=cc
+CC=gcc
 CFLAGS=-O2 -Wall -fno-strict-aliasing
 LDFLAGS=
-LD=cc
+LD=gcc
 AR=ar ruv
 RANLIB=ranlib
 DIFF=diff

Modified: trunk/q3asm/cmdlib.c
===================================================================
--- trunk/q3asm/cmdlib.c	2005-10-04 01:21:34 UTC (rev 132)
+++ trunk/q3asm/cmdlib.c	2005-10-04 01:49:02 UTC (rev 133)
@@ -636,9 +636,10 @@
 	return end;
 }
 
-#ifndef MAXPATH
+#ifdef MAX_PATH
+#undef MAX_PATH
+#endif
 #define MAX_PATH 4096
-#endif
 static FILE* myfopen(const char* filename, const char* mode)
 {
 	char* p;

Modified: trunk/q3asm/cmdlib.h
===================================================================
--- trunk/q3asm/cmdlib.h	2005-10-04 01:21:34 UTC (rev 132)
+++ trunk/q3asm/cmdlib.h	2005-10-04 01:49:02 UTC (rev 133)
@@ -24,7 +24,7 @@
 #ifndef __CMDLIB__
 #define __CMDLIB__
 
-#ifdef _WIN32
+#ifdef _MSC_VER
 #pragma warning(disable : 4244)     // MIPS
 #pragma warning(disable : 4136)     // X86
 #pragma warning(disable : 4051)     // ALPHA
@@ -44,7 +44,7 @@
 #include <time.h>
 #include <stdarg.h>
 
-#ifdef _WIN32
+#ifdef _MSC_VER
 
 #pragma intrinsic( memset, memcpy )
 




More information about the quake3-commits mailing list