public inbox for gcc-cvs@sourceware.org
help / color / mirror / Atom feed
* [gcc r11-11035] libstdc++: Fix typos in std::filesystem code
@ 2023-10-04 11:28 Jonathan Wakely
  0 siblings, 0 replies; only message in thread
From: Jonathan Wakely @ 2023-10-04 11:28 UTC (permalink / raw)
  To: gcc-cvs, libstdc++-cvs

https://gcc.gnu.org/g:f8d45f488c0b0c02eed6a1acb0386964b95189f8

commit r11-11035-gf8d45f488c0b0c02eed6a1acb0386964b95189f8
Author: Jonathan Wakely <jwakely@redhat.com>
Date:   Sat Oct 2 21:18:19 2021 +0100

    libstdc++: Fix typos in std::filesystem code
    
    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)

Diff:
---
 libstdc++-v3/src/c++17/fs_ops.cc         | 2 +-
 libstdc++-v3/src/filesystem/ops-common.h | 4 ++--
 2 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/libstdc++-v3/src/c++17/fs_ops.cc b/libstdc++-v3/src/c++17/fs_ops.cc
index 5d070a4bc8f..1fb295498c6 100644
--- a/libstdc++-v3/src/c++17/fs_ops.cc
+++ b/libstdc++-v3/src/c++17/fs_ops.cc
@@ -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
 }
diff --git a/libstdc++-v3/src/filesystem/ops-common.h b/libstdc++-v3/src/filesystem/ops-common.h
index 325b80830d5..087c3fb655e 100644
--- a/libstdc++-v3/src/filesystem/ops-common.h
+++ b/libstdc++-v3/src/filesystem/ops-common.h
@@ -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

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2023-10-04 11:28 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-10-04 11:28 [gcc r11-11035] libstdc++: Fix typos in std::filesystem code Jonathan Wakely

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).