- SF #3552774: Don't hide default target in subordinate makefile

- SF #3534307: Building IPv6 for Linux by default
- SF #3516844: poco missing symbols with external >=lipcre-8.13 
- fix of rev. 1952 fix (porting rev.1913 from 1.4.4 (fixed SF# 3550553))
This commit is contained in:
Aleksandar Fabijanic 2012-08-20 00:57:17 +00:00
parent 06204c4865
commit 90a8e859bf
13 changed files with 123 additions and 59 deletions

View File

@ -29,6 +29,9 @@ Release 1.5.0 (2012-08-??)
- fixed SF# 3012166: IPv6 patch
- added SF# 3558085: Add formatter to MACAddress object
- fixed SF# 3535990: POCO_HAVE_IPv6 without POCO_WIN32_UTF8 conflict
- fixed SF #3552774: Don't hide default target in subordinate makefile
- fixed SF #3534307: Building IPv6 for Linux by default
- fixed SF #3516844: poco missing symbols with external >=lipcre-8.13
Release 1.4.4 (2012-08-??)
==========================

View File

@ -14,16 +14,14 @@
include $(POCO_BASE)/build/rules/global
# adjust for the target system (usually '/usr/lib' or '/usr/local/lib')
ODBCLIBDIR = /usr/lib$(LIB64SUFFIX)
ifeq ($(LINKMODE),STATIC)
LIBLINKEXT = $(STATICLIBLINKEXT)
else
LIBLINKEXT = $(SHAREDLIBLINKEXT)
endif
INCLUDE += -I/usr/local/include -I/usr/include -I/usr/include/odbc -I/usr/local/include/odbc
SYSLIBS += -L/usr/lib$(LIB64SUFFIX) -L/usr/local/lib$(LIB64SUFFIX) -L/usr/lib$(LIB64SUFFIX)/odbc -L/usr/local/lib$(LIB64SUFFIX)/odbc
INCLUDE += $(POCO_ODBC_INCLUDE)
SYSLIBS += $(POCO_ODBC_LIBRARY)
ifeq ($(POCO_CONFIG),MinGW)
# -DODBCVER=0x0300: SQLHandle declaration issue
@ -36,23 +34,25 @@ CXXFLAGS += -DODBCVER=0x0300 -DNOMINMAX
# CYGWIN platform has its own ODBC library in /lib/w32api
SYSLIBS += -L/lib/w32api -lodbc32 -lodbccp32
else
ifeq (0, $(shell test -e $(ODBCLIBDIR)/libodbc$(LIBLINKEXT); echo $$?))
ifeq (0, $(shell test -e $(POCO_ODBC_LIBRARY)/libodbc$(LIBLINKEXT); echo $$?))
SYSLIBS += -lodbc -lodbcinst
COMMONFLAGS += -DPOCO_UNIXODBC
else
ifeq (0, $(shell test -h $(ODBCLIBDIR)/libodbc$(LIBLINKEXT); echo $$?))
ifeq (0, $(shell test -h $(POCO_ODBC_LIBRARY)/libodbc$(LIBLINKEXT); echo $$?))
SYSLIBS += -lodbc -lodbcinst
COMMONFLAGS += -DPOCO_UNIXODBC
else
ifeq (0, $(shell test -e $(ODBCLIBDIR)/libiodbc$(LIBLINKEXT); echo $$?))
ifeq (0, $(shell test -e $(POCO_ODBC_LIBRARY)/libiodbc$(LIBLINKEXT); echo $$?))
SYSLIBS += -liodbc -liodbcinst
COMMONFLAGS += -DPOCO_IODBC -I/usr/include/iodbc
else
ifeq (0, $(shell test -h $(ODBCLIBDIR)/libiodbc$(LIBLINKEXT); echo $$?))
ifeq (0, $(shell test -h $(POCO_ODBC_LIBRARY)/libiodbc$(LIBLINKEXT); echo $$?))
SYSLIBS += -liodbc -liodbcinst -I/usr/include/iodbc
COMMONFLAGS += -DPOCO_IODBC
else
$(error No ODBC library found. Please install unixODBC or iODBC and try again)
ifndef (POCO_NO_ODBC)
$(warning No ODBC library found. Please install unixODBC or iODBC.)
endif
endif
endif
endif

View File

@ -14,16 +14,14 @@
include $(POCO_BASE)/build/rules/global
# adjust for the target system (usually '/usr/lib' or '/usr/local/lib')
ODBCLIBDIR = /usr/lib$(LIB64SUFFIX)
ifeq ($(LINKMODE),STATIC)
LIBLINKEXT = $(STATICLIBLINKEXT)
else
LIBLINKEXT = $(SHAREDLIBLINKEXT)
endif
INCLUDE += -I/usr/local/include -I/usr/include -I/usr/include/odbc -I/usr/local/include/odbc
SYSLIBS += -L/usr/lib$(LIB64SUFFIX) -L/usr/local/lib$(LIB64SUFFIX) -L/usr/lib$(LIB64SUFFIX)/odbc -L/usr/local/lib$(LIB64SUFFIX)/odbc
INCLUDE += $(POCO_ODBC_INCLUDE)
SYSLIBS += $(POCO_ODBC_LIBRARY)
ifeq ($(POCO_CONFIG),MinGW)
# -DODBCVER=0x0300: SQLHandle declaration issue
@ -33,26 +31,28 @@ else ifeq ($(POCO_CONFIG),CYGWIN)
# -DODBCVER=0x0300: SQLHandle declaration issue
# -DNOMINMAX : MIN/MAX macros defined in windows conflict with libstdc++
CXXFLAGS += -DODBCVER=0x0300 -DNOMINMAX
# CYGWIN platform has its own ODBC library in /lib/w32api
# CYGWIN platform has its own ODBC library in /lib/w32api
SYSLIBS += -L/lib/w32api -lodbc32 -lodbccp32
else
ifeq (0, $(shell test -e $(ODBCLIBDIR)/libodbc$(LIBLINKEXT); echo $$?))
ifeq (0, $(shell test -e $(POCO_ODBC_LIBRARY)/libodbc$(LIBLINKEXT); echo $$?))
SYSLIBS += -lodbc -lodbcinst
COMMONFLAGS += -DPOCO_UNIXODBC
else
ifeq (0, $(shell test -h $(ODBCLIBDIR)/libodbc$(LIBLINKEXT); echo $$?))
ifeq (0, $(shell test -h $(POCO_ODBC_LIBRARY)/libodbc$(LIBLINKEXT); echo $$?))
SYSLIBS += -lodbc -lodbcinst
COMMONFLAGS += -DPOCO_UNIXODBC
else
ifeq (0, $(shell test -e $(ODBCLIBDIR)/libiodbc$(LIBLINKEXT); echo $$?))
ifeq (0, $(shell test -e $(POCO_ODBC_LIBRARY)/libiodbc$(LIBLINKEXT); echo $$?))
SYSLIBS += -liodbc -liodbcinst
COMMONFLAGS += -DPOCO_IODBC -I/usr/include/iodbc
else
ifeq (0, $(shell test -h $(ODBCLIBDIR)/libiodbc$(LIBLINKEXT); echo $$?))
ifeq (0, $(shell test -h $(POCO_ODBC_LIBRARY)/libiodbc$(LIBLINKEXT); echo $$?))
SYSLIBS += -liodbc -liodbcinst -I/usr/include/iodbc
COMMONFLAGS += -DPOCO_IODBC
else
$(error No ODBC library found. Please install unixODBC or iODBC and try again)
ifndef (POCO_NO_ODBC)
$(warning No ODBC library found. Please install unixODBC or iODBC.)
endif
endif
endif
endif

View File

@ -43,8 +43,11 @@ pcre_objects = pcre_chartables pcre_compile pcre_globals pcre_maketables \
pcre_utf8_objects = pcre_ucd pcre_tables
ifndef POCO_UNBUNDLED
$(warning POCO_NO_ODBC NOT defined)
endif
ifdef POCO_UNBUNDLED
objects += $(pcre_utf8_objects)
SYSLIBS += -lpcre -lz
else
objects += $(zlib_objects) $(pcre_objects) $(pcre_utf8_objects)

View File

@ -121,4 +121,9 @@
// #define POCO_UTIL_NO_XMLCONFIGURATION
// No IPv6 support
// Define to disable IPv6
// #define POCO_NET_NO_IPv6
#endif // Foundation_Config_INCLUDED

View File

@ -5,6 +5,7 @@
#
sinclude config.make
sinclude config.build
ifndef POCO_BASE
$(warning WARNING: POCO_BASE is not defined. Assuming current directory.)
@ -24,7 +25,8 @@ ifeq ($(LINKMODE),BOTH)
SHAREDONLY='(' -name static -prune ')' -o
endif
.PHONY: all libexecs cppunit tests samples clean distclean install
# TESTS and SAMPLES are set by confgure script in config.make
poco: libexecs $(if $(TESTS),tests) $(if $(SAMPLES),samples)
all: libexecs tests samples
@ -53,6 +55,7 @@ libexecs = Foundation-libexec XML-libexec JSON-libexec Util-libexec Net-libexec
tests = Foundation-tests XML-tests JSON-tests Util-tests Net-tests Crypto-tests NetSSL_OpenSSL-tests Data-tests Data/SQLite-tests Data/ODBC-tests Data/MySQL-tests Zip-tests PDF-tests CppParser-tests
samples = Foundation-samples XML-samples JSON-samples Util-samples Net-samples Crypto-samples NetSSL_OpenSSL-samples Data-samples Zip-samples PageCompiler-samples PDF-samples
.PHONY: poco all libexecs cppunit tests samples clean distclean install
.PHONY: $(libexecs)
.PHONY: $(tests)
.PHONY: $(samples)
@ -66,7 +69,7 @@ Foundation-libexec:
Foundation-tests: Foundation-libexec cppunit
$(MAKE) -C $(POCO_BASE)/Foundation/testsuite
Foundation-samples: Foundation-libexec
$(MAKE) -C $(POCO_BASE)/Foundation/samples
@ -75,7 +78,7 @@ XML-libexec: Foundation-libexec
XML-tests: XML-libexec cppunit
$(MAKE) -C $(POCO_BASE)/XML/testsuite
XML-samples: XML-libexec
$(MAKE) -C $(POCO_BASE)/XML/samples
@ -84,7 +87,7 @@ JSON-libexec: Foundation-libexec
JSON-tests: JSON-libexec cppunit
$(MAKE) -C $(POCO_BASE)/JSON/testsuite
JSON-samples: JSON-libexec
$(MAKE) -C $(POCO_BASE)/JSON/samples
@ -93,7 +96,7 @@ Util-libexec: Foundation-libexec XML-libexec
Util-tests: Util-libexec cppunit
$(MAKE) -C $(POCO_BASE)/Util/testsuite
Util-samples: Util-libexec
$(MAKE) -C $(POCO_BASE)/Util/samples
@ -102,7 +105,7 @@ Net-libexec: Foundation-libexec
Net-tests: Net-libexec cppunit
$(MAKE) -C $(POCO_BASE)/Net/testsuite
Net-samples: Net-libexec Foundation-libexec XML-libexec Util-libexec
$(MAKE) -C $(POCO_BASE)/Net/samples
@ -111,7 +114,7 @@ Crypto-libexec: Foundation-libexec
Crypto-tests: Crypto-libexec cppunit
$(MAKE) -C $(POCO_BASE)/Crypto/testsuite
Crypto-samples: Crypto-libexec Foundation-libexec Util-libexec
$(MAKE) -C $(POCO_BASE)/Crypto/samples
@ -120,7 +123,7 @@ NetSSL_OpenSSL-libexec: Foundation-libexec Net-libexec Util-libexec Crypto-libe
NetSSL_OpenSSL-tests: NetSSL_OpenSSL-libexec cppunit
$(MAKE) -C $(POCO_BASE)/NetSSL_OpenSSL/testsuite
NetSSL_OpenSSL-samples: NetSSL_OpenSSL-libexec
$(MAKE) -C $(POCO_BASE)/NetSSL_OpenSSL/samples
@ -129,7 +132,7 @@ Data-libexec: Foundation-libexec
Data-tests: Data-libexec cppunit
$(MAKE) -C $(POCO_BASE)/Data/testsuite
Data-samples: Data-libexec Data-libexec Data/SQLite-libexec
$(MAKE) -C $(POCO_BASE)/Data/samples
@ -156,13 +159,13 @@ Zip-libexec: Foundation-libexec Net-libexec Util-libexec XML-libexec
Zip-tests: Zip-libexec cppunit
$(MAKE) -C $(POCO_BASE)/Zip/testsuite
Zip-samples: Zip-libexec
$(MAKE) -C $(POCO_BASE)/Zip/samples
PageCompiler-libexec: Net-libexec Util-libexec XML-libexec Foundation-libexec
$(MAKE) -C $(POCO_BASE)/PageCompiler
PageCompiler-samples: PageCompiler-libexec
$(MAKE) -C $(POCO_BASE)/PageCompiler/samples
@ -174,7 +177,7 @@ PDF-libexec: Foundation-libexec
PDF-tests: PDF-libexec cppunit
$(MAKE) -C $(POCO_BASE)/PDF/testsuite
PDF-samples: PDF-libexec
$(MAKE) -C $(POCO_BASE)/PDF/samples

View File

@ -80,8 +80,10 @@ public:
enum Family
/// Possible address families for IP addresses.
{
IPv4,
IPv6
IPv4
#ifdef POCO_HAVE_IPv6
,IPv6
#endif
};
IPAddress();

View File

@ -96,10 +96,13 @@ void Net_API uninitializeNetwork();
} } // namespace Poco::Net
// Define to enable IPv6 support
#if !defined (POCO_HAVE_IPv6)
// Default to enabled IPv6 support if not explicitly disabled
#if !defined(POCO_NET_NO_IPv6) && !defined (POCO_HAVE_IPv6)
#define POCO_HAVE_IPv6
#endif // POCO_HAVE_IPv6
#elif defined(POCO_NET_NO_IPv6) && defined (POCO_HAVE_IPv6)
#undef POCO_HAVE_IPv6
#endif // POCO_NET_NO_IPv6, POCO_HAVE_IPv6
#if !defined(s6_addr16)
#if defined(POCO_OS_FAMILY_WINDOWS)

View File

@ -280,6 +280,7 @@ bool NetworkInterfaceImpl::supportsIPv4() const
bool NetworkInterfaceImpl::supportsIPv6() const
{
#ifdef POCO_HAVE_IPv6
AddressList::const_iterator it = _addressList.begin();
AddressList::const_iterator end = _addressList.end();
for (; it != end; ++it)
@ -287,7 +288,7 @@ bool NetworkInterfaceImpl::supportsIPv6() const
if (IPAddress::IPv6 == it->get<NetworkInterface::IP_ADDRESS>().family())
return true;
}
#endif
return false;
}
@ -1241,7 +1242,11 @@ NetworkInterface::Map NetworkInterface::map(bool ipOnly, bool upOnly)
continue;
}
if (family == AF_INET || family == AF_INET6)
if (family == AF_INET
#ifdef POCO_HAVE_IPv6
|| family == AF_INET6
#endif
)
{
intf = NetworkInterface(std::string(currIface->ifa_name), address, subnetMask, broadcastAddress, ifIndex);
if ((upOnly && intf.isUp()) || !upOnly)

View File

@ -358,11 +358,13 @@ int SocketAddress::af() const
std::string SocketAddress::toString() const
{
std::string result;
#if defined(POCO_HAVE_IPv6)
if (host().family() == IPAddress::IPv6)
result.append("[");
result.append(host().toString());
if (host().family() == IPAddress::IPv6)
result.append("]");
#endif
result.append(":");
NumberFormatter::append(result, port());
return result;

View File

@ -140,7 +140,13 @@ void SecureSocketImpl::connect(const SocketAddress& address, const Poco::Timespa
poco_assert (!_pSSL);
_pSocket->connect(address, timeout);
Poco::Timespan receiveTimeout = _pSocket->getReceiveTimeout();
Poco::Timespan sendTimeout = _pSocket->getSendTimeout();
_pSocket->setReceiveTimeout(timeout);
_pSocket->setSendTimeout(timeout);
connectSSL(performHandshake);
_pSocket->setReceiveTimeout(receiveTimeout);
_pSocket->setSendTimeout(sendTimeout);
}
@ -149,15 +155,8 @@ void SecureSocketImpl::connectNB(const SocketAddress& address)
if (_pSSL) reset();
poco_assert (!_pSSL);
_pSocket->connectNB(address);
Poco::Timespan receiveTimeout = _pSocket->getReceiveTimeout();
Poco::Timespan sendTimeout = _pSocket->getSendTimeout();
_pSocket->setReceiveTimeout(timeout);
_pSocket->setSendTimeout(timeout);
connectSSL(false);
_pSocket->setReceiveTimeout(receiveTimeout);
_pSocket->setSendTimeout(sendTimeout);
}

View File

@ -25,7 +25,7 @@ endif
#
# Include some optional make configuration
#
sinclude $(POCO_BASE)/config.build
sinclude $(POCO_BASE)/config.make
#
# Check for PROJECT_BASE
@ -270,6 +270,36 @@ INCLUDE = $(foreach p,$(POCO_ADD_INCLUDE),-I$(p)) -Iinclude $(foreach p,$(COMPON
#
LIBRARY = $(foreach p,$(POCO_ADD_LIBRARY),-L$(p)) -L$(LIBPATH) $(POCO_LIBRARY)
#
# Build ODBC Include directory List if not supplied from config
#
ifndef POCO_ODBC_INCLUDE
POCO_ODBC_INCLUDE = -I/usr/local/include -I/usr/include -I/usr/include/odbc -I/usr/local/include/odbc
endif
#
# Build ODBC library directory if not supplied from config
#
ifndef POCO_NO_ODBC
ifndef POCO_ODBC_LIBRARY
ifeq (0, $(shell test -e $/usr/lib/libodbc$(LIBLINKEXT); echo $$?))
POCO_ODBC_LIBRARY = /usr/lib$(LIB64SUFFIX)
else
ifeq (0, $(shell test -e $/usr/local/lib/libodbc$(LIBLINKEXT); echo $$?))
POCO_ODBC_LIBRARY = /usr/local/lib$(LIB64SUFFIX)
else
ifeq (0, $(shell test -e $/usr/local/lib/libodbc$(LIBLINKEXT); echo $$?))
POCO_ODBC_LIBRARY = /usr/lib$(LIB64SUFFIX)/odbc
else
ifeq (0, $(shell test -e $/usr/local/lib/libodbc$(LIBLINKEXT); echo $$?))
POCO_ODBC_LIBRARY = /usr/local/lib$(LIB64SUFFIX)/odbc
endif
endif
endif
endif
endif
endif
#
# Strip Command definition
#

33
configure vendored
View File

@ -59,6 +59,10 @@ Options:
Compile with -DPOCO_NO_SHAREDLIBS.
For systems that don't support shared library loading.
--no-ipv6
Compile with -DPOCO_NET_NO_IPv6.
For systems that don't support IPv6.
--omit=<component>{,<component>}
Do not build the specified component(s).
Example: --omit=Data/MySQL,Data/ODBC,Zip
@ -101,8 +105,8 @@ cd `dirname $0`
base=`pwd`
cd $build
tests="tests"
samples="samples"
tests=1
samples=1
flags=""
omit=""
includepath=""
@ -114,25 +118,25 @@ shared=""
while [ $# -ge 1 ]; do
case "$1" in
--config=*)
config="${1:9}" ;;
config="`echo ${1} | awk '{print substr($0,10)}'`" ;;
--prefix=*)
prefix="${1:9}" ;;
prefix="`echo ${1} | awk '{print substr($0,10)}'`" ;;
--stdcxx-base=*)
stdcxx_base="${1:14}" ;;
stdcxx_base="`echo ${1} | awk '{print substr($0,15)}'`" ;;
--omit=*)
omit="`echo ${1:7} | tr ',;' ' '`" ;;
omit="`echo ${1} | awk '{print substr($0,8)}' | tr ',;' ' '`" ;;
--include-path=*)
includepath="`echo ${1:15} | tr ',;' ' '`" ;;
includepath="`echo ${1} | awk '{print substr($0,16)}' | tr ',;' ' '`" ;;
--library-path=*)
librarypath="`echo ${1:15} | tr ',;' ' '`" ;;
librarypath="`echo ${1} | awk '{print substr($0,16)}' | tr ',;' ' '`" ;;
--cflags=*)
cflags="${1:9}" ;;
cflags="`echo ${1} | awk '{print substr($0,10)}'`" ;;
--no-samples)
samples="" ;;
@ -151,6 +155,9 @@ while [ $# -ge 1 ]; do
--no-sharedlibs)
flags="$flags -DPOCO_NO_SHAREDLIBS" ;;
--no-ipv6)
flags="$flags -DPOCO_NET_NO_IPv6" ;;
--poquito)
flags="$flags -DPOCO_NO_FILECHANNEL -DPOCO_NO_SPLITTERCHANNEL -DPOCO_NO_SYSLOGCHANNEL -DPOCO_UTIL_NO_INIFILECONFIGURATION -DPOCO_UTIL_NO_XMLCONFIGURATION" ;;
@ -271,9 +278,11 @@ if [ -n "$linkmode" ] ; then
echo "export LINKMODE" >>$build/config.make
fi
cat <<__EOF__ >>$build/config.make
.PHONY: poco
poco: libexecs $tests $samples
# create config.make
echo '# config.build generated by configure script' >$build/config.build
cat <<__EOF__ >>$build/config.build
TESTS = $tests
SAMPLES = $samples
__EOF__
echo "Configured for $config"