[libcxx-commits] [PATCH] D66986: [libc++] Fix directory_iterator compilation on Win32
Phabricator via Phabricator via libcxx-commits
libcxx-commits at lists.llvm.org
Sat Aug 31 16:16:27 PDT 2019
This revision was automatically updated to reflect the committed changes.
Closed by commit rL370599: [libc++] Fix directory_iterator compilation on Win32 (authored by nico, committed by ).
Herald added subscribers: llvm-commits, christof.
Herald added a project: LLVM.
Changed prior to commit:
https://reviews.llvm.org/D66986?vs=218006&id=218243#toc
Repository:
rL LLVM
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D66986/new/
https://reviews.llvm.org/D66986
Files:
libcxx/trunk/src/filesystem/directory_iterator.cpp
Index: libcxx/trunk/src/filesystem/directory_iterator.cpp
===================================================================
--- libcxx/trunk/src/filesystem/directory_iterator.cpp
+++ libcxx/trunk/src/filesystem/directory_iterator.cpp
@@ -10,7 +10,7 @@
#include "__config"
#if defined(_LIBCPP_WIN32API)
#define WIN32_LEAN_AND_MEAN
-#include <Windows.h>
+#include <windows.h>
#else
#include <dirent.h>
#endif
@@ -79,14 +79,14 @@
return file_type::unknown;
}
static uintmax_t get_file_size(const WIN32_FIND_DATA& data) {
- return (data.nFileSizeHight * (MAXDWORD + 1)) + data.nFileSizeLow;
+ return (data.nFileSizeHigh * (MAXDWORD + 1)) + data.nFileSizeLow;
}
static file_time_type get_write_time(const WIN32_FIND_DATA& data) {
ULARGE_INTEGER tmp;
- FILETIME& time = data.ftLastWriteTime;
+ const FILETIME& time = data.ftLastWriteTime;
tmp.u.LowPart = time.dwLowDateTime;
tmp.u.HighPart = time.dwHighDateTime;
- return file_time_type(file_time_type::duration(time.QuadPart));
+ return file_time_type(file_time_type::duration(tmp.QuadPart));
}
#endif
@@ -110,7 +110,7 @@
__dir_stream(const path& root, directory_options opts, error_code& ec)
: __stream_(INVALID_HANDLE_VALUE), __root_(root) {
- __stream_ = ::FindFirstFileEx(root.c_str(), &__data_);
+ __stream_ = ::FindFirstFile(root.c_str(), &__data_);
if (__stream_ == INVALID_HANDLE_VALUE) {
ec = error_code(::GetLastError(), generic_category());
const bool ignore_permission_denied =
@@ -140,7 +140,7 @@
//cdata.__write_time_ = get_write_time(__data_);
__entry_.__assign_iter_entry(
__root_ / __data_.cFileName,
- directory_entry::__create_iter_result(get_file_type(__data)));
+ directory_entry::__create_iter_result(detail::get_file_type(__data)));
return true;
}
ec = error_code(::GetLastError(), generic_category());
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D66986.218243.patch
Type: text/x-patch
Size: 1902 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/libcxx-commits/attachments/20190831/3ae5a6c7/attachment.bin>
More information about the libcxx-commits
mailing list