[drogon, trantor] Bump drogon to 1.9.3 and trantor to 1.5.17 (#36671)

This commit is contained in:
An Tao 2024-02-10 12:40:41 +08:00 committed by GitHub
parent 328fe728ea
commit 345ac44ab8
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
8 changed files with 16 additions and 43 deletions

View File

@ -2,7 +2,7 @@ vcpkg_from_github(
OUT_SOURCE_PATH SOURCE_PATH
REPO an-tao/drogon
REF "v${VERSION}"
SHA512 54565dac787795cd297206f6222e260abc012790c4b662834864ec31f5b00735b89b7134f317f2b01f0377abd4222ee445631ee1f3cd1f50c918e6d3645582df
SHA512 cb1ace1e6fcc9112c71c221d24b80dea62245b908037f5f1065b899c62142c568f0e3410a06210ddb599f7771b56ea8acd1c7b5070893f4effb07cfd4b61f8e4
HEAD_REF master
PATCHES
0001-vcpkg.patch

View File

@ -1,6 +1,6 @@
{
"name": "drogon",
"version-semver": "1.9.2",
"version-semver": "1.9.3",
"description": "A C++14/17 based HTTP web application framework running on Linux/macOS/Unix/Windows",
"homepage": "https://github.com/an-tao/drogon",
"documentation": "https://drogon.docsforge.com/master/overview/",

View File

@ -1,36 +0,0 @@
diff --git a/trantor/net/inner/FileBufferNodeWin.cc b/trantor/net/inner/FileBufferNodeWin.cc
index eb9fcbd..a0b9791 100644
--- a/trantor/net/inner/FileBufferNodeWin.cc
+++ b/trantor/net/inner/FileBufferNodeWin.cc
@@ -1,5 +1,11 @@
#include <trantor/net/inner/BufferNode.h>
#include <windows.h>
+#include <fileapi.h>
+#if defined(WINAPI_FAMILY) && (WINAPI_FAMILY == WINAPI_FAMILY_APP)
+#define UWP 1
+#else
+#define UWP 0
+#endif
namespace trantor
{
@@ -9,6 +15,11 @@ class FileBufferNode : public BufferNode
public:
FileBufferNode(const wchar_t *fileName, long long offset, long long length)
{
+#if UWP
+ sendHandle_ = CreateFile2(
+ fileName, GENERIC_READ, FILE_SHARE_READ, OPEN_EXISTING, nullptr);
+
+#else
sendHandle_ = CreateFileW(fileName,
GENERIC_READ,
FILE_SHARE_READ,
@@ -16,6 +27,7 @@ class FileBufferNode : public BufferNode
OPEN_EXISTING,
FILE_ATTRIBUTE_NORMAL,
nullptr);
+#endif
if (sendHandle_ == INVALID_HANDLE_VALUE)
{
LOG_SYSERR << fileName << " open error";

View File

@ -2,11 +2,10 @@ vcpkg_from_github(
OUT_SOURCE_PATH SOURCE_PATH
REPO an-tao/trantor
REF "v${VERSION}"
SHA512 14380d3781dabaff22041c4b9abcbfc591640bbb30a08badc9724ccc6ba817ab895774e37f24311f83b1bd139ad50d232d9eab510a4ede20bf2dff89cd308728
SHA512 43202240968b90d0e6d211d3b7a918567587e4ad26c360848efee2661cc1d49d35de408db5e2ff7314be879faac99ffa29ffa1f3735f9606d95874130db05250
HEAD_REF master
PATCHES
000-fix-deps.patch
001-uwp.patch
)
vcpkg_cmake_configure(

View File

@ -1,6 +1,6 @@
{
"name": "trantor",
"version-semver": "1.5.16",
"version-semver": "1.5.17",
"description": "A non-blocking I/O cross-platform TCP network library, using C++14",
"homepage": "https://github.com/an-tao/trantor",
"license": "BSD-2-Clause",

View File

@ -2305,7 +2305,7 @@
"port-version": 0
},
"drogon": {
"baseline": "1.9.2",
"baseline": "1.9.3",
"port-version": 0
},
"dstorage": {
@ -8681,7 +8681,7 @@
"port-version": 0
},
"trantor": {
"baseline": "1.5.16",
"baseline": "1.5.17",
"port-version": 0
},
"tre": {

View File

@ -1,5 +1,10 @@
{
"versions": [
{
"git-tree": "963d27de10dfedc9f4980726aa5c8e4731c1bdb8",
"version-semver": "1.9.3",
"port-version": 0
},
{
"git-tree": "881a2d3fe8ed95836190c20c36471e47168954c5",
"version-semver": "1.9.2",

View File

@ -1,5 +1,10 @@
{
"versions": [
{
"git-tree": "9df007af7927374a349d44eebc57fd98ebcaebfd",
"version-semver": "1.5.17",
"port-version": 0
},
{
"git-tree": "87607f8f4115c05d79fdcb63b060c0cf4cba7ece",
"version-semver": "1.5.16",