From a26bd812ef3fd21dd3d68bd10704ae3dd8eeea6b Mon Sep 17 00:00:00 2001 From: Gabriele Contini <contini.mailing@gmail.com> Date: 周日, 10 11月 2019 22:25:22 +0800 Subject: [PATCH] improvements for issue #42 --- src/library/os/os.h | 12 ++++++++++-- 1 files changed, 10 insertions(+), 2 deletions(-) diff --git a/src/library/os/os.h b/src/library/os/os.h index 11aa844..1371786 100644 --- a/src/library/os/os.h +++ b/src/library/os/os.h @@ -2,7 +2,7 @@ * os-dependent.hpp * * Created on: Mar 29, 2014 - * + * */ #ifndef OS_DEPENDENT_HPP_ @@ -25,7 +25,7 @@ #endif typedef enum { - NONE, VMWARE + NONE, CONTAINER, VM } VIRTUALIZATION; typedef enum { @@ -79,6 +79,14 @@ FUNCTION_RETURN verifySignature(const char* stringToVerify, const char* signatureB64); +#ifdef _WIN32 +#define SETENV(VAR,VAL) _putenv_s(VAR, VAL); +#define UNSETENV(P) _putenv_s(P, ""); +#else +#define SETENV(VAR,VAL) setenv(VAR, VAL, 1); +#define UNSETENV(P) unsetenv(P); +#endif + #ifdef __cplusplus } #endif -- Gitblit v1.9.1