mirror of
https://github.com/pocoproject/poco.git
synced 2025-05-29 07:25:53 +02:00
trunk/branch integration: compile fix
This commit is contained in:
parent
5950201733
commit
8fc17fecfa
@ -350,9 +350,9 @@ void FileChannel::setPurgeCount(const std::string& count)
|
||||
std::string::const_iterator it = count.begin();
|
||||
std::string::const_iterator end = count.end();
|
||||
|
||||
while (it != end && std::isspace(*it)) ++it;
|
||||
while (it != end && std::isdigit(*it)) { n *= 10; n += *it++ - '0'; }
|
||||
while (it != end && std::isspace(*it)) ++it;
|
||||
while (it != end && Ascii::isSpace(*it)) ++it;
|
||||
while (it != end && Ascii::isDigit(*it)) { n *= 10; n += *it++ - '0'; }
|
||||
while (it != end && Ascii::isSpace(*it)) ++it;
|
||||
|
||||
if (0 == n)
|
||||
throw InvalidArgumentException("Zero is not valid purge count.");
|
||||
|
@ -43,8 +43,6 @@
|
||||
#include "Poco/Timestamp.h"
|
||||
#include "Poco/Timezone.h"
|
||||
#include "Poco/Environment.h"
|
||||
#include <cstdio>
|
||||
#include <cctype>
|
||||
|
||||
|
||||
namespace Poco {
|
||||
@ -74,7 +72,7 @@ PatternFormatter::~PatternFormatter()
|
||||
|
||||
void PatternFormatter::format(const Message& msg, std::string& text)
|
||||
{
|
||||
Timestamp timestamp = msg.getTime();
|
||||
Timestamp timestamp = msg.getTime();
|
||||
if (_localTime)
|
||||
{
|
||||
timestamp += Timezone::utcOffset()*Timestamp::resolution();
|
||||
|
@ -195,10 +195,15 @@ Notification::Ptr PriorityNotificationQueue::dequeueOne()
|
||||
}
|
||||
|
||||
|
||||
namespace
|
||||
{
|
||||
static SingletonHolder<PriorityNotificationQueue> sh;
|
||||
}
|
||||
|
||||
|
||||
PriorityNotificationQueue& PriorityNotificationQueue::defaultQueue()
|
||||
{
|
||||
static SingletonHolder<PriorityNotificationQueue> sh;
|
||||
return *sh.get();
|
||||
return *sh.get();
|
||||
}
|
||||
|
||||
|
||||
|
@ -43,6 +43,8 @@
|
||||
#else
|
||||
#include "RWLock_WIN32.cpp"
|
||||
#endif
|
||||
#elif defined(POCO_ANDROID)
|
||||
#include "RWLock_Android.cpp"
|
||||
#elif defined(POCO_VXWORKS)
|
||||
#include "RWLock_VX.cpp"
|
||||
#else
|
||||
|
@ -61,7 +61,10 @@ void SharedLibraryImpl::loadImpl(const std::string& path)
|
||||
FastMutex::ScopedLock lock(_mutex);
|
||||
|
||||
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);
|
||||
_path = path;
|
||||
}
|
||||
|
@ -55,11 +55,11 @@ int Timezone::utcOffset()
|
||||
|
||||
int Timezone::dst()
|
||||
{
|
||||
std::time_t now = std::time(NULL);
|
||||
struct std::tm t;
|
||||
if (!localtime_r(&now, &t))
|
||||
throw Poco::SystemException("cannot get local time DST offset");
|
||||
return t.tm_isdst == 1 ? 3600 : 0;
|
||||
std::time_t now = std::time(NULL);
|
||||
struct std::tm t;
|
||||
if (localtime_r(&now, &t) != OK)
|
||||
throw Poco::SystemException("cannot get local time DST offset");
|
||||
return t.tm_isdst == 1 ? 3600 : 0;
|
||||
}
|
||||
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user