[libcxx-commits] [PATCH] D90139: libcxx: Fix a few warnings

YAMAMOTO Takashi via Phabricator via libcxx-commits libcxx-commits at lists.llvm.org
Mon Oct 26 02:31:12 PDT 2020


yamt created this revision.
Herald added subscribers: libcxx-commits, krytarowski.
Herald added a project: libc++.
Herald added a reviewer: libc++.
yamt requested review of this revision.

Found during a NuttX porting effort.
But these changes are not directly relevant to NuttX.


Repository:
  rG LLVM Github Monorepo

https://reviews.llvm.org/D90139

Files:
  libcxx/src/filesystem/operations.cpp
  libcxx/src/locale.cpp


Index: libcxx/src/locale.cpp
===================================================================
--- libcxx/src/locale.cpp
+++ libcxx/src/locale.cpp
@@ -1149,7 +1149,7 @@
 {
     return _LIBCPP_GET_C_LOCALE->__ctype_toupper;
 }
-#elif __NetBSD__
+#elif defined(__NetBSD__)
 const short*
 ctype<char>::__classic_lower_table() _NOEXCEPT
 {
Index: libcxx/src/filesystem/operations.cpp
===================================================================
--- libcxx/src/filesystem/operations.cpp
+++ libcxx/src/filesystem/operations.cpp
@@ -534,7 +534,7 @@
   ErrorHandler<path> err("canonical", ec, &orig_p, &cwd);
 
   path p = __do_absolute(orig_p, &cwd, ec);
-#if _POSIX_VERSION >= 200112
+#if defined(_POSIX_VERSION) && _POSIX_VERSION >= 200112
   std::unique_ptr<char, decltype(&::free)>
     hold(::realpath(p.c_str(), nullptr), &::free);
   if (hold.get() == nullptr)


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D90139.300602.patch
Type: text/x-patch
Size: 871 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/libcxx-commits/attachments/20201026/f1bd21e3/attachment.bin>


More information about the libcxx-commits mailing list