diff --git a/libcxx/include/filesystem b/libcxx/include/filesystem --- a/libcxx/include/filesystem +++ b/libcxx/include/filesystem @@ -254,32 +254,9 @@ #include<__filesystem/recursive_directory_iterator.h> #include<__filesystem/space_info.h> #include<__filesystem/u8path.h> - -#include <__availability> -#include <__config> -#include <__debug> -#include <__ranges/enable_borrowed_range.h> -#include <__ranges/enable_view.h> -#include <__utility/forward.h> -#include #include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include #include -#if !defined(_LIBCPP_HAS_NO_LOCALIZATION) -# include -# include // for quoted -#endif - #if defined(_LIBCPP_HAS_NO_FILESYSTEM_LIBRARY) # error "The Filesystem library is not supported since libc++ has been configured with LIBCXX_ENABLE_FILESYSTEM disabled" #endif diff --git a/libcxx/src/filesystem/directory_iterator.cpp b/libcxx/src/filesystem/directory_iterator.cpp --- a/libcxx/src/filesystem/directory_iterator.cpp +++ b/libcxx/src/filesystem/directory_iterator.cpp @@ -6,8 +6,9 @@ // //===----------------------------------------------------------------------===// -#include "filesystem" #include "__config" +#include "filesystem" +#include "stack" #if defined(_LIBCPP_WIN32API) #define WIN32_LEAN_AND_MEAN #define NOMINMAX diff --git a/libcxx/src/filesystem/filesystem_common.h b/libcxx/src/filesystem/filesystem_common.h --- a/libcxx/src/filesystem/filesystem_common.h +++ b/libcxx/src/filesystem/filesystem_common.h @@ -17,6 +17,7 @@ #include "cstdlib" #include "ctime" #include "filesystem" +#include "system_error" #if !defined(_LIBCPP_WIN32API) # include diff --git a/libcxx/test/libcxx/input.output/filesystems/convert_file_time.pass.cpp b/libcxx/test/libcxx/input.output/filesystems/convert_file_time.pass.cpp --- a/libcxx/test/libcxx/input.output/filesystems/convert_file_time.pass.cpp +++ b/libcxx/test/libcxx/input.output/filesystems/convert_file_time.pass.cpp @@ -14,12 +14,13 @@ // ADDITIONAL_COMPILE_FLAGS: -I %S/../../../../src/filesystem -#include +#include #include -#include -#include #include -#include +#include +#include +#include +#include #include "filesystem_common.h" diff --git a/libcxx/test/std/input.output/filesystems/class.directory_entry/directory_entry.obs/comparisons.pass.cpp b/libcxx/test/std/input.output/filesystems/class.directory_entry/directory_entry.obs/comparisons.pass.cpp --- a/libcxx/test/std/input.output/filesystems/class.directory_entry/directory_entry.obs/comparisons.pass.cpp +++ b/libcxx/test/std/input.output/filesystems/class.directory_entry/directory_entry.obs/comparisons.pass.cpp @@ -19,10 +19,10 @@ // bool operator> (directory_entry const&) const noexcept; // bool operator>=(directory_entry const&) const noexcept; - #include "filesystem_include.h" -#include #include +#include +#include #include "test_macros.h" diff --git a/libcxx/test/std/input.output/filesystems/class.directory_iterator/types.pass.cpp b/libcxx/test/std/input.output/filesystems/class.directory_iterator/types.pass.cpp --- a/libcxx/test/std/input.output/filesystems/class.directory_iterator/types.pass.cpp +++ b/libcxx/test/std/input.output/filesystems/class.directory_iterator/types.pass.cpp @@ -19,8 +19,9 @@ // typedef ... iterator_category #include "filesystem_include.h" -#include #include +#include +#include #include "test_macros.h" diff --git a/libcxx/test/std/input.output/filesystems/class.filesystem_error/filesystem_error.members.pass.cpp b/libcxx/test/std/input.output/filesystems/class.filesystem_error/filesystem_error.members.pass.cpp --- a/libcxx/test/std/input.output/filesystems/class.filesystem_error/filesystem_error.members.pass.cpp +++ b/libcxx/test/std/input.output/filesystems/class.filesystem_error/filesystem_error.members.pass.cpp @@ -21,8 +21,10 @@ // const path& path2() const noexcept; #include "filesystem_include.h" -#include #include +#include +#include +#include #include "test_macros.h" diff --git a/libcxx/test/std/input.output/filesystems/class.path/path.member/path.assign/copy.pass.cpp b/libcxx/test/std/input.output/filesystems/class.path/path.member/path.assign/copy.pass.cpp --- a/libcxx/test/std/input.output/filesystems/class.path/path.member/path.assign/copy.pass.cpp +++ b/libcxx/test/std/input.output/filesystems/class.path/path.member/path.assign/copy.pass.cpp @@ -15,8 +15,9 @@ // path& operator=(path const&); #include "filesystem_include.h" -#include #include +#include +#include #include "test_macros.h" diff --git a/libcxx/test/std/input.output/filesystems/class.path/path.member/path.assign/move.pass.cpp b/libcxx/test/std/input.output/filesystems/class.path/path.member/path.assign/move.pass.cpp --- a/libcxx/test/std/input.output/filesystems/class.path/path.member/path.assign/move.pass.cpp +++ b/libcxx/test/std/input.output/filesystems/class.path/path.member/path.assign/move.pass.cpp @@ -17,8 +17,9 @@ // path& operator=(path&&) noexcept #include "filesystem_include.h" -#include #include +#include +#include #include "test_macros.h" #include "count_new.h" diff --git a/libcxx/test/std/input.output/filesystems/class.path/path.member/path.construct/copy.pass.cpp b/libcxx/test/std/input.output/filesystems/class.path/path.member/path.construct/copy.pass.cpp --- a/libcxx/test/std/input.output/filesystems/class.path/path.member/path.construct/copy.pass.cpp +++ b/libcxx/test/std/input.output/filesystems/class.path/path.member/path.construct/copy.pass.cpp @@ -15,8 +15,9 @@ // path(path const&) #include "filesystem_include.h" -#include #include +#include +#include #include "test_macros.h" diff --git a/libcxx/test/std/input.output/filesystems/class.path/path.member/path.construct/move.pass.cpp b/libcxx/test/std/input.output/filesystems/class.path/path.member/path.construct/move.pass.cpp --- a/libcxx/test/std/input.output/filesystems/class.path/path.member/path.construct/move.pass.cpp +++ b/libcxx/test/std/input.output/filesystems/class.path/path.member/path.construct/move.pass.cpp @@ -16,8 +16,9 @@ // path(path&&) noexcept #include "filesystem_include.h" -#include #include +#include +#include #include "test_macros.h" #include "count_new.h" diff --git a/libcxx/test/std/input.output/filesystems/class.path/synop.pass.cpp b/libcxx/test/std/input.output/filesystems/class.path/synop.pass.cpp --- a/libcxx/test/std/input.output/filesystems/class.path/synop.pass.cpp +++ b/libcxx/test/std/input.output/filesystems/class.path/synop.pass.cpp @@ -17,8 +17,9 @@ // static constexpr value_type preferred_separator = ...; #include "filesystem_include.h" -#include #include +#include +#include #include "test_macros.h" diff --git a/libcxx/test/support/filesystem_test_helper.h b/libcxx/test/support/filesystem_test_helper.h --- a/libcxx/test/support/filesystem_test_helper.h +++ b/libcxx/test/support/filesystem_test_helper.h @@ -14,9 +14,10 @@ #endif #include +#include #include // for printf #include -#include +#include #include #include "make_string.h"