Merge pull request #1154 from teminian/develop

Improved support for MinGW-w64
This commit is contained in:
Aleksandar Fabijanic 2016-03-06 19:13:00 -08:00
commit fd070a39be

View File

@ -43,6 +43,12 @@
# define _SW_DENORMAL 0x00080000 // denormal status bit
#endif
#ifdef __MINGW32__
#define _RC_CHOP 0x00000300
#define _RC_UP 0x00000200
#define _RC_DOWN 0x00000100
#define _RC_NEAR 0x00000000
#endif
namespace Poco {
@ -94,49 +100,81 @@ private:
//
inline bool FPEnvironmentImpl::isInfiniteImpl(float value)
{
#ifdef __MINGW32__
return isfinite(value) == 0;
#else
return _finite(value) == 0;
#endif
}
inline bool FPEnvironmentImpl::isInfiniteImpl(double value)
{
return _finite(value) == 0;
#ifdef __MINGW32__
return isfinite(value) == 0;
#else
return _finite(value) == 0;
#endif
}
inline bool FPEnvironmentImpl::isInfiniteImpl(long double value)
{
return _finite(value) == 0;
#ifdef __MINGW32__
return isfinite(value) == 0;
#else
return _finite(value) == 0;
#endif
}
inline bool FPEnvironmentImpl::isNaNImpl(float value)
{
return _isnan(value) != 0;
#ifdef __MINGW32__
return isnan(value) != 0;
#else
return _isnan(value) != 0;
#endif
}
inline bool FPEnvironmentImpl::isNaNImpl(double value)
{
return _isnan(value) != 0;
#ifdef __MINGW32__
return isnan(value) != 0;
#else
return _isnan(value) != 0;
#endif
}
inline bool FPEnvironmentImpl::isNaNImpl(long double value)
{
return _isnan(value) != 0;
#ifdef __MINGW32__
return isnan(value) != 0;
#else
return _isnan(value) != 0;
#endif
}
inline float FPEnvironmentImpl::copySignImpl(float target, float source)
{
return float(_copysign(target, source));
#ifdef __MINGW32__
return float(copysign(target, source));
#else
return float(_copysign(target, source));
#endif
}
inline double FPEnvironmentImpl::copySignImpl(double target, double source)
{
return _copysign(target, source);
#ifdef __MINGW32__
return copysign(target, source);
#else
return _copysign(target, source);
#endif
}