|
| 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 |
0 commit comments