aboutsummaryrefslogtreecommitdiffstats
path: root/SoftHSMv2/src/lib/win32/setenv.cpp
blob: da41a62f2ce83b00e8329742b2648564539f474f (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
#include <config.h>
#include <stdlib.h>
#include <string>

#ifdef _WIN32

int
setenv(const char *name, const char *value, int overwrite)
{
	std::string vv = name;
	vv += "=";
	vv += value;

	if (overwrite != 1)
		return false;

	return _putenv(vv.c_str()) == 0;
}

#endif