From: Jonathan Wakely <jwakely@redhat.com>
To: libstdc++@gcc.gnu.org, gcc-patches@gcc.gnu.org
Subject: [committed] libstdc++: Fix typos in std::filesystem code
Date: Sat, 2 Oct 2021 21:40:38 +0100 [thread overview]
Message-ID: <YVjDxuuOLucp+qyf@redhat.com> (raw)
[-- Attachment #1: Type: text/plain, Size: 386 bytes --]
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.
Tested x86_64-linux. Committed to trunk.
[-- Attachment #2: patch.txt --]
[-- Type: text/plain, Size: 1892 bytes --]
commit b7848a2068b2579092e0b1bbe02bdb743eb7db26
Author: Jonathan Wakely <jwakely@redhat.com>
Date: Sat Oct 2 21:18:19 2021
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.
diff --git a/libstdc++-v3/src/c++17/fs_ops.cc b/libstdc++-v3/src/c++17/fs_ops.cc
index cb2dc2c617e..5b7f7edd1c9 100644
--- a/libstdc++-v3/src/c++17/fs_ops.cc
+++ b/libstdc++-v3/src/c++17/fs_ops.cc
@@ -631,7 +631,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 90ebeba7f01..b3147639cd9 100644
--- a/libstdc++-v3/src/filesystem/ops-common.h
+++ b/libstdc++-v3/src/filesystem/ops-common.h
@@ -63,7 +63,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
@@ -597,7 +597,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
reply other threads:[~2021-10-02 20:40 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=YVjDxuuOLucp+qyf@redhat.com \
--to=jwakely@redhat.com \
--cc=gcc-patches@gcc.gnu.org \
--cc=libstdc++@gcc.gnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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).