diff --git a/src/sbbs3/sbbswrap.h b/src/sbbs3/sbbswrap.h index 448d06be6ecd827992a0084dadbb422109517c02..0508194fd7ded2f630a9a638a3325dd2af0a6cb3 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