aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authortma <tma@edf5b092-35ff-0310-97b2-ce42778d08ea>2005-11-01 16:05:06 +0000
committertma <tma@edf5b092-35ff-0310-97b2-ce42778d08ea>2005-11-01 16:05:06 +0000
commit24b3361cea084b9038c0f67bf423cd429877fd85 (patch)
tree1af4ef7b8465dd6bff137a5bbe2dd82328b3f17d
parent394cead89ea339273451bb5d5f2369a9a4dbc908 (diff)
downloadioquake3-aero-24b3361cea084b9038c0f67bf423cd429877fd85.tar.gz
ioquake3-aero-24b3361cea084b9038c0f67bf423cd429877fd85.zip
* More Solaris work
git-svn-id: svn://svn.icculus.org/quake3/trunk@205 edf5b092-35ff-0310-97b2-ce42778d08ea
-rw-r--r--code/qcommon/q_shared.h21
-rw-r--r--code/renderer/qgl.h2
-rw-r--r--code/tools/lcc/etc/gcc-solaris.c4
-rw-r--r--code/unix/Makefile6
-rw-r--r--code/unix/snapvectora.s2
5 files changed, 20 insertions, 15 deletions
diff --git a/code/qcommon/q_shared.h b/code/qcommon/q_shared.h
index 39b4973..ab7eb32 100644
--- a/code/qcommon/q_shared.h
+++ b/code/qcommon/q_shared.h
@@ -346,6 +346,7 @@ static float LittleFloat (const float l) { return FloatSwap(&l); }
#ifdef __sun
#include <sys/isa_defs.h>
+#include <sys/byteorder.h>
// bk001205 - from Makefile
#define stricmp strcasecmp
@@ -360,20 +361,24 @@ static float LittleFloat (const float l) { return FloatSwap(&l); }
#define PATH_SEP '/'
-#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 */
+#if defined(_BIG_ENDIAN) && !defined(_LITTLE_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); }
+
+#elif defined(_LITTLE_ENDIAN) && !defined(_BIG_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
+#error "Either _BIG_ENDIAN or _LITTLE_ENDIAN must be #defined, but not both."
#endif
#endif
diff --git a/code/renderer/qgl.h b/code/renderer/qgl.h
index 02b5727..1db2dac 100644
--- a/code/renderer/qgl.h
+++ b/code/renderer/qgl.h
@@ -94,7 +94,7 @@ Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
#endif /* defined(__sun) */
// NOTE: some Linux platforms would need those prototypes
-#if defined(MACOS_X) || defined(__sun)
+#if defined(MACOS_X) || ( defined(__sun) && defined(__sparc) )
typedef void (APIENTRY * PFNGLMULTITEXCOORD1DARBPROC) (GLenum target, GLdouble s);
typedef void (APIENTRY * PFNGLMULTITEXCOORD1DVARBPROC) (GLenum target, const GLdouble *v);
typedef void (APIENTRY * PFNGLMULTITEXCOORD1FARBPROC) (GLenum target, GLfloat s);
diff --git a/code/tools/lcc/etc/gcc-solaris.c b/code/tools/lcc/etc/gcc-solaris.c
index f0e20e9..d7effde 100644
--- a/code/tools/lcc/etc/gcc-solaris.c
+++ b/code/tools/lcc/etc/gcc-solaris.c
@@ -1,4 +1,4 @@
-/* x86s running Linux */
+/* Solaris with GNU Compilers */
#include <string.h>
@@ -25,7 +25,7 @@ char inputs[256] = "";
// TTimo experimental: do not compile with the __linux__ define, we are doing bytecode!
char *cpp[] = { LCCDIR "q3cpp" BINEXT,
"-U__GNUC__", "-D_POSIX_SOURCE", "-D__STDC__=1", "-D__STRICT_ANSI__",
- "-Dunix", "-Di386", "-Dlinux",
+ "-Dunix", "-Di386", "-Dsun",
"-D__unix__", "-D__i386__", "-D__signed__=signed",
"$1", "$2", "$3", 0 };
char *include[] = {"-I" LCCDIR "include", "-I" LCCDIR "gcc/include", "-I/usr/include",
diff --git a/code/unix/Makefile b/code/unix/Makefile
index 32a5016..8a01a23 100644
--- a/code/unix/Makefile
+++ b/code/unix/Makefile
@@ -418,13 +418,13 @@ ifeq ($(PLATFORM),SunOS)
LDFLAGS=-lsocket -lnsl -ldl -lm
ifeq ($(strip $(USE_SDL)),true)
- GLLDFLAGS=$(shell sdl-config --libs) -lGLU -lX11 -lXext
+ GLLDFLAGS=$(shell sdl-config --libs) -L/usr/X11/lib -lGLU -lX11 -lXext
else
- GLLDFLAGS=-L/usr/openwin/$(LIB) -lGLU -lX11 -lXext
+ GLLDFLAGS=-L/usr/openwin/$(LIB) -L/usr/X11/lib -lGLU -lX11 -lXext
endif
ifeq ($(ARCH),i386)
- # linux32 make ...
+ # Solarix x86 make ...
BASE_CFLAGS += -m32
LDFLAGS+=-m32
endif
diff --git a/code/unix/snapvectora.s b/code/unix/snapvectora.s
index 0206ce2..63ea3e8 100644
--- a/code/unix/snapvectora.s
+++ b/code/unix/snapvectora.s
@@ -76,7 +76,7 @@ C(Sys_SnapVector):
// void Sys_SnapVectorCW( float *v, unsigned short int cw )
.global C(Sys_SnapVectorCW)
-C(Sys_SnapVector_cw):
+C(Sys_SnapVectorCW):
pushl %eax
pushl %ebp
movl %esp,%ebp