diff --git a/libcxx/include/__new/new_handler.h b/libcxx/include/__new/new_handler.h index 05f4e846c3ef9..8f93578da9f9c 100644 --- a/libcxx/include/__new/new_handler.h +++ b/libcxx/include/__new/new_handler.h @@ -15,14 +15,10 @@ # pragma GCC system_header #endif -#if defined(_LIBCPP_ABI_VCRUNTIME) -# include -#else _LIBCPP_BEGIN_UNVERSIONED_NAMESPACE_STD typedef void (*new_handler)(); _LIBCPP_EXPORTED_FROM_ABI new_handler set_new_handler(new_handler) _NOEXCEPT; _LIBCPP_EXPORTED_FROM_ABI new_handler get_new_handler() _NOEXCEPT; _LIBCPP_END_UNVERSIONED_NAMESPACE_STD -#endif // _LIBCPP_ABI_VCRUNTIME #endif // _LIBCPP___NEW_NEW_HANDLER_H diff --git a/libcxx/src/new_handler.cpp b/libcxx/src/new_handler.cpp index 49c21d85f5908..5124cb501c938 100644 --- a/libcxx/src/new_handler.cpp +++ b/libcxx/src/new_handler.cpp @@ -11,9 +11,7 @@ #include "include/atomic_support.h" #if defined(_LIBCPP_ABI_MICROSOFT) -# if !defined(_LIBCPP_ABI_VCRUNTIME) -# define _LIBPCPP_DEFINE_NEW_HANDLER -# endif +# define _LIBPCPP_DEFINE_NEW_HANDLER #elif defined(LIBCXX_BUILDING_LIBCXXABI) // nothing to do, we use the one from libc++abi #elif defined(LIBCXXRT) diff --git a/libcxx/test/std/language.support/support.dynamic/alloc.errors/set.new.handler/get_new_handler.pass.cpp b/libcxx/test/std/language.support/support.dynamic/alloc.errors/set.new.handler/get_new_handler.pass.cpp index c5725bde6e6c3..d20a65d8b6b48 100644 --- a/libcxx/test/std/language.support/support.dynamic/alloc.errors/set.new.handler/get_new_handler.pass.cpp +++ b/libcxx/test/std/language.support/support.dynamic/alloc.errors/set.new.handler/get_new_handler.pass.cpp @@ -8,13 +8,6 @@ // test get_new_handler -// FIXME: When libc++ is linked against vcruntime (i.e. the default config in -// MSVC mode), the declarations of std::set_new_handler and std::get_new_handler -// are provided by vcruntime/UCRT's new.h. However, that header actually only -// declares set_new_handler - it's missing a declaration of get_new_handler. - -// XFAIL: msvc && stdlib=libc++ - #include #include