mirror of
https://github.com/gabime/spdlog.git
synced 2026-01-19 04:52:09 +00:00
Fix UWP detection. (#3489)
* Fix UWP detection. * Fix conditional compilation for getenv function --------- Co-authored-by: Jérémie Dumas <jedumas@adobe.com>
This commit is contained in:
@@ -567,7 +567,8 @@ SPDLOG_INLINE filename_t dir_name(const filename_t &path) {
|
||||
#pragma warning(disable : 4996)
|
||||
#endif // _MSC_VER
|
||||
std::string SPDLOG_INLINE getenv(const char *field) {
|
||||
#if defined(_MSC_VER) && defined(__cplusplus_winrt)
|
||||
#if defined(_MSC_VER) && defined(WINAPI_FAMILY) && defined(WINAPI_FAMILY_DESKTOP_APP) && \
|
||||
(WINAPI_FAMILY != WINAPI_FAMILY_DESKTOP_APP)
|
||||
return std::string{}; // not supported under uwp
|
||||
#else
|
||||
char *buf = std::getenv(field);
|
||||
|
||||
Reference in New Issue
Block a user