Files
MINGW-packages/mingw-w64-poco/013-templates-export.patch
Алексей 913dff4b0e poco: Update to 1.14.2 (#25763)
* poco: Update to 1.14.2

* Rework patch for templated classes export
2025-10-09 14:13:59 +03:00

281 lines
11 KiB
Diff

diff -Naur poco-1.14.2-all-orig/Data/ODBC/include/Poco/Data/ODBC/Diagnostics.h poco-1.14.2-all/Data/ODBC/include/Poco/Data/ODBC/Diagnostics.h
--- poco-1.14.2-all-orig/Data/ODBC/include/Poco/Data/ODBC/Diagnostics.h 2025-05-12 12:00:13.000000000 +0300
+++ poco-1.14.2-all/Data/ODBC/include/Poco/Data/ODBC/Diagnostics.h 2025-10-09 12:58:53.032306200 +0300
@@ -38,7 +38,7 @@
template <typename H, SQLSMALLINT handleType>
-class Diagnostics
+class ODBC_API Diagnostics
/// Utility class providing functionality for retrieving ODBC diagnostic
/// records. Diagnostics object must be created with corresponding handle
/// as constructor argument. During construction, diagnostic records fields
@@ -245,6 +245,7 @@
// explicit instantiation definition
#ifndef POCO_DOC
+#if !defined(POCO_COMPILER_MINGW)
#if defined(POCO_OS_FAMILY_WINDOWS)
extern template class Diagnostics<SQLHENV, SQL_HANDLE_ENV>;
extern template class Diagnostics<SQLHDBC, SQL_HANDLE_DBC>;
@@ -256,6 +257,7 @@
extern template class ODBC_API Diagnostics<SQLHSTMT, SQL_HANDLE_STMT>;
extern template class ODBC_API Diagnostics<SQLHDESC, SQL_HANDLE_DESC>;
#endif
+#endif
#endif
diff -Naur poco-1.14.2-all-orig/Data/ODBC/include/Poco/Data/ODBC/Error.h poco-1.14.2-all/Data/ODBC/include/Poco/Data/ODBC/Error.h
--- poco-1.14.2-all-orig/Data/ODBC/include/Poco/Data/ODBC/Error.h 2025-05-12 12:00:13.000000000 +0300
+++ poco-1.14.2-all/Data/ODBC/include/Poco/Data/ODBC/Error.h 2025-10-09 12:49:53.193458200 +0300
@@ -35,7 +35,7 @@
template <typename H, SQLSMALLINT handleType>
-class Error
+class ODBC_API Error
/// Class encapsulating ODBC diagnostic record collection. Collection is generated
/// during construction. Class provides access and string generation for the collection
/// as well as individual diagnostic records.
@@ -127,6 +127,7 @@
// explicit instantiation definition
#ifndef POCO_DOC
+#if !defined(POCO_COMPILER_MINGW)
#if defined(POCO_OS_FAMILY_WINDOWS)
extern template class Error<SQLHENV, SQL_HANDLE_ENV>;
extern template class Error<SQLHDBC, SQL_HANDLE_DBC>;
@@ -140,6 +141,7 @@
#endif
#endif
+#endif
using EnvironmentError = Error<SQLHENV, SQL_HANDLE_ENV>;
using ConnectionError = Error<SQLHDBC, SQL_HANDLE_DBC>;
diff -Naur poco-1.14.2-all-orig/Data/ODBC/include/Poco/Data/ODBC/ODBCException.h poco-1.14.2-all/Data/ODBC/include/Poco/Data/ODBC/ODBCException.h
--- poco-1.14.2-all-orig/Data/ODBC/include/Poco/Data/ODBC/ODBCException.h 2025-05-12 12:00:13.000000000 +0300
+++ poco-1.14.2-all/Data/ODBC/include/Poco/Data/ODBC/ODBCException.h 2025-10-09 12:58:27.817217400 +0300
@@ -38,7 +38,7 @@
template <class H, SQLSMALLINT handleType>
-class HandleException: public ODBCException
+class ODBC_API HandleException: public ODBCException
{
public:
HandleException(const H& handle): _error(handle)
@@ -141,6 +141,7 @@
// explicit instantiation definition
#ifndef POCO_DOC
+#if !defined(POCO_COMPILER_MINGW)
#if defined(POCO_OS_FAMILY_WINDOWS)
extern template class HandleException<SQLHENV, SQL_HANDLE_ENV>;
extern template class HandleException<SQLHDBC, SQL_HANDLE_DBC>;
@@ -154,6 +155,7 @@
#endif
#endif
+#endif
using EnvironmentException = HandleException<SQLHENV, SQL_HANDLE_ENV>;
diff -Naur poco-1.14.2-all-orig/Foundation/include/Poco/BufferedBidirectionalStreamBuf.h poco-1.14.2-all/Foundation/include/Poco/BufferedBidirectionalStreamBuf.h
--- poco-1.14.2-all-orig/Foundation/include/Poco/BufferedBidirectionalStreamBuf.h 2025-05-12 12:00:11.000000000 +0300
+++ poco-1.14.2-all/Foundation/include/Poco/BufferedBidirectionalStreamBuf.h 2025-10-09 13:00:20.183118200 +0300
@@ -30,7 +30,7 @@
template <typename ch, typename tr, typename ba = BufferAllocator<ch>>
-class BasicBufferedBidirectionalStreamBuf: public std::basic_streambuf<ch, tr>
+class Foundation_API BasicBufferedBidirectionalStreamBuf: public std::basic_streambuf<ch, tr>
/// This is an implementation of a buffered bidirectional
/// streambuf that greatly simplifies the implementation of
/// custom streambufs of various kinds.
@@ -182,11 +182,13 @@
// We provide an instantiation for char.
//
+#if !defined(POCO_COMPILER_MINGW)
#if defined(POCO_OS_FAMILY_WINDOWS)
extern template class BasicBufferedBidirectionalStreamBuf<char, std::char_traits<char>>;
#else
extern template class Foundation_API BasicBufferedBidirectionalStreamBuf<char, std::char_traits<char>>;
#endif
+#endif
using BufferedBidirectionalStreamBuf = BasicBufferedBidirectionalStreamBuf<char, std::char_traits<char>>;
diff -Naur poco-1.14.2-all-orig/Foundation/include/Poco/BufferedStreamBuf.h poco-1.14.2-all/Foundation/include/Poco/BufferedStreamBuf.h
--- poco-1.14.2-all-orig/Foundation/include/Poco/BufferedStreamBuf.h 2025-05-12 12:00:11.000000000 +0300
+++ poco-1.14.2-all/Foundation/include/Poco/BufferedStreamBuf.h 2025-10-09 13:00:33.583045100 +0300
@@ -30,7 +30,7 @@
template <typename ch, typename tr, typename ba = BufferAllocator<ch>>
-class BasicBufferedStreamBuf: public std::basic_streambuf<ch, tr>
+class Foundation_API BasicBufferedStreamBuf: public std::basic_streambuf<ch, tr>
/// This is an implementation of a buffered streambuf
/// that greatly simplifies the implementation of
/// custom streambufs of various kinds.
@@ -164,11 +164,13 @@
// We provide an instantiation for char.
//
+#if !defined(POCO_COMPILER_MINGW)
#if defined(POCO_OS_FAMILY_WINDOWS)
extern template class BasicBufferedStreamBuf<char, std::char_traits<char>>;
#else
extern template class Foundation_API BasicBufferedStreamBuf<char, std::char_traits<char>>;
#endif
+#endif
using BufferedStreamBuf = BasicBufferedStreamBuf<char, std::char_traits<char>>;
diff -Naur poco-1.14.2-all-orig/Foundation/include/Poco/Dynamic/Struct.h poco-1.14.2-all/Foundation/include/Poco/Dynamic/Struct.h
--- poco-1.14.2-all-orig/Foundation/include/Poco/Dynamic/Struct.h 2025-05-12 12:00:11.000000000 +0300
+++ poco-1.14.2-all/Foundation/include/Poco/Dynamic/Struct.h 2025-10-09 12:50:47.372765800 +0300
@@ -64,7 +64,7 @@
template <typename K, typename M = std::map<K, Var>, typename S = std::set<K>>
-class Struct
+class Foundation_API Struct
/// Struct allows to define a named collection of Var objects.
{
public:
@@ -288,6 +288,7 @@
};
+#if !defined(POCO_COMPILER_MINGW)
#if defined(POCO_OS_FAMILY_WINDOWS)
extern template class Struct<std::string>;
@@ -305,6 +306,7 @@
extern template class Foundation_API Struct<int, OrderedMap<int, Var>, OrderedSet<int>>;
#endif
+#endif
template <>
diff -Naur poco-1.14.2-all-orig/Foundation/include/Poco/UTFString.h poco-1.14.2-all/Foundation/include/Poco/UTFString.h
--- poco-1.14.2-all-orig/Foundation/include/Poco/UTFString.h 2025-05-12 12:00:11.000000000 +0300
+++ poco-1.14.2-all/Foundation/include/Poco/UTFString.h 2025-10-09 13:03:10.754291400 +0300
@@ -307,6 +307,7 @@
} // namespace Poco
+#if !defined(POCO_COMPILER_MINGW)
#if defined(POCO_USE_STRING16)
extern template class Foundation_API std::basic_string<Poco::UTF16Char, Poco::UTF16CharTraits>;
#endif
@@ -314,6 +315,7 @@
#if defined(POCO_USE_STRING32)
extern template class Foundation_API std::basic_string<Poco::UTF32Char, Poco::UTF32CharTraits>;
#endif
+#endif
#endif // Foundation_UTFString_INCLUDED
diff -Naur poco-1.14.2-all-orig/Foundation/include/Poco/UnbufferedStreamBuf.h poco-1.14.2-all/Foundation/include/Poco/UnbufferedStreamBuf.h
--- poco-1.14.2-all-orig/Foundation/include/Poco/UnbufferedStreamBuf.h 2025-05-12 12:00:11.000000000 +0300
+++ poco-1.14.2-all/Foundation/include/Poco/UnbufferedStreamBuf.h 2025-10-09 12:30:04.853968200 +0300
@@ -29,7 +29,7 @@
template <typename ch, typename tr>
-class BasicUnbufferedStreamBuf: public std::basic_streambuf<ch, tr>
+class Foundation_API BasicUnbufferedStreamBuf: public std::basic_streambuf<ch, tr>
/// This is an implementation of an unbuffered streambuf
/// that greatly simplifies the implementation of
/// custom streambufs of various kinds.
@@ -164,11 +164,13 @@
// We provide an instantiation for char.
//
+#if !defined(POCO_COMPILER_MINGW)
#if defined(POCO_OS_FAMILY_WINDOWS)
extern template class BasicUnbufferedStreamBuf<char, std::char_traits<char>>;
#else
extern template class Foundation_API BasicUnbufferedStreamBuf<char, std::char_traits<char>>;
#endif
+#endif
using UnbufferedStreamBuf = BasicUnbufferedStreamBuf<char, std::char_traits<char>>;
diff -Naur poco-1.14.2-all-orig/Foundation/src/UnbufferedStreamBuf.cpp poco-1.14.2-all/Foundation/src/UnbufferedStreamBuf.cpp
--- poco-1.14.2-all-orig/Foundation/src/UnbufferedStreamBuf.cpp 2025-05-12 12:00:11.000000000 +0300
+++ poco-1.14.2-all/Foundation/src/UnbufferedStreamBuf.cpp 2025-10-09 12:28:42.424996200 +0300
@@ -21,5 +21,4 @@
#else
template class BasicUnbufferedStreamBuf<char, std::char_traits<char>>;
#endif
-
}
diff -Naur poco-1.14.2-all-orig/Foundation/src/VarHolder.cpp poco-1.14.2-all/Foundation/src/VarHolder.cpp
--- poco-1.14.2-all-orig/Foundation/src/VarHolder.cpp 2025-05-12 12:00:11.000000000 +0300
+++ poco-1.14.2-all/Foundation/src/VarHolder.cpp 2025-10-09 12:46:07.757064700 +0300
@@ -21,7 +21,6 @@
namespace Poco {
namespace Dynamic {
-
#if defined(POCO_OS_FAMILY_WINDOWS)
template class Foundation_API Struct<std::string>;
diff -Naur poco-1.14.2-all-orig/JSON/include/Poco/JSON/Array.h poco-1.14.2-all/JSON/include/Poco/JSON/Array.h
--- poco-1.14.2-all-orig/JSON/include/Poco/JSON/Array.h 2025-05-12 12:00:12.000000000 +0300
+++ poco-1.14.2-all/JSON/include/Poco/JSON/Array.h 2025-10-09 12:50:12.424222700 +0300
@@ -34,6 +34,7 @@
}
+#if !defined(POCO_COMPILER_MINGW)
#if defined(POCO_OS_FAMILY_WINDOWS)
// Explicitly instantiated shared pointer in JSON library
extern template class Poco::SharedPtr<Poco::JSON::Array>;
@@ -41,6 +42,7 @@
// Explicitly instantiated shared pointer in JSON library
extern template class JSON_API Poco::SharedPtr<Poco::JSON::Array>;
#endif
+#endif
namespace JSON {
diff -Naur poco-1.14.2-all-orig/JSON/include/Poco/JSON/Object.h poco-1.14.2-all/JSON/include/Poco/JSON/Object.h
--- poco-1.14.2-all-orig/JSON/include/Poco/JSON/Object.h 2025-05-12 12:00:12.000000000 +0300
+++ poco-1.14.2-all/JSON/include/Poco/JSON/Object.h 2025-10-09 12:50:20.315701500 +0300
@@ -41,6 +41,7 @@
}
+#if !defined(POCO_COMPILER_MINGW)
#if defined(POCO_OS_FAMILY_WINDOWS)
// Explicitly instatiated shared pointer in JSON library
extern template class Poco::SharedPtr<Poco::JSON::Object>;
@@ -48,6 +49,7 @@
// Explicitly instatiated shared pointer in JSON library
extern template class JSON_API Poco::SharedPtr<Poco::JSON::Object>;
#endif
+#endif
namespace JSON {
diff -Naur poco-1.14.2-all-orig/Net/include/Poco/Net/HTTPBasicStreamBuf.h poco-1.14.2-all/Net/include/Poco/Net/HTTPBasicStreamBuf.h
--- poco-1.14.2-all-orig/Net/include/Poco/Net/HTTPBasicStreamBuf.h 2025-05-12 12:00:12.000000000 +0300
+++ poco-1.14.2-all/Net/include/Poco/Net/HTTPBasicStreamBuf.h 2025-10-09 12:50:03.048356900 +0300
@@ -24,6 +24,9 @@
namespace Poco {
+
+template class Net_API BasicBufferedStreamBuf<char, std::char_traits<char>, Net::HTTPBufferAllocator>;
+
namespace Net {