forked from nodejs/node
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Move node version to a single static header file.
Some compile time variables like the cflags and prefix have been moved to the node_config.h.in, in the anticipation that they will be removed at somepoint.
- Loading branch information
Showing
4 changed files
with
43 additions
and
30 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
#ifndef NODE_CONFIG_H | ||
#define NODE_CONFIG_H | ||
|
||
#define NODE_CFLAGS "@CCFLAGS@ @CPPFLAGS@ -I@PREFIX@/include/node" | ||
#define NODE_PREFIX "@PREFIX@" | ||
|
||
#endif /* NODE_CONFIG_H */ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
|
||
#include "node_config.h" | ||
|
||
#ifndef NODE_VERSION_H | ||
#define NODE_VERSION_H | ||
|
||
#define NODE_MAJOR_VERSION 0 | ||
#define NODE_MINOR_VERSION 1 | ||
#define NODE_PATCH_VERSION 100 | ||
|
||
#ifndef NODE_STRINGIFY | ||
#define NODE_STRINGIFY(n) NODE_STRINGIFY_HELPER(n) | ||
#define NODE_STRINGIFY_HELPER(n) #n | ||
#endif | ||
|
||
#define NODE_VERSION_STRING NODE_STRINGIFY(NODE_MAJOR_VERSION) "." \ | ||
NODE_STRINGIFY(NODE_MINOR_VERSION) "." \ | ||
NODE_STRINGIFY(NODE_PATCH_VERSION) | ||
|
||
#define NODE_VERSION "v" NODE_VERSION_STRING | ||
|
||
|
||
#define NODE_VERSION_AT_LEAST(major, minor, patch) \ | ||
(( (major) < NODE_MAJOR_VERSION \ | ||
|| ((major) == NODE_MAJOR_VERSION && (minor) < NODE_MINOR_VERSION) \ | ||
|| ((major) == NODE_MAJOR_VERSION && (minor) == NODE_MINOR_VERSION && (patch) <= NODE_PATCH_VERSION)) | ||
|
||
#endif /* NODE_VERSION_H */ |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters