Index: src/version.cc |
diff --git a/src/version.cc b/src/version.cc |
index 67535cbe6d59c20324274d71a8b7adb6aef77862..7305bf2576ef49a0da53d97630899d2732f6e237 100644 |
--- a/src/version.cc |
+++ b/src/version.cc |
@@ -12,6 +12,25 @@ |
// number. This define is mainly used by the build system script. |
#define SONAME "" |
+#if V8_IS_CANDIDATE_VERSION |
+#define CANDIDATE_STRING " (candidate)" |
+#else |
+#define CANDIDATE_STRING "" |
+#endif |
+ |
+#define SX(x) #x |
+#define S(x) SX(x) |
+ |
+#if V8_PATCH_LEVEL > 0 |
+#define VERSION_STRING \ |
+ S(V8_MAJOR_VERSION) "." S(V8_MINOR_VERSION) "." S(V8_BUILD_NUMBER) "." S( \ |
+ V8_PATCH_LEVEL) CANDIDATE_STRING |
+#else |
+#define VERSION_STRING \ |
+ S(V8_MAJOR_VERSION) "." S(V8_MINOR_VERSION) "." S(V8_BUILD_NUMBER) \ |
+ CANDIDATE_STRING |
+#endif |
+ |
namespace v8 { |
namespace internal { |
@@ -21,7 +40,7 @@ |
int Version::patch_ = V8_PATCH_LEVEL; |
bool Version::candidate_ = (V8_IS_CANDIDATE_VERSION != 0); |
const char* Version::soname_ = SONAME; |
-const char* Version::version_string_ = V8_VERSION_STRING; |
+const char* Version::version_string_ = VERSION_STRING; |
// Calculate the V8 version string. |
void Version::GetString(Vector<char> str) { |