X-Git-Url: https://git.jsancho.org/?a=blobdiff_plain;f=Source%2FMacCompatibility.h;h=d49a42b50a309154ed2fd95a041ee7debbb76ad3;hb=3c8f67c3c66a86fc9e45469ce2fed4222d486c9f;hp=3717ebaea1b57d71f36bef14a2625474fc2828dc;hpb=36cc3af3e5074215817ddee16defde754e2ad67f;p=lugaru.git diff --git a/Source/MacCompatibility.h b/Source/MacCompatibility.h index 3717eba..d49a42b 100644 --- a/Source/MacCompatibility.h +++ b/Source/MacCompatibility.h @@ -21,11 +21,12 @@ #pragma warning(disable:4101) #endif -#ifdef __GNUC__ -#define __forceinline inline __attribute__((always_inline)) +#ifndef __forceinline +# ifdef __GNUC__ +# define __forceinline inline __attribute__((always_inline)) +# endif #endif - typedef bool Boolean; @@ -76,15 +77,15 @@ inline bool isnormal( double x) int ret = _fpclass( x); return (ret == _FPCLASS_NN || ret == _FPCLASS_PN); } +#else +#include #endif -typedef unsigned int uintptr_t; - // fix file names to use '/' instead of ':' -char* ConvertFileName( const char* orgfilename); +char* ConvertFileName( const char* orgfilename, const char *mode = "rb" ); -#define fopen( a, b) fopen( ConvertFileName( a), b); +#define fopen( a, b) fopen(ConvertFileName(a, b), b) /* inline float abs( float f) {