[libcxx-commits] [PATCH] D98140: [libcxx] [test] Fix building create_directory in MSVC configurations
Martin Storsjö via Phabricator via libcxx-commits
libcxx-commits at lists.llvm.org
Sun Mar 7 02:19:33 PST 2021
mstorsjo created this revision.
mstorsjo requested review of this revision.
Herald added a project: libc++.
Herald added a subscriber: libcxx-commits.
Herald added a reviewer: libc++.
Don't use the mode_t type - the official windows sdk doesn't have that type.
(Mingw headers does have such a typedef though.) The umask function returns
int on windows, in both header variants.
Thus just use auto to deduce the umask return type automatically.
Repository:
rG LLVM Github Monorepo
https://reviews.llvm.org/D98140
Files:
libcxx/test/std/input.output/filesystems/fs.op.funcs/fs.op.create_directory/create_directory.pass.cpp
Index: libcxx/test/std/input.output/filesystems/fs.op.funcs/fs.op.create_directory/create_directory.pass.cpp
===================================================================
--- libcxx/test/std/input.output/filesystems/fs.op.funcs/fs.op.create_directory/create_directory.pass.cpp
+++ libcxx/test/std/input.output/filesystems/fs.op.funcs/fs.op.create_directory/create_directory.pass.cpp
@@ -32,7 +32,7 @@
using namespace fs;
fs::perms read_umask() {
- mode_t old_mask = umask(0);
+ auto old_mask = umask(0);
umask(old_mask); // reset the mask to the old value.
return static_cast<fs::perms>(old_mask);
}
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D98140.328854.patch
Type: text/x-patch
Size: 627 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/libcxx-commits/attachments/20210307/b44d7068/attachment.bin>
More information about the libcxx-commits
mailing list