2873e20a1ea399548c624b635f7dca16f7e992b3
[platform/upstream/nodejs.git] / src / node_version.h
1 #ifndef SRC_NODE_VERSION_H_
2 #define SRC_NODE_VERSION_H_
3
4 #define NODE_MAJOR_VERSION 2
5 #define NODE_MINOR_VERSION 3
6 #define NODE_PATCH_VERSION 4
7
8 #define NODE_VERSION_IS_RELEASE 0
9
10 #ifndef NODE_STRINGIFY
11 #define NODE_STRINGIFY(n) NODE_STRINGIFY_HELPER(n)
12 #define NODE_STRINGIFY_HELPER(n) #n
13 #endif
14
15 #ifndef NODE_TAG
16 # if NODE_VERSION_IS_RELEASE
17 #  define NODE_TAG ""
18 # else
19 #  define NODE_TAG "-pre"
20 # endif
21 #endif
22
23 # define NODE_VERSION_STRING  NODE_STRINGIFY(NODE_MAJOR_VERSION) "." \
24                               NODE_STRINGIFY(NODE_MINOR_VERSION) "." \
25                               NODE_STRINGIFY(NODE_PATCH_VERSION)     \
26                               NODE_TAG
27
28 #define NODE_VERSION "v" NODE_VERSION_STRING
29
30
31 #define NODE_VERSION_AT_LEAST(major, minor, patch) \
32   (( (major) < NODE_MAJOR_VERSION) \
33   || ((major) == NODE_MAJOR_VERSION && (minor) < NODE_MINOR_VERSION) \
34   || ((major) == NODE_MAJOR_VERSION && \
35       (minor) == NODE_MINOR_VERSION && (patch) <= NODE_PATCH_VERSION))
36
37 /**
38  * When this version number is changed, node.js will refuse
39  * to load older modules.  This should be done whenever
40  * an API is broken in the C++ side, including in v8 or
41  * other dependencies.
42  */
43 #define NODE_MODULE_VERSION 44  /* io.js v2.0.0 */
44
45 #endif  /* SRC_NODE_VERSION_H_ */