From c66de1feb727145df9b23986d11070eafd421033 Mon Sep 17 00:00:00 2001 From: Bradley Bell Date: Mon, 31 May 2004 08:33:41 +0000 Subject: [PATCH] XCode compilability fixes --- 2d/pixel.c | 4 +++- ChangeLog | 3 +++ arch/ogl/ogl.c | 5 +++-- include/pstypes.h | 10 +++++----- include/strutil.h | 4 ++-- libmve/mveplay.c | 4 ++-- 6 files changed, 18 insertions(+), 12 deletions(-) diff --git a/2d/pixel.c b/2d/pixel.c index 5271754e..0645bae6 100644 --- a/2d/pixel.c +++ b/2d/pixel.c @@ -1,4 +1,4 @@ -/* $Id: pixel.c,v 1.5 2002-10-10 18:55:32 btb Exp $ */ +/* $Id: pixel.c,v 1.6 2004-05-31 08:33:41 btb Exp $ */ /* THE COMPUTER CODE CONTAINED HEREIN IS THE SOLE PROPERTY OF PARALLAX SOFTWARE CORPORATION ("PARALLAX"). PARALLAX, IN DISTRIBUTING THE CODE TO @@ -25,8 +25,10 @@ COPYRIGHT 1993-1998 PARALLAX SOFTWARE CORPORATION. ALL RIGHTS RESERVED. #include "gr.h" #include "grdef.h" +#ifdef __MSDOS__ #include "vesa.h" #include "modex.h" +#endif #ifdef OGL #include "ogl_init.h" #endif diff --git a/ChangeLog b/ChangeLog index 35991283..beee6534 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,5 +1,8 @@ 2004-05-31 Bradley Bell + * 2d/pixel.c, arch/ogl/ogl.c, include/pstypes.h, + include/strutil.h, libmve/mveplay.c: XCode compilability fixes + * Info.plist.in, Makefile.am, configure.ac: remove old OSX bundle stuff diff --git a/arch/ogl/ogl.c b/arch/ogl/ogl.c index 1ed05404..2a9e0735 100644 --- a/arch/ogl/ogl.c +++ b/arch/ogl/ogl.c @@ -1,4 +1,4 @@ -/* $Id: ogl.c,v 1.32 2004-05-23 00:21:03 btb Exp $ */ +/* $Id: ogl.c,v 1.33 2004-05-31 08:33:41 btb Exp $ */ /* * * Graphics support functions for OpenGL. @@ -282,7 +282,8 @@ int ogl_texture_stats(void){ } if (gr_renderstats) { - int idx, r, g, b, a, dbl, depth, res, colorsize, depthsize; + GLint idx, r, g, b, a, dbl, depth; + int res, colorsize, depthsize; res = SWIDTH * SHEIGHT; glGetIntegerv(GL_INDEX_BITS, &idx); diff --git a/include/pstypes.h b/include/pstypes.h index 60a07a51..7c15e0ab 100644 --- a/include/pstypes.h +++ b/include/pstypes.h @@ -1,4 +1,4 @@ -/* $Id: pstypes.h,v 1.26 2004-01-06 17:59:27 schaffner Exp $ */ +/* $Id: pstypes.h,v 1.27 2004-05-31 08:33:41 btb Exp $ */ /* THE COMPUTER CODE CONTAINED HEREIN IS THE SOLE PROPERTY OF PARALLAX SOFTWARE CORPORATION ("PARALLAX"). PARALLAX, IN DISTRIBUTING THE CODE TO @@ -37,12 +37,12 @@ typedef signed char sbyte; //define unsigned types; typedef unsigned char ubyte; -#ifndef __unix__ +#if defined(_WIN32) || defined(__sun__) typedef unsigned short ushort; typedef unsigned int uint; #endif -#if ! defined(__unix__) || defined(__sun__) // platforms missing u_int??_t +#if defined(_WIN32) || defined(__sun__) // platforms missing u_int??_t #include #ifndef __unix__ // platforms missing int??_t typedef Sint16 int16_t; @@ -52,7 +52,7 @@ typedef Sint64 int64_t; typedef Uint16 u_int16_t; typedef Uint32 u_int32_t; typedef Uint64 u_int64_t; -#endif // ! defined(__unix__) || defined(__sun__) +#endif // defined(_WIN32) || defined(__sun__) #ifdef _MSC_VER # include // this is where min and max are defined @@ -71,7 +71,7 @@ typedef Uint64 u_int64_t; # ifdef _WIN32_WCE # define _MAX_DIR 256 # endif -#elif defined(__unix__) +#elif defined(__unix__) || (defined(__APPLE__) && defined(__MACH__)) # include # define _MAX_PATH 1024 # define _MAX_DIR 256 diff --git a/include/strutil.h b/include/strutil.h index 596f82f0..4bf14129 100644 --- a/include/strutil.h +++ b/include/strutil.h @@ -1,4 +1,4 @@ -/* $Id: strutil.h,v 1.9 2003-11-26 12:26:28 btb Exp $ */ +/* $Id: strutil.h,v 1.10 2004-05-31 08:33:41 btb Exp $ */ /* THE COMPUTER CODE CONTAINED HEREIN IS THE SOLE PROPERTY OF PARALLAX SOFTWARE CORPORATION ("PARALLAX"). PARALLAX, IN DISTRIBUTING THE CODE TO @@ -15,7 +15,7 @@ COPYRIGHT 1993-1999 PARALLAX SOFTWARE CORPORATION. ALL RIGHTS RESERVED. #ifndef _STRUTILS_H #define _STRUTILS_H -#ifdef __unix__ +#ifndef _WIN32 #include #define stricmp(a,b) strcasecmp(a,b) #define strnicmp(a,b,c) strncasecmp(a,b,c) diff --git a/libmve/mveplay.c b/libmve/mveplay.c index b1b8376c..3ca26025 100644 --- a/libmve/mveplay.c +++ b/libmve/mveplay.c @@ -1,4 +1,4 @@ -/* $Id: mveplay.c,v 1.17 2003-11-26 12:26:28 btb Exp $ */ +/* $Id: mveplay.c,v 1.18 2004-05-31 08:33:41 btb Exp $ */ #ifdef HAVE_CONFIG_H #include #endif @@ -118,7 +118,7 @@ static int micro_frame_delay=0; static int timer_started=0; static struct timeval timer_expire = {0, 0}; -#if !HAVE_STRUCT_TIMESPEC +#if defined(HAVE_STRUCT_TIMESPEC) && !HAVE_STRUCT_TIMESPEC struct timespec { long int tv_sec; /* Seconds. */ -- 2.39.2