From 772c88a387b702c89cd3066e4b366cc62b9f8ecc Mon Sep 17 00:00:00 2001 From: LoRd_MuldeR Date: Sun, 11 Apr 2021 17:38:09 +0200 Subject: [PATCH] =?UTF-8?q?Workaround=20for=20Intel=C2=AE=20oneAPI=20DPC++?= =?UTF-8?q?/C++=20Compiler=20detection.?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- README.md | 2 +- frontend/res/version.rc | 6 +++--- libslunkcrypt/src/slunkcrypt.c | 15 ++++++++++----- libslunkcrypt/src/version.h | 6 +++--- 4 files changed, 17 insertions(+), 12 deletions(-) diff --git a/README.md b/README.md index 2f56f8a..0f93a4a 100644 --- a/README.md +++ b/README.md @@ -696,7 +696,7 @@ These variables can be used to determine the version of the SlunkCrypt library a * `const uint16_t SLUNKCRYPT_VERSION_MAJOR` – The current *major* version. * `const uint16_t SLUNKCRYPT_VERSION_MINOR` – The current *minor* version. * `const uint16_t SLUNKCRYPT_VERSION_PATCH` – The current *patch* version. -* `const char *SLUNKCRYPT_BUILD` – The build date and time, as a C string, in the *"mmm dd yyyy hh:mm:ss"* format. +* `const char *SLUNKCRYPT_BUILD` – The build date and time, as a C string, in the *`"mmm dd yyyy, hh:mm:ss"`* format. #### Abort request diff --git a/frontend/res/version.rc b/frontend/res/version.rc index 9f75822..1dc08c4 100644 --- a/frontend/res/version.rc +++ b/frontend/res/version.rc @@ -10,7 +10,7 @@ #define VERSION_HELPER1(X,Y,Z) #X "." #Y "." #Z #define VERSION_HELPER2(X,Y,Z) VERSION_HELPER1(X,Y,Z) -#define VERSION_STRING VERSION_HELPER2(MY_VERSION_MAJOR,MY_VERSION_MINOR,MY_VERSION_PATCH) +#define VERSION_STRING VERSION_HELPER2(LIB_VERSION_MAJOR,LIB_VERSION_MINOR,LIB_VERSION_PATCH) ///////////////////////////////////////////////////////////////////////////// // @@ -26,8 +26,8 @@ LANGUAGE LANG_NEUTRAL, SUBLANG_NEUTRAL // Version // VS_VERSION_INFO VERSIONINFO - FILEVERSION MY_VERSION_MAJOR,MY_VERSION_MINOR,0,MY_VERSION_PATCH - PRODUCTVERSION MY_VERSION_MAJOR,MY_VERSION_MINOR,0,MY_VERSION_PATCH + FILEVERSION LIB_VERSION_MAJOR,LIB_VERSION_MINOR,0,LIB_VERSION_PATCH + PRODUCTVERSION LIB_VERSION_MAJOR,LIB_VERSION_MINOR,0,LIB_VERSION_PATCH FILEFLAGSMASK 0x17L #ifdef _DEBUG FILEFLAGS 0x3L diff --git a/libslunkcrypt/src/slunkcrypt.c b/libslunkcrypt/src/slunkcrypt.c index 1e7bbc3..7eedb2c 100644 --- a/libslunkcrypt/src/slunkcrypt.c +++ b/libslunkcrypt/src/slunkcrypt.c @@ -12,8 +12,13 @@ #include #include +/* Intel(R) oneAPI DPC++/C++ Compiler */ +#if defined(__INTEL_LLVM_COMPILER) && (!defined(__GNUC__)) +# define __GNUC__ 9 +#endif + /* Compiler compatibility */ -#if defined(_MSC_VER) +#if defined(_MSC_VER) && (!defined(__GNUC__)) # define FORCE_INLINE __forceinline # define UNUSED __pragma(warning(suppress: 4189)) #elif defined(__GNUC__) @@ -25,10 +30,10 @@ #endif /* Version info */ -const uint16_t SLUNKCRYPT_VERSION_MAJOR = MY_VERSION_MAJOR; -const uint16_t SLUNKCRYPT_VERSION_MINOR = MY_VERSION_MINOR; -const uint16_t SLUNKCRYPT_VERSION_PATCH = MY_VERSION_PATCH; -const char *const SLUNKCRYPT_BUILD = __DATE__ " " __TIME__; +const uint16_t SLUNKCRYPT_VERSION_MAJOR = LIB_VERSION_MAJOR; +const uint16_t SLUNKCRYPT_VERSION_MINOR = LIB_VERSION_MINOR; +const uint16_t SLUNKCRYPT_VERSION_PATCH = LIB_VERSION_PATCH; +const char *const SLUNKCRYPT_BUILD = __DATE__ ", " __TIME__; /* Utilities */ #define BOOLIFY(X) (!!(X)) diff --git a/libslunkcrypt/src/version.h b/libslunkcrypt/src/version.h index 749a96c..5f95240 100644 --- a/libslunkcrypt/src/version.h +++ b/libslunkcrypt/src/version.h @@ -6,8 +6,8 @@ #ifndef INC_SLUNKCRYPT_VERSION_H #define INC_SLUNKCRYPT_VERSION_H -#define MY_VERSION_MAJOR 1 -#define MY_VERSION_MINOR 0 -#define MY_VERSION_PATCH 0 +#define LIB_VERSION_MAJOR 1 +#define LIB_VERSION_MINOR 0 +#define LIB_VERSION_PATCH 0 #endif