From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 2181) id 9E386385781A; Sat, 2 Oct 2021 20:29:57 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 9E386385781A MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Type: text/plain; charset="utf-8" From: Jonathan Wakely To: gcc-cvs@gcc.gnu.org, libstdc++-cvs@gcc.gnu.org Subject: [gcc r12-4096] libstdc++: Fix typos in std::filesystem code X-Act-Checkin: gcc X-Git-Author: Jonathan Wakely X-Git-Refname: refs/heads/master X-Git-Oldrev: 6c0dd02964a624c65859808f9a40721c3796319a X-Git-Newrev: b7848a2068b2579092e0b1bbe02bdb743eb7db26 Message-Id: <20211002202957.9E386385781A@sourceware.org> Date: Sat, 2 Oct 2021 20:29:57 +0000 (GMT) X-BeenThere: libstdc++-cvs@gcc.gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Libstdc++-cvs mailing list List-Unsubscribe: , List-Archive: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 02 Oct 2021 20:29:57 -0000 https://gcc.gnu.org/g:b7848a2068b2579092e0b1bbe02bdb743eb7db26 commit r12-4096-gb7848a2068b2579092e0b1bbe02bdb743eb7db26 Author: Jonathan Wakely 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. 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 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(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