Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/windirstat/llfio.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNiall Douglas (s [underscore] sourceforge {at} nedprod [dot] com) <spamtrap@nedprod.com>2017-09-24 06:18:41 +0300
committerNiall Douglas (s [underscore] sourceforge {at} nedprod [dot] com) <spamtrap@nedprod.com>2017-09-24 06:18:41 +0300
commit19d2c9a62b802bf661acab09455f0427e05cc368 (patch)
treed2a2eea4c4c3f10f4ec2d7446eff2825bfbeb889
parentd65a2c94daf7d2811d5bc22b9a6352b7012f3aae (diff)
Restore Visual Studio support. Many, many, many thanks to @jamboree for telling me the workaround for the ICEs.
-rw-r--r--CMakeLists.txt2
-rw-r--r--appveyor.yml (renamed from appveyor.yml.disabled)0
-rw-r--r--include/afio/revision.hpp6
-rw-r--r--include/afio/v2.0/detail/impl/storage_profile.ipp7
-rw-r--r--include/afio/v2.0/detail/impl/windows/io_handle.ipp2
-rw-r--r--include/afio/v2.0/handle.hpp9
m---------include/afio/v2.0/outcome0
m---------include/afio/v2.0/quickcpplib0
-rw-r--r--release_notes.md2
m---------test/kerneltest0
-rw-r--r--test/tests/current_path.cpp5
-rw-r--r--test/tests/directory_handle_create_close/runner.cpp5
-rw-r--r--test/tests/shared_fs_mutex.cpp2
13 files changed, 28 insertions, 12 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 37a29431..49bff93c 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -47,7 +47,7 @@ int main() { return g().get(); }
set(CXX_HAS_COROUTINES${iter} ${CXX_HAS_COROUTINES${iter}} PARENT_SCOPE)
endfunction()
include(CheckCXXSourceCompiles)
-if(MSVC)
+if(0 AND MSVC)
CheckCXXHasCoroutines(_MSVC "/await")
if(CXX_HAS_COROUTINES_MSVC)
all_compile_options(PUBLIC "/await")
diff --git a/appveyor.yml.disabled b/appveyor.yml
index 11401c26..11401c26 100644
--- a/appveyor.yml.disabled
+++ b/appveyor.yml
diff --git a/include/afio/revision.hpp b/include/afio/revision.hpp
index 883d3a5c..90fa5a0f 100644
--- a/include/afio/revision.hpp
+++ b/include/afio/revision.hpp
@@ -1,4 +1,4 @@
// Note the second line of this file must ALWAYS be the git SHA, third line ALWAYS the git SHA update time
-#define AFIO_PREVIOUS_COMMIT_REF 8ac7c7fa3908ad353594fb4148971f05e643b056
-#define AFIO_PREVIOUS_COMMIT_DATE "2017-09-23 15:58:21 +00:00"
-#define AFIO_PREVIOUS_COMMIT_UNIQUE 8ac7c7fa
+#define AFIO_PREVIOUS_COMMIT_REF d65a2c94daf7d2811d5bc22b9a6352b7012f3aae
+#define AFIO_PREVIOUS_COMMIT_DATE "2017-09-23 23:10:12 +00:00"
+#define AFIO_PREVIOUS_COMMIT_UNIQUE d65a2c94
diff --git a/include/afio/v2.0/detail/impl/storage_profile.ipp b/include/afio/v2.0/detail/impl/storage_profile.ipp
index 4cb8956e..078e3a76 100644
--- a/include/afio/v2.0/detail/impl/storage_profile.ipp
+++ b/include/afio/v2.0/detail/impl/storage_profile.ipp
@@ -504,7 +504,14 @@ namespace storage_profile
// offsets not at the front of the file
if(sp.max_aligned_atomic_rewrite.value > sp.atomic_rewrite_quantum.value)
{
+#ifdef _MSC_VER
+#pragma warning(push)
+#pragma warning(disable : 4456) // declaration hides previous local declaration
+#endif
size_t size = (size_t) sp.max_aligned_atomic_rewrite.value;
+#ifdef _MSC_VER
+#pragma warning(pop)
+#endif
for(off_t offset = sp.max_aligned_atomic_rewrite.value; offset < sp.max_aligned_atomic_rewrite.value * 4; offset += sp.max_aligned_atomic_rewrite.value)
{
// Create two concurrent writer threads and as many reader threads as additional CPU cores
diff --git a/include/afio/v2.0/detail/impl/windows/io_handle.ipp b/include/afio/v2.0/detail/impl/windows/io_handle.ipp
index 8909c8c1..46e2e39f 100644
--- a/include/afio/v2.0/detail/impl/windows/io_handle.ipp
+++ b/include/afio/v2.0/detail/impl/windows/io_handle.ipp
@@ -158,7 +158,7 @@ result<io_handle::extent_guard> io_handle::lock(io_handle::extent_type offset, i
// It seems the NT kernel is guilty of casting bugs sometimes
ol.Internal = ol.Internal & 0xffffffff;
if(ol.Internal != 0)
- return {ol.Internal, ntkernel_category()};
+ return {(int) ol.Internal, ntkernel_category()};
}
return extent_guard(this, offset, bytes, exclusive);
}
diff --git a/include/afio/v2.0/handle.hpp b/include/afio/v2.0/handle.hpp
index 47762f6c..611008e0 100644
--- a/include/afio/v2.0/handle.hpp
+++ b/include/afio/v2.0/handle.hpp
@@ -417,12 +417,19 @@ template <class T, class R> inline void hook_result_construction(OUTCOME_V2_NAME
{
auto currentpath = currentpath_.value().u8string();
uint16_t tlsidx = 0;
+#ifdef _MSC_VER
+#pragma warning(push)
+#pragma warning(disable : 4996) // the function may be unsafe
+#endif
strncpy(tls.next(tlsidx), QUICKCPPLIB_NAMESPACE::ringbuffer_log::last190(currentpath), 190);
+#ifdef _MSC_VER
+#pragma warning(pop)
+#endif
OUTCOME_V2_NAMESPACE::hooks::set_spare_storage(res, tlsidx);
}
tls.reentered = false;
}
- log().emplace_back(log_level::error, res->assume_error().message().c_str(), nativeh._init, QUICKCPPLIB_NAMESPACE::utils::thread::this_thread_id());
+ log().emplace_back(log_level::error, res->assume_error().message().c_str(), (uint32_t) nativeh._init, QUICKCPPLIB_NAMESPACE::utils::thread::this_thread_id());
}
}
template <class T, class R> inline void hook_result_in_place_construction(OUTCOME_V2_NAMESPACE::in_place_type_t<T> _, result<R> *res) noexcept
diff --git a/include/afio/v2.0/outcome b/include/afio/v2.0/outcome
-Subproject 315adcb1593885d9b93f0a7dd31490587108435
+Subproject 9e19316479179d2195934b32b6fd37d73f17b45
diff --git a/include/afio/v2.0/quickcpplib b/include/afio/v2.0/quickcpplib
-Subproject 04b8a69b3e8e97134ba2eb3607ccb71350e29d6
+Subproject bcaa122ed4afab7915bce9a6a8de6c416d4df21
diff --git a/release_notes.md b/release_notes.md
index c09207d5..71319b31 100644
--- a/release_notes.md
+++ b/release_notes.md
@@ -79,7 +79,7 @@ co_await co_write(fh, {{{buffer, sizeof(buffer)}}, 0}).value();
These compilers and OS are regularly tested:
- GCC 7.0 (Linux 4,x x64)
- clang 4.0 (Linux 4.x x64)
-- clang 5.0 (Windows 10 x64)
+- Visual Studio 2017 (Windows 10 x64)
Other compilers, architectures and OSs may work, but are not tested regularly. You will need a Filesystem TS
implementation in your STL and C++ 14. See https://github.com/ned14/afio/blob/master/programs/fs-probe/fs_probe_results.yaml
diff --git a/test/kerneltest b/test/kerneltest
-Subproject 9095d2a8308e40c84bce6476a61579f9b804ee7
+Subproject 6453349933159dedc3d0bf0c6c31f7c7670eafa
diff --git a/test/tests/current_path.cpp b/test/tests/current_path.cpp
index bde5cbb2..64d0f3f8 100644
--- a/test/tests/current_path.cpp
+++ b/test/tests/current_path.cpp
@@ -39,8 +39,9 @@ template <class FileHandleType, class DirectoryHandleType> static inline void Te
#pragma clang diagnostic push
#pragma clang diagnostic ignored "-Wmissing-braces"
#endif
- FileHandleType h1 = afio::construct<FileHandleType>{afio::path_handle(), "tempfile", afio::file_handle::mode::write, afio::file_handle::creation::if_needed, afio::file_handle::caching::temporary, afio::file_handle::flag::none}().value(); // NOLINT
- DirectoryHandleType h2 = afio::construct<DirectoryHandleType>{afio::path_handle(), "tempdir", afio::file_handle::mode::write, afio::file_handle::creation::if_needed, afio::file_handle::caching::all, afio::file_handle::flag::none}().value(); // NOLINT
+ afio::path_handle null_path_handle;
+ FileHandleType h1 = afio::construct<FileHandleType>{null_path_handle, "tempfile", afio::file_handle::mode::write, afio::file_handle::creation::if_needed, afio::file_handle::caching::temporary, afio::file_handle::flag::none}().value(); // NOLINT
+ DirectoryHandleType h2 = afio::construct<DirectoryHandleType>{null_path_handle, "tempdir", afio::file_handle::mode::write, afio::file_handle::creation::if_needed, afio::file_handle::caching::all, afio::file_handle::flag::none}().value(); // NOLINT
#ifdef __clang__
#pragma clang diagnostic pop
#endif
diff --git a/test/tests/directory_handle_create_close/runner.cpp b/test/tests/directory_handle_create_close/runner.cpp
index 128de179..6b1aa2f4 100644
--- a/test/tests/directory_handle_create_close/runner.cpp
+++ b/test/tests/directory_handle_create_close/runner.cpp
@@ -90,8 +90,8 @@ template <class U> inline void directory_handle_create_close_creation(U &&f)
info = std::error_code();
return std::make_tuple(std::ref(permuter), std::ref(testreturn), idx, std::ref(enumeration_should_be));
},
- [&](auto tuplestate) {
- return;
+ [&](auto /*tuplestate*/) {
+#if 0
auto &permuter = std::get<0>(tuplestate);
auto &testreturn = std::get<1>(tuplestate);
size_t idx = std::get<2>(tuplestate);
@@ -144,6 +144,7 @@ template <class U> inline void directory_handle_create_close_creation(U &&f)
}
}
}
+#endif
},
"check enumeration")
));
diff --git a/test/tests/shared_fs_mutex.cpp b/test/tests/shared_fs_mutex.cpp
index dafa84df..06e029d1 100644
--- a/test/tests/shared_fs_mutex.cpp
+++ b/test/tests/shared_fs_mutex.cpp
@@ -251,7 +251,7 @@ struct child_workers
#else
std::chrono::steady_clock::time_point deadline;
#endif
- int ret = child.wait_until(deadline).value();
+ intptr_t ret = child.wait_until(deadline).value();
if(ret != 0)
{
results[n].retcode = ret;