fix: Sync 1.11.-1.12-devel(1.13) #4187

This commit is contained in:
Aleksandar Fabijanic 2023-10-16 00:16:06 +02:00
parent 5103d46e9e
commit 5e1904b5f8
14 changed files with 45 additions and 31 deletions

View File

@ -6,7 +6,6 @@
include $(POCO_BASE)/build/rules/global
# see https://github.com/pocoproject/poco/issues/3073
GLOBAL_SYSLIBS := $(SYSLIBS)
ifeq ($(findstring AIX, $(POCO_CONFIG)), AIX)
SYSLIBS = -lssl_a -lcrypto_a

View File

@ -354,9 +354,9 @@ private:
//
// inlines
//
inline bool Extractor::isColumnNull(const OutputParameter& anOutputParameter) const
inline bool Extractor::isColumnNull(const OutputParameter& outputParameter) const
{
return anOutputParameter.isNull() || 0 == anOutputParameter.pData();
return outputParameter.isNull() || 0 == outputParameter.pData();
}

View File

@ -117,8 +117,8 @@ protected:
helpFormatter.setHeader(
"\n"
"The POCO C++ Text Encodings Compiler.\n"
"Copyright (c) 2018-2022 by Applied Informatics Software Engineering GmbH.\n"
"All rights reserved.\n\n"
"Copyright (c) 2018-2023 by Applied Informatics Software Engineering GmbH.\n"
"and Contributors.\n\n"
"This program compiles Unicode character encoding tables "
"from http://www.unicode.org/Public/MAPPINGS/ to TextEncoding "
"classes for the Poco Encodings library. \n\n"

View File

@ -351,6 +351,7 @@ void FileChannel::setArchive(const std::string& archive)
void FileChannel::setCompress(const std::string& compress)
{
_compress = icompare(compress, "true") == 0;
if (_pArchiveStrategy)
_pArchiveStrategy->compress(_compress);
}
@ -391,6 +392,8 @@ void FileChannel::setRotateOnOpen(const std::string& rotateOnOpen)
void FileChannel::purge()
{
if (_pPurgeStrategy)
{
try
{
_pPurgeStrategy->purge(_path);
@ -398,6 +401,7 @@ void FileChannel::purge()
catch (...)
{
}
}
}

View File

@ -188,7 +188,7 @@ double NumberParser::parseFloat(const std::string& s, char decSep, char thSep)
bool NumberParser::tryParseFloat(const std::string& s, double& value, char decSep, char thSep)
{
return strToDouble(s, value, decSep, thSep);
return strToDouble(s.c_str(), value, decSep, thSep);
}

View File

@ -479,7 +479,7 @@ void LocalDateTimeTest::testTimezone2()
then = *std::localtime(&t);
#if POCO_OS == POCO_OS_SOLARIS
assertTrue((mktime(&then)-t) * 1000 == ldt.tzd());
#else
#else
assertTrue (then.tm_gmtoff == ldt.tzd());
#endif
}

View File

@ -116,7 +116,6 @@ public:
return _connection;
}
#if defined(POCO_ENABLE_CPP11)
// Disable copy to prevent unwanted release of resources: C++11 way
PooledConnection(const PooledConnection&) = delete;
PooledConnection& operator=(const PooledConnection&) = delete;
@ -124,15 +123,12 @@ public:
// Enable move semantics
PooledConnection(PooledConnection&& other) = default;
PooledConnection& operator=(PooledConnection&&) = default;
#endif
private:
#if ! defined(POCO_ENABLE_CPP11)
// Disable copy to prevent unwanted release of resources: pre C++11 way
PooledConnection(const PooledConnection&);
PooledConnection& operator=(const PooledConnection&);
#endif
Poco::ObjectPool<Connection, Connection::Ptr>& _pool;
Connection::Ptr _connection;

View File

@ -370,11 +370,13 @@ inline int SocketBufVecSize(const SocketBufVec& sbv)
{
std::size_t sz = 0;
for (const auto& v : sbv)
{
#if defined(POCO_OS_FAMILY_WINDOWS)
sz += v.len;
#elif defined(POCO_OS_FAMILY_UNIX)
sz += v.iov_len;
#endif
}
return static_cast<int>(sz);
}

View File

@ -304,8 +304,8 @@ void HTTPDigestCredentials::updateAuthParams(const HTTPRequest& request)
if (qop.empty())
{
/// Assume that https://tools.ietf.org/html/rfc7616 does not supported
/// and still using https://tools.ietf.org/html/rfc2069#section-2.4
/// Assume that https://tools.ietf.org/html/rfc7616 is not supported
/// and still using https://tools.ietf.org/html/rfc2069#section-2.4
MD5Engine engine;
@ -407,8 +407,9 @@ int HTTPDigestCredentials::updateNonceCounter(const std::string& nonce)
bool HTTPDigestCredentials::isAlgorithmSupported(const std::string& algorithm) const
{
bool isAlgorithmSupported = std::find_if(std::begin(SUPPORTED_ALGORITHMS),
std::end(SUPPORTED_ALGORITHMS),
[&algorithm](const std::string& supportedAlgorithm) {
std::end(SUPPORTED_ALGORITHMS),
[&algorithm](const std::string& supportedAlgorithm)
{
return icompare(algorithm, supportedAlgorithm) == 0;
}) != std::end(SUPPORTED_ALGORITHMS);

View File

@ -109,7 +109,6 @@ const std::string& DialogServer::lastCommand() const
const std::vector<std::string>& DialogServer::lastCommands() const
{
FastMutex::ScopedLock lock(_mutex);
return _lastCommands;
}

View File

@ -49,21 +49,21 @@ public:
enum Size
{
PAGE_SIZE_LETTER = HPDF_PAGE_SIZE_LETTER,
/// 8<EFBFBD> x 11 (Inches), 612 x 792 px
/// 8½ x 11 (Inches), 612 x 792 px
PAGE_SIZE_LEGAL = HPDF_PAGE_SIZE_LEGAL,
/// 8<EFBFBD> x 14 (Inches), 612 x 1008 px
/// 8½ x 14 (Inches), 612 x 1008 px
PAGE_SIZE_A3 = HPDF_PAGE_SIZE_A3,
/// 297 <EFBFBD> 420 (mm), 841.89 x 1199.551 px
/// 297 × 420 (mm), 841.89 x 1199.551 px
PAGE_SIZE_A4 = HPDF_PAGE_SIZE_A4,
/// 210 <EFBFBD> 297 (mm), 595.276 x 841.89 px
/// 210 × 297 (mm), 595.276 x 841.89 px
PAGE_SIZE_A5 = HPDF_PAGE_SIZE_A5,
/// 148 <EFBFBD> 210 (mm), 419.528 x 595.276 px
/// 148 × 210 (mm), 419.528 x 595.276 px
PAGE_SIZE_B4 = HPDF_PAGE_SIZE_B4,
/// 250 <EFBFBD> 353 (mm), 708.661 x 1000.63 px
/// 250 × 353 (mm), 708.661 x 1000.63 px
PAGE_SIZE_B5 = HPDF_PAGE_SIZE_B5,
/// 176 <EFBFBD> 250 (mm), 498.898 x 708.661 px
/// 176 × 250 (mm), 498.898 x 708.661 px
PAGE_SIZE_EXECUTIVE = HPDF_PAGE_SIZE_EXECUTIVE,
/// 7<EFBFBD> x 10<31> (Inches), 522 x 756 px
/// 7½ x 10½ (Inches), 522 x 756 px
PAGE_SIZE_US4x6 = HPDF_PAGE_SIZE_US4x6,
/// 4 x 6 (Inches), 288 x 432 px
PAGE_SIZE_US4x8 = HPDF_PAGE_SIZE_US4x8,
@ -301,19 +301,19 @@ public:
/// Appends a path from the current point to the specified point..
void curveTo(const std::vector<float>& values);
/// Appends a B<EFBFBD>zier curve to the current path using two specified points.
/// Appends a Bézier curve to the current path using two specified points.
/// The point (x1, y1) and the point (x2, y2) are used as the control points
/// for a B<EFBFBD>zier curve and current point is moved to the point (x3, y3)
/// for a Bézier curve and current point is moved to the point (x3, y3)
void curveToRight(float x2, float y2, float x3, float y3);
/// Appends a B<EFBFBD>zier curve to the right of the current point using two specified points.
/// Appends a Bézier curve to the right of the current point using two specified points.
/// The current point and the point (x2, y2) are used as the control points
/// for a B<EFBFBD>zier curve and current point is moved to the point (x3, y3)
/// for a Bézier curve and current point is moved to the point (x3, y3)
void curveToLeft(float x2, float y2, float x3, float y3);
/// Appends a B<EFBFBD>zier curve to the left of the current point using two specified points.
/// Appends a Bézier curve to the left of the current point using two specified points.
/// The current point and the point (x2, y2) are used as the control points
/// for a B<EFBFBD>zier curve and current point is moved to the point (x3, y3)
/// for a Bézier curve and current point is moved to the point (x3, y3)
void closePath();
/// Appends a straight line from the current point to the start point of sub path.

View File

@ -132,6 +132,9 @@ public:
static Command incr(const std::string& key, Int64 by = 0);
/// Creates and returns an INCR or INCRBY command. Calls INCR when by is omitted or zero.
static Command keys(const std::string& pattern);
/// Creates and returns a KEYS command.
static Command lindex(const std::string& list, Int64 index = 0);
/// Creates and returns a LINDEX command.

View File

@ -269,6 +269,16 @@ Command Command::hvals(const std::string& hash)
}
Command Command::keys(const std::string& pattern)
{
Command cmd("KEYS");
cmd << pattern;
return cmd;
}
Command Command::incr(const std::string& key, Int64 by)
{
Command cmd(by == 0 ? "INCR" : "INCRBY");

View File

@ -53,7 +53,7 @@ and PocoLIB64d.dll for debug, respectively.
In order to work around that, `/Zc:__cplusplus` compiler flag is necesary.
See following issues for details and explanations:
See the following issues for details and explanations:
* https://github.com/pocoproject/poco/issues/3665
* https://devblogs.microsoft.com/cppblog/msvc-now-correctly-reports-__cplusplus/