Fix _fpclass build failure on MinGW.

On MinGW, use the Unix-style fpclassify() code rather than the Window
version.  The latter doesn't seem to compile.
This commit is contained in:
Jeroen Vermeulen 2015-05-20 15:12:43 +07:00
parent a66056cd39
commit 1c250dac92

View File

@ -112,7 +112,7 @@ void ReadBackoff(util::FilePiece &in, float &backoff) {
backoff = in.ReadFloat();
if (backoff == ngram::kExtensionBackoff) backoff = ngram::kNoExtensionBackoff;
{
#ifdef WIN32
#if defined(WIN32) && !defined(__MINGW32__)
int float_class = _fpclass(backoff);
UTIL_THROW_IF(float_class == _FPCLASS_SNAN || float_class == _FPCLASS_QNAN || float_class == _FPCLASS_NINF || float_class == _FPCLASS_PINF, FormatLoadException, "Bad backoff " << backoff);
#else