Skip to content
Snippets Groups Projects
Commit b11cba2a authored by rswindell's avatar rswindell
Browse files

Created COMPILER_DESC macro to describe C/C++ compiler used.

parent 1d86de81
No related branches found
No related tags found
No related merge requests found
......@@ -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
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment