aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--lcc/etc/lcc.c9
-rw-r--r--lcc/makefile4
-rw-r--r--q3asm/cmdlib.c5
-rw-r--r--q3asm/cmdlib.h4
4 files changed, 15 insertions, 7 deletions
diff --git a/lcc/etc/lcc.c b/lcc/etc/lcc.c
index 3b8e6e2..89706df 100644
--- a/lcc/etc/lcc.c
+++ b/lcc/etc/lcc.c
@@ -280,7 +280,11 @@ static int callsys(char **av) {
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 help(void) {
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 @@ static void initinputs(void) {
} 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);
diff --git a/lcc/makefile b/lcc/makefile
index c496406..26efed4 100644
--- a/lcc/makefile
+++ b/lcc/makefile
@@ -4,10 +4,10 @@ TEMPDIR=/tmp
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
diff --git a/q3asm/cmdlib.c b/q3asm/cmdlib.c
index 56c70c0..f3d8554 100644
--- a/q3asm/cmdlib.c
+++ b/q3asm/cmdlib.c
@@ -636,9 +636,10 @@ int Q_filelength (FILE *f)
return end;
}
-#ifndef MAXPATH
-#define MAX_PATH 4096
+#ifdef MAX_PATH
+#undef MAX_PATH
#endif
+#define MAX_PATH 4096
static FILE* myfopen(const char* filename, const char* mode)
{
char* p;
diff --git a/q3asm/cmdlib.h b/q3asm/cmdlib.h
index 0d7dfc3..f2436a1 100644
--- a/q3asm/cmdlib.h
+++ b/q3asm/cmdlib.h
@@ -24,7 +24,7 @@ Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
#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 @@ Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
#include <time.h>
#include <stdarg.h>
-#ifdef _WIN32
+#ifdef _MSC_VER
#pragma intrinsic( memset, memcpy )