Use isnan(f) as an alternative to isinf() on __APPLE__

This commit is contained in:
Luis Díaz Más 2018-09-11 19:36:14 +02:00
parent 7d32da890b
commit 980f2e9462

View File

@ -661,6 +661,8 @@ namespace Exiv2 {
{
#if defined(_MSC_VER) && _MSC_VER < 1800
#define isinf(x) (!_finite(x))
#elif __APPLE__
#define isinf(x) (isinf(x) || isnan(x))
#endif
if (isinf(f)) {
return Rational(f > 0 ? 1 : -1, 0);