Skip to content
Browse files

Merge pull request #96 from mkrivos/small_fixes

cmake addition and gcc warning fixes
  • Loading branch information...
2 parents c6ac318 + 9349786 commit a48e7ebb80565fc9069b28b59f3beee669d2a9aa @aleks-f aleks-f committed
View
7 .gitignore
@@ -100,6 +100,13 @@ lib/
lib64/
pocomsg.h
+# Eclipse generated files #
+######################
+.project
+.cproject
+.settings
+cmake-build/
+
# Temporary files #
###################
*.bak
View
7 CMakeLists.txt
@@ -7,7 +7,7 @@ PROJECT(Poco)
cmake_minimum_required(VERSION 2.8.0)
-set(SHARED_LIBRARY_VERSION "15")
+set(SHARED_LIBRARY_VERSION "21")
set(CPACK_PACKAGE_VERSION_MAJOR "1")
set(CPACK_PACKAGE_VERSION_MINOR "5")
@@ -102,8 +102,9 @@ include(FindOpenSSL)
#include(CMakeDetermineCompilerId)
include(FindMySQL)
-include(FindAPR)
-include(FindApache2)
+
+#include(FindAPR)
+#include(FindApache2)
# OS Detection
if(CMAKE_SYSTEM MATCHES "Windows")
View
1 Crypto/testsuite/CMakeLists.txt
@@ -1,5 +1,6 @@
set( TEST_SRCS
src/CryptoTest.cpp
+src/DigestEngineTest.cpp
src/CryptoTestSuite.cpp
src/Driver.cpp
src/RSATest.cpp
View
3 Foundation/CMakeLists.txt
@@ -31,6 +31,8 @@ set( BASE_SRCS
src/AsyncChannel.cpp
src/Base64Decoder.cpp
src/Base64Encoder.cpp
+ src/Base32Decoder.cpp
+ src/Base32Encoder.cpp
src/BinaryReader.cpp
src/BinaryWriter.cpp
src/Bugcheck.cpp
@@ -50,6 +52,7 @@ set( BASE_SRCS
src/DigestEngine.cpp
src/DigestStream.cpp
src/DirectoryIterator.cpp
+ src/DirectoryWatcher.cpp
src/Environment.cpp
src/Error.cpp
src/ErrorHandler.cpp
View
2 Foundation/Makefile
@@ -13,7 +13,7 @@ objects = ArchiveStrategy Ascii ASCIIEncoding AsyncChannel \
BinaryReader BinaryWriter Bugcheck ByteOrder Channel Checksum Configurable ConsoleChannel \
CountingStream DateTime LocalDateTime DateTimeFormat DateTimeFormatter DateTimeParser \
Debugger DeflatingStream DigestEngine DigestStream DirectoryIterator DirectoryWatcher \
- Environment Event EventArgs ErrorHandler Exception FIFOBufferStream FPEnvironment File \
+ Environment Event Error EventArgs ErrorHandler Exception FIFOBufferStream FPEnvironment File \
FileChannel Formatter FormattingChannel Glob HexBinaryDecoder LineEndingConverter \
HexBinaryEncoder InflatingStream Latin1Encoding Latin2Encoding Latin9Encoding LogFile \
Logger LoggingFactory LoggingRegistry LogStream NamedEvent NamedMutex NullChannel \
View
4 Foundation/include/Poco/NumericString.h
@@ -349,7 +349,7 @@ bool intToStr(T value,
size = ptr - result;
poco_assert_dbg (size <= ptr.span());
- poco_assert_dbg ((-1 == width) || (size >= width));
+ poco_assert_dbg ((-1 == width) || (size >= size_t(width)));
*ptr-- = '\0';
char* ptrr = result;
@@ -424,7 +424,7 @@ bool uIntToStr(T value,
size = ptr - result;
poco_assert_dbg (size <= ptr.span());
- poco_assert_dbg ((-1 == width) || (size >= width));
+ poco_assert_dbg ((-1 == width) || (size >= size_t(width)));
*ptr-- = '\0';
char* ptrr = result;
View
22 Foundation/src/Error.cpp
@@ -38,6 +38,7 @@
#include "Poco/UnicodeConverter.h"
#include "Poco/Error.h"
#include <string>
+#include <string.h>
namespace Poco {
@@ -66,9 +67,24 @@ namespace Poco {
std::string Error::getMessage(int errorCode)
{
-#error todo
- char errmsg[256];
- return std::string(strerror_r(errorCode, errMsg, 256));
+ /* Reentrant version of `strerror'.
+ There are 2 flavors of `strerror_r', GNU which returns the string
+ and may or may not use the supplied temporary buffer and POSIX one
+ which fills the string into the buffer.
+ To use the POSIX version, -D_XOPEN_SOURCE=600 or -D_POSIX_C_SOURCE=200112L
+ without -D_GNU_SOURCE is needed, otherwise the GNU version is
+ preferred.
+ */
+#ifdef _GNU_SOURCE
+ char errmsg[256] = "";
+ return std::string(strerror_r(errorCode, errmsg, 256));
+#elif (_XOPEN_SOURCE >= 600)
+ char errmsg[256] = "";
+ strerror_r(errorCode, errmsg, 256);
+ return errmsg;
+#else
+ return std::string(strerror(errorCode));
+#endif
}
#endif
View
2 Foundation/testsuite/CMakeLists.txt
@@ -6,6 +6,7 @@ src/AnyTest.cpp
src/ArrayTest.cpp
src/AutoPtrTest.cpp
src/AutoReleasePoolTest.cpp
+src/Base32Test.cpp
src/Base64Test.cpp
src/BasicEventTest.cpp
src/BinaryReaderWriterTest.cpp
@@ -23,6 +24,7 @@ src/DateTimeParserTest.cpp
src/DateTimeTest.cpp
src/DateTimeTestSuite.cpp
src/DigestStreamTest.cpp
+src/DirectoryWatcherTest.cpp
src/Driver.cpp
src/DummyDelegate.cpp
src/DynamicFactoryTest.cpp
View
2 MongoDB/CMakeLists.txt
@@ -10,7 +10,7 @@ add_library( ${LIBNAME} ${LIB_MODE} ${SRCS} )
set_target_properties( ${LIBNAME}
PROPERTIES
VERSION ${SHARED_LIBRARY_VERSION} SOVERSION ${SHARED_LIBRARY_VERSION} )
-target_link_libraries( ${LIBNAME} PocoFoundation)
+target_link_libraries( ${LIBNAME} PocoNet PocoFoundation)
install(
DIRECTORY include/Poco
View
1 Net/CMakeLists.txt
@@ -49,6 +49,7 @@ set( BASE_SRCS
src/ICMPSocketImpl.cpp
src/ICMPv4PacketImpl.cpp
src/IPAddress.cpp
+ src/IPAddressImpl.cpp
src/MailMessage.cpp
src/MailRecipient.cpp
src/MailStream.cpp

0 comments on commit a48e7eb

Please sign in to comment.
Something went wrong with that request. Please try again.