mirror of
https://github.com/saymrwulf/onnxruntime.git
synced 2026-07-22 19:23:30 +00:00
fix _WIN32 (#5218)
This commit is contained in:
parent
f5df96256c
commit
1b61dfaf69
1 changed files with 4 additions and 4 deletions
|
|
@ -3,9 +3,9 @@
|
|||
|
||||
#include "test/util/include/scoped_env_vars.h"
|
||||
|
||||
#ifndef WIN32
|
||||
#ifndef _WIN32
|
||||
#include <stdlib.h>
|
||||
#else // WIN32
|
||||
#else // _WIN32
|
||||
#include <Windows.h>
|
||||
#endif
|
||||
|
||||
|
|
@ -13,7 +13,7 @@ namespace onnxruntime {
|
|||
namespace test {
|
||||
|
||||
namespace {
|
||||
#ifndef WIN32
|
||||
#ifndef _WIN32
|
||||
Status SetEnvironmentVar(const std::string& name, const optional<std::string>& value) {
|
||||
if (value.has_value()) {
|
||||
ORT_RETURN_IF_NOT(
|
||||
|
|
@ -32,7 +32,7 @@ Status GetEnvironmentVar(const std::string& name, optional<std::string>& value)
|
|||
value = val == nullptr ? optional<std::string>{} : optional<std::string>{std::string{val}};
|
||||
return Status::OK();
|
||||
}
|
||||
#else // WIN32
|
||||
#else // _WIN32
|
||||
Status SetEnvironmentVar(const std::string& name, const optional<std::string>& value) {
|
||||
ORT_RETURN_IF_NOT(
|
||||
SetEnvironmentVariableA(name.c_str(), value.has_value() ? value.value().c_str() : nullptr) != 0,
|
||||
|
|
|
|||
Loading…
Reference in a new issue