[ Merge of http://go/wvgerrit/108103 ] The Widevine License Agreement has been renamed to use inclusive language. This covers files in the cdm, linux, platform, util directory in addition to some other files. Bug: 168562298 Test: verified compilation (comment only change) Change-Id: I9a4977fd4c2ad951769b6be84263f81bd0f22678
22 lines
519 B
C++
22 lines
519 B
C++
// Copyright 2018 Google LLC. All Rights Reserved. This file and proprietary
|
|
// source code may only be used and distributed under the Widevine License
|
|
// Agreement.
|
|
|
|
#include "platform.h"
|
|
|
|
#include "stdlib.h"
|
|
|
|
#ifdef _WIN32
|
|
|
|
int setenv(const char* key, const char* value, int overwrite) {
|
|
if (!overwrite) {
|
|
size_t size;
|
|
errno_t err = getenv_s(&size, nullptr, 0, key);
|
|
if (err != 0 || size != 0)
|
|
return err; // Return 0 if it exists, but don't change.
|
|
}
|
|
return _putenv_s(key, value);
|
|
}
|
|
|
|
#endif
|