mirror of
https://github.com/microsoft/vcpkg.git
synced 2024-11-24 21:39:00 +08:00
4ff057d5ba
* [flatbuffers] Update to 1.12.0 * remove deprecated * Bump version * update the revision
21 lines
592 B
Diff
21 lines
592 B
Diff
diff --git a/src/util.cpp b/src/util.cpp
|
|
index c1bb197..658e116 100644
|
|
--- a/src/util.cpp
|
|
+++ b/src/util.cpp
|
|
@@ -245,9 +245,15 @@ bool ReadEnvironmentVariable(const char *var_name, std::string *_value) {
|
|
#ifdef _MSC_VER
|
|
__pragma(warning(disable : 4996)); // _CRT_SECURE_NO_WARNINGS
|
|
#endif
|
|
+#if _WIN32_WINNT < 0x0A00
|
|
auto env_str = std::getenv(var_name);
|
|
if (!env_str) return false;
|
|
if (_value) *_value = std::string(env_str);
|
|
+#else
|
|
+ //There is no support for environment variables in UWP
|
|
+ var_name; // Do nothing
|
|
+ *_value = std::string("");
|
|
+#endif
|
|
return true;
|
|
}
|
|
|