diff --git a/CHANGELOG b/CHANGELOG index 3d5fe50a1..7999d04ac 100644 --- a/CHANGELOG +++ b/CHANGELOG @@ -75,6 +75,8 @@ Release 1.5.2 (2013-06-xx) - fixed GH #198: The "application.configDir" property is not always created. - fixed GH #185: Poco::NumberFormatter::format(double value, int precision) ignore precision == 0 +- fixed GH #138: FreeBSD JSON tests fail + Release 1.5.1 (2013-01-11) ========================== diff --git a/Foundation/include/Poco/Platform_POSIX.h b/Foundation/include/Poco/Platform_POSIX.h index 555cdd784..35a9b22ca 100644 --- a/Foundation/include/Poco/Platform_POSIX.h +++ b/Foundation/include/Poco/Platform_POSIX.h @@ -81,7 +81,7 @@ // http://dbp-consulting.com/tutorials/SuppressingGCCWarnings.html // use example: GCC_DIAG_OFF(unused-variable) // -#if defined(POCO_COMPILER_GCC) && (((__GNUC__ * 100) + __GNUC_MINOR__) >= 402) +#if defined(POCO_COMPILER_GCC) && (((__GNUC__ * 100) + __GNUC_MINOR__) >= 460) #ifdef GCC_DIAG_OFF #undef GCC_DIAG_OFF diff --git a/Foundation/testsuite/src/UnicodeConverterTest.cpp b/Foundation/testsuite/src/UnicodeConverterTest.cpp index f3fec0822..5e58bf4ee 100644 --- a/Foundation/testsuite/src/UnicodeConverterTest.cpp +++ b/Foundation/testsuite/src/UnicodeConverterTest.cpp @@ -91,4 +91,5 @@ CppUnit::Test* UnicodeConverterTest::suite() } -#endif \ No newline at end of file +#endif + diff --git a/JSON/include/Poco/JSON/Parser.h b/JSON/include/Poco/JSON/Parser.h index dcdb80c1b..17948c404 100644 --- a/JSON/include/Poco/JSON/Parser.h +++ b/JSON/include/Poco/JSON/Parser.h @@ -335,14 +335,14 @@ private: unsigned char ch = static_cast(CharTraits::to_char_type(nextChar)); // Determine the character's class. - if (ch < 0 || (!_allowNullByte && ch == 0)) return false; - if (0x80 <= ch && ch <= 0xFF) + if ((!_allowNullByte && ch == 0)) return false; + if (ch >= 0x80) { nextClass = C_ETC; CharIntType count = utf8CheckFirst(nextChar); if (!count) { - throw Poco::JSON::JSONException(format("Unable to decode byte 0x%x", (unsigned int) nextChar)); + throw Poco::JSON::JSONException("Bad character."); } char buffer[4];