Browse Source

Fixed ICC on Linux build errors #449

Christophe Riccio 10 years ago
parent
commit
2f2782d72a
2 changed files with 14 additions and 7 deletions
  1. 11 5
      glm/detail/func_common.inl
  2. 3 2
      readme.md

+ 11 - 5
glm/detail/func_common.inl

@@ -548,14 +548,16 @@ namespace detail
 
 #			if GLM_HAS_CXX11_STL
 				return std::isnan(x);
-#			elif GLM_COMPILER & (GLM_COMPILER_VC | GLM_COMPILER_INTEL)
+#			elif GLM_COMPILER & GLM_COMPILER_VC
 				return _isnan(x) != 0;
-#			elif GLM_COMPILER & (GLM_COMPILER_GCC | (GLM_COMPILER_APPLE_CLANG | GLM_COMPILER_LLVM))
-#				if GLM_PLATFORM & GLM_PLATFORM_ANDROID && __cplusplus < 201103L
+#			elif GLM_COMPILER & GLM_COMPILER_INTEL
+#				if GLM_PLATFORM & GLM_PLATFORM_WINDOWS
 					return _isnan(x) != 0;
 #				else
-					return std::isnan(x);
+					return ::isnan(x) != 0;
 #				endif
+#			elif (GLM_COMPILER & (GLM_COMPILER_GCC | (GLM_COMPILER_APPLE_CLANG | GLM_COMPILER_LLVM))) && (GLM_PLATFORM & GLM_PLATFORM_ANDROID) && __cplusplus < 201103L
+				return _isnan(x) != 0;
 #			elif GLM_COMPILER & GLM_COMPILER_CUDA
 				return isnan(x) != 0;
 #			else
@@ -583,7 +585,11 @@ namespace detail
 #			if GLM_HAS_CXX11_STL
 				return std::isinf(x);
 #			elif GLM_COMPILER & (GLM_COMPILER_INTEL | GLM_COMPILER_VC)
-				return _fpclass(x) == _FPCLASS_NINF || _fpclass(x) == _FPCLASS_PINF;
+#				if(GLM_PLATFORM & GLM_PLATFORM_WINDOWS)
+					return _fpclass(x) == _FPCLASS_NINF || _fpclass(x) == _FPCLASS_PINF;
+#				else
+					return ::isinf(x);
+#				endif
 #			elif GLM_COMPILER & (GLM_COMPILER_GCC | (GLM_COMPILER_APPLE_CLANG | GLM_COMPILER_LLVM))
 #				if(GLM_PLATFORM & GLM_PLATFORM_ANDROID && __cplusplus < 201103L)
 					return _isinf(x) != 0;

+ 3 - 2
readme.md

@@ -51,7 +51,7 @@ glm::mat4 camera(float Translate, glm::vec2 const & Rotate)
 
 ## Release notes
 
-#### [GLM 0.9.8.0](https://github.com/g-truc/glm/releases/latest) - 201X-XX-XX
+#### [GLM 0.9.8.0](https://github.com/g-truc/glm/releases/latest) - 2016-XX-XX
 ##### Features:
 - Added compNormalize and compScale functions to GTX_component_wise
 - Added packF3x9_E1x5 and unpackF3x9_E1x5 to GTC_packing for RGB9E5 #416
@@ -70,8 +70,9 @@ glm::mat4 camera(float Translate, glm::vec2 const & Rotate)
 - Fixed GTX_extended_min_max filename typo #386
 - Fixed intersectRayTriangle to not do any unintentional backface culling
 - Fixed ldexp and frexp compilation errors
+- Fixed ICC on Linux build errors #449
 
-#### [GLM 0.9.7.2](https://github.com/g-truc/glm/tree/0.9.7) - 2015-XX-XX
+#### [GLM 0.9.7.2](https://github.com/g-truc/glm/tree/0.9.7) - 2016-XX-XX
 ##### Fixes:
 - Fixed GTC_round floorMultiple/ceilMultiple #412
 - Fixed GTC_packing unpackUnorm3x10_1x2 #414