From 11a0f65bae425baf09508e2d57c830f5cad69df5 Mon Sep 17 00:00:00 2001 From: gcontini <1121667+gcontini@users.noreply.github.com> Date: 周六, 14 12月 2019 09:42:26 +0800 Subject: [PATCH] cleanup and change license generation parameters --- src/library/os/os.h | 20 ++++++++++++++++---- 1 files changed, 16 insertions(+), 4 deletions(-) diff --git a/src/library/os/os.h b/src/library/os/os.h index 13c52f9..f32ca92 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_ @@ -14,14 +14,18 @@ #include "../base/base.h" #include <stddef.h> +#include <string.h> +#include <ctype.h> +#include <sys/types.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 { @@ -31,7 +35,7 @@ typedef struct { int id; char description[1024]; - unsigned char mac_address[6]; + unsigned char mac_address[8]; unsigned char ipv4_address[4]; IFACE_TYPE type; } OsAdapterInfo; @@ -73,7 +77,15 @@ VIRTUALIZATION getVirtualization(); void os_initialize(); -FUNCTION_RETURN verifySignature(const char* stringToVerify, const char* signatureB64); +// 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 } -- Gitblit v1.9.1