Skip to content

Commit 709070d

Browse files
authored
[cpprestsdk] Remove _Openprot. (#51865)
1 parent 72d876b commit 709070d

5 files changed

Lines changed: 78 additions & 2 deletions

File tree

ports/cpprestsdk/portfile.cmake

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@ vcpkg_from_github(
1111
fix-clang-dllimport.patch # workaround for https://github.com/microsoft/cpprestsdk/issues/1710
1212
fix-asio-error.patch
1313
remove-stdext-checked-array-iterator-1836.patch # https://github.com/microsoft/cpprestsdk/pull/1836
14+
remove-openprot-1844.diff # https://github.com/microsoft/cpprestsdk/pull/1844
1415
)
1516

1617
vcpkg_check_features(
Lines changed: 70 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,70 @@
1+
diff --git a/Release/include/cpprest/filestream.h b/Release/include/cpprest/filestream.h
2+
index 1e4a0f278e2b6ac162c9d191a6d9912eeac8e575..511519a7de820d3308f364557a135d23caf03dd1 100644
3+
--- a/Release/include/cpprest/filestream.h
4+
+++ b/Release/include/cpprest/filestream.h
5+
@@ -715,7 +715,7 @@ class basic_file_buffer : public details::streambuf_state_manager<_CharType>
6+
const utility::string_t& _Filename,
7+
std::ios_base::openmode _Mode = std::ios_base::out,
8+
#ifdef _WIN32
9+
- int _Prot = (int)std::ios_base::_Openprot
10+
+ int _Prot = _SH_DENYNO
11+
#else
12+
int _Prot = 0 // unsupported on Linux, for now
13+
#endif
14+
@@ -1012,7 +1012,7 @@ class file_stream
15+
static pplx::task<streams::basic_istream<_CharType>> open_istream(const utility::string_t& file_name,
16+
std::ios_base::openmode mode = std::ios_base::in,
17+
#ifdef _WIN32
18+
- int prot = (int)std::ios_base::_Openprot
19+
+ int prot = _SH_DENYNO
20+
#else
21+
int prot = 0
22+
#endif
23+
@@ -1037,7 +1037,7 @@ class file_stream
24+
static pplx::task<streams::basic_ostream<_CharType>> open_ostream(const utility::string_t& file_name,
25+
std::ios_base::openmode mode = std::ios_base::out,
26+
#ifdef _WIN32
27+
- int prot = (int)std::ios_base::_Openprot
28+
+ int prot = _SH_DENYNO
29+
#else
30+
int prot = 0
31+
#endif
32+
diff --git a/Release/tests/functional/streams/fstreambuf_tests.cpp b/Release/tests/functional/streams/fstreambuf_tests.cpp
33+
index 190eb66b0cbf40b3ac1bc207ed5804ab80f20060..bd63633091c24ee99bfd8fcc6c01810759431ecb 100644
34+
--- a/Release/tests/functional/streams/fstreambuf_tests.cpp
35+
+++ b/Release/tests/functional/streams/fstreambuf_tests.cpp
36+
@@ -19,7 +19,7 @@ using namespace Windows::Storage;
37+
#endif
38+
39+
#ifdef _WIN32
40+
-#define DEFAULT_PROT (int)std::ios_base::_Openprot
41+
+#define DEFAULT_PROT _SH_DENYNO
42+
#else
43+
#define DEFAULT_PROT 0
44+
#define _SH_DENYRW 0x20
45+
diff --git a/Release/tests/functional/streams/istream_tests.cpp b/Release/tests/functional/streams/istream_tests.cpp
46+
index 32cb545aa266cea0217a1acaac1e99aed8ba219e..9feed549ead29426b3300e376295266386055bcd 100644
47+
--- a/Release/tests/functional/streams/istream_tests.cpp
48+
+++ b/Release/tests/functional/streams/istream_tests.cpp
49+
@@ -22,7 +22,7 @@ using namespace Windows::Storage;
50+
#endif
51+
52+
#ifdef _WIN32
53+
-#define DEFAULT_PROT (int)std::ios_base::_Openprot
54+
+#define DEFAULT_PROT _SH_DENYNO
55+
#else
56+
#define DEFAULT_PROT 0
57+
#endif
58+
diff --git a/Release/tests/functional/streams/stdstream_tests.cpp b/Release/tests/functional/streams/stdstream_tests.cpp
59+
index 34b9b3af1291b8fd53f65ea1eac7babdfffdb74e..4072224e05b79ba3cde46fd14348058b44496502 100644
60+
--- a/Release/tests/functional/streams/stdstream_tests.cpp
61+
+++ b/Release/tests/functional/streams/stdstream_tests.cpp
62+
@@ -23,7 +23,7 @@ using namespace Windows::Storage;
63+
#endif
64+
65+
#ifdef _WIN32
66+
-#define DEFAULT_PROT (int)std::ios_base::_Openprot
67+
+#define DEFAULT_PROT _SH_DENYNO
68+
#else
69+
#define DEFAULT_PROT 0
70+
#endif

ports/cpprestsdk/vcpkg.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
22
"name": "cpprestsdk",
33
"version": "2.10.19",
4-
"port-version": 4,
4+
"port-version": 5,
55
"description": [
66
"C++11 JSON, REST, and OAuth library",
77
"The C++ REST SDK is a Microsoft project for cloud-based client-server communication in native code using a modern asynchronous C++ API design. This project aims to help C++ developers connect to and interact with services."

versions/baseline.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2114,7 +2114,7 @@
21142114
},
21152115
"cpprestsdk": {
21162116
"baseline": "2.10.19",
2117-
"port-version": 4
2117+
"port-version": 5
21182118
},
21192119
"cppslippi": {
21202120
"baseline": "1.4.3.18",

versions/c-/cpprestsdk.json

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,10 @@
11
{
22
"versions": [
3+
{
4+
"git-tree": "2cb69b47ff909df5dd29678ec6cde55feefe6d95",
5+
"version": "2.10.19",
6+
"port-version": 5
7+
},
38
{
49
"git-tree": "9e19a9c742d13629f5a87f99f9fbe5f595ddfc71",
510
"version": "2.10.19",

0 commit comments

Comments
 (0)