diff options
author | Jeroen Vermeulen <jtv@precisiontranslationtools.com> | 2015-05-20 11:12:43 +0300 |
---|---|---|
committer | Jeroen Vermeulen <jtv@precisiontranslationtools.com> | 2015-05-20 11:12:43 +0300 |
commit | 1c250dac924c5477fcbb89657e31def0ae7910b0 (patch) | |
tree | da9bd85fc3a05a283b44dc5a2f2a1c470702ef7a /lm | |
parent | a66056cd394d2732c546b8b8af064dd1a4f4d7d7 (diff) |
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.
Diffstat (limited to 'lm')
-rw-r--r-- | lm/read_arpa.cc | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/lm/read_arpa.cc b/lm/read_arpa.cc index 9d46bdb34..dc05a6539 100644 --- a/lm/read_arpa.cc +++ b/lm/read_arpa.cc @@ -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 |