diff --git a/libcxx/include/fstream b/libcxx/include/fstream index 339a434ea78c..0ae4e4d7a0cb 100644 --- a/libcxx/include/fstream +++ b/libcxx/include/fstream @@ -192,7 +192,7 @@ typedef basic_fstream wfstream; # 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 || defined(_LIBCPP_LIBC_NEWLIB) # include <__algorithm/max.h> # include <__assert> diff --git a/libcxx/src/ios.instantiations.cpp b/libcxx/src/ios.instantiations.cpp index 24106d0a225e..3fd59faa85f8 100644 --- a/libcxx/src/ios.instantiations.cpp +++ b/libcxx/src/ios.instantiations.cpp @@ -38,7 +38,7 @@ template class _LIBCPP_CLASS_TEMPLATE_INSTANTIATION_VIS basic_ostringstream; // Downstream issue: #375 (Enable fstream independently of filesystem) -#if _LIBCPP_HAS_FILESYSTEM || defined(_NEWLIB_VERSION) +#if _LIBCPP_HAS_FILESYSTEM || defined(_LIBCPP_LIBC_NEWLIB) 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..89500b21042b 100644 --- a/libcxx/src/ostream.cpp +++ b/libcxx/src/ostream.cpp @@ -9,7 +9,7 @@ #include <__config> // Downstream issue: #375 (Enable fstream independently of filesystem) -#if _LIBCPP_HAS_FILESYSTEM || defined(_NEWLIB_VERSION) +#if _LIBCPP_HAS_FILESYSTEM || defined(_LIBCPP_LIBC_NEWLIB) # include #endif #include diff --git a/libcxx/test/support/platform_support.h b/libcxx/test/support/platform_support.h index 031c434053b8..05e09de154d7 100644 --- a/libcxx/test/support/platform_support.h +++ b/libcxx/test/support/platform_support.h @@ -41,7 +41,7 @@ # include // _O_EXCL, ... # include // _S_IREAD, ... // Downstream issue: #375 (Enable fstream independently of filesystem) -#elif defined(_NEWLIB_VERSION) +#elif defined(_LIBCPP_LIBC_NEWLIB) // No need to include extra headers for the get_temp_file_name() implementation // below: tmpnam() is defined in #elif __has_include() @@ -75,7 +75,7 @@ inline std::string get_temp_file_name() { abort(); } // Downstream issue: #375 (Enable fstream independently of filesystem) -#elif defined(_NEWLIB_VERSION) +#elif defined(_LIBCPP_LIBC_NEWLIB) char tmp_name[L_tmpnam]; char *ret = tmpnam(tmp_name); if (ret == NULL) {