summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorEric Fiselier <eric@efcs.ca>2018-07-20 01:51:48 +0000
committerEric Fiselier <eric@efcs.ca>2018-07-20 01:51:48 +0000
commit77c9cf44e39b62df1c0e7cafd00390623ec37c4e (patch)
treed7e1a05106307e8c48a40ab643b1756b8196a758
parent0f8ee948c3c35735909da59b2d9be0995835c0b9 (diff)
Fix two test failures in <experimental/filesystem>
First, <experimental/filesystem> didn't correctly guard against min/max macros. This adds the proper push/pop macro guards. Second, an internal time helper had been renamed but the test for it hadn't been updated. This patch updates those tests. git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@337520 91177308-0d34-0410-b5e6-96231b3b80d8
-rw-r--r--include/experimental/filesystem5
-rw-r--r--test/libcxx/experimental/filesystem/convert_file_time.sh.cpp2
2 files changed, 6 insertions, 1 deletions
diff --git a/include/experimental/filesystem b/include/experimental/filesystem
index 6481aa680..2d2c11765 100644
--- a/include/experimental/filesystem
+++ b/include/experimental/filesystem
@@ -251,6 +251,9 @@
#pragma GCC system_header
#endif
+_LIBCPP_PUSH_MACROS
+#include <__undef_macros>
+
#define __cpp_lib_experimental_filesystem 201406
_LIBCPP_BEGIN_NAMESPACE_EXPERIMENTAL_FILESYSTEM
@@ -2647,4 +2650,6 @@ recursive_directory_iterator end(const recursive_directory_iterator&) _NOEXCEPT
_LIBCPP_END_NAMESPACE_EXPERIMENTAL_FILESYSTEM
+_LIBCPP_POP_MACROS
+
#endif // _LIBCPP_EXPERIMENTAL_FILESYSTEM
diff --git a/test/libcxx/experimental/filesystem/convert_file_time.sh.cpp b/test/libcxx/experimental/filesystem/convert_file_time.sh.cpp
index e418851d9..cc1696cea 100644
--- a/test/libcxx/experimental/filesystem/convert_file_time.sh.cpp
+++ b/test/libcxx/experimental/filesystem/convert_file_time.sh.cpp
@@ -28,7 +28,7 @@
using namespace std::chrono;
namespace fs = std::experimental::filesystem;
using fs::file_time_type;
-using fs::detail::fs_time_util;
+using fs::detail::time_util::fs_time_util;
enum TestKind { TK_64Bit, TK_32Bit, TK_FloatingPoint };