GH #341: Compiling poco-1.5.2 for Cygwin

This commit is contained in:
Alex Fabijanic
2014-04-29 23:06:01 -05:00
parent 794ee36b3d
commit ba3a8b08c5
4 changed files with 11 additions and 19 deletions

View File

@@ -59,6 +59,7 @@ Release 1.5.3 (2014-05-xx)
- fixed GH #314: JSON parsing bug - fixed GH #314: JSON parsing bug
- added GH #313: MetaColumn additions for Data::ODBC and Data::SQLite - added GH #313: MetaColumn additions for Data::ODBC and Data::SQLite
- fixed GH #346: Make Poco::Data::Date and Poco::Data::Time compare functions const. - fixed GH #346: Make Poco::Data::Date and Poco::Data::Time compare functions const.
- fixed GH #341: Compiling poco-1.5.2 for Cygwin
Release 1.5.2 (2013-09-16) Release 1.5.2 (2013-09-16)
========================== ==========================

View File

@@ -37,21 +37,14 @@ ifeq ($(POCO_CONFIG),MinGW)
# -DNOMINMAX : MIN/MAX macros defined in windows conflict with libstdc++ # -DNOMINMAX : MIN/MAX macros defined in windows conflict with libstdc++
CXXFLAGS += -DODBCVER=0x0300 -DNOMINMAX CXXFLAGS += -DODBCVER=0x0300 -DNOMINMAX
##
## Cygwin
##
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
SYSLIBS += -L/lib/w32api -lodbc32 -lodbccp32
## ##
## unixODBC ## unixODBC
## ##
else ifeq (0, $(shell test -e $(POCO_ODBC_LIB)/libodbc$(LIBLINKEXT); echo $$?)) else ifeq (0, $(shell test -e $(POCO_ODBC_LIB)/libodbc$(LIBLINKEXT); echo $$?))
SYSLIBS += -lodbc -lodbcinst SYSLIBS += -lodbc
ifeq (0, $(shell test -e $(POCO_ODBC_LIB)/libodbcinst$(LIBLINKEXT); echo $$?))
SYSLIBS += -lodbcinst
endif
COMMONFLAGS += -DPOCO_UNIXODBC COMMONFLAGS += -DPOCO_UNIXODBC
## ##

View File

@@ -46,7 +46,9 @@ using Poco::Net::Socket;
using Poco::Net::DatagramSocket; using Poco::Net::DatagramSocket;
using Poco::Net::SocketAddress; using Poco::Net::SocketAddress;
using Poco::Net::IPAddress; using Poco::Net::IPAddress;
using Poco::Net::NetworkInterface; #ifdef POCO_NET_HAS_INTERFACE
using Poco::Net::NetworkInterface;
#endif
using Poco::Timespan; using Poco::Timespan;
using Poco::Stopwatch; using Poco::Stopwatch;
using Poco::TimeoutException; using Poco::TimeoutException;
@@ -101,11 +103,11 @@ void DatagramSocketTest::testBroadcast()
UDPEchoServer echoServer; UDPEchoServer echoServer;
DatagramSocket ss(IPAddress::IPv4); DatagramSocket ss(IPAddress::IPv4);
#if (POCO_OS != POCO_OS_FREE_BSD) #if defined(POCO_NET_HAS_INTERFACE) && (POCO_OS == POCO_OS_FREE_BSD)
SocketAddress sa("255.255.255.255", echoServer.port());
#else
NetworkInterface ni = NetworkInterface::forName("em0"); NetworkInterface ni = NetworkInterface::forName("em0");
SocketAddress sa(ni.broadcastAddress(1), echoServer.port()); SocketAddress sa(ni.broadcastAddress(1), echoServer.port());
#else
SocketAddress sa("255.255.255.255", echoServer.port());
#endif #endif
// not all socket implementations fail if broadcast option is not set // not all socket implementations fail if broadcast option is not set
/* /*

View File

@@ -9,15 +9,11 @@
# #
# Target names # Target names
# #
ifeq ($(OSNAME),CYGWIN)
SHL_EXT = $(SHAREDLIBLINKEXT)
else
ifdef target_version ifdef target_version
SHL_EXT = $(SHAREDLIBEXT) SHL_EXT = $(SHAREDLIBEXT)
else else
SHL_EXT = $(SHAREDLIBLINKEXT) SHL_EXT = $(SHAREDLIBLINKEXT)
endif endif
endif
LIB_RELEASE_STATIC = $(LIBPATH)/$(LIBPREFIX)$(target)$(OSARCH_POSTFIX).a LIB_RELEASE_STATIC = $(LIBPATH)/$(LIBPREFIX)$(target)$(OSARCH_POSTFIX).a
LIB_DEBUG_STATIC = $(LIBPATH)/$(LIBPREFIX)$(target)d$(OSARCH_POSTFIX).a LIB_DEBUG_STATIC = $(LIBPATH)/$(LIBPREFIX)$(target)d$(OSARCH_POSTFIX).a