tack compiler name/version to version string if known
This commit is contained in:
parent
67ca701939
commit
57c33af90e
|
@ -107,19 +107,47 @@ getargcargv(argc,argv)
|
||||||
version number (from patchlevel.h), and the current date (if known
|
version number (from patchlevel.h), and the current date (if known
|
||||||
to the compiler, else a manually inserted date). */
|
to the compiler, else a manually inserted date). */
|
||||||
|
|
||||||
#define VERSION "%s (%s)"
|
#define VERSION "%s (%s)%s"
|
||||||
|
|
||||||
#ifdef __DATE__
|
#ifdef __DATE__
|
||||||
#define DATE __DATE__
|
#define DATE __DATE__
|
||||||
#else
|
#else
|
||||||
#define DATE "Aug 17 1994"
|
#define DATE "Feb 13 1995"
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#ifdef THINK_C
|
||||||
|
#define COMPILER " [THINK C]"
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#ifdef __MWERKS__
|
||||||
|
#ifdef __powerc
|
||||||
|
#define COMPILER " [CW PPC]"
|
||||||
|
#else
|
||||||
|
#define COMPILER " [CW 68K]"
|
||||||
|
#endif
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#ifdef MPW
|
||||||
|
#ifdef __SC__
|
||||||
|
#define COMPILER " [Symantec MPW]"
|
||||||
|
#else
|
||||||
|
#define COMPILER " [Apple MPW]"
|
||||||
|
#endif
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#ifdef __GNUC__
|
||||||
|
#define COMPILER " [GCC " ##__VERSION__ "]"
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#ifndef COMPILER
|
||||||
|
#define COMPILER ""
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
char *
|
char *
|
||||||
getversion()
|
getversion()
|
||||||
{
|
{
|
||||||
static char version[80];
|
static char version[80];
|
||||||
sprintf(version, VERSION, PATCHLEVEL, DATE);
|
sprintf(version, VERSION, PATCHLEVEL, DATE, COMPILER);
|
||||||
return version;
|
return version;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue