* More Solaris work

This commit is contained in:
Tim Angus 2005-11-01 16:05:06 +00:00
parent 0a3e96af77
commit acf1f46a2b
5 changed files with 20 additions and 15 deletions

View file

@ -346,6 +346,7 @@ static float LittleFloat (const float l) { return FloatSwap(&l); }
#ifdef __sun #ifdef __sun
#include <sys/isa_defs.h> #include <sys/isa_defs.h>
#include <sys/byteorder.h>
// bk001205 - from Makefile // bk001205 - from Makefile
#define stricmp strcasecmp #define stricmp strcasecmp
@ -360,20 +361,24 @@ static float LittleFloat (const float l) { return FloatSwap(&l); }
#define PATH_SEP '/' #define PATH_SEP '/'
#if defined(_LITTLE_ENDIAN) #if defined(_BIG_ENDIAN) && !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 #define BigShort
inline static short LittleShort(short l) { return ShortSwap(l); } inline static short LittleShort(short l) { return ShortSwap(l); }
#define BigLong #define BigLong
inline static int LittleLong (int l) { return LongSwap(l); } inline static int LittleLong (int l) { return LongSwap(l); }
#define BigFloat #define BigFloat
inline static float LittleFloat (const float l) { return FloatSwap(&l); } 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
#endif #endif

View file

@ -94,7 +94,7 @@ Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
#endif /* defined(__sun) */ #endif /* defined(__sun) */
// NOTE: some Linux platforms would need those prototypes // 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 * PFNGLMULTITEXCOORD1DARBPROC) (GLenum target, GLdouble s);
typedef void (APIENTRY * PFNGLMULTITEXCOORD1DVARBPROC) (GLenum target, const GLdouble *v); typedef void (APIENTRY * PFNGLMULTITEXCOORD1DVARBPROC) (GLenum target, const GLdouble *v);
typedef void (APIENTRY * PFNGLMULTITEXCOORD1FARBPROC) (GLenum target, GLfloat s); typedef void (APIENTRY * PFNGLMULTITEXCOORD1FARBPROC) (GLenum target, GLfloat s);

View file

@ -1,4 +1,4 @@
/* x86s running Linux */ /* Solaris with GNU Compilers */
#include <string.h> #include <string.h>
@ -25,7 +25,7 @@ char inputs[256] = "";
// TTimo experimental: do not compile with the __linux__ define, we are doing bytecode! // TTimo experimental: do not compile with the __linux__ define, we are doing bytecode!
char *cpp[] = { LCCDIR "q3cpp" BINEXT, char *cpp[] = { LCCDIR "q3cpp" BINEXT,
"-U__GNUC__", "-D_POSIX_SOURCE", "-D__STDC__=1", "-D__STRICT_ANSI__", "-U__GNUC__", "-D_POSIX_SOURCE", "-D__STDC__=1", "-D__STRICT_ANSI__",
"-Dunix", "-Di386", "-Dlinux", "-Dunix", "-Di386", "-Dsun",
"-D__unix__", "-D__i386__", "-D__signed__=signed", "-D__unix__", "-D__i386__", "-D__signed__=signed",
"$1", "$2", "$3", 0 }; "$1", "$2", "$3", 0 };
char *include[] = {"-I" LCCDIR "include", "-I" LCCDIR "gcc/include", "-I/usr/include", char *include[] = {"-I" LCCDIR "include", "-I" LCCDIR "gcc/include", "-I/usr/include",

View file

@ -418,13 +418,13 @@ ifeq ($(PLATFORM),SunOS)
LDFLAGS=-lsocket -lnsl -ldl -lm LDFLAGS=-lsocket -lnsl -ldl -lm
ifeq ($(strip $(USE_SDL)),true) 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 else
GLLDFLAGS=-L/usr/openwin/$(LIB) -lGLU -lX11 -lXext GLLDFLAGS=-L/usr/openwin/$(LIB) -L/usr/X11/lib -lGLU -lX11 -lXext
endif endif
ifeq ($(ARCH),i386) ifeq ($(ARCH),i386)
# linux32 make ... # Solarix x86 make ...
BASE_CFLAGS += -m32 BASE_CFLAGS += -m32
LDFLAGS+=-m32 LDFLAGS+=-m32
endif endif

View file

@ -76,7 +76,7 @@ C(Sys_SnapVector):
// void Sys_SnapVectorCW( float *v, unsigned short int cw ) // void Sys_SnapVectorCW( float *v, unsigned short int cw )
.global C(Sys_SnapVectorCW) .global C(Sys_SnapVectorCW)
C(Sys_SnapVector_cw): C(Sys_SnapVectorCW):
pushl %eax pushl %eax
pushl %ebp pushl %ebp
movl %esp,%ebp movl %esp,%ebp