r205 - in trunk/code: qcommon renderer tools/lcc/etc unix

DONOTREPLY at icculus.org DONOTREPLY at icculus.org
Tue Nov 1 11:05:07 EST 2005


Author: tma
Date: 2005-11-01 11:05:06 -0500 (Tue, 01 Nov 2005)
New Revision: 205

Modified:
   trunk/code/qcommon/q_shared.h
   trunk/code/renderer/qgl.h
   trunk/code/tools/lcc/etc/gcc-solaris.c
   trunk/code/unix/Makefile
   trunk/code/unix/snapvectora.s
Log:
* More Solaris work


Modified: trunk/code/qcommon/q_shared.h
===================================================================
--- trunk/code/qcommon/q_shared.h	2005-10-31 16:46:05 UTC (rev 204)
+++ trunk/code/qcommon/q_shared.h	2005-11-01 16:05:06 UTC (rev 205)
@@ -346,6 +346,7 @@
 #ifdef __sun
 
 #include <sys/isa_defs.h>
+#include <sys/byteorder.h>
 
 // bk001205 - from Makefile
 #define stricmp strcasecmp
@@ -360,20 +361,24 @@
 
 #define	PATH_SEP '/'
 
-#if defined(_LITTLE_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 /* 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); }
+
+#else
+#error "Either _BIG_ENDIAN or _LITTLE_ENDIAN must be #defined, but not both."
 #endif
 
 #endif

Modified: trunk/code/renderer/qgl.h
===================================================================
--- trunk/code/renderer/qgl.h	2005-10-31 16:46:05 UTC (rev 204)
+++ trunk/code/renderer/qgl.h	2005-11-01 16:05:06 UTC (rev 205)
@@ -94,7 +94,7 @@
 #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);

Modified: trunk/code/tools/lcc/etc/gcc-solaris.c
===================================================================
--- trunk/code/tools/lcc/etc/gcc-solaris.c	2005-10-31 16:46:05 UTC (rev 204)
+++ trunk/code/tools/lcc/etc/gcc-solaris.c	2005-11-01 16:05:06 UTC (rev 205)
@@ -1,4 +1,4 @@
-/* x86s running Linux */
+/* Solaris with GNU Compilers */
 
 #include <string.h>
 
@@ -25,7 +25,7 @@
 // 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",

Modified: trunk/code/unix/Makefile
===================================================================
--- trunk/code/unix/Makefile	2005-10-31 16:46:05 UTC (rev 204)
+++ trunk/code/unix/Makefile	2005-11-01 16:05:06 UTC (rev 205)
@@ -418,13 +418,13 @@
   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

Modified: trunk/code/unix/snapvectora.s
===================================================================
--- trunk/code/unix/snapvectora.s	2005-10-31 16:46:05 UTC (rev 204)
+++ trunk/code/unix/snapvectora.s	2005-11-01 16:05:06 UTC (rev 205)
@@ -76,7 +76,7 @@
 
 // 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




More information about the quake3-commits mailing list