From 309c37b9c234e458972a84b2379ad64c4cd88167 Mon Sep 17 00:00:00 2001 From: Jamie Wilkinson Date: Fri, 12 Apr 2002 12:41:24 +0000 Subject: [PATCH] - Removed traces of C_ONLY, replaced with HAVE_MASM --- TODO | 1 + src/Makefile.am | 4 ++-- src/baseq2/q_shared.c | 2 +- src/baseq2/q_shared.h | 5 +++-- src/ctf/q_shared.c | 2 +- src/ctf/q_shared.h | 5 ++++- src/q_shared.c | 2 +- src/q_shared.h | 5 +++-- 8 files changed, 16 insertions(+), 10 deletions(-) diff --git a/TODO b/TODO index 4f4ff6b..20b9f97 100644 --- a/TODO +++ b/TODO @@ -7,3 +7,4 @@ - use DATADIR to find game data, rather than in same directory as libraries this way, it can follow FHS: libs in /usr/lib/games/quake2 and data in /usr/share/games/quake2, for example +- go through code and hunt down assert()s diff --git a/src/Makefile.am b/src/Makefile.am index 1ed2cf5..e0bcff3 100644 --- a/src/Makefile.am +++ b/src/Makefile.am @@ -1,8 +1,8 @@ # $Id$ # swap comments to build the modpacks -SUBDIRS = . baseq2 ctf -#SUBDIRS = . baseq2 ctf xatrix rogue +#SUBDIRS = . baseq2 ctf +SUBDIRS = . baseq2 ctf xatrix rogue bin_PROGRAMS = quake2 \ ref_soft.so ref_softx.so ref_softsdl.so \ diff --git a/src/baseq2/q_shared.c b/src/baseq2/q_shared.c index 5c2d20e..888b9e0 100644 --- a/src/baseq2/q_shared.c +++ b/src/baseq2/q_shared.c @@ -267,7 +267,7 @@ float Q_fabs (float f) #endif } -#if defined _M_IX86 && !defined C_ONLY +#ifdef HAVE_MASM #pragma warning (disable:4035) __declspec( naked ) long Q_ftol( float f ) { diff --git a/src/baseq2/q_shared.h b/src/baseq2/q_shared.h index bc5e36c..e93b4d6 100644 --- a/src/baseq2/q_shared.h +++ b/src/baseq2/q_shared.h @@ -48,13 +48,13 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. #else #define id386 0 #endif -*/ #if defined _M_ALPHA && !defined C_ONLY #define idaxp 1 #else #define idaxp 0 #endif +*/ typedef unsigned char byte; typedef enum {false, true} qboolean; @@ -147,10 +147,11 @@ extern vec3_t vec3_origin; #define IS_NAN(x) (((*(int *)&x)&nanmask)==nanmask) +/* FIXME: (jaq) use them C99 functions instead */ // microsoft's fabs seems to be ungodly slow... //float Q_fabs (float f); //#define fabs(f) Q_fabs(f) -#if !defined C_ONLY && defined _WIN32 +#ifdef HAVE_MASM extern long Q_ftol( float f ); #else #define Q_ftol( f ) ( long ) (f) diff --git a/src/ctf/q_shared.c b/src/ctf/q_shared.c index 518f7eb..339efda 100644 --- a/src/ctf/q_shared.c +++ b/src/ctf/q_shared.c @@ -261,7 +261,7 @@ float Q_fabs (float f) #endif } -#if defined _M_IX86 && !defined C_ONLY +#ifdef HAVE_MASM #pragma warning (disable:4035) __declspec( naked ) long Q_ftol( float f ) { diff --git a/src/ctf/q_shared.h b/src/ctf/q_shared.h index 4b14f53..89ae761 100644 --- a/src/ctf/q_shared.h +++ b/src/ctf/q_shared.h @@ -48,11 +48,13 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. #endif */ +/* #if defined _M_ALPHA && !defined C_ONLY #define idaxp 1 #else #define idaxp 0 #endif +*/ typedef unsigned char byte; typedef enum {false, true} qboolean; @@ -145,10 +147,11 @@ extern vec3_t vec3_origin; #define IS_NAN(x) (((*(int *)&x)&nanmask)==nanmask) +/* FIXME: (jaq) use them C99 functions instead */ // microsoft's fabs seems to be ungodly slow... //float Q_fabs (float f); //#define fabs(f) Q_fabs(f) -#if !defined C_ONLY && !defined __linux__ && !defined __FreeBSD__ && !defined __sgi +#ifdef HAVE_MASM extern long Q_ftol( float f ); #else #define Q_ftol( f ) ( long ) (f) diff --git a/src/q_shared.c b/src/q_shared.c index db62dd6..5ac5814 100644 --- a/src/q_shared.c +++ b/src/q_shared.c @@ -261,7 +261,7 @@ float Q_fabs (float f) #endif } -#if defined _M_IX86 && !defined C_ONLY +#ifdef HAVE_MASM #pragma warning (disable:4035) __declspec( naked ) long Q_ftol( float f ) { diff --git a/src/q_shared.h b/src/q_shared.h index bc5e36c..e93b4d6 100644 --- a/src/q_shared.h +++ b/src/q_shared.h @@ -48,13 +48,13 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. #else #define id386 0 #endif -*/ #if defined _M_ALPHA && !defined C_ONLY #define idaxp 1 #else #define idaxp 0 #endif +*/ typedef unsigned char byte; typedef enum {false, true} qboolean; @@ -147,10 +147,11 @@ extern vec3_t vec3_origin; #define IS_NAN(x) (((*(int *)&x)&nanmask)==nanmask) +/* FIXME: (jaq) use them C99 functions instead */ // microsoft's fabs seems to be ungodly slow... //float Q_fabs (float f); //#define fabs(f) Q_fabs(f) -#if !defined C_ONLY && defined _WIN32 +#ifdef HAVE_MASM extern long Q_ftol( float f ); #else #define Q_ftol( f ) ( long ) (f)