diff --git a/.gitignore b/.gitignore index 44ceff1e2..bfe4dfef7 100644 --- a/.gitignore +++ b/.gitignore @@ -13,6 +13,8 @@ *.la *.a *.d +*.vsp +*.psess # Make # ######## diff --git a/Foundation/include/Poco/Bugcheck.h b/Foundation/include/Poco/Bugcheck.h index 3683ac98d..904200fc2 100644 --- a/Foundation/include/Poco/Bugcheck.h +++ b/Foundation/include/Poco/Bugcheck.h @@ -43,7 +43,7 @@ public: static void assertion(const char* cond, const char* file, int line, const char* text = 0); /// An assertion failed. Break into the debugger, if /// possible, then throw an AssertionViolationException. - + static void nullPointer(const char* ptr, const char* file, int line); /// An null pointer was encountered. Break into the debugger, if /// possible, then throw an NullPointerException. @@ -111,8 +111,8 @@ protected: #define poco_bugcheck_msg(msg) \ Poco::Bugcheck::bugcheck(msg, __FILE__, __LINE__) - - + + #define poco_unexpected() \ Poco::Bugcheck::unexpected(__FILE__, __LINE__); @@ -143,22 +143,25 @@ protected: // // poco_static_assert -// +// // The following was ported from // +GCC_DIAG_OFF(unused-local-typedefs) // supress numerous gcc warnings + + template struct POCO_STATIC_ASSERTION_FAILURE; -template <> -struct POCO_STATIC_ASSERTION_FAILURE +template <> +struct POCO_STATIC_ASSERTION_FAILURE { - enum - { - value = 1 - }; + enum + { + value = 1 + }; }; diff --git a/Foundation/src/LogStream.cpp b/Foundation/src/LogStream.cpp index 4ff724fce..6cc307a0b 100644 --- a/Foundation/src/LogStream.cpp +++ b/Foundation/src/LogStream.cpp @@ -47,9 +47,12 @@ int LogStreamBuf::writeToDevice(char c) { if (c == '\n' || c == '\r') { - Message msg(_logger.name(), _message, _priority); - _message.clear(); - _logger.log(msg); + if (_message.find_first_not_of("\r\n") != std::string::npos) + { + Message msg(_logger.name(), _message, _priority); + _message.clear(); + _logger.log(msg); + } } else _message += c; return c; diff --git a/Foundation/src/Path_WIN32.cpp b/Foundation/src/Path_WIN32.cpp index 76165821c..ba0465b57 100644 --- a/Foundation/src/Path_WIN32.cpp +++ b/Foundation/src/Path_WIN32.cpp @@ -55,14 +55,16 @@ std::string PathImpl::systemImpl() std::string PathImpl::homeImpl() { std::string result; - - // windows service has no home dir, return system directory instead - try + if (EnvironmentImpl::hasImpl("USERPROFILE")) + { + result = EnvironmentImpl::getImpl("USERPROFILE"); + } + else if (EnvironmentImpl::hasImpl("HOMEDRIVE") && EnvironmentImpl::hasImpl("HOMEPATH")) { result = EnvironmentImpl::getImpl("HOMEDRIVE"); result.append(EnvironmentImpl::getImpl("HOMEPATH")); } - catch (NotFoundException&) + else { result = systemImpl(); } diff --git a/Foundation/src/Path_WIN32U.cpp b/Foundation/src/Path_WIN32U.cpp index 10d2b7fc4..0c37063ff 100644 --- a/Foundation/src/Path_WIN32U.cpp +++ b/Foundation/src/Path_WIN32U.cpp @@ -65,14 +65,16 @@ std::string PathImpl::systemImpl() std::string PathImpl::homeImpl() { std::string result; - - // windows service has no home dir, return system directory instead - try + if (EnvironmentImpl::hasImpl("USERPROFILE")) + { + result = EnvironmentImpl::getImpl("USERPROFILE"); + } + else if (EnvironmentImpl::hasImpl("HOMEDRIVE") && EnvironmentImpl::hasImpl("HOMEPATH")) { result = EnvironmentImpl::getImpl("HOMEDRIVE"); result.append(EnvironmentImpl::getImpl("HOMEPATH")); } - catch (NotFoundException&) + else { result = systemImpl(); } diff --git a/Net/include/Poco/Net/HTTPRequest.h b/Net/include/Poco/Net/HTTPRequest.h index 79cd722b0..497ff26c6 100644 --- a/Net/include/Poco/Net/HTTPRequest.h +++ b/Net/include/Poco/Net/HTTPRequest.h @@ -159,7 +159,7 @@ private: enum Limits { MAX_METHOD_LENGTH = 32, - MAX_URI_LENGTH = 4096, + MAX_URI_LENGTH = 16384, MAX_VERSION_LENGTH = 8 };