]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
libstdc++: Fix typos in std::filesystem code
authorJonathan Wakely <jwakely@redhat.com>
Sat, 2 Oct 2021 20:18:19 +0000 (21:18 +0100)
committerJonathan Wakely <jwakely@redhat.com>
Wed, 4 Oct 2023 11:10:03 +0000 (12:10 +0100)
There were a couple of typos in r12-4070 and r12-4071 which don't show
up when building for POSIX targets.

libstdc++-v3/ChangeLog:

* src/c++17/fs_ops.cc (create_directory): Fix typo in enum name.
* src/filesystem/ops-common.h (__last_system_error): Add
explicit cast to avoid narrowing conversion.
(do_space): Fix type in function name.

(cherry picked from commit b7848a2068b2579092e0b1bbe02bdb743eb7db26)

libstdc++-v3/src/c++17/fs_ops.cc
libstdc++-v3/src/filesystem/ops-common.h

index 5d070a4bc8f07e2281733869c8c09636834104bf..1fb295498c6a4b6f1a24f1916fcc284ed3c45f94 100644 (file)
@@ -639,7 +639,7 @@ fs::create_directory(const path& p, const path& attributes,
     }
   return create_dir(p, static_cast<perms>(st.st_mode), ec);
 #else
-  ec = std::make_error_code(std::errc::function_function_not_supported);
+  ec = std::make_error_code(std::errc::function_not_supported);
   return false;
 #endif
 }
index 325b80830d583bf018f3ba93f91cb556cfbffd81..087c3fb655e68d0cb029bf73b216b1e6f7c2d834 100644 (file)
@@ -62,7 +62,7 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION
   __last_system_error() noexcept
   {
 #ifdef _GLIBCXX_FILESYSTEM_IS_WINDOWS
-    return {::GetLastError(), std::system_category()};
+    return {(int)::GetLastError(), std::system_category()};
 #else
     return {errno, std::generic_category()};
 #endif
@@ -596,7 +596,7 @@ _GLIBCXX_BEGIN_NAMESPACE_FILESYSTEM
        ec.clear();
       }
     else
-      ec = std::last_system_error();
+      ec = std::__last_system_error();
 #else
     ec = std::make_error_code(std::errc::function_not_supported);
 #endif