From 5a8a12d7a2c69610cd7a9a00ed1b3579b750a914 Mon Sep 17 00:00:00 2001 From: gcontini <1121667+gcontini@users.noreply.github.com> Date: 周六, 16 11月 2019 21:39:10 +0800 Subject: [PATCH] issue #42 #38 \n review build system, \n issue #38 added clang format --- src/library/os/os.h | 14 +++++++++++--- 1 files changed, 11 insertions(+), 3 deletions(-) diff --git a/src/library/os/os.h b/src/library/os/os.h index d953d1a..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_ @@ -17,15 +17,15 @@ #include <string.h> #include <ctype.h> #include <sys/types.h> -#include <unistd.h> //definition of size_t #include <stdlib.h> #ifdef __unix__ +#include <unistd.h> #include <stdbool.h> #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