mirror of
https://github.com/sockspls/badfish
synced 2025-05-01 01:03:09 +00:00
Minor fixes for misc.cpp
Fixes conflict with tune.h STRINGIFY macro. No functional change
This commit is contained in:
parent
6f1013794c
commit
7ed817d7e4
1 changed files with 7 additions and 7 deletions
14
src/misc.cpp
14
src/misc.cpp
|
@ -155,9 +155,9 @@ const string engine_info(bool to_uci) {
|
|||
|
||||
const std::string compiler_info() {
|
||||
|
||||
#define STRINGIFY2(x) #x
|
||||
#define STRINGIFY(x) STRINGIFY2(x)
|
||||
#define VER_STRING(major, minor, patch) STRINGIFY(major) "." STRINGIFY(minor) "." STRINGIFY(patch)
|
||||
#define stringify2(x) #x
|
||||
#define stringify(x) stringify2(x)
|
||||
#define make_version_string(major, minor, patch) stringify(major) "." stringify(minor) "." stringify(patch)
|
||||
|
||||
/// Predefined macros hell:
|
||||
///
|
||||
|
@ -171,20 +171,20 @@ const std::string compiler_info() {
|
|||
|
||||
#ifdef __clang__
|
||||
compiler += "clang++ ";
|
||||
compiler += VER_STRING(__clang_major__, __clang_minor__, __clang_patchlevel__);
|
||||
compiler += make_version_string(__clang_major__, __clang_minor__, __clang_patchlevel__);
|
||||
#elif __INTEL_COMPILER
|
||||
compiler += "Intel compiler ";
|
||||
compiler += "(version ";
|
||||
compiler += STRINGIFY(__INTEL_COMPILER) " update " STRINGIFY(__INTEL_COMPILER_UPDATE);
|
||||
compiler += stringify(__INTEL_COMPILER) " update " stringify(__INTEL_COMPILER_UPDATE);
|
||||
compiler += ")";
|
||||
#elif _MSC_VER
|
||||
compiler += "MSVC ";
|
||||
compiler += "(version ";
|
||||
compiler += STRINGIFY(_MSC_FULL_VER) "." STRINGIFY(_MSC_BUILD);
|
||||
compiler += stringify(_MSC_FULL_VER) "." stringify(_MSC_BUILD);
|
||||
compiler += ")";
|
||||
#elif __GNUC__
|
||||
compiler += "g++ (GNUC) ";
|
||||
compiler += VER_STRING(__GNUC__, __GNUC_MINOR__, __GNUC_PATCHLEVEL__);
|
||||
compiler += make_version_string(__GNUC__, __GNUC_MINOR__, __GNUC_PATCHLEVEL__);
|
||||
#else
|
||||
compiler += "Unknown compiler ";
|
||||
compiler += "(unknown version)";
|
||||
|
|
Loading…
Add table
Reference in a new issue