aboutsummaryrefslogtreecommitdiffstats
path: root/code/qcommon
diff options
context:
space:
mode:
authortma <tma@edf5b092-35ff-0310-97b2-ce42778d08ea>2005-10-29 22:05:20 +0000
committertma <tma@edf5b092-35ff-0310-97b2-ce42778d08ea>2005-10-29 22:05:20 +0000
commit72dc3da821c616b97246e6b7cf5587c2e936d144 (patch)
tree0293ef990c25d79e7e461923c7a43afffdf9ae67 /code/qcommon
parent7c7b8ece05c0fb249a08e2da1f746f8a34a01b31 (diff)
downloadioquake3-aero-72dc3da821c616b97246e6b7cf5587c2e936d144.tar.gz
ioquake3-aero-72dc3da821c616b97246e6b7cf5587c2e936d144.zip
* Beginnings of Solaris support from Vincent S. Cojot
* Note this patch also splits USE_SDL into USE_SDL_VIDEO and USE_SDL_AUDIO git-svn-id: svn://svn.icculus.org/quake3/trunk@199 edf5b092-35ff-0310-97b2-ce42778d08ea
Diffstat (limited to 'code/qcommon')
-rw-r--r--code/qcommon/common.c2
-rw-r--r--code/qcommon/q_shared.h48
2 files changed, 48 insertions, 2 deletions
diff --git a/code/qcommon/common.c b/code/qcommon/common.c
index 60825f2..3fad8ed 100644
--- a/code/qcommon/common.c
+++ b/code/qcommon/common.c
@@ -24,7 +24,7 @@ Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
#include "q_shared.h"
#include "qcommon.h"
#include <setjmp.h>
-#if defined __linux__ || defined MACOS_X || defined __FreeBSD__
+#if defined __linux__ || defined MACOS_X || defined __FreeBSD__ || defined __sun
#include <netinet/in.h>
#else
#include <winsock.h>
diff --git a/code/qcommon/q_shared.h b/code/qcommon/q_shared.h
index 41e634a..08d4c23 100644
--- a/code/qcommon/q_shared.h
+++ b/code/qcommon/q_shared.h
@@ -105,7 +105,7 @@ Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
// this is the define for determining if we have an asm version of a C function
-#if (defined _M_IX86 || defined __i386__) && !defined __sun__ && !defined __LCC__
+#if (defined _M_IX86 || defined __i386__) && !defined __sun && !defined __LCC__
#define id386 1
#else
#define id386 0
@@ -355,6 +355,52 @@ static float LittleFloat (const float l) { return FloatSwap(&l); }
#endif
+//======================= SUNOS DEFINES =================================
+
+#ifdef __sun
+
+#include <sys/isa_defs.h>
+
+// bk001205 - from Makefile
+#define stricmp strcasecmp
+
+#define MAC_STATIC
+#define ID_INLINE inline
+
+#ifdef __i386__
+#define CPUSTRING "Solaris-i386"
+#elif defined __sparc
+#define CPUSTRING "Solaris-sparc"
+#endif
+
+#define PATH_SEP '/'
+
+// bk001205 - try
+#ifdef Q3_STATIC
+#define GAME_HARD_LINKED
+#define CGAME_HARD_LINKED
+#define UI_HARD_LINKED
+#define BOTLIB_HARD_LINKED
+#endif
+
+#if defined(_LITTLE_ENDIAN)
+inline static short BigShort( short l) { return ShortSwap(l); }
+#define LittleShort
+inline static int BigLong(int l) { return LongSwap(l); }
+#define LittleLong
+inline static float BigFloat(const float l) { return FloatSwap(&l); }
+#define LittleFloat
+#else /* Must be _BIG_ENDIAN */
+#define BigShort
+inline static short LittleShort(short l) { return ShortSwap(l); }
+#define BigLong
+inline static int LittleLong (int l) { return LongSwap(l); }
+#define BigFloat
+inline static float LittleFloat (const float l) { return FloatSwap(&l); }
+#endif
+
+#endif
+
//=============================================================
typedef unsigned char byte;