aboutsummaryrefslogtreecommitdiffstats
path: root/code/qcommon/q_platform.h
diff options
context:
space:
mode:
authortma <tma@edf5b092-35ff-0310-97b2-ce42778d08ea>2007-11-26 20:18:53 +0000
committertma <tma@edf5b092-35ff-0310-97b2-ce42778d08ea>2007-11-26 20:18:53 +0000
commit325890dc089210b3eabb6bb22154e7a3d7d74a25 (patch)
tree703f9319362f5e55743a0e1e8188eb94684ed0a5 /code/qcommon/q_platform.h
parentdaa6b52744a1530591e0717d99976c30e5e8e0a6 (diff)
downloadioquake3-aero-325890dc089210b3eabb6bb22154e7a3d7d74a25.tar.gz
ioquake3-aero-325890dc089210b3eabb6bb22154e7a3d7d74a25.zip
* Move MINSDL_ values to sys_local.h from Makefile/VC project
* Merge *BSD platform definitions in q_platform.h * IRIX support (Patrick Baggett <baggett.patrick@figglesoftware.com>) git-svn-id: svn://svn.icculus.org/quake3/trunk@1218 edf5b092-35ff-0310-97b2-ce42778d08ea
Diffstat (limited to 'code/qcommon/q_platform.h')
-rw-r--r--code/qcommon/q_platform.h79
1 files changed, 25 insertions, 54 deletions
diff --git a/code/qcommon/q_platform.h b/code/qcommon/q_platform.h
index a10ae9b..be57ef7 100644
--- a/code/qcommon/q_platform.h
+++ b/code/qcommon/q_platform.h
@@ -19,7 +19,7 @@ along with Quake III Arena source code; if not, write to the Free Software
Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
===========================================================================
*/
-//
+
#ifndef __Q_PLATFORM_H
#define __Q_PLATFORM_H
@@ -168,73 +168,28 @@ Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
#endif
-//=============================================================== FreeBSD ===
+//=================================================================== BSD ===
-#ifdef __FreeBSD__
+#if defined(__FreeBSD__) || defined(__OpenBSD__) || defined(__NetBSD__)
#include <sys/types.h>
#include <machine/endian.h>
+#if defined(__FreeBSD__)
#define OS_STRING "freebsd"
-#define ID_INLINE inline
-#define PATH_SEP '/'
-
-#ifdef __i386__
-#define ARCH_STRING "i386"
-#elif defined __axp__
-#define ARCH_STRING "alpha"
-#endif
-
-#if BYTE_ORDER == BIG_ENDIAN
-#define Q3_BIG_ENDIAN
-#else
-#define Q3_LITTLE_ENDIAN
-#endif
-
-#define DLL_EXT ".so"
-
-#endif
-
-//=============================================================== OpenBSD ===
-
-#ifdef __OpenBSD__
-
-#include <sys/types.h>
-#include <machine/endian.h>
-
+#elif defined(__OpenBSD__)
#define OS_STRING "openbsd"
-#define ID_INLINE inline
-#define PATH_SEP '/'
-
-#ifdef __i386__
-#define ARCH_STRING "i386"
-#endif
-
-#if BYTE_ORDER == BIG_ENDIAN
-#define Q3_BIG_ENDIAN
-#else
-#define Q3_LITTLE_ENDIAN
-#endif
-
-#define DLL_EXT ".so"
-
+#elif defined(__NetBSD__)
+#define OS_STRING "netbsd"
#endif
-//================================================================ NetBSD ===
-
-// This is very much like the FreeBSD one and can probably be merged
-#ifdef __NetBSD__
-
-#include <sys/types.h>
-#include <machine/endian.h>
-
-#define OS_STRING "netbsd"
#define ID_INLINE inline
#define PATH_SEP '/'
#ifdef __i386__
#define ARCH_STRING "i386"
-// Netbsd has alot of platforms
+#elif defined __axp__
+#define ARCH_STRING "alpha"
#endif
#if BYTE_ORDER == BIG_ENDIAN
@@ -274,6 +229,22 @@ Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
#endif
+//================================================================== IRIX ===
+
+#ifdef __sgi
+
+#define OS_STRING "irix"
+#define ID_INLINE __inline
+#define PATH_SEP '/'
+
+#define ARCH_STRING "mips"
+
+#define Q3_BIG_ENDIAN // SGI's MIPS are always big endian
+
+#define DLL_EXT ".so"
+
+#endif
+
//================================================================== Q3VM ===
#ifdef Q3_VM