mirror of
https://github.com/pocoproject/poco.git
synced 2025-03-04 19:13:30 +01:00
Merge branch 'poco-1.10.1'
This commit is contained in:
commit
3fc3e5f5b8
222
.travis.yml
222
.travis.yml
@ -3,18 +3,9 @@ language: cpp
|
||||
cache:
|
||||
- apt
|
||||
|
||||
before_install:
|
||||
# we need a recent version of CMake
|
||||
# linux prereqisite packages
|
||||
- if [ "$TRAVIS_OS_NAME" == "linux" ]; then wget --no-check-certificate https://www.cmake.org/files/v3.5/cmake-3.5.1-Linux-x86_64.tar.gz; fi
|
||||
- if [ "$TRAVIS_OS_NAME" == "linux" ]; then tar -xzvf cmake-3.5.1-Linux-x86_64.tar.gz; fi
|
||||
- if [ "$TRAVIS_OS_NAME" == "linux" ]; then export PATH=$PWD/cmake-3.5.1-Linux-x86_64/bin:$PATH; fi
|
||||
- if [ "$TRAVIS_OS_NAME" == "linux" ]; then sudo apt-get update -qq; fi
|
||||
- if [ "$TRAVIS_OS_NAME" == "linux" ]; then sudo apt-get install -qq -y libssl-dev unixodbc-dev libmysqlclient-dev g++-arm-linux-gnueabi g++-arm-linux-gnueabihf clang-3.5 libc++-dev ninja-build sloccount cppcheck; fi
|
||||
|
||||
services:
|
||||
- mongodb
|
||||
- redis-server
|
||||
- redis
|
||||
- postgresql
|
||||
- mysql
|
||||
|
||||
@ -28,15 +19,12 @@ notifications:
|
||||
slack:
|
||||
secure: "EKysuMlTU3Uv5XFX+zuwHK/ej4wtD8+UjO5xvchCFMkRgM0V3rERVT1rV6NocNBH4hjTcvue9DEKdWAtqdDh06vTOHGKdnZ/e204jA38HfcIA0SPVbQXzjckQXALvKl51OPOmGuI7Feo4wyohzUyGoDLo1bom02xqDfC3caQB5Q="
|
||||
|
||||
env:
|
||||
global: TEST_NAME=""
|
||||
|
||||
before_script:
|
||||
- echo ${TEST_NAME}
|
||||
|
||||
matrix:
|
||||
jobs:
|
||||
include:
|
||||
- env: TEST_NAME="android API level 19"
|
||||
- name: Android (API level 19)
|
||||
os: linux
|
||||
dist: bionic
|
||||
arch: amd64
|
||||
addons:
|
||||
apt:
|
||||
packages:
|
||||
@ -65,7 +53,10 @@ matrix:
|
||||
/opt/android-sdk/cmake/3.10.2.4988404/bin/cmake --build cmake-build --target all #&&
|
||||
#cd cmake-build && travis_wait 30 /opt/android-sdk/cmake/3.10.2.4988404/bin/ctest -E Foundation --output-on-failure FIXME Android emulator hangs
|
||||
|
||||
- env: TEST_NAME="android API level 24 arm64-v8a"
|
||||
- name: Android (API level 24 arm64-v8a)
|
||||
os: linux
|
||||
dist: bionic
|
||||
arch: amd64
|
||||
addons:
|
||||
apt:
|
||||
packages:
|
||||
@ -94,50 +85,164 @@ matrix:
|
||||
/opt/android-sdk/cmake/3.10.2.4988404/bin/cmake --build cmake-build --target all #&&
|
||||
#cd cmake-build && travis_wait 30 /opt/android-sdk/cmake/3.10.2.4988404/bin/ctest -E Foundation --output-on-failure FIXME Android emulator hangs
|
||||
|
||||
- env: TEST_NAME="clang (make)"
|
||||
- name: Linux (clang, make)
|
||||
os: linux
|
||||
dist: bionic
|
||||
arch: amd64
|
||||
addons:
|
||||
apt:
|
||||
packages:
|
||||
- libssl-dev
|
||||
- unixodbc-dev
|
||||
- libmysqlclient-dev
|
||||
compiler: clang
|
||||
script:
|
||||
- ./configure --everything --omit=PDF --config=Linux-clang && make all -s -j2 && sudo make install
|
||||
- sudo -s ./travis/runtests.sh
|
||||
|
||||
# - env: TEST_NAME="arm-linux-gnueabi- (make)"
|
||||
# script:
|
||||
# - ./configure --omit=PDF,Data/ODBC,Data/MySQL,Crypto,NetSSL,PageCompiler && make all -s -j2 CROSS_COMPILE=arm-linux-gnueabi- POCO_TARGET_OSARCH=armv7l
|
||||
|
||||
- env: TEST_NAME="gcc-5.4.0 (CMake)"
|
||||
- name: Linux (gcc, make)
|
||||
os: linux
|
||||
dist: bionic
|
||||
arch: amd64
|
||||
addons:
|
||||
apt:
|
||||
packages:
|
||||
- libssl-dev
|
||||
- unixodbc-dev
|
||||
- libmysqlclient-dev
|
||||
compiler: gcc
|
||||
script:
|
||||
- cmake -H. -Bcmake-build -GNinja -DENABLE_PDF=OFF -DENABLE_TESTS=ON && cmake --build cmake-build --target all && cd cmake-build && sudo -s PWD=`pwd` PATH=$PWD/cmake-3.5.1-Linux-x86_64/bin:$PATH ctest --output-on-failure -E "(DataMySQL)|(DataODBC)"
|
||||
- ./configure --everything --omit=PDF && make all -s -j2 && sudo make install
|
||||
- sudo -s ./travis/runtests.sh
|
||||
|
||||
- env: TEST_NAME="clang (CMake)"
|
||||
compiler: clang
|
||||
- name: Linux (gcc, make, arm64)
|
||||
os: linux
|
||||
dist: bionic
|
||||
arch: arm64
|
||||
addons:
|
||||
apt:
|
||||
packages:
|
||||
- libssl-dev
|
||||
compiler: gcc
|
||||
script:
|
||||
- cmake -H. -Bcmake-build -GNinja -DENABLE_PDF=OFF -DENABLE_TESTS=ON && cmake --build cmake-build --target all && cd cmake-build && sudo -s PWD=`pwd` PATH=$PWD/cmake-3.5.1-Linux-x86_64/bin:$PATH ctest --output-on-failure -E "(DataMySQL)|(DataODBC)"
|
||||
# skip some libs due to build timeout
|
||||
- ./configure --everything --omit=PDF,Data/MySQL,Data/ODBC,Data/PostgreSQL,MongoDB,Redis && make all -s -j2 && sudo make install
|
||||
- sudo -s ./travis/runtests.sh
|
||||
|
||||
- env: TEST_NAME="arm-linux-gnueabi-g++ (CMake)"
|
||||
- name: Linux (gcc, make, ppc64le)
|
||||
os: linux
|
||||
dist: bionic
|
||||
arch: ppc64le
|
||||
addons:
|
||||
apt:
|
||||
packages:
|
||||
- libssl-dev
|
||||
- libmysqlclient-dev
|
||||
compiler: gcc
|
||||
script:
|
||||
- ./configure --everything --omit=PDF,Data/ODBC,Data/PostgreSQL,Redis && make all -s -j2 && sudo make install
|
||||
- sudo -s ./travis/runtests.sh
|
||||
|
||||
- name: Linux (gcc, make, s390x)
|
||||
os: linux
|
||||
dist: bionic
|
||||
arch: s390x
|
||||
addons:
|
||||
apt:
|
||||
packages:
|
||||
- libssl-dev
|
||||
- unixodbc-dev
|
||||
- libmysqlclient-dev
|
||||
compiler: gcc
|
||||
script:
|
||||
- ./configure --everything --omit=PDF,Redis && make all -s -j2 && sudo make install
|
||||
- sudo -s ./travis/runtests.sh
|
||||
|
||||
- name: macOS (clang, make)
|
||||
os: osx
|
||||
osx_image: xcode11.3
|
||||
addons:
|
||||
homebrew:
|
||||
packages:
|
||||
- openssl
|
||||
script:
|
||||
- ./configure --everything --no-prefix --omit=PDF,Data/MySQL,Data/ODBC,Data/PostgreSQL,Redis && make all -s -j2 && sudo make install
|
||||
# ignore test results for now as timing-sensitive tests fail randomly
|
||||
- sudo -s ./travis/runtests.sh || true
|
||||
|
||||
- name: Linux (gcc, cmake)
|
||||
os: linux
|
||||
dist: bionic
|
||||
arch: amd64
|
||||
compiler: gcc
|
||||
addons:
|
||||
apt:
|
||||
packages:
|
||||
- cmake
|
||||
- ninja-build
|
||||
- libssl-dev
|
||||
- unixodbc-dev
|
||||
- libmysqlclient-dev
|
||||
script:
|
||||
- cmake -H. -Bcmake-build -GNinja -DENABLE_PDF=OFF -DENABLE_TESTS=ON && cmake --build cmake-build --target all && cd cmake-build && sudo -s PWD=`pwd` ctest --output-on-failure -E "(DataMySQL)|(DataODBC)"
|
||||
|
||||
- name: Linux (clang, cmake)
|
||||
os: linux
|
||||
dist: bionic
|
||||
arch: amd64
|
||||
compiler: clang
|
||||
addons:
|
||||
apt:
|
||||
packages:
|
||||
- cmake
|
||||
- ninja-build
|
||||
- libssl-dev
|
||||
- unixodbc-dev
|
||||
- libmysqlclient-dev
|
||||
script:
|
||||
- cmake -H. -Bcmake-build -GNinja -DENABLE_PDF=OFF -DENABLE_TESTS=ON && cmake --build cmake-build --target all && cd cmake-build && sudo -s PWD=`pwd` ctest --output-on-failure -E "(DataMySQL)|(DataODBC)"
|
||||
|
||||
- name: Linux cross (arm-linux-gnueabi-g++, cmake)
|
||||
os: linux
|
||||
dist: bionic
|
||||
arch: amd64
|
||||
addons:
|
||||
apt:
|
||||
packages:
|
||||
- cmake
|
||||
- ninja-build
|
||||
- libssl-dev
|
||||
- unixodbc-dev
|
||||
- libmysqlclient-dev
|
||||
- g++-arm-linux-gnueabi
|
||||
script:
|
||||
- export CC="arm-linux-gnueabi-gcc"
|
||||
- export CXX="arm-linux-gnueabi-g++"
|
||||
- cmake -H. -Bcmake-build -GNinja -DENABLE_PDF=OFF -DENABLE_NETSSL=OFF -DENABLE_CRYPTO=OFF -DENABLE_JWT=OFF -DENABLE_TESTS=ON && cmake --build cmake-build --target all
|
||||
|
||||
- env: TEST_NAME="arm-linux-gnueabihf-g++ (CMake)"
|
||||
- name: Linux cross (arm-linux-gnueabihf-g++, cmake)
|
||||
os: linux
|
||||
dist: bionic
|
||||
arch: amd64
|
||||
addons:
|
||||
apt:
|
||||
packages:
|
||||
- cmake
|
||||
- ninja-build
|
||||
- libssl-dev
|
||||
- unixodbc-dev
|
||||
- libmysqlclient-dev
|
||||
- g++-arm-linux-gnueabihf
|
||||
script:
|
||||
- export CC="arm-linux-gnueabihf-gcc"
|
||||
- export CXX="arm-linux-gnueabihf-g++"
|
||||
- cmake -H. -Bcmake-build -GNinja -DENABLE_PDF=OFF -DENABLE_NETSSL=OFF -DENABLE_CRYPTO=OFF -DENABLE_JWT=OFF -DENABLE_TESTS=ON && cmake --build cmake-build --target all
|
||||
|
||||
# TODO osx build
|
||||
# TODO run test suite
|
||||
# script:
|
||||
# - ./configure && make all -s -j2
|
||||
# - sudo ifconfig -a
|
||||
# - sudo ifconfig venet0 multicast
|
||||
# - sudo ifconfig -a
|
||||
# - export POCO_BASE=`pwd`
|
||||
# - sudo -E build/script/runtests.sh
|
||||
|
||||
# build documentation and release
|
||||
- env: TEST_NAME="documentation & release"
|
||||
- name: Documentation & Release
|
||||
os: linux
|
||||
dist: bionic
|
||||
arch: amd64
|
||||
compiler: clang
|
||||
script:
|
||||
- . env.sh && mkdoc all && mkrel all
|
||||
@ -145,21 +250,44 @@ matrix:
|
||||
|
||||
# QA jobs for code analytics and metrics
|
||||
# static code analysis with cppcheck (we can add --enable=all later)
|
||||
- env: TEST_NAME="cppcheck"
|
||||
- name: CppCheck
|
||||
os: linux
|
||||
dist: bionic
|
||||
arch: amd64
|
||||
addons:
|
||||
apt:
|
||||
packages:
|
||||
- cppcheck
|
||||
script: cppcheck --force --quiet --inline-suppr -j2 -iData/SQLite/src/sqlite3.c .
|
||||
|
||||
# search for TODO within source tree
|
||||
- env: TEST_NAME="TODO"
|
||||
- name: TODO
|
||||
os: linux
|
||||
dist: bionic
|
||||
arch: amd64
|
||||
script: grep -r TODO *
|
||||
|
||||
# search for FIXME within source tree
|
||||
- env: TEST_NAME="FIXME"
|
||||
- name: FIXME
|
||||
os: linux
|
||||
dist: bionic
|
||||
arch: amd64
|
||||
script: grep -r FIXME *
|
||||
|
||||
# search for HACK within source tree
|
||||
- env: TEST_NAME="HACK"
|
||||
- name: HACK
|
||||
os: linux
|
||||
dist: bionic
|
||||
arch: amd64
|
||||
script: grep -r HACK *
|
||||
|
||||
# some statistics about the code base
|
||||
- env: TEST_NAME="sloccount"
|
||||
- name: Sloccount
|
||||
os: linux
|
||||
dist: bionic
|
||||
arch: amd64
|
||||
addons:
|
||||
apt:
|
||||
packages:
|
||||
- sloccount
|
||||
script: sloccount .
|
||||
|
@ -1,26 +1,26 @@
|
||||
# Sources
|
||||
file(GLOB SRCS_G "src/*.cpp")
|
||||
POCO_SOURCES_AUTO( SRCS ${SRCS_G})
|
||||
POCO_SOURCES_AUTO(SRCS ${SRCS_G})
|
||||
|
||||
# Headers
|
||||
file(GLOB_RECURSE HDRS_G "include/*.h" )
|
||||
POCO_HEADERS_AUTO( SRCS ${HDRS_G})
|
||||
file(GLOB_RECURSE HDRS_G "include/*.h")
|
||||
POCO_HEADERS_AUTO(SRCS ${HDRS_G})
|
||||
|
||||
add_library(mod_poco SHARED ${SRCS})
|
||||
set_target_properties(mod_poco
|
||||
PROPERTIES
|
||||
VERSION ${SHARED_LIBRARY_VERSION} SOVERSION ${SHARED_LIBRARY_VERSION}
|
||||
DEFINE_SYMBOL ApacheHandlers_EXPORTS)
|
||||
PROPERTIES
|
||||
VERSION ${SHARED_LIBRARY_VERSION} SOVERSION ${SHARED_LIBRARY_VERSION}
|
||||
DEFINE_SYMBOL ApacheHandlers_EXPORTS)
|
||||
target_include_directories(mod_poco
|
||||
PUBLIC
|
||||
$<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}/include>
|
||||
$<INSTALL_INTERFACE:include>
|
||||
PUBLIC
|
||||
$<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}/include>
|
||||
$<INSTALL_INTERFACE:include>
|
||||
PRIVATE
|
||||
${APACHE2_INCLUDE_DIRS}
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/src
|
||||
)
|
||||
)
|
||||
target_link_libraries(mod_poco PUBLIC Poco::Util Poco::Net Apache::Apr Apache::Aprutil)
|
||||
|
||||
if (ENABLE_TESTS)
|
||||
add_subdirectory(samples)
|
||||
endif ()
|
||||
if(ENABLE_TESTS)
|
||||
add_subdirectory(samples)
|
||||
endif()
|
||||
|
@ -1,2 +1,2 @@
|
||||
add_subdirectory( FormServer )
|
||||
add_subdirectory( TimeServer )
|
||||
add_subdirectory(FormServer)
|
||||
add_subdirectory(TimeServer)
|
||||
|
27
CHANGELOG
27
CHANGELOG
@ -1,7 +1,32 @@
|
||||
This is the changelog file for the POCO C++ Libraries.
|
||||
|
||||
Release 1.10.1 (2020-02-10)
|
||||
===========================
|
||||
|
||||
- Upgraded bundled SQLite to version 3.31.1.
|
||||
- GH #2894: Poco 1.10.0 doesn't build with cmake & POCO_UNBUNDLED
|
||||
- GH #2898: poco 1.10/ NetSSL / openssl < 1.1 : default server usage changed (compare to 1.9.4)
|
||||
- GH #2834: Wrong cancelation of the fix: incorrect type of store name parameter in
|
||||
CertOpenStore API call into NetSSL_Win. Release 1.10.0
|
||||
- GH #2791: allow pre-allocation of the buffer in Poco::LogStreamBuf.
|
||||
- GH #2816: Modernise TLS configuration
|
||||
- GH #2818: Add getSpecifiedPort() method in Poco::URI.
|
||||
- GH #2909: Test failures on s390x architecture with 1.10.0
|
||||
- GH #2911: Poco::UTF16Encoding and Poco::UTF32Encoding byte order conversion bug
|
||||
- GH #2912: Poco::SHA2Engine computes incorrect hash on big-endian systems
|
||||
- GH #2923: cmake: Version 1.10.0 not parsed correctly from VERSION file
|
||||
- GH #2908: [Windows] Process arguments quoting is broken.
|
||||
- GH #2894: Poco 1.10.0 doesn't build with cmake & POCO_UNBUNDLED
|
||||
- GH #2920: Close Service Handle after DeleteService Function call
|
||||
- GH #2919: Fixed Crash in WinService::setFailureActions
|
||||
- GH #2922: 1.10 cmake build fails on FreeBSD 11.2 Release
|
||||
- MySQL: resetting the session when putting it back into a SessionPool is now optional
|
||||
(and disabled by default) due to a bug in MySQL messing up the character encoding when doing so.
|
||||
- Poco::AutoPtr and Poco::SharedPtr now support comparison with nullptr.
|
||||
|
||||
|
||||
Release 1.10.0 (2020-01-27)
|
||||
==========================
|
||||
===========================
|
||||
|
||||
- This release now requires a C++14 compiler (GCC 5, Clang 3.4, Visual C++ 2015).
|
||||
- Visual Studio project and solution files for versions prior to 2015 have
|
||||
|
341
CMakeLists.txt
341
CMakeLists.txt
@ -4,9 +4,9 @@ project(Poco)
|
||||
|
||||
file(STRINGS "${PROJECT_SOURCE_DIR}/libversion" SHARED_LIBRARY_VERSION)
|
||||
# Read the version information from the VERSION file
|
||||
file (STRINGS "${PROJECT_SOURCE_DIR}/VERSION" PACKAGE_VERSION )
|
||||
file(STRINGS "${PROJECT_SOURCE_DIR}/VERSION" PACKAGE_VERSION)
|
||||
string(REGEX REPLACE "([0-9]+)\\.[0-9]+\\.[0-9]+.*" "\\1" CPACK_PACKAGE_VERSION_MAJOR ${PACKAGE_VERSION})
|
||||
string(REGEX REPLACE "[0-9]+\\.([0-9])+\\.[0-9]+.*" "\\1" CPACK_PACKAGE_VERSION_MINOR ${PACKAGE_VERSION})
|
||||
string(REGEX REPLACE "[0-9]+\\.([0-9]+)\\.[0-9]+.*" "\\1" CPACK_PACKAGE_VERSION_MINOR ${PACKAGE_VERSION})
|
||||
string(REGEX REPLACE "[0-9]+\\.[0-9]+\\.([0-9]+).*" "\\1" CPACK_PACKAGE_VERSION_PATCH ${PACKAGE_VERSION})
|
||||
|
||||
set(PROJECT_VERSION ${CPACK_PACKAGE_VERSION_MAJOR}.${CPACK_PACKAGE_VERSION_MINOR}.${CPACK_PACKAGE_VERSION_PATCH})
|
||||
@ -40,42 +40,41 @@ check_for_cxx14_compiler(CXX14_COMPILER)
|
||||
|
||||
# If a C++14 compiler is available, then set the appropriate flags
|
||||
if(CXX14_COMPILER)
|
||||
set (CMAKE_CXX_STANDARD 14)
|
||||
set (CMAKE_CXX_STANDARD_REQUIRED ON)
|
||||
set(CMAKE_CXX_STANDARD 14)
|
||||
set(CMAKE_CXX_STANDARD_REQUIRED ON)
|
||||
else()
|
||||
message(FATAL_ERROR "Compiler does not support C++14." )
|
||||
message(FATAL_ERROR "Compiler does not support C++14.")
|
||||
endif()
|
||||
|
||||
if(NOT CMAKE_BUILD_TYPE)
|
||||
set(CMAKE_BUILD_TYPE "RelWithDebInfo")
|
||||
set(CMAKE_BUILD_TYPE "RelWithDebInfo")
|
||||
endif()
|
||||
|
||||
# Include some common macros to simpilfy the Poco CMake files
|
||||
include(PocoMacros)
|
||||
|
||||
option(POCO_STATIC
|
||||
"Set to OFF|ON (default is OFF) to control build of POCO as STATIC library" OFF)
|
||||
if(POCO_STATIC)
|
||||
option(BUILD_SHARED_LIBS "Build shared libraries" OFF)
|
||||
message(WARNING "POCO_STATIC has been deprecated. Please use BUILD_SHARED_LIBS instead.")
|
||||
option(BUILD_SHARED_LIBS "Build shared libraries" OFF)
|
||||
else()
|
||||
option(BUILD_SHARED_LIBS "Build shared libraries" ON)
|
||||
option(BUILD_SHARED_LIBS "Build shared libraries" ON)
|
||||
endif()
|
||||
|
||||
if(MSVC)
|
||||
option(POCO_MT
|
||||
"Set to OFF|ON (default is OFF) to control build of POCO as /MT instead of /MD" OFF)
|
||||
option(POCO_MT "Set to OFF|ON (default is OFF) to control build of POCO as /MT instead of /MD" OFF)
|
||||
|
||||
option(ENABLE_MSVC_MP
|
||||
"Set to OFF|ON (default is OFF) to control parallel build of POCO with MSVC" OFF)
|
||||
if(BUILD_SHARED_LIBS AND POCO_MT)
|
||||
message(FATAL_ERROR "Cannot have both BUILD_SHARED_LIBS and POCO_MT")
|
||||
endif()
|
||||
|
||||
# allow disabling of internally built OpenSSL# (see below for details)
|
||||
# if POCO pre-built OpenSSL directory is found, and POCO_DISABLE_INTERNAL_OPENSSL=OFF,
|
||||
# the internal OpenSSL build will be used
|
||||
option(POCO_DISABLE_INTERNAL_OPENSSL "Disable internal OpensSSL binaries use" ON)
|
||||
# allow disabling of internally built OpenSSL# (see below for details)
|
||||
# if POCO pre-built OpenSSL directory is found, and POCO_DISABLE_INTERNAL_OPENSSL=OFF,
|
||||
# the internal OpenSSL build will be used
|
||||
option(POCO_DISABLE_INTERNAL_OPENSSL "Disable internal OpensSSL binaries use" ON)
|
||||
|
||||
if((NOT POCO_DISABLE_INTERNAL_OPENSSL) AND (ENABLE_NETSSL OR ENABLE_CRYPTO OR (ENABLE_DATA_MYSQL AND MINGW)))
|
||||
include(UseEmbeddedOpenSSL)
|
||||
endif()
|
||||
if((NOT POCO_DISABLE_INTERNAL_OPENSSL) AND (ENABLE_NETSSL OR ENABLE_CRYPTO OR (ENABLE_DATA_MYSQL AND MINGW)))
|
||||
include(UseEmbeddedOpenSSL)
|
||||
endif()
|
||||
endif()
|
||||
|
||||
option(ENABLE_NETSSL_WIN "Enable NetSSL Windows" OFF)
|
||||
@ -98,62 +97,62 @@ else()
|
||||
endif()
|
||||
|
||||
if(ENABLE_APACHECONNECTOR)
|
||||
find_package(APR REQUIRED)
|
||||
find_package(APR REQUIRED)
|
||||
find_package(APRUTIL REQUIRED)
|
||||
find_package(Apache2 REQUIRED)
|
||||
else()
|
||||
find_package(APR)
|
||||
find_package(APR)
|
||||
find_package(APRUTIL)
|
||||
find_package(Apache2)
|
||||
endif()
|
||||
|
||||
if(APR_FOUND AND APRUTIL_FOUND AND APACHE2_FOUND AND
|
||||
EXISTS ${PROJECT_SOURCE_DIR}/ApacheConnector AND ENABLE_APACHECONNECTOR)
|
||||
option(ENABLE_APACHECONNECTOR "Enable ApacheConnector" ON)
|
||||
EXISTS ${PROJECT_SOURCE_DIR}/ApacheConnector AND ENABLE_APACHECONNECTOR)
|
||||
option(ENABLE_APACHECONNECTOR "Enable ApacheConnector" ON)
|
||||
else()
|
||||
option(ENABLE_APACHECONNECTOR "Enable ApacheConnector" OFF)
|
||||
option(ENABLE_APACHECONNECTOR "Enable ApacheConnector" OFF)
|
||||
endif()
|
||||
|
||||
if(ENABLE_DATA_MYSQL)
|
||||
find_package(MySQL REQUIRED)
|
||||
find_package(MySQL REQUIRED)
|
||||
else()
|
||||
find_package(MySQL)
|
||||
find_package(MySQL)
|
||||
endif()
|
||||
|
||||
if(MYSQL_FOUND)
|
||||
option(ENABLE_DATA "Enable Data" ON)
|
||||
option(ENABLE_DATA_MYSQL "Enable Data MySQL or MariaDB" ON)
|
||||
option(ENABLE_DATA "Enable Data" ON)
|
||||
option(ENABLE_DATA_MYSQL "Enable Data MySQL or MariaDB" ON)
|
||||
else()
|
||||
option(ENABLE_DATA "Enable Data" OFF)
|
||||
option(ENABLE_DATA_MYSQL "Enable Data MySQL or MariaDB" OFF)
|
||||
option(ENABLE_DATA "Enable Data" OFF)
|
||||
option(ENABLE_DATA_MYSQL "Enable Data MySQL or MariaDB" OFF)
|
||||
endif()
|
||||
|
||||
if(ENABLE_DATA_POSTGRESQL)
|
||||
find_package(PostgreSQL REQUIRED)
|
||||
find_package(PostgreSQL REQUIRED)
|
||||
else()
|
||||
find_package(PostgreSQL)
|
||||
find_package(PostgreSQL)
|
||||
endif()
|
||||
|
||||
if(PostgreSQL_FOUND)
|
||||
option(ENABLE_DATA "Enable SQL" ON)
|
||||
option(ENABLE_DATA_POSTGRESQL "Enable SQL PosgreSQL" ON)
|
||||
option(ENABLE_DATA "Enable SQL" ON)
|
||||
option(ENABLE_DATA_POSTGRESQL "Enable SQL PosgreSQL" ON)
|
||||
else()
|
||||
option(ENABLE_DATA "Enable SQL" OFF)
|
||||
option(ENABLE_DATA_POSTGRESQL "Enable SQL PosgreSQL" OFF)
|
||||
option(ENABLE_DATA "Enable SQL" OFF)
|
||||
option(ENABLE_DATA_POSTGRESQL "Enable SQL PosgreSQL" OFF)
|
||||
endif()
|
||||
|
||||
if(ENABLE_DATA_ODBC)
|
||||
find_package(ODBC REQUIRED)
|
||||
find_package(ODBC REQUIRED)
|
||||
else()
|
||||
find_package(ODBC)
|
||||
find_package(ODBC)
|
||||
endif()
|
||||
|
||||
if(ODBC_FOUND)
|
||||
option(ENABLE_DATA "Enable Data" ON)
|
||||
option(ENABLE_DATA_ODBC "Enable Data ODBC" ON)
|
||||
option(ENABLE_DATA "Enable Data" ON)
|
||||
option(ENABLE_DATA_ODBC "Enable Data ODBC" ON)
|
||||
else()
|
||||
option(ENABLE_DATA "Enable Data" OFF)
|
||||
option(ENABLE_DATA_ODBC "Enable Data ODBC" OFF)
|
||||
option(ENABLE_DATA "Enable Data" OFF)
|
||||
option(ENABLE_DATA_ODBC "Enable Data ODBC" OFF)
|
||||
endif()
|
||||
|
||||
# Allow enabling and disabling components
|
||||
@ -177,23 +176,23 @@ option(ENABLE_PAGECOMPILER "Enable PageCompiler" ON)
|
||||
option(ENABLE_PAGECOMPILER_FILE2PAGE "Enable File2Page" ON)
|
||||
|
||||
option(ENABLE_TESTS
|
||||
"Set to OFF|ON (default is OFF) to control build of POCO tests & samples" OFF)
|
||||
"Set to OFF|ON (default is OFF) to control build of POCO tests & samples" OFF)
|
||||
|
||||
option(POCO_UNBUNDLED
|
||||
"Set to OFF|ON (default is OFF) to control linking dependencies as external" OFF)
|
||||
"Set to OFF|ON (default is OFF) to control linking dependencies as external" OFF)
|
||||
|
||||
if(ENABLE_TESTS)
|
||||
include(CTest)
|
||||
enable_testing()
|
||||
message(STATUS "Building with unittests & samples")
|
||||
include(CTest)
|
||||
enable_testing()
|
||||
message(STATUS "Building with unittests & samples")
|
||||
else()
|
||||
message(STATUS "Building without tests & samples")
|
||||
message(STATUS "Building without tests & samples")
|
||||
endif()
|
||||
|
||||
if(POCO_UNBUNDLED)
|
||||
message(STATUS "Using external sqlite, zlib, pcre, expat, ...")
|
||||
message(STATUS "Using external sqlite, zlib, pcre, expat, ...")
|
||||
else()
|
||||
message(STATUS "Using internal sqlite, zlib, pcre, expat, ...")
|
||||
message(STATUS "Using internal sqlite, zlib, pcre, expat, ...")
|
||||
endif()
|
||||
|
||||
include(DefinePlatformSpecifc)
|
||||
@ -202,217 +201,218 @@ include(DefinePlatformSpecifc)
|
||||
set(Poco_COMPONENTS "")
|
||||
|
||||
if(ENABLE_TESTS)
|
||||
add_subdirectory(CppUnit)
|
||||
set(ENABLE_XML ON CACHE BOOL "Enable XML" FORCE )
|
||||
set(ENABLE_JSON ON CACHE BOOL "Enable JSON" FORCE)
|
||||
add_subdirectory(CppUnit)
|
||||
set(ENABLE_XML ON CACHE BOOL "Enable XML" FORCE)
|
||||
set(ENABLE_JSON ON CACHE BOOL "Enable JSON" FORCE)
|
||||
|
||||
if(ENABLE_ZIP)
|
||||
set(ENABLE_NET ON CACHE BOOL "Enable Net" FORCE)
|
||||
endif()
|
||||
if(ENABLE_ZIP)
|
||||
set(ENABLE_NET ON CACHE BOOL "Enable Net" FORCE)
|
||||
endif()
|
||||
endif()
|
||||
|
||||
if(ENABLE_ENCODINGS_COMPILER OR ENABLE_APACHECONNECTOR)
|
||||
set(ENABLE_NET ON CACHE BOOL "Enable Net" FORCE)
|
||||
set(ENABLE_UTIL ON CACHE BOOL "Enable Util" FORCE)
|
||||
set(ENABLE_NET ON CACHE BOOL "Enable Net" FORCE)
|
||||
set(ENABLE_UTIL ON CACHE BOOL "Enable Util" FORCE)
|
||||
endif()
|
||||
|
||||
if(ENABLE_PAGECOMPILER_FILE2PAGE)
|
||||
set(ENABLE_UTIL ON CACHE BOOL "Enable Util" FORCE)
|
||||
set(ENABLE_UTIL ON CACHE BOOL "Enable Util" FORCE)
|
||||
endif()
|
||||
|
||||
if(ENABLE_PAGECOMPILER)
|
||||
set(ENABLE_NET ON CACHE BOOL "Enable Net" FORCE)
|
||||
set(ENABLE_UTIL ON CACHE BOOL "Enable Util" FORCE)
|
||||
set(ENABLE_NET ON CACHE BOOL "Enable Net" FORCE)
|
||||
set(ENABLE_UTIL ON CACHE BOOL "Enable Util" FORCE)
|
||||
endif()
|
||||
|
||||
if(ENABLE_MONGODB OR ENABLE_REDIS)
|
||||
set(ENABLE_NET ON CACHE BOOL "Enable Net" FORCE)
|
||||
set(ENABLE_NET ON CACHE BOOL "Enable Net" FORCE)
|
||||
endif()
|
||||
|
||||
if(ENABLE_DATA_SQLITE OR ENABLE_DATA_MYSQL OR ENABLE_DATA_ODBC OR ENABLE_DATA_POSTGRESQL)
|
||||
set(ENABLE_DATA ON CACHE BOOL "Enable Data" FORCE)
|
||||
if(ENABLE_TESTS)
|
||||
set(ENABLE_NET ON CACHE BOOL "Enable Net" FORCE)
|
||||
set(ENABLE_DATA_SQLITE ON CACHE BOOL "Enable Data SQlite" FORCE)
|
||||
endif()
|
||||
set(ENABLE_DATA ON CACHE BOOL "Enable Data" FORCE)
|
||||
if(ENABLE_TESTS)
|
||||
set(ENABLE_NET ON CACHE BOOL "Enable Net" FORCE)
|
||||
set(ENABLE_DATA_SQLITE ON CACHE BOOL "Enable Data SQlite" FORCE)
|
||||
endif()
|
||||
endif()
|
||||
|
||||
if(ENABLE_DATA AND ENABLE_TESTS)
|
||||
set(ENABLE_DATA_SQLITE ON CACHE BOOL "Enable Data SQlite" FORCE)
|
||||
set(ENABLE_DATA_SQLITE ON CACHE BOOL "Enable Data SQlite" FORCE)
|
||||
endif()
|
||||
|
||||
if(ENABLE_NETSSL_WIN)
|
||||
set(ENABLE_UTIL ON CACHE BOOL "Enable Util" FORCE)
|
||||
if(ENABLE_TESTS)
|
||||
set(ENABLE_CRYPTO ON CACHE BOOL "Enable Crypto" FORCE)
|
||||
endif()
|
||||
set(ENABLE_UTIL ON CACHE BOOL "Enable Util" FORCE)
|
||||
if(ENABLE_TESTS)
|
||||
set(ENABLE_CRYPTO ON CACHE BOOL "Enable Crypto" FORCE)
|
||||
endif()
|
||||
endif()
|
||||
|
||||
if(ENABLE_NETSSL)
|
||||
set(ENABLE_CRYPTO ON CACHE BOOL "Enable Crypto" FORCE)
|
||||
set(ENABLE_NET ON CACHE BOOL "Enable Net" FORCE)
|
||||
set(ENABLE_UTIL ON CACHE BOOL "Enable Util" FORCE)
|
||||
set(ENABLE_NET ON CACHE BOOL "Enable Net" FORCE)
|
||||
set(ENABLE_UTIL ON CACHE BOOL "Enable Util" FORCE)
|
||||
endif()
|
||||
|
||||
if(ENABLE_CRYPTO AND ENABLE_TESTS)
|
||||
set(ENABLE_NETSSL ON CACHE BOOL "Enable NetSSL" FORCE)
|
||||
set(ENABLE_NET ON CACHE BOOL "Enable Net" FORCE)
|
||||
set(ENABLE_UTIL ON CACHE BOOL "Enable Util" FORCE)
|
||||
set(ENABLE_NETSSL ON CACHE BOOL "Enable NetSSL" FORCE)
|
||||
set(ENABLE_NET ON CACHE BOOL "Enable Net" FORCE)
|
||||
set(ENABLE_UTIL ON CACHE BOOL "Enable Util" FORCE)
|
||||
endif()
|
||||
|
||||
if(ENABLE_NET AND ENABLE_TESTS)
|
||||
set(ENABLE_UTIL ON CACHE BOOL "Enable Util" FORCE)
|
||||
set(ENABLE_UTIL ON CACHE BOOL "Enable Util" FORCE)
|
||||
endif()
|
||||
|
||||
if(ENABLE_PDF)
|
||||
set(ENABLE_UTIL ON CACHE BOOL "Enable Util" FORCE)
|
||||
set(ENABLE_XML ON CACHE BOOL "Enable XML" FORCE)
|
||||
set(ENABLE_UTIL ON CACHE BOOL "Enable Util" FORCE)
|
||||
set(ENABLE_XML ON CACHE BOOL "Enable XML" FORCE)
|
||||
endif()
|
||||
|
||||
if(ENABLE_POCODOC)
|
||||
set(ENABLE_UTIL ON CACHE BOOL "Enable Util" FORCE)
|
||||
set(ENABLE_XML ON CACHE BOOL "Enable XML" FORCE)
|
||||
set(ENABLE_CPPPARSER ON CACHE BOOL "Enable C++ parser" FORCE)
|
||||
set(ENABLE_UTIL ON CACHE BOOL "Enable Util" FORCE)
|
||||
set(ENABLE_XML ON CACHE BOOL "Enable XML" FORCE)
|
||||
set(ENABLE_CPPPARSER ON CACHE BOOL "Enable C++ parser" FORCE)
|
||||
endif()
|
||||
|
||||
if(ENABLE_SEVENZIP OR ENABLE_ZIP)
|
||||
set(ENABLE_UTIL ON CACHE BOOL "Enable Util" FORCE)
|
||||
set(ENABLE_XML ON CACHE BOOL "Enable XML" FORCE)
|
||||
set(ENABLE_UTIL ON CACHE BOOL "Enable Util" FORCE)
|
||||
set(ENABLE_XML ON CACHE BOOL "Enable XML" FORCE)
|
||||
endif()
|
||||
|
||||
if(ENABLE_UTIL AND ENABLE_TESTS)
|
||||
set(ENABLE_JSON ON CACHE BOOL "Enable JSON" FORCE)
|
||||
set(ENABLE_XML ON CACHE BOOL "Enable XML" FORCE)
|
||||
set(ENABLE_JSON ON CACHE BOOL "Enable JSON" FORCE)
|
||||
set(ENABLE_XML ON CACHE BOOL "Enable XML" FORCE)
|
||||
endif()
|
||||
|
||||
if(ENABLE_JWT)
|
||||
set(ENABLE_CRYPTO ON CACHE BOOL "Enable Crypto" FORCE)
|
||||
set(ENABLE_JSON ON CACHE BOOL "Enable JSON" FORCE)
|
||||
set(ENABLE_JSON ON CACHE BOOL "Enable JSON" FORCE)
|
||||
endif()
|
||||
|
||||
if(ENABLE_FOUNDATION)
|
||||
add_subdirectory(Foundation)
|
||||
add_subdirectory(Foundation)
|
||||
endif()
|
||||
if(ENABLE_ENCODINGS)
|
||||
add_subdirectory(Encodings)
|
||||
list(APPEND Poco_COMPONENTS "Encodings")
|
||||
add_subdirectory(Encodings)
|
||||
list(APPEND Poco_COMPONENTS "Encodings")
|
||||
endif()
|
||||
|
||||
if(ENABLE_XML)
|
||||
add_subdirectory(XML)
|
||||
list(APPEND Poco_COMPONENTS "XML")
|
||||
add_subdirectory(XML)
|
||||
list(APPEND Poco_COMPONENTS "XML")
|
||||
endif()
|
||||
|
||||
if(ENABLE_JSON)
|
||||
add_subdirectory(JSON)
|
||||
list(APPEND Poco_COMPONENTS "JSON")
|
||||
add_subdirectory(JSON)
|
||||
list(APPEND Poco_COMPONENTS "JSON")
|
||||
endif()
|
||||
|
||||
if(ENABLE_UTIL)
|
||||
add_subdirectory(Util)
|
||||
list(APPEND Poco_COMPONENTS "Util")
|
||||
add_subdirectory(Util)
|
||||
list(APPEND Poco_COMPONENTS "Util")
|
||||
endif()
|
||||
|
||||
if(ENABLE_NET)
|
||||
add_subdirectory(Net)
|
||||
list(APPEND Poco_COMPONENTS "Net")
|
||||
add_subdirectory(Net)
|
||||
list(APPEND Poco_COMPONENTS "Net")
|
||||
endif()
|
||||
|
||||
if(EXISTS ${PROJECT_SOURCE_DIR}/MongoDB AND ENABLE_MONGODB)
|
||||
add_subdirectory(MongoDB)
|
||||
list(APPEND Poco_COMPONENTS "MongoDB")
|
||||
add_subdirectory(MongoDB)
|
||||
list(APPEND Poco_COMPONENTS "MongoDB")
|
||||
endif()
|
||||
|
||||
if(EXISTS ${PROJECT_SOURCE_DIR}/Redis AND ENABLE_REDIS)
|
||||
add_subdirectory(Redis)
|
||||
list(APPEND Poco_COMPONENTS "Redis")
|
||||
add_subdirectory(Redis)
|
||||
list(APPEND Poco_COMPONENTS "Redis")
|
||||
endif()
|
||||
|
||||
if(EXISTS ${PROJECT_SOURCE_DIR}/PDF AND ENABLE_PDF)
|
||||
add_subdirectory(PDF)
|
||||
list(APPEND Poco_COMPONENTS "PDF")
|
||||
add_subdirectory(PDF)
|
||||
list(APPEND Poco_COMPONENTS "PDF")
|
||||
endif()
|
||||
|
||||
if(EXISTS ${PROJECT_SOURCE_DIR}/JWT AND ENABLE_JWT)
|
||||
add_subdirectory(JWT)
|
||||
list(APPEND Poco_COMPONENTS "JWT")
|
||||
add_subdirectory(JWT)
|
||||
list(APPEND Poco_COMPONENTS "JWT")
|
||||
endif()
|
||||
|
||||
#NetSSL
|
||||
|
||||
|
||||
if(WIN32 AND EXISTS ${PROJECT_SOURCE_DIR}/NetSSL_Win AND ENABLE_NETSSL_WIN)
|
||||
add_subdirectory(NetSSL_Win)
|
||||
list(APPEND Poco_COMPONENTS "NetSSL_Win")
|
||||
add_subdirectory(NetSSL_Win)
|
||||
list(APPEND Poco_COMPONENTS "NetSSL_Win")
|
||||
endif(WIN32 AND EXISTS ${PROJECT_SOURCE_DIR}/NetSSL_Win AND ENABLE_NETSSL_WIN)
|
||||
|
||||
if(OPENSSL_FOUND)
|
||||
if(EXISTS ${PROJECT_SOURCE_DIR}/NetSSL_OpenSSL AND ENABLE_NETSSL)
|
||||
add_subdirectory(NetSSL_OpenSSL)
|
||||
list(APPEND Poco_COMPONENTS "NetSSL_OpenSSL")
|
||||
endif()
|
||||
if(EXISTS ${PROJECT_SOURCE_DIR}/Crypto AND ENABLE_CRYPTO)
|
||||
add_subdirectory(Crypto)
|
||||
list(APPEND Poco_COMPONENTS "Crypto")
|
||||
endif()
|
||||
if(EXISTS ${PROJECT_SOURCE_DIR}/NetSSL_OpenSSL AND ENABLE_NETSSL)
|
||||
add_subdirectory(NetSSL_OpenSSL)
|
||||
list(APPEND Poco_COMPONENTS "NetSSL_OpenSSL")
|
||||
endif()
|
||||
if(EXISTS ${PROJECT_SOURCE_DIR}/Crypto AND ENABLE_CRYPTO)
|
||||
add_subdirectory(Crypto)
|
||||
list(APPEND Poco_COMPONENTS "Crypto")
|
||||
endif()
|
||||
endif(OPENSSL_FOUND)
|
||||
|
||||
if(EXISTS ${PROJECT_SOURCE_DIR}/Data AND ENABLE_DATA)
|
||||
add_subdirectory(Data)
|
||||
list(APPEND Poco_COMPONENTS "Data")
|
||||
add_subdirectory(Data)
|
||||
list(APPEND Poco_COMPONENTS "Data")
|
||||
endif()
|
||||
|
||||
if(EXISTS ${PROJECT_SOURCE_DIR}/SevenZip AND ENABLE_SEVENZIP)
|
||||
add_subdirectory(SevenZip)
|
||||
list(APPEND Poco_COMPONENTS "SevenZip")
|
||||
add_subdirectory(SevenZip)
|
||||
list(APPEND Poco_COMPONENTS "SevenZip")
|
||||
endif()
|
||||
|
||||
if(EXISTS ${PROJECT_SOURCE_DIR}/Zip AND ENABLE_ZIP)
|
||||
add_subdirectory(Zip)
|
||||
list(APPEND Poco_COMPONENTS "Zip")
|
||||
add_subdirectory(Zip)
|
||||
list(APPEND Poco_COMPONENTS "Zip")
|
||||
endif()
|
||||
|
||||
if(APRUTIL_FOUND AND APACHE_FOUND AND
|
||||
EXISTS ${PROJECT_SOURCE_DIR}/ApacheConnector AND ENABLE_APACHECONNECTOR)
|
||||
add_subdirectory(ApacheConnector)
|
||||
list(APPEND Poco_COMPONENTS "ApacheConnector")
|
||||
EXISTS ${PROJECT_SOURCE_DIR}/ApacheConnector AND ENABLE_APACHECONNECTOR)
|
||||
add_subdirectory(ApacheConnector)
|
||||
list(APPEND Poco_COMPONENTS "ApacheConnector")
|
||||
endif()
|
||||
|
||||
if(EXISTS ${PROJECT_SOURCE_DIR}/CppParser AND ENABLE_CPPPARSER)
|
||||
add_subdirectory(CppParser)
|
||||
list(APPEND Poco_COMPONENTS "CppParser")
|
||||
add_subdirectory(CppParser)
|
||||
list(APPEND Poco_COMPONENTS "CppParser")
|
||||
endif()
|
||||
|
||||
if(EXISTS ${PROJECT_SOURCE_DIR}/PocoDoc AND ENABLE_POCODOC)
|
||||
add_subdirectory(PocoDoc)
|
||||
list(APPEND Poco_COMPONENTS "PocoDoc")
|
||||
add_subdirectory(PocoDoc)
|
||||
list(APPEND Poco_COMPONENTS "PocoDoc")
|
||||
endif()
|
||||
|
||||
if(EXISTS ${PROJECT_SOURCE_DIR}/PageCompiler AND ENABLE_PAGECOMPILER)
|
||||
add_subdirectory(PageCompiler)
|
||||
list(APPEND Poco_COMPONENTS "PageCompiler")
|
||||
add_subdirectory(PageCompiler)
|
||||
list(APPEND Poco_COMPONENTS "PageCompiler")
|
||||
endif()
|
||||
|
||||
if(EXISTS ${PROJECT_SOURCE_DIR}/PageCompiler/File2Page AND ENABLE_PAGECOMPILER_FILE2PAGE)
|
||||
add_subdirectory(PageCompiler/File2Page)
|
||||
list(APPEND Poco_COMPONENTS "File2Page")
|
||||
add_subdirectory(PageCompiler/File2Page)
|
||||
list(APPEND Poco_COMPONENTS "File2Page")
|
||||
endif()
|
||||
|
||||
if(EXISTS ${PROJECT_SOURCE_DIR}/Encodings/Compiler AND ENABLE_ENCODINGS_COMPILER)
|
||||
add_subdirectory(Encodings/Compiler)
|
||||
list(APPEND Poco_COMPONENTS "EncodingsCompiler")
|
||||
add_subdirectory(Encodings/Compiler)
|
||||
list(APPEND Poco_COMPONENTS "EncodingsCompiler")
|
||||
endif()
|
||||
|
||||
|
||||
#############################################################
|
||||
# Uninstall stuff see: http://www.vtk.org/Wiki/CMake_FAQ
|
||||
configure_file(
|
||||
"${CMAKE_CURRENT_SOURCE_DIR}/cmake/cmake_uninstall.cmake.in"
|
||||
"${CMAKE_CURRENT_BINARY_DIR}/cmake_uninstall.cmake"
|
||||
IMMEDIATE @ONLY)
|
||||
"${CMAKE_CURRENT_SOURCE_DIR}/cmake/cmake_uninstall.cmake.in"
|
||||
"${CMAKE_CURRENT_BINARY_DIR}/cmake_uninstall.cmake"
|
||||
IMMEDIATE @ONLY)
|
||||
|
||||
add_custom_target(uninstall
|
||||
"${CMAKE_COMMAND}" -P "${CMAKE_CURRENT_BINARY_DIR}/cmake_uninstall.cmake")
|
||||
"${CMAKE_COMMAND}" -P "${CMAKE_CURRENT_BINARY_DIR}/cmake_uninstall.cmake"
|
||||
)
|
||||
|
||||
#############################################################
|
||||
# Enable packaging
|
||||
@ -432,29 +432,38 @@ include(CPack)
|
||||
|
||||
include(CMakePackageConfigHelpers)
|
||||
write_basic_package_version_file(
|
||||
"${CMAKE_CURRENT_BINARY_DIR}/${PROJECT_NAME}/${PROJECT_NAME}ConfigVersion.cmake"
|
||||
VERSION ${PROJECT_VERSION}
|
||||
COMPATIBILITY AnyNewerVersion
|
||||
"${CMAKE_CURRENT_BINARY_DIR}/${PROJECT_NAME}/${PROJECT_NAME}ConfigVersion.cmake"
|
||||
VERSION ${PROJECT_VERSION}
|
||||
COMPATIBILITY AnyNewerVersion
|
||||
)
|
||||
|
||||
# Set config script install location in a location that find_package() will
|
||||
# look for, which is different on MS Windows than for UNIX
|
||||
# Note: also set in POCO_GENERATE_PACKAGE macro in cmake/PocoMacros.cmake
|
||||
if(WIN32)
|
||||
set(PocoConfigPackageLocation "cmake")
|
||||
else()
|
||||
set(PocoConfigPackageLocation "lib${LIB_SUFFIX}/cmake/${PROJECT_NAME}")
|
||||
endif()
|
||||
|
||||
configure_file(cmake/${PROJECT_NAME}Config.cmake.in "${CMAKE_CURRENT_BINARY_DIR}/${PROJECT_NAME}/${PROJECT_NAME}Config.cmake" @ONLY)
|
||||
install(
|
||||
FILES
|
||||
${CMAKE_CURRENT_BINARY_DIR}/${PROJECT_NAME}/${PROJECT_NAME}Config.cmake
|
||||
${CMAKE_CURRENT_BINARY_DIR}/${PROJECT_NAME}/${PROJECT_NAME}ConfigVersion.cmake
|
||||
DESTINATION
|
||||
"lib${LIB_SUFFIX}/cmake/${PROJECT_NAME}"
|
||||
COMPONENT
|
||||
Devel
|
||||
FILES
|
||||
${CMAKE_CURRENT_BINARY_DIR}/${PROJECT_NAME}/${PROJECT_NAME}Config.cmake
|
||||
${CMAKE_CURRENT_BINARY_DIR}/${PROJECT_NAME}/${PROJECT_NAME}ConfigVersion.cmake
|
||||
DESTINATION
|
||||
"${PocoConfigPackageLocation}"
|
||||
COMPONENT
|
||||
Devel
|
||||
)
|
||||
|
||||
if(POCO_UNBUNDLED)
|
||||
install(FILES cmake/FindPCRE.cmake
|
||||
DESTINATION "${PocoConfigPackageLocation}")
|
||||
install(FILES cmake/V39/FindEXPAT.cmake
|
||||
DESTINATION "${PocoConfigPackageLocation}/V39")
|
||||
install(FILES cmake/V313/FindSQLite3.cmake
|
||||
DESTINATION "${PocoConfigPackageLocation}/V313")
|
||||
install(FILES cmake/FindPCRE.cmake
|
||||
DESTINATION "${PocoConfigPackageLocation}")
|
||||
install(FILES cmake/V39/FindEXPAT.cmake
|
||||
DESTINATION "${PocoConfigPackageLocation}/V39")
|
||||
install(FILES cmake/V313/FindSQLite3.cmake
|
||||
DESTINATION "${PocoConfigPackageLocation}/V313")
|
||||
endif()
|
||||
|
||||
message(STATUS "CMake ${CMAKE_VERSION} successfully configured ${PROJECT_NAME} using ${CMAKE_GENERATOR} generator")
|
||||
@ -466,16 +475,16 @@ else()
|
||||
endif()
|
||||
message(STATUS "[cmake] Installation target path: ${CMAKE_INSTALL_PREFIX}")
|
||||
if(CMAKE_TOOLCHAIN_FILE)
|
||||
message(STATUS "[cmake] Use toolchain file: ${CMAKE_TOOLCHAIN_FILE}")
|
||||
message(STATUS "[cmake] Use toolchain file: ${CMAKE_TOOLCHAIN_FILE}")
|
||||
endif()
|
||||
message(STATUS "[cmake] Bulid for OS type: ${CMAKE_SYSTEM_NAME}")
|
||||
message(STATUS "[cmake] Build for OS version: ${CMAKE_SYSTEM_VERSION}")
|
||||
message(STATUS "[cmake] Build for CPU type: ${CMAKE_SYSTEM_PROCESSOR}")
|
||||
message(STATUS "[cmake] Build type: ${CMAKE_BUILD_TYPE}")
|
||||
message(STATUS "[cmake] Bulid for OS type: ${CMAKE_SYSTEM_NAME}")
|
||||
message(STATUS "[cmake] Build for OS version: ${CMAKE_SYSTEM_VERSION}")
|
||||
message(STATUS "[cmake] Build for CPU type: ${CMAKE_SYSTEM_PROCESSOR}")
|
||||
message(STATUS "[cmake] Build type: ${CMAKE_BUILD_TYPE}")
|
||||
string(TOUPPER "${CMAKE_BUILD_TYPE}" BUILD_TYPE)
|
||||
message(STATUS "[cmake] Build with cxx flags: ${CMAKE_CXX_FLAGS_${BUILD_TYPE}} ${CMAKE_CXX_FLAGS}")
|
||||
message(STATUS "[cmake] Build with c flags: ${CMAKE_C_FLAGS_${BUILD_TYPE}} ${CMAKE_C_FLAGS}")
|
||||
message(STATUS "[cmake] Build with cxx flags: ${CMAKE_CXX_FLAGS_${BUILD_TYPE}} ${CMAKE_CXX_FLAGS}")
|
||||
message(STATUS "[cmake] Build with c flags: ${CMAKE_C_FLAGS_${BUILD_TYPE}} ${CMAKE_C_FLAGS}")
|
||||
|
||||
foreach(component ${Poco_COMPONENTS})
|
||||
message(STATUS "Building: ${component}")
|
||||
message(STATUS "Building: ${component}")
|
||||
endforeach()
|
||||
|
@ -1,38 +1,38 @@
|
||||
# Sources
|
||||
file(GLOB SRCS_G "src/*.cpp")
|
||||
POCO_SOURCES_AUTO( SRCS ${SRCS_G})
|
||||
POCO_SOURCES_AUTO(SRCS ${SRCS_G})
|
||||
|
||||
# Headers
|
||||
file(GLOB_RECURSE HDRS_G "include/*.h" )
|
||||
POCO_HEADERS_AUTO( SRCS ${HDRS_G})
|
||||
file(GLOB_RECURSE HDRS_G "include/*.h")
|
||||
POCO_HEADERS_AUTO(SRCS ${HDRS_G})
|
||||
|
||||
# Version Resource
|
||||
if(MSVC AND NOT POCO_STATIC)
|
||||
source_group("Resources" FILES ${PROJECT_SOURCE_DIR}/DLLVersion.rc)
|
||||
list(APPEND SRCS ${PROJECT_SOURCE_DIR}/DLLVersion.rc)
|
||||
if(MSVC AND BUILD_SHARED_LIBS)
|
||||
source_group("Resources" FILES ${PROJECT_SOURCE_DIR}/DLLVersion.rc)
|
||||
list(APPEND SRCS ${PROJECT_SOURCE_DIR}/DLLVersion.rc)
|
||||
endif()
|
||||
|
||||
add_library(CppParser ${SRCS})
|
||||
add_library(Poco::CppParser ALIAS CppParser)
|
||||
set_target_properties(CppParser
|
||||
PROPERTIES
|
||||
VERSION ${SHARED_LIBRARY_VERSION} SOVERSION ${SHARED_LIBRARY_VERSION}
|
||||
OUTPUT_NAME PocoCppParser
|
||||
DEFINE_SYMBOL CppParser_EXPORTS
|
||||
)
|
||||
PROPERTIES
|
||||
VERSION ${SHARED_LIBRARY_VERSION} SOVERSION ${SHARED_LIBRARY_VERSION}
|
||||
OUTPUT_NAME PocoCppParser
|
||||
DEFINE_SYMBOL CppParser_EXPORTS
|
||||
)
|
||||
|
||||
target_link_libraries(CppParser PUBLIC Poco::Foundation)
|
||||
target_include_directories(CppParser
|
||||
PUBLIC
|
||||
$<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}/include>
|
||||
$<INSTALL_INTERFACE:include>
|
||||
PRIVATE ${CMAKE_CURRENT_SOURCE_DIR}/src
|
||||
)
|
||||
PUBLIC
|
||||
$<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}/include>
|
||||
$<INSTALL_INTERFACE:include>
|
||||
PRIVATE ${CMAKE_CURRENT_SOURCE_DIR}/src
|
||||
)
|
||||
|
||||
POCO_INSTALL(CppParser)
|
||||
POCO_GENERATE_PACKAGE(CppParser)
|
||||
|
||||
if (ENABLE_TESTS)
|
||||
add_subdirectory(testsuite)
|
||||
endif ()
|
||||
if(ENABLE_TESTS)
|
||||
add_subdirectory(testsuite)
|
||||
endif()
|
||||
|
||||
|
@ -1,21 +1,28 @@
|
||||
# Sources
|
||||
file(GLOB SRCS_G "src/*.cpp")
|
||||
POCO_SOURCES_AUTO( TEST_SRCS ${SRCS_G})
|
||||
POCO_SOURCES_AUTO(TEST_SRCS ${SRCS_G})
|
||||
|
||||
# Headers
|
||||
file(GLOB_RECURSE HDRS_G "src/*.h" )
|
||||
POCO_HEADERS_AUTO( TEST_SRCS ${HDRS_G})
|
||||
file(GLOB_RECURSE HDRS_G "src/*.h")
|
||||
POCO_HEADERS_AUTO(TEST_SRCS ${HDRS_G})
|
||||
|
||||
POCO_SOURCES_AUTO_PLAT( TEST_SRCS OFF
|
||||
src/WinDriver.cpp
|
||||
POCO_SOURCES_AUTO_PLAT(TEST_SRCS OFF
|
||||
src/WinDriver.cpp
|
||||
)
|
||||
|
||||
add_executable(CppParser-testrunner ${TEST_SRCS} )
|
||||
add_executable(CppParser-testrunner ${TEST_SRCS})
|
||||
if(ANDROID)
|
||||
add_test(NAME CppParser WORKING_DIRECTORY ${CMAKE_RUNTIME_OUTPUT_DIRECTORY}
|
||||
COMMAND ${CMAKE_COMMAND} -DANDROID_NDK=${ANDROID_NDK} -DLIBRARY_DIR=${CMAKE_BINARY_DIR}/lib -DUNITTEST=${CMAKE_BINARY_DIR}/bin/CppParser-testrunner -DTEST_PARAMETER=-all -P ${CMAKE_SOURCE_DIR}/cmake/ExecuteOnAndroid.cmake)
|
||||
add_test(
|
||||
NAME CppParser
|
||||
WORKING_DIRECTORY ${CMAKE_RUNTIME_OUTPUT_DIRECTORY}
|
||||
COMMAND ${CMAKE_COMMAND} -DANDROID_NDK=${ANDROID_NDK} -DLIBRARY_DIR=${CMAKE_BINARY_DIR}/lib -DUNITTEST=${CMAKE_BINARY_DIR}/bin/CppParser-testrunner -DTEST_PARAMETER=-all -P ${CMAKE_SOURCE_DIR}/cmake/ExecuteOnAndroid.cmake
|
||||
)
|
||||
else()
|
||||
add_test(NAME CppParser WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR} COMMAND CppParser-testrunner -ignore ${CMAKE_SOURCE_DIR}/cppignore.lnx -all)
|
||||
set_tests_properties(CppParser PROPERTIES ENVIRONMENT POCO_BASE=${CMAKE_SOURCE_DIR})
|
||||
add_test(
|
||||
NAME CppParser
|
||||
WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}
|
||||
COMMAND CppParser-testrunner -ignore ${CMAKE_SOURCE_DIR}/cppignore.lnx -all
|
||||
)
|
||||
set_tests_properties(CppParser PROPERTIES ENVIRONMENT POCO_BASE=${CMAKE_SOURCE_DIR})
|
||||
endif()
|
||||
target_link_libraries(CppParser-testrunner PUBLIC Poco::CppParser CppUnit)
|
||||
|
@ -1,38 +1,35 @@
|
||||
# Sources
|
||||
file(GLOB SRCS_G "src/*.cpp")
|
||||
POCO_SOURCES_AUTO( SRCS ${SRCS_G})
|
||||
POCO_SOURCES_AUTO(SRCS ${SRCS_G})
|
||||
|
||||
# Headers
|
||||
file(GLOB_RECURSE HDRS_G "include/*.h" )
|
||||
POCO_HEADERS_AUTO( SRCS ${HDRS_G})
|
||||
file(GLOB_RECURSE HDRS_G "include/*.h")
|
||||
POCO_HEADERS_AUTO(SRCS ${HDRS_G})
|
||||
|
||||
add_library(CppUnit ${SRCS})
|
||||
add_library(Poco::CppUnit ALIAS CppUnit)
|
||||
set_target_properties(CppUnit
|
||||
PROPERTIES
|
||||
VERSION "1" SOVERSION "1"
|
||||
OUTPUT_NAME CppUnit
|
||||
DEFINE_SYMBOL CppUnit_EXPORTS
|
||||
)
|
||||
PROPERTIES
|
||||
VERSION "1" SOVERSION "1"
|
||||
OUTPUT_NAME CppUnit
|
||||
DEFINE_SYMBOL CppUnit_EXPORTS
|
||||
)
|
||||
target_link_libraries(CppUnit PUBLIC Poco::Foundation)
|
||||
target_include_directories(CppUnit
|
||||
PUBLIC
|
||||
$<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}/include>
|
||||
$<INSTALL_INTERFACE:include>
|
||||
PRIVATE
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/src
|
||||
)
|
||||
PUBLIC
|
||||
$<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}/include>
|
||||
$<INSTALL_INTERFACE:include>
|
||||
PRIVATE
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/src
|
||||
)
|
||||
|
||||
if(NOT BUILD_SHARED_LIBS)
|
||||
target_compile_definitions(CppUnit
|
||||
PUBLIC
|
||||
POCO_STATIC
|
||||
)
|
||||
target_compile_definitions(CppUnit
|
||||
PUBLIC
|
||||
POCO_STATIC
|
||||
)
|
||||
elseif(MINGW)
|
||||
target_compile_definitions(CppUnit
|
||||
PUBLIC
|
||||
_DLL)
|
||||
endif()
|
||||
|
||||
POCO_INSTALL(CppUnit)
|
||||
|
||||
|
@ -46,7 +46,7 @@ TextTestResult::TextTestResult(const std::string& ignore):
|
||||
ifs.close();
|
||||
}
|
||||
}
|
||||
catch (std::exception e)
|
||||
catch (std::exception& e)
|
||||
{
|
||||
std::cout << e.what() << std::endl;
|
||||
}
|
||||
@ -147,7 +147,7 @@ void TextTestResult::addFailure(Test* test, CppUnitException* e)
|
||||
void TextTestResult::startTest(Test* test)
|
||||
{
|
||||
TestResult::startTest(test);
|
||||
_ostr << "\n" << shortName(test->toString()) << ": ";
|
||||
_ostr << "\n" << shortName(test->toString()) << ": " << std::flush;
|
||||
}
|
||||
|
||||
|
||||
|
@ -1,37 +1,37 @@
|
||||
# Sources
|
||||
file(GLOB SRCS_G "src/*.cpp")
|
||||
POCO_SOURCES_AUTO( SRCS ${SRCS_G})
|
||||
POCO_SOURCES_AUTO(SRCS ${SRCS_G})
|
||||
|
||||
# Headers
|
||||
file(GLOB_RECURSE HDRS_G "include/*.h" )
|
||||
POCO_HEADERS_AUTO( SRCS ${HDRS_G})
|
||||
file(GLOB_RECURSE HDRS_G "include/*.h")
|
||||
POCO_HEADERS_AUTO(SRCS ${HDRS_G})
|
||||
|
||||
# Version Resource
|
||||
if(MSVC AND NOT POCO_STATIC)
|
||||
source_group("Resources" FILES ${PROJECT_SOURCE_DIR}/DLLVersion.rc)
|
||||
list(APPEND SRCS ${PROJECT_SOURCE_DIR}/DLLVersion.rc)
|
||||
if(MSVC AND BUILD_SHARED_LIBS)
|
||||
source_group("Resources" FILES ${PROJECT_SOURCE_DIR}/DLLVersion.rc)
|
||||
list(APPEND SRCS ${PROJECT_SOURCE_DIR}/DLLVersion.rc)
|
||||
endif()
|
||||
|
||||
add_library(Crypto ${SRCS} )
|
||||
add_library(Crypto ${SRCS})
|
||||
add_library(Poco::Crypto ALIAS Crypto)
|
||||
set_target_properties(Crypto
|
||||
PROPERTIES
|
||||
VERSION ${SHARED_LIBRARY_VERSION} SOVERSION ${SHARED_LIBRARY_VERSION}
|
||||
OUTPUT_NAME PocoCrypto
|
||||
DEFINE_SYMBOL Crypto_EXPORTS
|
||||
)
|
||||
PROPERTIES
|
||||
VERSION ${SHARED_LIBRARY_VERSION} SOVERSION ${SHARED_LIBRARY_VERSION}
|
||||
OUTPUT_NAME PocoCrypto
|
||||
DEFINE_SYMBOL Crypto_EXPORTS
|
||||
)
|
||||
|
||||
target_link_libraries(Crypto PUBLIC Poco::Foundation OpenSSL::SSL OpenSSL::Crypto)
|
||||
target_include_directories(Crypto
|
||||
PUBLIC
|
||||
$<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}/include>
|
||||
$<INSTALL_INTERFACE:include>
|
||||
PRIVATE
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/src
|
||||
)
|
||||
PUBLIC
|
||||
$<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}/include>
|
||||
$<INSTALL_INTERFACE:include>
|
||||
PRIVATE
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/src
|
||||
)
|
||||
|
||||
if(MSVC AND POCO_DISABLE_INTERNAL_OPENSSL)
|
||||
target_compile_definitions(Crypto PUBLIC POCO_EXTERNAL_OPENSSL)
|
||||
target_compile_definitions(Crypto PUBLIC POCO_EXTERNAL_OPENSSL)
|
||||
if(OPENSSL_USE_STATIC_LIBS)
|
||||
target_link_libraries(Crypto PUBLIC ws2_32.lib Crypt32.lib)
|
||||
endif()
|
||||
@ -40,7 +40,7 @@ endif()
|
||||
POCO_INSTALL(Crypto)
|
||||
POCO_GENERATE_PACKAGE(Crypto)
|
||||
|
||||
if (ENABLE_TESTS)
|
||||
add_subdirectory(samples)
|
||||
add_subdirectory(testsuite)
|
||||
endif ()
|
||||
if(ENABLE_TESTS)
|
||||
add_subdirectory(samples)
|
||||
add_subdirectory(testsuite)
|
||||
endif()
|
||||
|
@ -1 +1 @@
|
||||
add_subdirectory( genrsakey )
|
||||
add_subdirectory(genrsakey)
|
||||
|
@ -1,28 +1,35 @@
|
||||
# Sources
|
||||
file(GLOB SRCS_G "src/*.cpp")
|
||||
POCO_SOURCES_AUTO( TEST_SRCS ${SRCS_G})
|
||||
POCO_SOURCES_AUTO(TEST_SRCS ${SRCS_G})
|
||||
|
||||
# Headers
|
||||
file(GLOB_RECURSE HDRS_G "src/*.h" )
|
||||
POCO_HEADERS_AUTO( TEST_SRCS ${HDRS_G})
|
||||
file(GLOB_RECURSE HDRS_G "src/*.h")
|
||||
POCO_HEADERS_AUTO(TEST_SRCS ${HDRS_G})
|
||||
|
||||
POCO_SOURCES_AUTO_PLAT( TEST_SRCS OFF
|
||||
src/WinDriver.cpp
|
||||
POCO_SOURCES_AUTO_PLAT(TEST_SRCS OFF
|
||||
src/WinDriver.cpp
|
||||
)
|
||||
|
||||
POCO_SOURCES_AUTO_PLAT( TEST_SRCS WINCE
|
||||
src/WinCEDriver.cpp
|
||||
POCO_SOURCES_AUTO_PLAT(TEST_SRCS WINCE
|
||||
src/WinCEDriver.cpp
|
||||
)
|
||||
|
||||
add_executable(Crypto-testrunner ${TEST_SRCS} )
|
||||
add_executable(Crypto-testrunner ${TEST_SRCS})
|
||||
if(ANDROID)
|
||||
add_test(NAME Crypto WORKING_DIRECTORY ${CMAKE_RUNTIME_OUTPUT_DIRECTORY}
|
||||
COMMAND ${CMAKE_COMMAND} -DANDROID_NDK=${ANDROID_NDK} -DLIBRARY_DIR=${CMAKE_BINARY_DIR}/lib -DUNITTEST=${CMAKE_BINARY_DIR}/bin/Crypto-testrunner -DTEST_PARAMETER=-all -P ${CMAKE_SOURCE_DIR}/cmake/ExecuteOnAndroid.cmake)
|
||||
add_test(
|
||||
NAME Crypto
|
||||
WORKING_DIRECTORY ${CMAKE_RUNTIME_OUTPUT_DIRECTORY}
|
||||
COMMAND ${CMAKE_COMMAND} -DANDROID_NDK=${ANDROID_NDK} -DLIBRARY_DIR=${CMAKE_BINARY_DIR}/lib -DUNITTEST=${CMAKE_BINARY_DIR}/bin/Crypto-testrunner -DTEST_PARAMETER=-all -P ${CMAKE_SOURCE_DIR}/cmake/ExecuteOnAndroid.cmake
|
||||
)
|
||||
else()
|
||||
add_test(NAME Crypto WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR} COMMAND Crypto-testrunner -ignore ${CMAKE_SOURCE_DIR}/cppignore.lnx -all)
|
||||
set_tests_properties(Crypto PROPERTIES ENVIRONMENT POCO_BASE=${CMAKE_SOURCE_DIR})
|
||||
add_test(
|
||||
NAME Crypto
|
||||
WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}
|
||||
COMMAND Crypto-testrunner -ignore ${CMAKE_SOURCE_DIR}/cppignore.lnx -all
|
||||
)
|
||||
set_tests_properties(Crypto PROPERTIES ENVIRONMENT POCO_BASE=${CMAKE_SOURCE_DIR})
|
||||
endif()
|
||||
target_link_libraries(Crypto-testrunner PUBLIC Poco::NetSSL Poco::XML CppUnit)
|
||||
if(UNIX AND NOT ANDROID)
|
||||
target_link_libraries(Crypto-testrunner PUBLIC pthread)
|
||||
target_link_libraries(Crypto-testrunner PUBLIC pthread)
|
||||
endif(UNIX AND NOT ANDROID)
|
||||
|
@ -4,8 +4,8 @@
|
||||
|
||||
#include "winres.h"
|
||||
|
||||
#define POCO_VERSION 1,10,0,0
|
||||
#define POCO_VERSION_STR "1.10.0"
|
||||
#define POCO_VERSION 1,10,1,0
|
||||
#define POCO_VERSION_STR "1.10.1"
|
||||
|
||||
VS_VERSION_INFO VERSIONINFO
|
||||
FILEVERSION POCO_VERSION
|
||||
|
@ -1,72 +1,72 @@
|
||||
# Sources
|
||||
file(GLOB SRCS_G "src/*.cpp")
|
||||
POCO_SOURCES_AUTO( SRCS ${SRCS_G})
|
||||
POCO_SOURCES_AUTO(SRCS ${SRCS_G})
|
||||
|
||||
# Headers
|
||||
file(GLOB_RECURSE HDRS_G "include/*.h" )
|
||||
POCO_HEADERS_AUTO( SRCS ${HDRS_G})
|
||||
file(GLOB_RECURSE HDRS_G "include/*.h")
|
||||
POCO_HEADERS_AUTO(SRCS ${HDRS_G})
|
||||
|
||||
if(MSVC AND NOT(MSVC_VERSION LESS 1400))
|
||||
set_source_files_properties(src/StatementImpl.cpp
|
||||
PROPERTIES COMPILE_FLAGS "/bigobj")
|
||||
set_source_files_properties(src/StatementImpl.cpp
|
||||
PROPERTIES COMPILE_FLAGS "/bigobj")
|
||||
endif()
|
||||
|
||||
# Version Resource
|
||||
if(MSVC AND NOT POCO_STATIC)
|
||||
source_group("Resources" FILES ${PROJECT_SOURCE_DIR}/DLLVersion.rc)
|
||||
list(APPEND SRCS ${PROJECT_SOURCE_DIR}/DLLVersion.rc)
|
||||
if(MSVC AND BUILD_SHARED_LIBS)
|
||||
source_group("Resources" FILES ${PROJECT_SOURCE_DIR}/DLLVersion.rc)
|
||||
list(APPEND SRCS ${PROJECT_SOURCE_DIR}/DLLVersion.rc)
|
||||
endif()
|
||||
|
||||
add_library(Data ${SRCS} )
|
||||
add_library(Data ${SRCS})
|
||||
add_library(Poco::Data ALIAS Data)
|
||||
set_target_properties(Data
|
||||
PROPERTIES
|
||||
VERSION ${SHARED_LIBRARY_VERSION} SOVERSION ${SHARED_LIBRARY_VERSION}
|
||||
OUTPUT_NAME PocoData
|
||||
DEFINE_SYMBOL Data_EXPORTS
|
||||
)
|
||||
PROPERTIES
|
||||
VERSION ${SHARED_LIBRARY_VERSION} SOVERSION ${SHARED_LIBRARY_VERSION}
|
||||
OUTPUT_NAME PocoData
|
||||
DEFINE_SYMBOL Data_EXPORTS
|
||||
)
|
||||
|
||||
target_link_libraries(Data PUBLIC Poco::Foundation)
|
||||
target_include_directories(Data
|
||||
PUBLIC
|
||||
$<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}/include>
|
||||
$<INSTALL_INTERFACE:include>
|
||||
PRIVATE ${CMAKE_CURRENT_SOURCE_DIR}/src
|
||||
)
|
||||
PUBLIC
|
||||
$<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}/include>
|
||||
$<INSTALL_INTERFACE:include>
|
||||
PRIVATE ${CMAKE_CURRENT_SOURCE_DIR}/src
|
||||
)
|
||||
|
||||
POCO_INSTALL(Data)
|
||||
POCO_GENERATE_PACKAGE(Data)
|
||||
|
||||
if(ENABLE_DATA_SQLITE)
|
||||
# SQlite3 is built in any case
|
||||
message(STATUS "SQLite Support Enabled")
|
||||
add_subdirectory( SQLite )
|
||||
# SQlite3 is built in any case
|
||||
message(STATUS "SQLite Support Enabled")
|
||||
add_subdirectory(SQLite)
|
||||
else(ENABLE_DATA_SQLITE)
|
||||
message(STATUS "SQLite Support Disabled")
|
||||
message(STATUS "SQLite Support Disabled")
|
||||
endif()
|
||||
|
||||
if(MYSQL_FOUND AND ENABLE_DATA_MYSQL)
|
||||
message(STATUS "MySQL Support Enabled")
|
||||
add_subdirectory( MySQL )
|
||||
message(STATUS "MySQL Support Enabled")
|
||||
add_subdirectory(MySQL)
|
||||
else()
|
||||
message(STATUS "MySQL Support Disabled")
|
||||
message(STATUS "MySQL Support Disabled")
|
||||
endif()
|
||||
|
||||
if(POSTGRESQL_FOUND AND ENABLE_DATA_POSTGRESQL)
|
||||
message(STATUS "PostgreSQL Support Enabled")
|
||||
add_subdirectory( PostgreSQL )
|
||||
message(STATUS "PostgreSQL Support Enabled")
|
||||
add_subdirectory(PostgreSQL)
|
||||
else()
|
||||
message(STATUS "PostgreSQL Support Disabled")
|
||||
message(STATUS "PostgreSQL Support Disabled")
|
||||
endif()
|
||||
|
||||
if(ODBC_FOUND AND ENABLE_DATA_ODBC AND NOT WINCE)
|
||||
message(STATUS "ODBC Support Enabled")
|
||||
add_subdirectory( ODBC )
|
||||
add_subdirectory(ODBC)
|
||||
else()
|
||||
message(STATUS "ODBC Support Disabled")
|
||||
endif()
|
||||
|
||||
if (ENABLE_TESTS)
|
||||
add_subdirectory(samples)
|
||||
add_subdirectory(testsuite)
|
||||
endif ()
|
||||
if(ENABLE_TESTS)
|
||||
add_subdirectory(samples)
|
||||
add_subdirectory(testsuite)
|
||||
endif()
|
||||
|
@ -1,42 +1,42 @@
|
||||
# Sources
|
||||
file(GLOB SRCS_G "src/*.cpp")
|
||||
POCO_SOURCES_AUTO( MYSQL_SRCS ${SRCS_G})
|
||||
POCO_SOURCES_AUTO(MYSQL_SRCS ${SRCS_G})
|
||||
|
||||
# Headers
|
||||
file(GLOB_RECURSE HDRS_G "include/*.h" )
|
||||
POCO_HEADERS_AUTO( MYSQL_SRCS ${HDRS_G})
|
||||
file(GLOB_RECURSE HDRS_G "include/*.h")
|
||||
POCO_HEADERS_AUTO(MYSQL_SRCS ${HDRS_G})
|
||||
|
||||
# Version Resource
|
||||
if(MSVC AND NOT POCO_STATIC)
|
||||
source_group("Resources" FILES ${PROJECT_SOURCE_DIR}/DLLVersion.rc)
|
||||
list(APPEND MYSQL_SRCS ${PROJECT_SOURCE_DIR}/DLLVersion.rc)
|
||||
if(MSVC AND BUILD_SHARED_LIBS)
|
||||
source_group("Resources" FILES ${PROJECT_SOURCE_DIR}/DLLVersion.rc)
|
||||
list(APPEND MYSQL_SRCS ${PROJECT_SOURCE_DIR}/DLLVersion.rc)
|
||||
endif()
|
||||
|
||||
add_library(DataMySQL ${MYSQL_SRCS} )
|
||||
add_library(DataMySQL ${MYSQL_SRCS})
|
||||
add_library(Poco::DataMySQL ALIAS DataMySQL)
|
||||
set_target_properties(DataMySQL
|
||||
PROPERTIES
|
||||
VERSION ${SHARED_LIBRARY_VERSION} SOVERSION ${SHARED_LIBRARY_VERSION}
|
||||
OUTPUT_NAME PocoDataMySQL
|
||||
DEFINE_SYMBOL MySQL_EXPORTS
|
||||
)
|
||||
PROPERTIES
|
||||
VERSION ${SHARED_LIBRARY_VERSION} SOVERSION ${SHARED_LIBRARY_VERSION}
|
||||
OUTPUT_NAME PocoDataMySQL
|
||||
DEFINE_SYMBOL MySQL_EXPORTS
|
||||
)
|
||||
|
||||
target_link_libraries(DataMySQL PUBLIC Poco::Data MySQL::client)
|
||||
target_include_directories(DataMySQL
|
||||
PUBLIC
|
||||
$<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}/include>
|
||||
$<INSTALL_INTERFACE:include>
|
||||
PRIVATE ${CMAKE_CURRENT_SOURCE_DIR}/src
|
||||
)
|
||||
PUBLIC
|
||||
$<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}/include>
|
||||
$<INSTALL_INTERFACE:include>
|
||||
PRIVATE ${CMAKE_CURRENT_SOURCE_DIR}/src
|
||||
)
|
||||
target_compile_definitions(DataMySQL PUBLIC THREADSAFE NO_TCL)
|
||||
|
||||
if(WIN32)
|
||||
target_compile_definitions(DataMySQL PUBLIC __LCC__) #__LCC__ define used by MySQL.h
|
||||
target_compile_definitions(DataMySQL PUBLIC __LCC__) #__LCC__ define used by MySQL.h
|
||||
endif()
|
||||
|
||||
POCO_INSTALL(DataMySQL)
|
||||
POCO_GENERATE_PACKAGE(DataMySQL)
|
||||
|
||||
if (ENABLE_TESTS)
|
||||
add_subdirectory(testsuite)
|
||||
endif ()
|
||||
if(ENABLE_TESTS)
|
||||
add_subdirectory(testsuite)
|
||||
endif()
|
||||
|
@ -41,19 +41,33 @@ public:
|
||||
static const std::string MYSQL_REPEATABLE_READ;
|
||||
static const std::string MYSQL_SERIALIZABLE;
|
||||
|
||||
SessionImpl(const std::string& connectionString,
|
||||
std::size_t loginTimeout = LOGIN_TIMEOUT_DEFAULT);
|
||||
/// Creates the SessionImpl. Opens a connection to the database
|
||||
SessionImpl(const std::string& connectionString, std::size_t loginTimeout = LOGIN_TIMEOUT_DEFAULT);
|
||||
/// Creates the SessionImpl. Opens a connection to the database.
|
||||
///
|
||||
/// Connection string format:
|
||||
/// <str> == <assignment> | <assignment> ';' <str>
|
||||
/// <assignment> == <name> '=' <value>
|
||||
/// <name> == 'host' | 'port' | 'user' | 'password' | 'db' } 'compress' | 'auto-reconnect'
|
||||
/// <name> == 'host' | 'port' | 'user' | 'password' | 'db' | 'compress' | 'auto-reconnect' | 'reset' | 'fail-readonly'
|
||||
/// <value> == [~;]*
|
||||
///
|
||||
/// for compress and auto-reconnect correct values are true/false
|
||||
/// for port - numeric in decimal notation
|
||||
/// The following settings are supported:
|
||||
/// - host: MySQL server hostname or IP address (default: localhost)
|
||||
/// - port: MySQL server port number (default: 3306)
|
||||
/// - user: MySQL user name
|
||||
/// - password: MySQL password
|
||||
/// - compress: enable compression (true/false; default: false)
|
||||
/// - auto-reconnect: enable automatic reconnect (true/false; default: false)
|
||||
/// - secure-auth: use secure authentication (true/false; default: false)
|
||||
/// - character-set: connection character set (default: utf8)
|
||||
/// - reset: reset connection when returned to SessionPool by calling
|
||||
/// mysql_reset_connection().
|
||||
/// - fail-readonly: if set to true, the session will fail
|
||||
/// if the database becomes read-only. This corresponds to
|
||||
/// setFailIfInnoReadOnly(true).
|
||||
///
|
||||
/// Warning: Due to a bug in MySQL, resetting the connection with mysql_reset_connection()
|
||||
/// could change the character encoding used for the connection. Therefore the
|
||||
/// reset option should be used with caution.
|
||||
|
||||
~SessionImpl();
|
||||
/// Destroys the SessionImpl.
|
||||
@ -182,6 +196,7 @@ private:
|
||||
|
||||
std::string _connector;
|
||||
mutable SessionHandle _handle;
|
||||
bool _reset;
|
||||
bool _connected;
|
||||
bool _inTransaction;
|
||||
bool _failIfInnoReadOnly;
|
||||
|
@ -48,6 +48,7 @@ SessionImpl::SessionImpl(const std::string& connectionString, std::size_t loginT
|
||||
Poco::Data::AbstractSessionImpl<SessionImpl>(connectionString, loginTimeout),
|
||||
_connector("MySQL"),
|
||||
_handle(0),
|
||||
_reset(false),
|
||||
_connected(false),
|
||||
_inTransaction(false),
|
||||
_failIfInnoReadOnly(false),
|
||||
@ -90,6 +91,8 @@ void SessionImpl::open(const std::string& connect)
|
||||
options["auto-reconnect"] = "";
|
||||
options["secure-auth"] = "";
|
||||
options["character-set"] = "utf8";
|
||||
options["reset"] = "";
|
||||
options["fail-readonly"] = "";
|
||||
|
||||
const std::string& connString = connectionString();
|
||||
for (std::string::const_iterator start = connString.begin();;)
|
||||
@ -123,14 +126,14 @@ void SessionImpl::open(const std::string& connect)
|
||||
else if (options["compress"] == "false")
|
||||
;
|
||||
else if (!options["compress"].empty())
|
||||
throw MySQLException("create session: specify correct compress option (true or false) or skip it");
|
||||
throw MySQLException("create session: specify correct compress option (true or false)");
|
||||
|
||||
if (options["auto-reconnect"] == "true")
|
||||
_handle.options(MYSQL_OPT_RECONNECT, true);
|
||||
else if (options["auto-reconnect"] == "false")
|
||||
_handle.options(MYSQL_OPT_RECONNECT, false);
|
||||
else if (!options["auto-reconnect"].empty())
|
||||
throw MySQLException("create session: specify correct auto-reconnect option (true or false) or skip it");
|
||||
throw MySQLException("create session: specify correct auto-reconnect option (true or false)");
|
||||
|
||||
#ifdef MYSQL_SECURE_AUTH
|
||||
if (options["secure-auth"] == "true")
|
||||
@ -138,12 +141,26 @@ void SessionImpl::open(const std::string& connect)
|
||||
else if (options["secure-auth"] == "false")
|
||||
_handle.options(MYSQL_SECURE_AUTH, false);
|
||||
else if (!options["secure-auth"].empty())
|
||||
throw MySQLException("create session: specify correct secure-auth option (true or false) or skip it");
|
||||
throw MySQLException("create session: specify correct secure-auth option (true or false)");
|
||||
#endif
|
||||
|
||||
if (!options["character-set"].empty())
|
||||
_handle.options(MYSQL_SET_CHARSET_NAME, options["character-set"].c_str());
|
||||
|
||||
if (options["reset"] == "true")
|
||||
_reset = true;
|
||||
else if (options["reset"] == "false")
|
||||
_reset = false;
|
||||
else if (!options["reset"].empty())
|
||||
throw MySQLException("create session: specify correct reset option (true or false)");
|
||||
|
||||
if (options["fail-readonly"] == "true")
|
||||
_failIfInnoReadOnly = true;
|
||||
else if (options["fail-readonly"] == "false")
|
||||
_failIfInnoReadOnly = false;
|
||||
else if (!options["fail-readonly"].empty())
|
||||
throw MySQLException("create session: specify correct fail-readonly option (true or false)");
|
||||
|
||||
// Real connect
|
||||
_handle.connect(options["host"].c_str(),
|
||||
options["user"].c_str(),
|
||||
@ -264,8 +281,10 @@ bool SessionImpl::hasTransactionIsolation(Poco::UInt32 ti) const
|
||||
|
||||
void SessionImpl::reset()
|
||||
{
|
||||
if (_connected)
|
||||
if (_connected && _reset)
|
||||
{
|
||||
_handle.reset();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
@ -1,21 +1,28 @@
|
||||
# Sources
|
||||
file(GLOB SRCS_G "src/*.cpp")
|
||||
POCO_SOURCES_AUTO( TEST_SRCS ${SRCS_G})
|
||||
POCO_SOURCES_AUTO(TEST_SRCS ${SRCS_G})
|
||||
|
||||
# Headers
|
||||
file(GLOB_RECURSE HDRS_G "src/*.h" )
|
||||
POCO_HEADERS_AUTO( TEST_SRCS ${HDRS_G})
|
||||
file(GLOB_RECURSE HDRS_G "src/*.h")
|
||||
POCO_HEADERS_AUTO(TEST_SRCS ${HDRS_G})
|
||||
|
||||
POCO_SOURCES_AUTO_PLAT( TEST_SRCS OFF
|
||||
src/WinDriver.cpp
|
||||
POCO_SOURCES_AUTO_PLAT(TEST_SRCS OFF
|
||||
src/WinDriver.cpp
|
||||
)
|
||||
|
||||
add_executable(DataMySQL-testrunner ${TEST_SRCS} )
|
||||
add_executable(DataMySQL-testrunner ${TEST_SRCS})
|
||||
if(ANDROID)
|
||||
add_test(NAME DataMySQL WORKING_DIRECTORY ${CMAKE_RUNTIME_OUTPUT_DIRECTORY}
|
||||
COMMAND ${CMAKE_COMMAND} -DANDROID_NDK=${ANDROID_NDK} -DLIBRARY_DIR=${CMAKE_BINARY_DIR}/lib -DUNITTEST=${CMAKE_BINARY_DIR}/bin/DataMySQL-testrunner -DTEST_PARAMETER=-all -P ${CMAKE_SOURCE_DIR}/cmake/ExecuteOnAndroid.cmake)
|
||||
add_test(
|
||||
NAME DataMySQL
|
||||
WORKING_DIRECTORY ${CMAKE_RUNTIME_OUTPUT_DIRECTORY}
|
||||
COMMAND ${CMAKE_COMMAND} -DANDROID_NDK=${ANDROID_NDK} -DLIBRARY_DIR=${CMAKE_BINARY_DIR}/lib -DUNITTEST=${CMAKE_BINARY_DIR}/bin/DataMySQL-testrunner -DTEST_PARAMETER=-all -P ${CMAKE_SOURCE_DIR}/cmake/ExecuteOnAndroid.cmake
|
||||
)
|
||||
else()
|
||||
add_test(NAME DataMySQL WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR} COMMAND DataMySQL-testrunner -ignore ${CMAKE_SOURCE_DIR}/cppignore.lnx -all)
|
||||
set_tests_properties(DataMySQL PROPERTIES ENVIRONMENT POCO_BASE=${CMAKE_SOURCE_DIR})
|
||||
add_test(
|
||||
NAME DataMySQL
|
||||
WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}
|
||||
COMMAND DataMySQL-testrunner -ignore ${CMAKE_SOURCE_DIR}/cppignore.lnx -all
|
||||
)
|
||||
set_tests_properties(DataMySQL PROPERTIES ENVIRONMENT POCO_BASE=${CMAKE_SOURCE_DIR})
|
||||
endif()
|
||||
target_link_libraries(DataMySQL-testrunner PUBLIC Poco::DataMySQL CppUnit)
|
||||
|
@ -1,38 +1,38 @@
|
||||
# Sources
|
||||
file(GLOB SRCS_G "src/*.cpp")
|
||||
POCO_SOURCES_AUTO( ODBC_SRCS ${SRCS_G})
|
||||
POCO_SOURCES_AUTO(ODBC_SRCS ${SRCS_G})
|
||||
|
||||
# Headers
|
||||
file(GLOB_RECURSE HDRS_G "include/*.h" )
|
||||
POCO_HEADERS_AUTO( ODBC_SRCS ${HDRS_G})
|
||||
file(GLOB_RECURSE HDRS_G "include/*.h")
|
||||
POCO_HEADERS_AUTO(ODBC_SRCS ${HDRS_G})
|
||||
|
||||
# Version Resource
|
||||
if(MSVC AND NOT POCO_STATIC)
|
||||
source_group("Resources" FILES ${PROJECT_SOURCE_DIR}/DLLVersion.rc)
|
||||
list(APPEND ODBC_SRCS ${PROJECT_SOURCE_DIR}/DLLVersion.rc)
|
||||
if(MSVC AND BUILD_SHARED_LIBS)
|
||||
source_group("Resources" FILES ${PROJECT_SOURCE_DIR}/DLLVersion.rc)
|
||||
list(APPEND ODBC_SRCS ${PROJECT_SOURCE_DIR}/DLLVersion.rc)
|
||||
endif()
|
||||
|
||||
add_library(DataODBC ${ODBC_SRCS})
|
||||
add_library(Poco::DataODBC ALIAS DataODBC)
|
||||
set_target_properties(DataODBC
|
||||
PROPERTIES
|
||||
VERSION ${SHARED_LIBRARY_VERSION} SOVERSION ${SHARED_LIBRARY_VERSION}
|
||||
OUTPUT_NAME PocoDataODBC
|
||||
DEFINE_SYMBOL ODBC_EXPORTS
|
||||
)
|
||||
PROPERTIES
|
||||
VERSION ${SHARED_LIBRARY_VERSION} SOVERSION ${SHARED_LIBRARY_VERSION}
|
||||
OUTPUT_NAME PocoDataODBC
|
||||
DEFINE_SYMBOL ODBC_EXPORTS
|
||||
)
|
||||
|
||||
target_link_libraries(DataODBC PUBLIC Poco::Data ODBC::ODBC)
|
||||
target_include_directories(DataODBC
|
||||
PUBLIC
|
||||
$<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}/include>
|
||||
$<INSTALL_INTERFACE:include>
|
||||
PRIVATE ${CMAKE_CURRENT_SOURCE_DIR}/src
|
||||
)
|
||||
PUBLIC
|
||||
$<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}/include>
|
||||
$<INSTALL_INTERFACE:include>
|
||||
PRIVATE ${CMAKE_CURRENT_SOURCE_DIR}/src
|
||||
)
|
||||
target_compile_definitions(DataODBC PUBLIC THREADSAFE)
|
||||
|
||||
POCO_INSTALL(DataODBC)
|
||||
POCO_GENERATE_PACKAGE(DataODBC)
|
||||
|
||||
if (ENABLE_TESTS)
|
||||
add_subdirectory(testsuite)
|
||||
endif ()
|
||||
if(ENABLE_TESTS)
|
||||
add_subdirectory(testsuite)
|
||||
endif()
|
||||
|
@ -103,7 +103,7 @@ public:
|
||||
|
||||
void bind(std::size_t pos, const Poco::Int16& val, Direction dir);
|
||||
/// Binds an Int16.
|
||||
|
||||
|
||||
void bind(std::size_t pos, const std::vector<Poco::Int16>& val, Direction dir);
|
||||
/// Binds an Int16 vector.
|
||||
|
||||
@ -344,7 +344,7 @@ public:
|
||||
/// Returns bound data size for parameter at specified position.
|
||||
|
||||
void synchronize();
|
||||
/// Transfers the results of non-POD outbound parameters from internal
|
||||
/// Transfers the results of non-POD outbound parameters from internal
|
||||
/// holders back into the externally supplied buffers.
|
||||
|
||||
void reset();
|
||||
@ -375,7 +375,7 @@ private:
|
||||
/// Sets the description field for the parameter, if needed.
|
||||
|
||||
void bind(std::size_t pos, const char* const& pVal, Direction dir);
|
||||
/// Binds a const char ptr.
|
||||
/// Binds a const char ptr.
|
||||
/// This is a private no-op in this implementation
|
||||
/// due to security risk.
|
||||
|
||||
@ -392,11 +392,11 @@ private:
|
||||
|
||||
_lengthIndicator.push_back(0);
|
||||
|
||||
if (Utility::isError(SQLBindParameter(_rStmt,
|
||||
(SQLUSMALLINT) pos + 1,
|
||||
toODBCDirection(dir),
|
||||
cDataType,
|
||||
Utility::sqlDataType(cDataType),
|
||||
if (Utility::isError(SQLBindParameter(_rStmt,
|
||||
(SQLUSMALLINT) pos + 1,
|
||||
toODBCDirection(dir),
|
||||
cDataType,
|
||||
Utility::sqlDataType(cDataType),
|
||||
colSize,
|
||||
decDigits,
|
||||
(SQLPOINTER) &val, 0, 0)))
|
||||
@ -413,7 +413,7 @@ private:
|
||||
|
||||
SQLPOINTER pVal = (SQLPOINTER) val.rawContent();
|
||||
SQLINTEGER size = (SQLINTEGER) val.size();
|
||||
|
||||
|
||||
_inParams.insert(ParamMap::value_type(pVal, size));
|
||||
|
||||
SQLLEN* pLenIn = new SQLLEN;
|
||||
@ -424,15 +424,15 @@ private:
|
||||
|
||||
_lengthIndicator.push_back(pLenIn);
|
||||
|
||||
if (Utility::isError(SQLBindParameter(_rStmt,
|
||||
(SQLUSMALLINT) pos + 1,
|
||||
SQL_PARAM_INPUT,
|
||||
SQL_C_BINARY,
|
||||
SQL_LONGVARBINARY,
|
||||
if (Utility::isError(SQLBindParameter(_rStmt,
|
||||
(SQLUSMALLINT) pos + 1,
|
||||
SQL_PARAM_INPUT,
|
||||
SQL_C_BINARY,
|
||||
SQL_LONGVARBINARY,
|
||||
(SQLUINTEGER) size,
|
||||
0,
|
||||
pVal,
|
||||
(SQLINTEGER) size,
|
||||
(SQLINTEGER) size,
|
||||
_lengthIndicator.back())))
|
||||
{
|
||||
throw StatementException(_rStmt, "SQLBindParameter(LOB)");
|
||||
@ -457,15 +457,15 @@ private:
|
||||
_vecLengthIndicator[pos] = new LengthVec(length);
|
||||
}
|
||||
|
||||
if (Utility::isError(SQLBindParameter(_rStmt,
|
||||
(SQLUSMALLINT) pos + 1,
|
||||
toODBCDirection(dir),
|
||||
cDataType,
|
||||
Utility::sqlDataType(cDataType),
|
||||
if (Utility::isError(SQLBindParameter(_rStmt,
|
||||
(SQLUSMALLINT) pos + 1,
|
||||
toODBCDirection(dir),
|
||||
cDataType,
|
||||
Utility::sqlDataType(cDataType),
|
||||
colSize,
|
||||
decDigits,
|
||||
(SQLPOINTER) &val[0],
|
||||
0,
|
||||
(SQLPOINTER) &val[0],
|
||||
0,
|
||||
&(*_vecLengthIndicator[pos])[0])))
|
||||
{
|
||||
throw StatementException(_rStmt, "SQLBindParameter()");
|
||||
@ -518,15 +518,15 @@ private:
|
||||
typename C::const_iterator end = val.end();
|
||||
for (int i = 0; it != end; ++it, ++i) _boolPtrs[pos][i] = *it;
|
||||
|
||||
if (Utility::isError(SQLBindParameter(_rStmt,
|
||||
(SQLUSMALLINT) pos + 1,
|
||||
toODBCDirection(dir),
|
||||
cDataType,
|
||||
Utility::sqlDataType(cDataType),
|
||||
if (Utility::isError(SQLBindParameter(_rStmt,
|
||||
(SQLUSMALLINT) pos + 1,
|
||||
toODBCDirection(dir),
|
||||
cDataType,
|
||||
Utility::sqlDataType(cDataType),
|
||||
colSize,
|
||||
decDigits,
|
||||
(SQLPOINTER) &_boolPtrs[pos][0],
|
||||
0,
|
||||
(SQLPOINTER) &_boolPtrs[pos][0],
|
||||
0,
|
||||
&(*_vecLengthIndicator[pos])[0])))
|
||||
{
|
||||
throw StatementException(_rStmt, "SQLBindParameter()");
|
||||
@ -571,7 +571,7 @@ private:
|
||||
_charPtrs.resize(pos + 1, 0);
|
||||
|
||||
_charPtrs[pos] = (char*) std::calloc(val.size() * size, sizeof(char));
|
||||
|
||||
|
||||
std::size_t strSize;
|
||||
std::size_t offset = 0;
|
||||
typename C::const_iterator it = val.begin();
|
||||
@ -579,21 +579,21 @@ private:
|
||||
for (; it != end; ++it)
|
||||
{
|
||||
strSize = it->size();
|
||||
if (strSize > size)
|
||||
if (strSize > size)
|
||||
throw LengthExceededException("SQLBindParameter(std::vector<std::string>)");
|
||||
std::memcpy(_charPtrs[pos] + offset, it->c_str(), strSize);
|
||||
offset += size;
|
||||
}
|
||||
|
||||
if (Utility::isError(SQLBindParameter(_rStmt,
|
||||
(SQLUSMALLINT) pos + 1,
|
||||
toODBCDirection(dir),
|
||||
SQL_C_CHAR,
|
||||
SQL_LONGVARCHAR,
|
||||
if (Utility::isError(SQLBindParameter(_rStmt,
|
||||
(SQLUSMALLINT) pos + 1,
|
||||
toODBCDirection(dir),
|
||||
SQL_C_CHAR,
|
||||
SQL_LONGVARCHAR,
|
||||
(SQLUINTEGER) size - 1,
|
||||
0,
|
||||
_charPtrs[pos],
|
||||
(SQLINTEGER) size,
|
||||
_charPtrs[pos],
|
||||
(SQLINTEGER) size,
|
||||
&(*_vecLengthIndicator[pos])[0])))
|
||||
{
|
||||
throw StatementException(_rStmt, "SQLBindParameter(std::vector<std::string>)");
|
||||
@ -696,7 +696,7 @@ private:
|
||||
std::vector<SQLLEN>::iterator lIt = _vecLengthIndicator[pos]->begin();
|
||||
std::vector<SQLLEN>::iterator lEnd = _vecLengthIndicator[pos]->end();
|
||||
typename C::const_iterator cIt = val.begin();
|
||||
for (; lIt != lEnd; ++lIt, ++cIt)
|
||||
for (; lIt != lEnd; ++lIt, ++cIt)
|
||||
{
|
||||
SQLLEN sz = static_cast<SQLLEN>(cIt->size());
|
||||
if (sz > size) size = static_cast<SQLINTEGER>(sz);
|
||||
@ -716,21 +716,21 @@ private:
|
||||
for (; cIt != cEnd; ++cIt)
|
||||
{
|
||||
blobSize = cIt->size();
|
||||
if (blobSize > size)
|
||||
if (blobSize > size)
|
||||
throw LengthExceededException("SQLBindParameter(std::vector<BLOB>)");
|
||||
std::memcpy(_charPtrs[pos] + offset, cIt->rawContent(), blobSize * sizeof(CharType));
|
||||
offset += size;
|
||||
}
|
||||
|
||||
if (Utility::isError(SQLBindParameter(_rStmt,
|
||||
(SQLUSMALLINT) pos + 1,
|
||||
SQL_PARAM_INPUT,
|
||||
SQL_C_BINARY,
|
||||
SQL_LONGVARBINARY,
|
||||
if (Utility::isError(SQLBindParameter(_rStmt,
|
||||
(SQLUSMALLINT) pos + 1,
|
||||
SQL_PARAM_INPUT,
|
||||
SQL_C_BINARY,
|
||||
SQL_LONGVARBINARY,
|
||||
(SQLUINTEGER) size,
|
||||
0,
|
||||
_charPtrs[pos],
|
||||
(SQLINTEGER) size,
|
||||
_charPtrs[pos],
|
||||
(SQLINTEGER) size,
|
||||
&(*_vecLengthIndicator[pos])[0])))
|
||||
{
|
||||
throw StatementException(_rStmt, "SQLBindParameter(std::vector<BLOB>)");
|
||||
@ -753,8 +753,6 @@ private:
|
||||
|
||||
setParamSetSize(length);
|
||||
|
||||
SQLINTEGER size = (SQLINTEGER) sizeof(SQL_DATE_STRUCT);
|
||||
|
||||
if (_vecLengthIndicator.size() <= pos)
|
||||
{
|
||||
_vecLengthIndicator.resize(pos + 1, 0);
|
||||
@ -773,15 +771,15 @@ private:
|
||||
SQLSMALLINT decDigits = 0;
|
||||
getColSizeAndPrecision(pos, SQL_TYPE_DATE, colSize, decDigits);
|
||||
|
||||
if (Utility::isError(SQLBindParameter(_rStmt,
|
||||
(SQLUSMALLINT) pos + 1,
|
||||
toODBCDirection(dir),
|
||||
SQL_C_TYPE_DATE,
|
||||
SQL_TYPE_DATE,
|
||||
if (Utility::isError(SQLBindParameter(_rStmt,
|
||||
(SQLUSMALLINT) pos + 1,
|
||||
toODBCDirection(dir),
|
||||
SQL_C_TYPE_DATE,
|
||||
SQL_TYPE_DATE,
|
||||
colSize,
|
||||
decDigits,
|
||||
(SQLPOINTER) &(*_dateVecVec[pos])[0],
|
||||
0,
|
||||
(SQLPOINTER) &(*_dateVecVec[pos])[0],
|
||||
0,
|
||||
&(*_vecLengthIndicator[pos])[0])))
|
||||
{
|
||||
throw StatementException(_rStmt, "SQLBindParameter(Date[])");
|
||||
@ -803,8 +801,6 @@ private:
|
||||
|
||||
setParamSetSize(val.size());
|
||||
|
||||
SQLINTEGER size = (SQLINTEGER) sizeof(SQL_TIME_STRUCT);
|
||||
|
||||
if (_vecLengthIndicator.size() <= pos)
|
||||
{
|
||||
_vecLengthIndicator.resize(pos + 1, 0);
|
||||
@ -823,15 +819,15 @@ private:
|
||||
SQLSMALLINT decDigits = 0;
|
||||
getColSizeAndPrecision(pos, SQL_TYPE_TIME, colSize, decDigits);
|
||||
|
||||
if (Utility::isError(SQLBindParameter(_rStmt,
|
||||
(SQLUSMALLINT) pos + 1,
|
||||
toODBCDirection(dir),
|
||||
SQL_C_TYPE_TIME,
|
||||
SQL_TYPE_TIME,
|
||||
if (Utility::isError(SQLBindParameter(_rStmt,
|
||||
(SQLUSMALLINT) pos + 1,
|
||||
toODBCDirection(dir),
|
||||
SQL_C_TYPE_TIME,
|
||||
SQL_TYPE_TIME,
|
||||
colSize,
|
||||
decDigits,
|
||||
(SQLPOINTER) &(*_timeVecVec[pos])[0],
|
||||
0,
|
||||
(SQLPOINTER) &(*_timeVecVec[pos])[0],
|
||||
0,
|
||||
&(*_vecLengthIndicator[pos])[0])))
|
||||
{
|
||||
throw StatementException(_rStmt, "SQLBindParameter(Time[])");
|
||||
@ -854,8 +850,6 @@ private:
|
||||
|
||||
setParamSetSize(length);
|
||||
|
||||
SQLINTEGER size = (SQLINTEGER) sizeof(SQL_TIMESTAMP_STRUCT);
|
||||
|
||||
if (_vecLengthIndicator.size() <= pos)
|
||||
{
|
||||
_vecLengthIndicator.resize(pos + 1, 0);
|
||||
@ -874,15 +868,15 @@ private:
|
||||
SQLSMALLINT decDigits = 0;
|
||||
getColSizeAndPrecision(pos, SQL_TYPE_TIMESTAMP, colSize, decDigits);
|
||||
|
||||
if (Utility::isError(SQLBindParameter(_rStmt,
|
||||
(SQLUSMALLINT) pos + 1,
|
||||
toODBCDirection(dir),
|
||||
SQL_C_TYPE_TIMESTAMP,
|
||||
SQL_TYPE_TIMESTAMP,
|
||||
if (Utility::isError(SQLBindParameter(_rStmt,
|
||||
(SQLUSMALLINT) pos + 1,
|
||||
toODBCDirection(dir),
|
||||
SQL_C_TYPE_TIMESTAMP,
|
||||
SQL_TYPE_TIMESTAMP,
|
||||
colSize,
|
||||
decDigits,
|
||||
(SQLPOINTER) &(*_dateTimeVecVec[pos])[0],
|
||||
0,
|
||||
(SQLPOINTER) &(*_dateTimeVecVec[pos])[0],
|
||||
0,
|
||||
&(*_vecLengthIndicator[pos])[0])))
|
||||
{
|
||||
throw StatementException(_rStmt, "SQLBindParameter(Time[])");
|
||||
@ -905,8 +899,6 @@ private:
|
||||
|
||||
setParamSetSize(length);
|
||||
|
||||
SQLINTEGER size = SQL_NULL_DATA;
|
||||
|
||||
if (_vecLengthIndicator.size() <= pos)
|
||||
{
|
||||
_vecLengthIndicator.resize(pos + 1, 0);
|
||||
@ -917,32 +909,32 @@ private:
|
||||
SQLSMALLINT decDigits = 0;
|
||||
getColSizeAndPrecision(pos, SQL_C_STINYINT, colSize, decDigits);
|
||||
|
||||
if (Utility::isError(SQLBindParameter(_rStmt,
|
||||
(SQLUSMALLINT) pos + 1,
|
||||
SQL_PARAM_INPUT,
|
||||
SQL_C_STINYINT,
|
||||
Utility::sqlDataType(SQL_C_STINYINT),
|
||||
if (Utility::isError(SQLBindParameter(_rStmt,
|
||||
(SQLUSMALLINT) pos + 1,
|
||||
SQL_PARAM_INPUT,
|
||||
SQL_C_STINYINT,
|
||||
Utility::sqlDataType(SQL_C_STINYINT),
|
||||
colSize,
|
||||
decDigits,
|
||||
0,
|
||||
0,
|
||||
0,
|
||||
0,
|
||||
&(*_vecLengthIndicator[pos])[0])))
|
||||
{
|
||||
throw StatementException(_rStmt, "SQLBindParameter()");
|
||||
}
|
||||
}
|
||||
|
||||
void getColSizeAndPrecision(std::size_t pos,
|
||||
SQLSMALLINT cDataType,
|
||||
SQLINTEGER& colSize,
|
||||
void getColSizeAndPrecision(std::size_t pos,
|
||||
SQLSMALLINT cDataType,
|
||||
SQLINTEGER& colSize,
|
||||
SQLSMALLINT& decDigits,
|
||||
std::size_t actualSize = 0);
|
||||
/// Used to retrieve column size and precision.
|
||||
/// Not all drivers cooperate with this inquiry under all circumstances
|
||||
/// This function runs for query and stored procedure parameters (in and
|
||||
/// out-bound). Some drivers, however, do not care about knowing this
|
||||
/// information to start with. For that reason, after all the attempts
|
||||
/// to discover the required values are unsuccesfully exhausted, the values
|
||||
/// This function runs for query and stored procedure parameters (in and
|
||||
/// out-bound). Some drivers, however, do not care about knowing this
|
||||
/// information to start with. For that reason, after all the attempts
|
||||
/// to discover the required values are unsuccesfully exhausted, the values
|
||||
/// are both set to zero and no exception is thrown.
|
||||
/// However, if the colSize is succesfully retrieved and it is greater than
|
||||
/// session-wide maximum allowed field size, LengthExceededException is thrown.
|
||||
@ -953,7 +945,7 @@ private:
|
||||
void getColumnOrParameterSize(std::size_t pos, SQLINTEGER& size);
|
||||
/// Fills the column or parameter size into the 'size' argument.
|
||||
/// Does nothing if neither can be obtained from the driver, so
|
||||
/// size should be set to some default value prior to calling this
|
||||
/// size should be set to some default value prior to calling this
|
||||
/// function in order to avoid undefined size value.
|
||||
|
||||
void freeMemory();
|
||||
@ -962,9 +954,9 @@ private:
|
||||
template<typename T>
|
||||
void getMinValueSize(T& val, SQLINTEGER& size)
|
||||
/// Some ODBC drivers return DB-wide maximum allowed size for variable size columns,
|
||||
/// rather than the allowed size for the actual column. In such cases, the length is
|
||||
/// rather than the allowed size for the actual column. In such cases, the length is
|
||||
/// automatically resized to the maximum field size allowed by the session.
|
||||
/// This function, in order to prevent unnecessary memory allocation, does further
|
||||
/// This function, in order to prevent unnecessary memory allocation, does further
|
||||
/// optimization, looking for the maximum length within supplied data container and
|
||||
/// uses the smaller of maximum found and maximum predefined data length.
|
||||
{
|
||||
@ -1000,7 +992,7 @@ private:
|
||||
ParamMap _inParams;
|
||||
ParamMap _outParams;
|
||||
ParameterBinding _paramBinding;
|
||||
|
||||
|
||||
DateMap _dates;
|
||||
TimeMap _times;
|
||||
TimestampMap _timestamps;
|
||||
|
@ -1,21 +1,28 @@
|
||||
# Sources
|
||||
file(GLOB SRCS_G "src/*.cpp")
|
||||
POCO_SOURCES_AUTO( TEST_SRCS ${SRCS_G})
|
||||
POCO_SOURCES_AUTO(TEST_SRCS ${SRCS_G})
|
||||
|
||||
# Headers
|
||||
file(GLOB_RECURSE HDRS_G "src/*.h" )
|
||||
POCO_HEADERS_AUTO( TEST_SRCS ${HDRS_G})
|
||||
file(GLOB_RECURSE HDRS_G "src/*.h")
|
||||
POCO_HEADERS_AUTO(TEST_SRCS ${HDRS_G})
|
||||
|
||||
POCO_SOURCES_AUTO_PLAT( TEST_SRCS OFF
|
||||
src/WinDriver.cpp
|
||||
POCO_SOURCES_AUTO_PLAT(TEST_SRCS OFF
|
||||
src/WinDriver.cpp
|
||||
)
|
||||
|
||||
add_executable(DataODBC-testrunner ${TEST_SRCS} )
|
||||
add_executable(DataODBC-testrunner ${TEST_SRCS})
|
||||
if(ANDROID)
|
||||
add_test(NAME DataODBC WORKING_DIRECTORY ${CMAKE_RUNTIME_OUTPUT_DIRECTORY}
|
||||
COMMAND ${CMAKE_COMMAND} -DANDROID_NDK=${ANDROID_NDK} -DLIBRARY_DIR=${CMAKE_BINARY_DIR}/lib -DUNITTEST=${CMAKE_BINARY_DIR}/bin/DataODBC-testrunner -DTEST_PARAMETER=-all -P ${CMAKE_SOURCE_DIR}/cmake/ExecuteOnAndroid.cmake)
|
||||
add_test(
|
||||
NAME DataODBC
|
||||
WORKING_DIRECTORY ${CMAKE_RUNTIME_OUTPUT_DIRECTORY}
|
||||
COMMAND ${CMAKE_COMMAND} -DANDROID_NDK=${ANDROID_NDK} -DLIBRARY_DIR=${CMAKE_BINARY_DIR}/lib -DUNITTEST=${CMAKE_BINARY_DIR}/bin/DataODBC-testrunner -DTEST_PARAMETER=-all -P ${CMAKE_SOURCE_DIR}/cmake/ExecuteOnAndroid.cmake
|
||||
)
|
||||
else()
|
||||
add_test(NAME DataODBC WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR} COMMAND DataODBC-testrunner -ignore ${CMAKE_SOURCE_DIR}/cppignore.lnx -all)
|
||||
set_tests_properties(DataODBC PROPERTIES ENVIRONMENT POCO_BASE=${CMAKE_SOURCE_DIR})
|
||||
add_test(
|
||||
NAME DataODBC
|
||||
WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}
|
||||
COMMAND DataODBC-testrunner -ignore ${CMAKE_SOURCE_DIR}/cppignore.lnx -all
|
||||
)
|
||||
set_tests_properties(DataODBC PROPERTIES ENVIRONMENT POCO_BASE=${CMAKE_SOURCE_DIR})
|
||||
endif()
|
||||
target_link_libraries(DataODBC-testrunner PUBLIC Poco::DataODBC CppUnit)
|
||||
|
@ -1,31 +1,31 @@
|
||||
# Sources
|
||||
file(GLOB SRCS_G "src/*.cpp")
|
||||
POCO_SOURCES_AUTO( POSTGRESQL_SRCS ${SRCS_G})
|
||||
POCO_SOURCES_AUTO(POSTGRESQL_SRCS ${SRCS_G})
|
||||
|
||||
# Headers
|
||||
file(GLOB_RECURSE HDRS_G "include/*.h" )
|
||||
POCO_HEADERS_AUTO( POSTGRESQL_SRCS ${HDRS_G})
|
||||
file(GLOB_RECURSE HDRS_G "include/*.h")
|
||||
POCO_HEADERS_AUTO(POSTGRESQL_SRCS ${HDRS_G})
|
||||
|
||||
# Version Resource
|
||||
if(MSVC AND NOT POCO_STATIC)
|
||||
source_group("Resources" FILES ${PROJECT_SOURCE_DIR}/DLLVersion.rc)
|
||||
list(APPEND POSTGRESQL_SRCS ${PROJECT_SOURCE_DIR}/DLLVersion.rc)
|
||||
if(MSVC AND BUILD_SHARED_LIBS)
|
||||
source_group("Resources" FILES ${PROJECT_SOURCE_DIR}/DLLVersion.rc)
|
||||
list(APPEND POSTGRESQL_SRCS ${PROJECT_SOURCE_DIR}/DLLVersion.rc)
|
||||
endif()
|
||||
|
||||
add_library(DataPostgreSQL ${POSTGRESQL_SRCS} )
|
||||
add_library(DataPostgreSQL ${POSTGRESQL_SRCS})
|
||||
add_library(Poco::DataPostgreSQL ALIAS DataPostgreSQL)
|
||||
set_target_properties(DataPostgreSQL
|
||||
PROPERTIES
|
||||
VERSION ${SHARED_LIBRARY_VERSION} SOVERSION ${SHARED_LIBRARY_VERSION}
|
||||
OUTPUT_NAME PocoDataPostgreSQL
|
||||
DEFINE_SYMBOL PostgreSQL_EXPORTS
|
||||
)
|
||||
PROPERTIES
|
||||
VERSION ${SHARED_LIBRARY_VERSION} SOVERSION ${SHARED_LIBRARY_VERSION}
|
||||
OUTPUT_NAME PocoDataPostgreSQL
|
||||
DEFINE_SYMBOL PostgreSQL_EXPORTS
|
||||
)
|
||||
|
||||
target_link_libraries(DataPostgreSQL PUBLIC Poco::Data PostgreSQL::client)
|
||||
target_include_directories(DataPostgreSQL
|
||||
PUBLIC
|
||||
$<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}/include>
|
||||
$<INSTALL_INTERFACE:include>
|
||||
PUBLIC
|
||||
$<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}/include>
|
||||
$<INSTALL_INTERFACE:include>
|
||||
PRIVATE
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/src
|
||||
)
|
||||
@ -33,6 +33,6 @@ target_include_directories(DataPostgreSQL
|
||||
POCO_INSTALL(DataPostgreSQL)
|
||||
POCO_GENERATE_PACKAGE(DataPostgreSQL)
|
||||
|
||||
if (ENABLE_TESTS)
|
||||
add_subdirectory(testsuite)
|
||||
endif ()
|
||||
if(ENABLE_TESTS)
|
||||
add_subdirectory(testsuite)
|
||||
endif()
|
||||
|
@ -1,16 +1,20 @@
|
||||
# Sources
|
||||
file(GLOB SRCS_G "src/*.cpp")
|
||||
POCO_SOURCES_AUTO( TEST_SRCS ${SRCS_G})
|
||||
POCO_SOURCES_AUTO(TEST_SRCS ${SRCS_G})
|
||||
|
||||
# Headers
|
||||
file(GLOB_RECURSE HDRS_G "src/*.h" )
|
||||
POCO_HEADERS_AUTO( TEST_SRCS ${HDRS_G})
|
||||
file(GLOB_RECURSE HDRS_G "src/*.h")
|
||||
POCO_HEADERS_AUTO(TEST_SRCS ${HDRS_G})
|
||||
|
||||
POCO_SOURCES_AUTO_PLAT( TEST_SRCS OFF
|
||||
src/WinDriver.cpp
|
||||
POCO_SOURCES_AUTO_PLAT(TEST_SRCS OFF
|
||||
src/WinDriver.cpp
|
||||
)
|
||||
|
||||
add_executable(DataPostgreSQL-testrunner ${TEST_SRCS} )
|
||||
add_test(NAME DataPostgreSQL WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR} COMMAND DataPostgreSQL-testrunner -ignore ${CMAKE_SOURCE_DIR}/cppignore.lnx -all)
|
||||
add_executable(DataPostgreSQL-testrunner ${TEST_SRCS})
|
||||
add_test(
|
||||
NAME DataPostgreSQL
|
||||
WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}
|
||||
COMMAND DataPostgreSQL-testrunner -ignore ${CMAKE_SOURCE_DIR}/cppignore.lnx -all
|
||||
)
|
||||
set_tests_properties(DataPostgreSQL PROPERTIES ENVIRONMENT POCO_BASE=${CMAKE_SOURCE_DIR})
|
||||
target_link_libraries(DataPostgreSQL-testrunner PUBLIC Poco::DataPostgreSQL CppUnit)
|
||||
|
@ -1,50 +1,53 @@
|
||||
# Sources
|
||||
file(GLOB SRCS_G "src/*.cpp")
|
||||
POCO_SOURCES_AUTO( SQLITE_SRCS ${SRCS_G})
|
||||
POCO_SOURCES_AUTO(SQLITE_SRCS ${SRCS_G})
|
||||
|
||||
# Headers
|
||||
file(GLOB_RECURSE HDRS_G "include/*.h" )
|
||||
POCO_HEADERS_AUTO( SQLITE_SRCS ${HDRS_G})
|
||||
file(GLOB_RECURSE HDRS_G "include/*.h")
|
||||
POCO_HEADERS_AUTO(SQLITE_SRCS ${HDRS_G})
|
||||
|
||||
if (POCO_UNBUNDLED)
|
||||
if(POCO_UNBUNDLED)
|
||||
find_package(SQLite3 REQUIRED)
|
||||
else()
|
||||
# sqlite3
|
||||
POCO_SOURCES( SQLITE_SRCS sqlite3
|
||||
src/sqlite3.c
|
||||
)
|
||||
# sqlite3
|
||||
POCO_SOURCES(SQLITE_SRCS sqlite3
|
||||
src/sqlite3.c
|
||||
)
|
||||
|
||||
POCO_HEADERS( SQLITE_SRCS sqlite3
|
||||
src/sqlite3.h
|
||||
)
|
||||
POCO_HEADERS(SQLITE_SRCS sqlite3
|
||||
src/sqlite3.h
|
||||
)
|
||||
endif()
|
||||
|
||||
# Version Resource
|
||||
if(MSVC AND NOT POCO_STATIC)
|
||||
source_group("Resources" FILES ${PROJECT_SOURCE_DIR}/DLLVersion.rc)
|
||||
list(APPEND SQLITE_SRCS ${PROJECT_SOURCE_DIR}/DLLVersion.rc)
|
||||
if(MSVC AND BUILD_SHARED_LIBS)
|
||||
source_group("Resources" FILES ${PROJECT_SOURCE_DIR}/DLLVersion.rc)
|
||||
list(APPEND SQLITE_SRCS ${PROJECT_SOURCE_DIR}/DLLVersion.rc)
|
||||
endif()
|
||||
|
||||
add_library(DataSQLite ${SQLITE_SRCS} )
|
||||
add_library(DataSQLite ${SQLITE_SRCS})
|
||||
|
||||
add_library(Poco::DataSQLite ALIAS DataSQLite)
|
||||
set_target_properties(DataSQLite
|
||||
PROPERTIES
|
||||
VERSION ${SHARED_LIBRARY_VERSION} SOVERSION ${SHARED_LIBRARY_VERSION}
|
||||
OUTPUT_NAME PocoDataSQLite
|
||||
DEFINE_SYMBOL SQLite_EXPORTS
|
||||
)
|
||||
PROPERTIES
|
||||
VERSION ${SHARED_LIBRARY_VERSION} SOVERSION ${SHARED_LIBRARY_VERSION}
|
||||
OUTPUT_NAME PocoDataSQLite
|
||||
DEFINE_SYMBOL SQLite_EXPORTS
|
||||
)
|
||||
target_link_libraries(DataSQLite PUBLIC Poco::Data)
|
||||
target_include_directories(DataSQLite
|
||||
PUBLIC
|
||||
$<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}/include>
|
||||
$<INSTALL_INTERFACE:include>
|
||||
PRIVATE ${CMAKE_CURRENT_SOURCE_DIR}/src
|
||||
)
|
||||
PUBLIC
|
||||
$<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}/include>
|
||||
$<INSTALL_INTERFACE:include>
|
||||
PRIVATE ${CMAKE_CURRENT_SOURCE_DIR}/src
|
||||
)
|
||||
|
||||
if(POCO_UNBUNDLED)
|
||||
target_link_libraries(DataSQLite PUBLIC SQLite::SQLite3)
|
||||
target_compile_definitions(DataSQLite PUBLIC POCO_UNBUNDLED)
|
||||
target_link_libraries(DataSQLite PUBLIC SQLite::SQLite3)
|
||||
target_compile_definitions(DataSQLite PUBLIC
|
||||
POCO_UNBUNDLED
|
||||
SQLITE_THREADSAFE=1
|
||||
)
|
||||
else()
|
||||
if(WINCE)
|
||||
target_compile_definitions(DataSQLite PRIVATE SQLITE_MSVC_LOCALTIME_API)
|
||||
@ -63,7 +66,6 @@ endif()
|
||||
POCO_INSTALL(DataSQLite)
|
||||
POCO_GENERATE_PACKAGE(DataSQLite)
|
||||
|
||||
if (ENABLE_TESTS)
|
||||
add_subdirectory(testsuite)
|
||||
endif ()
|
||||
|
||||
if(ENABLE_TESTS)
|
||||
add_subdirectory(testsuite)
|
||||
endif()
|
||||
|
@ -2,10 +2,10 @@ include(CMakeFindDependencyMacro)
|
||||
find_dependency(PocoFoundation)
|
||||
find_dependency(PocoData)
|
||||
if(@POCO_UNBUNDLED@)
|
||||
if(CMAKE_VERSION VERSION_LESS "3.14")
|
||||
list(APPEND CMAKE_MODULE_PATH "${CMAKE_CURRENT_LIST_DIR}/V313")
|
||||
endif()
|
||||
find_dependency(SQLite3 REQUIRED)
|
||||
if(CMAKE_VERSION VERSION_LESS "3.14")
|
||||
list(APPEND CMAKE_MODULE_PATH "${CMAKE_CURRENT_LIST_DIR}/V313")
|
||||
endif()
|
||||
find_dependency(SQLite3 REQUIRED)
|
||||
endif()
|
||||
|
||||
include("${CMAKE_CURRENT_LIST_DIR}/PocoDataSQLiteTargets.cmake")
|
||||
|
@ -1,6 +1,6 @@
|
||||
/******************************************************************************
|
||||
** This file is an amalgamation of many separate C source files from SQLite
|
||||
** version 3.31.0. By combining all the individual C code files into this
|
||||
** version 3.31.1. By combining all the individual C code files into this
|
||||
** single large file, the entire code can be compiled as a single translation
|
||||
** unit. This allows many compilers to do optimizations that would not be
|
||||
** possible if the files were compiled separately. Performance improvements
|
||||
@ -1165,9 +1165,9 @@ extern "C" {
|
||||
** [sqlite3_libversion_number()], [sqlite3_sourceid()],
|
||||
** [sqlite_version()] and [sqlite_source_id()].
|
||||
*/
|
||||
#define SQLITE_VERSION "3.31.0"
|
||||
#define SQLITE_VERSION_NUMBER 3031000
|
||||
#define SQLITE_SOURCE_ID "2020-01-22 18:38:59 f6affdd41608946fcfcea914ece149038a8b25a62bbe719ed2561c649b86d824"
|
||||
#define SQLITE_VERSION "3.31.1"
|
||||
#define SQLITE_VERSION_NUMBER 3031001
|
||||
#define SQLITE_SOURCE_ID "2020-01-27 19:55:54 3bfa9cc97da10598521b342961df8f5f68c7388fa117345eeb516eaa837bb4d6"
|
||||
|
||||
/*
|
||||
** CAPI3REF: Run-Time Library Version Numbers
|
||||
@ -56233,30 +56233,48 @@ SQLITE_PRIVATE int sqlite3PagerOpen(
|
||||
** Database file handle (pVfs->szOsFile bytes)
|
||||
** Sub-journal file handle (journalFileSize bytes)
|
||||
** Main journal file handle (journalFileSize bytes)
|
||||
** \0\1\0 journal prefix (3 bytes)
|
||||
** Journal filename (nPathname+8+1 bytes)
|
||||
** \2\0 WAL prefix (2 bytes)
|
||||
** WAL filename (nPathname+4+1 bytes)
|
||||
** \3\0 database prefix (2 bytes)
|
||||
** \0\0\0\0 database prefix (4 bytes)
|
||||
** Database file name (nPathname+1 bytes)
|
||||
** URI query parameters (nUriByte bytes)
|
||||
** \0\0 terminator (2 bytes)
|
||||
** Journal filename (nPathname+8+1 bytes)
|
||||
** WAL filename (nPathname+4+1 bytes)
|
||||
** \0\0\0 terminator (3 bytes)
|
||||
**
|
||||
** Some 3rd-party software, over which we have no control, depends on
|
||||
** the specific order of the filenames and the \0 separators between them
|
||||
** so that it can (for example) find the database filename given the WAL
|
||||
** filename without using the sqlite3_filename_database() API. This is a
|
||||
** misuse of SQLite and a bug in the 3rd-party software, but the 3rd-party
|
||||
** software is in widespread use, so we try to avoid changing the filename
|
||||
** order and formatting if possible. In particular, the details of the
|
||||
** filename format expected by 3rd-party software should be as follows:
|
||||
**
|
||||
** - Main Database Path
|
||||
** - \0
|
||||
** - Multiple URI components consisting of:
|
||||
** - Key
|
||||
** - \0
|
||||
** - Value
|
||||
** - \0
|
||||
** - \0
|
||||
** - Journal Path
|
||||
** - \0
|
||||
** - WAL Path (zWALName)
|
||||
** - \0
|
||||
*/
|
||||
pPtr = (u8 *)sqlite3MallocZero(
|
||||
ROUND8(sizeof(*pPager)) + /* Pager structure */
|
||||
ROUND8(pcacheSize) + /* PCache object */
|
||||
ROUND8(pVfs->szOsFile) + /* The main db file */
|
||||
journalFileSize * 2 + /* The two journal files */
|
||||
3 + /* Journal prefix */
|
||||
nPathname + 8 + 1 + /* Journal filename */
|
||||
#ifndef SQLITE_OMIT_WAL
|
||||
2 + /* WAL prefix */
|
||||
nPathname + 4 + 1 + /* WAL filename */
|
||||
#endif
|
||||
2 + /* Database prefix */
|
||||
4 + /* Database prefix */
|
||||
nPathname + 1 + /* database filename */
|
||||
nUriByte + /* query parameters */
|
||||
2 /* Terminator */
|
||||
nPathname + 8 + 1 + /* Journal filename */
|
||||
#ifndef SQLITE_OMIT_WAL
|
||||
nPathname + 4 + 1 + /* WAL filename */
|
||||
#endif
|
||||
3 /* Terminator */
|
||||
);
|
||||
assert( EIGHT_BYTE_ALIGNMENT(SQLITE_INT_TO_PTR(journalFileSize)) );
|
||||
if( !pPtr ){
|
||||
@ -56270,9 +56288,20 @@ SQLITE_PRIVATE int sqlite3PagerOpen(
|
||||
pPager->jfd = (sqlite3_file*)pPtr; pPtr += journalFileSize;
|
||||
assert( EIGHT_BYTE_ALIGNMENT(pPager->jfd) );
|
||||
|
||||
/* Fill in the Pager.zFilename and pPager.zQueryParam fields */
|
||||
pPtr += 4; /* Skip zero prefix */
|
||||
pPager->zFilename = (char*)pPtr;
|
||||
if( nPathname>0 ){
|
||||
memcpy(pPtr, zPathname, nPathname); pPtr += nPathname + 1;
|
||||
if( zUri ){
|
||||
memcpy(pPtr, zUri, nUriByte); pPtr += nUriByte;
|
||||
}else{
|
||||
pPtr++;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/* Fill in Pager.zJournal */
|
||||
pPtr[1] = '\001'; pPtr += 3;
|
||||
if( nPathname>0 ){
|
||||
pPager->zJournal = (char*)pPtr;
|
||||
memcpy(pPtr, zPathname, nPathname); pPtr += nPathname;
|
||||
@ -56283,12 +56312,10 @@ SQLITE_PRIVATE int sqlite3PagerOpen(
|
||||
#endif
|
||||
}else{
|
||||
pPager->zJournal = 0;
|
||||
pPtr++;
|
||||
}
|
||||
|
||||
#ifndef SQLITE_OMIT_WAL
|
||||
/* Fill in Pager.zWal */
|
||||
pPtr[0] = '\002'; pPtr[1] = 0; pPtr += 2;
|
||||
if( nPathname>0 ){
|
||||
pPager->zWal = (char*)pPtr;
|
||||
memcpy(pPtr, zPathname, nPathname); pPtr += nPathname;
|
||||
@ -56299,21 +56326,9 @@ SQLITE_PRIVATE int sqlite3PagerOpen(
|
||||
#endif
|
||||
}else{
|
||||
pPager->zWal = 0;
|
||||
pPtr++;
|
||||
}
|
||||
#endif
|
||||
|
||||
/* Fill in the Pager.zFilename and pPager.zQueryParam fields */
|
||||
pPtr[0] = '\003'; pPtr[1] = 0; pPtr += 2;
|
||||
pPager->zFilename = (char*)pPtr;
|
||||
if( nPathname>0 ){
|
||||
memcpy(pPtr, zPathname, nPathname); pPtr += nPathname + 1;
|
||||
if( zUri ){
|
||||
memcpy(pPtr, zUri, nUriByte); /* pPtr += nUriByte; // not needed */
|
||||
}
|
||||
/* Double-zero terminator implied by the sqlite3MallocZero */
|
||||
}
|
||||
|
||||
if( nPathname ) sqlite3DbFree(0, zPathname);
|
||||
pPager->pVfs = pVfs;
|
||||
pPager->vfsFlags = vfsFlags;
|
||||
@ -58433,8 +58448,8 @@ SQLITE_PRIVATE int sqlite3PagerSavepoint(Pager *pPager, int op, int iSavepoint){
|
||||
** sqlite3_uri_parameter() and sqlite3_filename_database() and friends.
|
||||
*/
|
||||
SQLITE_PRIVATE const char *sqlite3PagerFilename(const Pager *pPager, int nullIfMemDb){
|
||||
static const char zFake[] = { 0x00, 0x01, 0x00, 0x00, 0x00 };
|
||||
return (nullIfMemDb && pPager->memDb) ? &zFake[3] : pPager->zFilename;
|
||||
static const char zFake[] = { 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 };
|
||||
return (nullIfMemDb && pPager->memDb) ? &zFake[4] : pPager->zFilename;
|
||||
}
|
||||
|
||||
/*
|
||||
@ -117491,6 +117506,9 @@ SQLITE_PRIVATE int sqlite3IsLikeFunction(sqlite3 *db, Expr *pExpr, int *pIsNocas
|
||||
assert( !ExprHasProperty(pExpr, EP_xIsSelect) );
|
||||
nExpr = pExpr->x.pList->nExpr;
|
||||
pDef = sqlite3FindFunction(db, pExpr->u.zToken, nExpr, SQLITE_UTF8, 0);
|
||||
#ifdef SQLITE_ENABLE_UNKNOWN_SQL_FUNCTION
|
||||
if( pDef==0 ) return 0;
|
||||
#endif
|
||||
if( NEVER(pDef==0) || (pDef->funcFlags & SQLITE_FUNC_LIKE)==0 ){
|
||||
return 0;
|
||||
}
|
||||
@ -122767,11 +122785,11 @@ typedef int (*sqlite3_loadext_entry)(
|
||||
/* Version 3.26.0 and later */
|
||||
#define sqlite3_normalized_sql sqlite3_api->normalized_sql
|
||||
/* Version 3.28.0 and later */
|
||||
#define sqlite3_stmt_isexplain sqlite3_api->isexplain
|
||||
#define sqlite3_value_frombind sqlite3_api->frombind
|
||||
#define sqlite3_stmt_isexplain sqlite3_api->stmt_isexplain
|
||||
#define sqlite3_value_frombind sqlite3_api->value_frombind
|
||||
/* Version 3.30.0 and later */
|
||||
#define sqlite3_drop_modules sqlite3_api->drop_modules
|
||||
/* Version 3.31.0 andn later */
|
||||
/* Version 3.31.0 and later */
|
||||
#define sqlite3_hard_heap_limit64 sqlite3_api->hard_heap_limit64
|
||||
#define sqlite3_uri_key sqlite3_api->uri_key
|
||||
#define sqlite3_filename_database sqlite3_api->filename_database
|
||||
@ -163282,6 +163300,21 @@ SQLITE_API int sqlite3_test_control(int op, ...){
|
||||
return rc;
|
||||
}
|
||||
|
||||
/*
|
||||
** The Pager stores the Database filename, Journal filename, and WAL filename
|
||||
** consecutively in memory, in that order. The database filename is prefixed
|
||||
** by four zero bytes. Locate the start of the database filename by searching
|
||||
** backwards for the first byte following four consecutive zero bytes.
|
||||
**
|
||||
** This only works if the filename passed in was obtained from the Pager.
|
||||
*/
|
||||
static const char *databaseName(const char *zName){
|
||||
while( zName[-1]!=0 || zName[-2]!=0 || zName[-3]!=0 || zName[-4]!=0 ){
|
||||
zName--;
|
||||
}
|
||||
return zName;
|
||||
}
|
||||
|
||||
/*
|
||||
** This is a utility routine, useful to VFS implementations, that checks
|
||||
** to see if a database file was a URI that contained a specific query
|
||||
@ -163295,6 +163328,7 @@ SQLITE_API int sqlite3_test_control(int op, ...){
|
||||
*/
|
||||
SQLITE_API const char *sqlite3_uri_parameter(const char *zFilename, const char *zParam){
|
||||
if( zFilename==0 || zParam==0 ) return 0;
|
||||
zFilename = databaseName(zFilename);
|
||||
zFilename += sqlite3Strlen30(zFilename) + 1;
|
||||
while( zFilename[0] ){
|
||||
int x = strcmp(zFilename, zParam);
|
||||
@ -163310,6 +163344,7 @@ SQLITE_API const char *sqlite3_uri_parameter(const char *zFilename, const char *
|
||||
*/
|
||||
SQLITE_API const char *sqlite3_uri_key(const char *zFilename, int N){
|
||||
if( zFilename==0 || N<0 ) return 0;
|
||||
zFilename = databaseName(zFilename);
|
||||
zFilename += sqlite3Strlen30(zFilename) + 1;
|
||||
while( zFilename[0] && (N--)>0 ){
|
||||
zFilename += sqlite3Strlen30(zFilename) + 1;
|
||||
@ -163343,25 +163378,6 @@ SQLITE_API sqlite3_int64 sqlite3_uri_int64(
|
||||
return bDflt;
|
||||
}
|
||||
|
||||
/*
|
||||
** The Pager stores the Journal filename, WAL filename, and Database filename
|
||||
** consecutively in memory, in that order, with prefixes \000\001\000,
|
||||
** \002\000, and \003\000, in that order. Thus the three names look like query
|
||||
** parameters if you start at the first prefix.
|
||||
**
|
||||
** This routine backs up a filename to the start of the first prefix.
|
||||
**
|
||||
** This only works if the filenamed passed in was obtained from the Pager.
|
||||
*/
|
||||
static const char *startOfNameList(const char *zName){
|
||||
while( zName[0]!='\001' || zName[1]!=0 ){
|
||||
zName -= 3;
|
||||
while( zName[0]!='\000' ){ zName--; }
|
||||
zName++;
|
||||
}
|
||||
return zName-1;
|
||||
}
|
||||
|
||||
/*
|
||||
** Translate a filename that was handed to a VFS routine into the corresponding
|
||||
** database, journal, or WAL file.
|
||||
@ -163373,14 +163389,26 @@ static const char *startOfNameList(const char *zName){
|
||||
** corruption.
|
||||
*/
|
||||
SQLITE_API const char *sqlite3_filename_database(const char *zFilename){
|
||||
return databaseName(zFilename);
|
||||
return sqlite3_uri_parameter(zFilename - 3, "\003");
|
||||
}
|
||||
SQLITE_API const char *sqlite3_filename_journal(const char *zFilename){
|
||||
const char *z = sqlite3_uri_parameter(startOfNameList(zFilename), "\001");
|
||||
return ALWAYS(z) && z[0] ? z : 0;
|
||||
zFilename = databaseName(zFilename);
|
||||
zFilename += sqlite3Strlen30(zFilename) + 1;
|
||||
while( zFilename[0] ){
|
||||
zFilename += sqlite3Strlen30(zFilename) + 1;
|
||||
zFilename += sqlite3Strlen30(zFilename) + 1;
|
||||
}
|
||||
return zFilename + 1;
|
||||
}
|
||||
SQLITE_API const char *sqlite3_filename_wal(const char *zFilename){
|
||||
return sqlite3_uri_parameter(startOfNameList(zFilename), "\002");
|
||||
#ifdef SQLITE_OMIT_WAL
|
||||
return 0;
|
||||
#else
|
||||
zFilename = sqlite3_filename_journal(zFilename);
|
||||
zFilename += sqlite3Strlen30(zFilename) + 1;
|
||||
return zFilename;
|
||||
#endif
|
||||
}
|
||||
|
||||
/*
|
||||
@ -219999,8 +220027,8 @@ static int fts5QueryCksum(
|
||||
** contain valid utf-8, return non-zero.
|
||||
*/
|
||||
static int fts5TestUtf8(const char *z, int n){
|
||||
assert_nc( n>0 );
|
||||
int i = 0;
|
||||
assert_nc( n>0 );
|
||||
while( i<n ){
|
||||
if( (z[i] & 0x80)==0x00 ){
|
||||
i++;
|
||||
@ -223639,7 +223667,7 @@ static void fts5SourceIdFunc(
|
||||
){
|
||||
assert( nArg==0 );
|
||||
UNUSED_PARAM2(nArg, apUnused);
|
||||
sqlite3_result_text(pCtx, "fts5: 2020-01-22 18:38:59 f6affdd41608946fcfcea914ece149038a8b25a62bbe719ed2561c649b86d824", -1, SQLITE_TRANSIENT);
|
||||
sqlite3_result_text(pCtx, "fts5: 2020-01-27 19:55:54 3bfa9cc97da10598521b342961df8f5f68c7388fa117345eeb516eaa837bb4d6", -1, SQLITE_TRANSIENT);
|
||||
}
|
||||
|
||||
/*
|
||||
@ -228412,9 +228440,9 @@ SQLITE_API int sqlite3_stmt_init(
|
||||
#endif /* !defined(SQLITE_CORE) || defined(SQLITE_ENABLE_STMTVTAB) */
|
||||
|
||||
/************** End of stmt.c ************************************************/
|
||||
#if __LINE__!=228415
|
||||
#if __LINE__!=228443
|
||||
#undef SQLITE_SOURCE_ID
|
||||
#define SQLITE_SOURCE_ID "2020-01-22 18:38:59 f6affdd41608946fcfcea914ece149038a8b25a62bbe719ed2561c649b86alt2"
|
||||
#define SQLITE_SOURCE_ID "2020-01-27 19:55:54 3bfa9cc97da10598521b342961df8f5f68c7388fa117345eeb516eaa837balt2"
|
||||
#endif
|
||||
/* Return the source-id for this library */
|
||||
SQLITE_API const char *sqlite3_sourceid(void){ return SQLITE_SOURCE_ID; }
|
||||
|
@ -123,9 +123,9 @@ extern "C" {
|
||||
** [sqlite3_libversion_number()], [sqlite3_sourceid()],
|
||||
** [sqlite_version()] and [sqlite_source_id()].
|
||||
*/
|
||||
#define SQLITE_VERSION "3.31.0"
|
||||
#define SQLITE_VERSION_NUMBER 3031000
|
||||
#define SQLITE_SOURCE_ID "2020-01-22 18:38:59 f6affdd41608946fcfcea914ece149038a8b25a62bbe719ed2561c649b86d824"
|
||||
#define SQLITE_VERSION "3.31.1"
|
||||
#define SQLITE_VERSION_NUMBER 3031001
|
||||
#define SQLITE_SOURCE_ID "2020-01-27 19:55:54 3bfa9cc97da10598521b342961df8f5f68c7388fa117345eeb516eaa837bb4d6"
|
||||
|
||||
/*
|
||||
** CAPI3REF: Run-Time Library Version Numbers
|
||||
|
@ -1,25 +1,32 @@
|
||||
# Sources
|
||||
file(GLOB SRCS_G "src/*.cpp")
|
||||
POCO_SOURCES_AUTO( TEST_SRCS ${SRCS_G})
|
||||
POCO_SOURCES_AUTO(TEST_SRCS ${SRCS_G})
|
||||
|
||||
# Headers
|
||||
file(GLOB_RECURSE HDRS_G "src/*.h" )
|
||||
POCO_HEADERS_AUTO( TEST_SRCS ${HDRS_G})
|
||||
file(GLOB_RECURSE HDRS_G "src/*.h")
|
||||
POCO_HEADERS_AUTO(TEST_SRCS ${HDRS_G})
|
||||
|
||||
POCO_SOURCES_AUTO_PLAT( TEST_SRCS OFF
|
||||
src/WinDriver.cpp
|
||||
POCO_SOURCES_AUTO_PLAT(TEST_SRCS OFF
|
||||
src/WinDriver.cpp
|
||||
)
|
||||
|
||||
POCO_SOURCES_AUTO_PLAT( TEST_SRCS WINCE
|
||||
src/WinCEDriver.cpp
|
||||
POCO_SOURCES_AUTO_PLAT(TEST_SRCS WINCE
|
||||
src/WinCEDriver.cpp
|
||||
)
|
||||
|
||||
add_executable(DataSQLite-testrunner ${TEST_SRCS} )
|
||||
add_executable(DataSQLite-testrunner ${TEST_SRCS})
|
||||
if(ANDROID)
|
||||
add_test(NAME DataSQLite WORKING_DIRECTORY ${CMAKE_RUNTIME_OUTPUT_DIRECTORY}
|
||||
COMMAND ${CMAKE_COMMAND} -DANDROID_NDK=${ANDROID_NDK} -DLIBRARY_DIR=${CMAKE_BINARY_DIR}/lib -DUNITTEST=${CMAKE_BINARY_DIR}/bin/DataSQLite-testrunner -DTEST_PARAMETER=-all -P ${CMAKE_SOURCE_DIR}/cmake/ExecuteOnAndroid.cmake)
|
||||
add_test(
|
||||
NAME DataSQLite
|
||||
WORKING_DIRECTORY ${CMAKE_RUNTIME_OUTPUT_DIRECTORY}
|
||||
COMMAND ${CMAKE_COMMAND} -DANDROID_NDK=${ANDROID_NDK} -DLIBRARY_DIR=${CMAKE_BINARY_DIR}/lib -DUNITTEST=${CMAKE_BINARY_DIR}/bin/DataSQLite-testrunner -DTEST_PARAMETER=-all -P ${CMAKE_SOURCE_DIR}/cmake/ExecuteOnAndroid.cmake
|
||||
)
|
||||
else()
|
||||
add_test(NAME DataSQLite WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR} COMMAND DataSQLite-testrunner -ignore ${CMAKE_SOURCE_DIR}/cppignore.lnx -all)
|
||||
set_tests_properties(DataSQLite PROPERTIES ENVIRONMENT POCO_BASE=${CMAKE_SOURCE_DIR})
|
||||
add_test(
|
||||
NAME DataSQLite
|
||||
WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}
|
||||
COMMAND DataSQLite-testrunner -ignore ${CMAKE_SOURCE_DIR}/cppignore.lnx -all
|
||||
)
|
||||
set_tests_properties(DataSQLite PROPERTIES ENVIRONMENT POCO_BASE=${CMAKE_SOURCE_DIR})
|
||||
endif()
|
||||
target_link_libraries(DataSQLite-testrunner PUBLIC Poco::DataSQLite CppUnit)
|
||||
|
@ -1,5 +1,5 @@
|
||||
add_subdirectory( Binding )
|
||||
add_subdirectory( RecordSet )
|
||||
add_subdirectory( RowFormatter )
|
||||
add_subdirectory( Tuple )
|
||||
add_subdirectory( TypeHandler )
|
||||
add_subdirectory(Binding)
|
||||
add_subdirectory(RecordSet)
|
||||
add_subdirectory(RowFormatter)
|
||||
add_subdirectory(Tuple)
|
||||
add_subdirectory(TypeHandler)
|
||||
|
@ -2,14 +2,14 @@
|
||||
// WebNotifier.cpp
|
||||
//
|
||||
// This sample demonstrates a combination of Data and Net libraries by
|
||||
// creating a database, registering callbacks for insert/update events
|
||||
// creating a database, registering callbacks for insert/update events
|
||||
// and sending database modifications to the web client through web socket.
|
||||
// Since callbacks are only registered for session, in order to see the
|
||||
// effects, database updates should be done through the shell provided by
|
||||
// this example.
|
||||
//
|
||||
// this example.
|
||||
//
|
||||
// This is only a demo. For production-grade a better web socket management
|
||||
// facility as well as persisting notification functionality (e.g. via
|
||||
// facility as well as persisting notification functionality (e.g. via
|
||||
// triggers and external functions) should be used.
|
||||
//
|
||||
// Copyright (c) 2008, Applied Informatics Software Engineering GmbH.
|
||||
@ -128,7 +128,7 @@ public:
|
||||
std::cout << std::endl << "WebSocket connection established." << std::endl << PROMPT;
|
||||
|
||||
char buffer[1024];
|
||||
int n, count = 0;
|
||||
int n;
|
||||
do
|
||||
{
|
||||
n = _pWS->receiveFrame(buffer, sizeof(buffer), _flags);
|
||||
@ -184,7 +184,7 @@ public:
|
||||
|
||||
if (uri != "/favicon.ico")
|
||||
std::cout << "Unknown URI: " << uri << std::endl;
|
||||
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
@ -250,7 +250,7 @@ public:
|
||||
_notifier.insert -= delegate(this, &DBEventHandler::onInsert);
|
||||
_notifier.update -= delegate(this, &DBEventHandler::onUpdate);
|
||||
}
|
||||
|
||||
|
||||
std::size_t execute(const std::string& sql)
|
||||
/// Exectutes the SQL statement.
|
||||
{
|
||||
|
@ -1,30 +1,37 @@
|
||||
# Sources
|
||||
file(GLOB SRCS_G "src/*.cpp")
|
||||
POCO_SOURCES_AUTO( TEST_SRCS ${SRCS_G})
|
||||
POCO_SOURCES_AUTO(TEST_SRCS ${SRCS_G})
|
||||
|
||||
# Headers
|
||||
file(GLOB_RECURSE HDRS_G "src/*.h" )
|
||||
POCO_HEADERS_AUTO( TEST_SRCS ${HDRS_G})
|
||||
file(GLOB_RECURSE HDRS_G "src/*.h")
|
||||
POCO_HEADERS_AUTO(TEST_SRCS ${HDRS_G})
|
||||
|
||||
POCO_SOURCES_AUTO_PLAT( TEST_SRCS OFF
|
||||
src/WinDriver.cpp
|
||||
POCO_SOURCES_AUTO_PLAT(TEST_SRCS OFF
|
||||
src/WinDriver.cpp
|
||||
)
|
||||
|
||||
POCO_SOURCES_AUTO_PLAT( TEST_SRCS WINCE
|
||||
src/WinCEDriver.cpp
|
||||
POCO_SOURCES_AUTO_PLAT(TEST_SRCS WINCE
|
||||
src/WinCEDriver.cpp
|
||||
)
|
||||
|
||||
#TODO: Why is this file there? It doesn't compile if it is include in the sources
|
||||
POCO_SOURCES_AUTO_PLAT( TEST_SRCS OFF
|
||||
src/StatementImpl.cpp
|
||||
POCO_SOURCES_AUTO_PLAT(TEST_SRCS OFF
|
||||
src/StatementImpl.cpp
|
||||
)
|
||||
|
||||
add_executable(Data-testrunner ${TEST_SRCS} )
|
||||
add_executable(Data-testrunner ${TEST_SRCS})
|
||||
if(ANDROID)
|
||||
add_test(NAME Data WORKING_DIRECTORY ${CMAKE_RUNTIME_OUTPUT_DIRECTORY}
|
||||
COMMAND ${CMAKE_COMMAND} -DANDROID_NDK=${ANDROID_NDK} -DLIBRARY_DIR=${CMAKE_BINARY_DIR}/lib -DUNITTEST=${CMAKE_BINARY_DIR}/bin/Data-testrunner -DTEST_PARAMETER=-all -P ${CMAKE_SOURCE_DIR}/cmake/ExecuteOnAndroid.cmake)
|
||||
add_test(
|
||||
NAME Data
|
||||
WORKING_DIRECTORY ${CMAKE_RUNTIME_OUTPUT_DIRECTORY}
|
||||
COMMAND ${CMAKE_COMMAND} -DANDROID_NDK=${ANDROID_NDK} -DLIBRARY_DIR=${CMAKE_BINARY_DIR}/lib -DUNITTEST=${CMAKE_BINARY_DIR}/bin/Data-testrunner -DTEST_PARAMETER=-all -P ${CMAKE_SOURCE_DIR}/cmake/ExecuteOnAndroid.cmake
|
||||
)
|
||||
else()
|
||||
add_test(NAME Data WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR} COMMAND Data-testrunner -ignore ${CMAKE_SOURCE_DIR}/cppignore.lnx -all)
|
||||
set_tests_properties(Data PROPERTIES ENVIRONMENT POCO_BASE=${CMAKE_SOURCE_DIR})
|
||||
add_test(
|
||||
NAME Data
|
||||
WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}
|
||||
COMMAND Data-testrunner -ignore ${CMAKE_SOURCE_DIR}/cppignore.lnx -all
|
||||
)
|
||||
set_tests_properties(Data PROPERTIES ENVIRONMENT POCO_BASE=${CMAKE_SOURCE_DIR})
|
||||
endif()
|
||||
target_link_libraries(Data-testrunner PUBLIC Poco::Data CppUnit)
|
||||
|
@ -1,38 +1,38 @@
|
||||
# Sources
|
||||
file(GLOB SRCS_G "src/*.cpp")
|
||||
POCO_SOURCES( SRCS Encodings ${SRCS_G})
|
||||
POCO_SOURCES(SRCS Encodings ${SRCS_G})
|
||||
|
||||
# Headers
|
||||
file(GLOB_RECURSE HDRS_G "include/*.h" )
|
||||
POCO_HEADERS( SRCS Encodings ${HDRS_G})
|
||||
file(GLOB_RECURSE HDRS_G "include/*.h")
|
||||
POCO_HEADERS(SRCS Encodings ${HDRS_G})
|
||||
|
||||
# Version Resource
|
||||
if(MSVC AND NOT POCO_STATIC)
|
||||
source_group("Resources" FILES ${PROJECT_SOURCE_DIR}/DLLVersion.rc)
|
||||
list(APPEND SRCS ${PROJECT_SOURCE_DIR}/DLLVersion.rc)
|
||||
if(MSVC AND BUILD_SHARED_LIBS)
|
||||
source_group("Resources" FILES ${PROJECT_SOURCE_DIR}/DLLVersion.rc)
|
||||
list(APPEND SRCS ${PROJECT_SOURCE_DIR}/DLLVersion.rc)
|
||||
endif()
|
||||
|
||||
add_library(Encodings ${SRCS} )
|
||||
add_library(Encodings ${SRCS})
|
||||
add_library(Poco::Encodings ALIAS Encodings)
|
||||
set_target_properties(Encodings
|
||||
PROPERTIES
|
||||
VERSION ${SHARED_LIBRARY_VERSION} SOVERSION ${SHARED_LIBRARY_VERSION}
|
||||
OUTPUT_NAME PocoEncodings
|
||||
DEFINE_SYMBOL Encodings_EXPORTS
|
||||
)
|
||||
PROPERTIES
|
||||
VERSION ${SHARED_LIBRARY_VERSION} SOVERSION ${SHARED_LIBRARY_VERSION}
|
||||
OUTPUT_NAME PocoEncodings
|
||||
DEFINE_SYMBOL Encodings_EXPORTS
|
||||
)
|
||||
|
||||
target_link_libraries(Encodings PUBLIC Poco::Foundation)
|
||||
target_include_directories(Encodings
|
||||
PUBLIC
|
||||
$<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}/include>
|
||||
$<INSTALL_INTERFACE:include>
|
||||
PRIVATE ${CMAKE_CURRENT_SOURCE_DIR}/src
|
||||
)
|
||||
PUBLIC
|
||||
$<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}/include>
|
||||
$<INSTALL_INTERFACE:include>
|
||||
PRIVATE ${CMAKE_CURRENT_SOURCE_DIR}/src
|
||||
)
|
||||
|
||||
POCO_INSTALL(Encodings)
|
||||
POCO_GENERATE_PACKAGE(Encodings)
|
||||
|
||||
if (ENABLE_TESTS)
|
||||
add_subdirectory(samples)
|
||||
add_subdirectory(testsuite)
|
||||
endif ()
|
||||
if(ENABLE_TESTS)
|
||||
add_subdirectory(samples)
|
||||
add_subdirectory(testsuite)
|
||||
endif()
|
||||
|
@ -1,19 +1,19 @@
|
||||
# Sources
|
||||
file(GLOB SRCS_G "src/*.cpp")
|
||||
POCO_SOURCES_AUTO( SRCS ${SRCS_G})
|
||||
POCO_SOURCES_AUTO(SRCS ${SRCS_G})
|
||||
|
||||
add_executable(EncodingsCompiler ${SRCS} )
|
||||
add_executable(EncodingsCompiler ${SRCS})
|
||||
set_target_properties(EncodingsCompiler
|
||||
PROPERTIES
|
||||
OUTPUT_NAME tec
|
||||
)
|
||||
PROPERTIES
|
||||
OUTPUT_NAME tec
|
||||
)
|
||||
|
||||
target_link_libraries(EncodingsCompiler PUBLIC Poco::Net Poco::Util)
|
||||
|
||||
install(
|
||||
TARGETS EncodingsCompiler EXPORT "EncodingsCompilerTargets"
|
||||
LIBRARY DESTINATION lib${LIB_SUFFIX}
|
||||
ARCHIVE DESTINATION lib${LIB_SUFFIX}
|
||||
RUNTIME DESTINATION bin
|
||||
INCLUDES DESTINATION include
|
||||
TARGETS EncodingsCompiler EXPORT "EncodingsCompilerTargets"
|
||||
LIBRARY DESTINATION lib${LIB_SUFFIX}
|
||||
ARCHIVE DESTINATION lib${LIB_SUFFIX}
|
||||
RUNTIME DESTINATION bin
|
||||
INCLUDES DESTINATION include
|
||||
)
|
||||
|
@ -1,26 +1,33 @@
|
||||
# Sources
|
||||
file(GLOB SRCS_G "src/*.cpp")
|
||||
POCO_SOURCES_AUTO( TEST_SRCS ${SRCS_G})
|
||||
POCO_SOURCES_AUTO(TEST_SRCS ${SRCS_G})
|
||||
|
||||
# Headers
|
||||
file(GLOB_RECURSE HDRS_G "src/*.h" )
|
||||
POCO_HEADERS_AUTO( TEST_SRCS ${HDRS_G})
|
||||
file(GLOB_RECURSE HDRS_G "src/*.h")
|
||||
POCO_HEADERS_AUTO(TEST_SRCS ${HDRS_G})
|
||||
|
||||
POCO_SOURCES_AUTO_PLAT( TEST_SRCS OFF
|
||||
src/WinDriver.cpp
|
||||
POCO_SOURCES_AUTO_PLAT(TEST_SRCS OFF
|
||||
src/WinDriver.cpp
|
||||
)
|
||||
|
||||
POCO_SOURCES_AUTO_PLAT( TEST_SRCS WINCE
|
||||
src/WinCEDriver.cpp
|
||||
POCO_SOURCES_AUTO_PLAT(TEST_SRCS WINCE
|
||||
src/WinCEDriver.cpp
|
||||
)
|
||||
|
||||
add_executable(Encodings-testrunner ${TEST_SRCS} )
|
||||
add_executable(Encodings-testrunner ${TEST_SRCS})
|
||||
if(ANDROID)
|
||||
add_test(NAME Encodings WORKING_DIRECTORY ${CMAKE_RUNTIME_OUTPUT_DIRECTORY}
|
||||
COMMAND ${CMAKE_COMMAND} -DANDROID_NDK=${ANDROID_NDK} -DLIBRARY_DIR=${CMAKE_BINARY_DIR}/lib -DUNITTEST=${CMAKE_BINARY_DIR}/bin/Encodings-testrunner -DTEST_PARAMETER=-all -P ${CMAKE_SOURCE_DIR}/cmake/ExecuteOnAndroid.cmake)
|
||||
add_test(
|
||||
NAME Encodings
|
||||
WORKING_DIRECTORY ${CMAKE_RUNTIME_OUTPUT_DIRECTORY}
|
||||
COMMAND ${CMAKE_COMMAND} -DANDROID_NDK=${ANDROID_NDK} -DLIBRARY_DIR=${CMAKE_BINARY_DIR}/lib -DUNITTEST=${CMAKE_BINARY_DIR}/bin/Encodings-testrunner -DTEST_PARAMETER=-all -P ${CMAKE_SOURCE_DIR}/cmake/ExecuteOnAndroid.cmake
|
||||
)
|
||||
else()
|
||||
add_test(NAME Encodings WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR} COMMAND Encodings-testrunner -ignore ${CMAKE_SOURCE_DIR}/cppignore.lnx -all)
|
||||
set_tests_properties(Encodings PROPERTIES ENVIRONMENT POCO_BASE=${CMAKE_SOURCE_DIR})
|
||||
add_test(
|
||||
NAME Encodings
|
||||
WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}
|
||||
COMMAND Encodings-testrunner -ignore ${CMAKE_SOURCE_DIR}/cppignore.lnx -all
|
||||
)
|
||||
set_tests_properties(Encodings PROPERTIES ENVIRONMENT POCO_BASE=${CMAKE_SOURCE_DIR})
|
||||
endif()
|
||||
|
||||
target_link_libraries(Encodings-testrunner PUBLIC Poco::Encodings CppUnit)
|
||||
|
@ -1,52 +1,52 @@
|
||||
# Sources
|
||||
file(GLOB SRCS_G "src/*.cpp")
|
||||
POCO_SOURCES_AUTO( SRCS ${SRCS_G})
|
||||
POCO_SOURCES_AUTO(SRCS ${SRCS_G})
|
||||
|
||||
# Headers
|
||||
file(GLOB_RECURSE HDRS_G "include/*.h" )
|
||||
POCO_HEADERS_AUTO( SRCS ${HDRS_G})
|
||||
file(GLOB_RECURSE HDRS_G "include/*.h")
|
||||
POCO_HEADERS_AUTO(SRCS ${HDRS_G})
|
||||
|
||||
# Platform Specific
|
||||
POCO_SOURCES_AUTO_PLAT( SRCS UNIX src/SyslogChannel.cpp )
|
||||
POCO_HEADERS_AUTO( SRCS include/Poco/SyslogChannel.h )
|
||||
POCO_SOURCES_AUTO_PLAT(SRCS UNIX src/SyslogChannel.cpp)
|
||||
POCO_HEADERS_AUTO(SRCS include/Poco/SyslogChannel.h)
|
||||
|
||||
# For Windows CE we need to disable these
|
||||
if(WINCE)
|
||||
POCO_SOURCES_AUTO_PLAT( SRCS OFF
|
||||
POCO_SOURCES_AUTO_PLAT(SRCS OFF
|
||||
src/WindowsConsoleChannel.cpp
|
||||
src/EventLogChannel.cpp
|
||||
)
|
||||
else()
|
||||
POCO_SOURCES_AUTO_PLAT( SRCS WIN32
|
||||
POCO_SOURCES_AUTO_PLAT(SRCS WIN32
|
||||
src/WindowsConsoleChannel.cpp
|
||||
src/EventLogChannel.cpp
|
||||
)
|
||||
endif()
|
||||
|
||||
# Version Resource
|
||||
if(MSVC AND NOT POCO_STATIC)
|
||||
source_group("Resources" FILES ${PROJECT_SOURCE_DIR}/DLLVersion.rc)
|
||||
list(APPEND SRCS ${PROJECT_SOURCE_DIR}/DLLVersion.rc)
|
||||
if(MSVC AND BUILD_SHARED_LIBS)
|
||||
source_group("Resources" FILES ${PROJECT_SOURCE_DIR}/DLLVersion.rc)
|
||||
list(APPEND SRCS ${PROJECT_SOURCE_DIR}/DLLVersion.rc)
|
||||
endif()
|
||||
|
||||
# Messages
|
||||
POCO_MESSAGES( SRCS Logging src/pocomsg.mc)
|
||||
POCO_MESSAGES(SRCS Logging src/pocomsg.mc)
|
||||
|
||||
# If POCO_UNBUNDLED is enabled we try to find the required packages
|
||||
# The configuration will fail if the packages are not found
|
||||
if (POCO_UNBUNDLED)
|
||||
if(POCO_UNBUNDLED)
|
||||
find_package(PCRE REQUIRED)
|
||||
find_package(ZLIB REQUIRED)
|
||||
|
||||
#HACK: Unicode.cpp requires functions from these files. The can't be taken from the library
|
||||
POCO_SOURCES( SRCS RegExp
|
||||
POCO_SOURCES(SRCS RegExp
|
||||
src/pcre_ucd.c
|
||||
src/pcre_tables.c
|
||||
)
|
||||
|
||||
else()
|
||||
# pcre
|
||||
POCO_SOURCES( SRCS pcre
|
||||
POCO_SOURCES(SRCS pcre
|
||||
src/pcre_config.c
|
||||
src/pcre_byte_order.c
|
||||
src/pcre_chartables.c
|
||||
@ -71,12 +71,12 @@ else()
|
||||
)
|
||||
|
||||
# zlib
|
||||
POCO_HEADERS( SRCS zlib
|
||||
POCO_HEADERS(SRCS zlib
|
||||
include/Poco/zconf.h
|
||||
include/Poco/zlib.h
|
||||
)
|
||||
|
||||
POCO_SOURCES( SRCS zlib
|
||||
POCO_SOURCES(SRCS zlib
|
||||
src/adler32.c
|
||||
src/compress.c
|
||||
src/crc32.c
|
||||
@ -88,7 +88,7 @@ else()
|
||||
src/trees.c
|
||||
src/zutil.c
|
||||
)
|
||||
endif (POCO_UNBUNDLED)
|
||||
endif(POCO_UNBUNDLED)
|
||||
|
||||
|
||||
add_library(Foundation ${SRCS})
|
||||
@ -98,41 +98,41 @@ set_target_properties(Foundation
|
||||
VERSION ${SHARED_LIBRARY_VERSION} SOVERSION ${SHARED_LIBRARY_VERSION}
|
||||
OUTPUT_NAME PocoFoundation
|
||||
DEFINE_SYMBOL Foundation_EXPORTS
|
||||
)
|
||||
)
|
||||
|
||||
if (POCO_UNBUNDLED)
|
||||
target_link_libraries(Foundation PUBLIC Pcre::Pcre ZLIB::ZLIB)
|
||||
target_compile_definitions(Foundation PUBLIC POCO_UNBUNDLED)
|
||||
endif (POCO_UNBUNDLED)
|
||||
if(POCO_UNBUNDLED)
|
||||
target_link_libraries(Foundation PUBLIC Pcre::Pcre ZLIB::ZLIB)
|
||||
target_compile_definitions(Foundation PUBLIC POCO_UNBUNDLED)
|
||||
endif(POCO_UNBUNDLED)
|
||||
|
||||
target_include_directories(Foundation
|
||||
PUBLIC
|
||||
$<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}/include>
|
||||
$<INSTALL_INTERFACE:include>
|
||||
PRIVATE ${CMAKE_CURRENT_SOURCE_DIR}/src
|
||||
)
|
||||
)
|
||||
|
||||
target_compile_definitions(Foundation
|
||||
PUBLIC
|
||||
$<$<CONFIG:Debug>:_DEBUG>
|
||||
$<$<BOOL:${DISABLE_CPP14}>:POCO_DISABLE_CPP14>
|
||||
$<$<NOT:$<BOOL:${DISABLE_CPP14}>>:POCO_ENABLE_CPP14>
|
||||
$<$<BOOL:${DISABLE_CPP11}>:POCO_DISABLE_CPP11>
|
||||
$<$<NOT:$<BOOL:${DISABLE_CPP11}>>:POCO_ENABLE_CPP11>
|
||||
PUBLIC
|
||||
$<$<CONFIG:Debug>:_DEBUG>
|
||||
$<$<BOOL:${DISABLE_CPP14}>:POCO_DISABLE_CPP14>
|
||||
$<$<NOT:$<BOOL:${DISABLE_CPP14}>>:POCO_ENABLE_CPP14>
|
||||
$<$<BOOL:${DISABLE_CPP11}>:POCO_DISABLE_CPP11>
|
||||
$<$<NOT:$<BOOL:${DISABLE_CPP11}>>:POCO_ENABLE_CPP11>
|
||||
)
|
||||
target_compile_features(Foundation
|
||||
PUBLIC
|
||||
$<$<NOT:$<BOOL:${DISABLE_CPP11}>>:cxx_defaulted_move_initializers>
|
||||
PUBLIC
|
||||
$<$<NOT:$<BOOL:${DISABLE_CPP11}>>:cxx_defaulted_move_initializers>
|
||||
)
|
||||
if(NOT DISABLE_CPP14 AND CMAKE_VERSION VERSION_GREATER "3.8")
|
||||
target_compile_features(Foundation PUBLIC cxx_std_14)
|
||||
target_compile_features(Foundation PUBLIC cxx_std_14)
|
||||
endif()
|
||||
|
||||
if(NOT BUILD_SHARED_LIBS)
|
||||
target_compile_definitions(Foundation
|
||||
PUBLIC
|
||||
POCO_STATIC
|
||||
)
|
||||
target_compile_definitions(Foundation
|
||||
PUBLIC
|
||||
POCO_STATIC
|
||||
)
|
||||
endif()
|
||||
|
||||
if(WIN32)
|
||||
@ -140,56 +140,56 @@ if(WIN32)
|
||||
target_link_libraries(Foundation PUBLIC iphlpapi)
|
||||
endif()
|
||||
|
||||
if (CYGWIN)
|
||||
target_compile_definitions(Foundation PUBLIC POCO_NO_FPENVIRONMENT POCO_NO_WSTRING _XOPEN_SOURCE=500 __BSD_VISIBLE)
|
||||
if(CYGWIN)
|
||||
target_compile_definitions(Foundation PUBLIC POCO_NO_FPENVIRONMENT POCO_NO_WSTRING _XOPEN_SOURCE=500 __BSD_VISIBLE)
|
||||
else()
|
||||
if (UNIX AND NOT ANDROID )
|
||||
target_compile_definitions(Foundation PUBLIC POCO_OS_FAMILY_UNIX)
|
||||
if (APPLE)
|
||||
target_compile_definitions(Foundation PUBLIC POCO_HAVE_IPv6 POCO_NO_STAT64)
|
||||
target_link_libraries(Foundation PUBLIC ${CMAKE_DL_LIBS})
|
||||
else()
|
||||
target_compile_definitions(Foundation PUBLIC _REENTRANT _THREAD_SAFE _LARGEFILE64_SOURCE _FILE_OFFSET_BITS=64)
|
||||
if (QNX)
|
||||
target_compile_definitions(Foundation PUBLIC POCO_HAVE_FD_POLL)
|
||||
target_link_libraries(Foundation PUBLIC m socket)
|
||||
elseif("${CMAKE_SYSTEM_NAME}" STREQUAL "FreeBSD")
|
||||
target_compile_definitions(Foundation PUBLIC POCO_HAVE_FD_POLL)
|
||||
target_link_libraries(Foundation PUBLIC pthread ${CMAKE_DL_LIBS} rt)
|
||||
elseif("${CMAKE_SYSTEM_NAME}" STREQUAL "AIX")
|
||||
target_compile_definitions(Foundation PUBLIC _XOPEN_SOURCE=500 POCO_HAVE_FD_POLL)
|
||||
target_link_libraries(Foundation PUBLIC pthread ${CMAKE_DL_LIBS} rt)
|
||||
if(UNIX AND NOT ANDROID)
|
||||
target_compile_definitions(Foundation PUBLIC POCO_OS_FAMILY_UNIX)
|
||||
if(APPLE)
|
||||
target_compile_definitions(Foundation PUBLIC POCO_HAVE_IPv6 POCO_NO_STAT64)
|
||||
target_link_libraries(Foundation PUBLIC ${CMAKE_DL_LIBS})
|
||||
else()
|
||||
target_compile_definitions(Foundation PUBLIC _XOPEN_SOURCE=500 POCO_HAVE_FD_EPOLL)
|
||||
target_link_libraries(Foundation PUBLIC pthread ${CMAKE_DL_LIBS} rt)
|
||||
endif()
|
||||
endif (APPLE)
|
||||
endif(UNIX AND NOT ANDROID )
|
||||
endif (CYGWIN)
|
||||
target_compile_definitions(Foundation PUBLIC _REENTRANT _THREAD_SAFE _LARGEFILE64_SOURCE _FILE_OFFSET_BITS=64)
|
||||
if(QNX)
|
||||
target_compile_definitions(Foundation PUBLIC POCO_HAVE_FD_POLL)
|
||||
target_link_libraries(Foundation PUBLIC m socket)
|
||||
elseif("${CMAKE_SYSTEM_NAME}" STREQUAL "FreeBSD")
|
||||
target_compile_definitions(Foundation PUBLIC POCO_HAVE_FD_POLL)
|
||||
target_link_libraries(Foundation PUBLIC pthread ${CMAKE_DL_LIBS} rt)
|
||||
elseif("${CMAKE_SYSTEM_NAME}" STREQUAL "AIX")
|
||||
target_compile_definitions(Foundation PUBLIC _XOPEN_SOURCE=500 POCO_HAVE_FD_POLL)
|
||||
target_link_libraries(Foundation PUBLIC pthread ${CMAKE_DL_LIBS} rt)
|
||||
else()
|
||||
target_compile_definitions(Foundation PUBLIC _XOPEN_SOURCE=500 POCO_HAVE_FD_EPOLL)
|
||||
target_link_libraries(Foundation PUBLIC pthread ${CMAKE_DL_LIBS} rt)
|
||||
endif()
|
||||
endif(APPLE)
|
||||
endif(UNIX AND NOT ANDROID)
|
||||
endif(CYGWIN)
|
||||
|
||||
if (CMAKE_SYSTEM MATCHES "SunOS")
|
||||
target_compile_definitions(Foundation
|
||||
PUBLIC
|
||||
POCO_OS_FAMILY_UNIX
|
||||
_XOPEN_SOURCE=500
|
||||
_REENTRANT
|
||||
_THREAD_SAFE
|
||||
_LARGEFILE64_SOURCE
|
||||
_FILE_OFFSET_BITS=64
|
||||
if(CMAKE_SYSTEM MATCHES "SunOS")
|
||||
target_compile_definitions(Foundation
|
||||
PUBLIC
|
||||
POCO_OS_FAMILY_UNIX
|
||||
_XOPEN_SOURCE=500
|
||||
_REENTRANT
|
||||
_THREAD_SAFE
|
||||
_LARGEFILE64_SOURCE
|
||||
_FILE_OFFSET_BITS=64
|
||||
)
|
||||
target_link_libraries(Foundation PUBLIC pthread socket xnet nsl resolv rt ${CMAKE_DL_LIBS})
|
||||
target_link_libraries(Foundation PUBLIC pthread socket xnet nsl resolv rt ${CMAKE_DL_LIBS})
|
||||
endif()
|
||||
|
||||
if(CMAKE_COMPILER_IS_MINGW)
|
||||
target_compile_definitions(Foundation
|
||||
PUBLIC
|
||||
WC_NO_BEST_FIT_CHARS=0x400
|
||||
POCO_WIN32_UTF8
|
||||
_WIN32
|
||||
MINGW32
|
||||
WINVER=0x500
|
||||
ODBCVER=0x0300
|
||||
POCO_THREAD_STACK_SIZE
|
||||
target_compile_definitions(Foundation
|
||||
PUBLIC
|
||||
WC_NO_BEST_FIT_CHARS=0x400
|
||||
POCO_WIN32_UTF8
|
||||
_WIN32
|
||||
MINGW32
|
||||
WINVER=0x500
|
||||
ODBCVER=0x0300
|
||||
POCO_THREAD_STACK_SIZE
|
||||
)
|
||||
endif()
|
||||
|
||||
@ -200,19 +200,19 @@ if(${CMAKE_CXX_COMPILER_ID} MATCHES "SunPro")
|
||||
endif()
|
||||
|
||||
# iOS
|
||||
if (IOS)
|
||||
target_compile_definitions(Foundation
|
||||
PUBLIC
|
||||
POCO_HAVE_IPv6
|
||||
POCO_NO_FPENVIRONMENT
|
||||
POCO_NO_STAT64
|
||||
POCO_NO_SHAREDLIBS
|
||||
POCO_NO_NET_IFTYPES
|
||||
if(IOS)
|
||||
target_compile_definitions(Foundation
|
||||
PUBLIC
|
||||
POCO_HAVE_IPv6
|
||||
POCO_NO_FPENVIRONMENT
|
||||
POCO_NO_STAT64
|
||||
POCO_NO_SHAREDLIBS
|
||||
POCO_NO_NET_IFTYPES
|
||||
)
|
||||
endif()
|
||||
|
||||
#Android
|
||||
if (ANDROID)
|
||||
if(ANDROID)
|
||||
target_compile_definitions(Foundation
|
||||
PUBLIC
|
||||
POCO_NO_FPENVIRONMENT
|
||||
@ -225,11 +225,10 @@ endif()
|
||||
POCO_INSTALL(Foundation)
|
||||
POCO_GENERATE_PACKAGE(Foundation)
|
||||
|
||||
if (ENABLE_TESTS)
|
||||
if(POCO_STATIC)
|
||||
set_property(TARGET Foundation PROPERTY POSITION_INDEPENDENT_CODE ON) # This is needed to build TestLibrary.so as shared.
|
||||
if(ENABLE_TESTS)
|
||||
if(NOT BUILD_SHARED_LIBS)
|
||||
set_property(TARGET Foundation PROPERTY POSITION_INDEPENDENT_CODE ON) # This is needed to build TestLibrary.so as shared.
|
||||
endif()
|
||||
add_subdirectory(samples)
|
||||
add_subdirectory(testsuite)
|
||||
endif ()
|
||||
|
||||
endif()
|
||||
|
@ -630,20 +630,6 @@
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='release_static_mt|Win32'">true</ExcludedFromBuild>
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='release_static_mt|x64'">true</ExcludedFromBuild>
|
||||
</ClCompile>
|
||||
<ClCompile Include="src\DirectoryIterator_WIN32.cpp">
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='debug_shared|Win32'">true</ExcludedFromBuild>
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='debug_shared|x64'">true</ExcludedFromBuild>
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='debug_static_md|Win32'">true</ExcludedFromBuild>
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='debug_static_md|x64'">true</ExcludedFromBuild>
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='debug_static_mt|Win32'">true</ExcludedFromBuild>
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='debug_static_mt|x64'">true</ExcludedFromBuild>
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='release_shared|Win32'">true</ExcludedFromBuild>
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='release_shared|x64'">true</ExcludedFromBuild>
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='release_static_md|Win32'">true</ExcludedFromBuild>
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='release_static_md|x64'">true</ExcludedFromBuild>
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='release_static_mt|Win32'">true</ExcludedFromBuild>
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='release_static_mt|x64'">true</ExcludedFromBuild>
|
||||
</ClCompile>
|
||||
<ClCompile Include="src\DirectoryIterator_WIN32U.cpp">
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='debug_shared|Win32'">true</ExcludedFromBuild>
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='debug_shared|x64'">true</ExcludedFromBuild>
|
||||
@ -674,20 +660,6 @@
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='release_static_mt|Win32'">true</ExcludedFromBuild>
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='release_static_mt|x64'">true</ExcludedFromBuild>
|
||||
</ClCompile>
|
||||
<ClCompile Include="src\Environment_WIN32.cpp">
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='debug_shared|Win32'">true</ExcludedFromBuild>
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='debug_shared|x64'">true</ExcludedFromBuild>
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='debug_static_md|Win32'">true</ExcludedFromBuild>
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='debug_static_md|x64'">true</ExcludedFromBuild>
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='debug_static_mt|Win32'">true</ExcludedFromBuild>
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='debug_static_mt|x64'">true</ExcludedFromBuild>
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='release_shared|Win32'">true</ExcludedFromBuild>
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='release_shared|x64'">true</ExcludedFromBuild>
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='release_static_md|Win32'">true</ExcludedFromBuild>
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='release_static_md|x64'">true</ExcludedFromBuild>
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='release_static_mt|Win32'">true</ExcludedFromBuild>
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='release_static_mt|x64'">true</ExcludedFromBuild>
|
||||
</ClCompile>
|
||||
<ClCompile Include="src\Environment_WIN32U.cpp">
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='debug_shared|Win32'">true</ExcludedFromBuild>
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='debug_shared|x64'">true</ExcludedFromBuild>
|
||||
@ -784,20 +756,6 @@
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='release_static_mt|Win32'">true</ExcludedFromBuild>
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='release_static_mt|x64'">true</ExcludedFromBuild>
|
||||
</ClCompile>
|
||||
<ClCompile Include="src\File_WIN32.cpp">
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='debug_shared|Win32'">true</ExcludedFromBuild>
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='debug_shared|x64'">true</ExcludedFromBuild>
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='debug_static_md|Win32'">true</ExcludedFromBuild>
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='debug_static_md|x64'">true</ExcludedFromBuild>
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='debug_static_mt|Win32'">true</ExcludedFromBuild>
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='debug_static_mt|x64'">true</ExcludedFromBuild>
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='release_shared|Win32'">true</ExcludedFromBuild>
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='release_shared|x64'">true</ExcludedFromBuild>
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='release_static_md|Win32'">true</ExcludedFromBuild>
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='release_static_md|x64'">true</ExcludedFromBuild>
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='release_static_mt|Win32'">true</ExcludedFromBuild>
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='release_static_mt|x64'">true</ExcludedFromBuild>
|
||||
</ClCompile>
|
||||
<ClCompile Include="src\File_WIN32U.cpp">
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='debug_shared|Win32'">true</ExcludedFromBuild>
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='debug_shared|x64'">true</ExcludedFromBuild>
|
||||
@ -917,20 +875,6 @@
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='release_static_mt|Win32'">true</ExcludedFromBuild>
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='release_static_mt|x64'">true</ExcludedFromBuild>
|
||||
</ClCompile>
|
||||
<ClCompile Include="src\LogFile_WIN32.cpp">
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='debug_shared|Win32'">true</ExcludedFromBuild>
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='debug_shared|x64'">true</ExcludedFromBuild>
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='debug_static_md|Win32'">true</ExcludedFromBuild>
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='debug_static_md|x64'">true</ExcludedFromBuild>
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='debug_static_mt|Win32'">true</ExcludedFromBuild>
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='debug_static_mt|x64'">true</ExcludedFromBuild>
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='release_shared|Win32'">true</ExcludedFromBuild>
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='release_shared|x64'">true</ExcludedFromBuild>
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='release_static_md|Win32'">true</ExcludedFromBuild>
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='release_static_md|x64'">true</ExcludedFromBuild>
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='release_static_mt|Win32'">true</ExcludedFromBuild>
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='release_static_mt|x64'">true</ExcludedFromBuild>
|
||||
</ClCompile>
|
||||
<ClCompile Include="src\LogFile_WIN32U.cpp">
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='debug_shared|Win32'">true</ExcludedFromBuild>
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='debug_shared|x64'">true</ExcludedFromBuild>
|
||||
@ -999,20 +943,6 @@
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='release_static_mt|Win32'">true</ExcludedFromBuild>
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='release_static_mt|x64'">true</ExcludedFromBuild>
|
||||
</ClCompile>
|
||||
<ClCompile Include="src\NamedEvent_WIN32.cpp">
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='debug_shared|Win32'">true</ExcludedFromBuild>
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='debug_shared|x64'">true</ExcludedFromBuild>
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='debug_static_md|Win32'">true</ExcludedFromBuild>
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='debug_static_md|x64'">true</ExcludedFromBuild>
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='debug_static_mt|Win32'">true</ExcludedFromBuild>
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='debug_static_mt|x64'">true</ExcludedFromBuild>
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='release_shared|Win32'">true</ExcludedFromBuild>
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='release_shared|x64'">true</ExcludedFromBuild>
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='release_static_md|Win32'">true</ExcludedFromBuild>
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='release_static_md|x64'">true</ExcludedFromBuild>
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='release_static_mt|Win32'">true</ExcludedFromBuild>
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='release_static_mt|x64'">true</ExcludedFromBuild>
|
||||
</ClCompile>
|
||||
<ClCompile Include="src\NamedEvent_WIN32U.cpp">
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='debug_shared|Win32'">true</ExcludedFromBuild>
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='debug_shared|x64'">true</ExcludedFromBuild>
|
||||
@ -1042,20 +972,6 @@
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='release_static_mt|Win32'">true</ExcludedFromBuild>
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='release_static_mt|x64'">true</ExcludedFromBuild>
|
||||
</ClCompile>
|
||||
<ClCompile Include="src\NamedMutex_WIN32.cpp">
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='debug_shared|Win32'">true</ExcludedFromBuild>
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='debug_shared|x64'">true</ExcludedFromBuild>
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='debug_static_md|Win32'">true</ExcludedFromBuild>
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='debug_static_md|x64'">true</ExcludedFromBuild>
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='debug_static_mt|Win32'">true</ExcludedFromBuild>
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='debug_static_mt|x64'">true</ExcludedFromBuild>
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='release_shared|Win32'">true</ExcludedFromBuild>
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='release_shared|x64'">true</ExcludedFromBuild>
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='release_static_md|Win32'">true</ExcludedFromBuild>
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='release_static_md|x64'">true</ExcludedFromBuild>
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='release_static_mt|Win32'">true</ExcludedFromBuild>
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='release_static_mt|x64'">true</ExcludedFromBuild>
|
||||
</ClCompile>
|
||||
<ClCompile Include="src\NamedMutex_WIN32U.cpp">
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='debug_shared|Win32'">true</ExcludedFromBuild>
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='debug_shared|x64'">true</ExcludedFromBuild>
|
||||
@ -1094,20 +1010,6 @@
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='release_static_mt|Win32'">true</ExcludedFromBuild>
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='release_static_mt|x64'">true</ExcludedFromBuild>
|
||||
</ClCompile>
|
||||
<ClCompile Include="src\Path_WIN32.cpp">
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='debug_shared|Win32'">true</ExcludedFromBuild>
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='debug_shared|x64'">true</ExcludedFromBuild>
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='debug_static_md|Win32'">true</ExcludedFromBuild>
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='debug_static_md|x64'">true</ExcludedFromBuild>
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='debug_static_mt|Win32'">true</ExcludedFromBuild>
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='debug_static_mt|x64'">true</ExcludedFromBuild>
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='release_shared|Win32'">true</ExcludedFromBuild>
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='release_shared|x64'">true</ExcludedFromBuild>
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='release_static_md|Win32'">true</ExcludedFromBuild>
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='release_static_md|x64'">true</ExcludedFromBuild>
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='release_static_mt|Win32'">true</ExcludedFromBuild>
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='release_static_mt|x64'">true</ExcludedFromBuild>
|
||||
</ClCompile>
|
||||
<ClCompile Include="src\Path_WIN32U.cpp">
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='debug_shared|Win32'">true</ExcludedFromBuild>
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='debug_shared|x64'">true</ExcludedFromBuild>
|
||||
@ -1205,20 +1107,6 @@
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='release_static_mt|Win32'">true</ExcludedFromBuild>
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='release_static_mt|x64'">true</ExcludedFromBuild>
|
||||
</ClCompile>
|
||||
<ClCompile Include="src\Process_WIN32.cpp">
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='debug_shared|Win32'">true</ExcludedFromBuild>
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='debug_shared|x64'">true</ExcludedFromBuild>
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='debug_static_md|Win32'">true</ExcludedFromBuild>
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='debug_static_md|x64'">true</ExcludedFromBuild>
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='debug_static_mt|Win32'">true</ExcludedFromBuild>
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='debug_static_mt|x64'">true</ExcludedFromBuild>
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='release_shared|Win32'">true</ExcludedFromBuild>
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='release_shared|x64'">true</ExcludedFromBuild>
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='release_static_md|Win32'">true</ExcludedFromBuild>
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='release_static_md|x64'">true</ExcludedFromBuild>
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='release_static_mt|Win32'">true</ExcludedFromBuild>
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='release_static_mt|x64'">true</ExcludedFromBuild>
|
||||
</ClCompile>
|
||||
<ClCompile Include="src\Process_WIN32U.cpp">
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='debug_shared|Win32'">true</ExcludedFromBuild>
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='debug_shared|x64'">true</ExcludedFromBuild>
|
||||
@ -1329,20 +1217,6 @@
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='release_static_mt|Win32'">true</ExcludedFromBuild>
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='release_static_mt|x64'">true</ExcludedFromBuild>
|
||||
</ClCompile>
|
||||
<ClCompile Include="src\SharedLibrary_WIN32.cpp">
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='debug_shared|Win32'">true</ExcludedFromBuild>
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='debug_shared|x64'">true</ExcludedFromBuild>
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='debug_static_md|Win32'">true</ExcludedFromBuild>
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='debug_static_md|x64'">true</ExcludedFromBuild>
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='debug_static_mt|Win32'">true</ExcludedFromBuild>
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='debug_static_mt|x64'">true</ExcludedFromBuild>
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='release_shared|Win32'">true</ExcludedFromBuild>
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='release_shared|x64'">true</ExcludedFromBuild>
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='release_static_md|Win32'">true</ExcludedFromBuild>
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='release_static_md|x64'">true</ExcludedFromBuild>
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='release_static_mt|Win32'">true</ExcludedFromBuild>
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='release_static_mt|x64'">true</ExcludedFromBuild>
|
||||
</ClCompile>
|
||||
<ClCompile Include="src\SharedLibrary_WIN32U.cpp">
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='debug_shared|Win32'">true</ExcludedFromBuild>
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='debug_shared|x64'">true</ExcludedFromBuild>
|
||||
@ -1612,7 +1486,6 @@
|
||||
<ClInclude Include="include\Poco\DirectoryIterator.h" />
|
||||
<ClInclude Include="include\Poco\DirectoryIteratorStrategy.h" />
|
||||
<ClInclude Include="include\Poco\DirectoryIterator_UNIX.h" />
|
||||
<ClInclude Include="include\Poco\DirectoryIterator_WIN32.h" />
|
||||
<ClInclude Include="include\Poco\DirectoryIterator_WIN32U.h" />
|
||||
<ClInclude Include="include\Poco\DirectoryWatcher.h" />
|
||||
<ClInclude Include="include\Poco\DynamicAny.h" />
|
||||
@ -1625,7 +1498,6 @@
|
||||
<ClInclude Include="include\Poco\Dynamic\VarIterator.h" />
|
||||
<ClInclude Include="include\Poco\Environment.h" />
|
||||
<ClInclude Include="include\Poco\Environment_UNIX.h" />
|
||||
<ClInclude Include="include\Poco\Environment_WIN32.h" />
|
||||
<ClInclude Include="include\Poco\Environment_WIN32U.h" />
|
||||
<ClInclude Include="include\Poco\Error.h" />
|
||||
<ClInclude Include="include\Poco\ErrorHandler.h" />
|
||||
@ -1651,7 +1523,6 @@
|
||||
<ClInclude Include="include\Poco\FileStream_POSIX.h" />
|
||||
<ClInclude Include="include\Poco\FileStream_WIN32.h" />
|
||||
<ClInclude Include="include\Poco\File_UNIX.h" />
|
||||
<ClInclude Include="include\Poco\File_WIN32.h" />
|
||||
<ClInclude Include="include\Poco\File_WIN32U.h" />
|
||||
<ClInclude Include="include\Poco\Format.h" />
|
||||
<ClInclude Include="include\Poco\Formatter.h" />
|
||||
@ -1688,7 +1559,6 @@
|
||||
<ClInclude Include="include\Poco\LocalDateTime.h" />
|
||||
<ClInclude Include="include\Poco\LogFile.h" />
|
||||
<ClInclude Include="include\Poco\LogFile_STD.h" />
|
||||
<ClInclude Include="include\Poco\LogFile_WIN32.h" />
|
||||
<ClInclude Include="include\Poco\LogFile_WIN32U.h" />
|
||||
<ClInclude Include="include\Poco\Logger.h" />
|
||||
<ClInclude Include="include\Poco\LoggingFactory.h" />
|
||||
@ -1709,11 +1579,9 @@
|
||||
<ClInclude Include="include\Poco\Mutex_WIN32.h" />
|
||||
<ClInclude Include="include\Poco\NamedEvent.h" />
|
||||
<ClInclude Include="include\Poco\NamedEvent_UNIX.h" />
|
||||
<ClInclude Include="include\Poco\NamedEvent_WIN32.h" />
|
||||
<ClInclude Include="include\Poco\NamedEvent_WIN32U.h" />
|
||||
<ClInclude Include="include\Poco\NamedMutex.h" />
|
||||
<ClInclude Include="include\Poco\NamedMutex_UNIX.h" />
|
||||
<ClInclude Include="include\Poco\NamedMutex_WIN32.h" />
|
||||
<ClInclude Include="include\Poco\NamedMutex_WIN32U.h" />
|
||||
<ClInclude Include="include\Poco\NamedTuple.h" />
|
||||
<ClInclude Include="include\Poco\NestedDiagnosticContext.h" />
|
||||
@ -1735,7 +1603,6 @@
|
||||
<ClInclude Include="include\Poco\OrderedSet.h" />
|
||||
<ClInclude Include="include\Poco\Path.h" />
|
||||
<ClInclude Include="include\Poco\Path_UNIX.h" />
|
||||
<ClInclude Include="include\Poco\Path_WIN32.h" />
|
||||
<ClInclude Include="include\Poco\Path_WIN32U.h" />
|
||||
<ClInclude Include="include\Poco\PatternFormatter.h" />
|
||||
<ClInclude Include="include\Poco\PBKDF2Engine.h" />
|
||||
@ -1756,7 +1623,6 @@
|
||||
<ClInclude Include="include\Poco\PriorityStrategy.h" />
|
||||
<ClInclude Include="include\Poco\Process.h" />
|
||||
<ClInclude Include="include\Poco\Process_UNIX.h" />
|
||||
<ClInclude Include="include\Poco\Process_WIN32.h" />
|
||||
<ClInclude Include="include\Poco\Process_WIN32U.h" />
|
||||
<ClInclude Include="include\Poco\PurgeStrategy.h" />
|
||||
<ClInclude Include="include\Poco\Random.h" />
|
||||
@ -1781,7 +1647,6 @@
|
||||
<ClInclude Include="include\Poco\SharedLibrary.h" />
|
||||
<ClInclude Include="include\Poco\SharedLibrary_HPUX.h" />
|
||||
<ClInclude Include="include\Poco\SharedLibrary_UNIX.h" />
|
||||
<ClInclude Include="include\Poco\SharedLibrary_WIN32.h" />
|
||||
<ClInclude Include="include\Poco\SharedLibrary_WIN32U.h" />
|
||||
<ClInclude Include="include\Poco\SharedMemory.h" />
|
||||
<ClInclude Include="include\Poco\SharedMemory_DUMMY.h" />
|
||||
|
@ -216,9 +216,6 @@
|
||||
<ClCompile Include="src\Environment_UNIX.cpp">
|
||||
<Filter>Core\Source Files</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="src\Environment_WIN32.cpp">
|
||||
<Filter>Core\Source Files</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="src\Environment_WIN32U.cpp">
|
||||
<Filter>Core\Source Files</Filter>
|
||||
</ClCompile>
|
||||
@ -486,9 +483,6 @@
|
||||
<ClCompile Include="src\SharedLibrary_UNIX.cpp">
|
||||
<Filter>SharedLibrary\Source Files</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="src\SharedLibrary_WIN32.cpp">
|
||||
<Filter>SharedLibrary\Source Files</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="src\SharedLibrary_WIN32U.cpp">
|
||||
<Filter>SharedLibrary\Source Files</Filter>
|
||||
</ClCompile>
|
||||
@ -594,9 +588,6 @@
|
||||
<ClCompile Include="src\LogFile_STD.cpp">
|
||||
<Filter>Logging\Source Files</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="src\LogFile_WIN32.cpp">
|
||||
<Filter>Logging\Source Files</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="src\LogFile_WIN32U.cpp">
|
||||
<Filter>Logging\Source Files</Filter>
|
||||
</ClCompile>
|
||||
@ -666,9 +657,6 @@
|
||||
<ClCompile Include="src\DirectoryIterator_UNIX.cpp">
|
||||
<Filter>Filesystem\Source Files</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="src\DirectoryIterator_WIN32.cpp">
|
||||
<Filter>Filesystem\Source Files</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="src\DirectoryIterator_WIN32U.cpp">
|
||||
<Filter>Filesystem\Source Files</Filter>
|
||||
</ClCompile>
|
||||
@ -681,9 +669,6 @@
|
||||
<ClCompile Include="src\File_UNIX.cpp">
|
||||
<Filter>Filesystem\Source Files</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="src\File_WIN32.cpp">
|
||||
<Filter>Filesystem\Source Files</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="src\File_WIN32U.cpp">
|
||||
<Filter>Filesystem\Source Files</Filter>
|
||||
</ClCompile>
|
||||
@ -696,9 +681,6 @@
|
||||
<ClCompile Include="src\Path_UNIX.cpp">
|
||||
<Filter>Filesystem\Source Files</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="src\Path_WIN32.cpp">
|
||||
<Filter>Filesystem\Source Files</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="src\Path_WIN32U.cpp">
|
||||
<Filter>Filesystem\Source Files</Filter>
|
||||
</ClCompile>
|
||||
@ -711,9 +693,6 @@
|
||||
<ClCompile Include="src\NamedEvent_UNIX.cpp">
|
||||
<Filter>Processes\Source Files</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="src\NamedEvent_WIN32.cpp">
|
||||
<Filter>Processes\Source Files</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="src\NamedEvent_WIN32U.cpp">
|
||||
<Filter>Processes\Source Files</Filter>
|
||||
</ClCompile>
|
||||
@ -723,9 +702,6 @@
|
||||
<ClCompile Include="src\NamedMutex_UNIX.cpp">
|
||||
<Filter>Processes\Source Files</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="src\NamedMutex_WIN32.cpp">
|
||||
<Filter>Processes\Source Files</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="src\NamedMutex_WIN32U.cpp">
|
||||
<Filter>Processes\Source Files</Filter>
|
||||
</ClCompile>
|
||||
@ -753,9 +729,6 @@
|
||||
<ClCompile Include="src\Process_UNIX.cpp">
|
||||
<Filter>Processes\Source Files</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="src\Process_WIN32.cpp">
|
||||
<Filter>Processes\Source Files</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="src\Process_WIN32U.cpp">
|
||||
<Filter>Processes\Source Files</Filter>
|
||||
</ClCompile>
|
||||
@ -965,9 +938,6 @@
|
||||
<ClInclude Include="include\Poco\Environment_UNIX.h">
|
||||
<Filter>Core\Header Files</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="include\Poco\Environment_WIN32.h">
|
||||
<Filter>Core\Header Files</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="include\Poco\Environment_WIN32U.h">
|
||||
<Filter>Core\Header Files</Filter>
|
||||
</ClInclude>
|
||||
@ -1349,9 +1319,6 @@
|
||||
<ClInclude Include="include\Poco\SharedLibrary_UNIX.h">
|
||||
<Filter>SharedLibrary\Header Files</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="include\Poco\SharedLibrary_WIN32.h">
|
||||
<Filter>SharedLibrary\Header Files</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="include\Poco\SharedLibrary_WIN32U.h">
|
||||
<Filter>SharedLibrary\Header Files</Filter>
|
||||
</ClInclude>
|
||||
@ -1406,9 +1373,6 @@
|
||||
<ClInclude Include="include\Poco\LogFile_STD.h">
|
||||
<Filter>Logging\Header Files</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="include\Poco\LogFile_WIN32.h">
|
||||
<Filter>Logging\Header Files</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="include\Poco\LogFile_WIN32U.h">
|
||||
<Filter>Logging\Header Files</Filter>
|
||||
</ClInclude>
|
||||
@ -1487,9 +1451,6 @@
|
||||
<ClInclude Include="include\Poco\DirectoryIterator_UNIX.h">
|
||||
<Filter>Filesystem\Header Files</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="include\Poco\DirectoryIterator_WIN32.h">
|
||||
<Filter>Filesystem\Header Files</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="include\Poco\DirectoryIterator_WIN32U.h">
|
||||
<Filter>Filesystem\Header Files</Filter>
|
||||
</ClInclude>
|
||||
@ -1502,9 +1463,6 @@
|
||||
<ClInclude Include="include\Poco\File_UNIX.h">
|
||||
<Filter>Filesystem\Header Files</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="include\Poco\File_WIN32.h">
|
||||
<Filter>Filesystem\Header Files</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="include\Poco\File_WIN32U.h">
|
||||
<Filter>Filesystem\Header Files</Filter>
|
||||
</ClInclude>
|
||||
@ -1517,9 +1475,6 @@
|
||||
<ClInclude Include="include\Poco\Path_UNIX.h">
|
||||
<Filter>Filesystem\Header Files</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="include\Poco\Path_WIN32.h">
|
||||
<Filter>Filesystem\Header Files</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="include\Poco\Path_WIN32U.h">
|
||||
<Filter>Filesystem\Header Files</Filter>
|
||||
</ClInclude>
|
||||
@ -1532,9 +1487,6 @@
|
||||
<ClInclude Include="include\Poco\NamedEvent_UNIX.h">
|
||||
<Filter>Processes\Header Files</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="include\Poco\NamedEvent_WIN32.h">
|
||||
<Filter>Processes\Header Files</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="include\Poco\NamedEvent_WIN32U.h">
|
||||
<Filter>Processes\Header Files</Filter>
|
||||
</ClInclude>
|
||||
@ -1544,9 +1496,6 @@
|
||||
<ClInclude Include="include\Poco\NamedMutex_UNIX.h">
|
||||
<Filter>Processes\Header Files</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="include\Poco\NamedMutex_WIN32.h">
|
||||
<Filter>Processes\Header Files</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="include\Poco\NamedMutex_WIN32U.h">
|
||||
<Filter>Processes\Header Files</Filter>
|
||||
</ClInclude>
|
||||
@ -1574,9 +1523,6 @@
|
||||
<ClInclude Include="include\Poco\Process_UNIX.h">
|
||||
<Filter>Processes\Header Files</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="include\Poco\Process_WIN32.h">
|
||||
<Filter>Processes\Header Files</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="include\Poco\Process_WIN32U.h">
|
||||
<Filter>Processes\Header Files</Filter>
|
||||
</ClInclude>
|
||||
|
@ -630,20 +630,6 @@
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='release_static_mt|Win32'">true</ExcludedFromBuild>
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='release_static_mt|x64'">true</ExcludedFromBuild>
|
||||
</ClCompile>
|
||||
<ClCompile Include="src\DirectoryIterator_WIN32.cpp">
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='debug_shared|Win32'">true</ExcludedFromBuild>
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='debug_shared|x64'">true</ExcludedFromBuild>
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='debug_static_md|Win32'">true</ExcludedFromBuild>
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='debug_static_md|x64'">true</ExcludedFromBuild>
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='debug_static_mt|Win32'">true</ExcludedFromBuild>
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='debug_static_mt|x64'">true</ExcludedFromBuild>
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='release_shared|Win32'">true</ExcludedFromBuild>
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='release_shared|x64'">true</ExcludedFromBuild>
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='release_static_md|Win32'">true</ExcludedFromBuild>
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='release_static_md|x64'">true</ExcludedFromBuild>
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='release_static_mt|Win32'">true</ExcludedFromBuild>
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='release_static_mt|x64'">true</ExcludedFromBuild>
|
||||
</ClCompile>
|
||||
<ClCompile Include="src\DirectoryIterator_WIN32U.cpp">
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='debug_shared|Win32'">true</ExcludedFromBuild>
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='debug_shared|x64'">true</ExcludedFromBuild>
|
||||
@ -674,20 +660,6 @@
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='release_static_mt|Win32'">true</ExcludedFromBuild>
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='release_static_mt|x64'">true</ExcludedFromBuild>
|
||||
</ClCompile>
|
||||
<ClCompile Include="src\Environment_WIN32.cpp">
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='debug_shared|Win32'">true</ExcludedFromBuild>
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='debug_shared|x64'">true</ExcludedFromBuild>
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='debug_static_md|Win32'">true</ExcludedFromBuild>
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='debug_static_md|x64'">true</ExcludedFromBuild>
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='debug_static_mt|Win32'">true</ExcludedFromBuild>
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='debug_static_mt|x64'">true</ExcludedFromBuild>
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='release_shared|Win32'">true</ExcludedFromBuild>
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='release_shared|x64'">true</ExcludedFromBuild>
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='release_static_md|Win32'">true</ExcludedFromBuild>
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='release_static_md|x64'">true</ExcludedFromBuild>
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='release_static_mt|Win32'">true</ExcludedFromBuild>
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='release_static_mt|x64'">true</ExcludedFromBuild>
|
||||
</ClCompile>
|
||||
<ClCompile Include="src\Environment_WIN32U.cpp">
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='debug_shared|Win32'">true</ExcludedFromBuild>
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='debug_shared|x64'">true</ExcludedFromBuild>
|
||||
@ -784,20 +756,6 @@
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='release_static_mt|Win32'">true</ExcludedFromBuild>
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='release_static_mt|x64'">true</ExcludedFromBuild>
|
||||
</ClCompile>
|
||||
<ClCompile Include="src\File_WIN32.cpp">
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='debug_shared|Win32'">true</ExcludedFromBuild>
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='debug_shared|x64'">true</ExcludedFromBuild>
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='debug_static_md|Win32'">true</ExcludedFromBuild>
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='debug_static_md|x64'">true</ExcludedFromBuild>
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='debug_static_mt|Win32'">true</ExcludedFromBuild>
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='debug_static_mt|x64'">true</ExcludedFromBuild>
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='release_shared|Win32'">true</ExcludedFromBuild>
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='release_shared|x64'">true</ExcludedFromBuild>
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='release_static_md|Win32'">true</ExcludedFromBuild>
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='release_static_md|x64'">true</ExcludedFromBuild>
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='release_static_mt|Win32'">true</ExcludedFromBuild>
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='release_static_mt|x64'">true</ExcludedFromBuild>
|
||||
</ClCompile>
|
||||
<ClCompile Include="src\File_WIN32U.cpp">
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='debug_shared|Win32'">true</ExcludedFromBuild>
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='debug_shared|x64'">true</ExcludedFromBuild>
|
||||
@ -917,20 +875,6 @@
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='release_static_mt|Win32'">true</ExcludedFromBuild>
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='release_static_mt|x64'">true</ExcludedFromBuild>
|
||||
</ClCompile>
|
||||
<ClCompile Include="src\LogFile_WIN32.cpp">
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='debug_shared|Win32'">true</ExcludedFromBuild>
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='debug_shared|x64'">true</ExcludedFromBuild>
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='debug_static_md|Win32'">true</ExcludedFromBuild>
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='debug_static_md|x64'">true</ExcludedFromBuild>
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='debug_static_mt|Win32'">true</ExcludedFromBuild>
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='debug_static_mt|x64'">true</ExcludedFromBuild>
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='release_shared|Win32'">true</ExcludedFromBuild>
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='release_shared|x64'">true</ExcludedFromBuild>
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='release_static_md|Win32'">true</ExcludedFromBuild>
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='release_static_md|x64'">true</ExcludedFromBuild>
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='release_static_mt|Win32'">true</ExcludedFromBuild>
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='release_static_mt|x64'">true</ExcludedFromBuild>
|
||||
</ClCompile>
|
||||
<ClCompile Include="src\LogFile_WIN32U.cpp">
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='debug_shared|Win32'">true</ExcludedFromBuild>
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='debug_shared|x64'">true</ExcludedFromBuild>
|
||||
@ -999,20 +943,6 @@
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='release_static_mt|Win32'">true</ExcludedFromBuild>
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='release_static_mt|x64'">true</ExcludedFromBuild>
|
||||
</ClCompile>
|
||||
<ClCompile Include="src\NamedEvent_WIN32.cpp">
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='debug_shared|Win32'">true</ExcludedFromBuild>
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='debug_shared|x64'">true</ExcludedFromBuild>
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='debug_static_md|Win32'">true</ExcludedFromBuild>
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='debug_static_md|x64'">true</ExcludedFromBuild>
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='debug_static_mt|Win32'">true</ExcludedFromBuild>
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='debug_static_mt|x64'">true</ExcludedFromBuild>
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='release_shared|Win32'">true</ExcludedFromBuild>
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='release_shared|x64'">true</ExcludedFromBuild>
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='release_static_md|Win32'">true</ExcludedFromBuild>
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='release_static_md|x64'">true</ExcludedFromBuild>
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='release_static_mt|Win32'">true</ExcludedFromBuild>
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='release_static_mt|x64'">true</ExcludedFromBuild>
|
||||
</ClCompile>
|
||||
<ClCompile Include="src\NamedEvent_WIN32U.cpp">
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='debug_shared|Win32'">true</ExcludedFromBuild>
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='debug_shared|x64'">true</ExcludedFromBuild>
|
||||
@ -1042,20 +972,6 @@
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='release_static_mt|Win32'">true</ExcludedFromBuild>
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='release_static_mt|x64'">true</ExcludedFromBuild>
|
||||
</ClCompile>
|
||||
<ClCompile Include="src\NamedMutex_WIN32.cpp">
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='debug_shared|Win32'">true</ExcludedFromBuild>
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='debug_shared|x64'">true</ExcludedFromBuild>
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='debug_static_md|Win32'">true</ExcludedFromBuild>
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='debug_static_md|x64'">true</ExcludedFromBuild>
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='debug_static_mt|Win32'">true</ExcludedFromBuild>
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='debug_static_mt|x64'">true</ExcludedFromBuild>
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='release_shared|Win32'">true</ExcludedFromBuild>
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='release_shared|x64'">true</ExcludedFromBuild>
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='release_static_md|Win32'">true</ExcludedFromBuild>
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='release_static_md|x64'">true</ExcludedFromBuild>
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='release_static_mt|Win32'">true</ExcludedFromBuild>
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='release_static_mt|x64'">true</ExcludedFromBuild>
|
||||
</ClCompile>
|
||||
<ClCompile Include="src\NamedMutex_WIN32U.cpp">
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='debug_shared|Win32'">true</ExcludedFromBuild>
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='debug_shared|x64'">true</ExcludedFromBuild>
|
||||
@ -1094,20 +1010,6 @@
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='release_static_mt|Win32'">true</ExcludedFromBuild>
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='release_static_mt|x64'">true</ExcludedFromBuild>
|
||||
</ClCompile>
|
||||
<ClCompile Include="src\Path_WIN32.cpp">
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='debug_shared|Win32'">true</ExcludedFromBuild>
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='debug_shared|x64'">true</ExcludedFromBuild>
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='debug_static_md|Win32'">true</ExcludedFromBuild>
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='debug_static_md|x64'">true</ExcludedFromBuild>
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='debug_static_mt|Win32'">true</ExcludedFromBuild>
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='debug_static_mt|x64'">true</ExcludedFromBuild>
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='release_shared|Win32'">true</ExcludedFromBuild>
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='release_shared|x64'">true</ExcludedFromBuild>
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='release_static_md|Win32'">true</ExcludedFromBuild>
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='release_static_md|x64'">true</ExcludedFromBuild>
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='release_static_mt|Win32'">true</ExcludedFromBuild>
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='release_static_mt|x64'">true</ExcludedFromBuild>
|
||||
</ClCompile>
|
||||
<ClCompile Include="src\Path_WIN32U.cpp">
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='debug_shared|Win32'">true</ExcludedFromBuild>
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='debug_shared|x64'">true</ExcludedFromBuild>
|
||||
@ -1205,20 +1107,6 @@
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='release_static_mt|Win32'">true</ExcludedFromBuild>
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='release_static_mt|x64'">true</ExcludedFromBuild>
|
||||
</ClCompile>
|
||||
<ClCompile Include="src\Process_WIN32.cpp">
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='debug_shared|Win32'">true</ExcludedFromBuild>
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='debug_shared|x64'">true</ExcludedFromBuild>
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='debug_static_md|Win32'">true</ExcludedFromBuild>
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='debug_static_md|x64'">true</ExcludedFromBuild>
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='debug_static_mt|Win32'">true</ExcludedFromBuild>
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='debug_static_mt|x64'">true</ExcludedFromBuild>
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='release_shared|Win32'">true</ExcludedFromBuild>
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='release_shared|x64'">true</ExcludedFromBuild>
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='release_static_md|Win32'">true</ExcludedFromBuild>
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='release_static_md|x64'">true</ExcludedFromBuild>
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='release_static_mt|Win32'">true</ExcludedFromBuild>
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='release_static_mt|x64'">true</ExcludedFromBuild>
|
||||
</ClCompile>
|
||||
<ClCompile Include="src\Process_WIN32U.cpp">
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='debug_shared|Win32'">true</ExcludedFromBuild>
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='debug_shared|x64'">true</ExcludedFromBuild>
|
||||
@ -1329,20 +1217,6 @@
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='release_static_mt|Win32'">true</ExcludedFromBuild>
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='release_static_mt|x64'">true</ExcludedFromBuild>
|
||||
</ClCompile>
|
||||
<ClCompile Include="src\SharedLibrary_WIN32.cpp">
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='debug_shared|Win32'">true</ExcludedFromBuild>
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='debug_shared|x64'">true</ExcludedFromBuild>
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='debug_static_md|Win32'">true</ExcludedFromBuild>
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='debug_static_md|x64'">true</ExcludedFromBuild>
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='debug_static_mt|Win32'">true</ExcludedFromBuild>
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='debug_static_mt|x64'">true</ExcludedFromBuild>
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='release_shared|Win32'">true</ExcludedFromBuild>
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='release_shared|x64'">true</ExcludedFromBuild>
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='release_static_md|Win32'">true</ExcludedFromBuild>
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='release_static_md|x64'">true</ExcludedFromBuild>
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='release_static_mt|Win32'">true</ExcludedFromBuild>
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='release_static_mt|x64'">true</ExcludedFromBuild>
|
||||
</ClCompile>
|
||||
<ClCompile Include="src\SharedLibrary_WIN32U.cpp">
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='debug_shared|Win32'">true</ExcludedFromBuild>
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='debug_shared|x64'">true</ExcludedFromBuild>
|
||||
@ -1612,7 +1486,6 @@
|
||||
<ClInclude Include="include\Poco\DirectoryIterator.h" />
|
||||
<ClInclude Include="include\Poco\DirectoryIteratorStrategy.h" />
|
||||
<ClInclude Include="include\Poco\DirectoryIterator_UNIX.h" />
|
||||
<ClInclude Include="include\Poco\DirectoryIterator_WIN32.h" />
|
||||
<ClInclude Include="include\Poco\DirectoryIterator_WIN32U.h" />
|
||||
<ClInclude Include="include\Poco\DirectoryWatcher.h" />
|
||||
<ClInclude Include="include\Poco\DynamicAny.h" />
|
||||
@ -1625,7 +1498,6 @@
|
||||
<ClInclude Include="include\Poco\Dynamic\VarIterator.h" />
|
||||
<ClInclude Include="include\Poco\Environment.h" />
|
||||
<ClInclude Include="include\Poco\Environment_UNIX.h" />
|
||||
<ClInclude Include="include\Poco\Environment_WIN32.h" />
|
||||
<ClInclude Include="include\Poco\Environment_WIN32U.h" />
|
||||
<ClInclude Include="include\Poco\Error.h" />
|
||||
<ClInclude Include="include\Poco\ErrorHandler.h" />
|
||||
@ -1651,7 +1523,6 @@
|
||||
<ClInclude Include="include\Poco\FileStream_POSIX.h" />
|
||||
<ClInclude Include="include\Poco\FileStream_WIN32.h" />
|
||||
<ClInclude Include="include\Poco\File_UNIX.h" />
|
||||
<ClInclude Include="include\Poco\File_WIN32.h" />
|
||||
<ClInclude Include="include\Poco\File_WIN32U.h" />
|
||||
<ClInclude Include="include\Poco\Format.h" />
|
||||
<ClInclude Include="include\Poco\Formatter.h" />
|
||||
@ -1688,7 +1559,6 @@
|
||||
<ClInclude Include="include\Poco\LocalDateTime.h" />
|
||||
<ClInclude Include="include\Poco\LogFile.h" />
|
||||
<ClInclude Include="include\Poco\LogFile_STD.h" />
|
||||
<ClInclude Include="include\Poco\LogFile_WIN32.h" />
|
||||
<ClInclude Include="include\Poco\LogFile_WIN32U.h" />
|
||||
<ClInclude Include="include\Poco\Logger.h" />
|
||||
<ClInclude Include="include\Poco\LoggingFactory.h" />
|
||||
@ -1709,11 +1579,9 @@
|
||||
<ClInclude Include="include\Poco\Mutex_WIN32.h" />
|
||||
<ClInclude Include="include\Poco\NamedEvent.h" />
|
||||
<ClInclude Include="include\Poco\NamedEvent_UNIX.h" />
|
||||
<ClInclude Include="include\Poco\NamedEvent_WIN32.h" />
|
||||
<ClInclude Include="include\Poco\NamedEvent_WIN32U.h" />
|
||||
<ClInclude Include="include\Poco\NamedMutex.h" />
|
||||
<ClInclude Include="include\Poco\NamedMutex_UNIX.h" />
|
||||
<ClInclude Include="include\Poco\NamedMutex_WIN32.h" />
|
||||
<ClInclude Include="include\Poco\NamedMutex_WIN32U.h" />
|
||||
<ClInclude Include="include\Poco\NamedTuple.h" />
|
||||
<ClInclude Include="include\Poco\NestedDiagnosticContext.h" />
|
||||
@ -1735,7 +1603,6 @@
|
||||
<ClInclude Include="include\Poco\OrderedSet.h" />
|
||||
<ClInclude Include="include\Poco\Path.h" />
|
||||
<ClInclude Include="include\Poco\Path_UNIX.h" />
|
||||
<ClInclude Include="include\Poco\Path_WIN32.h" />
|
||||
<ClInclude Include="include\Poco\Path_WIN32U.h" />
|
||||
<ClInclude Include="include\Poco\PatternFormatter.h" />
|
||||
<ClInclude Include="include\Poco\PBKDF2Engine.h" />
|
||||
@ -1756,7 +1623,6 @@
|
||||
<ClInclude Include="include\Poco\PriorityStrategy.h" />
|
||||
<ClInclude Include="include\Poco\Process.h" />
|
||||
<ClInclude Include="include\Poco\Process_UNIX.h" />
|
||||
<ClInclude Include="include\Poco\Process_WIN32.h" />
|
||||
<ClInclude Include="include\Poco\Process_WIN32U.h" />
|
||||
<ClInclude Include="include\Poco\PurgeStrategy.h" />
|
||||
<ClInclude Include="include\Poco\Random.h" />
|
||||
@ -1781,7 +1647,6 @@
|
||||
<ClInclude Include="include\Poco\SharedLibrary.h" />
|
||||
<ClInclude Include="include\Poco\SharedLibrary_HPUX.h" />
|
||||
<ClInclude Include="include\Poco\SharedLibrary_UNIX.h" />
|
||||
<ClInclude Include="include\Poco\SharedLibrary_WIN32.h" />
|
||||
<ClInclude Include="include\Poco\SharedLibrary_WIN32U.h" />
|
||||
<ClInclude Include="include\Poco\SharedMemory.h" />
|
||||
<ClInclude Include="include\Poco\SharedMemory_DUMMY.h" />
|
||||
|
@ -216,9 +216,6 @@
|
||||
<ClCompile Include="src\Environment_UNIX.cpp">
|
||||
<Filter>Core\Source Files</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="src\Environment_WIN32.cpp">
|
||||
<Filter>Core\Source Files</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="src\Environment_WIN32U.cpp">
|
||||
<Filter>Core\Source Files</Filter>
|
||||
</ClCompile>
|
||||
@ -486,9 +483,6 @@
|
||||
<ClCompile Include="src\SharedLibrary_UNIX.cpp">
|
||||
<Filter>SharedLibrary\Source Files</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="src\SharedLibrary_WIN32.cpp">
|
||||
<Filter>SharedLibrary\Source Files</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="src\SharedLibrary_WIN32U.cpp">
|
||||
<Filter>SharedLibrary\Source Files</Filter>
|
||||
</ClCompile>
|
||||
@ -594,9 +588,6 @@
|
||||
<ClCompile Include="src\LogFile_STD.cpp">
|
||||
<Filter>Logging\Source Files</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="src\LogFile_WIN32.cpp">
|
||||
<Filter>Logging\Source Files</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="src\LogFile_WIN32U.cpp">
|
||||
<Filter>Logging\Source Files</Filter>
|
||||
</ClCompile>
|
||||
@ -666,9 +657,6 @@
|
||||
<ClCompile Include="src\DirectoryIterator_UNIX.cpp">
|
||||
<Filter>Filesystem\Source Files</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="src\DirectoryIterator_WIN32.cpp">
|
||||
<Filter>Filesystem\Source Files</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="src\DirectoryIterator_WIN32U.cpp">
|
||||
<Filter>Filesystem\Source Files</Filter>
|
||||
</ClCompile>
|
||||
@ -681,9 +669,6 @@
|
||||
<ClCompile Include="src\File_UNIX.cpp">
|
||||
<Filter>Filesystem\Source Files</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="src\File_WIN32.cpp">
|
||||
<Filter>Filesystem\Source Files</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="src\File_WIN32U.cpp">
|
||||
<Filter>Filesystem\Source Files</Filter>
|
||||
</ClCompile>
|
||||
@ -696,9 +681,6 @@
|
||||
<ClCompile Include="src\Path_UNIX.cpp">
|
||||
<Filter>Filesystem\Source Files</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="src\Path_WIN32.cpp">
|
||||
<Filter>Filesystem\Source Files</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="src\Path_WIN32U.cpp">
|
||||
<Filter>Filesystem\Source Files</Filter>
|
||||
</ClCompile>
|
||||
@ -711,9 +693,6 @@
|
||||
<ClCompile Include="src\NamedEvent_UNIX.cpp">
|
||||
<Filter>Processes\Source Files</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="src\NamedEvent_WIN32.cpp">
|
||||
<Filter>Processes\Source Files</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="src\NamedEvent_WIN32U.cpp">
|
||||
<Filter>Processes\Source Files</Filter>
|
||||
</ClCompile>
|
||||
@ -723,9 +702,6 @@
|
||||
<ClCompile Include="src\NamedMutex_UNIX.cpp">
|
||||
<Filter>Processes\Source Files</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="src\NamedMutex_WIN32.cpp">
|
||||
<Filter>Processes\Source Files</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="src\NamedMutex_WIN32U.cpp">
|
||||
<Filter>Processes\Source Files</Filter>
|
||||
</ClCompile>
|
||||
@ -753,9 +729,6 @@
|
||||
<ClCompile Include="src\Process_UNIX.cpp">
|
||||
<Filter>Processes\Source Files</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="src\Process_WIN32.cpp">
|
||||
<Filter>Processes\Source Files</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="src\Process_WIN32U.cpp">
|
||||
<Filter>Processes\Source Files</Filter>
|
||||
</ClCompile>
|
||||
@ -965,9 +938,6 @@
|
||||
<ClInclude Include="include\Poco\Environment_UNIX.h">
|
||||
<Filter>Core\Header Files</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="include\Poco\Environment_WIN32.h">
|
||||
<Filter>Core\Header Files</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="include\Poco\Environment_WIN32U.h">
|
||||
<Filter>Core\Header Files</Filter>
|
||||
</ClInclude>
|
||||
@ -1349,9 +1319,6 @@
|
||||
<ClInclude Include="include\Poco\SharedLibrary_UNIX.h">
|
||||
<Filter>SharedLibrary\Header Files</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="include\Poco\SharedLibrary_WIN32.h">
|
||||
<Filter>SharedLibrary\Header Files</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="include\Poco\SharedLibrary_WIN32U.h">
|
||||
<Filter>SharedLibrary\Header Files</Filter>
|
||||
</ClInclude>
|
||||
@ -1406,9 +1373,6 @@
|
||||
<ClInclude Include="include\Poco\LogFile_STD.h">
|
||||
<Filter>Logging\Header Files</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="include\Poco\LogFile_WIN32.h">
|
||||
<Filter>Logging\Header Files</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="include\Poco\LogFile_WIN32U.h">
|
||||
<Filter>Logging\Header Files</Filter>
|
||||
</ClInclude>
|
||||
@ -1487,9 +1451,6 @@
|
||||
<ClInclude Include="include\Poco\DirectoryIterator_UNIX.h">
|
||||
<Filter>Filesystem\Header Files</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="include\Poco\DirectoryIterator_WIN32.h">
|
||||
<Filter>Filesystem\Header Files</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="include\Poco\DirectoryIterator_WIN32U.h">
|
||||
<Filter>Filesystem\Header Files</Filter>
|
||||
</ClInclude>
|
||||
@ -1502,9 +1463,6 @@
|
||||
<ClInclude Include="include\Poco\File_UNIX.h">
|
||||
<Filter>Filesystem\Header Files</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="include\Poco\File_WIN32.h">
|
||||
<Filter>Filesystem\Header Files</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="include\Poco\File_WIN32U.h">
|
||||
<Filter>Filesystem\Header Files</Filter>
|
||||
</ClInclude>
|
||||
@ -1517,9 +1475,6 @@
|
||||
<ClInclude Include="include\Poco\Path_UNIX.h">
|
||||
<Filter>Filesystem\Header Files</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="include\Poco\Path_WIN32.h">
|
||||
<Filter>Filesystem\Header Files</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="include\Poco\Path_WIN32U.h">
|
||||
<Filter>Filesystem\Header Files</Filter>
|
||||
</ClInclude>
|
||||
@ -1532,9 +1487,6 @@
|
||||
<ClInclude Include="include\Poco\NamedEvent_UNIX.h">
|
||||
<Filter>Processes\Header Files</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="include\Poco\NamedEvent_WIN32.h">
|
||||
<Filter>Processes\Header Files</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="include\Poco\NamedEvent_WIN32U.h">
|
||||
<Filter>Processes\Header Files</Filter>
|
||||
</ClInclude>
|
||||
@ -1544,9 +1496,6 @@
|
||||
<ClInclude Include="include\Poco\NamedMutex_UNIX.h">
|
||||
<Filter>Processes\Header Files</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="include\Poco\NamedMutex_WIN32.h">
|
||||
<Filter>Processes\Header Files</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="include\Poco\NamedMutex_WIN32U.h">
|
||||
<Filter>Processes\Header Files</Filter>
|
||||
</ClInclude>
|
||||
@ -1574,9 +1523,6 @@
|
||||
<ClInclude Include="include\Poco\Process_UNIX.h">
|
||||
<Filter>Processes\Header Files</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="include\Poco\Process_WIN32.h">
|
||||
<Filter>Processes\Header Files</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="include\Poco\Process_WIN32U.h">
|
||||
<Filter>Processes\Header Files</Filter>
|
||||
</ClInclude>
|
||||
|
@ -630,20 +630,6 @@
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='release_static_mt|Win32'">true</ExcludedFromBuild>
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='release_static_mt|x64'">true</ExcludedFromBuild>
|
||||
</ClCompile>
|
||||
<ClCompile Include="src\DirectoryIterator_WIN32.cpp">
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='debug_shared|Win32'">true</ExcludedFromBuild>
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='debug_shared|x64'">true</ExcludedFromBuild>
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='debug_static_md|Win32'">true</ExcludedFromBuild>
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='debug_static_md|x64'">true</ExcludedFromBuild>
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='debug_static_mt|Win32'">true</ExcludedFromBuild>
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='debug_static_mt|x64'">true</ExcludedFromBuild>
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='release_shared|Win32'">true</ExcludedFromBuild>
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='release_shared|x64'">true</ExcludedFromBuild>
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='release_static_md|Win32'">true</ExcludedFromBuild>
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='release_static_md|x64'">true</ExcludedFromBuild>
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='release_static_mt|Win32'">true</ExcludedFromBuild>
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='release_static_mt|x64'">true</ExcludedFromBuild>
|
||||
</ClCompile>
|
||||
<ClCompile Include="src\DirectoryIterator_WIN32U.cpp">
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='debug_shared|Win32'">true</ExcludedFromBuild>
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='debug_shared|x64'">true</ExcludedFromBuild>
|
||||
@ -674,20 +660,6 @@
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='release_static_mt|Win32'">true</ExcludedFromBuild>
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='release_static_mt|x64'">true</ExcludedFromBuild>
|
||||
</ClCompile>
|
||||
<ClCompile Include="src\Environment_WIN32.cpp">
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='debug_shared|Win32'">true</ExcludedFromBuild>
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='debug_shared|x64'">true</ExcludedFromBuild>
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='debug_static_md|Win32'">true</ExcludedFromBuild>
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='debug_static_md|x64'">true</ExcludedFromBuild>
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='debug_static_mt|Win32'">true</ExcludedFromBuild>
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='debug_static_mt|x64'">true</ExcludedFromBuild>
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='release_shared|Win32'">true</ExcludedFromBuild>
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='release_shared|x64'">true</ExcludedFromBuild>
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='release_static_md|Win32'">true</ExcludedFromBuild>
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='release_static_md|x64'">true</ExcludedFromBuild>
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='release_static_mt|Win32'">true</ExcludedFromBuild>
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='release_static_mt|x64'">true</ExcludedFromBuild>
|
||||
</ClCompile>
|
||||
<ClCompile Include="src\Environment_WIN32U.cpp">
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='debug_shared|Win32'">true</ExcludedFromBuild>
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='debug_shared|x64'">true</ExcludedFromBuild>
|
||||
@ -784,20 +756,6 @@
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='release_static_mt|Win32'">true</ExcludedFromBuild>
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='release_static_mt|x64'">true</ExcludedFromBuild>
|
||||
</ClCompile>
|
||||
<ClCompile Include="src\File_WIN32.cpp">
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='debug_shared|Win32'">true</ExcludedFromBuild>
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='debug_shared|x64'">true</ExcludedFromBuild>
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='debug_static_md|Win32'">true</ExcludedFromBuild>
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='debug_static_md|x64'">true</ExcludedFromBuild>
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='debug_static_mt|Win32'">true</ExcludedFromBuild>
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='debug_static_mt|x64'">true</ExcludedFromBuild>
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='release_shared|Win32'">true</ExcludedFromBuild>
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='release_shared|x64'">true</ExcludedFromBuild>
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='release_static_md|Win32'">true</ExcludedFromBuild>
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='release_static_md|x64'">true</ExcludedFromBuild>
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='release_static_mt|Win32'">true</ExcludedFromBuild>
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='release_static_mt|x64'">true</ExcludedFromBuild>
|
||||
</ClCompile>
|
||||
<ClCompile Include="src\File_WIN32U.cpp">
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='debug_shared|Win32'">true</ExcludedFromBuild>
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='debug_shared|x64'">true</ExcludedFromBuild>
|
||||
@ -917,20 +875,6 @@
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='release_static_mt|Win32'">true</ExcludedFromBuild>
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='release_static_mt|x64'">true</ExcludedFromBuild>
|
||||
</ClCompile>
|
||||
<ClCompile Include="src\LogFile_WIN32.cpp">
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='debug_shared|Win32'">true</ExcludedFromBuild>
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='debug_shared|x64'">true</ExcludedFromBuild>
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='debug_static_md|Win32'">true</ExcludedFromBuild>
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='debug_static_md|x64'">true</ExcludedFromBuild>
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='debug_static_mt|Win32'">true</ExcludedFromBuild>
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='debug_static_mt|x64'">true</ExcludedFromBuild>
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='release_shared|Win32'">true</ExcludedFromBuild>
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='release_shared|x64'">true</ExcludedFromBuild>
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='release_static_md|Win32'">true</ExcludedFromBuild>
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='release_static_md|x64'">true</ExcludedFromBuild>
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='release_static_mt|Win32'">true</ExcludedFromBuild>
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='release_static_mt|x64'">true</ExcludedFromBuild>
|
||||
</ClCompile>
|
||||
<ClCompile Include="src\LogFile_WIN32U.cpp">
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='debug_shared|Win32'">true</ExcludedFromBuild>
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='debug_shared|x64'">true</ExcludedFromBuild>
|
||||
@ -999,20 +943,6 @@
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='release_static_mt|Win32'">true</ExcludedFromBuild>
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='release_static_mt|x64'">true</ExcludedFromBuild>
|
||||
</ClCompile>
|
||||
<ClCompile Include="src\NamedEvent_WIN32.cpp">
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='debug_shared|Win32'">true</ExcludedFromBuild>
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='debug_shared|x64'">true</ExcludedFromBuild>
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='debug_static_md|Win32'">true</ExcludedFromBuild>
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='debug_static_md|x64'">true</ExcludedFromBuild>
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='debug_static_mt|Win32'">true</ExcludedFromBuild>
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='debug_static_mt|x64'">true</ExcludedFromBuild>
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='release_shared|Win32'">true</ExcludedFromBuild>
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='release_shared|x64'">true</ExcludedFromBuild>
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='release_static_md|Win32'">true</ExcludedFromBuild>
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='release_static_md|x64'">true</ExcludedFromBuild>
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='release_static_mt|Win32'">true</ExcludedFromBuild>
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='release_static_mt|x64'">true</ExcludedFromBuild>
|
||||
</ClCompile>
|
||||
<ClCompile Include="src\NamedEvent_WIN32U.cpp">
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='debug_shared|Win32'">true</ExcludedFromBuild>
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='debug_shared|x64'">true</ExcludedFromBuild>
|
||||
@ -1042,20 +972,6 @@
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='release_static_mt|Win32'">true</ExcludedFromBuild>
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='release_static_mt|x64'">true</ExcludedFromBuild>
|
||||
</ClCompile>
|
||||
<ClCompile Include="src\NamedMutex_WIN32.cpp">
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='debug_shared|Win32'">true</ExcludedFromBuild>
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='debug_shared|x64'">true</ExcludedFromBuild>
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='debug_static_md|Win32'">true</ExcludedFromBuild>
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='debug_static_md|x64'">true</ExcludedFromBuild>
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='debug_static_mt|Win32'">true</ExcludedFromBuild>
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='debug_static_mt|x64'">true</ExcludedFromBuild>
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='release_shared|Win32'">true</ExcludedFromBuild>
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='release_shared|x64'">true</ExcludedFromBuild>
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='release_static_md|Win32'">true</ExcludedFromBuild>
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='release_static_md|x64'">true</ExcludedFromBuild>
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='release_static_mt|Win32'">true</ExcludedFromBuild>
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='release_static_mt|x64'">true</ExcludedFromBuild>
|
||||
</ClCompile>
|
||||
<ClCompile Include="src\NamedMutex_WIN32U.cpp">
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='debug_shared|Win32'">true</ExcludedFromBuild>
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='debug_shared|x64'">true</ExcludedFromBuild>
|
||||
@ -1094,20 +1010,6 @@
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='release_static_mt|Win32'">true</ExcludedFromBuild>
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='release_static_mt|x64'">true</ExcludedFromBuild>
|
||||
</ClCompile>
|
||||
<ClCompile Include="src\Path_WIN32.cpp">
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='debug_shared|Win32'">true</ExcludedFromBuild>
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='debug_shared|x64'">true</ExcludedFromBuild>
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='debug_static_md|Win32'">true</ExcludedFromBuild>
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='debug_static_md|x64'">true</ExcludedFromBuild>
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='debug_static_mt|Win32'">true</ExcludedFromBuild>
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='debug_static_mt|x64'">true</ExcludedFromBuild>
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='release_shared|Win32'">true</ExcludedFromBuild>
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='release_shared|x64'">true</ExcludedFromBuild>
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='release_static_md|Win32'">true</ExcludedFromBuild>
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='release_static_md|x64'">true</ExcludedFromBuild>
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='release_static_mt|Win32'">true</ExcludedFromBuild>
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='release_static_mt|x64'">true</ExcludedFromBuild>
|
||||
</ClCompile>
|
||||
<ClCompile Include="src\Path_WIN32U.cpp">
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='debug_shared|Win32'">true</ExcludedFromBuild>
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='debug_shared|x64'">true</ExcludedFromBuild>
|
||||
@ -1205,20 +1107,6 @@
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='release_static_mt|Win32'">true</ExcludedFromBuild>
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='release_static_mt|x64'">true</ExcludedFromBuild>
|
||||
</ClCompile>
|
||||
<ClCompile Include="src\Process_WIN32.cpp">
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='debug_shared|Win32'">true</ExcludedFromBuild>
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='debug_shared|x64'">true</ExcludedFromBuild>
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='debug_static_md|Win32'">true</ExcludedFromBuild>
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='debug_static_md|x64'">true</ExcludedFromBuild>
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='debug_static_mt|Win32'">true</ExcludedFromBuild>
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='debug_static_mt|x64'">true</ExcludedFromBuild>
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='release_shared|Win32'">true</ExcludedFromBuild>
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='release_shared|x64'">true</ExcludedFromBuild>
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='release_static_md|Win32'">true</ExcludedFromBuild>
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='release_static_md|x64'">true</ExcludedFromBuild>
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='release_static_mt|Win32'">true</ExcludedFromBuild>
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='release_static_mt|x64'">true</ExcludedFromBuild>
|
||||
</ClCompile>
|
||||
<ClCompile Include="src\Process_WIN32U.cpp">
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='debug_shared|Win32'">true</ExcludedFromBuild>
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='debug_shared|x64'">true</ExcludedFromBuild>
|
||||
@ -1329,20 +1217,6 @@
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='release_static_mt|Win32'">true</ExcludedFromBuild>
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='release_static_mt|x64'">true</ExcludedFromBuild>
|
||||
</ClCompile>
|
||||
<ClCompile Include="src\SharedLibrary_WIN32.cpp">
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='debug_shared|Win32'">true</ExcludedFromBuild>
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='debug_shared|x64'">true</ExcludedFromBuild>
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='debug_static_md|Win32'">true</ExcludedFromBuild>
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='debug_static_md|x64'">true</ExcludedFromBuild>
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='debug_static_mt|Win32'">true</ExcludedFromBuild>
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='debug_static_mt|x64'">true</ExcludedFromBuild>
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='release_shared|Win32'">true</ExcludedFromBuild>
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='release_shared|x64'">true</ExcludedFromBuild>
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='release_static_md|Win32'">true</ExcludedFromBuild>
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='release_static_md|x64'">true</ExcludedFromBuild>
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='release_static_mt|Win32'">true</ExcludedFromBuild>
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='release_static_mt|x64'">true</ExcludedFromBuild>
|
||||
</ClCompile>
|
||||
<ClCompile Include="src\SharedLibrary_WIN32U.cpp">
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='debug_shared|Win32'">true</ExcludedFromBuild>
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='debug_shared|x64'">true</ExcludedFromBuild>
|
||||
@ -1612,7 +1486,6 @@
|
||||
<ClInclude Include="include\Poco\DirectoryIterator.h" />
|
||||
<ClInclude Include="include\Poco\DirectoryIteratorStrategy.h" />
|
||||
<ClInclude Include="include\Poco\DirectoryIterator_UNIX.h" />
|
||||
<ClInclude Include="include\Poco\DirectoryIterator_WIN32.h" />
|
||||
<ClInclude Include="include\Poco\DirectoryIterator_WIN32U.h" />
|
||||
<ClInclude Include="include\Poco\DirectoryWatcher.h" />
|
||||
<ClInclude Include="include\Poco\DynamicAny.h" />
|
||||
@ -1625,7 +1498,6 @@
|
||||
<ClInclude Include="include\Poco\Dynamic\VarIterator.h" />
|
||||
<ClInclude Include="include\Poco\Environment.h" />
|
||||
<ClInclude Include="include\Poco\Environment_UNIX.h" />
|
||||
<ClInclude Include="include\Poco\Environment_WIN32.h" />
|
||||
<ClInclude Include="include\Poco\Environment_WIN32U.h" />
|
||||
<ClInclude Include="include\Poco\Error.h" />
|
||||
<ClInclude Include="include\Poco\ErrorHandler.h" />
|
||||
@ -1651,7 +1523,6 @@
|
||||
<ClInclude Include="include\Poco\FileStream_POSIX.h" />
|
||||
<ClInclude Include="include\Poco\FileStream_WIN32.h" />
|
||||
<ClInclude Include="include\Poco\File_UNIX.h" />
|
||||
<ClInclude Include="include\Poco\File_WIN32.h" />
|
||||
<ClInclude Include="include\Poco\File_WIN32U.h" />
|
||||
<ClInclude Include="include\Poco\Format.h" />
|
||||
<ClInclude Include="include\Poco\Formatter.h" />
|
||||
@ -1688,7 +1559,6 @@
|
||||
<ClInclude Include="include\Poco\LocalDateTime.h" />
|
||||
<ClInclude Include="include\Poco\LogFile.h" />
|
||||
<ClInclude Include="include\Poco\LogFile_STD.h" />
|
||||
<ClInclude Include="include\Poco\LogFile_WIN32.h" />
|
||||
<ClInclude Include="include\Poco\LogFile_WIN32U.h" />
|
||||
<ClInclude Include="include\Poco\Logger.h" />
|
||||
<ClInclude Include="include\Poco\LoggingFactory.h" />
|
||||
@ -1709,11 +1579,9 @@
|
||||
<ClInclude Include="include\Poco\Mutex_WIN32.h" />
|
||||
<ClInclude Include="include\Poco\NamedEvent.h" />
|
||||
<ClInclude Include="include\Poco\NamedEvent_UNIX.h" />
|
||||
<ClInclude Include="include\Poco\NamedEvent_WIN32.h" />
|
||||
<ClInclude Include="include\Poco\NamedEvent_WIN32U.h" />
|
||||
<ClInclude Include="include\Poco\NamedMutex.h" />
|
||||
<ClInclude Include="include\Poco\NamedMutex_UNIX.h" />
|
||||
<ClInclude Include="include\Poco\NamedMutex_WIN32.h" />
|
||||
<ClInclude Include="include\Poco\NamedMutex_WIN32U.h" />
|
||||
<ClInclude Include="include\Poco\NamedTuple.h" />
|
||||
<ClInclude Include="include\Poco\NestedDiagnosticContext.h" />
|
||||
@ -1735,7 +1603,6 @@
|
||||
<ClInclude Include="include\Poco\OrderedSet.h" />
|
||||
<ClInclude Include="include\Poco\Path.h" />
|
||||
<ClInclude Include="include\Poco\Path_UNIX.h" />
|
||||
<ClInclude Include="include\Poco\Path_WIN32.h" />
|
||||
<ClInclude Include="include\Poco\Path_WIN32U.h" />
|
||||
<ClInclude Include="include\Poco\PatternFormatter.h" />
|
||||
<ClInclude Include="include\Poco\PBKDF2Engine.h" />
|
||||
@ -1756,7 +1623,6 @@
|
||||
<ClInclude Include="include\Poco\PriorityStrategy.h" />
|
||||
<ClInclude Include="include\Poco\Process.h" />
|
||||
<ClInclude Include="include\Poco\Process_UNIX.h" />
|
||||
<ClInclude Include="include\Poco\Process_WIN32.h" />
|
||||
<ClInclude Include="include\Poco\Process_WIN32U.h" />
|
||||
<ClInclude Include="include\Poco\PurgeStrategy.h" />
|
||||
<ClInclude Include="include\Poco\Random.h" />
|
||||
@ -1781,7 +1647,6 @@
|
||||
<ClInclude Include="include\Poco\SharedLibrary.h" />
|
||||
<ClInclude Include="include\Poco\SharedLibrary_HPUX.h" />
|
||||
<ClInclude Include="include\Poco\SharedLibrary_UNIX.h" />
|
||||
<ClInclude Include="include\Poco\SharedLibrary_WIN32.h" />
|
||||
<ClInclude Include="include\Poco\SharedLibrary_WIN32U.h" />
|
||||
<ClInclude Include="include\Poco\SharedMemory.h" />
|
||||
<ClInclude Include="include\Poco\SharedMemory_DUMMY.h" />
|
||||
|
@ -216,9 +216,6 @@
|
||||
<ClCompile Include="src\Environment_UNIX.cpp">
|
||||
<Filter>Core\Source Files</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="src\Environment_WIN32.cpp">
|
||||
<Filter>Core\Source Files</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="src\Environment_WIN32U.cpp">
|
||||
<Filter>Core\Source Files</Filter>
|
||||
</ClCompile>
|
||||
@ -486,9 +483,6 @@
|
||||
<ClCompile Include="src\SharedLibrary_UNIX.cpp">
|
||||
<Filter>SharedLibrary\Source Files</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="src\SharedLibrary_WIN32.cpp">
|
||||
<Filter>SharedLibrary\Source Files</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="src\SharedLibrary_WIN32U.cpp">
|
||||
<Filter>SharedLibrary\Source Files</Filter>
|
||||
</ClCompile>
|
||||
@ -594,9 +588,6 @@
|
||||
<ClCompile Include="src\LogFile_STD.cpp">
|
||||
<Filter>Logging\Source Files</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="src\LogFile_WIN32.cpp">
|
||||
<Filter>Logging\Source Files</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="src\LogFile_WIN32U.cpp">
|
||||
<Filter>Logging\Source Files</Filter>
|
||||
</ClCompile>
|
||||
@ -666,9 +657,6 @@
|
||||
<ClCompile Include="src\DirectoryIterator_UNIX.cpp">
|
||||
<Filter>Filesystem\Source Files</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="src\DirectoryIterator_WIN32.cpp">
|
||||
<Filter>Filesystem\Source Files</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="src\DirectoryIterator_WIN32U.cpp">
|
||||
<Filter>Filesystem\Source Files</Filter>
|
||||
</ClCompile>
|
||||
@ -681,9 +669,6 @@
|
||||
<ClCompile Include="src\File_UNIX.cpp">
|
||||
<Filter>Filesystem\Source Files</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="src\File_WIN32.cpp">
|
||||
<Filter>Filesystem\Source Files</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="src\File_WIN32U.cpp">
|
||||
<Filter>Filesystem\Source Files</Filter>
|
||||
</ClCompile>
|
||||
@ -696,9 +681,6 @@
|
||||
<ClCompile Include="src\Path_UNIX.cpp">
|
||||
<Filter>Filesystem\Source Files</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="src\Path_WIN32.cpp">
|
||||
<Filter>Filesystem\Source Files</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="src\Path_WIN32U.cpp">
|
||||
<Filter>Filesystem\Source Files</Filter>
|
||||
</ClCompile>
|
||||
@ -711,9 +693,6 @@
|
||||
<ClCompile Include="src\NamedEvent_UNIX.cpp">
|
||||
<Filter>Processes\Source Files</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="src\NamedEvent_WIN32.cpp">
|
||||
<Filter>Processes\Source Files</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="src\NamedEvent_WIN32U.cpp">
|
||||
<Filter>Processes\Source Files</Filter>
|
||||
</ClCompile>
|
||||
@ -723,9 +702,6 @@
|
||||
<ClCompile Include="src\NamedMutex_UNIX.cpp">
|
||||
<Filter>Processes\Source Files</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="src\NamedMutex_WIN32.cpp">
|
||||
<Filter>Processes\Source Files</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="src\NamedMutex_WIN32U.cpp">
|
||||
<Filter>Processes\Source Files</Filter>
|
||||
</ClCompile>
|
||||
@ -753,9 +729,6 @@
|
||||
<ClCompile Include="src\Process_UNIX.cpp">
|
||||
<Filter>Processes\Source Files</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="src\Process_WIN32.cpp">
|
||||
<Filter>Processes\Source Files</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="src\Process_WIN32U.cpp">
|
||||
<Filter>Processes\Source Files</Filter>
|
||||
</ClCompile>
|
||||
@ -965,9 +938,6 @@
|
||||
<ClInclude Include="include\Poco\Environment_UNIX.h">
|
||||
<Filter>Core\Header Files</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="include\Poco\Environment_WIN32.h">
|
||||
<Filter>Core\Header Files</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="include\Poco\Environment_WIN32U.h">
|
||||
<Filter>Core\Header Files</Filter>
|
||||
</ClInclude>
|
||||
@ -1349,9 +1319,6 @@
|
||||
<ClInclude Include="include\Poco\SharedLibrary_UNIX.h">
|
||||
<Filter>SharedLibrary\Header Files</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="include\Poco\SharedLibrary_WIN32.h">
|
||||
<Filter>SharedLibrary\Header Files</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="include\Poco\SharedLibrary_WIN32U.h">
|
||||
<Filter>SharedLibrary\Header Files</Filter>
|
||||
</ClInclude>
|
||||
@ -1406,9 +1373,6 @@
|
||||
<ClInclude Include="include\Poco\LogFile_STD.h">
|
||||
<Filter>Logging\Header Files</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="include\Poco\LogFile_WIN32.h">
|
||||
<Filter>Logging\Header Files</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="include\Poco\LogFile_WIN32U.h">
|
||||
<Filter>Logging\Header Files</Filter>
|
||||
</ClInclude>
|
||||
@ -1487,9 +1451,6 @@
|
||||
<ClInclude Include="include\Poco\DirectoryIterator_UNIX.h">
|
||||
<Filter>Filesystem\Header Files</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="include\Poco\DirectoryIterator_WIN32.h">
|
||||
<Filter>Filesystem\Header Files</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="include\Poco\DirectoryIterator_WIN32U.h">
|
||||
<Filter>Filesystem\Header Files</Filter>
|
||||
</ClInclude>
|
||||
@ -1502,9 +1463,6 @@
|
||||
<ClInclude Include="include\Poco\File_UNIX.h">
|
||||
<Filter>Filesystem\Header Files</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="include\Poco\File_WIN32.h">
|
||||
<Filter>Filesystem\Header Files</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="include\Poco\File_WIN32U.h">
|
||||
<Filter>Filesystem\Header Files</Filter>
|
||||
</ClInclude>
|
||||
@ -1517,9 +1475,6 @@
|
||||
<ClInclude Include="include\Poco\Path_UNIX.h">
|
||||
<Filter>Filesystem\Header Files</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="include\Poco\Path_WIN32.h">
|
||||
<Filter>Filesystem\Header Files</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="include\Poco\Path_WIN32U.h">
|
||||
<Filter>Filesystem\Header Files</Filter>
|
||||
</ClInclude>
|
||||
@ -1532,9 +1487,6 @@
|
||||
<ClInclude Include="include\Poco\NamedEvent_UNIX.h">
|
||||
<Filter>Processes\Header Files</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="include\Poco\NamedEvent_WIN32.h">
|
||||
<Filter>Processes\Header Files</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="include\Poco\NamedEvent_WIN32U.h">
|
||||
<Filter>Processes\Header Files</Filter>
|
||||
</ClInclude>
|
||||
@ -1544,9 +1496,6 @@
|
||||
<ClInclude Include="include\Poco\NamedMutex_UNIX.h">
|
||||
<Filter>Processes\Header Files</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="include\Poco\NamedMutex_WIN32.h">
|
||||
<Filter>Processes\Header Files</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="include\Poco\NamedMutex_WIN32U.h">
|
||||
<Filter>Processes\Header Files</Filter>
|
||||
</ClInclude>
|
||||
@ -1574,9 +1523,6 @@
|
||||
<ClInclude Include="include\Poco\Process_UNIX.h">
|
||||
<Filter>Processes\Header Files</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="include\Poco\Process_WIN32.h">
|
||||
<Filter>Processes\Header Files</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="include\Poco\Process_WIN32U.h">
|
||||
<Filter>Processes\Header Files</Filter>
|
||||
</ClInclude>
|
||||
|
@ -1,8 +1,8 @@
|
||||
if(@POCO_UNBUNDLED@)
|
||||
include(CMakeFindDependencyMacro)
|
||||
list(APPEND CMAKE_MODULE_PATH "${CMAKE_CURRENT_LIST_DIR}")
|
||||
find_dependency(ZLIB REQUIRED)
|
||||
find_dependency(PCRE REQUIRED)
|
||||
include(CMakeFindDependencyMacro)
|
||||
list(APPEND CMAKE_MODULE_PATH "${CMAKE_CURRENT_LIST_DIR}")
|
||||
find_dependency(ZLIB REQUIRED)
|
||||
find_dependency(PCRE REQUIRED)
|
||||
endif()
|
||||
|
||||
include("${CMAKE_CURRENT_LIST_DIR}/PocoFoundationTargets.cmake")
|
||||
|
@ -45,8 +45,8 @@ template <typename PlaceholderT, unsigned int SizeV = POCO_SMALL_OBJECT_SIZE>
|
||||
union Placeholder
|
||||
/// ValueHolder union (used by Poco::Any and Poco::Dynamic::Var for small
|
||||
/// object optimization, when enabled).
|
||||
///
|
||||
/// If Holder<Type> fits into POCO_SMALL_OBJECT_SIZE bytes of storage,
|
||||
///
|
||||
/// If Holder<Type> fits into POCO_SMALL_OBJECT_SIZE bytes of storage,
|
||||
/// it will be placement-new-allocated into the local buffer
|
||||
/// (i.e. there will be no heap-allocation). The local buffer size is one byte
|
||||
/// larger - [POCO_SMALL_OBJECT_SIZE + 1], additional byte value indicating
|
||||
@ -91,7 +91,7 @@ public:
|
||||
private:
|
||||
#endif
|
||||
typedef typename std::aligned_storage<SizeV + 1>::type AlignerType;
|
||||
|
||||
|
||||
PlaceholderT* pHolder;
|
||||
mutable char holder[SizeV + 1];
|
||||
AlignerType aligner;
|
||||
@ -110,8 +110,8 @@ template <typename PlaceholderT>
|
||||
union Placeholder
|
||||
/// ValueHolder union (used by Poco::Any and Poco::Dynamic::Var for small
|
||||
/// object optimization, when enabled).
|
||||
///
|
||||
/// If Holder<Type> fits into POCO_SMALL_OBJECT_SIZE bytes of storage,
|
||||
///
|
||||
/// If Holder<Type> fits into POCO_SMALL_OBJECT_SIZE bytes of storage,
|
||||
/// it will be placement-new-allocated into the local buffer
|
||||
/// (i.e. there will be no heap-allocation). The local buffer size is one byte
|
||||
/// larger - [POCO_SMALL_OBJECT_SIZE + 1], additional byte value indicating
|
||||
@ -131,7 +131,7 @@ public:
|
||||
#if !defined(POCO_MSVC_VERSION) || (defined(POCO_MSVC_VERSION) && (POCO_MSVC_VERSION > 80))
|
||||
private:
|
||||
#endif
|
||||
|
||||
|
||||
PlaceholderT* pHolder;
|
||||
|
||||
friend class Any;
|
||||
@ -167,8 +167,8 @@ public:
|
||||
Any(const ValueType & value)
|
||||
/// Creates an any which stores the init parameter inside.
|
||||
///
|
||||
/// Example:
|
||||
/// Any a(13);
|
||||
/// Example:
|
||||
/// Any a(13);
|
||||
/// Any a(string("12345"));
|
||||
{
|
||||
construct(value);
|
||||
@ -196,7 +196,7 @@ public:
|
||||
|
||||
Any& swap(Any& other)
|
||||
/// Swaps the content of the two Anys.
|
||||
///
|
||||
///
|
||||
/// When small object optimization is enabled, swap only
|
||||
/// has no-throw guarantee when both (*this and other)
|
||||
/// objects are allocated on the heap.
|
||||
@ -230,14 +230,14 @@ public:
|
||||
Any& operator = (const ValueType& rhs)
|
||||
/// Assignment operator for all types != Any.
|
||||
///
|
||||
/// Example:
|
||||
/// Any a = 13;
|
||||
/// Example:
|
||||
/// Any a = 13;
|
||||
/// Any a = string("12345");
|
||||
{
|
||||
construct(rhs);
|
||||
return *this;
|
||||
}
|
||||
|
||||
|
||||
Any& operator = (const Any& rhs)
|
||||
/// Assignment operator for Any.
|
||||
{
|
||||
@ -248,14 +248,14 @@ public:
|
||||
|
||||
return *this;
|
||||
}
|
||||
|
||||
|
||||
bool empty() const
|
||||
/// Returns true if the Any is empty.
|
||||
{
|
||||
char buf[POCO_SMALL_OBJECT_SIZE] = { 0 };
|
||||
return 0 == std::memcmp(_valueHolder.holder, buf, POCO_SMALL_OBJECT_SIZE);
|
||||
}
|
||||
|
||||
|
||||
const std::type_info & type() const
|
||||
/// Returns the type information of the stored content.
|
||||
/// If the Any is empty typeid(void) is returned.
|
||||
@ -335,7 +335,7 @@ private:
|
||||
else
|
||||
_valueHolder.erase();
|
||||
}
|
||||
|
||||
|
||||
void destruct()
|
||||
{
|
||||
content()->~ValueHolder();
|
||||
@ -357,8 +357,8 @@ private:
|
||||
_pHolder(new Holder<ValueType>(value))
|
||||
/// Creates an any which stores the init parameter inside.
|
||||
///
|
||||
/// Example:
|
||||
/// Any a(13);
|
||||
/// Example:
|
||||
/// Any a(13);
|
||||
/// Any a(string("12345"));
|
||||
{
|
||||
}
|
||||
@ -385,8 +385,8 @@ private:
|
||||
Any& operator = (const ValueType& rhs)
|
||||
/// Assignment operator for all types != Any.
|
||||
///
|
||||
/// Example:
|
||||
/// Any a = 13;
|
||||
/// Example:
|
||||
/// Any a = 13;
|
||||
/// Any a = string("12345");
|
||||
{
|
||||
Any(rhs).swap(*this);
|
||||
@ -428,7 +428,7 @@ private:
|
||||
template <typename ValueType>
|
||||
class Holder: public ValueHolder
|
||||
{
|
||||
public:
|
||||
public:
|
||||
Holder(const ValueType& value):
|
||||
_held(value)
|
||||
{
|
||||
@ -480,9 +480,9 @@ private:
|
||||
template <typename ValueType>
|
||||
ValueType* AnyCast(Any* operand)
|
||||
/// AnyCast operator used to extract the ValueType from an Any*. Will return a pointer
|
||||
/// to the stored value.
|
||||
/// to the stored value.
|
||||
///
|
||||
/// Example Usage:
|
||||
/// Example Usage:
|
||||
/// MyType* pTmp = AnyCast<MyType*>(pAny).
|
||||
/// Will return NULL if the cast fails, i.e. types don't match.
|
||||
{
|
||||
@ -495,7 +495,7 @@ ValueType* AnyCast(Any* operand)
|
||||
template <typename ValueType>
|
||||
const ValueType* AnyCast(const Any* operand)
|
||||
/// AnyCast operator used to extract a const ValueType pointer from an const Any*. Will return a const pointer
|
||||
/// to the stored value.
|
||||
/// to the stored value.
|
||||
///
|
||||
/// Example Usage:
|
||||
/// const MyType* pTmp = AnyCast<MyType*>(pAny).
|
||||
@ -509,7 +509,7 @@ template <typename ValueType>
|
||||
ValueType AnyCast(Any& operand)
|
||||
/// AnyCast operator used to extract a copy of the ValueType from an Any&.
|
||||
///
|
||||
/// Example Usage:
|
||||
/// Example Usage:
|
||||
/// MyType tmp = AnyCast<MyType>(anAny).
|
||||
/// Will throw a BadCastException if the cast fails.
|
||||
/// Do not use an AnyCast in combination with references, i.e. MyType& tmp = ... or const MyType& tmp = ...
|
||||
@ -540,7 +540,7 @@ template <typename ValueType>
|
||||
ValueType AnyCast(const Any& operand)
|
||||
/// AnyCast operator used to extract a copy of the ValueType from an const Any&.
|
||||
///
|
||||
/// Example Usage:
|
||||
/// Example Usage:
|
||||
/// MyType tmp = AnyCast<MyType>(anAny).
|
||||
/// Will throw a BadCastException if the cast fails.
|
||||
/// Do not use an AnyCast in combination with references, i.e. MyType& tmp = ... or const MyType& = ...
|
||||
@ -555,20 +555,24 @@ ValueType AnyCast(const Any& operand)
|
||||
|
||||
template <typename ValueType>
|
||||
const ValueType& RefAnyCast(const Any & operand)
|
||||
/// AnyCast operator used to return a const reference to the internal data.
|
||||
/// AnyCast operator used to return a const reference to the internal data.
|
||||
///
|
||||
/// Example Usage:
|
||||
/// Example Usage:
|
||||
/// const MyType& tmp = RefAnyCast<MyType>(anAny);
|
||||
{
|
||||
ValueType* result = AnyCast<ValueType>(const_cast<Any*>(&operand));
|
||||
std::string s = "RefAnyCast: Failed to convert between Any types ";
|
||||
if (operand._pHolder)
|
||||
if (!result)
|
||||
{
|
||||
s.append(1, '(');
|
||||
s.append(operand._pHolder->type().name());
|
||||
s.append(" => ");
|
||||
s.append(typeid(ValueType).name());
|
||||
s.append(1, ')');
|
||||
std::string s = "RefAnyCast: Failed to convert between Any types ";
|
||||
if (operand._pHolder)
|
||||
{
|
||||
s.append(1, '(');
|
||||
s.append(operand._pHolder->type().name());
|
||||
s.append(" => ");
|
||||
s.append(typeid(ValueType).name());
|
||||
s.append(1, ')');
|
||||
}
|
||||
throw BadCastException(s);
|
||||
}
|
||||
return *result;
|
||||
}
|
||||
@ -578,7 +582,7 @@ template <typename ValueType>
|
||||
ValueType& RefAnyCast(Any& operand)
|
||||
/// AnyCast operator used to return a reference to the internal data.
|
||||
///
|
||||
/// Example Usage:
|
||||
/// Example Usage:
|
||||
/// MyType& tmp = RefAnyCast<MyType>(anAny);
|
||||
{
|
||||
ValueType* result = AnyCast<ValueType>(&operand);
|
||||
|
@ -50,14 +50,14 @@ public:
|
||||
void setChannel(Channel::Ptr pChannel);
|
||||
/// Connects the AsyncChannel to the given target channel.
|
||||
/// All messages will be forwarded to this channel.
|
||||
|
||||
|
||||
Channel::Ptr getChannel() const;
|
||||
/// Returns the target channel.
|
||||
|
||||
void open();
|
||||
/// Opens the channel and creates the
|
||||
/// Opens the channel and creates the
|
||||
/// background logging thread.
|
||||
|
||||
|
||||
void close();
|
||||
/// Closes the channel and stops the background
|
||||
/// logging thread.
|
||||
@ -69,7 +69,7 @@ public:
|
||||
void setProperty(const std::string& name, const std::string& value);
|
||||
/// Sets or changes a configuration property.
|
||||
///
|
||||
/// The "channel" property allows setting the target
|
||||
/// The "channel" property allows setting the target
|
||||
/// channel via the LoggingRegistry.
|
||||
/// The "channel" property is set-only.
|
||||
///
|
||||
@ -82,18 +82,34 @@ public:
|
||||
/// * highest
|
||||
///
|
||||
/// The "priority" property is set-only.
|
||||
///
|
||||
/// The "queueSize" property allows to limit the number
|
||||
/// of messages in the queue. If the queue is full and
|
||||
/// new messages are logged, these are dropped until the
|
||||
/// queue has free capacity again. The number of dropped
|
||||
/// messages is recorded, and a log message indicating the
|
||||
/// number of dropped messages will be generated when the
|
||||
/// queue has free capacity again.
|
||||
/// In addition to an unsigned integer specifying the size,
|
||||
/// this property can have the values "none" or "unlimited",
|
||||
/// which disable the queue size limit. A size of 0 also
|
||||
/// removes the limit.
|
||||
///
|
||||
/// The "queueSize" property is set-only.
|
||||
|
||||
protected:
|
||||
~AsyncChannel();
|
||||
void run();
|
||||
void setPriority(const std::string& value);
|
||||
|
||||
|
||||
private:
|
||||
Channel::Ptr _pChannel;
|
||||
Channel::Ptr _pChannel;
|
||||
Thread _thread;
|
||||
FastMutex _threadMutex;
|
||||
FastMutex _channelMutex;
|
||||
NotificationQueue _queue;
|
||||
std::size_t _queueSize = 0;
|
||||
std::size_t _dropCount = 0;
|
||||
};
|
||||
|
||||
|
||||
|
@ -21,6 +21,7 @@
|
||||
#include "Poco/Foundation.h"
|
||||
#include "Poco/Exception.h"
|
||||
#include <algorithm>
|
||||
#include <cstddef>
|
||||
|
||||
|
||||
namespace Poco {
|
||||
@ -306,6 +307,11 @@ public:
|
||||
return _ptr == ptr;
|
||||
}
|
||||
|
||||
bool operator == (std::nullptr_t ptr) const
|
||||
{
|
||||
return _ptr == ptr;
|
||||
}
|
||||
|
||||
bool operator != (const AutoPtr& ptr) const
|
||||
{
|
||||
return _ptr != ptr._ptr;
|
||||
@ -321,6 +327,11 @@ public:
|
||||
return _ptr != ptr;
|
||||
}
|
||||
|
||||
bool operator != (std::nullptr_t ptr) const
|
||||
{
|
||||
return _ptr != ptr;
|
||||
}
|
||||
|
||||
bool operator < (const AutoPtr& ptr) const
|
||||
{
|
||||
return _ptr < ptr._ptr;
|
||||
|
@ -1,73 +0,0 @@
|
||||
//
|
||||
// DirectoryIterator_WIN32.h
|
||||
//
|
||||
// Library: Foundation
|
||||
// Package: Filesystem
|
||||
// Module: DirectoryIterator
|
||||
//
|
||||
// Definition of the DirectoryIteratorImpl class for WIN32.
|
||||
//
|
||||
// Copyright (c) 2004-2006, Applied Informatics Software Engineering GmbH.
|
||||
// and Contributors.
|
||||
//
|
||||
// SPDX-License-Identifier: BSL-1.0
|
||||
//
|
||||
|
||||
|
||||
#ifndef Foundation_DirectoryIterator_WIN32_INCLUDED
|
||||
#define Foundation_DirectoryIterator_WIN32_INCLUDED
|
||||
|
||||
|
||||
#include "Poco/Foundation.h"
|
||||
#include "Poco/UnWindows.h"
|
||||
|
||||
|
||||
namespace Poco {
|
||||
|
||||
|
||||
class Foundation_API DirectoryIteratorImpl
|
||||
{
|
||||
public:
|
||||
DirectoryIteratorImpl(const std::string& path);
|
||||
~DirectoryIteratorImpl();
|
||||
|
||||
void duplicate();
|
||||
void release();
|
||||
|
||||
const std::string& get() const;
|
||||
const std::string& next();
|
||||
|
||||
private:
|
||||
HANDLE _fh;
|
||||
WIN32_FIND_DATA _fd;
|
||||
std::string _current;
|
||||
int _rc;
|
||||
};
|
||||
|
||||
|
||||
//
|
||||
// inlines
|
||||
//
|
||||
const std::string& DirectoryIteratorImpl::get() const
|
||||
{
|
||||
return _current;
|
||||
}
|
||||
|
||||
|
||||
inline void DirectoryIteratorImpl::duplicate()
|
||||
{
|
||||
++_rc;
|
||||
}
|
||||
|
||||
|
||||
inline void DirectoryIteratorImpl::release()
|
||||
{
|
||||
if (--_rc == 0)
|
||||
delete this;
|
||||
}
|
||||
|
||||
|
||||
} // namespace Poco
|
||||
|
||||
|
||||
#endif // Foundation_DirectoryIterator_WIN32_INCLUDED
|
@ -1,48 +0,0 @@
|
||||
//
|
||||
// Environment_WIN32.h
|
||||
//
|
||||
// Library: Foundation
|
||||
// Package: Core
|
||||
// Module: Environment
|
||||
//
|
||||
// Definition of the EnvironmentImpl class for WIN32.
|
||||
//
|
||||
// Copyright (c) 2004-2006, Applied Informatics Software Engineering GmbH.
|
||||
// and Contributors.
|
||||
//
|
||||
// SPDX-License-Identifier: BSL-1.0
|
||||
//
|
||||
|
||||
|
||||
#ifndef Foundation_Environment_WIN32_INCLUDED
|
||||
#define Foundation_Environment_WIN32_INCLUDED
|
||||
|
||||
|
||||
#include "Poco/Foundation.h"
|
||||
|
||||
|
||||
namespace Poco {
|
||||
|
||||
|
||||
class Foundation_API EnvironmentImpl
|
||||
{
|
||||
public:
|
||||
typedef UInt8 NodeId[6]; /// Ethernet address.
|
||||
|
||||
static std::string getImpl(const std::string& name);
|
||||
static bool hasImpl(const std::string& name);
|
||||
static void setImpl(const std::string& name, const std::string& value);
|
||||
static std::string osNameImpl();
|
||||
static std::string osDisplayNameImpl();
|
||||
static std::string osVersionImpl();
|
||||
static std::string osArchitectureImpl();
|
||||
static std::string nodeNameImpl();
|
||||
static void nodeIdImpl(NodeId& id);
|
||||
static unsigned processorCountImpl();
|
||||
};
|
||||
|
||||
|
||||
} // namespace Poco
|
||||
|
||||
|
||||
#endif // Foundation_Environment_WIN32_INCLUDED
|
@ -1,92 +0,0 @@
|
||||
//
|
||||
// File_WIN32.h
|
||||
//
|
||||
// Library: Foundation
|
||||
// Package: Filesystem
|
||||
// Module: File
|
||||
//
|
||||
// Definition of the FileImpl class for WIN32.
|
||||
//
|
||||
// Copyright (c) 2004-2006, Applied Informatics Software Engineering GmbH.
|
||||
// and Contributors.
|
||||
//
|
||||
// SPDX-License-Identifier: BSL-1.0
|
||||
//
|
||||
|
||||
|
||||
#ifndef Foundation_File_WIN32_INCLUDED
|
||||
#define Foundation_File_WIN32_INCLUDED
|
||||
|
||||
|
||||
#include "Poco/Foundation.h"
|
||||
#include "Poco/Timestamp.h"
|
||||
|
||||
|
||||
namespace Poco {
|
||||
|
||||
|
||||
class Foundation_API FileImpl
|
||||
{
|
||||
protected:
|
||||
enum Options
|
||||
{
|
||||
OPT_FAIL_ON_OVERWRITE_IMPL = 0x01
|
||||
};
|
||||
|
||||
typedef UInt64 FileSizeImpl;
|
||||
|
||||
FileImpl();
|
||||
FileImpl(const std::string& path);
|
||||
virtual ~FileImpl();
|
||||
void swapImpl(FileImpl& file);
|
||||
void setPathImpl(const std::string& path);
|
||||
const std::string& getPathImpl() const;
|
||||
bool existsImpl() const;
|
||||
bool canReadImpl() const;
|
||||
bool canWriteImpl() const;
|
||||
bool canExecuteImpl() const;
|
||||
bool isFileImpl() const;
|
||||
bool isDirectoryImpl() const;
|
||||
bool isLinkImpl() const;
|
||||
bool isDeviceImpl() const;
|
||||
bool isHiddenImpl() const;
|
||||
Timestamp createdImpl() const;
|
||||
Timestamp getLastModifiedImpl() const;
|
||||
void setLastModifiedImpl(const Timestamp& ts);
|
||||
FileSizeImpl getSizeImpl() const;
|
||||
void setSizeImpl(FileSizeImpl size);
|
||||
void setWriteableImpl(bool flag = true);
|
||||
void setExecutableImpl(bool flag = true);
|
||||
void copyToImpl(const std::string& path, int options = 0) const;
|
||||
void renameToImpl(const std::string& path, int options = 0);
|
||||
void linkToImpl(const std::string& path, int type) const;
|
||||
void removeImpl();
|
||||
bool createFileImpl();
|
||||
bool createDirectoryImpl();
|
||||
FileSizeImpl totalSpaceImpl() const;
|
||||
FileSizeImpl usableSpaceImpl() const;
|
||||
FileSizeImpl freeSpaceImpl() const;
|
||||
static void handleLastErrorImpl(const std::string& path);
|
||||
|
||||
private:
|
||||
std::string _path;
|
||||
|
||||
friend class FileHandle;
|
||||
friend class DirectoryIteratorImpl;
|
||||
friend class WindowsDirectoryWatcherStrategy;
|
||||
};
|
||||
|
||||
|
||||
//
|
||||
// inlines
|
||||
//
|
||||
inline const std::string& FileImpl::getPathImpl() const
|
||||
{
|
||||
return _path;
|
||||
}
|
||||
|
||||
|
||||
} // namespace Poco
|
||||
|
||||
|
||||
#endif // Foundation_File_WIN32_INCLUDED
|
@ -1,54 +0,0 @@
|
||||
//
|
||||
// LogFile_WIN32.h
|
||||
//
|
||||
// Library: Foundation
|
||||
// Package: Logging
|
||||
// Module: LogFile
|
||||
//
|
||||
// Definition of the LogFileImpl class using the Windows file APIs.
|
||||
//
|
||||
// Copyright (c) 2004-2006, Applied Informatics Software Engineering GmbH.
|
||||
// and Contributors.
|
||||
//
|
||||
// SPDX-License-Identifier: BSL-1.0
|
||||
//
|
||||
|
||||
|
||||
#ifndef Foundation_LogFile_WIN32_INCLUDED
|
||||
#define Foundation_LogFile_WIN32_INCLUDED
|
||||
|
||||
|
||||
#include "Poco/Foundation.h"
|
||||
#include "Poco/Timestamp.h"
|
||||
#include "Poco/UnWindows.h"
|
||||
|
||||
|
||||
namespace Poco {
|
||||
|
||||
|
||||
class Foundation_API LogFileImpl
|
||||
/// The implementation of LogFile for Windows.
|
||||
/// The native filesystem APIs are used for
|
||||
/// total control over locking behavior.
|
||||
{
|
||||
public:
|
||||
LogFileImpl(const std::string& path);
|
||||
~LogFileImpl();
|
||||
void writeImpl(const std::string& text, bool flush);
|
||||
UInt64 sizeImpl() const;
|
||||
Timestamp creationDateImpl() const;
|
||||
const std::string& pathImpl() const;
|
||||
|
||||
private:
|
||||
void createFile();
|
||||
|
||||
std::string _path;
|
||||
HANDLE _hFile;
|
||||
Timestamp _creationDate;
|
||||
};
|
||||
|
||||
|
||||
} // namespace Poco
|
||||
|
||||
|
||||
#endif // Foundation_LogFile_WIN32_INCLUDED
|
@ -37,21 +37,27 @@ class Foundation_API LogStreamBuf: public UnbufferedStreamBuf
|
||||
/// priority.
|
||||
{
|
||||
public:
|
||||
LogStreamBuf(Logger& logger, Message::Priority priority);
|
||||
LogStreamBuf(Logger& logger, Message::Priority priority, std::size_t bufferCapacity = 0);
|
||||
/// Creates the LogStream.
|
||||
|
||||
~LogStreamBuf();
|
||||
/// Destroys the LogStream.
|
||||
|
||||
|
||||
void setPriority(Message::Priority priority);
|
||||
/// Sets the priority for log messages.
|
||||
|
||||
|
||||
Message::Priority getPriority() const;
|
||||
/// Returns the priority for log messages.
|
||||
|
||||
Logger& logger() const;
|
||||
/// Returns a reference to the Logger.
|
||||
|
||||
std::size_t capacity() const;
|
||||
/// Returns the internal message buffer capacity.
|
||||
|
||||
void reserve(std::size_t capacity);
|
||||
/// Sets the capacity of the internal message buffer to the given size.
|
||||
|
||||
private:
|
||||
int writeToDevice(char c);
|
||||
|
||||
@ -69,7 +75,7 @@ class Foundation_API LogIOS: public virtual std::ios
|
||||
/// order of the stream buffer and base classes.
|
||||
{
|
||||
public:
|
||||
LogIOS(Logger& logger, Message::Priority priority);
|
||||
LogIOS(Logger& logger, Message::Priority priority, std::size_t bufferCapacity = 0);
|
||||
~LogIOS();
|
||||
LogStreamBuf* rdbuf();
|
||||
|
||||
@ -93,23 +99,25 @@ class Foundation_API LogStream: public LogIOS, public std::ostream
|
||||
/// ls.error() << "Some error message" << std::endl;
|
||||
{
|
||||
public:
|
||||
LogStream(Logger& logger, Message::Priority priority = Message::PRIO_INFORMATION);
|
||||
static const std::size_t DEFAULT_BUFFER_CAPACITY = 255;
|
||||
|
||||
LogStream(Logger& logger, Message::Priority priority = Message::PRIO_INFORMATION, std::size_t bufferCapacity = DEFAULT_BUFFER_CAPACITY);
|
||||
/// Creates the LogStream, using the given logger and priority.
|
||||
|
||||
LogStream(const std::string& loggerName, Message::Priority priority = Message::PRIO_INFORMATION);
|
||||
LogStream(const std::string& loggerName, Message::Priority priority = Message::PRIO_INFORMATION, std::size_t bufferCapacity = DEFAULT_BUFFER_CAPACITY);
|
||||
/// Creates the LogStream, using the logger identified
|
||||
/// by loggerName, and sets the priority.
|
||||
|
||||
|
||||
~LogStream();
|
||||
/// Destroys the LogStream.
|
||||
|
||||
|
||||
LogStream& fatal();
|
||||
/// Sets the priority for log messages to Message::PRIO_FATAL.
|
||||
|
||||
|
||||
LogStream& fatal(const std::string& message);
|
||||
/// Sets the priority for log messages to Message::PRIO_FATAL
|
||||
/// and writes the given message.
|
||||
|
||||
|
||||
LogStream& critical();
|
||||
/// Sets the priority for log messages to Message::PRIO_CRITICAL.
|
||||
|
||||
@ -167,6 +175,12 @@ public:
|
||||
//
|
||||
// inlines
|
||||
//
|
||||
inline std::size_t LogStreamBuf::capacity() const
|
||||
{
|
||||
return _message.capacity();
|
||||
}
|
||||
|
||||
|
||||
inline Message::Priority LogStreamBuf::getPriority() const
|
||||
{
|
||||
return _priority;
|
||||
|
@ -73,7 +73,7 @@ class Foundation_API Logger: public Channel
|
||||
/// are used. The macros also add the source file path and line
|
||||
/// number into the log message so that it is available to formatters.
|
||||
/// Variants of these macros that allow message formatting with Poco::format()
|
||||
/// are also available.
|
||||
/// are also available.
|
||||
///
|
||||
/// Examples:
|
||||
/// poco_warning(logger, "This is a warning");
|
||||
@ -88,20 +88,20 @@ public:
|
||||
|
||||
void setChannel(Channel::Ptr pChannel);
|
||||
/// Attaches the given Channel to the Logger.
|
||||
|
||||
|
||||
Channel::Ptr getChannel() const;
|
||||
/// Returns the Channel attached to the logger.
|
||||
|
||||
|
||||
void setLevel(int level);
|
||||
/// Sets the Logger's log level.
|
||||
///
|
||||
/// See Message::Priority for valid log levels.
|
||||
/// Setting the log level to zero turns off
|
||||
/// logging for that Logger.
|
||||
|
||||
|
||||
int getLevel() const;
|
||||
/// Returns the Logger's log level.
|
||||
|
||||
|
||||
void setLevel(const std::string& level);
|
||||
/// Sets the Logger's log level using a symbolic value.
|
||||
///
|
||||
@ -126,17 +126,17 @@ public:
|
||||
void log(const Message& msg);
|
||||
/// Logs the given message if its priority is
|
||||
/// greater than or equal to the Logger's log level.
|
||||
|
||||
|
||||
void log(const Exception& exc);
|
||||
/// Logs the given exception with priority PRIO_ERROR.
|
||||
/// Logs the given exception with priority PRIO_ERROR.
|
||||
|
||||
void log(const Exception& exc, const char* file, int line);
|
||||
/// Logs the given exception with priority PRIO_ERROR.
|
||||
/// Logs the given exception with priority PRIO_ERROR.
|
||||
///
|
||||
/// File must be a static string, such as the value of
|
||||
/// the __FILE__ macro. The string is not copied
|
||||
/// internally for performance reasons.
|
||||
|
||||
/// internally for performance reasons.
|
||||
|
||||
void fatal(const std::string& msg);
|
||||
/// If the Logger's log level is at least PRIO_FATAL,
|
||||
/// creates a Message with priority PRIO_FATAL
|
||||
@ -151,10 +151,10 @@ public:
|
||||
///
|
||||
/// File must be a static string, such as the value of
|
||||
/// the __FILE__ macro. The string is not copied
|
||||
/// internally for performance reasons.
|
||||
/// internally for performance reasons.
|
||||
|
||||
template <typename T, typename... Args>
|
||||
void fatal(const std::string &fmt, T arg1, Args&&... args)
|
||||
void fatal(const std::string& fmt, T arg1, Args&&... args)
|
||||
{
|
||||
log(Poco::format(fmt, arg1, std::forward<Args>(args)...), Message::PRIO_FATAL);
|
||||
}
|
||||
@ -173,10 +173,10 @@ public:
|
||||
///
|
||||
/// File must be a static string, such as the value of
|
||||
/// the __FILE__ macro. The string is not copied
|
||||
/// internally for performance reasons.
|
||||
/// internally for performance reasons.
|
||||
|
||||
template <typename T, typename... Args>
|
||||
void critical(const std::string &fmt, T arg1, Args&&... args)
|
||||
void critical(const std::string& fmt, T arg1, Args&&... args)
|
||||
{
|
||||
log(Poco::format(fmt, arg1, std::forward<Args>(args)...), Message::PRIO_CRITICAL);
|
||||
}
|
||||
@ -195,10 +195,10 @@ public:
|
||||
///
|
||||
/// File must be a static string, such as the value of
|
||||
/// the __FILE__ macro. The string is not copied
|
||||
/// internally for performance reasons.
|
||||
/// internally for performance reasons.
|
||||
|
||||
template <typename T, typename... Args>
|
||||
void error(const std::string &fmt, T arg1, Args&&... args)
|
||||
void error(const std::string& fmt, T arg1, Args&&... args)
|
||||
{
|
||||
log(Poco::format(fmt, arg1, std::forward<Args>(args)...), Message::PRIO_ERROR);
|
||||
}
|
||||
@ -217,10 +217,10 @@ public:
|
||||
///
|
||||
/// File must be a static string, such as the value of
|
||||
/// the __FILE__ macro. The string is not copied
|
||||
/// internally for performance reasons.
|
||||
/// internally for performance reasons.
|
||||
|
||||
template <typename T, typename... Args>
|
||||
void warning(const std::string &fmt, T arg1, Args&&... args)
|
||||
void warning(const std::string& fmt, T arg1, Args&&... args)
|
||||
{
|
||||
log(Poco::format(fmt, arg1, std::forward<Args>(args)...), Message::PRIO_WARNING);
|
||||
}
|
||||
@ -239,10 +239,10 @@ public:
|
||||
///
|
||||
/// File must be a static string, such as the value of
|
||||
/// the __FILE__ macro. The string is not copied
|
||||
/// internally for performance reasons.
|
||||
/// internally for performance reasons.
|
||||
|
||||
template <typename T, typename... Args>
|
||||
void notice(const std::string &fmt, T arg1, Args&&... args)
|
||||
void notice(const std::string& fmt, T arg1, Args&&... args)
|
||||
{
|
||||
log(Poco::format(fmt, arg1, std::forward<Args>(args)...), Message::PRIO_NOTICE);
|
||||
}
|
||||
@ -261,10 +261,10 @@ public:
|
||||
///
|
||||
/// File must be a static string, such as the value of
|
||||
/// the __FILE__ macro. The string is not copied
|
||||
/// internally for performance reasons.
|
||||
/// internally for performance reasons.
|
||||
|
||||
template <typename T, typename... Args>
|
||||
void information(const std::string &fmt, T arg1, Args&&... args)
|
||||
void information(const std::string& fmt, T arg1, Args&&... args)
|
||||
{
|
||||
log(Poco::format(fmt, arg1, std::forward<Args>(args)...), Message::PRIO_INFORMATION);
|
||||
}
|
||||
@ -283,10 +283,10 @@ public:
|
||||
///
|
||||
/// File must be a static string, such as the value of
|
||||
/// the __FILE__ macro. The string is not copied
|
||||
/// internally for performance reasons.
|
||||
/// internally for performance reasons.
|
||||
|
||||
template <typename T, typename... Args>
|
||||
void debug(const std::string &fmt, T arg1, Args&&... args)
|
||||
void debug(const std::string& fmt, T arg1, Args&&... args)
|
||||
{
|
||||
log(Poco::format(fmt, arg1, std::forward<Args>(args)...), Message::PRIO_DEBUG);
|
||||
}
|
||||
@ -305,10 +305,10 @@ public:
|
||||
///
|
||||
/// File must be a static string, such as the value of
|
||||
/// the __FILE__ macro. The string is not copied
|
||||
/// internally for performance reasons.
|
||||
/// internally for performance reasons.
|
||||
|
||||
template <typename T, typename... Args>
|
||||
void trace(const std::string &fmt, T arg1, Args&&... args)
|
||||
void trace(const std::string& fmt, T arg1, Args&&... args)
|
||||
{
|
||||
log(Poco::format(fmt, arg1, std::forward<Args>(args)...), Message::PRIO_TRACE);
|
||||
}
|
||||
@ -317,17 +317,17 @@ public:
|
||||
/// Logs the given message, followed by the data in buffer.
|
||||
///
|
||||
/// The data in buffer is written in canonical hex+ASCII form:
|
||||
/// Offset (4 bytes) in hexadecimal, followed by sixteen
|
||||
/// Offset (4 bytes) in hexadecimal, followed by sixteen
|
||||
/// space-separated, two column, hexadecimal bytes,
|
||||
/// followed by the same sixteen bytes as ASCII characters.
|
||||
/// For bytes outside the range 32 .. 127, a dot is printed.
|
||||
|
||||
bool is(int level) const;
|
||||
/// Returns true if at least the given log level is set.
|
||||
|
||||
|
||||
bool fatal() const;
|
||||
/// Returns true if the log level is at least PRIO_FATAL.
|
||||
|
||||
|
||||
bool critical() const;
|
||||
/// Returns true if the log level is at least PRIO_CRITICAL.
|
||||
|
||||
@ -353,18 +353,18 @@ public:
|
||||
/// Replaces all occurrences of $0 in fmt with the string given in arg and
|
||||
/// returns the result. To include a dollar sign in the result string,
|
||||
/// specify two dollar signs ($$) in the format string.
|
||||
|
||||
|
||||
static std::string format(const std::string& fmt, const std::string& arg0, const std::string& arg1);
|
||||
/// Replaces all occurrences of $<n> in fmt with the string given in arg<n> and
|
||||
/// returns the result. To include a dollar sign in the result string,
|
||||
/// specify two dollar signs ($$) in the format string.
|
||||
|
||||
static std::string format(const std::string& fmt, const std::string& arg0, const std::string& arg1, const std::string& arg2);
|
||||
static std::string format(const std::string& fmt, const std::string& arg0, const std::string& arg1, const std::string& arg2);
|
||||
/// Replaces all occurrences of $<n> in fmt with the string given in arg<n> and
|
||||
/// returns the result. To include a dollar sign in the result string,
|
||||
/// specify two dollar signs ($$) in the format string.
|
||||
|
||||
static std::string format(const std::string& fmt, const std::string& arg0, const std::string& arg1, const std::string& arg2, const std::string& arg3);
|
||||
static std::string format(const std::string& fmt, const std::string& arg0, const std::string& arg1, const std::string& arg2, const std::string& arg3);
|
||||
/// Replaces all occurrences of $<n> in fmt with the string given in arg<n> and
|
||||
/// returns the result. To include a dollar sign in the result string,
|
||||
/// specify two dollar signs ($$) in the format string.
|
||||
@ -372,11 +372,11 @@ public:
|
||||
static void formatDump(std::string& message, const void* buffer, std::size_t length);
|
||||
/// Creates a hex-dump of the given buffer and appends it to the
|
||||
/// given message string.
|
||||
|
||||
|
||||
static void setLevel(const std::string& name, int level);
|
||||
/// Sets the given log level on all loggers that are
|
||||
/// descendants of the Logger with the given name.
|
||||
|
||||
|
||||
static void setChannel(const std::string& name, Channel::Ptr pChannel);
|
||||
/// Attaches the given Channel to all loggers that are
|
||||
/// descendants of the Logger with the given name.
|
||||
@ -399,35 +399,35 @@ public:
|
||||
/// probably use get() instead.
|
||||
/// The only time this method should be used is during
|
||||
/// program initialization, when only one thread is running.
|
||||
|
||||
|
||||
static Logger& create(const std::string& name, Channel::Ptr pChannel, int level = Message::PRIO_INFORMATION);
|
||||
/// Creates and returns a reference to a Logger with the
|
||||
/// given name. The Logger's Channel and log level as set as
|
||||
/// specified.
|
||||
|
||||
|
||||
static Logger& root();
|
||||
/// Returns a reference to the root logger, which is the ultimate
|
||||
/// ancestor of all Loggers.
|
||||
|
||||
|
||||
static Ptr has(const std::string& name);
|
||||
/// Returns a pointer to the Logger with the given name if it
|
||||
/// exists, or a null pointer otherwise.
|
||||
|
||||
|
||||
static void destroy(const std::string& name);
|
||||
/// Destroys the logger with the specified name. Does nothing
|
||||
/// if the logger is not found.
|
||||
///
|
||||
/// After a logger has been destroyed, all references to it
|
||||
/// become invalid.
|
||||
|
||||
/// become invalid.
|
||||
|
||||
static void shutdown();
|
||||
/// Shuts down the logging framework and releases all
|
||||
/// Loggers.
|
||||
|
||||
|
||||
static void names(std::vector<std::string>& names);
|
||||
/// Fills the given vector with the names
|
||||
/// of all currently defined loggers.
|
||||
|
||||
|
||||
static int parseLevel(const std::string& level);
|
||||
/// Parses a symbolic log level from a string and
|
||||
/// returns the resulting numeric level.
|
||||
@ -444,15 +444,15 @@ public:
|
||||
/// - trace
|
||||
///
|
||||
/// The level is not case sensitive.
|
||||
|
||||
static const std::string ROOT; /// The name of the root logger ("").
|
||||
|
||||
|
||||
static const std::string ROOT; /// The name of the root logger ("").
|
||||
|
||||
protected:
|
||||
typedef std::map<std::string, Ptr> LoggerMap;
|
||||
|
||||
Logger(const std::string& name, Channel::Ptr pChannel, int level);
|
||||
~Logger();
|
||||
|
||||
|
||||
void log(const std::string& text, Message::Priority prio);
|
||||
void log(const std::string& text, Message::Priority prio, const char* file, int line);
|
||||
|
||||
@ -467,7 +467,7 @@ private:
|
||||
Logger();
|
||||
Logger(const Logger&);
|
||||
Logger& operator = (const Logger&);
|
||||
|
||||
|
||||
std::string _name;
|
||||
Channel::Ptr _pChannel;
|
||||
int _level;
|
||||
|
@ -1,45 +0,0 @@
|
||||
//
|
||||
// NamedEvent_WIN32.h
|
||||
//
|
||||
// Library: Foundation
|
||||
// Package: Processes
|
||||
// Module: NamedEvent
|
||||
//
|
||||
// Definition of the NamedEventImpl class for Windows.
|
||||
//
|
||||
// Copyright (c) 2004-2006, Applied Informatics Software Engineering GmbH.
|
||||
// and Contributors.
|
||||
//
|
||||
// SPDX-License-Identifier: BSL-1.0
|
||||
//
|
||||
|
||||
|
||||
#ifndef Foundation_NamedEvent_WIN32_INCLUDED
|
||||
#define Foundation_NamedEvent_WIN32_INCLUDED
|
||||
|
||||
|
||||
#include "Poco/Foundation.h"
|
||||
#include "Poco/UnWindows.h"
|
||||
|
||||
|
||||
namespace Poco {
|
||||
|
||||
|
||||
class Foundation_API NamedEventImpl
|
||||
{
|
||||
protected:
|
||||
NamedEventImpl(const std::string& name);
|
||||
~NamedEventImpl();
|
||||
void setImpl();
|
||||
void waitImpl();
|
||||
|
||||
private:
|
||||
std::string _name;
|
||||
HANDLE _event;
|
||||
};
|
||||
|
||||
|
||||
} // namespace Poco
|
||||
|
||||
|
||||
#endif // Foundation_NamedEvent_WIN32_INCLUDED
|
@ -1,46 +0,0 @@
|
||||
//
|
||||
// NamedMutex_WIN32.h
|
||||
//
|
||||
// Library: Foundation
|
||||
// Package: Processes
|
||||
// Module: NamedMutex
|
||||
//
|
||||
// Definition of the NamedMutexImpl class for Windows.
|
||||
//
|
||||
// Copyright (c) 2004-2006, Applied Informatics Software Engineering GmbH.
|
||||
// and Contributors.
|
||||
//
|
||||
// SPDX-License-Identifier: BSL-1.0
|
||||
//
|
||||
|
||||
|
||||
#ifndef Foundation_NamedMutex_WIN32_INCLUDED
|
||||
#define Foundation_NamedMutex_WIN32_INCLUDED
|
||||
|
||||
|
||||
#include "Poco/Foundation.h"
|
||||
#include "Poco/UnWindows.h"
|
||||
|
||||
|
||||
namespace Poco {
|
||||
|
||||
|
||||
class Foundation_API NamedMutexImpl
|
||||
{
|
||||
protected:
|
||||
NamedMutexImpl(const std::string& name);
|
||||
~NamedMutexImpl();
|
||||
void lockImpl();
|
||||
bool tryLockImpl();
|
||||
void unlockImpl();
|
||||
|
||||
private:
|
||||
std::string _name;
|
||||
HANDLE _mutex;
|
||||
};
|
||||
|
||||
|
||||
} // namespace Poco
|
||||
|
||||
|
||||
#endif // Foundation_NamedMutex_WIN32_INCLUDED
|
@ -1,49 +0,0 @@
|
||||
//
|
||||
// Path_WIN32.h
|
||||
//
|
||||
// Library: Foundation
|
||||
// Package: Filesystem
|
||||
// Module: Path
|
||||
//
|
||||
// Definition of the PathImpl class for WIN32.
|
||||
//
|
||||
// Copyright (c) 2004-2006, Applied Informatics Software Engineering GmbH.
|
||||
// and Contributors.
|
||||
//
|
||||
// SPDX-License-Identifier: BSL-1.0
|
||||
//
|
||||
|
||||
|
||||
#ifndef Foundation_Path_WIN32_INCLUDED
|
||||
#define Foundation_Path_WIN32_INCLUDED
|
||||
|
||||
|
||||
#include "Poco/Foundation.h"
|
||||
#include <vector>
|
||||
|
||||
|
||||
namespace Poco {
|
||||
|
||||
|
||||
class Foundation_API PathImpl
|
||||
{
|
||||
public:
|
||||
static std::string currentImpl();
|
||||
static std::string homeImpl();
|
||||
static std::string configHomeImpl();
|
||||
static std::string dataHomeImpl();
|
||||
static std::string cacheHomeImpl();
|
||||
static std::string tempHomeImpl();
|
||||
static std::string tempImpl();
|
||||
static std::string configImpl();
|
||||
static std::string nullImpl();
|
||||
static std::string systemImpl();
|
||||
static std::string expandImpl(const std::string& path);
|
||||
static void listRootsImpl(std::vector<std::string>& roots);
|
||||
};
|
||||
|
||||
|
||||
} // namespace Poco
|
||||
|
||||
|
||||
#endif // Foundation_Path_WIN32_INCLUDED
|
@ -1,84 +0,0 @@
|
||||
//
|
||||
// Process_WIN32.h
|
||||
//
|
||||
// Library: Foundation
|
||||
// Package: Processes
|
||||
// Module: Process
|
||||
//
|
||||
// Definition of the ProcessImpl class for WIN32.
|
||||
//
|
||||
// Copyright (c) 2004-2006, Applied Informatics Software Engineering GmbH.
|
||||
// and Contributors.
|
||||
//
|
||||
// SPDX-License-Identifier: BSL-1.0
|
||||
//
|
||||
|
||||
|
||||
#ifndef Foundation_Process_WIN32_INCLUDED
|
||||
#define Foundation_Process_WIN32_INCLUDED
|
||||
|
||||
|
||||
#include "Poco/Foundation.h"
|
||||
#include "Poco/RefCountedObject.h"
|
||||
#include <vector>
|
||||
#include <map>
|
||||
#include "Poco/UnWindows.h"
|
||||
|
||||
|
||||
namespace Poco {
|
||||
|
||||
|
||||
class Pipe;
|
||||
|
||||
|
||||
class Foundation_API ProcessHandleImpl: public RefCountedObject
|
||||
{
|
||||
public:
|
||||
ProcessHandleImpl(HANDLE _hProcess, UInt32 pid);
|
||||
~ProcessHandleImpl();
|
||||
|
||||
UInt32 id() const;
|
||||
HANDLE process() const;
|
||||
int wait() const;
|
||||
int tryWait() const;
|
||||
void closeHandle();
|
||||
|
||||
private:
|
||||
HANDLE _hProcess;
|
||||
UInt32 _pid;
|
||||
|
||||
ProcessHandleImpl(const ProcessHandleImpl&);
|
||||
ProcessHandleImpl& operator = (const ProcessHandleImpl&);
|
||||
};
|
||||
|
||||
|
||||
class Foundation_API ProcessImpl
|
||||
{
|
||||
public:
|
||||
typedef UInt32 PIDImpl;
|
||||
typedef std::vector<std::string> ArgsImpl;
|
||||
typedef std::map<std::string, std::string> EnvImpl;
|
||||
|
||||
static PIDImpl idImpl();
|
||||
static void timesImpl(long& userTime, long& kernelTime);
|
||||
static ProcessHandleImpl* launchImpl(
|
||||
const std::string& command,
|
||||
const ArgsImpl& args,
|
||||
const std::string& initialDirectory,
|
||||
Pipe* inPipe,
|
||||
Pipe* outPipe,
|
||||
Pipe* errPipe,
|
||||
const EnvImpl& env);
|
||||
static void killImpl(ProcessHandleImpl& handle);
|
||||
static void killImpl(PIDImpl pid);
|
||||
static bool isRunningImpl(const ProcessHandleImpl& handle);
|
||||
static bool isRunningImpl(PIDImpl pid);
|
||||
static void requestTerminationImpl(PIDImpl pid);
|
||||
static std::string terminationEventName(PIDImpl pid);
|
||||
};
|
||||
|
||||
|
||||
} // namespace Poco
|
||||
|
||||
|
||||
#endif // Foundation_Process_WIN32_INCLUDED
|
@ -75,6 +75,8 @@ public:
|
||||
static bool isRunningImpl(PIDImpl pid);
|
||||
static void requestTerminationImpl(PIDImpl pid);
|
||||
static std::string terminationEventName(PIDImpl pid);
|
||||
static bool mustEscapeArg(const std::string& arg);
|
||||
static std::string escapeArg(const std::string& arg);
|
||||
};
|
||||
|
||||
|
||||
|
@ -1,51 +0,0 @@
|
||||
//
|
||||
// SharedLibrary_WIN32.h
|
||||
//
|
||||
// Library: Foundation
|
||||
// Package: SharedLibrary
|
||||
// Module: SharedLibrary
|
||||
//
|
||||
// Definition of the SharedLibraryImpl class for Win32.
|
||||
//
|
||||
// Copyright (c) 2004-2006, Applied Informatics Software Engineering GmbH.
|
||||
// and Contributors.
|
||||
//
|
||||
// SPDX-License-Identifier: BSL-1.0
|
||||
//
|
||||
|
||||
|
||||
#ifndef Foundation_SharedLibrary_WIN32_INCLUDED
|
||||
#define Foundation_SharedLibrary_WIN32_INCLUDED
|
||||
|
||||
|
||||
#include "Poco/Foundation.h"
|
||||
#include "Poco/Mutex.h"
|
||||
|
||||
|
||||
namespace Poco {
|
||||
|
||||
|
||||
class Foundation_API SharedLibraryImpl
|
||||
{
|
||||
protected:
|
||||
SharedLibraryImpl();
|
||||
~SharedLibraryImpl();
|
||||
void loadImpl(const std::string& path, int flags);
|
||||
void unloadImpl();
|
||||
bool isLoadedImpl() const;
|
||||
void* findSymbolImpl(const std::string& name);
|
||||
const std::string& getPathImpl() const;
|
||||
static std::string suffixImpl();
|
||||
static bool setSearchPathImpl(const std::string& path);
|
||||
|
||||
private:
|
||||
std::string _path;
|
||||
void* _handle;
|
||||
static FastMutex _mutex;
|
||||
};
|
||||
|
||||
|
||||
} // namespace Poco
|
||||
|
||||
|
||||
#endif // Foundation_SharedLibrary_WIN32_INCLUDED
|
@ -22,6 +22,7 @@
|
||||
#include "Poco/Exception.h"
|
||||
#include "Poco/AtomicCounter.h"
|
||||
#include <algorithm>
|
||||
#include <cstddef>
|
||||
|
||||
|
||||
namespace Poco {
|
||||
@ -336,6 +337,11 @@ public:
|
||||
return get() == ptr;
|
||||
}
|
||||
|
||||
bool operator == (std::nullptr_t ptr) const
|
||||
{
|
||||
return get() == ptr;
|
||||
}
|
||||
|
||||
bool operator != (const SharedPtr& ptr) const
|
||||
{
|
||||
return get() != ptr.get();
|
||||
@ -351,6 +357,11 @@ public:
|
||||
return get() != ptr;
|
||||
}
|
||||
|
||||
bool operator != (std::nullptr_t ptr) const
|
||||
{
|
||||
return get() != ptr;
|
||||
}
|
||||
|
||||
bool operator < (const SharedPtr& ptr) const
|
||||
{
|
||||
return get() < ptr.get();
|
||||
|
@ -49,7 +49,7 @@ using UIntPtr = std::uintptr_t;
|
||||
#if defined(__LP64__)
|
||||
#define POCO_PTR_IS_64_BIT 1
|
||||
#define POCO_LONG_IS_64_BIT 1
|
||||
#if POCO_OS == POCO_OS_LINUX || POCO_OS == POCO_OS_ANDROID
|
||||
#if POCO_OS == POCO_OS_LINUX || POCO_OS == POCO_OS_FREE_BSD || POCO_OS == POCO_OS_ANDROID
|
||||
#define POCO_INT64_IS_LONG 1
|
||||
#endif
|
||||
#endif
|
||||
|
@ -31,7 +31,7 @@ class Path;
|
||||
|
||||
class Foundation_API URI
|
||||
/// A Uniform Resource Identifier, as specified in RFC 3986.
|
||||
///
|
||||
///
|
||||
/// The URI class provides methods for building URIs from their
|
||||
/// parts, as well as for splitting URIs into their parts.
|
||||
/// Furthermore, the class provides methods for resolving
|
||||
@ -59,14 +59,14 @@ public:
|
||||
explicit URI(const std::string& uri);
|
||||
/// Parses an URI from the given string. Throws a
|
||||
/// SyntaxException if the uri is not valid.
|
||||
|
||||
|
||||
explicit URI(const char* uri);
|
||||
/// Parses an URI from the given string. Throws a
|
||||
/// SyntaxException if the uri is not valid.
|
||||
|
||||
|
||||
URI(const std::string& scheme, const std::string& pathEtc);
|
||||
/// Creates an URI from its parts.
|
||||
|
||||
|
||||
URI(const std::string& scheme, const std::string& authority, const std::string& pathEtc);
|
||||
/// Creates an URI from its parts.
|
||||
|
||||
@ -81,7 +81,7 @@ public:
|
||||
|
||||
URI(URI&& uri) noexcept;
|
||||
/// Move constructor.
|
||||
|
||||
|
||||
URI(const URI& baseURI, const std::string& relativeURI);
|
||||
/// Creates an URI from a base URI and a relative URI, according to
|
||||
/// the algorithm in section 5.2 of RFC 3986.
|
||||
@ -94,12 +94,12 @@ public:
|
||||
|
||||
~URI();
|
||||
/// Destroys the URI.
|
||||
|
||||
|
||||
URI& operator = (const URI& uri);
|
||||
/// Assignment operator.
|
||||
|
||||
URI& operator = (URI&& uri) noexcept;
|
||||
/// Move assignment.
|
||||
/// Move assignment.
|
||||
|
||||
URI& operator = (const std::string& uri);
|
||||
/// Parses and assigns an URI from the given string. Throws a
|
||||
@ -108,41 +108,41 @@ public:
|
||||
URI& operator = (const char* uri);
|
||||
/// Parses and assigns an URI from the given string. Throws a
|
||||
/// SyntaxException if the uri is not valid.
|
||||
|
||||
|
||||
void swap(URI& uri);
|
||||
/// Swaps the URI with another one.
|
||||
|
||||
/// Swaps the URI with another one.
|
||||
|
||||
void clear();
|
||||
/// Clears all parts of the URI.
|
||||
|
||||
|
||||
std::string toString() const;
|
||||
/// Returns a string representation of the URI.
|
||||
///
|
||||
/// Characters in the path, query and fragment parts will be
|
||||
/// Characters in the path, query and fragment parts will be
|
||||
/// percent-encoded as necessary.
|
||||
|
||||
|
||||
const std::string& getScheme() const;
|
||||
/// Returns the scheme part of the URI.
|
||||
|
||||
|
||||
void setScheme(const std::string& scheme);
|
||||
/// Sets the scheme part of the URI. The given scheme
|
||||
/// is converted to lower-case.
|
||||
///
|
||||
/// A list of registered URI schemes can be found
|
||||
/// at <http://www.iana.org/assignments/uri-schemes>.
|
||||
|
||||
|
||||
const std::string& getUserInfo() const;
|
||||
/// Returns the user-info part of the URI.
|
||||
|
||||
|
||||
void setUserInfo(const std::string& userInfo);
|
||||
/// Sets the user-info part of the URI.
|
||||
|
||||
|
||||
const std::string& getHost() const;
|
||||
/// Returns the host part of the URI.
|
||||
|
||||
|
||||
void setHost(const std::string& host);
|
||||
/// Sets the host part of the URI.
|
||||
|
||||
|
||||
unsigned short getPort() const;
|
||||
/// Returns the port number part of the URI.
|
||||
///
|
||||
@ -150,39 +150,45 @@ public:
|
||||
/// well-known port number (e.g., 80 for http) for
|
||||
/// the given scheme is returned if it is known.
|
||||
/// Otherwise, 0 is returned.
|
||||
|
||||
|
||||
void setPort(unsigned short port);
|
||||
/// Sets the port number part of the URI.
|
||||
|
||||
|
||||
unsigned short getSpecifiedPort() const;
|
||||
/// Returns the port number part of the URI.
|
||||
///
|
||||
/// If no explicit port number has been specified,
|
||||
/// returns 0.
|
||||
|
||||
std::string getAuthority() const;
|
||||
/// Returns the authority part (userInfo, host and port)
|
||||
/// of the URI.
|
||||
/// of the URI.
|
||||
///
|
||||
/// If the port number is a well-known port
|
||||
/// number for the given scheme (e.g., 80 for http), it
|
||||
/// is not included in the authority.
|
||||
|
||||
|
||||
void setAuthority(const std::string& authority);
|
||||
/// Parses the given authority part for the URI and sets
|
||||
/// the user-info, host, port components accordingly.
|
||||
|
||||
|
||||
const std::string& getPath() const;
|
||||
/// Returns the decoded path part of the URI.
|
||||
|
||||
|
||||
void setPath(const std::string& path);
|
||||
/// Sets the path part of the URI.
|
||||
|
||||
|
||||
std::string getQuery() const;
|
||||
/// Returns the decoded query part of the URI.
|
||||
///
|
||||
/// Note that encoded ampersand characters ('&', "%26")
|
||||
/// will be decoded, which could cause ambiguities if the query
|
||||
/// Note that encoded ampersand characters ('&', "%26")
|
||||
/// will be decoded, which could cause ambiguities if the query
|
||||
/// string contains multiple parameters and a parameter name
|
||||
/// or value contains an ampersand as well.
|
||||
/// In such a case it's better to use getRawQuery() or
|
||||
/// getQueryParameters().
|
||||
|
||||
void setQuery(const std::string& query);
|
||||
|
||||
void setQuery(const std::string& query);
|
||||
/// Sets the query part of the URI.
|
||||
///
|
||||
/// The query string will be percent-encoded. If the query
|
||||
@ -192,28 +198,28 @@ public:
|
||||
/// characters in the query will not be encoded. This could
|
||||
/// lead to ambiguity issues if the query string contains multiple
|
||||
/// name-value parameters separated by ampersand, and if any
|
||||
/// name or value also contains an ampersand. In such a
|
||||
/// name or value also contains an ampersand. In such a
|
||||
/// case, it's better to use setRawQuery() with a properly
|
||||
/// percent-encoded query string, or use addQueryParameter()
|
||||
/// or setQueryParameters(), which take care of appropriate
|
||||
/// or setQueryParameters(), which take care of appropriate
|
||||
/// percent encoding of parameter names and values.
|
||||
|
||||
void addQueryParameter(const std::string& param, const std::string& val = "");
|
||||
/// Adds "param=val" to the query; "param" may not be empty.
|
||||
/// If val is empty, only '=' is appended to the parameter.
|
||||
///
|
||||
///
|
||||
/// In addition to regular encoding, function also encodes '&' and '=',
|
||||
/// if found in param or val.
|
||||
|
||||
const std::string& getRawQuery() const;
|
||||
/// Returns the query string in raw form, which usually
|
||||
/// means percent encoded.
|
||||
|
||||
void setRawQuery(const std::string& query);
|
||||
|
||||
void setRawQuery(const std::string& query);
|
||||
/// Sets the query part of the URI.
|
||||
///
|
||||
/// The given query string must be properly percent-encoded.
|
||||
|
||||
|
||||
QueryParameters getQueryParameters() const;
|
||||
/// Returns the decoded query string parameters as a vector
|
||||
/// of name-value pairs.
|
||||
@ -226,19 +232,19 @@ public:
|
||||
|
||||
const std::string& getFragment() const;
|
||||
/// Returns the fragment part of the URI.
|
||||
|
||||
|
||||
void setFragment(const std::string& fragment);
|
||||
/// Sets the fragment part of the URI.
|
||||
|
||||
|
||||
void setPathEtc(const std::string& pathEtc);
|
||||
/// Sets the path, query and fragment parts of the URI.
|
||||
|
||||
|
||||
std::string getPathEtc() const;
|
||||
/// Returns the encoded path, query and fragment parts of the URI.
|
||||
|
||||
|
||||
std::string getPathAndQuery() const;
|
||||
/// Returns the encoded path and query parts of the URI.
|
||||
|
||||
/// Returns the encoded path and query parts of the URI.
|
||||
|
||||
void resolve(const std::string& relativeURI);
|
||||
/// Resolves the given relative URI against the base URI.
|
||||
/// See section 5.2 of RFC 3986 for the algorithm used.
|
||||
@ -253,10 +259,10 @@ public:
|
||||
/// A relative reference does not contain a scheme identifier.
|
||||
/// Relative references are usually resolved against an absolute
|
||||
/// base reference.
|
||||
|
||||
|
||||
bool empty() const;
|
||||
/// Returns true if the URI is empty, false otherwise.
|
||||
|
||||
|
||||
bool operator == (const URI& uri) const;
|
||||
/// Returns true if both URIs are identical, false otherwise.
|
||||
///
|
||||
@ -273,22 +279,22 @@ public:
|
||||
bool operator != (const std::string& uri) const;
|
||||
/// Parses the given URI and returns true if both URIs are identical,
|
||||
/// false otherwise.
|
||||
|
||||
|
||||
void normalize();
|
||||
/// Normalizes the URI by removing all but leading . and .. segments from the path.
|
||||
///
|
||||
/// If the first path segment in a relative path contains a colon (:),
|
||||
/// such as in a Windows path containing a drive letter, a dot segment (./)
|
||||
/// If the first path segment in a relative path contains a colon (:),
|
||||
/// such as in a Windows path containing a drive letter, a dot segment (./)
|
||||
/// is prepended in accordance with section 3.3 of RFC 3986.
|
||||
|
||||
|
||||
void getPathSegments(std::vector<std::string>& segments);
|
||||
/// Places the single path segments (delimited by slashes) into the
|
||||
/// given vector.
|
||||
|
||||
|
||||
static void encode(const std::string& str, const std::string& reserved, std::string& encodedStr);
|
||||
/// URI-encodes the given string by escaping reserved and non-ASCII
|
||||
/// characters. The encoded string is appended to encodedStr.
|
||||
|
||||
|
||||
static void decode(const std::string& str, std::string& decodedStr, bool plusAsSpace = false);
|
||||
/// URI-decodes the given string by replacing percent-encoded
|
||||
/// characters with the actual character. The decoded string
|
||||
@ -300,15 +306,15 @@ public:
|
||||
protected:
|
||||
bool equals(const URI& uri) const;
|
||||
/// Returns true if both uri's are equivalent.
|
||||
|
||||
|
||||
bool isWellKnownPort() const;
|
||||
/// Returns true if the URI's port number is a well-known one
|
||||
/// (for example, 80, if the scheme is http).
|
||||
|
||||
|
||||
unsigned short getWellKnownPort() const;
|
||||
/// Returns the well-known port number for the URI's scheme,
|
||||
/// or 0 if the port number is not known.
|
||||
|
||||
|
||||
void parse(const std::string& uri);
|
||||
/// Parses and assigns an URI from the given string. Throws a
|
||||
/// SyntaxException if the uri is not valid.
|
||||
@ -349,7 +355,7 @@ protected:
|
||||
static const std::string RESERVED_QUERY_PARAM;
|
||||
static const std::string RESERVED_FRAGMENT;
|
||||
static const std::string ILLEGAL;
|
||||
|
||||
|
||||
private:
|
||||
std::string _scheme;
|
||||
std::string _userInfo;
|
||||
@ -368,44 +374,50 @@ inline const std::string& URI::getScheme() const
|
||||
{
|
||||
return _scheme;
|
||||
}
|
||||
|
||||
|
||||
|
||||
inline const std::string& URI::getUserInfo() const
|
||||
{
|
||||
return _userInfo;
|
||||
}
|
||||
|
||||
|
||||
|
||||
inline const std::string& URI::getHost() const
|
||||
{
|
||||
return _host;
|
||||
}
|
||||
|
||||
|
||||
|
||||
inline const std::string& URI::getPath() const
|
||||
{
|
||||
return _path;
|
||||
}
|
||||
|
||||
|
||||
|
||||
inline const std::string& URI::getRawQuery() const
|
||||
{
|
||||
return _query;
|
||||
}
|
||||
|
||||
|
||||
|
||||
inline const std::string& URI::getFragment() const
|
||||
{
|
||||
return _fragment;
|
||||
}
|
||||
|
||||
|
||||
inline unsigned short URI::getSpecifiedPort() const
|
||||
{
|
||||
return _port;
|
||||
}
|
||||
|
||||
|
||||
inline void swap(URI& u1, URI& u2)
|
||||
{
|
||||
u1.swap(u2);
|
||||
}
|
||||
|
||||
|
||||
|
||||
} // namespace Poco
|
||||
|
||||
|
||||
|
@ -35,7 +35,7 @@
|
||||
// Ax: alpha releases
|
||||
// Bx: beta releases
|
||||
//
|
||||
#define POCO_VERSION 0x010A0000
|
||||
#define POCO_VERSION 0x010A0100
|
||||
|
||||
|
||||
#endif // Foundation_Version_INCLUDED
|
||||
|
@ -1,2 +1,2 @@
|
||||
add_executable(ActiveMethod src/ActiveMethod.cpp)
|
||||
target_link_libraries(ActiveMethod PUBLIC Poco::Foundation )
|
||||
target_link_libraries(ActiveMethod PUBLIC Poco::Foundation)
|
||||
|
@ -1,2 +1,2 @@
|
||||
add_executable(Activity src/Activity.cpp)
|
||||
target_link_libraries(Activity PUBLIC Poco::Foundation )
|
||||
target_link_libraries(Activity PUBLIC Poco::Foundation)
|
||||
|
@ -1,2 +1,2 @@
|
||||
add_executable(BinaryReaderWriter src/BinaryReaderWriter.cpp)
|
||||
target_link_libraries(BinaryReaderWriter PUBLIC Poco::Foundation )
|
||||
target_link_libraries(BinaryReaderWriter PUBLIC Poco::Foundation)
|
||||
|
@ -1,2 +1,2 @@
|
||||
add_executable(LineEndingConverter src/LineEndingConverter.cpp)
|
||||
target_link_libraries(LineEndingConverter PUBLIC Poco::Foundation )
|
||||
target_link_libraries(LineEndingConverter PUBLIC Poco::Foundation)
|
||||
|
@ -1,2 +1,2 @@
|
||||
add_executable(LogRotation src/LogRotation.cpp)
|
||||
target_link_libraries(LogRotation PUBLIC Poco::Foundation )
|
||||
target_link_libraries(LogRotation PUBLIC Poco::Foundation)
|
||||
|
@ -1,2 +1,2 @@
|
||||
add_executable(Logger src/Logger.cpp)
|
||||
target_link_libraries(Logger PUBLIC Poco::Foundation )
|
||||
target_link_libraries(Logger PUBLIC Poco::Foundation)
|
||||
|
@ -1,2 +1,2 @@
|
||||
add_executable(NotificationQueue src/NotificationQueue.cpp)
|
||||
target_link_libraries(NotificationQueue PUBLIC Poco::Foundation )
|
||||
target_link_libraries(NotificationQueue PUBLIC Poco::Foundation)
|
||||
|
@ -1,2 +1,2 @@
|
||||
add_executable(Timer src/Timer.cpp)
|
||||
target_link_libraries(Timer PUBLIC Poco::Foundation )
|
||||
target_link_libraries(Timer PUBLIC Poco::Foundation)
|
||||
|
@ -1,2 +1,2 @@
|
||||
add_executable(URI src/URI.cpp)
|
||||
target_link_libraries(URI PUBLIC Poco::Foundation )
|
||||
target_link_libraries(URI PUBLIC Poco::Foundation)
|
||||
|
@ -1,2 +1,2 @@
|
||||
add_executable(base64decode src/base64decode.cpp)
|
||||
target_link_libraries(base64decode PUBLIC Poco::Foundation )
|
||||
target_link_libraries(base64decode PUBLIC Poco::Foundation)
|
||||
|
@ -1,2 +1,2 @@
|
||||
add_executable(base64encode src/base64encode.cpp)
|
||||
target_link_libraries(base64encode PUBLIC Poco::Foundation )
|
||||
target_link_libraries(base64encode PUBLIC Poco::Foundation)
|
||||
|
@ -1,2 +1,2 @@
|
||||
add_executable(deflate src/deflate.cpp)
|
||||
target_link_libraries(deflate PUBLIC Poco::Foundation )
|
||||
target_link_libraries(deflate PUBLIC Poco::Foundation)
|
||||
|
@ -1,2 +1,2 @@
|
||||
add_executable(dir src/dir.cpp)
|
||||
target_link_libraries(dir PUBLIC Poco::Foundation )
|
||||
target_link_libraries(dir PUBLIC Poco::Foundation)
|
||||
|
@ -1,2 +1,2 @@
|
||||
add_executable(grep src/grep.cpp)
|
||||
target_link_libraries(grep PUBLIC Poco::Foundation )
|
||||
target_link_libraries(grep PUBLIC Poco::Foundation)
|
||||
|
@ -1,2 +1,2 @@
|
||||
add_executable(hmacmd5 src/hmacmd5.cpp)
|
||||
target_link_libraries(hmacmd5 PUBLIC Poco::Foundation )
|
||||
target_link_libraries(hmacmd5 PUBLIC Poco::Foundation)
|
||||
|
@ -1,2 +1,2 @@
|
||||
add_executable(inflate src/inflate.cpp)
|
||||
target_link_libraries(inflate PUBLIC Poco::Foundation )
|
||||
target_link_libraries(inflate PUBLIC Poco::Foundation)
|
||||
|
@ -1,2 +1,2 @@
|
||||
add_executable(md5 src/md5.cpp)
|
||||
target_link_libraries(md5 PUBLIC Poco::Foundation )
|
||||
target_link_libraries(md5 PUBLIC Poco::Foundation)
|
||||
|
@ -1,2 +1,2 @@
|
||||
add_executable(uuidgen src/uuidgen.cpp)
|
||||
target_link_libraries(uuidgen PUBLIC Poco::Foundation )
|
||||
target_link_libraries(uuidgen PUBLIC Poco::Foundation)
|
||||
|
@ -18,7 +18,10 @@
|
||||
#include "Poco/Formatter.h"
|
||||
#include "Poco/AutoPtr.h"
|
||||
#include "Poco/LoggingRegistry.h"
|
||||
#include "Poco/NumberParser.h"
|
||||
#include "Poco/Exception.h"
|
||||
#include "Poco/String.h"
|
||||
#include "Poco/Format.h"
|
||||
|
||||
|
||||
namespace Poco {
|
||||
@ -31,23 +34,23 @@ public:
|
||||
_msg(msg)
|
||||
{
|
||||
}
|
||||
|
||||
|
||||
~MessageNotification()
|
||||
{
|
||||
}
|
||||
|
||||
|
||||
const Message& message() const
|
||||
{
|
||||
return _msg;
|
||||
}
|
||||
|
||||
|
||||
private:
|
||||
Message _msg;
|
||||
};
|
||||
|
||||
|
||||
AsyncChannel::AsyncChannel(Channel::Ptr pChannel, Thread::Priority prio):
|
||||
_pChannel(pChannel),
|
||||
AsyncChannel::AsyncChannel(Channel::Ptr pChannel, Thread::Priority prio):
|
||||
_pChannel(pChannel),
|
||||
_thread("AsyncChannel")
|
||||
{
|
||||
_thread.setPriority(prio);
|
||||
@ -70,7 +73,7 @@ AsyncChannel::~AsyncChannel()
|
||||
void AsyncChannel::setChannel(Channel::Ptr pChannel)
|
||||
{
|
||||
FastMutex::ScopedLock lock(_channelMutex);
|
||||
|
||||
|
||||
_pChannel = pChannel;
|
||||
}
|
||||
|
||||
@ -94,10 +97,10 @@ void AsyncChannel::close()
|
||||
if (_thread.isRunning())
|
||||
{
|
||||
while (!_queue.empty()) Thread::sleep(100);
|
||||
|
||||
do
|
||||
|
||||
do
|
||||
{
|
||||
_queue.wakeUpAll();
|
||||
_queue.wakeUpAll();
|
||||
}
|
||||
while (!_thread.tryJoin(100));
|
||||
}
|
||||
@ -106,6 +109,18 @@ void AsyncChannel::close()
|
||||
|
||||
void AsyncChannel::log(const Message& msg)
|
||||
{
|
||||
if (_queueSize != 0 && _queue.size() >= _queueSize)
|
||||
{
|
||||
++_dropCount;
|
||||
return;
|
||||
}
|
||||
|
||||
if (_dropCount != 0)
|
||||
{
|
||||
_queue.enqueueNotification(new MessageNotification(Message(msg, Poco::format("Dropped %z messages.", _dropCount))));
|
||||
_dropCount = 0;
|
||||
}
|
||||
|
||||
open();
|
||||
|
||||
_queue.enqueueNotification(new MessageNotification(msg));
|
||||
@ -115,11 +130,24 @@ void AsyncChannel::log(const Message& msg)
|
||||
void AsyncChannel::setProperty(const std::string& name, const std::string& value)
|
||||
{
|
||||
if (name == "channel")
|
||||
{
|
||||
setChannel(LoggingRegistry::defaultRegistry().channelForName(value));
|
||||
}
|
||||
else if (name == "priority")
|
||||
{
|
||||
setPriority(value);
|
||||
}
|
||||
else if (name == "queueSize")
|
||||
{
|
||||
if (Poco::icompare(value, "none") == 0 || Poco::icompare(value, "unlimited") == 0 || value.empty())
|
||||
_queueSize = 0;
|
||||
else
|
||||
_queueSize = Poco::NumberParser::parseUnsigned(value);
|
||||
}
|
||||
else
|
||||
{
|
||||
Channel::setProperty(name, value);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@ -137,12 +165,12 @@ void AsyncChannel::run()
|
||||
nf = _queue.waitDequeueNotification();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
void AsyncChannel::setPriority(const std::string& value)
|
||||
{
|
||||
Thread::Priority prio = Thread::PRIO_NORMAL;
|
||||
|
||||
|
||||
if (value == "lowest")
|
||||
prio = Thread::PRIO_LOWEST;
|
||||
else if (value == "low")
|
||||
@ -155,7 +183,7 @@ void AsyncChannel::setPriority(const std::string& value)
|
||||
prio = Thread::PRIO_HIGHEST;
|
||||
else
|
||||
throw InvalidArgumentException("thread priority", value);
|
||||
|
||||
|
||||
_thread.setPriority(prio);
|
||||
}
|
||||
|
||||
|
@ -1,66 +0,0 @@
|
||||
//
|
||||
// DirectoryIterator_WIN32.cpp
|
||||
//
|
||||
// Library: Foundation
|
||||
// Package: Filesystem
|
||||
// Module: DirectoryIterator
|
||||
//
|
||||
// Copyright (c) 2004-2006, Applied Informatics Software Engineering GmbH.
|
||||
// and Contributors.
|
||||
//
|
||||
// SPDX-License-Identifier: BSL-1.0
|
||||
//
|
||||
|
||||
|
||||
#include "Poco/DirectoryIterator_WIN32.h"
|
||||
#include "Poco/File_WIN32.h"
|
||||
#include "Poco/Path.h"
|
||||
|
||||
|
||||
namespace Poco {
|
||||
|
||||
|
||||
DirectoryIteratorImpl::DirectoryIteratorImpl(const std::string& path): _fh(INVALID_HANDLE_VALUE), _rc(1)
|
||||
{
|
||||
Path p(path);
|
||||
p.makeDirectory();
|
||||
std::string findPath = p.toString();
|
||||
findPath.append("*");
|
||||
|
||||
_fh = FindFirstFile(findPath.c_str(), &_fd);
|
||||
if (_fh == INVALID_HANDLE_VALUE)
|
||||
{
|
||||
if (GetLastError() != ERROR_NO_MORE_FILES)
|
||||
File::handleLastError(path);
|
||||
}
|
||||
else
|
||||
{
|
||||
_current = _fd.cFileName;
|
||||
if (_current == "." || _current == "..")
|
||||
next();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
DirectoryIteratorImpl::~DirectoryIteratorImpl()
|
||||
{
|
||||
if (_fh != INVALID_HANDLE_VALUE)
|
||||
FindClose(_fh);
|
||||
}
|
||||
|
||||
|
||||
const std::string& DirectoryIteratorImpl::next()
|
||||
{
|
||||
do
|
||||
{
|
||||
if (FindNextFile(_fh, &_fd) != 0)
|
||||
_current = _fd.cFileName;
|
||||
else
|
||||
_current.clear();
|
||||
}
|
||||
while (_current == "." || _current == "..");
|
||||
return _current;
|
||||
}
|
||||
|
||||
|
||||
} // namespace Poco
|
@ -1,221 +0,0 @@
|
||||
//
|
||||
// Environment_WIN32.cpp
|
||||
//
|
||||
// Library: Foundation
|
||||
// Package: Core
|
||||
// Module: Environment
|
||||
//
|
||||
// Copyright (c) 2004-2006, Applied Informatics Software Engineering GmbH.
|
||||
// and Contributors.
|
||||
//
|
||||
// SPDX-License-Identifier: BSL-1.0
|
||||
//
|
||||
|
||||
|
||||
#include "Poco/Environment_WIN32.h"
|
||||
#include "Poco/Exception.h"
|
||||
#include <sstream>
|
||||
#include <cstring>
|
||||
#include "Poco/UnWindows.h"
|
||||
#include <winsock2.h>
|
||||
#include <wincrypt.h>
|
||||
#include <ws2ipdef.h>
|
||||
#include <iphlpapi.h>
|
||||
|
||||
|
||||
namespace Poco {
|
||||
|
||||
|
||||
std::string EnvironmentImpl::getImpl(const std::string& name)
|
||||
{
|
||||
DWORD len = GetEnvironmentVariableA(name.c_str(), 0, 0);
|
||||
if (len == 0) throw NotFoundException(name);
|
||||
char* buffer = new char[len];
|
||||
GetEnvironmentVariableA(name.c_str(), buffer, len);
|
||||
std::string result(buffer);
|
||||
delete [] buffer;
|
||||
return result;
|
||||
}
|
||||
|
||||
|
||||
bool EnvironmentImpl::hasImpl(const std::string& name)
|
||||
{
|
||||
DWORD len = GetEnvironmentVariableA(name.c_str(), 0, 0);
|
||||
return len > 0;
|
||||
}
|
||||
|
||||
|
||||
void EnvironmentImpl::setImpl(const std::string& name, const std::string& value)
|
||||
{
|
||||
if (SetEnvironmentVariableA(name.c_str(), value.c_str()) == 0)
|
||||
{
|
||||
std::string msg = "cannot set environment variable: ";
|
||||
msg.append(name);
|
||||
throw SystemException(msg);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
std::string EnvironmentImpl::osNameImpl()
|
||||
{
|
||||
OSVERSIONINFO vi;
|
||||
vi.dwOSVersionInfoSize = sizeof(vi);
|
||||
if (GetVersionEx(&vi) == 0) throw SystemException("Cannot get OS version information");
|
||||
switch (vi.dwPlatformId)
|
||||
{
|
||||
case VER_PLATFORM_WIN32s:
|
||||
return "Windows 3.x";
|
||||
case VER_PLATFORM_WIN32_WINDOWS:
|
||||
return vi.dwMinorVersion == 0 ? "Windows 95" : "Windows 98";
|
||||
case VER_PLATFORM_WIN32_NT:
|
||||
return "Windows NT";
|
||||
default:
|
||||
return "Unknown";
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
std::string EnvironmentImpl::osDisplayNameImpl()
|
||||
{
|
||||
OSVERSIONINFOEX vi; // OSVERSIONINFOEX is supported starting at Windows 2000
|
||||
vi.dwOSVersionInfoSize = sizeof(vi);
|
||||
if (GetVersionEx((OSVERSIONINFO*) &vi) == 0) throw SystemException("Cannot get OS version information");
|
||||
switch (vi.dwMajorVersion)
|
||||
{
|
||||
case 10:
|
||||
switch (vi.dwMinorVersion)
|
||||
{
|
||||
case 0:
|
||||
return vi.wProductType == VER_NT_WORKSTATION ? "Windows 10" : "Windows Server 2016";
|
||||
}
|
||||
case 6:
|
||||
switch (vi.dwMinorVersion)
|
||||
{
|
||||
case 0:
|
||||
return vi.wProductType == VER_NT_WORKSTATION ? "Windows Vista" : "Windows Server 2008";
|
||||
case 1:
|
||||
return vi.wProductType == VER_NT_WORKSTATION ? "Windows 7" : "Windows Server 2008 R2";
|
||||
case 2:
|
||||
return vi.wProductType == VER_NT_WORKSTATION ? "Windows 8" : "Windows Server 2012";
|
||||
case 3:
|
||||
return vi.wProductType == VER_NT_WORKSTATION ? "Windows 8.1" : "Windows Server 2012 R2";
|
||||
default:
|
||||
return "Unknown";
|
||||
}
|
||||
case 5:
|
||||
switch (vi.dwMinorVersion)
|
||||
{
|
||||
case 0:
|
||||
return "Windows 2000";
|
||||
case 1:
|
||||
return "Windows XP";
|
||||
case 2:
|
||||
return "Windows Server 2003/Windows Server 2003 R2";
|
||||
default:
|
||||
return "Unknown";
|
||||
}
|
||||
default:
|
||||
return "Unknown";
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
std::string EnvironmentImpl::osVersionImpl()
|
||||
{
|
||||
OSVERSIONINFO vi;
|
||||
vi.dwOSVersionInfoSize = sizeof(vi);
|
||||
if (GetVersionEx(&vi) == 0) throw SystemException("Cannot get OS version information");
|
||||
std::ostringstream str;
|
||||
str << vi.dwMajorVersion << "." << vi.dwMinorVersion << " (Build " << (vi.dwBuildNumber & 0xFFFF);
|
||||
if (vi.szCSDVersion[0]) str << ": " << vi.szCSDVersion;
|
||||
str << ")";
|
||||
return str.str();
|
||||
}
|
||||
|
||||
|
||||
std::string EnvironmentImpl::osArchitectureImpl()
|
||||
{
|
||||
SYSTEM_INFO si;
|
||||
GetSystemInfo(&si);
|
||||
switch (si.wProcessorArchitecture)
|
||||
{
|
||||
case PROCESSOR_ARCHITECTURE_INTEL:
|
||||
return "IA32";
|
||||
case PROCESSOR_ARCHITECTURE_MIPS:
|
||||
return "MIPS";
|
||||
case PROCESSOR_ARCHITECTURE_ALPHA:
|
||||
return "ALPHA";
|
||||
case PROCESSOR_ARCHITECTURE_PPC:
|
||||
return "PPC";
|
||||
case PROCESSOR_ARCHITECTURE_IA64:
|
||||
return "IA64";
|
||||
#ifdef PROCESSOR_ARCHITECTURE_IA32_ON_WIN64
|
||||
case PROCESSOR_ARCHITECTURE_IA32_ON_WIN64:
|
||||
return "IA64/32";
|
||||
#endif
|
||||
#ifdef PROCESSOR_ARCHITECTURE_AMD64
|
||||
case PROCESSOR_ARCHITECTURE_AMD64:
|
||||
return "AMD64";
|
||||
#endif
|
||||
default:
|
||||
return "Unknown";
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
std::string EnvironmentImpl::nodeNameImpl()
|
||||
{
|
||||
char name[MAX_COMPUTERNAME_LENGTH + 1];
|
||||
DWORD size = sizeof(name);
|
||||
if (GetComputerNameA(name, &size) == 0) throw SystemException("Cannot get computer name");
|
||||
return std::string(name);
|
||||
}
|
||||
|
||||
|
||||
void EnvironmentImpl::nodeIdImpl(NodeId& id)
|
||||
{
|
||||
std::memset(&id, 0, sizeof(id));
|
||||
|
||||
PIP_ADAPTER_INFO pAdapterInfo;
|
||||
PIP_ADAPTER_INFO pAdapter = 0;
|
||||
ULONG len = sizeof(IP_ADAPTER_INFO);
|
||||
pAdapterInfo = reinterpret_cast<IP_ADAPTER_INFO*>(new char[len]);
|
||||
// Make an initial call to GetAdaptersInfo to get
|
||||
// the necessary size into len
|
||||
DWORD rc = GetAdaptersInfo(pAdapterInfo, &len);
|
||||
if (rc == ERROR_BUFFER_OVERFLOW)
|
||||
{
|
||||
delete [] reinterpret_cast<char*>(pAdapterInfo);
|
||||
pAdapterInfo = reinterpret_cast<IP_ADAPTER_INFO*>(new char[len]);
|
||||
}
|
||||
else if (rc != ERROR_SUCCESS)
|
||||
{
|
||||
return;
|
||||
}
|
||||
if (GetAdaptersInfo(pAdapterInfo, &len) == NO_ERROR)
|
||||
{
|
||||
pAdapter = pAdapterInfo;
|
||||
bool found = false;
|
||||
while (pAdapter && !found)
|
||||
{
|
||||
if (pAdapter->Type == MIB_IF_TYPE_ETHERNET && pAdapter->AddressLength == sizeof(id))
|
||||
{
|
||||
found = true;
|
||||
std::memcpy(&id, pAdapter->Address, pAdapter->AddressLength);
|
||||
}
|
||||
pAdapter = pAdapter->Next;
|
||||
}
|
||||
}
|
||||
delete [] reinterpret_cast<char*>(pAdapterInfo);
|
||||
}
|
||||
|
||||
|
||||
unsigned EnvironmentImpl::processorCountImpl()
|
||||
{
|
||||
SYSTEM_INFO si;
|
||||
GetSystemInfo(&si);
|
||||
return si.dwNumberOfProcessors;
|
||||
}
|
||||
|
||||
|
||||
} // namespace Poco
|
@ -1,471 +0,0 @@
|
||||
//
|
||||
// File_WIN32.cpp
|
||||
//
|
||||
// Library: Foundation
|
||||
// Package: Filesystem
|
||||
// Module: File
|
||||
//
|
||||
// Copyright (c) 2004-2006, Applied Informatics Software Engineering GmbH.
|
||||
// and Contributors.
|
||||
//
|
||||
// SPDX-License-Identifier: BSL-1.0
|
||||
//
|
||||
|
||||
|
||||
#include "Poco/File_WIN32.h"
|
||||
#include "Poco/Exception.h"
|
||||
#include "Poco/String.h"
|
||||
#include "Poco/UnWindows.h"
|
||||
|
||||
|
||||
namespace Poco {
|
||||
|
||||
|
||||
class FileHandle
|
||||
{
|
||||
public:
|
||||
FileHandle(const std::string& path, DWORD access, DWORD share, DWORD disp)
|
||||
{
|
||||
_h = CreateFileA(path.c_str(), access, share, 0, disp, 0, 0);
|
||||
if (_h == INVALID_HANDLE_VALUE)
|
||||
{
|
||||
FileImpl::handleLastErrorImpl(path);
|
||||
}
|
||||
}
|
||||
|
||||
~FileHandle()
|
||||
{
|
||||
if (_h != INVALID_HANDLE_VALUE) CloseHandle(_h);
|
||||
}
|
||||
|
||||
HANDLE get() const
|
||||
{
|
||||
return _h;
|
||||
}
|
||||
|
||||
private:
|
||||
HANDLE _h;
|
||||
};
|
||||
|
||||
|
||||
FileImpl::FileImpl()
|
||||
{
|
||||
}
|
||||
|
||||
|
||||
FileImpl::FileImpl(const std::string& path): _path(path)
|
||||
{
|
||||
std::string::size_type n = _path.size();
|
||||
if (n > 1 && (_path[n - 1] == '\\' || _path[n - 1] == '/') && !((n == 3 && _path[1]==':')))
|
||||
{
|
||||
_path.resize(n - 1);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
FileImpl::~FileImpl()
|
||||
{
|
||||
}
|
||||
|
||||
|
||||
void FileImpl::swapImpl(FileImpl& file)
|
||||
{
|
||||
std::swap(_path, file._path);
|
||||
}
|
||||
|
||||
|
||||
void FileImpl::setPathImpl(const std::string& path)
|
||||
{
|
||||
_path = path;
|
||||
std::string::size_type n = _path.size();
|
||||
if (n > 1 && (_path[n - 1] == '\\' || _path[n - 1] == '/') && !((n == 3 && _path[1]==':')))
|
||||
{
|
||||
_path.resize(n - 1);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
bool FileImpl::existsImpl() const
|
||||
{
|
||||
poco_assert (!_path.empty());
|
||||
|
||||
DWORD attr = GetFileAttributes(_path.c_str());
|
||||
if (attr == INVALID_FILE_ATTRIBUTES)
|
||||
{
|
||||
switch (GetLastError())
|
||||
{
|
||||
case ERROR_FILE_NOT_FOUND:
|
||||
case ERROR_PATH_NOT_FOUND:
|
||||
case ERROR_NOT_READY:
|
||||
case ERROR_INVALID_DRIVE:
|
||||
return false;
|
||||
default:
|
||||
handleLastErrorImpl(_path);
|
||||
}
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
|
||||
bool FileImpl::canReadImpl() const
|
||||
{
|
||||
poco_assert (!_path.empty());
|
||||
|
||||
DWORD attr = GetFileAttributes(_path.c_str());
|
||||
if (attr == INVALID_FILE_ATTRIBUTES)
|
||||
{
|
||||
switch (GetLastError())
|
||||
{
|
||||
case ERROR_ACCESS_DENIED:
|
||||
return false;
|
||||
default:
|
||||
handleLastErrorImpl(_path);
|
||||
}
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
|
||||
bool FileImpl::canWriteImpl() const
|
||||
{
|
||||
poco_assert (!_path.empty());
|
||||
|
||||
DWORD attr = GetFileAttributes(_path.c_str());
|
||||
if (attr == INVALID_FILE_ATTRIBUTES)
|
||||
handleLastErrorImpl(_path);
|
||||
return (attr & FILE_ATTRIBUTE_READONLY) == 0;
|
||||
}
|
||||
|
||||
|
||||
bool FileImpl::canExecuteImpl() const
|
||||
{
|
||||
Path p(_path);
|
||||
return icompare(p.getExtension(), "exe") == 0;
|
||||
}
|
||||
|
||||
|
||||
bool FileImpl::isFileImpl() const
|
||||
{
|
||||
return !isDirectoryImpl() && !isDeviceImpl();
|
||||
}
|
||||
|
||||
|
||||
bool FileImpl::isDirectoryImpl() const
|
||||
{
|
||||
poco_assert (!_path.empty());
|
||||
|
||||
DWORD attr = GetFileAttributes(_path.c_str());
|
||||
if (attr == INVALID_FILE_ATTRIBUTES)
|
||||
handleLastErrorImpl(_path);
|
||||
return (attr & FILE_ATTRIBUTE_DIRECTORY) != 0;
|
||||
}
|
||||
|
||||
|
||||
bool FileImpl::isLinkImpl() const
|
||||
{
|
||||
poco_assert (!_path.empty());
|
||||
|
||||
DWORD attr = GetFileAttributes(_path.c_str());
|
||||
if (attr == INVALID_FILE_ATTRIBUTES)
|
||||
handleLastErrorImpl(_path);
|
||||
return (attr & FILE_ATTRIBUTE_DIRECTORY) == 0 && (attr & FILE_ATTRIBUTE_REPARSE_POINT) != 0;
|
||||
}
|
||||
|
||||
|
||||
|
||||
bool FileImpl::isDeviceImpl() const
|
||||
{
|
||||
return
|
||||
_path.compare(0, 4, "\\\\.\\") == 0 ||
|
||||
icompare(_path, "CON") == 0 ||
|
||||
icompare(_path, "PRN") == 0 ||
|
||||
icompare(_path, "AUX") == 0 ||
|
||||
icompare(_path, "NUL") == 0 ||
|
||||
( (icompare(_path, 0, 3, "LPT") == 0 || icompare(_path, 0, 3, "COM") == 0) &&
|
||||
_path.size() == 4 &&
|
||||
_path[3] > 0x30 &&
|
||||
isdigit(_path[3])
|
||||
);
|
||||
}
|
||||
|
||||
|
||||
bool FileImpl::isHiddenImpl() const
|
||||
{
|
||||
poco_assert (!_path.empty());
|
||||
|
||||
DWORD attr = GetFileAttributes(_path.c_str());
|
||||
if (attr == INVALID_FILE_ATTRIBUTES)
|
||||
handleLastErrorImpl(_path);
|
||||
return (attr & FILE_ATTRIBUTE_HIDDEN) != 0;
|
||||
}
|
||||
|
||||
|
||||
Timestamp FileImpl::createdImpl() const
|
||||
{
|
||||
poco_assert (!_path.empty());
|
||||
|
||||
WIN32_FILE_ATTRIBUTE_DATA fad;
|
||||
if (GetFileAttributesEx(_path.c_str(), GetFileExInfoStandard, &fad) == 0)
|
||||
handleLastErrorImpl(_path);
|
||||
return Timestamp::fromFileTimeNP(fad.ftCreationTime.dwLowDateTime, fad.ftCreationTime.dwHighDateTime);
|
||||
}
|
||||
|
||||
|
||||
Timestamp FileImpl::getLastModifiedImpl() const
|
||||
{
|
||||
poco_assert (!_path.empty());
|
||||
|
||||
WIN32_FILE_ATTRIBUTE_DATA fad;
|
||||
if (GetFileAttributesEx(_path.c_str(), GetFileExInfoStandard, &fad) == 0)
|
||||
handleLastErrorImpl(_path);
|
||||
return Timestamp::fromFileTimeNP(fad.ftLastWriteTime.dwLowDateTime, fad.ftLastWriteTime.dwHighDateTime);
|
||||
}
|
||||
|
||||
|
||||
void FileImpl::setLastModifiedImpl(const Timestamp& ts)
|
||||
{
|
||||
poco_assert (!_path.empty());
|
||||
|
||||
UInt32 low;
|
||||
UInt32 high;
|
||||
ts.toFileTimeNP(low, high);
|
||||
FILETIME ft;
|
||||
ft.dwLowDateTime = low;
|
||||
ft.dwHighDateTime = high;
|
||||
FileHandle fh(_path, FILE_WRITE_ATTRIBUTES, FILE_SHARE_READ | FILE_SHARE_WRITE, OPEN_EXISTING);
|
||||
if (SetFileTime(fh.get(), 0, &ft, &ft) == 0)
|
||||
handleLastErrorImpl(_path);
|
||||
}
|
||||
|
||||
|
||||
FileImpl::FileSizeImpl FileImpl::getSizeImpl() const
|
||||
{
|
||||
poco_assert (!_path.empty());
|
||||
|
||||
WIN32_FILE_ATTRIBUTE_DATA fad;
|
||||
if (GetFileAttributesEx(_path.c_str(), GetFileExInfoStandard, &fad) == 0)
|
||||
handleLastErrorImpl(_path);
|
||||
LARGE_INTEGER li;
|
||||
li.LowPart = fad.nFileSizeLow;
|
||||
li.HighPart = fad.nFileSizeHigh;
|
||||
return li.QuadPart;
|
||||
}
|
||||
|
||||
|
||||
void FileImpl::setSizeImpl(FileSizeImpl size)
|
||||
{
|
||||
poco_assert (!_path.empty());
|
||||
|
||||
FileHandle fh(_path, GENERIC_WRITE, FILE_SHARE_READ | FILE_SHARE_WRITE, OPEN_EXISTING);
|
||||
LARGE_INTEGER li;
|
||||
li.QuadPart = size;
|
||||
if (SetFilePointer(fh.get(), li.LowPart, &li.HighPart, FILE_BEGIN) == INVALID_SET_FILE_POINTER)
|
||||
handleLastErrorImpl(_path);
|
||||
if (SetEndOfFile(fh.get()) == 0)
|
||||
handleLastErrorImpl(_path);
|
||||
}
|
||||
|
||||
|
||||
void FileImpl::setWriteableImpl(bool flag)
|
||||
{
|
||||
poco_assert (!_path.empty());
|
||||
|
||||
DWORD attr = GetFileAttributes(_path.c_str());
|
||||
if (attr == -1)
|
||||
handleLastErrorImpl(_path);
|
||||
if (flag)
|
||||
attr &= ~FILE_ATTRIBUTE_READONLY;
|
||||
else
|
||||
attr |= FILE_ATTRIBUTE_READONLY;
|
||||
if (SetFileAttributes(_path.c_str(), attr) == 0)
|
||||
handleLastErrorImpl(_path);
|
||||
}
|
||||
|
||||
|
||||
void FileImpl::setExecutableImpl(bool flag)
|
||||
{
|
||||
// not supported
|
||||
}
|
||||
|
||||
|
||||
void FileImpl::copyToImpl(const std::string& path, int options) const
|
||||
{
|
||||
poco_assert (!_path.empty());
|
||||
|
||||
if (CopyFileA(_path.c_str(), path.c_str(), (options & OPT_FAIL_ON_OVERWRITE_IMPL) != 0) == 0)
|
||||
handleLastErrorImpl(_path);
|
||||
}
|
||||
|
||||
|
||||
void FileImpl::renameToImpl(const std::string& path, int options)
|
||||
{
|
||||
poco_assert (!_path.empty());
|
||||
|
||||
if (options & OPT_FAIL_ON_OVERWRITE_IMPL) {
|
||||
if (MoveFileExA(_path.c_str(), path.c_str(), NULL) == 0)
|
||||
handleLastErrorImpl(_path);
|
||||
} else {
|
||||
if (MoveFileExA(_path.c_str(), path.c_str(), MOVEFILE_REPLACE_EXISTING) == 0)
|
||||
handleLastErrorImpl(_path);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
void FileImpl::linkToImpl(const std::string& path, int type) const
|
||||
{
|
||||
poco_assert (!_path.empty());
|
||||
|
||||
if (type == 0)
|
||||
{
|
||||
if (CreateHardLinkA(path.c_str(), _path.c_str(), NULL) == 0)
|
||||
handleLastErrorImpl(_path);
|
||||
}
|
||||
else
|
||||
{
|
||||
#if _WIN32_WINNT >= 0x0600 && defined(SYMBOLIC_LINK_FLAG_DIRECTORY)
|
||||
DWORD flags = 0;
|
||||
if (isDirectoryImpl()) flags |= SYMBOLIC_LINK_FLAG_DIRECTORY;
|
||||
#ifdef SYMBOLIC_LINK_FLAG_ALLOW_UNPRIVILEGED_CREATE
|
||||
flags |= SYMBOLIC_LINK_FLAG_ALLOW_UNPRIVILEGED_CREATE;
|
||||
#endif
|
||||
if (CreateSymbolicLinkA(path.c_str(), _path.c_str(), flags) == 0)
|
||||
handleLastErrorImpl(_path);
|
||||
#else
|
||||
throw Poco::NotImplementedException("Symbolic link support not available in used version of the Windows SDK")
|
||||
#endif
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
void FileImpl::removeImpl()
|
||||
{
|
||||
poco_assert (!_path.empty());
|
||||
|
||||
if (isDirectoryImpl())
|
||||
{
|
||||
if (RemoveDirectoryA(_path.c_str()) == 0)
|
||||
handleLastErrorImpl(_path);
|
||||
}
|
||||
else
|
||||
{
|
||||
if (DeleteFileA(_path.c_str()) == 0)
|
||||
handleLastErrorImpl(_path);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
bool FileImpl::createFileImpl()
|
||||
{
|
||||
poco_assert (!_path.empty());
|
||||
|
||||
HANDLE hFile = CreateFileA(_path.c_str(), GENERIC_WRITE, 0, 0, CREATE_NEW, 0, 0);
|
||||
if (hFile != INVALID_HANDLE_VALUE)
|
||||
{
|
||||
CloseHandle(hFile);
|
||||
return true;
|
||||
}
|
||||
else if (GetLastError() == ERROR_FILE_EXISTS)
|
||||
return false;
|
||||
else
|
||||
handleLastErrorImpl(_path);
|
||||
return false;
|
||||
}
|
||||
|
||||
|
||||
bool FileImpl::createDirectoryImpl()
|
||||
{
|
||||
poco_assert (!_path.empty());
|
||||
|
||||
if (existsImpl() && isDirectoryImpl())
|
||||
return false;
|
||||
if (CreateDirectoryA(_path.c_str(), 0) == 0)
|
||||
handleLastErrorImpl(_path);
|
||||
return true;
|
||||
}
|
||||
|
||||
|
||||
FileImpl::FileSizeImpl FileImpl::totalSpaceImpl() const
|
||||
{
|
||||
poco_assert(!_path.empty());
|
||||
|
||||
ULARGE_INTEGER space;
|
||||
if (!GetDiskFreeSpaceExA(_path.c_str(), NULL, &space, NULL))
|
||||
handleLastErrorImpl(_path);
|
||||
return space.QuadPart;
|
||||
}
|
||||
|
||||
|
||||
FileImpl::FileSizeImpl FileImpl::usableSpaceImpl() const
|
||||
{
|
||||
poco_assert(!_path.empty());
|
||||
|
||||
ULARGE_INTEGER space;
|
||||
if (!GetDiskFreeSpaceExA(upath.c_str(), &space, NULL, NULL))
|
||||
handleLastErrorImpl(_path);
|
||||
return space.QuadPart;
|
||||
}
|
||||
|
||||
|
||||
FileImpl::FileSizeImpl FileImpl::freeSpaceImpl() const
|
||||
{
|
||||
poco_assert(!_path.empty());
|
||||
|
||||
ULARGE_INTEGER space;
|
||||
if (!GetDiskFreeSpaceExA(_path.c_str(), NULL, NULL, &space))
|
||||
handleLastErrorImpl(_path);
|
||||
return space.QuadPart;
|
||||
}
|
||||
|
||||
|
||||
void FileImpl::handleLastErrorImpl(const std::string& path)
|
||||
{
|
||||
DWORD err = GetLastError();
|
||||
switch (err)
|
||||
{
|
||||
case ERROR_FILE_NOT_FOUND:
|
||||
throw FileNotFoundException(path, err);
|
||||
case ERROR_PATH_NOT_FOUND:
|
||||
case ERROR_BAD_NETPATH:
|
||||
case ERROR_CANT_RESOLVE_FILENAME:
|
||||
case ERROR_INVALID_DRIVE:
|
||||
throw PathNotFoundException(path, err);
|
||||
case ERROR_ACCESS_DENIED:
|
||||
throw FileAccessDeniedException(path, err);
|
||||
case ERROR_ALREADY_EXISTS:
|
||||
case ERROR_FILE_EXISTS:
|
||||
throw FileExistsException(path, err);
|
||||
case ERROR_INVALID_NAME:
|
||||
case ERROR_DIRECTORY:
|
||||
case ERROR_FILENAME_EXCED_RANGE:
|
||||
case ERROR_BAD_PATHNAME:
|
||||
throw PathSyntaxException(path, err);
|
||||
case ERROR_FILE_READ_ONLY:
|
||||
throw FileReadOnlyException(path, err);
|
||||
case ERROR_CANNOT_MAKE:
|
||||
throw CreateFileException(path, err);
|
||||
case ERROR_DIR_NOT_EMPTY:
|
||||
throw DirectoryNotEmptyException(path, err);
|
||||
case ERROR_WRITE_FAULT:
|
||||
throw WriteFileException(path, err);
|
||||
case ERROR_READ_FAULT:
|
||||
throw ReadFileException(path, err);
|
||||
case ERROR_SHARING_VIOLATION:
|
||||
throw FileException("sharing violation", path, err);
|
||||
case ERROR_LOCK_VIOLATION:
|
||||
throw FileException("lock violation", path, err);
|
||||
case ERROR_HANDLE_EOF:
|
||||
throw ReadFileException("EOF reached", path, err);
|
||||
case ERROR_HANDLE_DISK_FULL:
|
||||
case ERROR_DISK_FULL:
|
||||
throw WriteFileException("disk is full", path, err);
|
||||
case ERROR_NEGATIVE_SEEK:
|
||||
throw FileException("negative seek", path, err);
|
||||
default:
|
||||
throw FileException(path, err);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
} // namespace Poco
|
@ -1,111 +0,0 @@
|
||||
//
|
||||
// LogFile_WIN32.cpp
|
||||
//
|
||||
// Library: Foundation
|
||||
// Package: Logging
|
||||
// Module: LogFile
|
||||
//
|
||||
// Copyright (c) 2004-2006, Applied Informatics Software Engineering GmbH.
|
||||
// and Contributors.
|
||||
//
|
||||
// SPDX-License-Identifier: BSL-1.0
|
||||
//
|
||||
|
||||
|
||||
#include "Poco/LogFile_WIN32.h"
|
||||
#include "Poco/File.h"
|
||||
#include "Poco/Exception.h"
|
||||
|
||||
|
||||
namespace Poco {
|
||||
|
||||
|
||||
LogFileImpl::LogFileImpl(const std::string& path): _path(path), _hFile(INVALID_HANDLE_VALUE)
|
||||
{
|
||||
File file(path);
|
||||
if (file.exists())
|
||||
{
|
||||
if (0 == sizeImpl())
|
||||
_creationDate = file.getLastModified();
|
||||
else
|
||||
_creationDate = file.created();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
LogFileImpl::~LogFileImpl()
|
||||
{
|
||||
CloseHandle(_hFile);
|
||||
}
|
||||
|
||||
|
||||
void LogFileImpl::writeImpl(const std::string& text, bool flush)
|
||||
{
|
||||
if (INVALID_HANDLE_VALUE == _hFile) createFile();
|
||||
|
||||
DWORD bytesWritten;
|
||||
BOOL res = WriteFile(_hFile, text.data(), (DWORD) text.size(), &bytesWritten, NULL);
|
||||
if (!res) throw WriteFileException(_path);
|
||||
res = WriteFile(_hFile, "\r\n", 2, &bytesWritten, NULL);
|
||||
if (!res) throw WriteFileException(_path);
|
||||
if (flush)
|
||||
{
|
||||
res = FlushFileBuffers(_hFile);
|
||||
if (!res) throw WriteFileException(_path);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
UInt64 LogFileImpl::sizeImpl() const
|
||||
{
|
||||
if (INVALID_HANDLE_VALUE == _hFile)
|
||||
{
|
||||
File file(_path);
|
||||
if (file.exists()) return file.getSize();
|
||||
else return 0;
|
||||
}
|
||||
|
||||
LARGE_INTEGER li;
|
||||
li.HighPart = 0;
|
||||
li.LowPart = SetFilePointer(_hFile, 0, &li.HighPart, FILE_CURRENT);
|
||||
return li.QuadPart;
|
||||
}
|
||||
|
||||
|
||||
Timestamp LogFileImpl::creationDateImpl() const
|
||||
{
|
||||
return _creationDate;
|
||||
}
|
||||
|
||||
|
||||
const std::string& LogFileImpl::pathImpl() const
|
||||
{
|
||||
return _path;
|
||||
}
|
||||
|
||||
|
||||
void LogFileImpl::createFile()
|
||||
{
|
||||
_hFile = CreateFileA(_path.c_str(), GENERIC_WRITE, FILE_SHARE_READ, NULL, OPEN_ALWAYS, FILE_ATTRIBUTE_NORMAL, NULL);
|
||||
if (_hFile == INVALID_HANDLE_VALUE) throw OpenFileException(_path);
|
||||
SetFilePointer(_hFile, 0, 0, FILE_END);
|
||||
// There seems to be a strange "optimization" in the Windows NTFS
|
||||
// filesystem that causes it to reuse directory entries of deleted
|
||||
// files. Example:
|
||||
// 1. create a file named "test.dat"
|
||||
// note the file's creation date
|
||||
// 2. delete the file "test.dat"
|
||||
// 3. wait a few seconds
|
||||
// 4. create a file named "test.dat"
|
||||
// the new file will have the same creation
|
||||
// date as the old one.
|
||||
// We work around this bug by taking the file's
|
||||
// modification date as a reference when the
|
||||
// file is empty.
|
||||
if (sizeImpl() == 0)
|
||||
_creationDate = File(_path).getLastModified();
|
||||
else
|
||||
_creationDate = File(_path).created();
|
||||
}
|
||||
|
||||
} // namespace Poco
|
@ -23,10 +23,11 @@ namespace Poco {
|
||||
//
|
||||
|
||||
|
||||
LogStreamBuf::LogStreamBuf(Logger& logger, Message::Priority priority):
|
||||
LogStreamBuf::LogStreamBuf(Logger& logger, Message::Priority priority, std::size_t bufferCapacity):
|
||||
_logger(logger),
|
||||
_priority(priority)
|
||||
{
|
||||
_message.reserve(bufferCapacity);
|
||||
}
|
||||
|
||||
|
||||
@ -41,6 +42,12 @@ void LogStreamBuf::setPriority(Message::Priority priority)
|
||||
}
|
||||
|
||||
|
||||
void LogStreamBuf::reserve(std::size_t capacity)
|
||||
{
|
||||
_message.reserve(capacity);
|
||||
}
|
||||
|
||||
|
||||
int LogStreamBuf::writeToDevice(char c)
|
||||
{
|
||||
if (c == '\n' || c == '\r')
|
||||
@ -62,8 +69,8 @@ int LogStreamBuf::writeToDevice(char c)
|
||||
//
|
||||
|
||||
|
||||
LogIOS::LogIOS(Logger& logger, Message::Priority priority):
|
||||
_buf(logger, priority)
|
||||
LogIOS::LogIOS(Logger& logger, Message::Priority priority, std::size_t bufferCapacity):
|
||||
_buf(logger, priority, bufferCapacity)
|
||||
{
|
||||
poco_ios_init(&_buf);
|
||||
}
|
||||
@ -85,25 +92,25 @@ LogStreamBuf* LogIOS::rdbuf()
|
||||
//
|
||||
|
||||
|
||||
LogStream::LogStream(Logger& logger, Message::Priority priority):
|
||||
LogIOS(logger, priority),
|
||||
LogStream::LogStream(Logger& logger, Message::Priority priority, std::size_t bufferCapacity):
|
||||
LogIOS(logger, priority, bufferCapacity),
|
||||
std::ostream(&_buf)
|
||||
{
|
||||
}
|
||||
|
||||
|
||||
LogStream::LogStream(const std::string& loggerName, Message::Priority priority):
|
||||
LogIOS(Logger::get(loggerName), priority),
|
||||
LogStream::LogStream(const std::string& loggerName, Message::Priority priority, std::size_t bufferCapacity):
|
||||
LogIOS(Logger::get(loggerName), priority, bufferCapacity),
|
||||
std::ostream(&_buf)
|
||||
{
|
||||
}
|
||||
|
||||
|
||||
|
||||
LogStream::~LogStream()
|
||||
{
|
||||
}
|
||||
|
||||
|
||||
|
||||
LogStream& LogStream::fatal()
|
||||
{
|
||||
return priority(Message::PRIO_FATAL);
|
||||
@ -116,7 +123,7 @@ LogStream& LogStream::fatal(const std::string& message)
|
||||
return priority(Message::PRIO_FATAL);
|
||||
}
|
||||
|
||||
|
||||
|
||||
LogStream& LogStream::critical()
|
||||
{
|
||||
return priority(Message::PRIO_CRITICAL);
|
||||
|
@ -1,61 +0,0 @@
|
||||
//
|
||||
// NamedEvent_WIN32.cpp
|
||||
//
|
||||
// Library: Foundation
|
||||
// Package: Processes
|
||||
// Module: NamedEvent
|
||||
//
|
||||
// Copyright (c) 2004-2006, Applied Informatics Software Engineering GmbH.
|
||||
// and Contributors.
|
||||
//
|
||||
// SPDX-License-Identifier: BSL-1.0
|
||||
//
|
||||
|
||||
|
||||
#include "Poco/NamedEvent_WIN32.h"
|
||||
#include "Poco/Error.h"
|
||||
#include "Poco/Exception.h"
|
||||
#include "Poco/Format.h"
|
||||
|
||||
|
||||
namespace Poco {
|
||||
|
||||
|
||||
NamedEventImpl::NamedEventImpl(const std::string& name):
|
||||
_name(name)
|
||||
{
|
||||
_event = CreateEventA(NULL, FALSE, FALSE, _name.c_str());
|
||||
if (!_event)
|
||||
{
|
||||
DWORD dwRetVal = GetLastError();
|
||||
throw SystemException(format("cannot create named event %s [Error %d: %s]", _name, (int)dwRetVal, Error::getMessage(dwRetVal)));
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
NamedEventImpl::~NamedEventImpl()
|
||||
{
|
||||
CloseHandle(_event);
|
||||
}
|
||||
|
||||
|
||||
void NamedEventImpl::setImpl()
|
||||
{
|
||||
if (!SetEvent(_event))
|
||||
throw SystemException("cannot signal named event", _name);
|
||||
}
|
||||
|
||||
|
||||
void NamedEventImpl::waitImpl()
|
||||
{
|
||||
switch (WaitForSingleObject(_event, INFINITE))
|
||||
{
|
||||
case WAIT_OBJECT_0:
|
||||
return;
|
||||
default:
|
||||
throw SystemException("wait for named event failed", _name);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
} // namespace Poco
|
@ -1,73 +0,0 @@
|
||||
//
|
||||
// NamedMutex_WIN32.cpp
|
||||
//
|
||||
// Library: Foundation
|
||||
// Package: Processes
|
||||
// Module: NamedMutex
|
||||
//
|
||||
// Copyright (c) 2004-2006, Applied Informatics Software Engineering GmbH.
|
||||
// and Contributors.
|
||||
//
|
||||
// SPDX-License-Identifier: BSL-1.0
|
||||
//
|
||||
|
||||
|
||||
#include "Poco/NamedMutex_WIN32.h"
|
||||
#include "Poco/Exception.h"
|
||||
|
||||
|
||||
namespace Poco {
|
||||
|
||||
|
||||
NamedMutexImpl::NamedMutexImpl(const std::string& name):
|
||||
_name(name)
|
||||
{
|
||||
_mutex = CreateMutexA(NULL, FALSE, _name.c_str());
|
||||
if (!_mutex)
|
||||
throw SystemException("cannot create named mutex", _name);
|
||||
}
|
||||
|
||||
|
||||
NamedMutexImpl::~NamedMutexImpl()
|
||||
{
|
||||
CloseHandle(_mutex);
|
||||
}
|
||||
|
||||
|
||||
void NamedMutexImpl::lockImpl()
|
||||
{
|
||||
switch (WaitForSingleObject(_mutex, INFINITE))
|
||||
{
|
||||
case WAIT_OBJECT_0:
|
||||
return;
|
||||
case WAIT_ABANDONED:
|
||||
throw SystemException("cannot lock named mutex (abadoned)", _name);
|
||||
default:
|
||||
throw SystemException("cannot lock named mutex", _name);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
bool NamedMutexImpl::tryLockImpl()
|
||||
{
|
||||
switch (WaitForSingleObject(_mutex, 0))
|
||||
{
|
||||
case WAIT_OBJECT_0:
|
||||
return true;
|
||||
case WAIT_TIMEOUT:
|
||||
return false;
|
||||
case WAIT_ABANDONED:
|
||||
throw SystemException("cannot lock named mutex (abadoned)", _name);
|
||||
default:
|
||||
throw SystemException("cannot lock named mutex", _name);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
void NamedMutexImpl::unlockImpl()
|
||||
{
|
||||
ReleaseMutex(_mutex);
|
||||
}
|
||||
|
||||
|
||||
} // namespace Poco
|
@ -1,203 +0,0 @@
|
||||
//
|
||||
// Path_WIN32.cpp
|
||||
//
|
||||
// Library: Foundation
|
||||
// Package: Filesystem
|
||||
// Module: Path
|
||||
//
|
||||
// Copyright (c) 2004-2006, Applied Informatics Software Engineering GmbH.
|
||||
// and Contributors.
|
||||
//
|
||||
// SPDX-License-Identifier: BSL-1.0
|
||||
//
|
||||
|
||||
|
||||
#include "Poco/Path_WIN32.h"
|
||||
#include "Poco/Environment_WIN32.h"
|
||||
#include "Poco/UnWindows.h"
|
||||
|
||||
|
||||
namespace Poco {
|
||||
|
||||
|
||||
std::string PathImpl::currentImpl()
|
||||
{
|
||||
char buffer[MAX_PATH];
|
||||
DWORD n = GetCurrentDirectoryA(sizeof(buffer), buffer);
|
||||
if (n > 0 && n < sizeof(buffer))
|
||||
{
|
||||
std::string result(buffer, n);
|
||||
if (result[n - 1] != '\\')
|
||||
result.append("\\");
|
||||
return result;
|
||||
}
|
||||
else throw SystemException("Cannot get current directory");
|
||||
}
|
||||
|
||||
|
||||
std::string PathImpl::systemImpl()
|
||||
{
|
||||
char buffer[MAX_PATH];
|
||||
DWORD n = GetSystemDirectoryA(buffer, sizeof(buffer));
|
||||
if (n > 0 && n < sizeof(buffer))
|
||||
{
|
||||
std::string result(buffer, n);
|
||||
if (result[n - 1] != '\\')
|
||||
result.append("\\");
|
||||
return result;
|
||||
}
|
||||
else throw SystemException("Cannot get system directory");
|
||||
}
|
||||
|
||||
|
||||
std::string PathImpl::homeImpl()
|
||||
{
|
||||
std::string result;
|
||||
if (EnvironmentImpl::hasImpl("USERPROFILE"))
|
||||
{
|
||||
result = EnvironmentImpl::getImpl("USERPROFILE");
|
||||
}
|
||||
else if (EnvironmentImpl::hasImpl("HOMEDRIVE") && EnvironmentImpl::hasImpl("HOMEPATH"))
|
||||
{
|
||||
result = EnvironmentImpl::getImpl("HOMEDRIVE");
|
||||
result.append(EnvironmentImpl::getImpl("HOMEPATH"));
|
||||
}
|
||||
else
|
||||
{
|
||||
result = systemImpl();
|
||||
}
|
||||
|
||||
std::string::size_type n = result.size();
|
||||
if (n > 0 && result[n - 1] != '\\')
|
||||
result.append("\\");
|
||||
return result;
|
||||
}
|
||||
|
||||
|
||||
std::string PathImpl::configHomeImpl()
|
||||
{
|
||||
std::string result;
|
||||
|
||||
// if APPDATA environment variable not exist, return home directory instead
|
||||
try
|
||||
{
|
||||
result = EnvironmentImpl::getImpl("APPDATA");
|
||||
}
|
||||
catch (NotFoundException&)
|
||||
{
|
||||
result = homeImpl();
|
||||
}
|
||||
|
||||
std::string::size_type n = result.size();
|
||||
if (n > 0 && result[n - 1] != '\\')
|
||||
result.append("\\");
|
||||
return result;
|
||||
}
|
||||
|
||||
|
||||
std::string PathImpl::dataHomeImpl()
|
||||
{
|
||||
std::string result;
|
||||
|
||||
// if LOCALAPPDATA environment variable not exist, return config home instead
|
||||
try
|
||||
{
|
||||
result = EnvironmentImpl::getImpl("LOCALAPPDATA");
|
||||
}
|
||||
catch (NotFoundException&)
|
||||
{
|
||||
result = configHomeImpl();
|
||||
}
|
||||
|
||||
std::string::size_type n = result.size();
|
||||
if (n > 0 && result[n - 1] != '\\')
|
||||
result.append("\\");
|
||||
return result;
|
||||
}
|
||||
|
||||
|
||||
std::string PathImpl::cacheHomeImpl()
|
||||
{
|
||||
return tempImpl();
|
||||
}
|
||||
|
||||
|
||||
std::string PathImpl::tempHomeImpl()
|
||||
{
|
||||
return tempImpl();
|
||||
}
|
||||
|
||||
|
||||
std::string PathImpl::tempImpl()
|
||||
{
|
||||
char buffer[MAX_PATH];
|
||||
DWORD n = GetTempPathA(sizeof(buffer), buffer);
|
||||
if (n > 0 && n < sizeof(buffer))
|
||||
{
|
||||
n = GetLongPathNameA(buffer, buffer, static_cast<DWORD>(sizeof buffer));
|
||||
if (n <= 0) throw SystemException("Cannot get temporary directory long path name");
|
||||
std::string result(buffer, n);
|
||||
if (result[n - 1] != '\\')
|
||||
result.append("\\");
|
||||
return result;
|
||||
}
|
||||
else throw SystemException("Cannot get temporary directory");
|
||||
}
|
||||
|
||||
|
||||
std::string PathImpl::configImpl()
|
||||
{
|
||||
std::string result;
|
||||
|
||||
// if PROGRAMDATA environment variable not exist, return system directory instead
|
||||
try
|
||||
{
|
||||
result = EnvironmentImpl::getImpl("PROGRAMDATA");
|
||||
}
|
||||
catch (NotFoundException&)
|
||||
{
|
||||
result = systemImpl();
|
||||
}
|
||||
|
||||
std::string::size_type n = result.size();
|
||||
if (n > 0 && result[n - 1] != '\\')
|
||||
result.append("\\");
|
||||
return result;
|
||||
}
|
||||
|
||||
|
||||
std::string PathImpl::nullImpl()
|
||||
{
|
||||
return "NUL:";
|
||||
}
|
||||
|
||||
|
||||
std::string PathImpl::expandImpl(const std::string& path)
|
||||
{
|
||||
char buffer[MAX_PATH];
|
||||
DWORD n = ExpandEnvironmentStringsA(path.c_str(), buffer, sizeof(buffer));
|
||||
if (n > 0 && n < sizeof(buffer))
|
||||
return std::string(buffer, n - 1);
|
||||
else
|
||||
return path;
|
||||
}
|
||||
|
||||
|
||||
void PathImpl::listRootsImpl(std::vector<std::string>& roots)
|
||||
{
|
||||
roots.clear();
|
||||
char buffer[128];
|
||||
DWORD n = GetLogicalDriveStrings(sizeof(buffer) - 1, buffer);
|
||||
char* it = buffer;
|
||||
char* end = buffer + (n > sizeof(buffer) ? sizeof(buffer) : n);
|
||||
while (it < end)
|
||||
{
|
||||
std::string dev;
|
||||
while (it < end && *it) dev += *it++;
|
||||
roots.push_back(dev);
|
||||
++it;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
} // namespace Poco
|
@ -13,7 +13,7 @@
|
||||
|
||||
|
||||
#include "Poco/Path_WIN32U.h"
|
||||
#include "Poco/Environment_WIN32.h"
|
||||
#include "Poco/Environment_WIN32U.h"
|
||||
#include "Poco/UnicodeConverter.h"
|
||||
#include "Poco/Buffer.h"
|
||||
#include "Poco/Exception.h"
|
||||
|
@ -1,361 +0,0 @@
|
||||
//
|
||||
// Process_WIN32.cpp
|
||||
//
|
||||
// Library: Foundation
|
||||
// Package: Processes
|
||||
// Module: Process
|
||||
//
|
||||
// Copyright (c) 2004-2006, Applied Informatics Software Engineering GmbH.
|
||||
// and Contributors.
|
||||
//
|
||||
// SPDX-License-Identifier: BSL-1.0
|
||||
//
|
||||
|
||||
|
||||
#include "Poco/Process_WIN32.h"
|
||||
#include "Poco/Exception.h"
|
||||
#include "Poco/NumberFormatter.h"
|
||||
#include "Poco/NamedEvent.h"
|
||||
#include "Poco/Pipe.h"
|
||||
|
||||
|
||||
namespace Poco {
|
||||
|
||||
|
||||
//
|
||||
// ProcessHandleImpl
|
||||
//
|
||||
ProcessHandleImpl::ProcessHandleImpl(HANDLE hProcess, UInt32 pid) :
|
||||
_hProcess(hProcess),
|
||||
_pid(pid)
|
||||
{
|
||||
}
|
||||
|
||||
|
||||
ProcessHandleImpl::~ProcessHandleImpl()
|
||||
{
|
||||
closeHandle();
|
||||
}
|
||||
|
||||
|
||||
void ProcessHandleImpl::closeHandle()
|
||||
{
|
||||
if (_hProcess)
|
||||
{
|
||||
CloseHandle(_hProcess);
|
||||
_hProcess = NULL;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
UInt32 ProcessHandleImpl::id() const
|
||||
{
|
||||
return _pid;
|
||||
}
|
||||
|
||||
|
||||
HANDLE ProcessHandleImpl::process() const
|
||||
{
|
||||
return _hProcess;
|
||||
}
|
||||
|
||||
|
||||
int ProcessHandleImpl::wait() const
|
||||
{
|
||||
DWORD rc = WaitForSingleObject(_hProcess, INFINITE);
|
||||
if (rc != WAIT_OBJECT_0)
|
||||
throw SystemException("Wait failed for process", NumberFormatter::format(_pid));
|
||||
|
||||
DWORD exitCode;
|
||||
if (GetExitCodeProcess(_hProcess, &exitCode) == 0)
|
||||
throw SystemException("Cannot get exit code for process", NumberFormatter::format(_pid));
|
||||
|
||||
return exitCode;
|
||||
}
|
||||
|
||||
|
||||
int ProcessHandleImpl::tryWait() const
|
||||
{
|
||||
DWORD exitCode;
|
||||
if (GetExitCodeProcess(_hProcess, &exitCode) == 0)
|
||||
throw SystemException("Cannot get exit code for process", NumberFormatter::format(_pid));
|
||||
if (exitCode == STILL_ACTIVE)
|
||||
return -1;
|
||||
else
|
||||
return exitCode;
|
||||
}
|
||||
|
||||
|
||||
//
|
||||
// ProcessImpl
|
||||
//
|
||||
ProcessImpl::PIDImpl ProcessImpl::idImpl()
|
||||
{
|
||||
return GetCurrentProcessId();
|
||||
}
|
||||
|
||||
|
||||
void ProcessImpl::timesImpl(long& userTime, long& kernelTime)
|
||||
{
|
||||
FILETIME ftCreation;
|
||||
FILETIME ftExit;
|
||||
FILETIME ftKernel;
|
||||
FILETIME ftUser;
|
||||
|
||||
if (GetProcessTimes(GetCurrentProcess(), &ftCreation, &ftExit, &ftKernel, &ftUser) != 0)
|
||||
{
|
||||
ULARGE_INTEGER time;
|
||||
time.LowPart = ftKernel.dwLowDateTime;
|
||||
time.HighPart = ftKernel.dwHighDateTime;
|
||||
kernelTime = long(time.QuadPart / 10000000L);
|
||||
time.LowPart = ftUser.dwLowDateTime;
|
||||
time.HighPart = ftUser.dwHighDateTime;
|
||||
userTime = long(time.QuadPart / 10000000L);
|
||||
}
|
||||
else
|
||||
{
|
||||
userTime = kernelTime = -1;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
static bool argNeedsEscaping(const std::string& arg)
|
||||
{
|
||||
bool containsQuotableChar = std::string::npos != arg.find_first_of(" \t\n\v\"");
|
||||
// Assume args that start and end with quotes are already quoted and do not require further quoting.
|
||||
// There is probably code out there written before launch() escaped the arguments that does its own
|
||||
// escaping of arguments. This ensures we do not interfere with those arguments.
|
||||
bool isAlreadyQuoted = arg.size() > 1 && '\"' == arg[0] && '\"' == arg[arg.size() - 1];
|
||||
return containsQuotableChar && !isAlreadyQuoted;
|
||||
}
|
||||
|
||||
|
||||
// Based on code from https://blogs.msdn.microsoft.com/twistylittlepassagesallalike/2011/04/23/everyone-quotes-command-line-arguments-the-wrong-way/
|
||||
static std::string escapeArg(const std::string& arg)
|
||||
{
|
||||
if (argNeedsEscaping(arg))
|
||||
{
|
||||
std::string quotedArg("\"");
|
||||
for (std::string::const_iterator it = arg.begin(); ; ++it)
|
||||
{
|
||||
unsigned backslashCount = 0;
|
||||
while (it != arg.end() && '\\' == *it)
|
||||
{
|
||||
++it;
|
||||
++backslashCount;
|
||||
}
|
||||
|
||||
if (it == arg.end())
|
||||
{
|
||||
quotedArg.append(2 * backslashCount, '\\');
|
||||
break;
|
||||
}
|
||||
else if ('"' == *it)
|
||||
{
|
||||
quotedArg.append(2 * backslashCount + 1, '\\');
|
||||
quotedArg.push_back('"');
|
||||
}
|
||||
else
|
||||
{
|
||||
quotedArg.append(backslashCount, '\\');
|
||||
quotedArg.push_back(*it);
|
||||
}
|
||||
}
|
||||
quotedArg.push_back('"');
|
||||
return quotedArg;
|
||||
}
|
||||
else
|
||||
{
|
||||
return arg;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
ProcessHandleImpl* ProcessImpl::launchImpl(const std::string& command, const ArgsImpl& args, const std::string& initialDirectory, Pipe* inPipe, Pipe* outPipe, Pipe* errPipe, const EnvImpl& env)
|
||||
{
|
||||
std::string commandLine = command;
|
||||
for (const auto& a: args)
|
||||
{
|
||||
commandLine.append(" ");
|
||||
commandLine.append(escapeArg(a));
|
||||
}
|
||||
|
||||
STARTUPINFOA startupInfo;
|
||||
GetStartupInfoA(&startupInfo); // take defaults from current process
|
||||
startupInfo.cb = sizeof(STARTUPINFOA);
|
||||
startupInfo.lpReserved = NULL;
|
||||
startupInfo.lpDesktop = NULL;
|
||||
startupInfo.lpTitle = NULL;
|
||||
startupInfo.dwFlags = STARTF_FORCEOFFFEEDBACK;
|
||||
startupInfo.cbReserved2 = 0;
|
||||
startupInfo.lpReserved2 = NULL;
|
||||
|
||||
HANDLE hProc = GetCurrentProcess();
|
||||
bool mustInheritHandles = false;
|
||||
if (inPipe)
|
||||
{
|
||||
DuplicateHandle(hProc, inPipe->readHandle(), hProc, &startupInfo.hStdInput, 0, TRUE, DUPLICATE_SAME_ACCESS);
|
||||
mustInheritHandles = true;
|
||||
inPipe->close(Pipe::CLOSE_READ);
|
||||
}
|
||||
else if (GetStdHandle(STD_INPUT_HANDLE))
|
||||
{
|
||||
DuplicateHandle(hProc, GetStdHandle(STD_INPUT_HANDLE), hProc, &startupInfo.hStdInput, 0, TRUE, DUPLICATE_SAME_ACCESS);
|
||||
mustInheritHandles = true;
|
||||
}
|
||||
else
|
||||
{
|
||||
startupInfo.hStdInput = 0;
|
||||
}
|
||||
// outPipe may be the same as errPipe, so we duplicate first and close later.
|
||||
if (outPipe)
|
||||
{
|
||||
DuplicateHandle(hProc, outPipe->writeHandle(), hProc, &startupInfo.hStdOutput, 0, TRUE, DUPLICATE_SAME_ACCESS);
|
||||
mustInheritHandles = true;
|
||||
}
|
||||
else if (GetStdHandle(STD_OUTPUT_HANDLE))
|
||||
{
|
||||
DuplicateHandle(hProc, GetStdHandle(STD_OUTPUT_HANDLE), hProc, &startupInfo.hStdOutput, 0, TRUE, DUPLICATE_SAME_ACCESS);
|
||||
mustInheritHandles = true;
|
||||
}
|
||||
else
|
||||
{
|
||||
startupInfo.hStdOutput = 0;
|
||||
}
|
||||
if (errPipe)
|
||||
{
|
||||
DuplicateHandle(hProc, errPipe->writeHandle(), hProc, &startupInfo.hStdError, 0, TRUE, DUPLICATE_SAME_ACCESS);
|
||||
mustInheritHandles = true;
|
||||
}
|
||||
else if (GetStdHandle(STD_ERROR_HANDLE))
|
||||
{
|
||||
DuplicateHandle(hProc, GetStdHandle(STD_ERROR_HANDLE), hProc, &startupInfo.hStdError, 0, TRUE, DUPLICATE_SAME_ACCESS);
|
||||
mustInheritHandles = true;
|
||||
}
|
||||
else
|
||||
{
|
||||
startupInfo.hStdError = 0;
|
||||
}
|
||||
if (outPipe) outPipe->close(Pipe::CLOSE_WRITE);
|
||||
if (errPipe) errPipe->close(Pipe::CLOSE_WRITE);
|
||||
|
||||
if (mustInheritHandles)
|
||||
{
|
||||
startupInfo.dwFlags |= STARTF_USESTDHANDLES;
|
||||
}
|
||||
|
||||
const char* workingDirectory = initialDirectory.empty() ? 0 : initialDirectory.c_str();
|
||||
|
||||
const char* pEnv = 0;
|
||||
std::vector<char> envChars;
|
||||
if (!env.empty())
|
||||
{
|
||||
envChars = getEnvironmentVariablesBuffer(env);
|
||||
pEnv = &envChars[0];
|
||||
}
|
||||
|
||||
PROCESS_INFORMATION processInfo;
|
||||
DWORD creationFlags = GetConsoleWindow() ? 0 : CREATE_NO_WINDOW;
|
||||
BOOL rc = CreateProcessA(
|
||||
NULL,
|
||||
const_cast<char*>(commandLine.c_str()),
|
||||
NULL, // processAttributes
|
||||
NULL, // threadAttributes
|
||||
mustInheritHandles,
|
||||
creationFlags,
|
||||
(LPVOID)pEnv,
|
||||
workingDirectory,
|
||||
&startupInfo,
|
||||
&processInfo
|
||||
);
|
||||
if (startupInfo.hStdInput) CloseHandle(startupInfo.hStdInput);
|
||||
if (startupInfo.hStdOutput) CloseHandle(startupInfo.hStdOutput);
|
||||
if (startupInfo.hStdError) CloseHandle(startupInfo.hStdError);
|
||||
if (rc)
|
||||
{
|
||||
CloseHandle(processInfo.hThread);
|
||||
return new ProcessHandleImpl(processInfo.hProcess, processInfo.dwProcessId);
|
||||
}
|
||||
else throw SystemException("Cannot launch process", command);
|
||||
}
|
||||
|
||||
|
||||
void ProcessImpl::killImpl(ProcessHandleImpl& handle)
|
||||
{
|
||||
if (handle.process())
|
||||
{
|
||||
if (TerminateProcess(handle.process(), 0) == 0)
|
||||
{
|
||||
handle.closeHandle();
|
||||
throw SystemException("cannot kill process");
|
||||
}
|
||||
handle.closeHandle();
|
||||
}
|
||||
}
|
||||
|
||||
void ProcessImpl::killImpl(PIDImpl pid)
|
||||
{
|
||||
HANDLE hProc = OpenProcess(PROCESS_TERMINATE, FALSE, pid);
|
||||
if (hProc)
|
||||
{
|
||||
if (TerminateProcess(hProc, 0) == 0)
|
||||
{
|
||||
CloseHandle(hProc);
|
||||
throw SystemException("cannot kill process");
|
||||
}
|
||||
CloseHandle(hProc);
|
||||
}
|
||||
else
|
||||
{
|
||||
switch (GetLastError())
|
||||
{
|
||||
case ERROR_ACCESS_DENIED:
|
||||
throw NoPermissionException("cannot kill process");
|
||||
case ERROR_NOT_FOUND:
|
||||
throw NotFoundException("cannot kill process");
|
||||
case ERROR_INVALID_PARAMETER:
|
||||
throw NotFoundException("cannot kill process");
|
||||
default:
|
||||
throw SystemException("cannot kill process");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
bool ProcessImpl::isRunningImpl(const ProcessHandleImpl& handle)
|
||||
{
|
||||
bool result = true;
|
||||
DWORD exitCode;
|
||||
BOOL rc = GetExitCodeProcess(handle.process(), &exitCode);
|
||||
if (!rc || exitCode != STILL_ACTIVE) result = false;
|
||||
return result;
|
||||
}
|
||||
|
||||
|
||||
bool ProcessImpl::isRunningImpl(PIDImpl pid)
|
||||
{
|
||||
HANDLE hProc = OpenProcess(PROCESS_QUERY_INFORMATION, FALSE, pid);
|
||||
bool result = true;
|
||||
DWORD exitCode;
|
||||
BOOL rc = GetExitCodeProcess(hProc, &exitCode);
|
||||
if (!rc || exitCode != STILL_ACTIVE) result = false;
|
||||
return result;
|
||||
}
|
||||
|
||||
|
||||
void ProcessImpl::requestTerminationImpl(PIDImpl pid)
|
||||
{
|
||||
NamedEvent ev(terminationEventName(pid));
|
||||
ev.set();
|
||||
}
|
||||
|
||||
|
||||
std::string ProcessImpl::terminationEventName(PIDImpl pid)
|
||||
{
|
||||
std::string evName("POCOTRM");
|
||||
NumberFormatter::appendHex(evName, pid, 8);
|
||||
return evName;
|
||||
}
|
||||
|
||||
|
||||
} // namespace Poco
|
@ -21,6 +21,7 @@
|
||||
#include "Poco/File.h"
|
||||
#include "Poco/Path.h"
|
||||
#include "Poco/String.h"
|
||||
#include "Poco/Ascii.h"
|
||||
|
||||
|
||||
namespace
|
||||
@ -159,21 +160,39 @@ void ProcessImpl::timesImpl(long& userTime, long& kernelTime)
|
||||
}
|
||||
|
||||
|
||||
static bool argNeedsEscaping(const std::string& arg)
|
||||
bool ProcessImpl::mustEscapeArg(const std::string& arg)
|
||||
{
|
||||
bool containsQuotableChar = std::string::npos != arg.find_first_of(" \t\n\v\"");
|
||||
// Assume args that start and end with quotes are already quoted and do not require further quoting.
|
||||
// There is probably code out there written before launch() escaped the arguments that does its own
|
||||
// escaping of arguments. This ensures we do not interfere with those arguments.
|
||||
bool isAlreadyQuoted = arg.size() > 1 && '\"' == arg[0] && '\"' == arg[arg.size() - 1];
|
||||
return containsQuotableChar && !isAlreadyQuoted;
|
||||
bool result = false;
|
||||
bool inQuotes = false;
|
||||
bool escaped = false;
|
||||
for (char c: arg)
|
||||
{
|
||||
if (Poco::Ascii::isSpace(c) && !inQuotes && !escaped)
|
||||
{
|
||||
result = true;
|
||||
break;
|
||||
}
|
||||
else if (c == '"' && !escaped)
|
||||
{
|
||||
inQuotes = !inQuotes;
|
||||
}
|
||||
else if (c == '\\' && !escaped)
|
||||
{
|
||||
escaped = true;
|
||||
}
|
||||
else
|
||||
{
|
||||
escaped = false;
|
||||
}
|
||||
}
|
||||
return result || inQuotes;
|
||||
}
|
||||
|
||||
|
||||
// Based on code from https://blogs.msdn.microsoft.com/twistylittlepassagesallalike/2011/04/23/everyone-quotes-command-line-arguments-the-wrong-way/
|
||||
static std::string escapeArg(const std::string& arg)
|
||||
std::string ProcessImpl::escapeArg(const std::string& arg)
|
||||
{
|
||||
if (argNeedsEscaping(arg))
|
||||
if (mustEscapeArg(arg))
|
||||
{
|
||||
std::string quotedArg("\"");
|
||||
for (std::string::const_iterator it = arg.begin(); ; ++it)
|
||||
@ -204,10 +223,7 @@ static std::string escapeArg(const std::string& arg)
|
||||
quotedArg.push_back('"');
|
||||
return quotedArg;
|
||||
}
|
||||
else
|
||||
{
|
||||
return arg;
|
||||
}
|
||||
else return arg;
|
||||
}
|
||||
|
||||
|
||||
|
@ -151,52 +151,6 @@ static const unsigned char padding[128] = { 0x80, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
|
||||
temp2 = S642(a) + F640(a,b,c); \
|
||||
d += temp1; h = temp1 + temp2; \
|
||||
}
|
||||
#ifdef POCO_ARCH_BIG_ENDIAN
|
||||
#ifndef GET_UINT32
|
||||
#define GET_UINT32(n,b,i) \
|
||||
do { \
|
||||
(n) = ( (Poco::UInt32) (b)[(i) ] ) \
|
||||
| ( (Poco::UInt32) (b)[(i) + 1] << 8 ) \
|
||||
| ( (Poco::UInt32) (b)[(i) + 2] << 16 ) \
|
||||
| ( (Poco::UInt32) (b)[(i) + 3] << 24 ); \
|
||||
} while( 0 )
|
||||
#endif
|
||||
#ifndef PUT_UINT32
|
||||
#define PUT_UINT32(n,b,i) \
|
||||
do { \
|
||||
(b)[(i) ] = (unsigned char) ( (n) ); \
|
||||
(b)[(i) + 1] = (unsigned char) ( (n) >> 8 ); \
|
||||
(b)[(i) + 2] = (unsigned char) ( (n) >> 16 ); \
|
||||
(b)[(i) + 3] = (unsigned char) ( (n) >> 24 ); \
|
||||
} while( 0 )
|
||||
#endif
|
||||
#ifndef GET_UINT64
|
||||
#define GET_UINT64(n,b,i) \
|
||||
{ \
|
||||
(n) = ( (Poco::UInt64) (b)[(i) ] ) \
|
||||
| ( (Poco::UInt64) (b)[(i) + 1] << 8 ) \
|
||||
| ( (Poco::UInt64) (b)[(i) + 2] << 16 ) \
|
||||
| ( (Poco::UInt64) (b)[(i) + 3] << 24 ) \
|
||||
| ( (Poco::UInt64) (b)[(i) + 4] << 32 ) \
|
||||
| ( (Poco::UInt64) (b)[(i) + 5] << 40 ) \
|
||||
| ( (Poco::UInt64) (b)[(i) + 6] << 48 ) \
|
||||
| ( (Poco::UInt64) (b)[(i) + 7] << 56 ); \
|
||||
}
|
||||
#endif
|
||||
#ifndef PUT_UINT64
|
||||
#define PUT_UINT64(n,b,i) \
|
||||
{ \
|
||||
(b)[(i) ] = (unsigned char) ( (n) ); \
|
||||
(b)[(i) + 1] = (unsigned char) ( (n) >> 8 ); \
|
||||
(b)[(i) + 2] = (unsigned char) ( (n) >> 16 ); \
|
||||
(b)[(i) + 3] = (unsigned char) ( (n) >> 24 ); \
|
||||
(b)[(i) + 4] = (unsigned char) ( (n) >> 32 ); \
|
||||
(b)[(i) + 5] = (unsigned char) ( (n) >> 40 ); \
|
||||
(b)[(i) + 6] = (unsigned char) ( (n) >> 48 ); \
|
||||
(b)[(i) + 7] = (unsigned char) ( (n) >> 56 ); \
|
||||
}
|
||||
#endif
|
||||
#else
|
||||
#ifndef GET_UINT32
|
||||
#define GET_UINT32(n,b,i) \
|
||||
do { \
|
||||
@ -241,7 +195,6 @@ do { \
|
||||
(b)[(i) + 7] = (unsigned char) ( (n) ); \
|
||||
}
|
||||
#endif
|
||||
#endif
|
||||
|
||||
|
||||
SHA2Engine::SHA2Engine(ALGORITHM algorithm):
|
||||
|
@ -1,108 +0,0 @@
|
||||
//
|
||||
// SharedLibrary_WIN32.cpp
|
||||
//
|
||||
// Library: Foundation
|
||||
// Package: SharedLibrary
|
||||
// Module: SharedLibrary
|
||||
//
|
||||
// Copyright (c) 2004-2006, Applied Informatics Software Engineering GmbH.
|
||||
// and Contributors.
|
||||
//
|
||||
// SPDX-License-Identifier: BSL-1.0
|
||||
//
|
||||
|
||||
|
||||
#include "Poco/SharedLibrary_WIN32.h"
|
||||
#include "Poco/Path.h"
|
||||
#include "Poco/UnWindows.h"
|
||||
|
||||
|
||||
namespace Poco {
|
||||
|
||||
|
||||
FastMutex SharedLibraryImpl::_mutex;
|
||||
|
||||
|
||||
SharedLibraryImpl::SharedLibraryImpl()
|
||||
{
|
||||
_handle = 0;
|
||||
}
|
||||
|
||||
|
||||
SharedLibraryImpl::~SharedLibraryImpl()
|
||||
{
|
||||
}
|
||||
|
||||
|
||||
void SharedLibraryImpl::loadImpl(const std::string& path, int /*flags*/)
|
||||
{
|
||||
FastMutex::ScopedLock lock(_mutex);
|
||||
|
||||
if (_handle) throw LibraryAlreadyLoadedException(_path);
|
||||
DWORD flags(0);
|
||||
Path p(path);
|
||||
if (p.isAbsolute()) flags |= LOAD_WITH_ALTERED_SEARCH_PATH;
|
||||
_handle = LoadLibraryExA(path.c_str(), 0, flags);
|
||||
if (!_handle) throw LibraryLoadException(path);
|
||||
_path = path;
|
||||
}
|
||||
|
||||
|
||||
void SharedLibraryImpl::unloadImpl()
|
||||
{
|
||||
FastMutex::ScopedLock lock(_mutex);
|
||||
|
||||
if (_handle)
|
||||
{
|
||||
FreeLibrary((HMODULE) _handle);
|
||||
_handle = 0;
|
||||
}
|
||||
_path.clear();
|
||||
}
|
||||
|
||||
|
||||
bool SharedLibraryImpl::isLoadedImpl() const
|
||||
{
|
||||
return _handle != 0;
|
||||
}
|
||||
|
||||
|
||||
void* SharedLibraryImpl::findSymbolImpl(const std::string& name)
|
||||
{
|
||||
FastMutex::ScopedLock lock(_mutex);
|
||||
|
||||
if (_handle)
|
||||
{
|
||||
return (void*) GetProcAddress((HMODULE) _handle, name.c_str());
|
||||
}
|
||||
else return 0;
|
||||
}
|
||||
|
||||
|
||||
const std::string& SharedLibraryImpl::getPathImpl() const
|
||||
{
|
||||
return _path;
|
||||
}
|
||||
|
||||
|
||||
std::string SharedLibraryImpl::suffixImpl()
|
||||
{
|
||||
#if defined(_DEBUG) && !defined(POCO_NO_SHARED_LIBRARY_DEBUG_SUFFIX)
|
||||
return "d.dll";
|
||||
#else
|
||||
return ".dll";
|
||||
#endif
|
||||
}
|
||||
|
||||
|
||||
bool SharedLibraryImpl::setSearchPathImpl(const std::string& path)
|
||||
{
|
||||
#if _WIN32_WINNT >= 0x0502
|
||||
return SetDllDirectoryA(path.c_str()) != 0;
|
||||
#else
|
||||
return false;
|
||||
#endif
|
||||
}
|
||||
|
||||
|
||||
} // namespace Poco
|
@ -49,19 +49,18 @@ URI::URI(const char* uri):
|
||||
parse(std::string(uri));
|
||||
}
|
||||
|
||||
|
||||
|
||||
URI::URI(const std::string& scheme, const std::string& pathEtc):
|
||||
_scheme(scheme),
|
||||
_port(0)
|
||||
{
|
||||
toLowerInPlace(_scheme);
|
||||
_port = getWellKnownPort();
|
||||
std::string::const_iterator beg = pathEtc.begin();
|
||||
std::string::const_iterator end = pathEtc.end();
|
||||
parsePathEtc(beg, end);
|
||||
}
|
||||
|
||||
|
||||
|
||||
URI::URI(const std::string& scheme, const std::string& authority, const std::string& pathEtc):
|
||||
_scheme(scheme)
|
||||
{
|
||||
@ -181,7 +180,7 @@ URI& URI::operator = (URI&& uri) noexcept
|
||||
return *this;
|
||||
}
|
||||
|
||||
|
||||
|
||||
URI& URI::operator = (const std::string& uri)
|
||||
{
|
||||
clear();
|
||||
@ -268,18 +267,16 @@ void URI::setScheme(const std::string& scheme)
|
||||
{
|
||||
_scheme = scheme;
|
||||
toLowerInPlace(_scheme);
|
||||
if (_port == 0)
|
||||
_port = getWellKnownPort();
|
||||
}
|
||||
|
||||
|
||||
|
||||
void URI::setUserInfo(const std::string& userInfo)
|
||||
{
|
||||
_userInfo.clear();
|
||||
decode(userInfo, _userInfo);
|
||||
}
|
||||
|
||||
|
||||
|
||||
void URI::setHost(const std::string& host)
|
||||
{
|
||||
_host = host;
|
||||
@ -300,7 +297,7 @@ void URI::setPort(unsigned short port)
|
||||
_port = port;
|
||||
}
|
||||
|
||||
|
||||
|
||||
std::string URI::getAuthority() const
|
||||
{
|
||||
std::string auth;
|
||||
@ -324,7 +321,7 @@ std::string URI::getAuthority() const
|
||||
return auth;
|
||||
}
|
||||
|
||||
|
||||
|
||||
void URI::setAuthority(const std::string& authority)
|
||||
{
|
||||
_userInfo.clear();
|
||||
@ -335,14 +332,14 @@ void URI::setAuthority(const std::string& authority)
|
||||
parseAuthority(beg, end);
|
||||
}
|
||||
|
||||
|
||||
|
||||
void URI::setPath(const std::string& path)
|
||||
{
|
||||
_path.clear();
|
||||
decode(path, _path);
|
||||
}
|
||||
|
||||
|
||||
|
||||
void URI::setRawQuery(const std::string& query)
|
||||
{
|
||||
_query = query;
|
||||
@ -384,7 +381,7 @@ URI::QueryParameters URI::getQueryParameters() const
|
||||
std::string value;
|
||||
while (it != end && *it != '=' && *it != '&')
|
||||
{
|
||||
if (*it == '+')
|
||||
if (*it == '+')
|
||||
name += ' ';
|
||||
else
|
||||
name += *it;
|
||||
@ -395,7 +392,7 @@ URI::QueryParameters URI::getQueryParameters() const
|
||||
++it;
|
||||
while (it != end && *it != '&')
|
||||
{
|
||||
if (*it == '+')
|
||||
if (*it == '+')
|
||||
value += ' ';
|
||||
else
|
||||
value += *it;
|
||||
@ -407,7 +404,7 @@ URI::QueryParameters URI::getQueryParameters() const
|
||||
URI::decode(name, decodedName);
|
||||
URI::decode(value, decodedValue);
|
||||
result.push_back(std::make_pair(decodedName, decodedValue));
|
||||
if (it != end && *it == '&') ++it;
|
||||
if (it != end && *it == '&') ++it;
|
||||
}
|
||||
return result;
|
||||
}
|
||||
@ -440,7 +437,7 @@ void URI::setPathEtc(const std::string& pathEtc)
|
||||
parsePathEtc(beg, end);
|
||||
}
|
||||
|
||||
|
||||
|
||||
std::string URI::getPathEtc() const
|
||||
{
|
||||
std::string pathEtc;
|
||||
@ -471,7 +468,7 @@ std::string URI::getPathAndQuery() const
|
||||
return pathAndQuery;
|
||||
}
|
||||
|
||||
|
||||
|
||||
void URI::resolve(const std::string& relativeURI)
|
||||
{
|
||||
URI parsedURI(relativeURI);
|
||||
@ -524,7 +521,7 @@ void URI::resolve(const URI& relativeURI)
|
||||
}
|
||||
}
|
||||
}
|
||||
_fragment = relativeURI._fragment;
|
||||
_fragment = relativeURI._fragment;
|
||||
}
|
||||
|
||||
|
||||
@ -539,7 +536,7 @@ bool URI::empty() const
|
||||
return _scheme.empty() && _host.empty() && _path.empty() && _query.empty() && _fragment.empty();
|
||||
}
|
||||
|
||||
|
||||
|
||||
bool URI::operator == (const URI& uri) const
|
||||
{
|
||||
return equals(uri);
|
||||
@ -577,7 +574,7 @@ bool URI::equals(const URI& uri) const
|
||||
&& _fragment == uri._fragment;
|
||||
}
|
||||
|
||||
|
||||
|
||||
void URI::normalize()
|
||||
{
|
||||
removeDotSegments(!isRelative());
|
||||
@ -587,7 +584,7 @@ void URI::normalize()
|
||||
void URI::removeDotSegments(bool removeLeading)
|
||||
{
|
||||
if (_path.empty()) return;
|
||||
|
||||
|
||||
bool leadingSlash = *(_path.begin()) == '/';
|
||||
bool trailingSlash = *(_path.rbegin()) == '/';
|
||||
std::vector<std::string> segments;
|
||||
@ -651,10 +648,10 @@ void URI::encode(const std::string& str, const std::string& reserved, std::strin
|
||||
{
|
||||
for (auto c: str)
|
||||
{
|
||||
if ((c >= 'a' && c <= 'z') ||
|
||||
(c >= 'A' && c <= 'Z') ||
|
||||
if ((c >= 'a' && c <= 'z') ||
|
||||
(c >= 'A' && c <= 'Z') ||
|
||||
(c >= '0' && c <= '9') ||
|
||||
c == '-' || c == '_' ||
|
||||
c == '-' || c == '_' ||
|
||||
c == '.' || c == '~')
|
||||
{
|
||||
encodedStr += c;
|
||||
@ -668,7 +665,7 @@ void URI::encode(const std::string& str, const std::string& reserved, std::strin
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
void URI::decode(const std::string& str, std::string& decodedStr, bool plusAsSpace)
|
||||
{
|
||||
bool inQuery = false;
|
||||
@ -782,7 +779,7 @@ void URI::parse(const std::string& uri)
|
||||
}
|
||||
parsePathEtc(it, end);
|
||||
}
|
||||
else
|
||||
else
|
||||
{
|
||||
it = uri.begin();
|
||||
parsePathEtc(it, end);
|
||||
@ -842,9 +839,9 @@ void URI::parseHostAndPort(std::string::const_iterator& it, const std::string::c
|
||||
else
|
||||
throw URISyntaxException("bad or invalid port number", port);
|
||||
}
|
||||
else _port = getWellKnownPort();
|
||||
else _port = 0;
|
||||
}
|
||||
else _port = getWellKnownPort();
|
||||
else _port = 0;
|
||||
_host = host;
|
||||
toLowerInPlace(_host);
|
||||
}
|
||||
@ -872,7 +869,7 @@ void URI::parsePathEtc(std::string::const_iterator& it, const std::string::const
|
||||
{
|
||||
++it;
|
||||
parseFragment(it, end);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@ -944,7 +941,7 @@ void URI::buildPath(const std::vector<std::string>& segments, bool leadingSlash,
|
||||
else _path += '/';
|
||||
_path.append(s);
|
||||
}
|
||||
if (trailingSlash)
|
||||
if (trailingSlash)
|
||||
_path += '/';
|
||||
}
|
||||
|
||||
|
@ -28,24 +28,24 @@ const char* UTF16Encoding::_names[] =
|
||||
};
|
||||
|
||||
|
||||
const TextEncoding::CharacterMap UTF16Encoding::_charMap =
|
||||
const TextEncoding::CharacterMap UTF16Encoding::_charMap =
|
||||
{
|
||||
/* 00 */ -2, -2, -2, -2, -2, -2, -2, -2, -2, -2, -2, -2, -2, -2, -2, -2,
|
||||
/* 10 */ -2, -2, -2, -2, -2, -2, -2, -2, -2, -2, -2, -2, -2, -2, -2, -2,
|
||||
/* 20 */ -2, -2, -2, -2, -2, -2, -2, -2, -2, -2, -2, -2, -2, -2, -2, -2,
|
||||
/* 30 */ -2, -2, -2, -2, -2, -2, -2, -2, -2, -2, -2, -2, -2, -2, -2, -2,
|
||||
/* 40 */ -2, -2, -2, -2, -2, -2, -2, -2, -2, -2, -2, -2, -2, -2, -2, -2,
|
||||
/* 50 */ -2, -2, -2, -2, -2, -2, -2, -2, -2, -2, -2, -2, -2, -2, -2, -2,
|
||||
/* 60 */ -2, -2, -2, -2, -2, -2, -2, -2, -2, -2, -2, -2, -2, -2, -2, -2,
|
||||
/* 70 */ -2, -2, -2, -2, -2, -2, -2, -2, -2, -2, -2, -2, -2, -2, -2, -2,
|
||||
/* 80 */ -2, -2, -2, -2, -2, -2, -2, -2, -2, -2, -2, -2, -2, -2, -2, -2,
|
||||
/* 90 */ -2, -2, -2, -2, -2, -2, -2, -2, -2, -2, -2, -2, -2, -2, -2, -2,
|
||||
/* a0 */ -2, -2, -2, -2, -2, -2, -2, -2, -2, -2, -2, -2, -2, -2, -2, -2,
|
||||
/* b0 */ -2, -2, -2, -2, -2, -2, -2, -2, -2, -2, -2, -2, -2, -2, -2, -2,
|
||||
/* c0 */ -2, -2, -2, -2, -2, -2, -2, -2, -2, -2, -2, -2, -2, -2, -2, -2,
|
||||
/* d0 */ -2, -2, -2, -2, -2, -2, -2, -2, -2, -2, -2, -2, -2, -2, -2, -2,
|
||||
/* e0 */ -2, -2, -2, -2, -2, -2, -2, -2, -2, -2, -2, -2, -2, -2, -2, -2,
|
||||
/* f0 */ -2, -2, -2, -2, -2, -2, -2, -2, -2, -2, -2, -2, -2, -2, -2, -2,
|
||||
/* 00 */ -2, -2, -2, -2, -2, -2, -2, -2, -2, -2, -2, -2, -2, -2, -2, -2,
|
||||
/* 10 */ -2, -2, -2, -2, -2, -2, -2, -2, -2, -2, -2, -2, -2, -2, -2, -2,
|
||||
/* 20 */ -2, -2, -2, -2, -2, -2, -2, -2, -2, -2, -2, -2, -2, -2, -2, -2,
|
||||
/* 30 */ -2, -2, -2, -2, -2, -2, -2, -2, -2, -2, -2, -2, -2, -2, -2, -2,
|
||||
/* 40 */ -2, -2, -2, -2, -2, -2, -2, -2, -2, -2, -2, -2, -2, -2, -2, -2,
|
||||
/* 50 */ -2, -2, -2, -2, -2, -2, -2, -2, -2, -2, -2, -2, -2, -2, -2, -2,
|
||||
/* 60 */ -2, -2, -2, -2, -2, -2, -2, -2, -2, -2, -2, -2, -2, -2, -2, -2,
|
||||
/* 70 */ -2, -2, -2, -2, -2, -2, -2, -2, -2, -2, -2, -2, -2, -2, -2, -2,
|
||||
/* 80 */ -2, -2, -2, -2, -2, -2, -2, -2, -2, -2, -2, -2, -2, -2, -2, -2,
|
||||
/* 90 */ -2, -2, -2, -2, -2, -2, -2, -2, -2, -2, -2, -2, -2, -2, -2, -2,
|
||||
/* a0 */ -2, -2, -2, -2, -2, -2, -2, -2, -2, -2, -2, -2, -2, -2, -2, -2,
|
||||
/* b0 */ -2, -2, -2, -2, -2, -2, -2, -2, -2, -2, -2, -2, -2, -2, -2, -2,
|
||||
/* c0 */ -2, -2, -2, -2, -2, -2, -2, -2, -2, -2, -2, -2, -2, -2, -2, -2,
|
||||
/* d0 */ -2, -2, -2, -2, -2, -2, -2, -2, -2, -2, -2, -2, -2, -2, -2, -2,
|
||||
/* e0 */ -2, -2, -2, -2, -2, -2, -2, -2, -2, -2, -2, -2, -2, -2, -2, -2,
|
||||
/* f0 */ -2, -2, -2, -2, -2, -2, -2, -2, -2, -2, -2, -2, -2, -2, -2, -2,
|
||||
};
|
||||
|
||||
|
||||
@ -54,13 +54,13 @@ UTF16Encoding::UTF16Encoding(ByteOrderType byteOrder)
|
||||
setByteOrder(byteOrder);
|
||||
}
|
||||
|
||||
|
||||
|
||||
UTF16Encoding::UTF16Encoding(int byteOrderMark)
|
||||
{
|
||||
setByteOrder(byteOrderMark);
|
||||
}
|
||||
|
||||
|
||||
|
||||
UTF16Encoding::~UTF16Encoding()
|
||||
{
|
||||
}
|
||||
@ -75,7 +75,7 @@ UTF16Encoding::ByteOrderType UTF16Encoding::getByteOrder() const
|
||||
#endif
|
||||
}
|
||||
|
||||
|
||||
|
||||
void UTF16Encoding::setByteOrder(ByteOrderType byteOrder)
|
||||
{
|
||||
#if defined(POCO_ARCH_BIG_ENDIAN)
|
||||
@ -85,7 +85,7 @@ void UTF16Encoding::setByteOrder(ByteOrderType byteOrder)
|
||||
#endif
|
||||
}
|
||||
|
||||
|
||||
|
||||
void UTF16Encoding::setByteOrder(int byteOrderMark)
|
||||
{
|
||||
_flipBytes = byteOrderMark != 0xFEFF;
|
||||
@ -124,7 +124,7 @@ int UTF16Encoding::convert(const unsigned char* bytes) const
|
||||
|
||||
if (_flipBytes)
|
||||
{
|
||||
ByteOrder::flipBytes(uc);
|
||||
uc = ByteOrder::flipBytes(uc);
|
||||
}
|
||||
|
||||
if (uc >= 0xd800 && uc < 0xdc00)
|
||||
@ -136,7 +136,7 @@ int UTF16Encoding::convert(const unsigned char* bytes) const
|
||||
|
||||
if (_flipBytes)
|
||||
{
|
||||
ByteOrder::flipBytes(uc2);
|
||||
uc2 = ByteOrder::flipBytes(uc2);
|
||||
}
|
||||
if (uc2 >= 0xdc00 && uc2 < 0xe000)
|
||||
{
|
||||
@ -201,8 +201,10 @@ int UTF16Encoding::queryConvert(const unsigned char* bytes, int length) const
|
||||
unsigned char* p = (unsigned char*) &uc;
|
||||
*p++ = *bytes++;
|
||||
*p++ = *bytes++;
|
||||
if (_flipBytes)
|
||||
ByteOrder::flipBytes(uc);
|
||||
if (_flipBytes)
|
||||
{
|
||||
uc = ByteOrder::flipBytes(uc);
|
||||
}
|
||||
if (uc >= 0xd800 && uc < 0xdc00)
|
||||
{
|
||||
if (length >= 4)
|
||||
@ -211,8 +213,10 @@ int UTF16Encoding::queryConvert(const unsigned char* bytes, int length) const
|
||||
p = (unsigned char*) &uc2;
|
||||
*p++ = *bytes++;
|
||||
*p++ = *bytes++;
|
||||
if (_flipBytes)
|
||||
ByteOrder::flipBytes(uc2);
|
||||
if (_flipBytes)
|
||||
{
|
||||
uc2 = ByteOrder::flipBytes(uc2);
|
||||
}
|
||||
if (uc2 >= 0xdc00 && uc < 0xe000)
|
||||
{
|
||||
ret = ((uc & 0x3ff) << 10) + (uc2 & 0x3ff) + 0x10000;
|
||||
|
@ -28,24 +28,24 @@ const char* UTF32Encoding::_names[] =
|
||||
};
|
||||
|
||||
|
||||
const TextEncoding::CharacterMap UTF32Encoding::_charMap =
|
||||
const TextEncoding::CharacterMap UTF32Encoding::_charMap =
|
||||
{
|
||||
/* 00 */ -2, -2, -2, -2, -2, -2, -2, -2, -2, -2, -2, -2, -2, -2, -2, -2,
|
||||
/* 10 */ -2, -2, -2, -2, -2, -2, -2, -2, -2, -2, -2, -2, -2, -2, -2, -2,
|
||||
/* 20 */ -2, -2, -2, -2, -2, -2, -2, -2, -2, -2, -2, -2, -2, -2, -2, -2,
|
||||
/* 30 */ -2, -2, -2, -2, -2, -2, -2, -2, -2, -2, -2, -2, -2, -2, -2, -2,
|
||||
/* 40 */ -2, -2, -2, -2, -2, -2, -2, -2, -2, -2, -2, -2, -2, -2, -2, -2,
|
||||
/* 50 */ -2, -2, -2, -2, -2, -2, -2, -2, -2, -2, -2, -2, -2, -2, -2, -2,
|
||||
/* 60 */ -2, -2, -2, -2, -2, -2, -2, -2, -2, -2, -2, -2, -2, -2, -2, -2,
|
||||
/* 70 */ -2, -2, -2, -2, -2, -2, -2, -2, -2, -2, -2, -2, -2, -2, -2, -2,
|
||||
/* 80 */ -2, -2, -2, -2, -2, -2, -2, -2, -2, -2, -2, -2, -2, -2, -2, -2,
|
||||
/* 90 */ -2, -2, -2, -2, -2, -2, -2, -2, -2, -2, -2, -2, -2, -2, -2, -2,
|
||||
/* a0 */ -2, -2, -2, -2, -2, -2, -2, -2, -2, -2, -2, -2, -2, -2, -2, -2,
|
||||
/* b0 */ -2, -2, -2, -2, -2, -2, -2, -2, -2, -2, -2, -2, -2, -2, -2, -2,
|
||||
/* c0 */ -2, -2, -2, -2, -2, -2, -2, -2, -2, -2, -2, -2, -2, -2, -2, -2,
|
||||
/* d0 */ -2, -2, -2, -2, -2, -2, -2, -2, -2, -2, -2, -2, -2, -2, -2, -2,
|
||||
/* e0 */ -2, -2, -2, -2, -2, -2, -2, -2, -2, -2, -2, -2, -2, -2, -2, -2,
|
||||
/* f0 */ -2, -2, -2, -2, -2, -2, -2, -2, -2, -2, -2, -2, -2, -2, -2, -2,
|
||||
/* 00 */ -2, -2, -2, -2, -2, -2, -2, -2, -2, -2, -2, -2, -2, -2, -2, -2,
|
||||
/* 10 */ -2, -2, -2, -2, -2, -2, -2, -2, -2, -2, -2, -2, -2, -2, -2, -2,
|
||||
/* 20 */ -2, -2, -2, -2, -2, -2, -2, -2, -2, -2, -2, -2, -2, -2, -2, -2,
|
||||
/* 30 */ -2, -2, -2, -2, -2, -2, -2, -2, -2, -2, -2, -2, -2, -2, -2, -2,
|
||||
/* 40 */ -2, -2, -2, -2, -2, -2, -2, -2, -2, -2, -2, -2, -2, -2, -2, -2,
|
||||
/* 50 */ -2, -2, -2, -2, -2, -2, -2, -2, -2, -2, -2, -2, -2, -2, -2, -2,
|
||||
/* 60 */ -2, -2, -2, -2, -2, -2, -2, -2, -2, -2, -2, -2, -2, -2, -2, -2,
|
||||
/* 70 */ -2, -2, -2, -2, -2, -2, -2, -2, -2, -2, -2, -2, -2, -2, -2, -2,
|
||||
/* 80 */ -2, -2, -2, -2, -2, -2, -2, -2, -2, -2, -2, -2, -2, -2, -2, -2,
|
||||
/* 90 */ -2, -2, -2, -2, -2, -2, -2, -2, -2, -2, -2, -2, -2, -2, -2, -2,
|
||||
/* a0 */ -2, -2, -2, -2, -2, -2, -2, -2, -2, -2, -2, -2, -2, -2, -2, -2,
|
||||
/* b0 */ -2, -2, -2, -2, -2, -2, -2, -2, -2, -2, -2, -2, -2, -2, -2, -2,
|
||||
/* c0 */ -2, -2, -2, -2, -2, -2, -2, -2, -2, -2, -2, -2, -2, -2, -2, -2,
|
||||
/* d0 */ -2, -2, -2, -2, -2, -2, -2, -2, -2, -2, -2, -2, -2, -2, -2, -2,
|
||||
/* e0 */ -2, -2, -2, -2, -2, -2, -2, -2, -2, -2, -2, -2, -2, -2, -2, -2,
|
||||
/* f0 */ -2, -2, -2, -2, -2, -2, -2, -2, -2, -2, -2, -2, -2, -2, -2, -2,
|
||||
};
|
||||
|
||||
|
||||
@ -54,13 +54,13 @@ UTF32Encoding::UTF32Encoding(ByteOrderType byteOrder)
|
||||
setByteOrder(byteOrder);
|
||||
}
|
||||
|
||||
|
||||
|
||||
UTF32Encoding::UTF32Encoding(int byteOrderMark)
|
||||
{
|
||||
setByteOrder(byteOrderMark);
|
||||
}
|
||||
|
||||
|
||||
|
||||
UTF32Encoding::~UTF32Encoding()
|
||||
{
|
||||
}
|
||||
@ -75,7 +75,7 @@ UTF32Encoding::ByteOrderType UTF32Encoding::getByteOrder() const
|
||||
#endif
|
||||
}
|
||||
|
||||
|
||||
|
||||
void UTF32Encoding::setByteOrder(ByteOrderType byteOrder)
|
||||
{
|
||||
#if defined(POCO_ARCH_BIG_ENDIAN)
|
||||
@ -85,7 +85,7 @@ void UTF32Encoding::setByteOrder(ByteOrderType byteOrder)
|
||||
#endif
|
||||
}
|
||||
|
||||
|
||||
|
||||
void UTF32Encoding::setByteOrder(int byteOrderMark)
|
||||
{
|
||||
_flipBytes = byteOrderMark != 0xFEFF;
|
||||
@ -126,7 +126,7 @@ int UTF32Encoding::convert(const unsigned char* bytes) const
|
||||
|
||||
if (_flipBytes)
|
||||
{
|
||||
ByteOrder::flipBytes(uc);
|
||||
uc = ByteOrder::flipBytes(uc);
|
||||
}
|
||||
|
||||
return uc;
|
||||
@ -160,8 +160,10 @@ int UTF32Encoding::queryConvert(const unsigned char* bytes, int length) const
|
||||
*p++ = *bytes++;
|
||||
*p++ = *bytes++;
|
||||
*p++ = *bytes++;
|
||||
if (_flipBytes)
|
||||
ByteOrder::flipBytes(uc);
|
||||
if (_flipBytes)
|
||||
{
|
||||
uc = ByteOrder::flipBytes(uc);
|
||||
}
|
||||
return uc;
|
||||
}
|
||||
|
||||
|
@ -2652,6 +2652,19 @@ typedef struct {
|
||||
pcre_uint16 value;
|
||||
} ucp_type_table;
|
||||
|
||||
/* renamed to avoid clashes with system pcre */
|
||||
#define _pcre_utf8_table1 _poco_pcre_utf8_table1
|
||||
#define _pcre_utf8_table1_size _poco_pcre_utf8_table1_size
|
||||
#define _pcre_utf8_table2 _poco_pcre_utf8_table2
|
||||
#define _pcre_utf8_table3 _poco_pcre_utf8_table3
|
||||
#define _pcre_utf8_table4 _poco_pcre_utf8_table4
|
||||
#define _pcre_utt _poco_pcre_utt
|
||||
#define _pcre_utt_size _poco_pcre_utt_size
|
||||
#define _pcre_utt_names _poco_pcre_utt_names
|
||||
#define _pcre_OP_lengths _poco_pcre_OP_lengths
|
||||
#define _pcre_ucp_gbtable _poco_pcre_ucp_gbtable
|
||||
#define _pcre_vspace_list _poco_pcre_vspace_list
|
||||
#define _pcre_hspace_list _poco_pcre_hspace_list
|
||||
|
||||
/* Internal shared data tables. These are tables that are used by more than one
|
||||
of the exported public functions. They have to be "external" in the C sense,
|
||||
@ -2766,6 +2779,13 @@ typedef struct {
|
||||
pcre_int32 other_case; /* offset to other case, or zero if none */
|
||||
} ucd_record;
|
||||
|
||||
/* renamed to avoid clashes with system pcre */
|
||||
#define _pcre_ucd_records _poco_pcre_ucd_records
|
||||
#define _pcre_ucd_stage1 _poco_pcre_ucd_stage1
|
||||
#define _pcre_ucd_stage2 _poco_pcre_ucd_stage2
|
||||
#define _pcre_ucp_gentype _poco_pcre_ucp_gentype
|
||||
#define _pcre_ucd_caseless_sets _poco_pcre_ucd_caseless_sets
|
||||
|
||||
extern const pcre_uint32 PRIV(ucd_caseless_sets)[];
|
||||
extern const ucd_record PRIV(ucd_records)[];
|
||||
extern const pcre_uint8 PRIV(ucd_stage1)[];
|
||||
|
@ -2,63 +2,72 @@ set(TESTUNIT "Foundation-testrunner")
|
||||
|
||||
# Sources
|
||||
file(GLOB SRCS_G "src/*.cpp")
|
||||
file(GLOB SRCS_G_REMOVE
|
||||
src/TestApp.cpp
|
||||
src/TestApp_WINCE.cpp
|
||||
src/TestLibrary.cpp
|
||||
src/TestPlugin.cpp
|
||||
file(GLOB SRCS_G_REMOVE
|
||||
src/TestApp.cpp
|
||||
src/TestApp_WINCE.cpp
|
||||
src/TestLibrary.cpp
|
||||
src/TestPlugin.cpp
|
||||
)
|
||||
list(REMOVE_ITEM SRCS_G ${SRCS_G_REMOVE})
|
||||
POCO_SOURCES_AUTO( TEST_SRCS ${SRCS_G})
|
||||
POCO_SOURCES_AUTO(TEST_SRCS ${SRCS_G})
|
||||
|
||||
# Headers
|
||||
file(GLOB_RECURSE HDRS_G "src/*.h" )
|
||||
POCO_HEADERS_AUTO( TEST_SRCS ${HDRS_G})
|
||||
file(GLOB_RECURSE HDRS_G "src/*.h")
|
||||
POCO_HEADERS_AUTO(TEST_SRCS ${HDRS_G})
|
||||
|
||||
# WinDriver depends on WinTestRunner which depends on MFC, and we don't want that
|
||||
POCO_SOURCES_AUTO_PLAT( TEST_SRCS OFF
|
||||
src/WinDriver.cpp
|
||||
POCO_SOURCES_AUTO_PLAT(TEST_SRCS OFF
|
||||
src/WinDriver.cpp
|
||||
)
|
||||
|
||||
POCO_SOURCES_AUTO_PLAT( TEST_SRCS WINCE
|
||||
src/WinCEDriver.cpp
|
||||
POCO_SOURCES_AUTO_PLAT(TEST_SRCS WINCE
|
||||
src/WinCEDriver.cpp
|
||||
)
|
||||
|
||||
add_executable(Foundation-testrunner ${TEST_SRCS} )
|
||||
add_executable(Foundation-testrunner ${TEST_SRCS})
|
||||
if(ANDROID)
|
||||
add_test(NAME Foundation WORKING_DIRECTORY ${CMAKE_RUNTIME_OUTPUT_DIRECTORY}
|
||||
COMMAND ${CMAKE_COMMAND} -DANDROID_NDK=${ANDROID_NDK} "-DTEST_FILES=${CMAKE_CURRENT_SOURCE_DIR}/data;${CMAKE_BINARY_DIR}/bin/TestApp;${CMAKE_BINARY_DIR}/bin/TestLibrary.so" -DLIBRARY_DIR=${CMAKE_BINARY_DIR}/lib -DUNITTEST=${CMAKE_BINARY_DIR}/bin/Foundation-testrunner -DTEST_PARAMETER=-all -P ${CMAKE_SOURCE_DIR}/cmake/ExecuteOnAndroid.cmake)
|
||||
add_test(
|
||||
NAME Foundation
|
||||
WORKING_DIRECTORY ${CMAKE_RUNTIME_OUTPUT_DIRECTORY}
|
||||
COMMAND ${CMAKE_COMMAND} -DANDROID_NDK=${ANDROID_NDK} "-DTEST_FILES=${CMAKE_CURRENT_SOURCE_DIR}/data;${CMAKE_BINARY_DIR}/bin/TestApp;${CMAKE_BINARY_DIR}/bin/TestLibrary.so" -DLIBRARY_DIR=${CMAKE_BINARY_DIR}/lib -DUNITTEST=${CMAKE_BINARY_DIR}/bin/Foundation-testrunner -DTEST_PARAMETER=-all -P ${CMAKE_SOURCE_DIR}/cmake/ExecuteOnAndroid.cmake
|
||||
)
|
||||
else()
|
||||
add_test(NAME Foundation WORKING_DIRECTORY ${CMAKE_RUNTIME_OUTPUT_DIRECTORY} COMMAND Foundation-testrunner -ignore ${CMAKE_SOURCE_DIR}/cppignore.lnx -all)
|
||||
set_tests_properties(Foundation PROPERTIES ENVIRONMENT "LD_LIBRARY_PATH=${CMAKE_RUNTIME_OUTPUT_DIRECTORY}") # The SharedLibaryTest has to look for shared libraries in the working directory
|
||||
set_property(TEST Foundation APPEND PROPERTY ENVIRONMENT "PATH=${CMAKE_RUNTIME_OUTPUT_DIRECTORY}:$ENV{PATH}") # The ProcessTest has to look for the TestApp in the working directory
|
||||
set_property(TEST Foundation APPEND PROPERTY ENVIRONMENT "POCO_BASE=${CMAKE_SOURCE_DIR}")
|
||||
# The test is run in the runtime directory. So the test data is copied there too
|
||||
add_custom_command(TARGET Foundation-testrunner POST_BUILD
|
||||
COMMAND ${CMAKE_COMMAND} -E copy_directory ${CMAKE_CURRENT_SOURCE_DIR}/data ${CMAKE_RUNTIME_OUTPUT_DIRECTORY}/data )
|
||||
add_test(
|
||||
NAME Foundation
|
||||
WORKING_DIRECTORY ${CMAKE_RUNTIME_OUTPUT_DIRECTORY}
|
||||
COMMAND Foundation-testrunner -ignore ${CMAKE_SOURCE_DIR}/cppignore.lnx -all
|
||||
)
|
||||
set_tests_properties(Foundation PROPERTIES ENVIRONMENT "LD_LIBRARY_PATH=${CMAKE_RUNTIME_OUTPUT_DIRECTORY}") # The SharedLibaryTest has to look for shared libraries in the working directory
|
||||
set_property(TEST Foundation APPEND PROPERTY ENVIRONMENT "PATH=${CMAKE_RUNTIME_OUTPUT_DIRECTORY}:$ENV{PATH}") # The ProcessTest has to look for the TestApp in the working directory
|
||||
set_property(TEST Foundation APPEND PROPERTY ENVIRONMENT "POCO_BASE=${CMAKE_SOURCE_DIR}")
|
||||
# The test is run in the runtime directory. So the test data is copied there too
|
||||
add_custom_command(
|
||||
TARGET Foundation-testrunner POST_BUILD
|
||||
COMMAND ${CMAKE_COMMAND} -E copy_directory ${CMAKE_CURRENT_SOURCE_DIR}/data ${CMAKE_RUNTIME_OUTPUT_DIRECTORY}/data
|
||||
)
|
||||
endif()
|
||||
|
||||
target_link_libraries(Foundation-testrunner PUBLIC Poco::Foundation CppUnit )
|
||||
target_link_libraries(Foundation-testrunner PUBLIC Poco::Foundation CppUnit)
|
||||
if(UNIX AND NOT ANDROID)
|
||||
target_link_libraries(Foundation-testrunner PUBLIC pthread)
|
||||
endif(UNIX AND NOT ANDROID)
|
||||
|
||||
# TestApp
|
||||
if(WINCE)
|
||||
add_executable( TestApp src/TestApp_WINCE.cpp )
|
||||
add_executable(TestApp src/TestApp_WINCE.cpp)
|
||||
set_target_properties(TestApp PROPERTIES LINK_FLAGS "/ENTRY:wmainCRTStartup")
|
||||
else()
|
||||
add_executable( TestApp src/TestApp.cpp )
|
||||
add_executable(TestApp src/TestApp.cpp)
|
||||
endif()
|
||||
# The test is run in the runtime directory. So the TestApp is built there too because it is used by the tests
|
||||
set_target_properties( TestApp PROPERTIES RUNTIME_OUTPUT_DIRECTORY ${CMAKE_RUNTIME_OUTPUT_DIRECTORY} )
|
||||
target_link_libraries( TestApp PUBLIC Poco::Foundation )
|
||||
set_target_properties(TestApp PROPERTIES RUNTIME_OUTPUT_DIRECTORY ${CMAKE_RUNTIME_OUTPUT_DIRECTORY})
|
||||
target_link_libraries(TestApp PUBLIC Poco::Foundation)
|
||||
|
||||
# TestLibrary
|
||||
add_library(TestLibrary SHARED src/TestLibrary.cpp src/TestPlugin.cpp src/TestPlugin.h )
|
||||
add_library(TestLibrary SHARED src/TestLibrary.cpp src/TestPlugin.cpp src/TestPlugin.h)
|
||||
set_target_properties(TestLibrary PROPERTIES PREFIX "" DEBUG_POSTFIX "") # The test requires the library named TestLibrary. By default it is prefixed with lib.
|
||||
# The test is run in the runtime directory. So the TestLibrary is built there too because it is used by the tests
|
||||
set_target_properties(TestLibrary PROPERTIES LIBRARY_OUTPUT_DIRECTORY ${CMAKE_RUNTIME_OUTPUT_DIRECTORY} )
|
||||
target_link_libraries(TestLibrary PUBLIC Poco::Foundation )
|
||||
set_target_properties(TestLibrary PROPERTIES LIBRARY_OUTPUT_DIRECTORY ${CMAKE_RUNTIME_OUTPUT_DIRECTORY})
|
||||
target_link_libraries(TestLibrary PUBLIC Poco::Foundation)
|
||||
|
||||
add_dependencies(Foundation-testrunner TestApp TestLibrary)
|
||||
|
@ -37,39 +37,39 @@ namespace
|
||||
TestObj(int value1, const std::string& value2): _rc(1)
|
||||
{
|
||||
}
|
||||
|
||||
|
||||
void duplicate()
|
||||
{
|
||||
++_rc;
|
||||
}
|
||||
|
||||
|
||||
void release()
|
||||
{
|
||||
if (--_rc == 0)
|
||||
delete this;
|
||||
}
|
||||
|
||||
|
||||
int rc() const
|
||||
{
|
||||
return _rc;
|
||||
}
|
||||
|
||||
|
||||
static int count()
|
||||
{
|
||||
return _count;
|
||||
}
|
||||
|
||||
|
||||
protected:
|
||||
~TestObj()
|
||||
{
|
||||
--_count;
|
||||
}
|
||||
|
||||
|
||||
private:
|
||||
int _rc;
|
||||
static int _count;
|
||||
};
|
||||
|
||||
|
||||
int TestObj::_count = 0;
|
||||
}
|
||||
|
||||
@ -137,27 +137,27 @@ void AutoPtrTest::testOps()
|
||||
assertTrue (ptr2 == pTO2);
|
||||
assertTrue (ptr3.get() == pTO1);
|
||||
assertTrue (ptr3 == pTO1);
|
||||
|
||||
|
||||
assertTrue (ptr1 == pTO1);
|
||||
assertTrue (ptr1 != pTO2);
|
||||
assertTrue (ptr1 < pTO2);
|
||||
assertTrue (ptr1 <= pTO2);
|
||||
assertTrue (ptr2 > pTO1);
|
||||
assertTrue (ptr2 >= pTO1);
|
||||
|
||||
|
||||
assertTrue (ptr1 == ptr3);
|
||||
assertTrue (ptr1 != ptr2);
|
||||
assertTrue (ptr1 < ptr2);
|
||||
assertTrue (ptr1 <= ptr2);
|
||||
assertTrue (ptr2 > ptr1);
|
||||
assertTrue (ptr2 >= ptr1);
|
||||
|
||||
|
||||
ptr1 = pTO1;
|
||||
ptr2 = pTO2;
|
||||
ptr1.swap(ptr2);
|
||||
assertTrue (ptr2.get() == pTO1);
|
||||
assertTrue (ptr1.get() == pTO2);
|
||||
|
||||
|
||||
try
|
||||
{
|
||||
assertTrue (ptr4->rc() > 0);
|
||||
@ -171,14 +171,17 @@ void AutoPtrTest::testOps()
|
||||
assertTrue (!(ptr4 == ptr2));
|
||||
assertTrue (ptr4 != ptr1);
|
||||
assertTrue (ptr4 != ptr2);
|
||||
|
||||
|
||||
ptr4 = ptr2;
|
||||
assertTrue (ptr4 == ptr2);
|
||||
assertTrue (!(ptr4 != ptr2));
|
||||
|
||||
|
||||
assertTrue (!(!ptr1));
|
||||
ptr1 = 0;
|
||||
assertTrue (!ptr1);
|
||||
|
||||
assertTrue (ptr1 == nullptr);
|
||||
assertTrue (ptr2 != nullptr);
|
||||
}
|
||||
|
||||
|
||||
|
@ -16,6 +16,7 @@
|
||||
#include "Poco/PipeStream.h"
|
||||
|
||||
|
||||
using namespace std::string_literals;
|
||||
using Poco::Process;
|
||||
using Poco::ProcessHandle;
|
||||
using Poco::Pipe;
|
||||
@ -33,6 +34,24 @@ ProcessTest::~ProcessTest()
|
||||
}
|
||||
|
||||
|
||||
void ProcessTest::testEscapeArgs()
|
||||
{
|
||||
#if defined(_WIN32)
|
||||
assertTrue (Poco::ProcessImpl::mustEscapeArg("a b"));
|
||||
assertFalse (Poco::ProcessImpl::mustEscapeArg("abc"));
|
||||
assertFalse (Poco::ProcessImpl::mustEscapeArg("\"a b \""));
|
||||
assertFalse (Poco::ProcessImpl::mustEscapeArg("\"abc\""));
|
||||
assertTrue (Poco::ProcessImpl::mustEscapeArg("\"a b "));
|
||||
assertFalse (Poco::ProcessImpl::mustEscapeArg("/arg=\"a b c\""));
|
||||
|
||||
assertEquals ("abc"s, Poco::ProcessImpl::escapeArg("abc"));
|
||||
assertEquals ("\"a b c\""s, Poco::ProcessImpl::escapeArg("a b c"));
|
||||
assertEquals ("\"a b \\\" c\""s, Poco::ProcessImpl::escapeArg("a b \" c"));
|
||||
assertEquals ("/arg=\"a b c\""s, Poco::ProcessImpl::escapeArg("/arg=\"a b c\""));
|
||||
#endif
|
||||
}
|
||||
|
||||
|
||||
void ProcessTest::testLaunch()
|
||||
{
|
||||
std::string name("TestApp");
|
||||
@ -253,6 +272,7 @@ CppUnit::Test* ProcessTest::suite()
|
||||
{
|
||||
CppUnit::TestSuite* pSuite = new CppUnit::TestSuite("ProcessTest");
|
||||
|
||||
CppUnit_addTest(pSuite, ProcessTest, testEscapeArgs);
|
||||
CppUnit_addTest(pSuite, ProcessTest, testLaunch);
|
||||
CppUnit_addTest(pSuite, ProcessTest, testLaunchRedirectIn);
|
||||
CppUnit_addTest(pSuite, ProcessTest, testLaunchRedirectOut);
|
||||
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
x
Reference in New Issue
Block a user