Fix UWP detection. (#3489)

* Fix UWP detection.

* Fix conditional compilation for getenv function

---------

Co-authored-by: Jérémie Dumas <jedumas@adobe.com>
pull/3404/merge
Jérémie Dumas 4 weeks ago committed by GitHub
parent cdbd64e230
commit 8806ca6509
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

@ -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);

Loading…
Cancel
Save