Index: libcxx/include/__config =================================================================== --- libcxx/include/__config +++ libcxx/include/__config @@ -1141,8 +1141,8 @@ # define _LIBCPP_ENABLE_CXX20_REMOVED_TYPE_TRAITS # endif // _LIBCPP_ENABLE_CXX20_REMOVED_FEATURES -# define _LIBCPP_PUSH_MACROS _Pragma("push_macro(\"min\")") _Pragma("push_macro(\"max\")") -# define _LIBCPP_POP_MACROS _Pragma("pop_macro(\"min\")") _Pragma("pop_macro(\"max\")") +# define _LIBCPP_PUSH_MACROS _Pragma("push_macro(\"min\")") _Pragma("push_macro(\"max\")") _Pragma("push_macro(\"refresh()\")") _Pragma("push_macro(\"move(int, int)\")") _Pragma("push_macro(\"erase()\")") +# define _LIBCPP_POP_MACROS _Pragma("pop_macro(\"min\")") _Pragma("pop_macro(\"max\")") _Pragma("pop_macro(\"refresh()\")") _Pragma("pop_macro(\"move(int, int)\")") _Pragma("pop_macro(\"erase()\")") # ifndef _LIBCPP_NO_AUTO_LINK # if defined(_LIBCPP_ABI_MICROSOFT) && !defined(_LIBCPP_BUILDING_LIBRARY) Index: libcxx/include/__undef_macros =================================================================== --- libcxx/include/__undef_macros +++ libcxx/include/__undef_macros @@ -14,3 +14,15 @@ #ifdef max # undef max #endif + +#ifdef refresh +# undef refresh +#endif + +#ifdef move +# undef move +#endif + +#ifdef erase +# undef erase +#endif Index: libcxx/include/__utility/move.h =================================================================== --- libcxx/include/__utility/move.h +++ libcxx/include/__utility/move.h @@ -20,6 +20,9 @@ # pragma GCC system_header #endif +_LIBCPP_PUSH_MACROS +#include <__undef_macros> + _LIBCPP_BEGIN_NAMESPACE_STD template @@ -41,4 +44,6 @@ _LIBCPP_END_NAMESPACE_STD +_LIBCPP_POP_MACROS + #endif // _LIBCPP___UTILITY_MOVE_H Index: libcxx/test/libcxx/vendor/ibm/curses_filesystem_macro_conflict.compile.pass.cpp =================================================================== --- /dev/null +++ libcxx/test/libcxx/vendor/ibm/curses_filesystem_macro_conflict.compile.pass.cpp @@ -0,0 +1,14 @@ +//===----------------------------------------------------------------------===// +// +// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. +// See https://llvm.org/LICENSE.txt for license information. +// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception +// +//===----------------------------------------------------------------------===// + +// REQUIRES: target={{powerpc.*-ibm-aix.*}} + +#include "curses.h" +#include + +int main() { return 0; } Index: libcxx/test/libcxx/vendor/ibm/curses_utility_macro_conflict.compile.pass.cpp =================================================================== --- /dev/null +++ libcxx/test/libcxx/vendor/ibm/curses_utility_macro_conflict.compile.pass.cpp @@ -0,0 +1,14 @@ +//===----------------------------------------------------------------------===// +// +// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. +// See https://llvm.org/LICENSE.txt for license information. +// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception +// +//===----------------------------------------------------------------------===// + +// REQUIRES: target={{powerpc.*-ibm-aix.*}} + +#include "curses.h" +#include + +int main() { return 0; } Index: libcxx/test/libcxx/vendor/ibm/curses_vector_macro_conflict.compile.pass.cpp =================================================================== --- /dev/null +++ libcxx/test/libcxx/vendor/ibm/curses_vector_macro_conflict.compile.pass.cpp @@ -0,0 +1,14 @@ +//===----------------------------------------------------------------------===// +// +// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. +// See https://llvm.org/LICENSE.txt for license information. +// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception +// +//===----------------------------------------------------------------------===// + +// REQUIRES: target={{powerpc.*-ibm-aix.*}} + +#include "curses.h" +#include + +int main() { return 0; }