summaryrefslogtreecommitdiffhomepage
path: root/src
diff options
context:
space:
mode:
authorTiago Natel de Moura <t.nateldemoura@f5.com>2020-07-31 12:21:21 +0100
committerTiago Natel de Moura <t.nateldemoura@f5.com>2020-07-31 12:21:21 +0100
commitb28b4459b0899cb8357df5f6c1e904fd1a34ebe3 (patch)
treebdabea7bad1f2d04c420f2b6b84dc110c7c968ba /src
parentf3471c29c0870cffff3d96c1c50c88c47a4d8009 (diff)
downloadunit-b28b4459b0899cb8357df5f6c1e904fd1a34ebe3.tar.gz
unit-b28b4459b0899cb8357df5f6c1e904fd1a34ebe3.tar.bz2
Isolation: fixed the generation of mounts table.
Since the introduction of rootfs feature, some language modules can't be configured multiple times. Now the configure generates a separate nxt_<module>_mounts.h for each module compiled.
Diffstat (limited to 'src')
-rw-r--r--src/nxt_java.c3
-rw-r--r--src/nxt_python_wsgi.c12
-rw-r--r--src/ruby/nxt_ruby.c3
3 files changed, 8 insertions, 10 deletions
diff --git a/src/nxt_java.c b/src/nxt_java.c
index c7471509..1f8864bd 100644
--- a/src/nxt_java.c
+++ b/src/nxt_java.c
@@ -26,7 +26,8 @@
#include "java/nxt_jni_URLClassLoader.h"
#include "nxt_jars.h"
-#include "nxt_java_mounts.h"
+
+#include NXT_JAVA_MOUNTS_H
static nxt_int_t nxt_java_setup(nxt_task_t *task, nxt_process_t *process,
nxt_common_app_conf_t *conf);
diff --git a/src/nxt_python_wsgi.c b/src/nxt_python_wsgi.c
index 7e8d1d79..c4b7702e 100644
--- a/src/nxt_python_wsgi.c
+++ b/src/nxt_python_wsgi.c
@@ -18,7 +18,8 @@
#include <nxt_unit_field.h>
#include <nxt_unit_request.h>
#include <nxt_unit_response.h>
-#include <nxt_python_mounts.h>
+
+#include NXT_PYTHON_MOUNTS_H
/*
* According to "PEP 3333 / A Note On String Types"
@@ -39,11 +40,6 @@
*/
-#define _NXT_PYTHON_MOUNTS(major, minor) \
- nxt_python ## major ## minor ## _mounts
-
-#define NXT_PYTHON_MOUNTS(major, minor) _NXT_PYTHON_MOUNTS(major, minor)
-
#if PY_MAJOR_VERSION == 3
#define NXT_PYTHON_BYTES_TYPE "bytestring"
@@ -123,8 +119,8 @@ NXT_EXPORT nxt_app_module_t nxt_app_module = {
compat,
nxt_string("python"),
PY_VERSION,
- NXT_PYTHON_MOUNTS(PY_MAJOR_VERSION, PY_MINOR_VERSION),
- nxt_nitems(NXT_PYTHON_MOUNTS(PY_MAJOR_VERSION, PY_MINOR_VERSION)),
+ nxt_python_mounts,
+ nxt_nitems(nxt_python_mounts),
NULL,
nxt_python_start,
};
diff --git a/src/ruby/nxt_ruby.c b/src/ruby/nxt_ruby.c
index 9c4126f6..743bf646 100644
--- a/src/ruby/nxt_ruby.c
+++ b/src/ruby/nxt_ruby.c
@@ -7,7 +7,8 @@
#include <nxt_unit.h>
#include <nxt_unit_request.h>
-#include <nxt_ruby_mounts.h>
+
+#include NXT_RUBY_MOUNTS_H
#define NXT_RUBY_RACK_API_VERSION_MAJOR 1