From 9ce8146ecd0fbc654a9ac2e3876fe3a79b26ebb7 Mon Sep 17 00:00:00 2001 From: Natashi <32347635+Natashi@users.noreply.github.com> Date: Sun, 17 Jan 2021 17:31:59 +0700 Subject: [PATCH] Added an excluding macro --- source/GcLib/gstd/File.cpp | 3 ++- source/GcLib/gstd/VectorExtension.hpp | 6 +++++- 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/source/GcLib/gstd/File.cpp b/source/GcLib/gstd/File.cpp index 7dd3ba78..f327efe0 100644 --- a/source/GcLib/gstd/File.cpp +++ b/source/GcLib/gstd/File.cpp @@ -363,8 +363,9 @@ bool File::Open(DWORD typeAccess) { hFile_.open(path_, modeAccess | std::ios::binary); } catch (std::system_error& e) { + int code = errno; lastError_ = StringUtility::FormatToWide("%s (code=%d)", - strerror(errno), errno); + strerror(code), code); } hFile_.exceptions(0); diff --git a/source/GcLib/gstd/VectorExtension.hpp b/source/GcLib/gstd/VectorExtension.hpp index 0808cd08..e5bb3583 100644 --- a/source/GcLib/gstd/VectorExtension.hpp +++ b/source/GcLib/gstd/VectorExtension.hpp @@ -2,6 +2,8 @@ #include "../pch.h" +#if defined(DNH_PROJ_EXECUTOR) + namespace gstd { //================================================================ //Vectorize @@ -465,4 +467,6 @@ namespace gstd { #endif return res; } -} \ No newline at end of file +} + +#endif \ No newline at end of file