mirror of
https://github.com/pocoproject/poco.git
synced 2025-04-18 07:32:18 +02:00
Merge remote-tracking branch 'pocoproject/develop' into MySQLOnTravisAndAppVeyor
This commit is contained in:
commit
dd936bea53
@ -169,6 +169,8 @@ add_subdirectory(Net)
|
||||
list(APPEND Poco_COMPONENTS "Net")
|
||||
endif()
|
||||
|
||||
# Pthreads/threads support
|
||||
find_package(Threads REQUIRED)
|
||||
|
||||
#NetSSL
|
||||
|
||||
|
@ -190,7 +190,7 @@ public:
|
||||
std::string toString()
|
||||
{
|
||||
std::string str;
|
||||
Var(*this).convert<std::string>(str);
|
||||
Var(*this).template convert<std::string>(str);
|
||||
return str;
|
||||
}
|
||||
|
||||
|
@ -139,7 +139,6 @@ inline bool VarIterator::operator != (const VarIterator& other) const
|
||||
|
||||
namespace std
|
||||
{
|
||||
using std::swap;
|
||||
template<>
|
||||
inline void swap<Poco::Dynamic::VarIterator>(Poco::Dynamic::VarIterator& s1,
|
||||
Poco::Dynamic::VarIterator& s2)
|
||||
|
@ -75,37 +75,61 @@ private:
|
||||
//
|
||||
inline bool FPEnvironmentImpl::isInfiniteImpl(float value)
|
||||
{
|
||||
#if POCO_OS == POCO_OS_AIX
|
||||
return ::isinf(value) != 0;
|
||||
#else
|
||||
return std::isinf(value) != 0;
|
||||
#endif
|
||||
}
|
||||
|
||||
|
||||
inline bool FPEnvironmentImpl::isInfiniteImpl(double value)
|
||||
{
|
||||
#if POCO_OS == POCO_OS_AIX
|
||||
return ::isinf(value) != 0;
|
||||
#else
|
||||
return std::isinf(value) != 0;
|
||||
#endif
|
||||
}
|
||||
|
||||
|
||||
inline bool FPEnvironmentImpl::isInfiniteImpl(long double value)
|
||||
{
|
||||
#if POCO_OS == POCO_OS_AIX
|
||||
return ::isinf((double) value) != 0;
|
||||
#else
|
||||
return std::isinf((double) value) != 0;
|
||||
#endif
|
||||
}
|
||||
|
||||
|
||||
inline bool FPEnvironmentImpl::isNaNImpl(float value)
|
||||
{
|
||||
#if POCO_OS == POCO_OS_AIX
|
||||
return ::isnan(value) != 0;
|
||||
#else
|
||||
return std::isnan(value) != 0;
|
||||
#endif
|
||||
}
|
||||
|
||||
|
||||
inline bool FPEnvironmentImpl::isNaNImpl(double value)
|
||||
{
|
||||
#if POCO_OS == POCO_OS_AIX
|
||||
return ::isnan(value) != 0;
|
||||
#else
|
||||
return std::isnan(value) != 0;
|
||||
#endif
|
||||
}
|
||||
|
||||
|
||||
inline bool FPEnvironmentImpl::isNaNImpl(long double value)
|
||||
{
|
||||
#if POCO_OS == POCO_OS_AIX
|
||||
return ::isnan((double) value) != 0;
|
||||
#else
|
||||
return std::isnan((double) value) != 0;
|
||||
#endif
|
||||
}
|
||||
|
||||
|
||||
|
@ -419,7 +419,7 @@ FileImpl::FileSizeImpl FileImpl::totalSpaceImpl() const
|
||||
poco_assert(!_path.empty());
|
||||
|
||||
struct statfs stats;
|
||||
if (statfs(_path.c_str(), &stats) != 0)
|
||||
if (statfs(const_cast<char*>(_path.c_str()), &stats) != 0)
|
||||
handleLastErrorImpl(_path);
|
||||
|
||||
return (FileSizeImpl)stats.f_blocks * (FileSizeImpl)stats.f_bsize;
|
||||
@ -431,7 +431,7 @@ FileImpl::FileSizeImpl FileImpl::usableSpaceImpl() const
|
||||
poco_assert(!_path.empty());
|
||||
|
||||
struct statfs stats;
|
||||
if (statfs(_path.c_str(), &stats) != 0)
|
||||
if (statfs(const_cast<char*>(_path.c_str()), &stats) != 0)
|
||||
handleLastErrorImpl(_path);
|
||||
|
||||
return (FileSizeImpl)stats.f_bavail * (FileSizeImpl)stats.f_bsize;
|
||||
@ -443,7 +443,7 @@ FileImpl::FileSizeImpl FileImpl::freeSpaceImpl() const
|
||||
poco_assert(!_path.empty());
|
||||
|
||||
struct statfs stats;
|
||||
if (statfs(_path.c_str(), &stats) != 0)
|
||||
if (statfs(const_cast<char*>(_path.c_str()), &stats) != 0)
|
||||
handleLastErrorImpl(_path);
|
||||
|
||||
return (FileSizeImpl)stats.f_bfree * (FileSizeImpl)stats.f_bsize;
|
||||
|
@ -10,7 +10,7 @@ set_target_properties( "${POCO_EXENAME}"
|
||||
OUTPUT_NAME cpspc
|
||||
)
|
||||
|
||||
target_link_libraries( "${POCO_EXENAME}" Net Util XML JSON Foundation)
|
||||
target_link_libraries( "${POCO_EXENAME}" ${CMAKE_THREAD_LIBS_INIT} Net Util XML JSON Foundation)
|
||||
|
||||
install(
|
||||
TARGETS "${POCO_EXENAME}" EXPORT "${POCO_EXENAME}Targets"
|
||||
@ -22,4 +22,4 @@ install(
|
||||
if (ENABLE_SAMPLES)
|
||||
# add_subdirectory(samples)
|
||||
endif ()
|
||||
|
||||
|
||||
|
@ -10,7 +10,7 @@ set_target_properties( "${POCO_EXENAME}"
|
||||
OUTPUT_NAME f2cpsp
|
||||
)
|
||||
|
||||
target_link_libraries( "${POCO_EXENAME}" Net Util XML JSON Foundation)
|
||||
target_link_libraries( "${POCO_EXENAME}" ${CMAKE_THREAD_LIBS_INIT} Net Util XML JSON Foundation)
|
||||
|
||||
install(
|
||||
TARGETS "${POCO_EXENAME}" EXPORT "${POCO_EXENAME}Targets"
|
||||
|
@ -88,10 +88,12 @@ else (CYGWIN)
|
||||
if (QNX)
|
||||
add_definitions( -DPOCO_HAVE_FD_POLL)
|
||||
set(SYSLIBS m socket)
|
||||
else (QNX)
|
||||
elseif(${CMAKE_SYSTEM} MATCHES "AIX")
|
||||
add_definitions(-D__IBMCPP_TR1__)
|
||||
else ()
|
||||
add_definitions( -D_XOPEN_SOURCE=500 -DPOCO_HAVE_FD_EPOLL)
|
||||
set(SYSLIBS pthread dl rt)
|
||||
endif (QNX)
|
||||
endif ()
|
||||
endif (APPLE)
|
||||
endif(UNIX AND NOT ANDROID )
|
||||
endif (CYGWIN)
|
||||
@ -121,3 +123,9 @@ endif(IOS)
|
||||
if (ANDROID)
|
||||
add_definitions( -DPOCO_ANDROID -DPOCO_NO_FPENVIRONMENT -DPOCO_NO_WSTRING -DPOCO_NO_SHAREDMEMORY )
|
||||
endif(ANDROID)
|
||||
|
||||
# IBM XLC for AIX
|
||||
if ((${CMAKE_CXX_COMPILER_ID} MATCHES "XL") AND (${CMAKE_SYSTEM} MATCHES "AIX"))
|
||||
set(WARNINGS_FLAGS "-qsuppress=1540-0198 -qsuppress=1540-1628 -qsuppress=1540-0095 -qsuppress=1500-030")
|
||||
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -qlanglvl=extended0x -qlanglvl=noconstexpr -qlanglvl=newexcp ${WARNINGS_FLAGS}")
|
||||
endif()
|
||||
|
Loading…
x
Reference in New Issue
Block a user