mirror of
https://github.com/moses-smt/mosesdecoder.git
synced 2024-09-11 11:25:40 +03:00
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:
parent
a66056cd39
commit
1c250dac92
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user