From 1b61dfaf696ef87c99aa0c9330559d57cc95b206 Mon Sep 17 00:00:00 2001 From: George Wu Date: Fri, 18 Sep 2020 00:23:17 -0700 Subject: [PATCH] fix _WIN32 (#5218) --- onnxruntime/test/util/scoped_env_vars.cc | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/onnxruntime/test/util/scoped_env_vars.cc b/onnxruntime/test/util/scoped_env_vars.cc index 154f1b6be1..0f42314bad 100644 --- a/onnxruntime/test/util/scoped_env_vars.cc +++ b/onnxruntime/test/util/scoped_env_vars.cc @@ -3,9 +3,9 @@ #include "test/util/include/scoped_env_vars.h" -#ifndef WIN32 +#ifndef _WIN32 #include -#else // WIN32 +#else // _WIN32 #include #endif @@ -13,7 +13,7 @@ namespace onnxruntime { namespace test { namespace { -#ifndef WIN32 +#ifndef _WIN32 Status SetEnvironmentVar(const std::string& name, const optional& value) { if (value.has_value()) { ORT_RETURN_IF_NOT( @@ -32,7 +32,7 @@ Status GetEnvironmentVar(const std::string& name, optional& value) value = val == nullptr ? optional{} : optional{std::string{val}}; return Status::OK(); } -#else // WIN32 +#else // _WIN32 Status SetEnvironmentVar(const std::string& name, const optional& value) { ORT_RETURN_IF_NOT( SetEnvironmentVariableA(name.c_str(), value.has_value() ? value.value().c_str() : nullptr) != 0,