[libcxx-commits] [PATCH] D147356: Fixing conflicting macro definitions between curses.h and std::filesystem.

Nikolas Klauser via Phabricator via libcxx-commits libcxx-commits at lists.llvm.org
Fri Mar 31 13:46:00 PDT 2023


philnik requested changes to this revision.
philnik added inline comments.
This revision now requires changes to proceed.


================
Comment at: libcxx/include/__undef_macros:18-26
+#ifdef refresh
+#  if defined(__STDC__) || !defined(_NO_PROTO)
+inline int refresh_impl() { return refresh(); }
+#  else
+inline extern int refresh_impl() { return refresh(); }
+#  endif
+#  undef refresh
----------------
These should just be `#undef`ed and added to `_LIBCPP_PUSH_MACROS` and `_LIBCPP_POP_MACROS`. Arguably they should be replaced in the libc, since these names are used everywhere, not just in `<filesystem>`.


================
Comment at: libcxx/test/libcxx/vendor/ibm/curses_macro_conflict.pass.cpp:14
+
+int main() { return 0; }
----------------
This should just be a `.compile.pass.cpp`.


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D147356/new/

https://reviews.llvm.org/D147356



More information about the libcxx-commits mailing list