mirror of
https://github.com/pocoproject/poco.git
synced 2025-02-20 22:31:23 +01:00
Merge pull request #917 from zosrothko/develop
additionnal fixes for the Cygwin platform
This commit is contained in:
commit
f6ab1fb925
@ -242,8 +242,8 @@
|
||||
#define POCO_COMPILER_CBUILDER
|
||||
#elif defined (__DMC__)
|
||||
#define POCO_COMPILER_DMARS
|
||||
#elif defined (__HP_aCC)
|
||||
#define POCO_COMPILER_HP_ACC
|
||||
#elif defined (__DECCXX)
|
||||
#define POCO_COMPILER_COMPAC
|
||||
#elif (defined (__xlc__) || defined (__xlC__)) && defined(__IBMCPP__)
|
||||
#define POCO_COMPILER_IBM_XLC // IBM XL C++
|
||||
#elif defined (__IBMCPP__) && defined(__COMPILER_VER__)
|
||||
|
@ -118,6 +118,12 @@ public:
|
||||
/// specified in a call to load() or the
|
||||
/// constructor.
|
||||
|
||||
static std::string prefix();
|
||||
/// Returns the platform-specific filename prefix
|
||||
/// for shared libraries.
|
||||
/// Most platforms would return an empty string, but
|
||||
/// on Cygwin, the "cyg" prefix will be returned.
|
||||
|
||||
static std::string suffix();
|
||||
/// Returns the platform-specific filename suffix
|
||||
/// for shared libraries (including the period).
|
||||
|
@ -38,6 +38,7 @@ protected:
|
||||
bool isLoadedImpl() const;
|
||||
void* findSymbolImpl(const std::string& name);
|
||||
const std::string& getPathImpl() const;
|
||||
static std::string prefixImpl();
|
||||
static std::string suffixImpl();
|
||||
|
||||
private:
|
||||
|
@ -43,6 +43,7 @@ protected:
|
||||
bool isLoadedImpl() const;
|
||||
void* findSymbolImpl(const std::string& name);
|
||||
const std::string& getPathImpl() const;
|
||||
static std::string prefixImpl();
|
||||
static std::string suffixImpl();
|
||||
|
||||
private:
|
||||
|
@ -37,6 +37,7 @@ protected:
|
||||
bool isLoadedImpl() const;
|
||||
void* findSymbolImpl(const std::string& name);
|
||||
const std::string& getPathImpl() const;
|
||||
static std::string prefixImpl();
|
||||
static std::string suffixImpl();
|
||||
|
||||
private:
|
||||
|
@ -38,6 +38,7 @@ protected:
|
||||
bool isLoadedImpl() const;
|
||||
void* findSymbolImpl(const std::string& name);
|
||||
const std::string& getPathImpl() const;
|
||||
static std::string prefixImpl();
|
||||
static std::string suffixImpl();
|
||||
|
||||
private:
|
||||
|
@ -37,6 +37,7 @@ protected:
|
||||
bool isLoadedImpl() const;
|
||||
void* findSymbolImpl(const std::string& name);
|
||||
const std::string& getPathImpl() const;
|
||||
static std::string prefixImpl();
|
||||
static std::string suffixImpl();
|
||||
|
||||
private:
|
||||
|
@ -37,6 +37,7 @@ protected:
|
||||
bool isLoadedImpl() const;
|
||||
void* findSymbolImpl(const std::string& name);
|
||||
const std::string& getPathImpl() const;
|
||||
static std::string prefixImpl();
|
||||
static std::string suffixImpl();
|
||||
|
||||
private:
|
||||
|
@ -104,6 +104,12 @@ const std::string& SharedLibrary::getPath() const
|
||||
}
|
||||
|
||||
|
||||
std::string SharedLibrary::prefix()
|
||||
{
|
||||
return prefixImpl();
|
||||
}
|
||||
|
||||
|
||||
std::string SharedLibrary::suffix()
|
||||
{
|
||||
return suffixImpl();
|
||||
|
@ -83,6 +83,12 @@ const std::string& SharedLibraryImpl::getPathImpl() const
|
||||
}
|
||||
|
||||
|
||||
std::string SharedLibraryImpl::prefixImpl()
|
||||
{
|
||||
return "";
|
||||
}
|
||||
|
||||
|
||||
std::string SharedLibraryImpl::suffixImpl()
|
||||
{
|
||||
#if defined(_DEBUG)
|
||||
|
@ -20,7 +20,7 @@
|
||||
|
||||
|
||||
// Note: cygwin is missing RTLD_LOCAL, set it to 0
|
||||
#if defined(__CYGWIN__) && !defined(RTLD_LOCAL)
|
||||
#if POCO_OS == POCO_OS_CYGWIN && !defined(RTLD_LOCAL)
|
||||
#define RTLD_LOCAL 0
|
||||
#endif
|
||||
|
||||
@ -99,21 +99,31 @@ const std::string& SharedLibraryImpl::getPathImpl() const
|
||||
}
|
||||
|
||||
|
||||
std::string SharedLibraryImpl::prefixImpl()
|
||||
{
|
||||
#if POCO_OS == POCO_OS_CYGWIN
|
||||
return "cyg";
|
||||
#else
|
||||
return "";
|
||||
#endif
|
||||
}
|
||||
|
||||
|
||||
std::string SharedLibraryImpl::suffixImpl()
|
||||
{
|
||||
#if defined(__APPLE__)
|
||||
#if POCO_OS == POCO_OS_MAC_OS_X
|
||||
#if defined(_DEBUG)
|
||||
return "d.dylib";
|
||||
#else
|
||||
return ".dylib";
|
||||
#endif
|
||||
#elif defined(hpux) || defined(_hpux)
|
||||
#elif POCO_OS == POCO_OS_HPUX
|
||||
#if defined(_DEBUG)
|
||||
return "d.sl";
|
||||
#else
|
||||
return ".sl";
|
||||
#endif
|
||||
#elif defined(__CYGWIN__)
|
||||
#elif POCO_OS == POCO_OS_CYGWIN
|
||||
#if defined(_DEBUG)
|
||||
return "d.dll";
|
||||
#else
|
||||
|
@ -106,6 +106,12 @@ const std::string& SharedLibraryImpl::getPathImpl() const
|
||||
}
|
||||
|
||||
|
||||
std::string SharedLibraryImpl::prefixImpl()
|
||||
{
|
||||
return "";
|
||||
}
|
||||
|
||||
|
||||
std::string SharedLibraryImpl::suffixImpl()
|
||||
{
|
||||
#if defined(_DEBUG)
|
||||
|
@ -128,6 +128,12 @@ const std::string& SharedLibraryImpl::getPathImpl() const
|
||||
}
|
||||
|
||||
|
||||
std::string SharedLibraryImpl::prefixImpl()
|
||||
{
|
||||
return "";
|
||||
}
|
||||
|
||||
|
||||
std::string SharedLibraryImpl::suffixImpl()
|
||||
{
|
||||
return ".out";
|
||||
|
@ -87,6 +87,12 @@ const std::string& SharedLibraryImpl::getPathImpl() const
|
||||
}
|
||||
|
||||
|
||||
std::string SharedLibraryImpl::prefixImpl()
|
||||
{
|
||||
return "";
|
||||
}
|
||||
|
||||
|
||||
std::string SharedLibraryImpl::suffixImpl()
|
||||
{
|
||||
#if defined(_DEBUG)
|
||||
|
@ -98,6 +98,12 @@ const std::string& SharedLibraryImpl::getPathImpl() const
|
||||
}
|
||||
|
||||
|
||||
std::string SharedLibraryImpl::prefixImpl()
|
||||
{
|
||||
return "";
|
||||
}
|
||||
|
||||
|
||||
std::string SharedLibraryImpl::suffixImpl()
|
||||
{
|
||||
#if defined(_DEBUG)
|
||||
|
@ -194,7 +194,7 @@ void CoreTest::testEnvironment()
|
||||
catch (Exception&)
|
||||
{
|
||||
}
|
||||
|
||||
std::cout << std::endl;
|
||||
std::cout << "OS Name: " << Environment::osName() << std::endl;
|
||||
std::cout << "OS Display Name: " << Environment::osDisplayName() << std::endl;
|
||||
std::cout << "OS Version: " << Environment::osVersion() << std::endl;
|
||||
|
@ -88,21 +88,27 @@ void FPETest::testFlags()
|
||||
volatile double b = 0;
|
||||
volatile double c = div(a, b);
|
||||
|
||||
#if !defined(POCO_NO_FPENVIRONMENT)
|
||||
assert (FPE::isFlag(FPE::FP_DIVIDE_BY_ZERO));
|
||||
#endif
|
||||
assert (FPE::isInfinite(c));
|
||||
|
||||
FPE::clearFlags();
|
||||
a = 1.23456789e210;
|
||||
b = 9.87654321e210;
|
||||
c = mult(a, b);
|
||||
#if !defined(POCO_NO_FPENVIRONMENT)
|
||||
assert (FPE::isFlag(FPE::FP_OVERFLOW));
|
||||
#endif
|
||||
assertEqualDelta(c, c, 0);
|
||||
|
||||
FPE::clearFlags();
|
||||
a = 1.23456789e-99;
|
||||
b = 9.87654321e210;
|
||||
c = div(a, b);
|
||||
#if !defined(POCO_NO_FPENVIRONMENT)
|
||||
assert (FPE::isFlag(FPE::FP_UNDERFLOW));
|
||||
#endif
|
||||
assertEqualDelta(c, c, 0);
|
||||
}
|
||||
|
||||
@ -118,7 +124,8 @@ void FPETest::testFlags()
|
||||
|
||||
void FPETest::testRound()
|
||||
{
|
||||
#if !defined(__osf__) && !defined(__VMS)
|
||||
#if !defined(__osf__) && !defined(__VMS) && !defined(POCO_NO_FPENVIRONMENT)
|
||||
|
||||
FPE::setRoundingMode(FPE::FP_ROUND_TONEAREST);
|
||||
assert (FPE::getRoundingMode() == FPE::FP_ROUND_TONEAREST);
|
||||
{
|
||||
|
@ -228,7 +228,11 @@ void FileTest::testFileAttributes2()
|
||||
void FileTest::testFileAttributes3()
|
||||
{
|
||||
#if defined(POCO_OS_FAMILY_UNIX)
|
||||
#if POCO_OS==POCO_OS_CYGWIN
|
||||
File f("/dev/tty");
|
||||
#else
|
||||
File f("/dev/console");
|
||||
#endif
|
||||
#elif defined(POCO_OS_FAMILY_WINDOWS) && !defined(_WIN32_WCE)
|
||||
File f("CON");
|
||||
#endif
|
||||
|
@ -89,8 +89,9 @@ CppUnit::Test* SharedMemoryTest::suite()
|
||||
{
|
||||
CppUnit::TestSuite* pSuite = new CppUnit::TestSuite("SharedMemoryTest");
|
||||
|
||||
#if !defined(POCO_NO_SHAREDMEMORY)
|
||||
CppUnit_addTest(pSuite, SharedMemoryTest, testCreate);
|
||||
CppUnit_addTest(pSuite, SharedMemoryTest, testCreateFromFile);
|
||||
|
||||
#endif
|
||||
return pSuite;
|
||||
}
|
||||
|
1
README
1
README
@ -153,6 +153,7 @@ message compiler may fail when building the Foundation library.
|
||||
|
||||
|
||||
BUILDING FOR WINDOWS CE
|
||||
=======================
|
||||
|
||||
Building for Windows CE is supported with Microsoft Visual Studio 2008.
|
||||
Unless you have the Digi JumpStart Windows CE 6.0 SDK installed, you'll
|
||||
|
@ -1,7 +1,7 @@
|
||||
#
|
||||
# $Id$
|
||||
#
|
||||
# CYGWIN
|
||||
# Cygwin
|
||||
#
|
||||
# Make settings for Cygwin on WinXP/gcc 3.4
|
||||
#
|
||||
@ -42,7 +42,7 @@ SHAREDLIBLINKEXT = .dll
|
||||
CFLAGS =
|
||||
CFLAGS32 =
|
||||
CFLAGS64 =
|
||||
CXXFLAGS = -DPOCO_NO_FPENVIRONMENT -DPOCO_NO_WSTRING -DPOCO_NO_SHAREDMEMORY -Wa,-mbig-obj
|
||||
CXXFLAGS = -DPOCO_NO_FPENVIRONMENT -DPOCO_NO_WSTRING -Wa,-mbig-obj
|
||||
CXXFLAGS32 =
|
||||
CXXFLAGS64 =
|
||||
LINKFLAGS =
|
@ -33,35 +33,35 @@ $(OBJPATH_RELEASE_STATIC) $(OBJPATH_DEBUG_STATIC) $(OBJPATH_RELEASE_SHARED) $(OB
|
||||
#
|
||||
# Rules for compiling
|
||||
#
|
||||
$(OBJPATH_DEBUG_STATIC)/%.o: $(SRCDIR)/%.cpp $(DEPPATH)/%.d
|
||||
$(OBJPATH_DEBUG_STATIC)/%.o: $(SRCDIR)/%.cpp $(DEPPATH)/%.d $(POCO_BASE)/build/config/$(POCO_CONFIG)
|
||||
@echo "** Compiling" $< "(debug, static)"
|
||||
$(CXX) $(INCLUDE) $(CXXFLAGS) $(DEBUGOPT_CXX) $(STATICOPT_CXX) -c $< -o $@
|
||||
|
||||
$(OBJPATH_RELEASE_STATIC)/%.o: $(SRCDIR)/%.cpp $(DEPPATH)/%.d
|
||||
|
||||
$(OBJPATH_RELEASE_STATIC)/%.o: $(SRCDIR)/%.cpp $(DEPPATH)/%.d $(POCO_BASE)/build/config/$(POCO_CONFIG)
|
||||
@echo "** Compiling" $< "(release, static)"
|
||||
$(CXX) $(INCLUDE) $(CXXFLAGS) $(RELEASEOPT_CXX) $(STATICOPT_CXX) -c $< -o $@
|
||||
|
||||
$(OBJPATH_DEBUG_STATIC)/%.o: $(SRCDIR)/%.c $(DEPPATH)/%.d
|
||||
$(OBJPATH_DEBUG_STATIC)/%.o: $(SRCDIR)/%.c $(DEPPATH)/%.d $(POCO_BASE)/build/config/$(POCO_CONFIG)
|
||||
@echo "** Compiling" $< "(debug, static)"
|
||||
$(CC) $(INCLUDE) $(CFLAGS) $(DEBUGOPT_CC) $(STATICOPT_CC) -c $< -o $@
|
||||
|
||||
$(OBJPATH_RELEASE_STATIC)/%.o: $(SRCDIR)/%.c $(DEPPATH)/%.d
|
||||
$(OBJPATH_RELEASE_STATIC)/%.o: $(SRCDIR)/%.c $(DEPPATH)/%.d $(POCO_BASE)/build/config/$(POCO_CONFIG)
|
||||
@echo "** Compiling" $< "(release, static)"
|
||||
$(CC) $(INCLUDE) $(CFLAGS) $(RELEASEOPT_CC) $(STATICOPT_CC) -c $< -o $@
|
||||
|
||||
$(OBJPATH_DEBUG_SHARED)/%.o: $(SRCDIR)/%.cpp $(DEPPATH)/%.d
|
||||
$(OBJPATH_DEBUG_SHARED)/%.o: $(SRCDIR)/%.cpp $(DEPPATH)/%.d $(POCO_BASE)/build/config/$(POCO_CONFIG)
|
||||
@echo "** Compiling" $< "(debug, shared)"
|
||||
$(CXX) $(INCLUDE) $(CXXFLAGS) $(DEBUGOPT_CXX) $(SHAREDOPT_CXX) -c $< -o $@
|
||||
|
||||
$(OBJPATH_RELEASE_SHARED)/%.o: $(SRCDIR)/%.cpp $(DEPPATH)/%.d
|
||||
$(OBJPATH_RELEASE_SHARED)/%.o: $(SRCDIR)/%.cpp $(DEPPATH)/%.d $(POCO_BASE)/build/config/$(POCO_CONFIG)
|
||||
@echo "** Compiling" $< "(release, shared)"
|
||||
$(CXX) $(INCLUDE) $(CXXFLAGS) $(RELEASEOPT_CXX) $(SHAREDOPT_CXX) -c $< -o $@
|
||||
|
||||
$(OBJPATH_DEBUG_SHARED)/%.o: $(SRCDIR)/%.c $(DEPPATH)/%.d
|
||||
$(OBJPATH_DEBUG_SHARED)/%.o: $(SRCDIR)/%.c $(DEPPATH)/%.d $(POCO_BASE)/build/config/$(POCO_CONFIG)
|
||||
@echo "** Compiling" $< "(debug, shared)"
|
||||
$(CC) $(INCLUDE) $(CFLAGS) $(DEBUGOPT_CC) $(SHAREDOPT_CC) -c $< -o $@
|
||||
|
||||
$(OBJPATH_RELEASE_SHARED)/%.o: $(SRCDIR)/%.c $(DEPPATH)/%.d
|
||||
$(OBJPATH_RELEASE_SHARED)/%.o: $(SRCDIR)/%.c $(DEPPATH)/%.d $(POCO_BASE)/build/config/$(POCO_CONFIG)
|
||||
@echo "** Compiling" $< "(release, shared)"
|
||||
$(CC) $(INCLUDE) $(CFLAGS) $(RELEASEOPT_CC) $(SHAREDOPT_CC) -c $< -o $@
|
||||
|
||||
|
@ -68,7 +68,10 @@ endif
|
||||
#
|
||||
POCO_HOST_OSNAME = $(shell uname)
|
||||
ifeq ($(findstring CYGWIN,$(POCO_HOST_OSNAME)),CYGWIN)
|
||||
POCO_HOST_OSNAME = CYGWIN
|
||||
ifeq ($(findstring x86_64,$(POCO_HOST_OSNAME)),x86_64)
|
||||
OSARCH_64BITS = 1
|
||||
endif
|
||||
POCO_HOST_OSNAME = Cygwin
|
||||
endif
|
||||
|
||||
ifeq ($(findstring MINGW,$(POCO_HOST_OSNAME)),MINGW)
|
||||
|
@ -4,17 +4,42 @@
|
||||
#
|
||||
# A script for running the POCO testsuites.
|
||||
#
|
||||
# usage: runtests
|
||||
# usage: runtests [component [test] ]
|
||||
#
|
||||
# If the environment variable EXCLUDE_TESTS is set, containing
|
||||
# a space-separated list of project names (as found in the
|
||||
# components file), these tests will be skipped.
|
||||
#
|
||||
# Cygwin specific setup.
|
||||
# ----------------------
|
||||
# On Cygwin, Unix IPC are provided by a separate process daemon
|
||||
# named cygserver, which should be started once before running any
|
||||
# test from Foundation.
|
||||
# 1/ Open a separate Cygwin terminal with Administrator privilege
|
||||
# 2/ run the command: cygserver-configure
|
||||
# 3/ Start the cygserver: nohup /usr/sbin/cygserver &
|
||||
# 4/ close the separate terminal
|
||||
# 5/ run the Foundation tests: build/script/runtests.sh Foundation
|
||||
#
|
||||
|
||||
if [ "$POCO_BASE" = "" ] ; then
|
||||
POCO_BASE=`pwd`
|
||||
fi
|
||||
|
||||
TESTRUNNER=./testrunner
|
||||
TESTRUNNERARGS=-all
|
||||
|
||||
components=`cat $POCO_BASE/components`
|
||||
if [ "$1" = "" ] ; then
|
||||
components=`cat $POCO_BASE/components`
|
||||
else
|
||||
components=$1
|
||||
fi
|
||||
|
||||
if [ "$2" = "" ] ; then
|
||||
TESTRUNNERARGS=-all
|
||||
else
|
||||
TESTRUNNERARGS=$2
|
||||
fi
|
||||
|
||||
|
||||
if [ "$OSNAME" = "" ] ; then
|
||||
OSNAME=`uname`
|
||||
|
Loading…
x
Reference in New Issue
Block a user