diff --git a/libcxx/include/fstream b/libcxx/include/fstream index 339a434ea78c..1f88d134fe06 100644 --- a/libcxx/include/fstream +++ b/libcxx/include/fstream @@ -191,8 +191,7 @@ typedef basic_fstream wfstream; #else # include <__config> -// Downstream issue: #375 (Enable fstream independently of filesystem) -# if _LIBCPP_HAS_FILESYSTEM && _LIBCPP_HAS_LOCALIZATION || defined(_NEWLIB_VERSION) +# if _LIBCPP_HAS_FILESYSTEM && _LIBCPP_HAS_LOCALIZATION # include <__algorithm/max.h> # include <__assert> diff --git a/libcxx/src/ios.instantiations.cpp b/libcxx/src/ios.instantiations.cpp index 24106d0a225e..a8d267f7cfd4 100644 --- a/libcxx/src/ios.instantiations.cpp +++ b/libcxx/src/ios.instantiations.cpp @@ -37,8 +37,7 @@ template class _LIBCPP_CLASS_TEMPLATE_INSTANTIATION_VIS basic_stringstream template class _LIBCPP_CLASS_TEMPLATE_INSTANTIATION_VIS basic_ostringstream; template class _LIBCPP_CLASS_TEMPLATE_INSTANTIATION_VIS basic_istringstream; -// Downstream issue: #375 (Enable fstream independently of filesystem) -#if _LIBCPP_HAS_FILESYSTEM || defined(_NEWLIB_VERSION) +#if _LIBCPP_HAS_FILESYSTEM template class _LIBCPP_CLASS_TEMPLATE_INSTANTIATION_VIS basic_ifstream; template class _LIBCPP_CLASS_TEMPLATE_INSTANTIATION_VIS basic_ofstream; template class _LIBCPP_CLASS_TEMPLATE_INSTANTIATION_VIS basic_filebuf; diff --git a/libcxx/src/ostream.cpp b/libcxx/src/ostream.cpp index 1cec2db0c45e..bcc213cc6602 100644 --- a/libcxx/src/ostream.cpp +++ b/libcxx/src/ostream.cpp @@ -8,8 +8,7 @@ #include <__config> -// Downstream issue: #375 (Enable fstream independently of filesystem) -#if _LIBCPP_HAS_FILESYSTEM || defined(_NEWLIB_VERSION) +#if _LIBCPP_HAS_FILESYSTEM # include #endif #include diff --git a/libcxx/test/std/input.output/file.streams/fstreams/filebuf.members/native_handle.pass.cpp b/libcxx/test/std/input.output/file.streams/fstreams/filebuf.members/native_handle.pass.cpp index 7c59d94d445e..22cc63e909c5 100644 --- a/libcxx/test/std/input.output/file.streams/fstreams/filebuf.members/native_handle.pass.cpp +++ b/libcxx/test/std/input.output/file.streams/fstreams/filebuf.members/native_handle.pass.cpp @@ -13,8 +13,6 @@ // class basic_filebuf; // native_handle_type native_handle() const noexcept; -// Downstream issue: #375 (Enable fstream independently of filesystem) -// UNSUPPORTED: baremetal #include #include diff --git a/libcxx/test/std/input.output/file.streams/fstreams/filebuf.members/open_pointer.pass.cpp b/libcxx/test/std/input.output/file.streams/fstreams/filebuf.members/open_pointer.pass.cpp index 85b79077bd4c..9f617dc1e5a8 100644 --- a/libcxx/test/std/input.output/file.streams/fstreams/filebuf.members/open_pointer.pass.cpp +++ b/libcxx/test/std/input.output/file.streams/fstreams/filebuf.members/open_pointer.pass.cpp @@ -14,8 +14,6 @@ // XFAIL: (!c++03 && !c++11 && !c++14 && !c++17 && !c++20) && using-built-library-before-llvm-18 // XFAIL: LIBCXX-AIX-FIXME -// Downstream issue: #375 (Enable fstream independently of filesystem) -// UNSUPPORTED: baremetal #include #include diff --git a/libcxx/test/std/input.output/file.streams/fstreams/fstream.cons/pointer.pass.cpp b/libcxx/test/std/input.output/file.streams/fstreams/fstream.cons/pointer.pass.cpp index ae7553c84741..2e0ebcd684d7 100644 --- a/libcxx/test/std/input.output/file.streams/fstreams/fstream.cons/pointer.pass.cpp +++ b/libcxx/test/std/input.output/file.streams/fstreams/fstream.cons/pointer.pass.cpp @@ -18,9 +18,6 @@ // XFAIL: LIBCXX-AIX-FIXME -// Downstream issue: #375 (Enable fstream independently of filesystem) -// UNSUPPORTED: baremetal - #include #include diff --git a/libcxx/test/std/input.output/file.streams/fstreams/fstream.members/native_handle.pass.cpp b/libcxx/test/std/input.output/file.streams/fstreams/fstream.members/native_handle.pass.cpp index 68c114daa41d..a7229512385a 100644 --- a/libcxx/test/std/input.output/file.streams/fstreams/fstream.members/native_handle.pass.cpp +++ b/libcxx/test/std/input.output/file.streams/fstreams/fstream.members/native_handle.pass.cpp @@ -13,8 +13,6 @@ // class basic_fstream; // native_handle_type native_handle() const noexcept; -// Downstream issue: #375 (Enable fstream independently of filesystem) -// UNSUPPORTED: baremetal #include "test_macros.h" #include "../native_handle_test_helpers.h" diff --git a/libcxx/test/std/input.output/file.streams/fstreams/fstream.members/open_pointer.pass.cpp b/libcxx/test/std/input.output/file.streams/fstreams/fstream.members/open_pointer.pass.cpp index c4af1a3f3c10..0d83d681b1df 100644 --- a/libcxx/test/std/input.output/file.streams/fstreams/fstream.members/open_pointer.pass.cpp +++ b/libcxx/test/std/input.output/file.streams/fstreams/fstream.members/open_pointer.pass.cpp @@ -17,8 +17,6 @@ // XFAIL: (!c++03 && !c++11 && !c++14 && !c++17 && !c++20) && using-built-library-before-llvm-18 // XFAIL: LIBCXX-AIX-FIXME -// Downstream issue: #375 (Enable fstream independently of filesystem) -// UNSUPPORTED: baremetal #include #include diff --git a/libcxx/test/std/input.output/file.streams/fstreams/ifstream.members/native_handle.pass.cpp b/libcxx/test/std/input.output/file.streams/fstreams/ifstream.members/native_handle.pass.cpp index e71f7d966972..c2aff949c8fa 100644 --- a/libcxx/test/std/input.output/file.streams/fstreams/ifstream.members/native_handle.pass.cpp +++ b/libcxx/test/std/input.output/file.streams/fstreams/ifstream.members/native_handle.pass.cpp @@ -13,8 +13,6 @@ // class basic_ifstream; // native_handle_type native_handle() const noexcept; -// Downstream issue: #375 (Enable fstream independently of filesystem) -// UNSUPPORTED: baremetal #include "test_macros.h" #include "../native_handle_test_helpers.h" diff --git a/libcxx/test/std/input.output/file.streams/fstreams/ifstream.members/offset_range.pass.cpp b/libcxx/test/std/input.output/file.streams/fstreams/ifstream.members/offset_range.pass.cpp index f3c9f2e31caa..9fc3cb4a9447 100644 --- a/libcxx/test/std/input.output/file.streams/fstreams/ifstream.members/offset_range.pass.cpp +++ b/libcxx/test/std/input.output/file.streams/fstreams/ifstream.members/offset_range.pass.cpp @@ -26,9 +26,6 @@ // meaning it can represent file sizes up to 2GB (2^31 bytes) only. // // UNSUPPORTED: target=armv7-unknown-linux-gnueabihf -// Downstream issue: #375 (Enable fstream independently of filesystem) -// UNSUPPORTED: baremetal - #include #include diff --git a/libcxx/test/std/input.output/file.streams/fstreams/ofstream.cons/pointer.pass.cpp b/libcxx/test/std/input.output/file.streams/fstreams/ofstream.cons/pointer.pass.cpp index f898e87a7aa6..fbb03f1e8584 100644 --- a/libcxx/test/std/input.output/file.streams/fstreams/ofstream.cons/pointer.pass.cpp +++ b/libcxx/test/std/input.output/file.streams/fstreams/ofstream.cons/pointer.pass.cpp @@ -18,9 +18,6 @@ // XFAIL: LIBCXX-AIX-FIXME -// Downstream issue: #375 (Enable fstream independently of filesystem) -// UNSUPPORTED: baremetal - #include #include #include diff --git a/libcxx/test/std/input.output/file.streams/fstreams/ofstream.members/native_handle.pass.cpp b/libcxx/test/std/input.output/file.streams/fstreams/ofstream.members/native_handle.pass.cpp index 11ac86d862dd..88b3a00934cc 100644 --- a/libcxx/test/std/input.output/file.streams/fstreams/ofstream.members/native_handle.pass.cpp +++ b/libcxx/test/std/input.output/file.streams/fstreams/ofstream.members/native_handle.pass.cpp @@ -13,8 +13,6 @@ // class basic_ofstream; // native_handle_type native_handle() const noexcept; -// Downstream issue: #375 (Enable fstream independently of filesystem) -// UNSUPPORTED: baremetal #include "test_macros.h" #include "../native_handle_test_helpers.h" diff --git a/libcxx/test/std/input.output/file.streams/fstreams/ofstream.members/open_pointer.pass.cpp b/libcxx/test/std/input.output/file.streams/fstreams/ofstream.members/open_pointer.pass.cpp index 909569ff0d12..73a474277a93 100644 --- a/libcxx/test/std/input.output/file.streams/fstreams/ofstream.members/open_pointer.pass.cpp +++ b/libcxx/test/std/input.output/file.streams/fstreams/ofstream.members/open_pointer.pass.cpp @@ -17,8 +17,6 @@ // XFAIL: (!c++03 && !c++11 && !c++14 && !c++17 && !c++20) && using-built-library-before-llvm-18 // XFAIL: LIBCXX-AIX-FIXME -// Downstream issue: #375 (Enable fstream independently of filesystem) -// UNSUPPORTED: baremetal #include #include diff --git a/libcxx/test/std/input.output/file.streams/lit.local.cfg b/libcxx/test/std/input.output/file.streams/lit.local.cfg index bc846c477c51..fb65433eef81 100644 --- a/libcxx/test/std/input.output/file.streams/lit.local.cfg +++ b/libcxx/test/std/input.output/file.streams/lit.local.cfg @@ -2,10 +2,6 @@ if "no-localization" in config.available_features: config.unsupported = True -# Downstream issue: #375 (Enable fstream independently of filesystem) #if "no-filesystem" in config.available_features: # config.unsupported = True -# Downstream issue: #375 (Enable fstream independently of filesystem) -if 'none' in config.target_triple: - config.available_features.add('baremetal') diff --git a/libcxx/test/support/platform_support.h b/libcxx/test/support/platform_support.h index 031c434053b8..99e60f60c599 100644 --- a/libcxx/test/support/platform_support.h +++ b/libcxx/test/support/platform_support.h @@ -40,10 +40,6 @@ # include // _mktemp_s # include // _O_EXCL, ... # include // _S_IREAD, ... -// Downstream issue: #375 (Enable fstream independently of filesystem) -#elif defined(_NEWLIB_VERSION) -// No need to include extra headers for the get_temp_file_name() implementation -// below: tmpnam() is defined in #elif __has_include() # include // close #endif @@ -74,15 +70,6 @@ inline std::string get_temp_file_name() { continue; abort(); } -// Downstream issue: #375 (Enable fstream independently of filesystem) -#elif defined(_NEWLIB_VERSION) - char tmp_name[L_tmpnam]; - char *ret = tmpnam(tmp_name); - if (ret == NULL) { - perror("tmpnam"); - abort(); - } - return std::string(ret); #elif !__has_include() // Without `unistd.h` we cannot guarantee that the file is unused, however we // can simply generate a good guess in the temporary folder and create it.