Skip to content

Commit

Permalink
fix: Sync 1.11.-1.12-devel(1.13) #4187
Browse files Browse the repository at this point in the history
  • Loading branch information
aleks-f committed Oct 15, 2023
1 parent 5103d46 commit 5e1904b
Show file tree
Hide file tree
Showing 14 changed files with 45 additions and 31 deletions.
1 change: 0 additions & 1 deletion Crypto/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
4 changes: 2 additions & 2 deletions Data/PostgreSQL/include/Poco/Data/PostgreSQL/Extractor.h
Original file line number Diff line number Diff line change
Expand Up @@ -354,9 +354,9 @@ class PostgreSQL_API Extractor: public Poco::Data::AbstractExtractor
//
// 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();
}


Expand Down
4 changes: 2 additions & 2 deletions Encodings/Compiler/src/TextEncodingCompiler.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -117,8 +117,8 @@ class TextEncodingCompiler: public Application
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"
Expand Down
4 changes: 4 additions & 0 deletions Foundation/src/FileChannel.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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);
}

Expand Down Expand Up @@ -391,13 +392,16 @@ void FileChannel::setRotateOnOpen(const std::string& rotateOnOpen)

void FileChannel::purge()
{
if (_pPurgeStrategy)
{
try
{
_pPurgeStrategy->purge(_path);
}
catch (...)
{
}
}
}


Expand Down
2 changes: 1 addition & 1 deletion Foundation/src/NumberParser.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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);
}


Expand Down
2 changes: 1 addition & 1 deletion Foundation/testsuite/src/LocalDateTimeTest.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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
}
Expand Down
4 changes: 0 additions & 4 deletions MongoDB/include/Poco/MongoDB/PoolableConnectionFactory.h
Original file line number Diff line number Diff line change
Expand Up @@ -116,23 +116,19 @@ class PooledConnection
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;

// 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;
Expand Down
2 changes: 2 additions & 0 deletions Net/include/Poco/Net/SocketDefs.h
Original file line number Diff line number Diff line change
Expand Up @@ -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);
}

Expand Down
9 changes: 5 additions & 4 deletions Net/src/HTTPDigestCredentials.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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;

Expand Down Expand Up @@ -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);

Expand Down
1 change: 0 additions & 1 deletion Net/testsuite/src/DialogServer.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -109,7 +109,6 @@ const std::string& DialogServer::lastCommand() const
const std::vector<std::string>& DialogServer::lastCommands() const
{
FastMutex::ScopedLock lock(_mutex);

return _lastCommands;
}

Expand Down
28 changes: 14 additions & 14 deletions PDF/include/Poco/PDF/Page.h
Original file line number Diff line number Diff line change
Expand Up @@ -49,21 +49,21 @@ class PDF_API Page
enum Size
{
PAGE_SIZE_LETTER = HPDF_PAGE_SIZE_LETTER,
/// 8 x 11 (Inches), 612 x 792 px
/// 8½ x 11 (Inches), 612 x 792 px
PAGE_SIZE_LEGAL = HPDF_PAGE_SIZE_LEGAL,
/// 8 x 14 (Inches), 612 x 1008 px
/// 8½ x 14 (Inches), 612 x 1008 px
PAGE_SIZE_A3 = HPDF_PAGE_SIZE_A3,
/// 297 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 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 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 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 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 x 10 (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,
Expand Down Expand Up @@ -301,19 +301,19 @@ class PDF_API Page
/// Appends a path from the current point to the specified point..

void curveTo(const std::vector<float>& values);
/// Appends a B�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�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�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�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�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�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.
Expand Down
3 changes: 3 additions & 0 deletions Redis/include/Poco/Redis/Command.h
Original file line number Diff line number Diff line change
Expand Up @@ -132,6 +132,9 @@ class Redis_API Command: public Array
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.

Expand Down
10 changes: 10 additions & 0 deletions Redis/src/Command.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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");
Expand Down
2 changes: 1 addition & 1 deletion doc/99150-WindowsPlatformNotes.page
Original file line number Diff line number Diff line change
Expand Up @@ -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/
Expand Down

0 comments on commit 5e1904b

Please sign in to comment.