Updated compiler types.

git-svn-id: svn://svn.code.sf.net/p/loki-lib/code/trunk@983 7ec92016-0320-0410-acc4-a06ded1c099a
This commit is contained in:
rich_sposato 2009-01-31 08:00:14 +00:00
parent de86ba3dd4
commit 2aa35ef4d7

View file

@ -410,6 +410,58 @@ void Bee::OutputArraySizeInfo( void )
// ----------------------------------------------------------------------------
const char * GetGnuVersion( void )
{
#if defined( __GNUC__ )
const unsigned int major = __GNUC__;
#if defined( __GNUC_MINOR__ )
const unsigned int minor = __GNUC_MINOR__;
#else
const unsigned int minor = 0;
#endif
#if defined( __GNUC_PATCHLEVEL__ )
const unsigned int patch = __GNUC_PATCHLEVEL__;
#else
const unsigned int patch = 0;
#endif
static char buffer[ 64 ];
sprintf( buffer, "GNU version %d.%d.%d", major, minor, patch );
return buffer;
#else
return "not a GNU compiler";
#endif
}
// ----------------------------------------------------------------------------
const char * GetMsvcVersion( void )
{
#if !defined( _MSC_VER )
return "not Microsoft compiler";
#elif (_MSC_VER >= 1500)
return "Microsoft 9.0 or higher";
#elif (_MSC_VER >= 1400)
return "Microsoft 8";
#elif (_MSC_VER >= 1300)
return "Microsoft 7";
#elif (_MSC_VER >= 1200)
return "Microsoft 6";
#elif (_MSC_VER)
return "Microsoft, but a version lower than 6";
#endif
}
// ----------------------------------------------------------------------------
const char * GetCompilerName( void )
{
/** @note This list of predefined compiler version macros comes from
@ -462,7 +514,7 @@ const char * GetCompilerName( void )
return "EDG C++ Front End";
#elif (__GNUC__)
return "Gnu C/C++";
return GetGnuVersion();
#elif (__HP_cc)
return "HP ANSI C/aC++";
@ -545,17 +597,8 @@ const char * GetCompilerName( void )
#elif (__BORLANDC__)
return "Borland C++";
#elif (_MSC_VER >= 1400)
return "Microsoft 8.0 or higher";
#elif (_MSC_VER >= 1300)
return "Microsoft 7";
#elif (_MSC_VER >= 1200)
return "Microsoft 6";
#elif (_MSC_VER)
return "Microsoft, but a version lower than 6";
return GetMsvcVersion();
#else
return "an Unknown type";