diff --git a/glm/gtx/compatibility.hpp b/glm/gtx/compatibility.hpp index 4d2972c8..94223860 100644 --- a/glm/gtx/compatibility.hpp +++ b/glm/gtx/compatibility.hpp @@ -52,6 +52,9 @@ #include #elif(GLM_COMPILER & GLM_COMPILER_GCC) #include +# if(GLM_PLATFORM & GLM_PLATFORM_ANDROID) +# undef isfinite +# endif #endif//GLM_COMPILER namespace glm diff --git a/glm/gtx/compatibility.inl b/glm/gtx/compatibility.inl index 5ad69af3..beb8615d 100644 --- a/glm/gtx/compatibility.inl +++ b/glm/gtx/compatibility.inl @@ -14,11 +14,18 @@ namespace glm GLM_FUNC_QUALIFIER bool isfinite( genType const & x) { - #if(GLM_COMPILER & GLM_COMPILER_VC) - return _finite(x); - #else//(GLM_COMPILER & GLM_COMPILER_GCC) - return std::isfinite(x) != 0; - #endif +# if(GLM_COMPILER & GLM_COMPILER_VC) + return _finite(x); +# elif(GLM_COMPILER & GLM_COMPILER_GCC) +# if(GLM_PLATFORM & GLM_PLATFORM_ANDROID) + return _isfinite(x) != 0; +# else + return std::isfinite(x) != 0; +# endif +# else + return std::isfinite(x) != 0; +# endif + } template @@ -56,11 +63,17 @@ namespace glm GLM_FUNC_QUALIFIER bool isinf( genType const & x) { - #if(GLM_COMPILER & GLM_COMPILER_VC) - return _fpclass(x) == _FPCLASS_NINF || _fpclass(x) == _FPCLASS_PINF; - #else - return std::isinf(x) != 0; - #endif +# if(GLM_COMPILER & GLM_COMPILER_VC) + return _fpclass(x) == _FPCLASS_NINF || _fpclass(x) == _FPCLASS_PINF; +# elif(GLM_COMPILER & GLM_COMPILER_GCC) +# if(GLM_PLATFORM & GLM_PLATFORM_ANDROID) + return _isinf(x) != 0; +# else + return std::isinf(x) != 0; +# endif +# else + return std::isinf(x) != 0; +# endif } template @@ -97,11 +110,17 @@ namespace glm template GLM_FUNC_QUALIFIER bool isnan(genType const & x) { - #if(GLM_COMPILER & GLM_COMPILER_VC) - return _isnan(x); - #else - return std::isnan(x) != 0; - #endif +# if(GLM_COMPILER & GLM_COMPILER_VC) + return _isnan(x); +# elif(GLM_COMPILER & GLM_COMPILER_GCC) +# if(GLM_PLATFORM & GLM_PLATFORM_ANDROID) + return _isnan(x) != 0; +# else + return std::isnan(x) != 0; +# endif +# else + return std::isnan(x) != 0; +# endif } template