- fix of the Timer fix from rev. 1953

- improved UTFString definitions
- allow empty Glob (testMatchEmptyPattern() failing)
- fixed SF#3535990: POCO_HAVE_IPv6 without POCO_WIN32_UTF8 conflict
This commit is contained in:
Aleksandar Fabijanic 2012-08-18 21:09:50 +00:00
parent e4baf46d7b
commit 88134859e4
6 changed files with 24 additions and 19 deletions

View File

@ -18,9 +18,9 @@ Release 1.5.0 (2012-08-??)
- fixed SF#3538780: SocketAddress needs operator < function
- fixed SF#3538775: Issues building on Fedora/Centos, etc. for AMD64
- fixed SF#3538786: Use size_t for describing data-blocks in DigestEngine
- IPAddress bitwise operators (&,|,^,~)
- IPAddress BinaryReader/Writer << and >> operators
- IPAddress force IPv6 always lowercase (RFC 5952)
- added IPAddress bitwise operators (&,|,^,~)
- added IPAddress BinaryReader/Writer << and >> operators
- modified IPAddress to force IPv6 to lowercase (RFC 5952)
- fixed SF#3538785: SMTPClientSession::sendMessage() should take recipient list
- added IPAddress::prefixLength()
- UTF portability improvements
@ -28,6 +28,7 @@ Release 1.5.0 (2012-08-??)
- added IPAddress RFC 4291 compatible site-local prefix support
- fixed SF# 3012166: IPv6 patch
- added SF# 3558085: Add formatter to MACAddress object
- fixed SF# 3535990: POCO_HAVE_IPv6 without POCO_WIN32_UTF8 conflict
Release 1.4.4 (2012-08-??)
==========================

View File

@ -48,13 +48,19 @@ namespace Poco {
// UTF string types
#ifndef POCO_NO_WSTRING
//#if defined(POCO_ENABLE_CPP11) //TODO
//#if defined(POCO_ENABLE_CPP11) //TODO
// typedef char16_t UTF16Char;
// typedef std::u16string UTF16String;
// typedef char32_t UTF32Char;
// typedef std::u32string UTF32String;
//#else
//#else
#ifdef POCO_NO_WSTRING
typedef Poco::UInt16 UTF16Char;
typedef std::basic_string<UInt16> UTF16String;
typedef UInt32 UTF32Char;
typedef std::basic_string<UInt32> UTF32String;
#else // POCO_NO_WSTRING
#if defined(POCO_OS_FAMILY_WINDOWS)
typedef wchar_t UTF16Char;
typedef std::wstring UTF16String;
@ -78,9 +84,8 @@ namespace Poco {
typedef wchar_t UTF32Char;
typedef std::wstring UTF32String;
#endif //POCO_OS_FAMILY_WINDOWS
//#endif // POCO_ENABLE_CPP11
#endif //POCO_NO_WSTRING
#endif //POCO_NO_WSTRING
//#endif // POCO_ENABLE_CPP11
} // namespace Poco

View File

@ -49,7 +49,6 @@ namespace Poco {
Glob::Glob(const std::string& pattern, int options)
: _pattern(pattern), _options(options)
{
poco_assert(!_pattern.empty());
}

View File

@ -178,7 +178,7 @@ void Timer::run()
sleep = 0;
break;
}
_nextInvocation += static_cast<Timestamp::TimeVal>(_startInterval)*1000;
_nextInvocation += static_cast<Timestamp::TimeVal>(interval)*1000;
++_skipped;
}
}
@ -210,7 +210,7 @@ void Timer::run()
}
interval = _periodicInterval;
}
_nextInvocation += static_cast<Timestamp::TimeVal>(_startInterval)*1000;
_nextInvocation += static_cast<Timestamp::TimeVal>(interval)*1000;
_skipped = 0;
}
while (interval > 0);

View File

@ -65,7 +65,7 @@ void TimerTest::testTimer()
t.start(tc);
_event.wait();
sw.stop();
assert (sw.elapsed() >= 80000 && sw.elapsed() < 250000);
assert (sw.elapsed() >= 80000 && sw.elapsed() < 120000);
sw.restart();
_event.wait();
sw.stop();

View File

@ -41,11 +41,11 @@
#include "Poco/RefCountedObject.h"
#include "Poco/Format.h"
#if defined(POCO_OS_FAMILY_WINDOWS)
#if defined(POCO_WIN32_UTF8)
#include "Poco/UnicodeConverter.h"
#endif
#include <iphlpapi.h>
#include <ipifcons.h>
#if defined(POCO_WIN32_UTF8)
#include "Poco/UnicodeConverter.h"
#endif
#include <iphlpapi.h>
#include <ipifcons.h>
#endif
#include <cstring>
#include <iostream>
@ -997,7 +997,7 @@ NetworkInterface::Map NetworkInterface::map(bool ipOnly, bool upOnly)
Poco::UnicodeConverter::toUTF8(pAddress->FriendlyName, displayName);
#else
char displayNameBuffer[1024];
int rc = WideCharToMultiByte(CP_ACP, WC_DEFAULTCHAR, pAddress->FriendlyName, -1, displayNameBuffer, sizeof(displayNameBuffer), NULL, NULL);
int rc = WideCharToMultiByte(CP_ACP, 0, pAddress->FriendlyName, -1, displayNameBuffer, sizeof(displayNameBuffer), NULL, NULL);
if (rc) displayName = displayNameBuffer;
#endif