trunk/branch integration: compile fix

This commit is contained in:
Marian Krivos 2011-08-23 13:07:44 +00:00
parent 5950201733
commit 8fc17fecfa
6 changed files with 224 additions and 216 deletions

View File

@ -350,9 +350,9 @@ void FileChannel::setPurgeCount(const std::string& count)
std::string::const_iterator it = count.begin(); std::string::const_iterator it = count.begin();
std::string::const_iterator end = count.end(); std::string::const_iterator end = count.end();
while (it != end && std::isspace(*it)) ++it; while (it != end && Ascii::isSpace(*it)) ++it;
while (it != end && std::isdigit(*it)) { n *= 10; n += *it++ - '0'; } while (it != end && Ascii::isDigit(*it)) { n *= 10; n += *it++ - '0'; }
while (it != end && std::isspace(*it)) ++it; while (it != end && Ascii::isSpace(*it)) ++it;
if (0 == n) if (0 == n)
throw InvalidArgumentException("Zero is not valid purge count."); throw InvalidArgumentException("Zero is not valid purge count.");

View File

@ -43,8 +43,6 @@
#include "Poco/Timestamp.h" #include "Poco/Timestamp.h"
#include "Poco/Timezone.h" #include "Poco/Timezone.h"
#include "Poco/Environment.h" #include "Poco/Environment.h"
#include <cstdio>
#include <cctype>
namespace Poco { namespace Poco {

View File

@ -195,9 +195,14 @@ Notification::Ptr PriorityNotificationQueue::dequeueOne()
} }
PriorityNotificationQueue& PriorityNotificationQueue::defaultQueue() namespace
{ {
static SingletonHolder<PriorityNotificationQueue> sh; static SingletonHolder<PriorityNotificationQueue> sh;
}
PriorityNotificationQueue& PriorityNotificationQueue::defaultQueue()
{
return *sh.get(); return *sh.get();
} }

View File

@ -43,6 +43,8 @@
#else #else
#include "RWLock_WIN32.cpp" #include "RWLock_WIN32.cpp"
#endif #endif
#elif defined(POCO_ANDROID)
#include "RWLock_Android.cpp"
#elif defined(POCO_VXWORKS) #elif defined(POCO_VXWORKS)
#include "RWLock_VX.cpp" #include "RWLock_VX.cpp"
#else #else

View File

@ -61,7 +61,10 @@ void SharedLibraryImpl::loadImpl(const std::string& path)
FastMutex::ScopedLock lock(_mutex); FastMutex::ScopedLock lock(_mutex);
if (_handle) throw LibraryAlreadyLoadedException(_path); if (_handle) throw LibraryAlreadyLoadedException(_path);
_handle = LoadLibraryA(path.c_str()); DWORD flags(0);
Path p(path);
if (p.isAbsolute()) flags |= LOAD_WITH_ALTERED_SEARCH_PATH;
_handle = LoadLibraryExA(path.c_str(), 0, flags);
if (!_handle) throw LibraryLoadException(path); if (!_handle) throw LibraryLoadException(path);
_path = path; _path = path;
} }

View File

@ -57,7 +57,7 @@ int Timezone::dst()
{ {
std::time_t now = std::time(NULL); std::time_t now = std::time(NULL);
struct std::tm t; struct std::tm t;
if (!localtime_r(&now, &t)) if (localtime_r(&now, &t) != OK)
throw Poco::SystemException("cannot get local time DST offset"); throw Poco::SystemException("cannot get local time DST offset");
return t.tm_isdst == 1 ? 3600 : 0; return t.tm_isdst == 1 ? 3600 : 0;
} }