fixed GH# 109, fixed clang -std=c++11 compile errors, added clang -std=c++11 build configs for OS X

This commit is contained in:
Guenter Obiltschnig
2013-02-27 22:25:53 +01:00
parent 62f71db517
commit 9b5b2bc562
13 changed files with 245 additions and 18 deletions

View File

@@ -1,6 +1,6 @@
This is the changelog file for the POCO C++ Libraries. This is the changelog file for the POCO C++ Libraries.
Release 1.4.6p1 (2013-02-21) Release 1.4.6p1 (2013-02-28)
============================ ============================
- fixed GH# 71: WebSocket and broken Timeouts (POCO_BROKEN_TIMEOUTS) - fixed GH# 71: WebSocket and broken Timeouts (POCO_BROKEN_TIMEOUTS)
@@ -14,6 +14,8 @@ Release 1.4.6p1 (2013-02-21)
- fixed copysign namespace issue in FPEnvironment_DUMMY.h - fixed copysign namespace issue in FPEnvironment_DUMMY.h
- fixed a warning in Poco/Crypto/OpenSSLInitializer.h - fixed a warning in Poco/Crypto/OpenSSLInitializer.h
- added a build configuration for BeagleBoard/Angstrom - added a build configuration for BeagleBoard/Angstrom
- fixed GH# 109: Bug in Poco::Net::SMTPClientSession::loginUsingPlain)
- fixed compile errors with clang -std=c++11
Release 1.4.6 (2013-01-10) Release 1.4.6 (2013-01-10)
@@ -22,7 +24,7 @@ Release 1.4.6 (2013-01-10)
- changed FPEnvironment_DUMMY.h to include <cmath> instead of <math.h> - changed FPEnvironment_DUMMY.h to include <cmath> instead of <math.h>
- updated bundled SQLite to 3.7.15.1 - updated bundled SQLite to 3.7.15.1
- fixed GH# 30: Poco::Path::home() throws - fixed GH# 30: Poco::Path::home() throws
- fixed SF Patch #120 The ExpireLRUCache does not compile with a tuple as key on VS2010 - fixed SF Patch# 120 The ExpireLRUCache does not compile with a tuple as key on VS2010
- fixed SF# 603 count() is missing in HashMap - fixed SF# 603 count() is missing in HashMap
- Crypto and NetSSL_OpenSSL project files now use OpenSSL *MD.lib library files for - Crypto and NetSSL_OpenSSL project files now use OpenSSL *MD.lib library files for
static_md builds. Previously, the DLL import libs were used. static_md builds. Previously, the DLL import libs were used.
@@ -37,8 +39,8 @@ Release 1.4.5 (2012-11-19)
- added Poco::Optional class - added Poco::Optional class
- fixed SF# 3558012 Compilation fails when building with -ansi or -std=c++0x - fixed SF# 3558012 Compilation fails when building with -ansi or -std=c++0x
- fixed SF# 3563517 Get rid of loss-of-precision warnings on x64 MacOS - fixed SF# 3563517 Get rid of loss-of-precision warnings on x64 MacOS
- fixed SF#3562244: Portability fix for AF_LINK - fixed SF# 3562244: Portability fix for AF_LINK
- fixed SF #3562400: DatagramSocketImpl comment - fixed SF# 3562400: DatagramSocketImpl comment
- fixed SF# 594: Websocket fails with small masked payloads - fixed SF# 594: Websocket fails with small masked payloads
- fixed SF# 588: Missing POCO_ARCH and POCO_ARCH_LITTLE_ENDIAN define for WinCE on SH4 - fixed SF# 588: Missing POCO_ARCH and POCO_ARCH_LITTLE_ENDIAN define for WinCE on SH4
- fixed SF# 581: Out-of-bound array access in Unicode::properties() function. - fixed SF# 581: Out-of-bound array access in Unicode::properties() function.
@@ -1811,4 +1813,4 @@ building the libraries.
-- --
$Id: //poco/1.4/dist/CHANGELOG#75 $ $Id: //poco/1.4/dist/CHANGELOG#77 $

View File

@@ -1,7 +1,7 @@
// //
// DirectoryWatcher.cpp // DirectoryWatcher.cpp
// //
// $Id: //poco/1.4/Foundation/src/DirectoryWatcher.cpp#7 $ // $Id: //poco/1.4/Foundation/src/DirectoryWatcher.cpp#8 $
// //
// Library: Foundation // Library: Foundation
// Package: Filesystem // Package: Filesystem
@@ -53,6 +53,7 @@
#include <sys/types.h> #include <sys/types.h>
#include <sys/event.h> #include <sys/event.h>
#include <sys/time.h> #include <sys/time.h>
#include <unistd.h>
#endif #endif
#include <algorithm> #include <algorithm>
#include <map> #include <map>

View File

@@ -1,7 +1,7 @@
// //
// NumberParser.cpp // NumberParser.cpp
// //
// $Id: //poco/1.4/Foundation/src/NumberParser.cpp#5 $ // $Id: //poco/1.4/Foundation/src/NumberParser.cpp#6 $
// //
// Library: Foundation // Library: Foundation
// Package: Core // Package: Core
@@ -124,7 +124,7 @@ Int64 NumberParser::parse64(const std::string& s)
bool NumberParser::tryParse64(const std::string& s, Int64& value) bool NumberParser::tryParse64(const std::string& s, Int64& value)
{ {
char temp; char temp;
return std::sscanf(s.c_str(), "%"I64_FMT"d%c", &value, &temp) == 1; return std::sscanf(s.c_str(), "%" I64_FMT "d%c", &value, &temp) == 1;
} }
@@ -141,7 +141,7 @@ UInt64 NumberParser::parseUnsigned64(const std::string& s)
bool NumberParser::tryParseUnsigned64(const std::string& s, UInt64& value) bool NumberParser::tryParseUnsigned64(const std::string& s, UInt64& value)
{ {
char temp; char temp;
return std::sscanf(s.c_str(), "%"I64_FMT"u%c", &value, &temp) == 1; return std::sscanf(s.c_str(), "%" I64_FMT "u%c", &value, &temp) == 1;
} }
@@ -158,7 +158,7 @@ UInt64 NumberParser::parseHex64(const std::string& s)
bool NumberParser::tryParseHex64(const std::string& s, UInt64& value) bool NumberParser::tryParseHex64(const std::string& s, UInt64& value)
{ {
char temp; char temp;
return std::sscanf(s.c_str(), "%"I64_FMT"x%c", &value, &temp) == 1; return std::sscanf(s.c_str(), "%" I64_FMT "x%c", &value, &temp) == 1;
} }

View File

@@ -1,7 +1,7 @@
// //
// SMTPClientSession.cpp // SMTPClientSession.cpp
// //
// $Id: //poco/1.4/Net/src/SMTPClientSession.cpp#1 $ // $Id: //poco/1.4/Net/src/SMTPClientSession.cpp#2 $
// //
// Library: Net // Library: Net
// Package: Mail // Package: Mail
@@ -236,7 +236,7 @@ void SMTPClientSession::loginUsingPlain(const std::string& username, const std::
std::ostringstream credentialsBase64; std::ostringstream credentialsBase64;
Base64Encoder credentialsEncoder(credentialsBase64); Base64Encoder credentialsEncoder(credentialsBase64);
credentialsEncoder << username << '\0' << password; credentialsEncoder << '\0' << username << '\0' << password;
credentialsEncoder.close(); credentialsEncoder.close();
status = sendCommand("AUTH PLAIN", credentialsBase64.str(), response); status = sendCommand("AUTH PLAIN", credentialsBase64.str(), response);

View File

@@ -1 +1 @@
PageCompiler.fileHeader = //\n// ${outputFileName}\n//\n// This file has been generated from ${inputFileName} on ${dateTime}.\n// PageCompiler.fileHeader = //\n// ${outputFileName}\n//\n// This file has been generated from ${inputFileName}.\n//

View File

@@ -1,7 +1,7 @@
// //
// MapConfiguration.h // MapConfiguration.h
// //
// $Id: //poco/1.4/Util/include/Poco/Util/MapConfiguration.h#1 $ // $Id: //poco/1.4/Util/include/Poco/Util/MapConfiguration.h#2 $
// //
// Library: Util // Library: Util
// Package: Configuration // Package: Configuration
@@ -59,6 +59,9 @@ public:
void clear(); void clear();
/// Clears the configuration. /// Clears the configuration.
void copyTo(AbstractConfiguration& config);
/// Copies all configuration properties to the given configuration.
protected: protected:
typedef std::map<std::string, std::string> StringMap; typedef std::map<std::string, std::string> StringMap;
typedef StringMap::const_iterator iterator; typedef StringMap::const_iterator iterator;

View File

@@ -1,7 +1,7 @@
// //
// MapConfiguration.cpp // MapConfiguration.cpp
// //
// $Id: //poco/1.4/Util/src/MapConfiguration.cpp#1 $ // $Id: //poco/1.4/Util/src/MapConfiguration.cpp#2 $
// //
// Library: Util // Library: Util
// Package: Configuration // Package: Configuration
@@ -58,6 +58,15 @@ void MapConfiguration::clear()
} }
void MapConfiguration::copyTo(AbstractConfiguration& config)
{
for (iterator it = _map.begin(); it != _map.end(); ++it)
{
config.setString(it->first, it->second);
}
}
bool MapConfiguration::getRaw(const std::string& key, std::string& value) const bool MapConfiguration::getRaw(const std::string& key, std::string& value) const
{ {
StringMap::const_iterator it = _map.find(key); StringMap::const_iterator it = _map.find(key);

View File

@@ -0,0 +1,75 @@
#
# $Id: //poco/1.4/build/config/Darwin-clang-libc++#1 $
#
# Darwin-clang-libc++
#
# Build settings for Mac OS X 10.6 (clang++) with libc++.
#
# NOTE: This build configuration will build 64-bit binaries.
# Use the Darwin32-clang build configuration to build 32-bit binaries.
#
#
# General Settings
#
LINKMODE ?= SHARED
POCO_TARGET_OSARCH ?= x86_64
POCO_HOST_OSARCH := $(POCO_TARGET_OSARCH)
ARCHFLAGS ?= -arch $(POCO_TARGET_OSARCH)
#
# Tools
#
CC = $(shell xcrun -find clang)
CXX = $(shell xcrun -find clang++)
LINK = $(CXX) -bind_at_load
LIB = libtool -static -o
RANLIB = ranlib
SHLIB = $(CXX) -dynamiclib -o $@
DYLIB = $(CXX) -dynamic -bundle -read_only_relocs suppress -Wl,-bind_at_load -o $@
SHLIBLN = $(POCO_BASE)/build/script/shlibln
STRIP =
DEP = $(POCO_BASE)/build/script/makedepend.clang
SHELL = sh
RM = rm -rf
CP = cp
MKDIR = mkdir -p
#
# Extension for Shared Libraries
#
SHAREDLIBEXT = .$(target_version).dylib
SHAREDLIBLINKEXT = .dylib
#
# Compiler and Linker Flags
#
CFLAGS = $(ARCHFLAGS)
CXXFLAGS = $(ARCHFLAGS) -std=c++11 -stdlib=libc++ -Wall -Wno-sign-compare -Wno-unused-variable -Wno-unused-function -Wno-unneeded-internal-declaration
LINKFLAGS = $(ARCHFLAGS) -std=c++11 -stdlib=libc++
SHLIBFLAGS = $(ARCHFLAGS) -std=c++11 -stdlib=libc++
DYLIBFLAGS = $(ARCHFLAGS) -std=c++11 -stdlib=libc++
STATICOPT_CC =
STATICOPT_CXX =
STATICOPT_LINK =
SHAREDOPT_CC = -fPIC
SHAREDOPT_CXX = -fPIC
SHAREDOPT_LINK =
DEBUGOPT_CC = -O0 -g -gdwarf-2 -fasm-blocks -D_DEBUG=$(DEBUGLEVEL)
DEBUGOPT_CXX = -O0 -g -gdwarf-2 -fasm-blocks -D_DEBUG=$(DEBUGLEVEL)
DEBUGOPT_LINK =
RELEASEOPT_CC = -DNDEBUG -Os -fasm-blocks
RELEASEOPT_CXX = -DNDEBUG -O2 -fasm-blocks
RELEASEOPT_LINK =
#
# System Specific Flags
#
SYSFLAGS = -DPOCO_HAVE_IPv6 -DPOCO_NO_STAT64
#
# System Specific Libraries
#
SYSLIBS = -ldl

View File

@@ -0,0 +1,12 @@
#
# $Id: //poco/1.4/build/config/Darwin32-clang-libc++#1 $
#
# Darwin32-clang=libc++
#
# Build settings for Mac OS X 10.6 (clang++) with libc++, 32-bit.
#
ARCHFLAGS = -arch i386
POCO_TARGET_OSARCH = i386
include $(POCO_BASE)/build/config/Darwin-clang-libc++

View File

@@ -0,0 +1,12 @@
#
# $Id: //poco/1.4/build/config/Darwin64-clang-libc++#1 $
#
# Darwin64-clang=libc++
#
# Build settings for Mac OS X 10.6 (clang++) with libc++, 64-bit.
#
ARCHFLAGS = -arch x86_64
POCO_TARGET_OSARCH = x86_64
include $(POCO_BASE)/build/config/Darwin-clang-libc++

View File

@@ -0,0 +1,98 @@
#
# $Id: //poco/1.4/build/config/iPhone-clang-libc++#1 $
#
# iPhone-clang-libc++
#
# Build settings for iPhone OS, using Apple's iPhone SDK
#
#
# General Settings
#
# iPhone OS does not allow dynamic linking to user libraries
#
LINKMODE ?= STATIC
#
# If the SDK is defined use it
# Otherwise find the latest version installed
#
# IPHONE_SDK_VERSION = 2.2.1
# if IPHONE_SDK_VERSION_MIN is defined use that
# Otherwise use the version found.
IPHONE_SDK ?= iPhoneOS
IPHONE_SDK_ROOT ?= $(shell xcode-select -print-path)/Platforms/$(IPHONE_SDK).platform/Developer/SDKs
IPHONE_SDK_ROOT_DIR = $(IPHONE_SDK_ROOT)/$(IPHONE_SDK)
IPHONE_SDK_BASE = $(shell ls -d $(IPHONE_SDK_ROOT_DIR)$(IPHONE_SDK_VERSION)*.sdk | tail -1)
IPHONE_SDK_VERSION_MIN ?= $(patsubst %.sdk,%,$(patsubst $(IPHONE_SDK_ROOT_DIR)%,%,$(IPHONE_SDK_BASE)))
POCO_TARGET_OSNAME ?= $(IPHONE_SDK)
POCO_TARGET_OSARCH ?= armv7
TOOL_PREFIX ?= $(shell xcode-select -print-path)/Platforms/$(IPHONE_SDK).platform/Developer/usr/bin
OSFLAGS ?= -arch $(POCO_TARGET_OSARCH) -isysroot $(IPHONE_SDK_BASE) -mthumb -miphoneos-version-min=$(IPHONE_SDK_VERSION_MIN)
#
# Tools
#
# If GCC_VER is defined then use it.
# Otherwise select the latest version
#
CC = $(shell xcrun -find clang)
CXX = $(shell xcrun -find clang++)
LINK = $(CXX) -bind_at_load
LIB = libtool -static -o
RANLIB = ranlib
SHLIB = $(CXX) $(OSFLAGS) -dynamiclib -Wl,-install_name,$@ -o $@
DYLIB = $(CXX) $(OSFLAGS) -dynamic -bundle -read_only_relocs suppress -Wl,-bind_at_load -o $@
SHLIBLN = $(POCO_BASE)/build/script/shlibln
STRIP =
DEP = $(POCO_BASE)/build/script/makedepend.gcc
SHELL = sh
RM = rm -rf
CP = cp
MKDIR = mkdir -p
#
# Extension for Shared Libraries
#
SHAREDLIBEXT = .$(target_version).dylib
SHAREDLIBLINKEXT = .dylib
#
# Compiler and Linker Flags
#
CFLAGS = $(OSFLAGS)
CFLAGS32 =
CFLAGS64 =
CXXFLAGS = $(OSFLAGS) -stdlib=libc++ -Wall -Wno-sign-compare
CXXFLAGS32 =
CXXFLAGS64 =
LINKFLAGS = $(OSFLAGS) -stdlib=libc++
LINKFLAGS32 =
LINKFLAGS64 =
STATICOPT_CC =
STATICOPT_CXX =
STATICOPT_LINK =
SHAREDOPT_CC = -fPIC
SHAREDOPT_CXX = -fPIC
SHAREDOPT_LINK =
DEBUGOPT_CC = -g -D_DEBUG=$(DEBUGLEVEL)
DEBUGOPT_CXX = -g -D_DEBUG=$(DEBUGLEVEL)
DEBUGOPT_LINK =
RELEASEOPT_CC = -DNDEBUG -O2
RELEASEOPT_CXX = -DNDEBUG -O
RELEASEOPT_LINK =
#
# System Specific Flags
#
SYSFLAGS = -DPOCO_HAVE_IPv6 -DPOCO_NO_FPENVIRONMENT -DPOCO_NO_STAT64 -DPOCO_NO_SHAREDLIBS -DPOCO_NO_NET_IFTYPES
#
# System Specific Libraries
#
SYSLIBS = -ldl

View File

@@ -0,0 +1,13 @@
#
# $Id: //poco/1.4/build/config/iPhoneSimulator-clang-libc++#1 $
#
# iPhoneSimulator-clang-libc++
#
# Build settings for iPhone Simulator, using Apple's iPhone SDK
#
IPHONE_SDK = iPhoneSimulator
POCO_TARGET_OSARCH = i686
OSFLAGS = -arch $(POCO_TARGET_OSARCH) -isysroot $(IPHONE_SDK_BASE) -miphoneos-version-min=$(IPHONE_SDK_VERSION_MIN)
include $(POCO_BASE)/build/config/iPhone-clang-libc++

View File

@@ -16,6 +16,8 @@ AAAIntroduction
- fixed copysign namespace issue in FPEnvironment_DUMMY.h - fixed copysign namespace issue in FPEnvironment_DUMMY.h
- fixed a warning in Poco/Crypto/OpenSSLInitializer.h - fixed a warning in Poco/Crypto/OpenSSLInitializer.h
- added a build configuration for BeagleBoard/Angstrom - added a build configuration for BeagleBoard/Angstrom
- fixed GH# 109: Bug in Poco::Net::SMTPClientSession::loginUsingPlain)
- fixed compile errors with clang -std=c++11
!!!Release 1.4.6 !!!Release 1.4.6
@@ -25,7 +27,7 @@ AAAIntroduction
- changed FPEnvironment_DUMMY.h to include <cmath> instead of <math.h> - changed FPEnvironment_DUMMY.h to include <cmath> instead of <math.h>
- updated bundled SQLite to 3.7.15.1 - updated bundled SQLite to 3.7.15.1
- fixed GH# 30: Poco::Path::home() throws - fixed GH# 30: Poco::Path::home() throws
- fixed SF Patch #120: The ExpireLRUCache does not compile with a tuple as key on VS2010 - fixed SF Patch# 120: The ExpireLRUCache does not compile with a tuple as key on VS2010
- fixed SF# 603: count() is missing in HashMap - fixed SF# 603: count() is missing in HashMap
- Crypto and NetSSL_OpenSSL project files now use OpenSSL *MD.lib library files for - Crypto and NetSSL_OpenSSL project files now use OpenSSL *MD.lib library files for
static_md builds. Previously, the DLL import libs were used. static_md builds. Previously, the DLL import libs were used.
@@ -41,8 +43,8 @@ AAAIntroduction
- added Poco::Optional class - added Poco::Optional class
- fixed SF# 3558012 Compilation fails when building with -ansi or -std=c++0x - fixed SF# 3558012 Compilation fails when building with -ansi or -std=c++0x
- fixed SF# 3563517 Get rid of loss-of-precision warnings on x64 MacOS - fixed SF# 3563517 Get rid of loss-of-precision warnings on x64 MacOS
- fixed SF#3562244: Portability fix for AF_LINK - fixed SF# 3562244: Portability fix for AF_LINK
- fixed SF #3562400: DatagramSocketImpl comment - fixed SF# 3562400: DatagramSocketImpl comment
- fixed SF# 594: Websocket fails with small masked payloads - fixed SF# 594: Websocket fails with small masked payloads
- fixed SF# 588: Missing POCO_ARCH and POCO_ARCH_LITTLE_ENDIAN define for WinCE on SH4 - fixed SF# 588: Missing POCO_ARCH and POCO_ARCH_LITTLE_ENDIAN define for WinCE on SH4
- fixed SF# 581: Out-of-bound array access in Unicode::properties() function. - fixed SF# 581: Out-of-bound array access in Unicode::properties() function.