From b75d84b78ac3bd853d8de35c0af9914bf48626a7 Mon Sep 17 00:00:00 2001 From: Your Name Date: Mon, 1 Dec 2025 16:19:27 +0330 Subject: [PATCH] chore: fix MinGW builds --- .github/workflows/ci.yml | 14 +++++++------- include/boost/http_proto/server/basic_router.hpp | 4 ++-- include/boost/http_proto/server/route_handler.hpp | 14 ++++++++++---- include/boost/http_proto/sink.hpp | 3 +-- include/boost/http_proto/source.hpp | 3 +-- src/server/basic_router.cpp | 5 ----- src/server/route_handler.cpp | 5 +++++ 7 files changed, 26 insertions(+), 22 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 254c3b01..5e861bd5 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -134,11 +134,11 @@ jobs: runs-on: "windows-2022" b2-toolset: "gcc" generator: "MinGW Makefiles" - is-latest: false + is-latest: true is-earliest: true - name: "MinGW" + name: "MinGW (shared)" shared: true - build-type: "Release" + build-type: "Debug" build-cmake: true - compiler: "mingw" @@ -148,9 +148,9 @@ jobs: runs-on: "windows-2022" b2-toolset: "gcc" generator: "MinGW Makefiles" - is-latest: false + is-latest: true is-earliest: true - name: "MinGW" + name: "MinGW (static)" shared: false build-type: "Release" build-cmake: true @@ -340,7 +340,7 @@ jobs: b2-toolset: "gcc" is-latest: true name: "GCC 15: C++17-20 (ubsan)" - shared: true + shared: false ubsan: true build-type: "RelWithDebInfo" @@ -614,7 +614,7 @@ jobs: b2-toolset: "clang" is-latest: true name: "Clang 20: C++23-2C (ubsan, x86)" - shared: true + shared: false ubsan: true x86: true build-type: "RelWithDebInfo" diff --git a/include/boost/http_proto/server/basic_router.hpp b/include/boost/http_proto/server/basic_router.hpp index 61ab9212..f79fdc4b 100644 --- a/include/boost/http_proto/server/basic_router.hpp +++ b/include/boost/http_proto/server/basic_router.hpp @@ -142,9 +142,9 @@ class any_router friend class http_proto::basic_router; using opt_flags = unsigned int; - struct BOOST_SYMBOL_VISIBLE any_handler + struct BOOST_HTTP_PROTO_DECL any_handler { - BOOST_HTTP_PROTO_DECL virtual ~any_handler(); + virtual ~any_handler() = default; virtual std::size_t count() const noexcept = 0; virtual route_result invoke( basic_request&, basic_response&) const = 0; diff --git a/include/boost/http_proto/server/route_handler.hpp b/include/boost/http_proto/server/route_handler.hpp index 5c1cca01..5f92b271 100644 --- a/include/boost/http_proto/server/route_handler.hpp +++ b/include/boost/http_proto/server/route_handler.hpp @@ -63,8 +63,7 @@ struct Request : basic_request /** Response object for HTTP route handlers */ -struct BOOST_SYMBOL_VISIBLE - Response : basic_response +struct Response : basic_response { /** The HTTP response message */ @@ -87,16 +86,23 @@ struct BOOST_SYMBOL_VISIBLE */ capy::datastore data; + /** Constructor. + */ + BOOST_HTTP_PROTO_DECL + Response(); + /** Destructor. */ - BOOST_HTTP_PROTO_DECL virtual ~Response(); + BOOST_HTTP_PROTO_DECL + virtual ~Response(); /** Reset the object for a new request. This clears any state associated with the previous request, preparing the object for use with a new request. */ - BOOST_HTTP_PROTO_DECL void reset(); + BOOST_HTTP_PROTO_DECL + void reset(); /** Set the status code of the response. @par Example diff --git a/include/boost/http_proto/sink.hpp b/include/boost/http_proto/sink.hpp index 7e19be50..8445be7b 100644 --- a/include/boost/http_proto/sink.hpp +++ b/include/boost/http_proto/sink.hpp @@ -36,7 +36,7 @@ namespace http_proto { @ref source, @ref parser. */ -struct BOOST_SYMBOL_VISIBLE +struct BOOST_HTTP_PROTO_DECL sink { /** The results of consuming data. @@ -188,7 +188,6 @@ struct BOOST_SYMBOL_VISIBLE @param more `true` if there will be one or more subsequent calls. */ - BOOST_HTTP_PROTO_DECL virtual results on_write( diff --git a/include/boost/http_proto/source.hpp b/include/boost/http_proto/source.hpp index 968cfac0..6be07b41 100644 --- a/include/boost/http_proto/source.hpp +++ b/include/boost/http_proto/source.hpp @@ -36,7 +36,7 @@ namespace http_proto { @ref sink, @ref serializer. */ -struct BOOST_SYMBOL_VISIBLE +struct BOOST_HTTP_PROTO_DECL source { /** The results of producing data. @@ -191,7 +191,6 @@ struct BOOST_SYMBOL_VISIBLE indicate failure or that no more data remains (or both). */ - BOOST_HTTP_PROTO_DECL virtual results on_read( diff --git a/src/server/basic_router.cpp b/src/server/basic_router.cpp index daf50cde..1cb3c264 100644 --- a/src/server/basic_router.cpp +++ b/src/server/basic_router.cpp @@ -80,11 +80,6 @@ pattern target path(use) path(get) //------------------------------------------------ - -any_router::any_handler::~any_handler() = default; - -//------------------------------------------------ - /* static void diff --git a/src/server/route_handler.cpp b/src/server/route_handler.cpp index bbe2f4d1..4ad459a7 100644 --- a/src/server/route_handler.cpp +++ b/src/server/route_handler.cpp @@ -15,6 +15,11 @@ namespace boost { namespace http_proto { +Response:: +Response() +{ +} + Response:: ~Response() {