diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 30a4e54f4e..4baef3606a 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -346,7 +346,7 @@ jobs: class CppUnit::TestCaller.testProxy steps: - uses: actions/checkout@v3 - - run: cmake -S. -Bcmake-build -DENABLE_NETSSL_WIN=ON -DENABLE_NETSSL=OFF -DENABLE_CRYPTO=OFF -DENABLE_JWT=OFF -DENABLE_DATA=ON -DENABLE_DATA_ODBC=ON -DENABLE_DATA_MYSQL=OFF -DENABLE_DATA_POSTGRESQL=OFF -DENABLE_TESTS=ON + - run: cmake -S. -Bcmake-build -DENABLE_NETSSL_WIN=ON -DENABLE_NETSSL=OFF -DENABLE_CRYPTO=OFF -DENABLE_JWT=OFF -DENABLE_DATA=ON -DENABLE_DATA_ODBC=ON -DENABLE_DATA_MYSQL=OFF -DENABLE_DATA_POSTGRESQL=OFF -DENABLE_TESTS=ON -DCMAKE_CXX_FLAGS="/MP /EHsc" -DCMAKE_C_FLAGS="/MP" - run: cmake --build cmake-build --config Release - uses: ./.github/actions/retry-action with: diff --git a/CppParser/testsuite/TestSuite.progen b/CppParser/testsuite/TestSuite.progen index 67d728c5d3..ca967f5d23 100644 --- a/CppParser/testsuite/TestSuite.progen +++ b/CppParser/testsuite/TestSuite.progen @@ -7,4 +7,4 @@ vc.project.platforms = Win32 vc.project.configurations = debug_shared, release_shared, debug_static_mt, release_static_mt, debug_static_md, release_static_md vc.project.prototype = TestSuite_vs90.vcproj vc.project.compiler.include = ..\\..\\Foundation\\include -vc.project.linker.dependencies = iphlpapi.lib +vc.project.linker.dependencies = iphlpapi.lib mswsock.lib diff --git a/Crypto/Crypto.progen b/Crypto/Crypto.progen index f3492c130f..778deba000 100644 --- a/Crypto/Crypto.progen +++ b/Crypto/Crypto.progen @@ -12,7 +12,7 @@ vc.project.compiler.defines = vc.project.compiler.defines.shared = ${vc.project.name}_EXPORTS vc.project.compiler.defines.debug_shared = ${vc.project.compiler.defines.shared} vc.project.compiler.defines.release_shared = ${vc.project.compiler.defines.shared} -vc.project.linker.dependencies = ws2_32.lib iphlpapi.lib +vc.project.linker.dependencies = ws2_32.lib iphlpapi.lib mswsock.lib vc.project.linker.dependencies.debug_shared = vc.project.linker.dependencies.release_shared = vc.project.linker.dependencies.debug_static_md = Crypt32.lib diff --git a/Crypto/samples/genrsakey/genrsakey.progen b/Crypto/samples/genrsakey/genrsakey.progen index 6b42329a81..15c79a4734 100644 --- a/Crypto/samples/genrsakey/genrsakey.progen +++ b/Crypto/samples/genrsakey/genrsakey.progen @@ -7,7 +7,7 @@ vc.project.platforms = Win32 vc.project.configurations = debug_shared, release_shared, debug_static_mt, release_static_mt, debug_static_md, release_static_md vc.project.prototype = ${vc.project.name}_vs90.vcproj vc.project.compiler.include = ..\\..\\..\\Foundation\\include;..\\..\\..\\XML\\include;..\\..\\..\\Util\\include;..\\..\\..\\Crypto\\include -vc.project.linker.dependencies.Win32 = ws2_32.lib iphlpapi.lib +vc.project.linker.dependencies.Win32 = ws2_32.lib iphlpapi.lib mswsock.lib vc.project.linker.dependencies.debug_shared = vc.project.linker.dependencies.release_shared = vc.project.linker.dependencies.debug_static_md = Crypt32.lib diff --git a/Crypto/testsuite/TestSuite.progen b/Crypto/testsuite/TestSuite.progen index 242a68ec1c..086e660d90 100644 --- a/Crypto/testsuite/TestSuite.progen +++ b/Crypto/testsuite/TestSuite.progen @@ -8,7 +8,7 @@ vc.project.configurations = debug_shared, release_shared, debug_static_mt, relea vc.project.prototype = TestSuite_vs90.vcproj vc.project.compiler.include = ${vc.project.pocobase}\\Foundation\\include vc.project.compiler.defines = _CRT_SECURE_NO_WARNINGS -vc.project.linker.dependencies = ws2_32.lib iphlpapi.lib +vc.project.linker.dependencies = ws2_32.lib iphlpapi.lib mswsock.lib vc.project.linker.dependencies.debug_shared = vc.project.linker.dependencies.release_shared = vc.project.linker.dependencies.debug_static_md = diff --git a/Data/MySQL/testsuite/TestSuite.progen b/Data/MySQL/testsuite/TestSuite.progen index bce2d53acc..f9f15dcf22 100644 --- a/Data/MySQL/testsuite/TestSuite.progen +++ b/Data/MySQL/testsuite/TestSuite.progen @@ -9,4 +9,4 @@ vc.project.prototype = TestSuite_vs90.vcproj mysql = ${vc.project.pocobase}\\mysql vc.project.compiler.include = ${mysql}\\include;${vc.project.pocobase}\\Foundation\\include; \ ${vc.project.pocobase}\\Data\\include;${vc.project.pocobase}\\Data\\src -vc.project.linker.dependencies.Win32 = iphlpapi.lib +vc.project.linker.dependencies.Win32 = iphlpapi.lib mswsock.lib diff --git a/Data/ODBC/testsuite/TestSuite.progen b/Data/ODBC/testsuite/TestSuite.progen index ad611e51d4..4516728846 100644 --- a/Data/ODBC/testsuite/TestSuite.progen +++ b/Data/ODBC/testsuite/TestSuite.progen @@ -7,4 +7,4 @@ vc.project.platforms = Win32 vc.project.configurations = debug_shared, release_shared, debug_static_mt, release_static_mt, debug_static_md, release_static_md vc.project.prototype = TestSuite_vs90.vcproj vc.project.compiler.include = ..\\..\\..\\CppUnit\\include;..\\..\\..\\Foundation\\include;..\\..\\..\\Data\\include;..\\..\\..\\Data\\src;..\\..\\..\\Data\\testsuite\\DataTest\\include -vc.project.linker.dependencies = odbc32.lib odbccp32.lib iphlpapi.lib +vc.project.linker.dependencies = odbc32.lib odbccp32.lib iphlpapi.lib mswsock.lib diff --git a/Data/PostgreSQL/testsuite/TestSuite.progen b/Data/PostgreSQL/testsuite/TestSuite.progen index 3e02e52256..a1f5145e3f 100644 --- a/Data/PostgreSQL/testsuite/TestSuite.progen +++ b/Data/PostgreSQL/testsuite/TestSuite.progen @@ -10,7 +10,7 @@ postgresql = ${vc.project.pocobase}\\postgresql vc.project.compiler.include = ${postgresql}\\include;${vc.project.pocobase}\\Foundation\\include; \ ${vc.project.pocobase}\\Data\\include;${vc.project.pocobase}\\Data\\src vc.project.compiler.defines = _CRT_SECURE_NO_WARNINGS -vc.project.linker.dependencies = iphlpapi.lib +vc.project.linker.dependencies = iphlpapi.lib mswsock.lib vc.project.linker.dependencies.debug_shared = vc.project.linker.dependencies.release_shared = vc.project.linker.dependencies.debug_static_md = diff --git a/Data/SQLite/testsuite/TestSuite.progen b/Data/SQLite/testsuite/TestSuite.progen index c0784b9350..515abb7c89 100644 --- a/Data/SQLite/testsuite/TestSuite.progen +++ b/Data/SQLite/testsuite/TestSuite.progen @@ -7,4 +7,4 @@ vc.project.platforms = Win32 vc.project.configurations = debug_shared, release_shared, debug_static_mt, release_static_mt, debug_static_md, release_static_md vc.project.prototype = TestSuite_vs90.vcproj vc.project.compiler.include = ..\\..\\..\\Foundation\\include;..\\..\\..\\Data\\include;..\\..\\..\\Data\\src -vc.project.linker.dependencies = iphlpapi.lib +vc.project.linker.dependencies = iphlpapi.lib mswsock.lib diff --git a/Data/samples/Binding/Binding.progen b/Data/samples/Binding/Binding.progen index a3dd5dfddc..d4f19fff63 100644 --- a/Data/samples/Binding/Binding.progen +++ b/Data/samples/Binding/Binding.progen @@ -7,4 +7,4 @@ vc.project.platforms = Win32 vc.project.configurations = debug_shared, release_shared, debug_static_mt, release_static_mt, debug_static_md, release_static_md vc.project.prototype = ${vc.project.name}_vs90.vcproj vc.project.compiler.include = ..\\..\\..\\Foundation\\include;..\\..\\..\\XML\\include;..\\..\\..\\Util\\include;..\\..\\..\\Data\\include;..\\..\\..\\Data\\src;..\\..\\..\\Data\\SQLite\\include -vc.project.linker.dependencies = iphlpapi.lib +vc.project.linker.dependencies = iphlpapi.lib mswsock.lib diff --git a/Data/samples/RecordSet/RecordSet.progen b/Data/samples/RecordSet/RecordSet.progen index a3dd5dfddc..d4f19fff63 100644 --- a/Data/samples/RecordSet/RecordSet.progen +++ b/Data/samples/RecordSet/RecordSet.progen @@ -7,4 +7,4 @@ vc.project.platforms = Win32 vc.project.configurations = debug_shared, release_shared, debug_static_mt, release_static_mt, debug_static_md, release_static_md vc.project.prototype = ${vc.project.name}_vs90.vcproj vc.project.compiler.include = ..\\..\\..\\Foundation\\include;..\\..\\..\\XML\\include;..\\..\\..\\Util\\include;..\\..\\..\\Data\\include;..\\..\\..\\Data\\src;..\\..\\..\\Data\\SQLite\\include -vc.project.linker.dependencies = iphlpapi.lib +vc.project.linker.dependencies = iphlpapi.lib mswsock.lib diff --git a/Data/samples/RowFormatter/RowFormatter.progen b/Data/samples/RowFormatter/RowFormatter.progen index a3dd5dfddc..d4f19fff63 100644 --- a/Data/samples/RowFormatter/RowFormatter.progen +++ b/Data/samples/RowFormatter/RowFormatter.progen @@ -7,4 +7,4 @@ vc.project.platforms = Win32 vc.project.configurations = debug_shared, release_shared, debug_static_mt, release_static_mt, debug_static_md, release_static_md vc.project.prototype = ${vc.project.name}_vs90.vcproj vc.project.compiler.include = ..\\..\\..\\Foundation\\include;..\\..\\..\\XML\\include;..\\..\\..\\Util\\include;..\\..\\..\\Data\\include;..\\..\\..\\Data\\src;..\\..\\..\\Data\\SQLite\\include -vc.project.linker.dependencies = iphlpapi.lib +vc.project.linker.dependencies = iphlpapi.lib mswsock.lib diff --git a/Data/samples/Tuple/Tuple.progen b/Data/samples/Tuple/Tuple.progen index a3dd5dfddc..d4f19fff63 100644 --- a/Data/samples/Tuple/Tuple.progen +++ b/Data/samples/Tuple/Tuple.progen @@ -7,4 +7,4 @@ vc.project.platforms = Win32 vc.project.configurations = debug_shared, release_shared, debug_static_mt, release_static_mt, debug_static_md, release_static_md vc.project.prototype = ${vc.project.name}_vs90.vcproj vc.project.compiler.include = ..\\..\\..\\Foundation\\include;..\\..\\..\\XML\\include;..\\..\\..\\Util\\include;..\\..\\..\\Data\\include;..\\..\\..\\Data\\src;..\\..\\..\\Data\\SQLite\\include -vc.project.linker.dependencies = iphlpapi.lib +vc.project.linker.dependencies = iphlpapi.lib mswsock.lib diff --git a/Data/samples/TypeHandler/TypeHandler.progen b/Data/samples/TypeHandler/TypeHandler.progen index 96965a6ce9..396ddefbf0 100644 --- a/Data/samples/TypeHandler/TypeHandler.progen +++ b/Data/samples/TypeHandler/TypeHandler.progen @@ -7,4 +7,4 @@ vc.project.platforms = Win32 vc.project.configurations = debug_shared, release_shared, debug_static_mt, release_static_mt, debug_static_md, release_static_md vc.project.prototype = ${vc.project.name}_vs90.vcproj vc.project.compiler.include = ..\\..\\..\\Foundation\\include;..\\..\\..\\XML\\include;..\\..\\..\\Util\\include;..\\..\\..\\Data\\include;..\\..\\..\\Data\\src;..\\..\\..\\Data\\SQLite\\include -vc.project.linker.dependencies.Win32 = ws2_32.lib iphlpapi.lib +vc.project.linker.dependencies.Win32 = ws2_32.lib iphlpapi.lib mswsock.lib diff --git a/Data/samples/WebNotifier/WebNotifier.progen b/Data/samples/WebNotifier/WebNotifier.progen index 7d8738bb13..8d7de14a3a 100644 --- a/Data/samples/WebNotifier/WebNotifier.progen +++ b/Data/samples/WebNotifier/WebNotifier.progen @@ -7,4 +7,4 @@ vc.project.platforms = Win32 vc.project.configurations = debug_shared, release_shared, debug_static_mt, release_static_mt, debug_static_md, release_static_md vc.project.prototype = ${vc.project.name}_vs90.vcproj vc.project.compiler.include = ..\\..\\..\\Foundation\\include;..\\..\\..\\Data\\include;..\\..\\..\\Data\\src;..\\..\\..\\Data\\SQLite\\include;..\\..\\..\\Net\\include -vc.project.linker.dependencies = ws2_32.lib iphlpapi.lib +vc.project.linker.dependencies = ws2_32.lib iphlpapi.lib mswsock.lib diff --git a/Data/testsuite/TestSuite.progen b/Data/testsuite/TestSuite.progen index 6e936ac494..c035310b34 100644 --- a/Data/testsuite/TestSuite.progen +++ b/Data/testsuite/TestSuite.progen @@ -11,4 +11,4 @@ vc.project.prototype = TestSuite_vs90.vcproj #vc.project.compiler.std.c=stdc11 vc.project.compiler.additionalOptions = /Zc:__cplusplus /std:c++17 vc.project.compiler.include = ..\\src;..\\..\\Foundation\\include -vc.project.linker.dependencies.Win32 = iphlpapi.lib +vc.project.linker.dependencies.Win32 = iphlpapi.lib mswsock.lib diff --git a/Encodings/Compiler/Compiler.progen b/Encodings/Compiler/Compiler.progen index 724d3e9c4f..310238652b 100644 --- a/Encodings/Compiler/Compiler.progen +++ b/Encodings/Compiler/Compiler.progen @@ -12,5 +12,5 @@ vc.project.compiler.defines = vc.project.compiler.defines.shared = vc.project.compiler.defines.debug_shared = ${vc.project.compiler.defines.shared} vc.project.compiler.defines.release_shared = ${vc.project.compiler.defines.shared} -vc.project.linker.dependencies = ws2_32.lib iphlpapi.lib +vc.project.linker.dependencies = ws2_32.lib iphlpapi.lib mswsock.lib vc.solution.create = true diff --git a/Encodings/samples/TextConverter/TextConverter.progen b/Encodings/samples/TextConverter/TextConverter.progen index ccd636a33c..074b456266 100644 --- a/Encodings/samples/TextConverter/TextConverter.progen +++ b/Encodings/samples/TextConverter/TextConverter.progen @@ -7,4 +7,4 @@ vc.project.platforms = Win32 vc.project.configurations = debug_shared, release_shared, debug_static_mt, release_static_mt, debug_static_md, release_static_md vc.project.prototype = ${vc.project.name}_vs90.vcproj vc.project.compiler.include = ..\\..\\..\\Foundation\\include;..\\..\\..\\Encodings\\include -vc.project.linker.dependencies.Win32 = ws2_32.lib iphlpapi.lib +vc.project.linker.dependencies.Win32 = ws2_32.lib iphlpapi.lib mswsock.lib diff --git a/Foundation/include/Poco/FileStream.h b/Foundation/include/Poco/FileStream.h index 78cfa0f0dc..768364bbd6 100644 --- a/Foundation/include/Poco/FileStream.h +++ b/Foundation/include/Poco/FileStream.h @@ -47,6 +47,9 @@ class Foundation_API FileIOS: public virtual std::ios /// On Windows platforms, UTF-8 encoded Unicode paths are correctly handled. { public: + + using NativeHandle = FileStreamBuf::NativeHandle; + FileIOS(); /// Creates the basic stream. @@ -63,6 +66,12 @@ class Foundation_API FileIOS: public virtual std::ios FileStreamBuf* rdbuf(); /// Returns a pointer to the underlying streambuf. + NativeHandle nativeHandle() const; + /// Returns native file descriptor handle + + Poco::UInt64 size() const; + /// Returns file size + protected: FileStreamBuf _buf; }; diff --git a/Foundation/include/Poco/FileStream_POSIX.h b/Foundation/include/Poco/FileStream_POSIX.h index 3d19bdec2a..8e7ef8fb29 100644 --- a/Foundation/include/Poco/FileStream_POSIX.h +++ b/Foundation/include/Poco/FileStream_POSIX.h @@ -31,6 +31,8 @@ class Foundation_API FileStreamBuf: public BufferedBidirectionalStreamBuf /// This stream buffer handles Fileio { public: + using NativeHandle = int; + FileStreamBuf(); /// Creates a FileStreamBuf. @@ -50,6 +52,12 @@ class Foundation_API FileStreamBuf: public BufferedBidirectionalStreamBuf std::streampos seekpos(std::streampos pos, std::ios::openmode mode = std::ios::in | std::ios::out); /// Change to specified position, according to mode. + NativeHandle nativeHandle() const; + /// Returns native file descriptor handle + + Poco::UInt64 size() const; + /// Returns file size + protected: enum { @@ -61,7 +69,7 @@ class Foundation_API FileStreamBuf: public BufferedBidirectionalStreamBuf private: std::string _path; - int _fd; + NativeHandle _fd; std::streamoff _pos; }; diff --git a/Foundation/include/Poco/FileStream_WIN32.h b/Foundation/include/Poco/FileStream_WIN32.h index 5382f84db3..d26f1ffed0 100644 --- a/Foundation/include/Poco/FileStream_WIN32.h +++ b/Foundation/include/Poco/FileStream_WIN32.h @@ -30,6 +30,8 @@ class Foundation_API FileStreamBuf: public BufferedBidirectionalStreamBuf /// This stream buffer handles Fileio { public: + using NativeHandle = HANDLE; + FileStreamBuf(); /// Creates a FileStreamBuf. @@ -49,6 +51,12 @@ class Foundation_API FileStreamBuf: public BufferedBidirectionalStreamBuf std::streampos seekpos(std::streampos pos, std::ios::openmode mode = std::ios::in | std::ios::out); /// change to specified position, according to mode + NativeHandle nativeHandle() const; + /// Returns native file descriptor handle + + Poco::UInt64 size() const; + /// Returns file size + protected: enum { @@ -60,7 +68,7 @@ class Foundation_API FileStreamBuf: public BufferedBidirectionalStreamBuf private: std::string _path; - HANDLE _handle; + NativeHandle _handle; UInt64 _pos; }; diff --git a/Foundation/samples/ActiveMethod/ActiveMethod.progen b/Foundation/samples/ActiveMethod/ActiveMethod.progen index 7c2c98bb52..e99390def8 100644 --- a/Foundation/samples/ActiveMethod/ActiveMethod.progen +++ b/Foundation/samples/ActiveMethod/ActiveMethod.progen @@ -7,4 +7,4 @@ vc.project.platforms = Win32 vc.project.configurations = debug_shared, release_shared, debug_static_mt, release_static_mt, debug_static_md, release_static_md vc.project.prototype = ${vc.project.name}_vs90.vcproj vc.project.compiler.include = ..\\..\\..\\Foundation\\include -vc.project.linker.dependencies.Win32 = ws2_32.lib iphlpapi.lib +vc.project.linker.dependencies.Win32 = ws2_32.lib iphlpapi.lib mswsock.lib diff --git a/Foundation/samples/Activity/Activity.progen b/Foundation/samples/Activity/Activity.progen index 7c2c98bb52..e99390def8 100644 --- a/Foundation/samples/Activity/Activity.progen +++ b/Foundation/samples/Activity/Activity.progen @@ -7,4 +7,4 @@ vc.project.platforms = Win32 vc.project.configurations = debug_shared, release_shared, debug_static_mt, release_static_mt, debug_static_md, release_static_md vc.project.prototype = ${vc.project.name}_vs90.vcproj vc.project.compiler.include = ..\\..\\..\\Foundation\\include -vc.project.linker.dependencies.Win32 = ws2_32.lib iphlpapi.lib +vc.project.linker.dependencies.Win32 = ws2_32.lib iphlpapi.lib mswsock.lib diff --git a/Foundation/samples/BinaryReaderWriter/BinaryReaderWriter.progen b/Foundation/samples/BinaryReaderWriter/BinaryReaderWriter.progen index dbae00da9f..7184a4818b 100644 --- a/Foundation/samples/BinaryReaderWriter/BinaryReaderWriter.progen +++ b/Foundation/samples/BinaryReaderWriter/BinaryReaderWriter.progen @@ -8,4 +8,4 @@ vc.project.configurations = debug_shared, release_shared, debug_static_mt, relea vc.project.prototype = ${vc.project.name}_vs90.vcproj vc.project.compiler.include = ..\\..\\..\\Foundation\\include vc.project.compiler.additionalOptions = /Zc:__cplusplus /std:c++17 -vc.project.linker.dependencies.Win32 = ws2_32.lib iphlpapi.lib +vc.project.linker.dependencies.Win32 = ws2_32.lib iphlpapi.lib mswsock.lib diff --git a/Foundation/samples/DateTime/DateTime.progen b/Foundation/samples/DateTime/DateTime.progen index dbae00da9f..7184a4818b 100644 --- a/Foundation/samples/DateTime/DateTime.progen +++ b/Foundation/samples/DateTime/DateTime.progen @@ -8,4 +8,4 @@ vc.project.configurations = debug_shared, release_shared, debug_static_mt, relea vc.project.prototype = ${vc.project.name}_vs90.vcproj vc.project.compiler.include = ..\\..\\..\\Foundation\\include vc.project.compiler.additionalOptions = /Zc:__cplusplus /std:c++17 -vc.project.linker.dependencies.Win32 = ws2_32.lib iphlpapi.lib +vc.project.linker.dependencies.Win32 = ws2_32.lib iphlpapi.lib mswsock.lib diff --git a/Foundation/samples/LineEndingConverter/LineEndingConverter.progen b/Foundation/samples/LineEndingConverter/LineEndingConverter.progen index dbae00da9f..7184a4818b 100644 --- a/Foundation/samples/LineEndingConverter/LineEndingConverter.progen +++ b/Foundation/samples/LineEndingConverter/LineEndingConverter.progen @@ -8,4 +8,4 @@ vc.project.configurations = debug_shared, release_shared, debug_static_mt, relea vc.project.prototype = ${vc.project.name}_vs90.vcproj vc.project.compiler.include = ..\\..\\..\\Foundation\\include vc.project.compiler.additionalOptions = /Zc:__cplusplus /std:c++17 -vc.project.linker.dependencies.Win32 = ws2_32.lib iphlpapi.lib +vc.project.linker.dependencies.Win32 = ws2_32.lib iphlpapi.lib mswsock.lib diff --git a/Foundation/samples/LogRotation/LogRotation.progen b/Foundation/samples/LogRotation/LogRotation.progen index dbae00da9f..7184a4818b 100644 --- a/Foundation/samples/LogRotation/LogRotation.progen +++ b/Foundation/samples/LogRotation/LogRotation.progen @@ -8,4 +8,4 @@ vc.project.configurations = debug_shared, release_shared, debug_static_mt, relea vc.project.prototype = ${vc.project.name}_vs90.vcproj vc.project.compiler.include = ..\\..\\..\\Foundation\\include vc.project.compiler.additionalOptions = /Zc:__cplusplus /std:c++17 -vc.project.linker.dependencies.Win32 = ws2_32.lib iphlpapi.lib +vc.project.linker.dependencies.Win32 = ws2_32.lib iphlpapi.lib mswsock.lib diff --git a/Foundation/samples/Logger/Logger.progen b/Foundation/samples/Logger/Logger.progen index dbae00da9f..7184a4818b 100644 --- a/Foundation/samples/Logger/Logger.progen +++ b/Foundation/samples/Logger/Logger.progen @@ -8,4 +8,4 @@ vc.project.configurations = debug_shared, release_shared, debug_static_mt, relea vc.project.prototype = ${vc.project.name}_vs90.vcproj vc.project.compiler.include = ..\\..\\..\\Foundation\\include vc.project.compiler.additionalOptions = /Zc:__cplusplus /std:c++17 -vc.project.linker.dependencies.Win32 = ws2_32.lib iphlpapi.lib +vc.project.linker.dependencies.Win32 = ws2_32.lib iphlpapi.lib mswsock.lib diff --git a/Foundation/samples/NotificationQueue/NotificationQueue.progen b/Foundation/samples/NotificationQueue/NotificationQueue.progen index dbae00da9f..7184a4818b 100644 --- a/Foundation/samples/NotificationQueue/NotificationQueue.progen +++ b/Foundation/samples/NotificationQueue/NotificationQueue.progen @@ -8,4 +8,4 @@ vc.project.configurations = debug_shared, release_shared, debug_static_mt, relea vc.project.prototype = ${vc.project.name}_vs90.vcproj vc.project.compiler.include = ..\\..\\..\\Foundation\\include vc.project.compiler.additionalOptions = /Zc:__cplusplus /std:c++17 -vc.project.linker.dependencies.Win32 = ws2_32.lib iphlpapi.lib +vc.project.linker.dependencies.Win32 = ws2_32.lib iphlpapi.lib mswsock.lib diff --git a/Foundation/samples/StringTokenizer/StringTokenizer.progen b/Foundation/samples/StringTokenizer/StringTokenizer.progen index dbae00da9f..7184a4818b 100644 --- a/Foundation/samples/StringTokenizer/StringTokenizer.progen +++ b/Foundation/samples/StringTokenizer/StringTokenizer.progen @@ -8,4 +8,4 @@ vc.project.configurations = debug_shared, release_shared, debug_static_mt, relea vc.project.prototype = ${vc.project.name}_vs90.vcproj vc.project.compiler.include = ..\\..\\..\\Foundation\\include vc.project.compiler.additionalOptions = /Zc:__cplusplus /std:c++17 -vc.project.linker.dependencies.Win32 = ws2_32.lib iphlpapi.lib +vc.project.linker.dependencies.Win32 = ws2_32.lib iphlpapi.lib mswsock.lib diff --git a/Foundation/samples/Timer/Timer.progen b/Foundation/samples/Timer/Timer.progen index dbae00da9f..7184a4818b 100644 --- a/Foundation/samples/Timer/Timer.progen +++ b/Foundation/samples/Timer/Timer.progen @@ -8,4 +8,4 @@ vc.project.configurations = debug_shared, release_shared, debug_static_mt, relea vc.project.prototype = ${vc.project.name}_vs90.vcproj vc.project.compiler.include = ..\\..\\..\\Foundation\\include vc.project.compiler.additionalOptions = /Zc:__cplusplus /std:c++17 -vc.project.linker.dependencies.Win32 = ws2_32.lib iphlpapi.lib +vc.project.linker.dependencies.Win32 = ws2_32.lib iphlpapi.lib mswsock.lib diff --git a/Foundation/samples/URI/URI.progen b/Foundation/samples/URI/URI.progen index dbae00da9f..7184a4818b 100644 --- a/Foundation/samples/URI/URI.progen +++ b/Foundation/samples/URI/URI.progen @@ -8,4 +8,4 @@ vc.project.configurations = debug_shared, release_shared, debug_static_mt, relea vc.project.prototype = ${vc.project.name}_vs90.vcproj vc.project.compiler.include = ..\\..\\..\\Foundation\\include vc.project.compiler.additionalOptions = /Zc:__cplusplus /std:c++17 -vc.project.linker.dependencies.Win32 = ws2_32.lib iphlpapi.lib +vc.project.linker.dependencies.Win32 = ws2_32.lib iphlpapi.lib mswsock.lib diff --git a/Foundation/samples/base64decode/base64decode.progen b/Foundation/samples/base64decode/base64decode.progen index dbae00da9f..7184a4818b 100644 --- a/Foundation/samples/base64decode/base64decode.progen +++ b/Foundation/samples/base64decode/base64decode.progen @@ -8,4 +8,4 @@ vc.project.configurations = debug_shared, release_shared, debug_static_mt, relea vc.project.prototype = ${vc.project.name}_vs90.vcproj vc.project.compiler.include = ..\\..\\..\\Foundation\\include vc.project.compiler.additionalOptions = /Zc:__cplusplus /std:c++17 -vc.project.linker.dependencies.Win32 = ws2_32.lib iphlpapi.lib +vc.project.linker.dependencies.Win32 = ws2_32.lib iphlpapi.lib mswsock.lib diff --git a/Foundation/samples/base64encode/base64encode.progen b/Foundation/samples/base64encode/base64encode.progen index dbae00da9f..7184a4818b 100644 --- a/Foundation/samples/base64encode/base64encode.progen +++ b/Foundation/samples/base64encode/base64encode.progen @@ -8,4 +8,4 @@ vc.project.configurations = debug_shared, release_shared, debug_static_mt, relea vc.project.prototype = ${vc.project.name}_vs90.vcproj vc.project.compiler.include = ..\\..\\..\\Foundation\\include vc.project.compiler.additionalOptions = /Zc:__cplusplus /std:c++17 -vc.project.linker.dependencies.Win32 = ws2_32.lib iphlpapi.lib +vc.project.linker.dependencies.Win32 = ws2_32.lib iphlpapi.lib mswsock.lib diff --git a/Foundation/samples/deflate/deflate.progen b/Foundation/samples/deflate/deflate.progen index dbae00da9f..7184a4818b 100644 --- a/Foundation/samples/deflate/deflate.progen +++ b/Foundation/samples/deflate/deflate.progen @@ -8,4 +8,4 @@ vc.project.configurations = debug_shared, release_shared, debug_static_mt, relea vc.project.prototype = ${vc.project.name}_vs90.vcproj vc.project.compiler.include = ..\\..\\..\\Foundation\\include vc.project.compiler.additionalOptions = /Zc:__cplusplus /std:c++17 -vc.project.linker.dependencies.Win32 = ws2_32.lib iphlpapi.lib +vc.project.linker.dependencies.Win32 = ws2_32.lib iphlpapi.lib mswsock.lib diff --git a/Foundation/samples/dir/dir.progen b/Foundation/samples/dir/dir.progen index dbae00da9f..7184a4818b 100644 --- a/Foundation/samples/dir/dir.progen +++ b/Foundation/samples/dir/dir.progen @@ -8,4 +8,4 @@ vc.project.configurations = debug_shared, release_shared, debug_static_mt, relea vc.project.prototype = ${vc.project.name}_vs90.vcproj vc.project.compiler.include = ..\\..\\..\\Foundation\\include vc.project.compiler.additionalOptions = /Zc:__cplusplus /std:c++17 -vc.project.linker.dependencies.Win32 = ws2_32.lib iphlpapi.lib +vc.project.linker.dependencies.Win32 = ws2_32.lib iphlpapi.lib mswsock.lib diff --git a/Foundation/samples/grep/grep.progen b/Foundation/samples/grep/grep.progen index dbae00da9f..7184a4818b 100644 --- a/Foundation/samples/grep/grep.progen +++ b/Foundation/samples/grep/grep.progen @@ -8,4 +8,4 @@ vc.project.configurations = debug_shared, release_shared, debug_static_mt, relea vc.project.prototype = ${vc.project.name}_vs90.vcproj vc.project.compiler.include = ..\\..\\..\\Foundation\\include vc.project.compiler.additionalOptions = /Zc:__cplusplus /std:c++17 -vc.project.linker.dependencies.Win32 = ws2_32.lib iphlpapi.lib +vc.project.linker.dependencies.Win32 = ws2_32.lib iphlpapi.lib mswsock.lib diff --git a/Foundation/samples/hmacmd5/hmacmd5.progen b/Foundation/samples/hmacmd5/hmacmd5.progen index dbae00da9f..7184a4818b 100644 --- a/Foundation/samples/hmacmd5/hmacmd5.progen +++ b/Foundation/samples/hmacmd5/hmacmd5.progen @@ -8,4 +8,4 @@ vc.project.configurations = debug_shared, release_shared, debug_static_mt, relea vc.project.prototype = ${vc.project.name}_vs90.vcproj vc.project.compiler.include = ..\\..\\..\\Foundation\\include vc.project.compiler.additionalOptions = /Zc:__cplusplus /std:c++17 -vc.project.linker.dependencies.Win32 = ws2_32.lib iphlpapi.lib +vc.project.linker.dependencies.Win32 = ws2_32.lib iphlpapi.lib mswsock.lib diff --git a/Foundation/samples/inflate/inflate.progen b/Foundation/samples/inflate/inflate.progen index dbae00da9f..7184a4818b 100644 --- a/Foundation/samples/inflate/inflate.progen +++ b/Foundation/samples/inflate/inflate.progen @@ -8,4 +8,4 @@ vc.project.configurations = debug_shared, release_shared, debug_static_mt, relea vc.project.prototype = ${vc.project.name}_vs90.vcproj vc.project.compiler.include = ..\\..\\..\\Foundation\\include vc.project.compiler.additionalOptions = /Zc:__cplusplus /std:c++17 -vc.project.linker.dependencies.Win32 = ws2_32.lib iphlpapi.lib +vc.project.linker.dependencies.Win32 = ws2_32.lib iphlpapi.lib mswsock.lib diff --git a/Foundation/samples/md5/md5.progen b/Foundation/samples/md5/md5.progen index dbae00da9f..7184a4818b 100644 --- a/Foundation/samples/md5/md5.progen +++ b/Foundation/samples/md5/md5.progen @@ -8,4 +8,4 @@ vc.project.configurations = debug_shared, release_shared, debug_static_mt, relea vc.project.prototype = ${vc.project.name}_vs90.vcproj vc.project.compiler.include = ..\\..\\..\\Foundation\\include vc.project.compiler.additionalOptions = /Zc:__cplusplus /std:c++17 -vc.project.linker.dependencies.Win32 = ws2_32.lib iphlpapi.lib +vc.project.linker.dependencies.Win32 = ws2_32.lib iphlpapi.lib mswsock.lib diff --git a/Foundation/samples/uuidgen/uuidgen.progen b/Foundation/samples/uuidgen/uuidgen.progen index dbae00da9f..7184a4818b 100644 --- a/Foundation/samples/uuidgen/uuidgen.progen +++ b/Foundation/samples/uuidgen/uuidgen.progen @@ -8,4 +8,4 @@ vc.project.configurations = debug_shared, release_shared, debug_static_mt, relea vc.project.prototype = ${vc.project.name}_vs90.vcproj vc.project.compiler.include = ..\\..\\..\\Foundation\\include vc.project.compiler.additionalOptions = /Zc:__cplusplus /std:c++17 -vc.project.linker.dependencies.Win32 = ws2_32.lib iphlpapi.lib +vc.project.linker.dependencies.Win32 = ws2_32.lib iphlpapi.lib mswsock.lib diff --git a/Foundation/src/FileStream.cpp b/Foundation/src/FileStream.cpp index f8d7feea22..28b49eb246 100644 --- a/Foundation/src/FileStream.cpp +++ b/Foundation/src/FileStream.cpp @@ -50,6 +50,16 @@ FileStreamBuf* FileIOS::rdbuf() } +FileIOS::NativeHandle FileIOS::nativeHandle() const +{ + return _buf.nativeHandle(); +} + + +Poco::UInt64 FileIOS::size() const { + return _buf.size(); +} + FileInputStream::FileInputStream(): std::istream(&_buf) { diff --git a/Foundation/src/FileStream_POSIX.cpp b/Foundation/src/FileStream_POSIX.cpp index faf0109c7f..fb4b967076 100644 --- a/Foundation/src/FileStream_POSIX.cpp +++ b/Foundation/src/FileStream_POSIX.cpp @@ -19,6 +19,8 @@ #include #include #include +#include +#include namespace Poco { @@ -167,4 +169,21 @@ std::streampos FileStreamBuf::seekpos(std::streampos pos, std::ios::openmode mod } +FileStreamBuf::NativeHandle FileStreamBuf::nativeHandle() const +{ + return _fd; +} + +Poco::UInt64 FileStreamBuf::size() const +{ + struct stat stat_buf; + int rc = fstat(_fd, &stat_buf); + if (rc < 0) + { + Poco::SystemException(strerror(errno), errno); + } + return stat_buf.st_size; +} + + } // namespace Poco diff --git a/Foundation/src/FileStream_WIN32.cpp b/Foundation/src/FileStream_WIN32.cpp index 7e9ca7e4f8..5e1986c99a 100644 --- a/Foundation/src/FileStream_WIN32.cpp +++ b/Foundation/src/FileStream_WIN32.cpp @@ -199,4 +199,23 @@ std::streampos FileStreamBuf::seekpos(std::streampos pos, std::ios::openmode mod } +FileStreamBuf::NativeHandle FileStreamBuf::nativeHandle() const +{ + return _handle; +} + +Poco::UInt64 FileStreamBuf::size() const +{ + LARGE_INTEGER result; + result.QuadPart = 0; + DWORD high = 0; + result.LowPart = ::GetFileSize(_handle, &high); + if (high > 0) + { + result.HighPart = high; + } + return result.QuadPart; +} + + } // namespace Poco diff --git a/JSON/samples/Benchmark/Benchmark.progen b/JSON/samples/Benchmark/Benchmark.progen index 40e486bd79..5978bf1f2f 100644 --- a/JSON/samples/Benchmark/Benchmark.progen +++ b/JSON/samples/Benchmark/Benchmark.progen @@ -8,4 +8,4 @@ vc.project.configurations = debug_shared, release_shared, debug_static_mt, relea vc.project.prototype = ${vc.project.name}_vs90.vcproj vc.project.compiler.include = ..\\..\\..\\Foundation\\include;..\\..\\..\\JSON\\include vc.project.compiler.additionalOptions = /Zc:__cplusplus /std:c++17 -vc.project.linker.dependencies.Win32 = ws2_32.lib iphlpapi.lib +vc.project.linker.dependencies.Win32 = ws2_32.lib iphlpapi.lib mswsock.lib diff --git a/JSON/testsuite/TestSuite.progen b/JSON/testsuite/TestSuite.progen index d5a1c2f16f..1d08532358 100644 --- a/JSON/testsuite/TestSuite.progen +++ b/JSON/testsuite/TestSuite.progen @@ -8,4 +8,4 @@ vc.project.configurations = debug_shared, release_shared, debug_static_mt, relea vc.project.prototype = TestSuite_vs90.vcproj vc.project.compiler.include = ..\\..\\Foundation\\include vc.project.compiler.additionalOptions = /Zc:__cplusplus /std:c++17 -vc.project.linker.dependencies.Win32 = iphlpapi.lib +vc.project.linker.dependencies.Win32 = iphlpapi.lib mswsock.lib diff --git a/JWT/testsuite/TestSuite.progen b/JWT/testsuite/TestSuite.progen index 9f509e17ac..a29642abce 100644 --- a/JWT/testsuite/TestSuite.progen +++ b/JWT/testsuite/TestSuite.progen @@ -8,7 +8,7 @@ vc.project.configurations = debug_shared, release_shared, debug_static_mt, relea vc.project.prototype = TestSuite_vs90.vcproj vc.project.compiler.include = ..\\..\\Foundation\\include;..\\..\\JSON\\include;..\\..\\Crypto\\include vc.project.compiler.additionalOptions = /Zc:__cplusplus /std:c++17 -vc.project.linker.dependencies.Win32 = ws2_32.lib iphlpapi.lib +vc.project.linker.dependencies.Win32 = ws2_32.lib iphlpapi.lib mswsock.lib vc.project.linker.dependencies.debug_shared = vc.project.linker.dependencies.release_shared = vc.project.linker.dependencies.debug_static_md = Crypt32.lib diff --git a/MongoDB/samples/SQLToMongo/SQLToMongo.progen b/MongoDB/samples/SQLToMongo/SQLToMongo.progen index 1543dabdb6..b38803c56f 100644 --- a/MongoDB/samples/SQLToMongo/SQLToMongo.progen +++ b/MongoDB/samples/SQLToMongo/SQLToMongo.progen @@ -8,4 +8,4 @@ vc.project.configurations = debug_shared, release_shared, debug_static_mt, relea vc.project.prototype = ${vc.project.name}_vs90.vcproj vc.project.compiler.include = ..\\..\\..\\Foundation\\include;..\\..\\..\\Net\\include;..\\..\\..\\MongoDB\\include vc.project.compiler.additionalOptions = /Zc:__cplusplus /std:c++17 -vc.project.linker.dependencies.Win32 = ws2_32.lib iphlpapi.lib +vc.project.linker.dependencies.Win32 = ws2_32.lib iphlpapi.lib mswsock.lib diff --git a/MongoDB/testsuite/TestSuite.progen b/MongoDB/testsuite/TestSuite.progen index c1bc49fedd..32700f626a 100644 --- a/MongoDB/testsuite/TestSuite.progen +++ b/MongoDB/testsuite/TestSuite.progen @@ -8,4 +8,4 @@ vc.project.configurations = debug_shared, release_shared, debug_static_mt, relea vc.project.prototype = TestSuite_vs90.vcproj vc.project.compiler.include = ..\\..\\Foundation\\include;..\\..\\Net\\include vc.project.compiler.additionalOptions = /Zc:__cplusplus /std:c++17 -vc.project.linker.dependencies.Win32 = ws2_32.lib iphlpapi.lib +vc.project.linker.dependencies.Win32 = ws2_32.lib iphlpapi.lib mswsock.lib diff --git a/Net/CMakeLists.txt b/Net/CMakeLists.txt index 04799325c3..07fc182d81 100644 --- a/Net/CMakeLists.txt +++ b/Net/CMakeLists.txt @@ -28,7 +28,7 @@ set_target_properties(Net target_link_libraries(Net PUBLIC Poco::Foundation) # Windows and WindowsCE need additional libraries if(WIN32) - target_link_libraries(Net PUBLIC "iphlpapi.lib") + target_link_libraries(Net PUBLIC "iphlpapi.lib" "mswsock.lib") if(WINCE) target_link_libraries(Net PUBLIC "ws2.lib") else() diff --git a/Net/Net.progen b/Net/Net.progen index 1c5bbcbb97..cb262f1e99 100644 --- a/Net/Net.progen +++ b/Net/Net.progen @@ -13,6 +13,6 @@ vc.project.compiler.defines.shared = ${vc.project.name}_EXPORTS vc.project.compiler.defines.debug_shared = ${vc.project.compiler.defines.shared} vc.project.compiler.defines.release_shared = ${vc.project.compiler.defines.shared} vc.project.compiler.additionalOptions = /Zc:__cplusplus /std:c++17 -vc.project.linker.dependencies.Win32 = ws2_32.lib iphlpapi.lib +vc.project.linker.dependencies.Win32 = ws2_32.lib iphlpapi.lib mswsock.lib vc.solution.create = true vc.solution.include = testsuite\\TestSuite diff --git a/Net/include/Poco/Net/SocketImpl.h b/Net/include/Poco/Net/SocketImpl.h index e495790979..ca5794a5dc 100644 --- a/Net/include/Poco/Net/SocketImpl.h +++ b/Net/include/Poco/Net/SocketImpl.h @@ -27,6 +27,11 @@ namespace Poco { + + +class FileInputStream; + + namespace Net { @@ -473,6 +478,11 @@ class Net_API SocketImpl: public Poco::RefCountedObject bool initialized() const; /// Returns true iff the underlying socket is initialized. + Poco::Int64 sendFile(FileInputStream &FileInputStream, Poco::UInt64 offset = 0); + /// Sends file using system function + /// for posix systems - with sendfile[64](...) + /// for windows - with TransmitFile(...) + protected: SocketImpl(); /// Creates a SocketImpl. diff --git a/Net/include/Poco/Net/StreamSocket.h b/Net/include/Poco/Net/StreamSocket.h index 84379974e2..a71b87acd5 100644 --- a/Net/include/Poco/Net/StreamSocket.h +++ b/Net/include/Poco/Net/StreamSocket.h @@ -24,6 +24,11 @@ namespace Poco { + + +class FileInputStream; + + namespace Net { @@ -253,6 +258,11 @@ class Net_API StreamSocket: public Socket /// The preferred way for a socket to receive urgent data /// is by enabling the SO_OOBINLINE option. + Poco::Int64 sendFile(FileInputStream &FileInputStream, Poco::UInt64 offset = 0); + /// Sends file using system function + /// for posix systems - with sendfile[64](...) + /// for windows - with TransmitFile(...) + StreamSocket(SocketImpl* pImpl); /// Creates the Socket and attaches the given SocketImpl. /// The socket takes ownership of the SocketImpl. diff --git a/Net/samples/EchoServer/EchoServer.progen b/Net/samples/EchoServer/EchoServer.progen index ede2c7832c..b4cc41e63d 100644 --- a/Net/samples/EchoServer/EchoServer.progen +++ b/Net/samples/EchoServer/EchoServer.progen @@ -8,4 +8,4 @@ vc.project.configurations = debug_shared, release_shared, debug_static_mt, relea vc.project.prototype = ${vc.project.name}_vs90.vcproj vc.project.compiler.include = ..\\..\\..\\Foundation\\include;..\\..\\..\\XML\\include;..\\..\\..\\Util\\include;..\\..\\..\\Net\\include vc.project.compiler.additionalOptions = /Zc:__cplusplus /std:c++17 -vc.project.linker.dependencies.Win32 = ws2_32.lib iphlpapi.lib +vc.project.linker.dependencies.Win32 = ws2_32.lib iphlpapi.lib mswsock.lib diff --git a/Net/samples/HTTPFormServer/HTTPFormServer.progen b/Net/samples/HTTPFormServer/HTTPFormServer.progen index ede2c7832c..b4cc41e63d 100644 --- a/Net/samples/HTTPFormServer/HTTPFormServer.progen +++ b/Net/samples/HTTPFormServer/HTTPFormServer.progen @@ -8,4 +8,4 @@ vc.project.configurations = debug_shared, release_shared, debug_static_mt, relea vc.project.prototype = ${vc.project.name}_vs90.vcproj vc.project.compiler.include = ..\\..\\..\\Foundation\\include;..\\..\\..\\XML\\include;..\\..\\..\\Util\\include;..\\..\\..\\Net\\include vc.project.compiler.additionalOptions = /Zc:__cplusplus /std:c++17 -vc.project.linker.dependencies.Win32 = ws2_32.lib iphlpapi.lib +vc.project.linker.dependencies.Win32 = ws2_32.lib iphlpapi.lib mswsock.lib diff --git a/Net/samples/HTTPLoadTest/HTTPLoadTest.progen b/Net/samples/HTTPLoadTest/HTTPLoadTest.progen index ede2c7832c..b4cc41e63d 100644 --- a/Net/samples/HTTPLoadTest/HTTPLoadTest.progen +++ b/Net/samples/HTTPLoadTest/HTTPLoadTest.progen @@ -8,4 +8,4 @@ vc.project.configurations = debug_shared, release_shared, debug_static_mt, relea vc.project.prototype = ${vc.project.name}_vs90.vcproj vc.project.compiler.include = ..\\..\\..\\Foundation\\include;..\\..\\..\\XML\\include;..\\..\\..\\Util\\include;..\\..\\..\\Net\\include vc.project.compiler.additionalOptions = /Zc:__cplusplus /std:c++17 -vc.project.linker.dependencies.Win32 = ws2_32.lib iphlpapi.lib +vc.project.linker.dependencies.Win32 = ws2_32.lib iphlpapi.lib mswsock.lib diff --git a/Net/samples/HTTPTimeServer/HTTPTimeServer.progen b/Net/samples/HTTPTimeServer/HTTPTimeServer.progen index ede2c7832c..b4cc41e63d 100644 --- a/Net/samples/HTTPTimeServer/HTTPTimeServer.progen +++ b/Net/samples/HTTPTimeServer/HTTPTimeServer.progen @@ -8,4 +8,4 @@ vc.project.configurations = debug_shared, release_shared, debug_static_mt, relea vc.project.prototype = ${vc.project.name}_vs90.vcproj vc.project.compiler.include = ..\\..\\..\\Foundation\\include;..\\..\\..\\XML\\include;..\\..\\..\\Util\\include;..\\..\\..\\Net\\include vc.project.compiler.additionalOptions = /Zc:__cplusplus /std:c++17 -vc.project.linker.dependencies.Win32 = ws2_32.lib iphlpapi.lib +vc.project.linker.dependencies.Win32 = ws2_32.lib iphlpapi.lib mswsock.lib diff --git a/Net/samples/Mail/Mail.progen b/Net/samples/Mail/Mail.progen index ede2c7832c..b4cc41e63d 100644 --- a/Net/samples/Mail/Mail.progen +++ b/Net/samples/Mail/Mail.progen @@ -8,4 +8,4 @@ vc.project.configurations = debug_shared, release_shared, debug_static_mt, relea vc.project.prototype = ${vc.project.name}_vs90.vcproj vc.project.compiler.include = ..\\..\\..\\Foundation\\include;..\\..\\..\\XML\\include;..\\..\\..\\Util\\include;..\\..\\..\\Net\\include vc.project.compiler.additionalOptions = /Zc:__cplusplus /std:c++17 -vc.project.linker.dependencies.Win32 = ws2_32.lib iphlpapi.lib +vc.project.linker.dependencies.Win32 = ws2_32.lib iphlpapi.lib mswsock.lib diff --git a/Net/samples/Ping/Ping.progen b/Net/samples/Ping/Ping.progen index ede2c7832c..b4cc41e63d 100644 --- a/Net/samples/Ping/Ping.progen +++ b/Net/samples/Ping/Ping.progen @@ -8,4 +8,4 @@ vc.project.configurations = debug_shared, release_shared, debug_static_mt, relea vc.project.prototype = ${vc.project.name}_vs90.vcproj vc.project.compiler.include = ..\\..\\..\\Foundation\\include;..\\..\\..\\XML\\include;..\\..\\..\\Util\\include;..\\..\\..\\Net\\include vc.project.compiler.additionalOptions = /Zc:__cplusplus /std:c++17 -vc.project.linker.dependencies.Win32 = ws2_32.lib iphlpapi.lib +vc.project.linker.dependencies.Win32 = ws2_32.lib iphlpapi.lib mswsock.lib diff --git a/Net/samples/SMTPLogger/SMTPLogger.progen b/Net/samples/SMTPLogger/SMTPLogger.progen index ede2c7832c..b4cc41e63d 100644 --- a/Net/samples/SMTPLogger/SMTPLogger.progen +++ b/Net/samples/SMTPLogger/SMTPLogger.progen @@ -8,4 +8,4 @@ vc.project.configurations = debug_shared, release_shared, debug_static_mt, relea vc.project.prototype = ${vc.project.name}_vs90.vcproj vc.project.compiler.include = ..\\..\\..\\Foundation\\include;..\\..\\..\\XML\\include;..\\..\\..\\Util\\include;..\\..\\..\\Net\\include vc.project.compiler.additionalOptions = /Zc:__cplusplus /std:c++17 -vc.project.linker.dependencies.Win32 = ws2_32.lib iphlpapi.lib +vc.project.linker.dependencies.Win32 = ws2_32.lib iphlpapi.lib mswsock.lib diff --git a/Net/samples/TimeServer/TimeServer.progen b/Net/samples/TimeServer/TimeServer.progen index ede2c7832c..b4cc41e63d 100644 --- a/Net/samples/TimeServer/TimeServer.progen +++ b/Net/samples/TimeServer/TimeServer.progen @@ -8,4 +8,4 @@ vc.project.configurations = debug_shared, release_shared, debug_static_mt, relea vc.project.prototype = ${vc.project.name}_vs90.vcproj vc.project.compiler.include = ..\\..\\..\\Foundation\\include;..\\..\\..\\XML\\include;..\\..\\..\\Util\\include;..\\..\\..\\Net\\include vc.project.compiler.additionalOptions = /Zc:__cplusplus /std:c++17 -vc.project.linker.dependencies.Win32 = ws2_32.lib iphlpapi.lib +vc.project.linker.dependencies.Win32 = ws2_32.lib iphlpapi.lib mswsock.lib diff --git a/Net/samples/WebSocketServer/WebSocketServer.progen b/Net/samples/WebSocketServer/WebSocketServer.progen index ede2c7832c..b4cc41e63d 100644 --- a/Net/samples/WebSocketServer/WebSocketServer.progen +++ b/Net/samples/WebSocketServer/WebSocketServer.progen @@ -8,4 +8,4 @@ vc.project.configurations = debug_shared, release_shared, debug_static_mt, relea vc.project.prototype = ${vc.project.name}_vs90.vcproj vc.project.compiler.include = ..\\..\\..\\Foundation\\include;..\\..\\..\\XML\\include;..\\..\\..\\Util\\include;..\\..\\..\\Net\\include vc.project.compiler.additionalOptions = /Zc:__cplusplus /std:c++17 -vc.project.linker.dependencies.Win32 = ws2_32.lib iphlpapi.lib +vc.project.linker.dependencies.Win32 = ws2_32.lib iphlpapi.lib mswsock.lib diff --git a/Net/samples/dict/dict.progen b/Net/samples/dict/dict.progen index ede2c7832c..b4cc41e63d 100644 --- a/Net/samples/dict/dict.progen +++ b/Net/samples/dict/dict.progen @@ -8,4 +8,4 @@ vc.project.configurations = debug_shared, release_shared, debug_static_mt, relea vc.project.prototype = ${vc.project.name}_vs90.vcproj vc.project.compiler.include = ..\\..\\..\\Foundation\\include;..\\..\\..\\XML\\include;..\\..\\..\\Util\\include;..\\..\\..\\Net\\include vc.project.compiler.additionalOptions = /Zc:__cplusplus /std:c++17 -vc.project.linker.dependencies.Win32 = ws2_32.lib iphlpapi.lib +vc.project.linker.dependencies.Win32 = ws2_32.lib iphlpapi.lib mswsock.lib diff --git a/Net/samples/download/download.progen b/Net/samples/download/download.progen index ede2c7832c..b4cc41e63d 100644 --- a/Net/samples/download/download.progen +++ b/Net/samples/download/download.progen @@ -8,4 +8,4 @@ vc.project.configurations = debug_shared, release_shared, debug_static_mt, relea vc.project.prototype = ${vc.project.name}_vs90.vcproj vc.project.compiler.include = ..\\..\\..\\Foundation\\include;..\\..\\..\\XML\\include;..\\..\\..\\Util\\include;..\\..\\..\\Net\\include vc.project.compiler.additionalOptions = /Zc:__cplusplus /std:c++17 -vc.project.linker.dependencies.Win32 = ws2_32.lib iphlpapi.lib +vc.project.linker.dependencies.Win32 = ws2_32.lib iphlpapi.lib mswsock.lib diff --git a/Net/samples/httpget/httpget.progen b/Net/samples/httpget/httpget.progen index ede2c7832c..b4cc41e63d 100644 --- a/Net/samples/httpget/httpget.progen +++ b/Net/samples/httpget/httpget.progen @@ -8,4 +8,4 @@ vc.project.configurations = debug_shared, release_shared, debug_static_mt, relea vc.project.prototype = ${vc.project.name}_vs90.vcproj vc.project.compiler.include = ..\\..\\..\\Foundation\\include;..\\..\\..\\XML\\include;..\\..\\..\\Util\\include;..\\..\\..\\Net\\include vc.project.compiler.additionalOptions = /Zc:__cplusplus /std:c++17 -vc.project.linker.dependencies.Win32 = ws2_32.lib iphlpapi.lib +vc.project.linker.dependencies.Win32 = ws2_32.lib iphlpapi.lib mswsock.lib diff --git a/Net/samples/ifconfig/ifconfig.progen b/Net/samples/ifconfig/ifconfig.progen index ede2c7832c..b4cc41e63d 100644 --- a/Net/samples/ifconfig/ifconfig.progen +++ b/Net/samples/ifconfig/ifconfig.progen @@ -8,4 +8,4 @@ vc.project.configurations = debug_shared, release_shared, debug_static_mt, relea vc.project.prototype = ${vc.project.name}_vs90.vcproj vc.project.compiler.include = ..\\..\\..\\Foundation\\include;..\\..\\..\\XML\\include;..\\..\\..\\Util\\include;..\\..\\..\\Net\\include vc.project.compiler.additionalOptions = /Zc:__cplusplus /std:c++17 -vc.project.linker.dependencies.Win32 = ws2_32.lib iphlpapi.lib +vc.project.linker.dependencies.Win32 = ws2_32.lib iphlpapi.lib mswsock.lib diff --git a/Net/samples/tcpserver/tcpserver.progen b/Net/samples/tcpserver/tcpserver.progen index 70c16504a7..3a6442037c 100644 --- a/Net/samples/tcpserver/tcpserver.progen +++ b/Net/samples/tcpserver/tcpserver.progen @@ -8,4 +8,4 @@ vc.project.configurations = debug_shared, release_shared, debug_static_mt, relea vc.project.prototype = ${vc.project.name}_vs90.vcproj vc.project.compiler.include = ..\\..\\..\\Foundation\\include;..\\..\\..\\Net\\include vc.project.compiler.additionalOptions = /Zc:__cplusplus /std:c++17 -vc.project.linker.dependencies.Win32 = ws2_32.lib iphlpapi.lib +vc.project.linker.dependencies.Win32 = ws2_32.lib iphlpapi.lib mswsock.lib diff --git a/Net/src/SocketImpl.cpp b/Net/src/SocketImpl.cpp index 36902fa4c5..68310f9300 100644 --- a/Net/src/SocketImpl.cpp +++ b/Net/src/SocketImpl.cpp @@ -17,12 +17,15 @@ #include "Poco/Net/StreamSocketImpl.h" #include "Poco/NumberFormatter.h" #include "Poco/Timestamp.h" +#include "Poco/FileStream.h" +#include "Poco/Error.h" #include // FD_SET needs memset on some platforms, so we can't use #if defined(POCO_HAVE_FD_EPOLL) #ifdef POCO_OS_FAMILY_WINDOWS #include "wepoll.h" + #include "mswsock.h" #else #include #include @@ -42,8 +45,20 @@ #ifdef POCO_OS_FAMILY_WINDOWS #include +#else +#include +#endif + + +#if POCO_OS == POCO_OS_MAC_OS_X || POCO_OS == POCO_OS_FAMILY_BSD +#include +#include +using sighandler_t = sig_t; #endif +#if POCO_OS == POCO_OS_LINUX && !defined(POCO_EMSCRIPTEN) +#include +#endif #if defined(_MSC_VER) #pragma warning(disable:4996) // deprecation warnings @@ -1358,5 +1373,81 @@ void SocketImpl::error(int code, const std::string& arg) } } +#ifdef POCO_OS_FAMILY_WINDOWS +Poco::Int64 SocketImpl::sendFile(FileInputStream &fileInputStream, Poco::UInt64 offset) +{ + FileIOS::NativeHandle fd = fileInputStream.nativeHandle(); + Poco::UInt64 fileSize = fileInputStream.size(); + std::streamoff sentSize = fileSize - offset; + LARGE_INTEGER offsetHelper; + offsetHelper.QuadPart = offset; + OVERLAPPED overlapped; + memset(&overlapped, 0, sizeof(overlapped)); + overlapped.Offset = offsetHelper.LowPart; + overlapped.OffsetHigh = offsetHelper.HighPart; + overlapped.hEvent = CreateEvent(NULL, TRUE, FALSE, NULL); + if (overlapped.hEvent == nullptr) + { + return -1; + } + bool result = TransmitFile(_sockfd, fd, sentSize, 0, &overlapped, nullptr, 0); + if (!result) + { + int err = WSAGetLastError(); + if ((err != ERROR_IO_PENDING) && (WSAGetLastError() != WSA_IO_PENDING)) { + CloseHandle(overlapped.hEvent); + error(err, Error::getMessage(err)); + } + WaitForSingleObject(overlapped.hEvent, INFINITE); + } + CloseHandle(overlapped.hEvent); + return sentSize; +} +#else +Poco::Int64 _sendfile(poco_socket_t sd, FileIOS::NativeHandle fd, Poco::UInt64 offset,std::streamoff sentSize) +{ + Poco::Int64 sent = 0; +#ifdef __USE_LARGEFILE64 + sent = sendfile64(sd, fd, (off64_t *)&offset, sentSize); +#else +#if POCO_OS == POCO_OS_LINUX && !defined(POCO_EMSCRIPTEN) + sent = sendfile(sd, fd, (off_t *)&offset, sentSize); +#elif POCO_OS == POCO_OS_MAC_OS_X + int result = sendfile(fd, sd, offset, &sentSize, nullptr, 0); + if (result < 0) + { + sent = -1; + } + else + { + sent = sentSize; + } +#else + throw Poco::NotImplementedException("sendfile not implemented for this platform"); +#endif +#endif + if (errno == EAGAIN || errno == EWOULDBLOCK) + { + sent = 0; + } + return sent; +} + +Poco::Int64 SocketImpl::sendFile(FileInputStream &fileInputStream, Poco::UInt64 offset) +{ + FileIOS::NativeHandle fd = fileInputStream.nativeHandle(); + Poco::UInt64 fileSize = fileInputStream.size(); + std::streamoff sentSize = fileSize - offset; + Poco::Int64 sent = 0; + sighandler_t sigPrev = signal(SIGPIPE, SIG_IGN); + while (sent == 0) + { + errno = 0; + sent = _sendfile(_sockfd, fd, offset, sentSize); + } + signal(SIGPIPE, sigPrev != SIG_ERR ? sigPrev : SIG_DFL); + return sent; +} +#endif // POCO_OS_FAMILY_WINDOWS } } // namespace Poco::Net diff --git a/Net/src/StreamSocket.cpp b/Net/src/StreamSocket.cpp index efb31f83f2..7741654ed7 100644 --- a/Net/src/StreamSocket.cpp +++ b/Net/src/StreamSocket.cpp @@ -213,5 +213,9 @@ void StreamSocket::sendUrgent(unsigned char data) impl()->sendUrgent(data); } +Poco::Int64 StreamSocket::sendFile(FileInputStream &fileInputStream, Poco::UInt64 offset) +{ + return impl()->sendFile(fileInputStream, offset); +} } } // namespace Poco::Net diff --git a/Net/testsuite/TestSuite.progen b/Net/testsuite/TestSuite.progen index 205fabcee7..fa52e8aed5 100644 --- a/Net/testsuite/TestSuite.progen +++ b/Net/testsuite/TestSuite.progen @@ -8,5 +8,5 @@ vc.project.configurations = debug_shared, release_shared, debug_static_mt, relea vc.project.prototype = TestSuite_vs90.vcproj vc.project.compiler.include = ..\\..\\Foundation\\include vc.project.compiler.additionalOptions = /Zc:__cplusplus /std:c++17 -vc.project.linker.dependencies = iphlpapi.lib +vc.project.linker.dependencies = iphlpapi.lib mswsock.lib vc.project.linker.dependencies.Win32 = ws2_32.lib diff --git a/Net/testsuite/src/SocketStreamTest.cpp b/Net/testsuite/src/SocketStreamTest.cpp index 99954b3c65..5a453b4449 100644 --- a/Net/testsuite/src/SocketStreamTest.cpp +++ b/Net/testsuite/src/SocketStreamTest.cpp @@ -19,7 +19,10 @@ #include "Poco/Net/NetException.h" #include "Poco/Timespan.h" #include "Poco/Stopwatch.h" - +#include "Poco/FileStream.h" +#include "Poco/File.h" +#include "Poco/Path.h" +#include using Poco::Net::Socket; using Poco::Net::SocketStream; @@ -31,7 +34,9 @@ using Poco::Timespan; using Poco::Stopwatch; using Poco::TimeoutException; using Poco::InvalidArgumentException; - +using Poco::FileInputStream; +using Poco::FileOutputStream; +using Poco::File; SocketStreamTest::SocketStreamTest(const std::string& name): CppUnit::TestCase(name) { @@ -119,6 +124,62 @@ void SocketStreamTest::testEOF() ss.close(); } +void SocketStreamTest::testSendFile() +{ + const int fileSize = 64000; + std::string payload(fileSize, 'x'); + Poco::Path testFilePath = Poco::Path::temp().append("test.sendfile.txt"); + const std::string fileName = testFilePath.toString(); + { + File f(fileName); + if (f.exists()) + { + f.remove(); + } + } + FileOutputStream fout(fileName); + fout << payload; + fout.close(); + FileInputStream fin(fileName); + EchoServer echoServer; + StreamSocket ss; + ss.connect(SocketAddress("127.0.0.1", echoServer.port())); + + SocketStream str(ss); + + Poco::UInt64 offset = 0; + Poco::Int64 sent = 0; + try + { + sent = ss.sendFile(fin); + } + catch (Poco::NotImplementedException &) + { + std::cout << "[NOT IMPLEMENTED]\n"; + return; + } + assertTrue(sent >= 0); + while (sent < fileSize) + { + offset = sent; + sent = ss.sendFile(fin, offset); + assertTrue(sent >= 0); + } + str.flush(); + assertTrue (str.good()); + ss.shutdownSend(); + + assertTrue (str.gcount() == 0); + char buffer[fileSize]; + str.read(buffer, sizeof(buffer)); + assertTrue (str.good()); + assertTrue (str.gcount() == fileSize); + + ss.close(); + fin.close(); + File f(fileName); + f.remove(); +} void SocketStreamTest::setUp() { @@ -137,6 +198,7 @@ CppUnit::Test* SocketStreamTest::suite() CppUnit_addTest(pSuite, SocketStreamTest, testStreamEcho); CppUnit_addTest(pSuite, SocketStreamTest, testLargeStreamEcho); CppUnit_addTest(pSuite, SocketStreamTest, testEOF); + CppUnit_addTest(pSuite, SocketStreamTest, testSendFile); return pSuite; } diff --git a/Net/testsuite/src/SocketStreamTest.h b/Net/testsuite/src/SocketStreamTest.h index aa2fa7c3ff..c97a77e6f2 100644 --- a/Net/testsuite/src/SocketStreamTest.h +++ b/Net/testsuite/src/SocketStreamTest.h @@ -27,6 +27,7 @@ class SocketStreamTest: public CppUnit::TestCase void testStreamEcho(); void testLargeStreamEcho(); void testEOF(); + void testSendFile(); void setUp(); void tearDown(); diff --git a/NetSSL_OpenSSL/NetSSL_OpenSSL.progen b/NetSSL_OpenSSL/NetSSL_OpenSSL.progen index 6e03a7bc7c..d98320c8d6 100644 --- a/NetSSL_OpenSSL/NetSSL_OpenSSL.progen +++ b/NetSSL_OpenSSL/NetSSL_OpenSSL.progen @@ -13,7 +13,7 @@ vc.project.compiler.defines.shared = NetSSL_EXPORTS vc.project.compiler.defines.debug_shared = ${vc.project.compiler.defines.shared} vc.project.compiler.defines.release_shared = ${vc.project.compiler.defines.shared} vc.project.compiler.additionalOptions = /Zc:__cplusplus /std:c++17 -vc.project.linker.dependencies.Win32 = ws2_32.lib iphlpapi.lib +vc.project.linker.dependencies.Win32 = ws2_32.lib iphlpapi.lib mswsock.lib vc.project.linker.dependencies.debug_shared = vc.project.linker.dependencies.release_shared = vc.project.linker.dependencies.debug_static_md = Crypt32.lib diff --git a/NetSSL_OpenSSL/samples/HTTPSTimeServer/HTTPSTimeServer.progen b/NetSSL_OpenSSL/samples/HTTPSTimeServer/HTTPSTimeServer.progen index b7b3a1b283..973e43e03c 100644 --- a/NetSSL_OpenSSL/samples/HTTPSTimeServer/HTTPSTimeServer.progen +++ b/NetSSL_OpenSSL/samples/HTTPSTimeServer/HTTPSTimeServer.progen @@ -8,7 +8,7 @@ vc.project.configurations = debug_shared, release_shared, debug_static_mt, relea vc.project.prototype = ${vc.project.name}_vs90.vcproj vc.project.compiler.include = ..\\..\\..\\Foundation\\include;..\\..\\..\\XML\\include;..\\..\\..\\Util\\include;..\\..\\..\\Net\\include;..\\..\\..\\NetSSL_OpenSSL\\include;..\\..\\..\\Crypto\\include vc.project.compiler.additionalOptions = /Zc:__cplusplus /std:c++17 -vc.project.linker.dependencies.Win32 = ws2_32.lib iphlpapi.lib +vc.project.linker.dependencies.Win32 = ws2_32.lib iphlpapi.lib mswsock.lib vc.project.linker.dependencies.debug_shared = vc.project.linker.dependencies.release_shared = vc.project.linker.dependencies.debug_static_md = Crypt32.lib diff --git a/NetSSL_OpenSSL/samples/Mail/Mail.progen b/NetSSL_OpenSSL/samples/Mail/Mail.progen index b7b3a1b283..973e43e03c 100644 --- a/NetSSL_OpenSSL/samples/Mail/Mail.progen +++ b/NetSSL_OpenSSL/samples/Mail/Mail.progen @@ -8,7 +8,7 @@ vc.project.configurations = debug_shared, release_shared, debug_static_mt, relea vc.project.prototype = ${vc.project.name}_vs90.vcproj vc.project.compiler.include = ..\\..\\..\\Foundation\\include;..\\..\\..\\XML\\include;..\\..\\..\\Util\\include;..\\..\\..\\Net\\include;..\\..\\..\\NetSSL_OpenSSL\\include;..\\..\\..\\Crypto\\include vc.project.compiler.additionalOptions = /Zc:__cplusplus /std:c++17 -vc.project.linker.dependencies.Win32 = ws2_32.lib iphlpapi.lib +vc.project.linker.dependencies.Win32 = ws2_32.lib iphlpapi.lib mswsock.lib vc.project.linker.dependencies.debug_shared = vc.project.linker.dependencies.release_shared = vc.project.linker.dependencies.debug_static_md = Crypt32.lib diff --git a/NetSSL_OpenSSL/samples/SetSourceIP/SetSourceIP.progen b/NetSSL_OpenSSL/samples/SetSourceIP/SetSourceIP.progen index b7b3a1b283..973e43e03c 100644 --- a/NetSSL_OpenSSL/samples/SetSourceIP/SetSourceIP.progen +++ b/NetSSL_OpenSSL/samples/SetSourceIP/SetSourceIP.progen @@ -8,7 +8,7 @@ vc.project.configurations = debug_shared, release_shared, debug_static_mt, relea vc.project.prototype = ${vc.project.name}_vs90.vcproj vc.project.compiler.include = ..\\..\\..\\Foundation\\include;..\\..\\..\\XML\\include;..\\..\\..\\Util\\include;..\\..\\..\\Net\\include;..\\..\\..\\NetSSL_OpenSSL\\include;..\\..\\..\\Crypto\\include vc.project.compiler.additionalOptions = /Zc:__cplusplus /std:c++17 -vc.project.linker.dependencies.Win32 = ws2_32.lib iphlpapi.lib +vc.project.linker.dependencies.Win32 = ws2_32.lib iphlpapi.lib mswsock.lib vc.project.linker.dependencies.debug_shared = vc.project.linker.dependencies.release_shared = vc.project.linker.dependencies.debug_static_md = Crypt32.lib diff --git a/NetSSL_OpenSSL/samples/TwitterClient/TwitterClient.progen b/NetSSL_OpenSSL/samples/TwitterClient/TwitterClient.progen index 8a55725454..e78d283ca9 100644 --- a/NetSSL_OpenSSL/samples/TwitterClient/TwitterClient.progen +++ b/NetSSL_OpenSSL/samples/TwitterClient/TwitterClient.progen @@ -8,7 +8,7 @@ vc.project.configurations = debug_shared, release_shared, debug_static_mt, relea vc.project.prototype = ${vc.project.name}_vs90.vcproj vc.project.compiler.include = ..\\..\\..\\Foundation\\include;..\\..\\..\\XML\\include;..\\..\\..\\JSON\\include;..\\..\\..\\Util\\include;..\\..\\..\\Net\\include;..\\..\\..\\NetSSL_OpenSSL\\include;..\\..\\..\\Crypto\\include vc.project.compiler.additionalOptions = /Zc:__cplusplus /std:c++17 -vc.project.linker.dependencies.Win32 = ws2_32.lib iphlpapi.lib +vc.project.linker.dependencies.Win32 = ws2_32.lib iphlpapi.lib mswsock.lib vc.project.linker.dependencies.debug_shared = vc.project.linker.dependencies.release_shared = vc.project.linker.dependencies.debug_static_md = Crypt32.lib diff --git a/NetSSL_OpenSSL/samples/download/download.progen b/NetSSL_OpenSSL/samples/download/download.progen index b7b3a1b283..973e43e03c 100644 --- a/NetSSL_OpenSSL/samples/download/download.progen +++ b/NetSSL_OpenSSL/samples/download/download.progen @@ -8,7 +8,7 @@ vc.project.configurations = debug_shared, release_shared, debug_static_mt, relea vc.project.prototype = ${vc.project.name}_vs90.vcproj vc.project.compiler.include = ..\\..\\..\\Foundation\\include;..\\..\\..\\XML\\include;..\\..\\..\\Util\\include;..\\..\\..\\Net\\include;..\\..\\..\\NetSSL_OpenSSL\\include;..\\..\\..\\Crypto\\include vc.project.compiler.additionalOptions = /Zc:__cplusplus /std:c++17 -vc.project.linker.dependencies.Win32 = ws2_32.lib iphlpapi.lib +vc.project.linker.dependencies.Win32 = ws2_32.lib iphlpapi.lib mswsock.lib vc.project.linker.dependencies.debug_shared = vc.project.linker.dependencies.release_shared = vc.project.linker.dependencies.debug_static_md = Crypt32.lib diff --git a/NetSSL_OpenSSL/testsuite/TestSuite.progen b/NetSSL_OpenSSL/testsuite/TestSuite.progen index adcae7daac..5f50c08675 100644 --- a/NetSSL_OpenSSL/testsuite/TestSuite.progen +++ b/NetSSL_OpenSSL/testsuite/TestSuite.progen @@ -8,7 +8,7 @@ vc.project.configurations = debug_shared, release_shared, debug_static_mt, relea vc.project.prototype = TestSuite_vs90.vcproj vc.project.compiler.include = ..\\..\\Foundation\\include;..\\..\\XML\\include;..\\..\\Util\\include;..\\..\\Net\\include;..\\..\\Crypto\\include vc.project.compiler.additionalOptions = /Zc:__cplusplus /std:c++17 -vc.project.linker.dependencies.Win32 = ws2_32.lib iphlpapi.lib +vc.project.linker.dependencies.Win32 = ws2_32.lib iphlpapi.lib mswsock.lib vc.project.linker.dependencies.debug_shared = vc.project.linker.dependencies.release_shared = vc.project.linker.dependencies.debug_static_md = Crypt32.lib diff --git a/NetSSL_Win/NetSSL_Win.progen b/NetSSL_Win/NetSSL_Win.progen index 10824e6a89..ec946a416c 100644 --- a/NetSSL_Win/NetSSL_Win.progen +++ b/NetSSL_Win/NetSSL_Win.progen @@ -13,7 +13,7 @@ vc.project.compiler.defines.shared = ${vc.project.name}_EXPORTS vc.project.compiler.defines.debug_shared = ${vc.project.compiler.defines.shared} vc.project.compiler.defines.release_shared = ${vc.project.compiler.defines.shared} vc.project.compiler.additionalOptions = /Zc:__cplusplus /std:c++17 -vc.project.linker.dependencies.Win32 = ws2_32.lib iphlpapi.lib Crypt32.lib +vc.project.linker.dependencies.Win32 = ws2_32.lib iphlpapi.lib Crypt32.lib mswsock.lib vc.project.linker.dependencies.debug_shared = vc.project.linker.dependencies.release_shared = vc.project.linker.dependencies.debug_static_md = diff --git a/NetSSL_Win/samples/HTTPSTimeServer/HTTPSTimeServer.progen b/NetSSL_Win/samples/HTTPSTimeServer/HTTPSTimeServer.progen index c63b31f352..bb072373bd 100644 --- a/NetSSL_Win/samples/HTTPSTimeServer/HTTPSTimeServer.progen +++ b/NetSSL_Win/samples/HTTPSTimeServer/HTTPSTimeServer.progen @@ -8,7 +8,7 @@ vc.project.configurations = debug_shared, release_shared, debug_static_mt, relea vc.project.prototype = ${vc.project.name}_vs90.vcproj vc.project.compiler.include = ..\\..\\..\\Foundation\\include;..\\..\\..\\XML\\include;..\\..\\..\\Util\\include;..\\..\\..\\Net\\include;..\\..\\..\\NetSSL_Win\\include vc.project.compiler.additionalOptions = /Zc:__cplusplus /std:c++17 -vc.project.linker.dependencies.Win32 = ws2_32.lib iphlpapi.lib +vc.project.linker.dependencies.Win32 = ws2_32.lib iphlpapi.lib mswsock.lib vc.project.linker.dependencies.debug_shared = vc.project.linker.dependencies.release_shared = vc.project.linker.dependencies.debug_static_md = Crypt32.lib diff --git a/NetSSL_Win/samples/Mail/Mail.progen b/NetSSL_Win/samples/Mail/Mail.progen index c63b31f352..bb072373bd 100644 --- a/NetSSL_Win/samples/Mail/Mail.progen +++ b/NetSSL_Win/samples/Mail/Mail.progen @@ -8,7 +8,7 @@ vc.project.configurations = debug_shared, release_shared, debug_static_mt, relea vc.project.prototype = ${vc.project.name}_vs90.vcproj vc.project.compiler.include = ..\\..\\..\\Foundation\\include;..\\..\\..\\XML\\include;..\\..\\..\\Util\\include;..\\..\\..\\Net\\include;..\\..\\..\\NetSSL_Win\\include vc.project.compiler.additionalOptions = /Zc:__cplusplus /std:c++17 -vc.project.linker.dependencies.Win32 = ws2_32.lib iphlpapi.lib +vc.project.linker.dependencies.Win32 = ws2_32.lib iphlpapi.lib mswsock.lib vc.project.linker.dependencies.debug_shared = vc.project.linker.dependencies.release_shared = vc.project.linker.dependencies.debug_static_md = Crypt32.lib diff --git a/NetSSL_Win/samples/download/download.progen b/NetSSL_Win/samples/download/download.progen index c63b31f352..bb072373bd 100644 --- a/NetSSL_Win/samples/download/download.progen +++ b/NetSSL_Win/samples/download/download.progen @@ -8,7 +8,7 @@ vc.project.configurations = debug_shared, release_shared, debug_static_mt, relea vc.project.prototype = ${vc.project.name}_vs90.vcproj vc.project.compiler.include = ..\\..\\..\\Foundation\\include;..\\..\\..\\XML\\include;..\\..\\..\\Util\\include;..\\..\\..\\Net\\include;..\\..\\..\\NetSSL_Win\\include vc.project.compiler.additionalOptions = /Zc:__cplusplus /std:c++17 -vc.project.linker.dependencies.Win32 = ws2_32.lib iphlpapi.lib +vc.project.linker.dependencies.Win32 = ws2_32.lib iphlpapi.lib mswsock.lib vc.project.linker.dependencies.debug_shared = vc.project.linker.dependencies.release_shared = vc.project.linker.dependencies.debug_static_md = Crypt32.lib diff --git a/NetSSL_Win/testsuite/TestSuite.progen b/NetSSL_Win/testsuite/TestSuite.progen index 6be09147b2..06c8d66d1e 100644 --- a/NetSSL_Win/testsuite/TestSuite.progen +++ b/NetSSL_Win/testsuite/TestSuite.progen @@ -8,7 +8,7 @@ vc.project.configurations = debug_shared, release_shared, debug_static_mt, relea vc.project.prototype = TestSuite_vs90.vcproj vc.project.compiler.include = ..\\..\\Foundation\\include;..\\..\\XML\\include;..\\..\\Util\\include;..\\..\\Net\\include vc.project.compiler.additionalOptions = /Zc:__cplusplus /std:c++17 -vc.project.linker.dependencies.Win32 = ws2_32.lib iphlpapi.lib +vc.project.linker.dependencies.Win32 = ws2_32.lib iphlpapi.lib mswsock.lib vc.project.linker.dependencies.debug_shared = vc.project.linker.dependencies.release_shared = vc.project.linker.dependencies.debug_static_md = Crypt32.lib diff --git a/PDF/testsuite/TestSuite.progen b/PDF/testsuite/TestSuite.progen index fbe3e74561..229ff3ba66 100644 --- a/PDF/testsuite/TestSuite.progen +++ b/PDF/testsuite/TestSuite.progen @@ -8,4 +8,4 @@ vc.project.configurations = debug_shared, release_shared, debug_static_mt, relea vc.project.prototype = TestSuite_vs90.vcproj vc.project.compiler.include = ..\\..\\Foundation\\include;..\\..\\XML\\include;..\\..\\Util\\include vc.project.compiler.additionalOptions = /Zc:__cplusplus /std:c++17 -vc.project.linker.dependencies = iphlpapi.lib +vc.project.linker.dependencies = iphlpapi.lib mswsock.lib diff --git a/PageCompiler/File2Page/File2Page.progen b/PageCompiler/File2Page/File2Page.progen index fd5708eca4..0df5eb4d7f 100644 --- a/PageCompiler/File2Page/File2Page.progen +++ b/PageCompiler/File2Page/File2Page.progen @@ -13,5 +13,5 @@ vc.project.compiler.defines.shared = vc.project.compiler.defines.debug_shared = ${vc.project.compiler.defines.shared} vc.project.compiler.defines.release_shared = ${vc.project.compiler.defines.shared} vc.project.compiler.additionalOptions = /Zc:__cplusplus /std:c++17 -vc.project.linker.dependencies = ws2_32.lib iphlpapi.lib +vc.project.linker.dependencies = ws2_32.lib iphlpapi.lib mswsock.lib vc.solution.create = true diff --git a/PageCompiler/PageCompiler.progen b/PageCompiler/PageCompiler.progen index d0193b1bfb..8bdae3fff2 100644 --- a/PageCompiler/PageCompiler.progen +++ b/PageCompiler/PageCompiler.progen @@ -13,5 +13,5 @@ vc.project.compiler.defines.shared = vc.project.compiler.defines.debug_shared = ${vc.project.compiler.defines.shared} vc.project.compiler.defines.release_shared = ${vc.project.compiler.defines.shared} vc.project.compiler.additionalOptions = /Zc:__cplusplus /std:c++17 -vc.project.linker.dependencies = ws2_32.lib iphlpapi.lib +vc.project.linker.dependencies = ws2_32.lib iphlpapi.lib mswsock.lib vc.solution.create = true diff --git a/PageCompiler/samples/HTTPTimeServer/HTTPTimeServer.progen b/PageCompiler/samples/HTTPTimeServer/HTTPTimeServer.progen index ede2c7832c..b4cc41e63d 100644 --- a/PageCompiler/samples/HTTPTimeServer/HTTPTimeServer.progen +++ b/PageCompiler/samples/HTTPTimeServer/HTTPTimeServer.progen @@ -8,4 +8,4 @@ vc.project.configurations = debug_shared, release_shared, debug_static_mt, relea vc.project.prototype = ${vc.project.name}_vs90.vcproj vc.project.compiler.include = ..\\..\\..\\Foundation\\include;..\\..\\..\\XML\\include;..\\..\\..\\Util\\include;..\\..\\..\\Net\\include vc.project.compiler.additionalOptions = /Zc:__cplusplus /std:c++17 -vc.project.linker.dependencies.Win32 = ws2_32.lib iphlpapi.lib +vc.project.linker.dependencies.Win32 = ws2_32.lib iphlpapi.lib mswsock.lib diff --git a/PocoDoc/PocoDoc.progen b/PocoDoc/PocoDoc.progen index 832c985c55..bb2a4f69e1 100644 --- a/PocoDoc/PocoDoc.progen +++ b/PocoDoc/PocoDoc.progen @@ -13,5 +13,5 @@ vc.project.compiler.defines.shared = vc.project.compiler.defines.debug_shared = ${vc.project.compiler.defines.shared} vc.project.compiler.defines.release_shared = ${vc.project.compiler.defines.shared} vc.project.compiler.additionalOptions = /Zc:__cplusplus /std:c++17 -vc.project.linker.dependencies = ws2_32.lib iphlpapi.lib +vc.project.linker.dependencies = ws2_32.lib iphlpapi.lib mswsock.lib vc.solution.create = true diff --git a/ProGen/ProGen.progen b/ProGen/ProGen.progen index 93a3aecb4b..1b2188dd46 100644 --- a/ProGen/ProGen.progen +++ b/ProGen/ProGen.progen @@ -13,5 +13,5 @@ vc.project.compiler.defines.shared = vc.project.compiler.defines.debug_shared = ${vc.project.compiler.defines.shared} vc.project.compiler.defines.release_shared = ${vc.project.compiler.defines.shared} vc.project.compiler.additionalOptions = /Zc:__cplusplus /std:c++17 -vc.project.linker.dependencies = ws2_32.lib iphlpapi.lib +vc.project.linker.dependencies = ws2_32.lib iphlpapi.lib mswsock.lib vc.solution.create = true diff --git a/Prometheus/samples/MetricsSample/MetricsSample.progen b/Prometheus/samples/MetricsSample/MetricsSample.progen index a6047e0a0a..718397f29b 100644 --- a/Prometheus/samples/MetricsSample/MetricsSample.progen +++ b/Prometheus/samples/MetricsSample/MetricsSample.progen @@ -8,4 +8,4 @@ vc.project.configurations = debug_shared, release_shared, debug_static_mt, relea vc.project.prototype = ${vc.project.name}_vs90.vcproj vc.project.compiler.include = ..\\..\\..\\Foundation\\include;..\\..\\..\\Util\\include;..\\..\\..\\XML\\include;..\\..\\..\\JSON\\include;..\\..\\..\\Net\\include;..\\..\\..\\Prometheus\\include vc.project.compiler.additionalOptions = /Zc:__cplusplus /std:c++17 -vc.project.linker.dependencies.Win32 = ws2_32.lib iphlpapi.lib +vc.project.linker.dependencies.Win32 = ws2_32.lib iphlpapi.lib mswsock.lib diff --git a/Redis/testsuite/TestSuite.progen b/Redis/testsuite/TestSuite.progen index c1bc49fedd..32700f626a 100644 --- a/Redis/testsuite/TestSuite.progen +++ b/Redis/testsuite/TestSuite.progen @@ -8,4 +8,4 @@ vc.project.configurations = debug_shared, release_shared, debug_static_mt, relea vc.project.prototype = TestSuite_vs90.vcproj vc.project.compiler.include = ..\\..\\Foundation\\include;..\\..\\Net\\include vc.project.compiler.additionalOptions = /Zc:__cplusplus /std:c++17 -vc.project.linker.dependencies.Win32 = ws2_32.lib iphlpapi.lib +vc.project.linker.dependencies.Win32 = ws2_32.lib iphlpapi.lib mswsock.lib diff --git a/Util/samples/SampleApp/SampleApp.progen b/Util/samples/SampleApp/SampleApp.progen index b1d2420a5b..5e8490c902 100644 --- a/Util/samples/SampleApp/SampleApp.progen +++ b/Util/samples/SampleApp/SampleApp.progen @@ -8,4 +8,4 @@ vc.project.configurations = debug_shared, release_shared, debug_static_mt, relea vc.project.prototype = ${vc.project.name}_vs90.vcproj vc.project.compiler.include = ..\\..\\..\\Foundation\\include;..\\..\\..\\XML\\include;..\\..\\..\\Util\\include vc.project.compiler.additionalOptions = /Zc:__cplusplus /std:c++17 -vc.project.linker.dependencies.Win32 = ws2_32.lib iphlpapi.lib +vc.project.linker.dependencies.Win32 = ws2_32.lib iphlpapi.lib mswsock.lib diff --git a/Util/samples/SampleServer/SampleServer.progen b/Util/samples/SampleServer/SampleServer.progen index b1d2420a5b..5e8490c902 100644 --- a/Util/samples/SampleServer/SampleServer.progen +++ b/Util/samples/SampleServer/SampleServer.progen @@ -8,4 +8,4 @@ vc.project.configurations = debug_shared, release_shared, debug_static_mt, relea vc.project.prototype = ${vc.project.name}_vs90.vcproj vc.project.compiler.include = ..\\..\\..\\Foundation\\include;..\\..\\..\\XML\\include;..\\..\\..\\Util\\include vc.project.compiler.additionalOptions = /Zc:__cplusplus /std:c++17 -vc.project.linker.dependencies.Win32 = ws2_32.lib iphlpapi.lib +vc.project.linker.dependencies.Win32 = ws2_32.lib iphlpapi.lib mswsock.lib diff --git a/Util/samples/pkill/pkill.progen b/Util/samples/pkill/pkill.progen index b1d2420a5b..5e8490c902 100644 --- a/Util/samples/pkill/pkill.progen +++ b/Util/samples/pkill/pkill.progen @@ -8,4 +8,4 @@ vc.project.configurations = debug_shared, release_shared, debug_static_mt, relea vc.project.prototype = ${vc.project.name}_vs90.vcproj vc.project.compiler.include = ..\\..\\..\\Foundation\\include;..\\..\\..\\XML\\include;..\\..\\..\\Util\\include vc.project.compiler.additionalOptions = /Zc:__cplusplus /std:c++17 -vc.project.linker.dependencies.Win32 = ws2_32.lib iphlpapi.lib +vc.project.linker.dependencies.Win32 = ws2_32.lib iphlpapi.lib mswsock.lib diff --git a/Util/testsuite/TestSuite.progen b/Util/testsuite/TestSuite.progen index 2280fee752..500ed975eb 100644 --- a/Util/testsuite/TestSuite.progen +++ b/Util/testsuite/TestSuite.progen @@ -8,4 +8,4 @@ vc.project.configurations = debug_shared, release_shared, debug_static_mt, relea vc.project.prototype = TestSuite_vs90.vcproj vc.project.compiler.include = ..\\..\\Foundation\\include;..\\..\\XML\\include;..\\..\\JSON\\include vc.project.compiler.additionalOptions = /Zc:__cplusplus /std:c++17 -vc.project.linker.dependencies.Win32 = iphlpapi.lib +vc.project.linker.dependencies.Win32 = iphlpapi.lib mswsock.lib diff --git a/XML/samples/DOMParser/DOMParser.progen b/XML/samples/DOMParser/DOMParser.progen index 299a2da6e4..63d42fa111 100644 --- a/XML/samples/DOMParser/DOMParser.progen +++ b/XML/samples/DOMParser/DOMParser.progen @@ -8,4 +8,4 @@ vc.project.configurations = debug_shared, release_shared, debug_static_mt, relea vc.project.prototype = ${vc.project.name}_vs90.vcproj vc.project.compiler.include = ..\\..\\..\\Foundation\\include;..\\..\\..\\XML\\include vc.project.compiler.additionalOptions = /Zc:__cplusplus /std:c++17 -vc.project.linker.dependencies.Win32 = ws2_32.lib iphlpapi.lib +vc.project.linker.dependencies.Win32 = ws2_32.lib iphlpapi.lib mswsock.lib diff --git a/XML/samples/DOMWriter/DOMWriter.progen b/XML/samples/DOMWriter/DOMWriter.progen index 299a2da6e4..63d42fa111 100644 --- a/XML/samples/DOMWriter/DOMWriter.progen +++ b/XML/samples/DOMWriter/DOMWriter.progen @@ -8,4 +8,4 @@ vc.project.configurations = debug_shared, release_shared, debug_static_mt, relea vc.project.prototype = ${vc.project.name}_vs90.vcproj vc.project.compiler.include = ..\\..\\..\\Foundation\\include;..\\..\\..\\XML\\include vc.project.compiler.additionalOptions = /Zc:__cplusplus /std:c++17 -vc.project.linker.dependencies.Win32 = ws2_32.lib iphlpapi.lib +vc.project.linker.dependencies.Win32 = ws2_32.lib iphlpapi.lib mswsock.lib diff --git a/XML/samples/PrettyPrint/PrettyPrint.progen b/XML/samples/PrettyPrint/PrettyPrint.progen index 299a2da6e4..63d42fa111 100644 --- a/XML/samples/PrettyPrint/PrettyPrint.progen +++ b/XML/samples/PrettyPrint/PrettyPrint.progen @@ -8,4 +8,4 @@ vc.project.configurations = debug_shared, release_shared, debug_static_mt, relea vc.project.prototype = ${vc.project.name}_vs90.vcproj vc.project.compiler.include = ..\\..\\..\\Foundation\\include;..\\..\\..\\XML\\include vc.project.compiler.additionalOptions = /Zc:__cplusplus /std:c++17 -vc.project.linker.dependencies.Win32 = ws2_32.lib iphlpapi.lib +vc.project.linker.dependencies.Win32 = ws2_32.lib iphlpapi.lib mswsock.lib diff --git a/XML/samples/SAXParser/SAXParser.progen b/XML/samples/SAXParser/SAXParser.progen index 299a2da6e4..63d42fa111 100644 --- a/XML/samples/SAXParser/SAXParser.progen +++ b/XML/samples/SAXParser/SAXParser.progen @@ -8,4 +8,4 @@ vc.project.configurations = debug_shared, release_shared, debug_static_mt, relea vc.project.prototype = ${vc.project.name}_vs90.vcproj vc.project.compiler.include = ..\\..\\..\\Foundation\\include;..\\..\\..\\XML\\include vc.project.compiler.additionalOptions = /Zc:__cplusplus /std:c++17 -vc.project.linker.dependencies.Win32 = ws2_32.lib iphlpapi.lib +vc.project.linker.dependencies.Win32 = ws2_32.lib iphlpapi.lib mswsock.lib diff --git a/XML/testsuite/TestSuite.progen b/XML/testsuite/TestSuite.progen index 99ba45b05c..851ab8bcdc 100644 --- a/XML/testsuite/TestSuite.progen +++ b/XML/testsuite/TestSuite.progen @@ -8,4 +8,4 @@ vc.project.configurations = debug_shared, release_shared, debug_static_mt, relea vc.project.prototype = TestSuite_vs90.vcproj vc.project.compiler.include = ..\\..\\Foundation\\include vc.project.compiler.additionalOptions = /Zc:__cplusplus /std:c++17 -vc.project.linker.dependencies = iphlpapi.lib +vc.project.linker.dependencies = iphlpapi.lib mswsock.lib diff --git a/Zip/Zip.progen b/Zip/Zip.progen index c3cddae59c..13dd4f2c50 100644 --- a/Zip/Zip.progen +++ b/Zip/Zip.progen @@ -14,6 +14,6 @@ vc.project.compiler.defines.debug_shared = ${vc.project.compiler.defines.shared} vc.project.compiler.defines.release_shared = ${vc.project.compiler.defines.shared} vc.project.compiler.disableWarnings = 4244;4267 vc.project.compiler.additionalOptions = /Zc:__cplusplus /std:c++17 -vc.project.linker.dependencies.Win32 = ws2_32.lib iphlpapi.lib +vc.project.linker.dependencies.Win32 = ws2_32.lib iphlpapi.lib mswsock.lib vc.solution.create = true vc.solution.include = testsuite\\TestSuite diff --git a/Zip/samples/unzip/unzip.progen b/Zip/samples/unzip/unzip.progen index 32577f864c..4509bb1867 100644 --- a/Zip/samples/unzip/unzip.progen +++ b/Zip/samples/unzip/unzip.progen @@ -8,4 +8,4 @@ vc.project.configurations = debug_shared, release_shared, debug_static_mt, relea vc.project.prototype = ${vc.project.name}_vs90.vcproj vc.project.compiler.include = ..\\..\\..\\Foundation\\include;..\\..\\..\\XML\\include;..\\..\\..\\Util\\include;..\\..\\..\\Zip\\include vc.project.compiler.additionalOptions = /Zc:__cplusplus /std:c++17 -vc.project.linker.dependencies.Win32 = ws2_32.lib iphlpapi.lib +vc.project.linker.dependencies.Win32 = ws2_32.lib iphlpapi.lib mswsock.lib diff --git a/Zip/samples/zip/zip.progen b/Zip/samples/zip/zip.progen index 32577f864c..4509bb1867 100644 --- a/Zip/samples/zip/zip.progen +++ b/Zip/samples/zip/zip.progen @@ -8,4 +8,4 @@ vc.project.configurations = debug_shared, release_shared, debug_static_mt, relea vc.project.prototype = ${vc.project.name}_vs90.vcproj vc.project.compiler.include = ..\\..\\..\\Foundation\\include;..\\..\\..\\XML\\include;..\\..\\..\\Util\\include;..\\..\\..\\Zip\\include vc.project.compiler.additionalOptions = /Zc:__cplusplus /std:c++17 -vc.project.linker.dependencies.Win32 = ws2_32.lib iphlpapi.lib +vc.project.linker.dependencies.Win32 = ws2_32.lib iphlpapi.lib mswsock.lib diff --git a/Zip/testsuite/TestSuite.progen b/Zip/testsuite/TestSuite.progen index 1617f52d89..3c9cf8d616 100644 --- a/Zip/testsuite/TestSuite.progen +++ b/Zip/testsuite/TestSuite.progen @@ -8,5 +8,5 @@ vc.project.configurations = debug_shared, release_shared, debug_static_mt, relea vc.project.prototype = TestSuite_vs90.vcproj vc.project.compiler.include = ..\\..\\Foundation\\include vc.project.compiler.additionalOptions = /Zc:__cplusplus /std:c++17 -vc.project.linker.dependencies = iphlpapi.lib +vc.project.linker.dependencies = iphlpapi.lib mswsock.lib diff --git a/build/config/MinGW b/build/config/MinGW index f3c25ee9e3..4c177669c8 100644 --- a/build/config/MinGW +++ b/build/config/MinGW @@ -70,4 +70,4 @@ SYSFLAGS = -D_WIN32 -DMINGW32 -DWINVER=0x501 -DPOCO_NO_FPENVIRONMENT -DPCRE_STAT # # System Specific Libraries # -SYSLIBS = -L/usr/local/lib -L/usr/lib -liphlpapi -lssl -lcrypto -lws2_32 +SYSLIBS = -L/usr/local/lib -L/usr/lib -liphlpapi -lmswsock -lssl -lcrypto -lws2_32 diff --git a/build/config/MinGW-CrossEnv b/build/config/MinGW-CrossEnv index 3b2a52e788..87080ef3b8 100644 --- a/build/config/MinGW-CrossEnv +++ b/build/config/MinGW-CrossEnv @@ -72,4 +72,4 @@ SYSFLAGS = -D_WIN32 -DMINGW32 -DWINVER=0x501 -DPOCO_NO_FPENVIRONMENT -DPCRE_STAT # # System Specific Libraries # -SYSLIBS = -liphlpapi -lssl -lcrypto -lws2_32 +SYSLIBS = -liphlpapi -lmswsock -lssl -lcrypto -lws2_32