| OLD | NEW |
| 1 // Copyright 2012 the V8 project authors. All rights reserved. | 1 // Copyright 2012 the V8 project authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #include "src/v8.h" | 5 #include "src/v8.h" |
| 6 | 6 |
| 7 #include "src/version.h" | 7 #include "src/version.h" |
| 8 | 8 |
| 9 // These macros define the version number for the current version. | 9 // These macros define the version number for the current version. |
| 10 // NOTE these macros are used by some of the tool scripts and the build | 10 // NOTE these macros are used by some of the tool scripts and the build |
| 11 // system so their names cannot be changed without changing the scripts. | 11 // system so their names cannot be changed without changing the scripts. |
| 12 #define MAJOR_VERSION 4 | 12 #define MAJOR_VERSION 4 |
| 13 #define MINOR_VERSION 2 | 13 #define MINOR_VERSION 2 |
| 14 #define BUILD_NUMBER 0 | 14 #define BUILD_NUMBER 0 |
| 15 #define PATCH_LEVEL 0 | 15 #define PATCH_LEVEL 0 |
| 16 // Use 1 for candidates and 0 otherwise. | 16 // Use 1 for candidates and 0 otherwise. |
| 17 // (Boolean macro values are not supported by all preprocessors.) | 17 // (Boolean macro values are not supported by all preprocessors.) |
| 18 #define IS_CANDIDATE_VERSION 1 | 18 #define IS_CANDIDATE_VERSION 1 |
| 19 | 19 |
| 20 // Used to mark a version built from a bad tag. | |
| 21 #define IS_INVALID_VERSION 0 | |
| 22 | |
| 23 // Define SONAME to have the build system put a specific SONAME into the | 20 // Define SONAME to have the build system put a specific SONAME into the |
| 24 // shared library instead the generic SONAME generated from the V8 version | 21 // shared library instead the generic SONAME generated from the V8 version |
| 25 // number. This define is mainly used by the build system script. | 22 // number. This define is mainly used by the build system script. |
| 26 #define SONAME "" | 23 #define SONAME "" |
| 27 | 24 |
| 28 #if IS_INVALID_VERSION | 25 #if IS_CANDIDATE_VERSION |
| 29 #define SUFFIX_STRING " (invalid)" | 26 #define CANDIDATE_STRING " (candidate)" |
| 30 #else | 27 #else |
| 31 #if IS_CANDIDATE_VERSION | 28 #define CANDIDATE_STRING "" |
| 32 #define SUFFIX_STRING " (candidate)" | |
| 33 #else | |
| 34 #define SUFFIX_STRING "" | |
| 35 #endif | |
| 36 #endif | 29 #endif |
| 37 | 30 |
| 38 #define SX(x) #x | 31 #define SX(x) #x |
| 39 #define S(x) SX(x) | 32 #define S(x) SX(x) |
| 40 | 33 |
| 41 #if PATCH_LEVEL > 0 | 34 #if PATCH_LEVEL > 0 |
| 42 #define VERSION_STRING \ | 35 #define VERSION_STRING \ |
| 43 S(MAJOR_VERSION) "." S(MINOR_VERSION) "." S(BUILD_NUMBER) "." S(PATCH_LEVEL) \ | 36 S(MAJOR_VERSION) "." S(MINOR_VERSION) "." S(BUILD_NUMBER) "." S(PATCH_LEVEL) \ |
| 44 SUFFIX_STRING | 37 CANDIDATE_STRING |
| 45 #else | 38 #else |
| 46 #define VERSION_STRING \ | 39 #define VERSION_STRING \ |
| 47 S(MAJOR_VERSION) "." S(MINOR_VERSION) "." S(BUILD_NUMBER) SUFFIX_STRING | 40 S(MAJOR_VERSION) "." S(MINOR_VERSION) "." S(BUILD_NUMBER) CANDIDATE_STRING |
| 48 #endif | 41 #endif |
| 49 | 42 |
| 50 namespace v8 { | 43 namespace v8 { |
| 51 namespace internal { | 44 namespace internal { |
| 52 | 45 |
| 53 int Version::major_ = MAJOR_VERSION; | 46 int Version::major_ = MAJOR_VERSION; |
| 54 int Version::minor_ = MINOR_VERSION; | 47 int Version::minor_ = MINOR_VERSION; |
| 55 int Version::build_ = BUILD_NUMBER; | 48 int Version::build_ = BUILD_NUMBER; |
| 56 int Version::patch_ = PATCH_LEVEL; | 49 int Version::patch_ = PATCH_LEVEL; |
| 57 bool Version::candidate_ = (IS_CANDIDATE_VERSION != 0); | 50 bool Version::candidate_ = (IS_CANDIDATE_VERSION != 0); |
| (...skipping 32 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 90 SNPrintF(str, "libv8-%d.%d.%d%s.so", | 83 SNPrintF(str, "libv8-%d.%d.%d%s.so", |
| 91 GetMajor(), GetMinor(), GetBuild(), candidate); | 84 GetMajor(), GetMinor(), GetBuild(), candidate); |
| 92 } | 85 } |
| 93 } else { | 86 } else { |
| 94 // Use specific SONAME. | 87 // Use specific SONAME. |
| 95 SNPrintF(str, "%s", soname_); | 88 SNPrintF(str, "%s", soname_); |
| 96 } | 89 } |
| 97 } | 90 } |
| 98 | 91 |
| 99 } } // namespace v8::internal | 92 } } // namespace v8::internal |
| OLD | NEW |