aboutsummaryrefslogtreecommitdiffstats
path: root/code/game
diff options
context:
space:
mode:
authortma <tma@edf5b092-35ff-0310-97b2-ce42778d08ea>2005-09-22 03:21:33 +0000
committertma <tma@edf5b092-35ff-0310-97b2-ce42778d08ea>2005-09-22 03:21:33 +0000
commitdf30c9d13185a525d2c45de3becd39c4a178f484 (patch)
tree3cf10550bfe1d9473252bfc3ad56b8007652e622 /code/game
parent3873056dc5e0a7c314fa42dd70c072027ccccec0 (diff)
downloadioquake3-aero-df30c9d13185a525d2c45de3becd39c4a178f484.tar.gz
ioquake3-aero-df30c9d13185a525d2c45de3becd39c4a178f484.zip
* Port to MinGW
git-svn-id: svn://svn.icculus.org/quake3/trunk@97 edf5b092-35ff-0310-97b2-ce42778d08ea
Diffstat (limited to 'code/game')
-rw-r--r--code/game/ai_main.c2
-rw-r--r--code/game/q_math.c2
-rw-r--r--code/game/q_shared.h20
3 files changed, 19 insertions, 5 deletions
diff --git a/code/game/ai_main.c b/code/game/ai_main.c
index cd6dbc9..63de0ce 100644
--- a/code/game/ai_main.c
+++ b/code/game/ai_main.c
@@ -55,7 +55,9 @@ Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
#include "inv.h"
#include "syn.h"
+#ifndef MAX_PATH
#define MAX_PATH 144
+#endif
//bot states
diff --git a/code/game/q_math.c b/code/game/q_math.c
index 53412e1..aeed2ab 100644
--- a/code/game/q_math.c
+++ b/code/game/q_math.c
@@ -740,7 +740,7 @@ int BoxOnPlaneSide2 (vec3_t emins, vec3_t emaxs, struct cplane_s *p)
==================
*/
-#if !( (defined __linux__ || __FreeBSD__) && (defined __i386__) && (!defined C_ONLY)) // rb010123
+#if !( (defined __linux__ || __FreeBSD__ || __MINGW32__) && (defined __i386__) && (!defined C_ONLY)) // rb010123
#if defined __LCC__ || defined C_ONLY || !id386 || defined __VECTORC
diff --git a/code/game/q_shared.h b/code/game/q_shared.h
index d16bb1d..4b4fa31 100644
--- a/code/game/q_shared.h
+++ b/code/game/q_shared.h
@@ -31,7 +31,7 @@ Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
#define MAX_TEAMNAME 32
-#ifdef _WIN32
+#ifdef _MSC_VER
#pragma warning(disable : 4018) // signed/unsigned mismatch
#pragma warning(disable : 4032)
@@ -90,7 +90,7 @@ Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
#endif
-#ifdef _WIN32
+#ifdef _MSC_VER
//#pragma intrinsic( memset, memcpy )
@@ -134,6 +134,7 @@ float FloatSwap (const float *f);
#define QDECL __cdecl
// buildstring will be incorporated into the version string
+#ifdef _MSC_VER
#ifdef NDEBUG
#ifdef _M_IX86
#define CPUSTRING "win-x86"
@@ -147,14 +148,25 @@ float FloatSwap (const float *f);
#define CPUSTRING "win-AXP-debug"
#endif
#endif
+#elif defined __MINGW32__
+#ifdef NDEBUG
+#ifdef __i386__
+#define CPUSTRING "mingw-x86"
+#endif
+#else
+#ifdef __i386__
+#define CPUSTRING "mingw-x86-debug"
+#endif
+#endif
+#endif
#define ID_INLINE __inline
static ID_INLINE short BigShort( short l) { return ShortSwap(l); }
#define LittleShort
-static ID_INLINE int BigLong(int l) { LongSwap(l); }
+static ID_INLINE int BigLong(int l) { return LongSwap(l); }
#define LittleLong
-static ID_INLINE float BigFloat(const float l) { FloatSwap(&l); }
+static ID_INLINE float BigFloat(const float l) { return FloatSwap(&l); }
#define LittleFloat
#define PATH_SEP '\\'