From 70d3c2cd3e1e7cdcc3c6ec71e0f6fd01282ee08d Mon Sep 17 00:00:00 2001 From: gabime Date: Fri, 13 Dec 2019 15:35:37 +0200 Subject: [PATCH] so::getenv - Always empty string under windows uwp since it's not supported --- include/spdlog/details/os-inl.h | 3 +++ 1 file changed, 3 insertions(+) diff --git a/include/spdlog/details/os-inl.h b/include/spdlog/details/os-inl.h index dcce9a92..34b14218 100644 --- a/include/spdlog/details/os-inl.h +++ b/include/spdlog/details/os-inl.h @@ -538,6 +538,9 @@ SPDLOG_INLINE filename_t dir_name(filename_t path) std::string SPDLOG_INLINE getenv(const char *field) { +#if defined(__cplusplus_winrt) + SPDLOG_THROW(spdlog_ex("getenv is not supported under uwp")); +#endif #if defined(_MSC_VER) && !defined(__cplusplus_winrt) size_t len = 0; char buf[128];