r545 - trunk

DONOTREPLY at icculus.org DONOTREPLY at icculus.org
Tue Mar 4 21:51:47 EST 2008


Author: icculus
Date: 2008-03-04 21:51:47 -0500 (Tue, 04 Mar 2008)
New Revision: 545

Modified:
   trunk/buildver.c
Log:
More buildver string cleanup.


Modified: trunk/buildver.c
===================================================================
--- trunk/buildver.c	2008-03-04 00:01:12 UTC (rev 544)
+++ trunk/buildver.c	2008-03-05 02:51:47 UTC (rev 545)
@@ -27,8 +27,14 @@
 #error Please define APPREV in the build system.
 #endif
 
-#ifndef __VERSION__
-#define __VERSION__ "(Unknown compiler version)"
+#if (defined __GNUC__)
+#   define VERSTR2(x) #x
+#   define VERSTR(x) VERSTR2(x)
+#   define COMPILERVER " " VERSTR(__GNUC__) "." VERSTR(__GNUC_MINOR__) "." VERSTR(__GNUC_PATCHLEVEL__)
+#elif (defined __VERSION__)
+#   define COMPILERVER " " __VERSION__
+#else
+#   define COMPILERVER ""
 #endif
 
 #ifndef __DATE__
@@ -52,7 +58,7 @@
 // macro mess so we can turn APPID and APPREV into a string literal...
 #define MAKEBUILDVERSTRINGLITERAL2(id, rev) \
     #id ", revision " #rev ", built " __DATE__ " " __TIME__ \
-    ", by " COMPILER " " __VERSION__
+    ", by " COMPILER COMPILERVER
 
 #define MAKEBUILDVERSTRINGLITERAL(id, rev) MAKEBUILDVERSTRINGLITERAL2(id, rev)
 




More information about the mojosetup-commits mailing list