mirror of
https://github.com/pocoproject/poco.git
synced 2025-01-24 19:02:55 +01:00
Merge remote-tracking branch 'upstream/develop' into develop
This commit is contained in:
commit
56786d9e27
@ -4,7 +4,7 @@ compiler:
|
||||
- clang
|
||||
before_install:
|
||||
- sudo apt-get update -qq
|
||||
- sudo DEBIAN_FRONTEND=noninteractive apt-get -qq -y -o Dpkg::Options::="--force-confdef" -o Dpkg::Options::="--force-confold" upgrade
|
||||
# - sudo DEBIAN_FRONTEND=noninteractive apt-get -qq -y -o Dpkg::Options::="--force-confdef" -o Dpkg::Options::="--force-confold" upgrade
|
||||
- sudo apt-get install -qq -y unixodbc-dev libmysqlclient-dev
|
||||
script: ./configure && make -s -j2
|
||||
|
||||
|
22
CHANGELOG
22
CHANGELOG
@ -1,6 +1,6 @@
|
||||
This is the changelog file for the POCO C++ Libraries.
|
||||
|
||||
Release 1.5.3 (2014-02-xx)
|
||||
Release 1.5.3 (2014-05-xx)
|
||||
==========================
|
||||
|
||||
- fixed GH# 316: Poco::DateTimeFormatter::append() gives wrong result for
|
||||
@ -16,6 +16,26 @@ Release 1.5.3 (2014-02-xx)
|
||||
have been changed to use Poco::Clock instead of Poco::Timestamp and are now
|
||||
unaffected by system realtime clock changes.
|
||||
- fixed GH# 350: Memory leak in Data/ODBC with BLOB
|
||||
- Correctly set MySQL time_type for Poco::Data::Date.
|
||||
- fixed GH #352: Removed redundant #includes and fixed spelling mistakes.
|
||||
- fixed setting of MYSQL_BIND is_unsigned value.
|
||||
- fixed GH #360: CMakeLists foundation: add Clock.cpp in the list of source files
|
||||
- Add extern "C" around <net/if.h> on HPUX platform.
|
||||
- added runtests.sh
|
||||
- fixed CPPUNIT_IGNORE parsing
|
||||
- fixed Glob from start path, for platforms not alowing transverse from root (Android)
|
||||
- added NTPClient (Rangel Reale)
|
||||
- added PowerShell build script
|
||||
- added SmartOS build support
|
||||
- fix warnings in headers
|
||||
- XMLWriter: removed unnecessary apostrophe escaping (&apos)
|
||||
- MongoDB: use Int32 for messageLength
|
||||
- fixed GH #380: SecureSocket+DialogSocket crashes with SIGSEGV when timeout occours
|
||||
- Improve RSADigestEngine, using Poco::Crypto::DigestEngine to calculate hash before signing
|
||||
- added Poco::PBKDF2Engine
|
||||
- added support for a 'Priority' attribute on cookies.
|
||||
- GH #386: fixed bug in MailMessage without content-transfer-encoding header
|
||||
- GH #384: ew hash algorithms support for RSADigestEngine
|
||||
|
||||
|
||||
Release 1.5.2 (2013-09-16)
|
||||
|
@ -36,6 +36,11 @@ Matej Knopp
|
||||
Patrice Tarabbia
|
||||
Lucas Clemente
|
||||
Karl Reid
|
||||
Pascal Bach
|
||||
Cristian Thiago Moecke
|
||||
Sergei Nikulov
|
||||
Aaron Kaluszka
|
||||
Iyed Bennour
|
||||
|
||||
--
|
||||
$Id$
|
||||
|
@ -78,6 +78,22 @@ void DigestEngineTest::testMD5()
|
||||
assert (DigestEngine::digestToHex(engine.digest()) == "57edf4a22be3c955ac49da2e2107b67a");
|
||||
}
|
||||
|
||||
void DigestEngineTest::testSHA1()
|
||||
{
|
||||
DigestEngine engine("SHA1");
|
||||
|
||||
// test vectors from FIPS 180-1
|
||||
|
||||
engine.update("abc");
|
||||
assert (DigestEngine::digestToHex(engine.digest()) == "a9993e364706816aba3e25717850c26c9cd0d89d");
|
||||
|
||||
engine.update("abcdbcdecdefdefgefghfghighijhijkijkljklmklmnlmnomnopnopq");
|
||||
assert (DigestEngine::digestToHex(engine.digest()) == "84983e441c3bd26ebaae4aa1f95129e5e54670f1");
|
||||
|
||||
for (int i = 0; i < 1000000; ++i)
|
||||
engine.update('a');
|
||||
assert (DigestEngine::digestToHex(engine.digest()) == "34aa973cd4c4daa4f61eeb2bdbad27316534016f");
|
||||
}
|
||||
|
||||
void DigestEngineTest::setUp()
|
||||
{
|
||||
@ -94,6 +110,7 @@ CppUnit::Test* DigestEngineTest::suite()
|
||||
CppUnit::TestSuite* pSuite = new CppUnit::TestSuite("DigestEngineTest");
|
||||
|
||||
CppUnit_addTest(pSuite, DigestEngineTest, testMD5);
|
||||
CppUnit_addTest(pSuite, DigestEngineTest, testSHA1);
|
||||
|
||||
return pSuite;
|
||||
}
|
||||
|
@ -47,6 +47,7 @@ public:
|
||||
~DigestEngineTest();
|
||||
|
||||
void testMD5();
|
||||
void testSHA1();
|
||||
|
||||
void setUp();
|
||||
void tearDown();
|
||||
|
@ -53,6 +53,7 @@ set( BASE_SRCS
|
||||
src/DigestEngine.cpp
|
||||
src/DigestStream.cpp
|
||||
src/DirectoryIterator.cpp
|
||||
src/DirectoryIteratorStrategy.cpp
|
||||
src/DirectoryWatcher.cpp
|
||||
src/Environment.cpp
|
||||
src/Error.cpp
|
||||
|
@ -120,6 +120,11 @@
|
||||
#endif
|
||||
|
||||
|
||||
// Define to disable compilation of DirectoryWatcher
|
||||
// on platforms with no inotify.
|
||||
// #define POCO_NO_INOTIFY
|
||||
|
||||
|
||||
// Following are options to remove certain features
|
||||
// to reduce library/executable size for smaller
|
||||
// embedded platforms. By enabling these options,
|
||||
|
@ -41,6 +41,11 @@
|
||||
|
||||
|
||||
#include "Poco/Foundation.h"
|
||||
|
||||
|
||||
#ifndef POCO_NO_INOTIFY
|
||||
|
||||
|
||||
#include "Poco/File.h"
|
||||
#include "Poco/BasicEvent.h"
|
||||
#include "Poco/Runnable.h"
|
||||
@ -242,4 +247,8 @@ inline const File& DirectoryWatcher::directory() const
|
||||
} // namespace Poco
|
||||
|
||||
|
||||
#endif // POCO_NO_INOTIFY
|
||||
|
||||
|
||||
#endif // Foundation_DirectoryWatcher_INCLUDED
|
||||
|
||||
|
@ -35,6 +35,11 @@
|
||||
|
||||
|
||||
#include "Poco/DirectoryWatcher.h"
|
||||
|
||||
|
||||
#ifndef POCO_NO_INOTIFY
|
||||
|
||||
|
||||
#include "Poco/Path.h"
|
||||
#include "Poco/Glob.h"
|
||||
#include "Poco/DirectoryIterator.h"
|
||||
@ -616,3 +621,6 @@ bool DirectoryWatcher::supportsMoveEvents() const
|
||||
|
||||
|
||||
} // namespace Poco
|
||||
|
||||
|
||||
#endif // POCO_NO_INOTIFY
|
||||
|
@ -53,6 +53,7 @@ src/HexBinaryTest.cpp
|
||||
src/LRUCacheTest.cpp
|
||||
src/LineEndingConverterTest.cpp
|
||||
src/LinearHashTableTest.cpp
|
||||
src/ListMapTest.cpp
|
||||
src/LocalDateTimeTest.cpp
|
||||
src/LogStreamTest.cpp
|
||||
src/LoggerTest.cpp
|
||||
@ -79,6 +80,7 @@ src/NumberFormatterTest.cpp
|
||||
src/NumberParserTest.cpp
|
||||
src/PathTest.cpp
|
||||
src/PatternFormatterTest.cpp
|
||||
src/PBKDF2EngineTest.cpp
|
||||
src/PriorityEventTest.cpp
|
||||
src/ProcessTest.cpp
|
||||
src/ProcessesTestSuite.cpp
|
||||
|
@ -31,6 +31,11 @@
|
||||
|
||||
|
||||
#include "DirectoryWatcherTest.h"
|
||||
|
||||
|
||||
#ifndef POCO_NO_INOTIFY
|
||||
|
||||
|
||||
#include "CppUnit/TestCaller.h"
|
||||
#include "CppUnit/TestSuite.h"
|
||||
#include "Poco/DirectoryWatcher.h"
|
||||
@ -312,3 +317,6 @@ CppUnit::Test* DirectoryWatcherTest::suite()
|
||||
|
||||
return pSuite;
|
||||
}
|
||||
|
||||
|
||||
#endif // POCO_NO_INOTIFY
|
||||
|
@ -37,6 +37,11 @@
|
||||
|
||||
|
||||
#include "Poco/Foundation.h"
|
||||
|
||||
|
||||
#ifndef POCO_NO_INOTIFY
|
||||
|
||||
|
||||
#include "Poco/DirectoryWatcher.h"
|
||||
#include "Poco/Path.h"
|
||||
#include "CppUnit/TestCase.h"
|
||||
@ -80,4 +85,9 @@ private:
|
||||
};
|
||||
|
||||
|
||||
#endif // POCO_NO_INOTIFY
|
||||
|
||||
|
||||
#endif // DirectoryWatcherTest_INCLUDED
|
||||
|
||||
|
||||
|
@ -45,7 +45,9 @@ CppUnit::Test* FilesystemTestSuite::suite()
|
||||
pSuite->addTest(PathTest::suite());
|
||||
pSuite->addTest(FileTest::suite());
|
||||
pSuite->addTest(GlobTest::suite());
|
||||
#ifndef POCO_NO_INOTIFY
|
||||
pSuite->addTest(DirectoryWatcherTest::suite());
|
||||
#endif // POCO_NO_INOTIFY
|
||||
pSuite->addTest(DirectoryIteratorsTest::suite());
|
||||
|
||||
return pSuite;
|
||||
|
@ -92,41 +92,41 @@ void Stringifier::formatString(const std::string& value, std::ostream& out)
|
||||
out << '"';
|
||||
for (std::string::const_iterator it = value.begin(); it != value.end(); ++it)
|
||||
{
|
||||
switch (*it)
|
||||
{
|
||||
case '"':
|
||||
if (*it == 0x20 ||
|
||||
*it == 0x21 ||
|
||||
(*it >= 0x23 && *it <= 0x2E) ||
|
||||
(*it >= 0x30 && *it <= 0x5B) ||
|
||||
(*it >= 0x5D && *it <= 0xFF))
|
||||
out << *it;
|
||||
else if (*it == '"')
|
||||
out << "\\\"";
|
||||
break;
|
||||
case '\\':
|
||||
else if (*it == '\\')
|
||||
out << "\\\\";
|
||||
break;
|
||||
case '\b':
|
||||
else if (*it == '\b')
|
||||
out << "\\b";
|
||||
break;
|
||||
case '\f':
|
||||
else if (*it == '\f')
|
||||
out << "\\f";
|
||||
break;
|
||||
case '\n':
|
||||
else if (*it == '\n')
|
||||
out << "\\n";
|
||||
break;
|
||||
case '\r':
|
||||
else if (*it == '\r')
|
||||
out << "\\r";
|
||||
break;
|
||||
case '\t':
|
||||
else if (*it == '\t')
|
||||
out << "\\t";
|
||||
break;
|
||||
default:
|
||||
else if ( *it == '\0' )
|
||||
out << "\\u0000";
|
||||
else
|
||||
{
|
||||
if ( *it > 0 && *it <= 0x1F )
|
||||
{
|
||||
out << "\\u" << std::hex << std::uppercase << std::setfill('0') << std::setw(4) << static_cast<int>(*it);
|
||||
}
|
||||
else
|
||||
{
|
||||
out << *it;
|
||||
}
|
||||
break;
|
||||
}
|
||||
const char *hexdigits = "0123456789ABCDEF";
|
||||
unsigned long u = (std::min)(static_cast<unsigned long>(static_cast<unsigned char>(*it)), 0xFFFFul);
|
||||
int d1 = u / 4096; u -= d1 * 4096;
|
||||
int d2 = u / 256; u -= d2 * 256;
|
||||
int d3 = u / 16; u -= d3 * 16;
|
||||
int d4 = u;
|
||||
out << "\\u";
|
||||
out << hexdigits[d1];
|
||||
out << hexdigits[d2];
|
||||
out << hexdigits[d3];
|
||||
out << hexdigits[d4];
|
||||
}
|
||||
}
|
||||
out << '"';
|
||||
|
@ -76,7 +76,7 @@ public:
|
||||
void write(BinaryWriter& writer);
|
||||
/// Writes the header
|
||||
|
||||
std::size_t getMessageLength() const;
|
||||
Int32 getMessageLength() const;
|
||||
/// Returns the message length
|
||||
|
||||
OpCode opCode() const;
|
||||
@ -95,13 +95,13 @@ private:
|
||||
MessageHeader(OpCode opcode);
|
||||
/// Constructor.
|
||||
|
||||
void setMessageLength(std::size_t length);
|
||||
void setMessageLength(Int32 length);
|
||||
/// Sets the message length
|
||||
|
||||
std::size_t _messageLength;
|
||||
Int32 _requestID;
|
||||
Int32 _responseTo;
|
||||
OpCode _opCode;
|
||||
Int32 _messageLength;
|
||||
Int32 _requestID;
|
||||
Int32 _responseTo;
|
||||
OpCode _opCode;
|
||||
|
||||
friend class Message;
|
||||
};
|
||||
@ -113,14 +113,15 @@ inline MessageHeader::OpCode MessageHeader::opCode() const
|
||||
}
|
||||
|
||||
|
||||
inline std::size_t MessageHeader::getMessageLength() const
|
||||
inline Int32 MessageHeader::getMessageLength() const
|
||||
{
|
||||
return _messageLength;
|
||||
}
|
||||
|
||||
|
||||
inline void MessageHeader::setMessageLength(std::size_t length)
|
||||
inline void MessageHeader::setMessageLength(Int32 length)
|
||||
{
|
||||
poco_assert (_messageLength >= 0);
|
||||
_messageLength = MSG_HEADER_SIZE + length;
|
||||
}
|
||||
|
||||
|
@ -62,9 +62,13 @@ set( BASE_SRCS
|
||||
src/Net.cpp
|
||||
src/NetException.cpp
|
||||
src/NetworkInterface.cpp
|
||||
src/NTPClient.cpp
|
||||
src/NTPEventArgs.cpp
|
||||
src/NTPPacket.cpp
|
||||
src/NullPartHandler.cpp
|
||||
src/PartHandler.cpp
|
||||
src/PartSource.cpp
|
||||
src/PartStore.cpp
|
||||
src/POP3ClientSession.cpp
|
||||
src/QuotedPrintableDecoder.cpp
|
||||
src/QuotedPrintableEncoder.cpp
|
||||
|
@ -39,6 +39,8 @@ src/NameValueCollectionTest.cpp
|
||||
src/NetCoreTestSuite.cpp
|
||||
src/NetTestSuite.cpp
|
||||
src/NetworkInterfaceTest.cpp
|
||||
src/NTPClientTest.cpp
|
||||
src/NTPClientTestSuite.cpp
|
||||
src/POP3ClientSessionTest.cpp
|
||||
src/QuotedPrintableTest.cpp
|
||||
src/RawSocketTest.cpp
|
||||
|
@ -21,4 +21,4 @@ shift
|
||||
dir4=$1
|
||||
shift
|
||||
|
||||
CC -xM1 $@ $source | sed "s#\(.*\.o\)#$dir1/\1 $dir2/\1 $dir3/\1 $dir4/\1#" >$target
|
||||
CC -xM1 $@ $source | sed "s#\(.*\.o$\)#$dir1/\1 $dir2/\1 $dir3/\1 $dir4/\1#" >$target
|
||||
|
@ -23,5 +23,5 @@ shift
|
||||
|
||||
tmpfile=`basename $target`
|
||||
aCC -E +maked $@ $source >/dev/null
|
||||
sed "s#\(.*\.o\)#$dir1/\1 $dir2/\1 $dir3/\1 $dir4/\1#" <$tmpfile >$target
|
||||
sed "s#\(.*\.o$\)#$dir1/\1 $dir2/\1 $dir3/\1 $dir4/\1#" <$tmpfile >$target
|
||||
rm $tmpfile
|
||||
|
@ -28,4 +28,4 @@ else
|
||||
CLANG=clang++
|
||||
fi
|
||||
|
||||
$CLANG -MM $@ $source | sed "s#\(.*\.o\)#$dir1/\1 $dir2/\1 $dir3/\1 $dir4/\1#" >$target
|
||||
$CLANG -MM $@ $source | sed "s#\(.*\.o$\)#$dir1/\1 $dir2/\1 $dir3/\1 $dir4/\1#" >$target
|
||||
|
@ -21,4 +21,4 @@ shift
|
||||
dir4=$1
|
||||
shift
|
||||
|
||||
cxx -M $@ $source | sed "s#\(.*\.o\)#$dir1/\1 $dir2/\1 $dir3/\1 $dir4/\1#" >$target
|
||||
cxx -M $@ $source | sed "s#\(.*\.o$\)#$dir1/\1 $dir2/\1 $dir3/\1 $dir4/\1#" >$target
|
||||
|
@ -21,4 +21,4 @@ shift
|
||||
dir4=$1
|
||||
shift
|
||||
|
||||
$CC -MM $@ $source | sed "s#\(.*\.o\)#$dir1/\1 $dir2/\1 $dir3/\1 $dir4/\1#" >$target
|
||||
$CC -MM $@ $source | sed "s#\(.*\.o$\)#$dir1/\1 $dir2/\1 $dir3/\1 $dir4/\1#" >$target
|
||||
|
@ -20,4 +20,4 @@ shift
|
||||
dir4=$1
|
||||
shift
|
||||
|
||||
$CC -E -Wp,-MM $@ $source | sed "s#\(.*\.o\)#$dir1/\1 $dir2/\1 $dir3/\1 $dir4/\1#" >$target
|
||||
$CC -E -Wp,-MM $@ $source | sed "s#\(.*\.o$\)#$dir1/\1 $dir2/\1 $dir3/\1 $dir4/\1#" >$target
|
||||
|
@ -27,5 +27,5 @@ $CXX -qmakedep -E -w $@ $cwd/$source >/dev/null
|
||||
|
||||
ufile=`basename $source`
|
||||
ufile=`echo $ufile | sed "s#\.cpp#\.u#"`
|
||||
cat $ufile | sort | uniq | grep -v '/usr/include' | grep -v '/usr/vacpp' | sed "s#\(.*\.o\)#$dir1/\1 $dir2/\1 $dir3/\1 $dir4/\1#" >$target
|
||||
cat $ufile | sort | uniq | grep -v '/usr/include' | grep -v '/usr/vacpp' | sed "s#\(.*\.o$\)#$dir1/\1 $dir2/\1 $dir3/\1 $dir4/\1#" >$target
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user