Node.js: added check for libunit version at compile time.
This commit is contained in:
@@ -4,14 +4,15 @@
|
||||
"description": "HTTP module for NGINX Unit",
|
||||
"main": "http.js",
|
||||
"files": [
|
||||
"unit.h",
|
||||
"version.h",
|
||||
"addon.cpp",
|
||||
"binding.gyp",
|
||||
"http_server.js",
|
||||
"unit.cpp",
|
||||
"http.js",
|
||||
"http_server.js",
|
||||
"package.json",
|
||||
"socket.js",
|
||||
"unit.cpp",
|
||||
"unit.h",
|
||||
"binding.gyp",
|
||||
"README.md"
|
||||
],
|
||||
"scripts": {
|
||||
|
||||
@@ -6,18 +6,23 @@
|
||||
#ifndef _NXT_NODEJS_UNIT_H_INCLUDED_
|
||||
#define _NXT_NODEJS_UNIT_H_INCLUDED_
|
||||
|
||||
|
||||
#include <node_api.h>
|
||||
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
#include "version.h"
|
||||
#include <nxt_unit.h>
|
||||
|
||||
#if NXT_UNIT_VERNUM != NXT_NODE_VERNUM
|
||||
#error "libunit version mismatch."
|
||||
#endif
|
||||
|
||||
#include <nxt_unit_response.h>
|
||||
#include <nxt_unit_request.h>
|
||||
|
||||
|
||||
#ifdef __cplusplus
|
||||
} /* extern "C" */
|
||||
#endif
|
||||
|
||||
Reference in New Issue
Block a user