From b11cba2a0eb4656ea3d26c70a41d2d9ecb3238e9 Mon Sep 17 00:00:00 2001 From: rswindell <> Date: Thu, 26 Oct 2000 02:50:10 +0000 Subject: [PATCH] Created COMPILER_DESC macro to describe C/C++ compiler used. --- src/sbbs3/sbbswrap.h | 27 +++++++++++++++++++++++++++ 1 file changed, 27 insertions(+) diff --git a/src/sbbs3/sbbswrap.h b/src/sbbs3/sbbswrap.h index 448d06be6e..0508194fd7 100644 --- a/src/sbbs3/sbbswrap.h +++ b/src/sbbs3/sbbswrap.h @@ -96,6 +96,33 @@ extern "C" { /* Compiler-specific */ /*********************/ +/* Compiler Description */ +#if defined(__BORLANDC__) + + #define COMPILER_DESC(str) sprintf(str,"BCC %X.%02X" \ + ,__BORLANDC__>>8,__BORLANDC__&0xff); + +#elif defined(_MSC_VER) + + #define COMPILER_DESC(str) sprintf(str,"MSC %u", _MSC_VER); + +#elif defined(__GNUC__) && defined(__GLIBC__) + + #define COMPILER_DESC(str) sprintf(str,"GCC %u.%02u (GLIBC %u.%u)" \ + ,__GNUC__,__GNUC_MINOR__,__GLIBC__,__GLIBC_MINOR__); + +#elif defined(__GNUC__) + + #define COMPILER_DESC(str) sprintf(str,"GCC %u.%02u" \ + ,__GNUC__,__GNUC_MINOR__); + +#else /* Unknown compiler */ + + #define COMPILER_DESC(str) strcpy(str,"UNKNOWN COMPILER"); + +#endif + + #ifdef _MSC_VER #define snprintf _snprintf #endif -- GitLab