passenger 5.3.5 → 5.3.6

Sign up to get free protection for your applications and to get access to all the features.
Files changed (211) hide show
  1. checksums.yaml +4 -4
  2. data/CHANGELOG +13 -0
  3. data/README.md +2 -1
  4. data/Rakefile +0 -5
  5. data/build/agent.rb +2 -1
  6. data/build/cxx_tests.rb +18 -20
  7. data/build/integration_tests.rb +6 -2
  8. data/build/support/cxx_dependency_map.rb +2019 -1966
  9. data/dev/colorize-logs +272 -0
  10. data/src/agent/Core/AdminPanelConnector.h +3 -3
  11. data/src/agent/Core/ApiServer.h +4 -4
  12. data/src/agent/Core/ApplicationPool/BasicProcessInfo.h +2 -2
  13. data/src/agent/Core/ApplicationPool/Group/OutOfBandWork.cpp +2 -2
  14. data/src/agent/Core/ApplicationPool/Implementation.cpp +5 -5
  15. data/src/agent/Core/ApplicationPool/Pool.h +4 -4
  16. data/src/agent/Core/ApplicationPool/Process.h +10 -15
  17. data/src/agent/Core/ApplicationPool/Socket.h +2 -2
  18. data/src/agent/Core/ApplicationPool/TestSession.h +3 -3
  19. data/src/agent/Core/Config.h +4 -2
  20. data/src/agent/Core/Controller.h +4 -4
  21. data/src/agent/Core/Controller/Config.h +1 -1
  22. data/src/agent/Core/Controller/SendRequest.cpp +2 -2
  23. data/src/agent/Core/Controller/TurboCaching.h +2 -2
  24. data/src/agent/Core/CoreMain.cpp +2 -2
  25. data/src/agent/Core/OptionParser.h +2 -2
  26. data/src/agent/Core/ResponseCache.h +3 -3
  27. data/src/agent/Core/SecurityUpdateChecker.h +2 -2
  28. data/src/agent/Core/SpawningKit/Config.h +2 -1
  29. data/src/agent/Core/SpawningKit/Config/AutoGeneratedCode.h +1 -1
  30. data/src/agent/Core/SpawningKit/Context.h +1 -1
  31. data/src/agent/Core/SpawningKit/DirectSpawner.h +3 -3
  32. data/src/agent/Core/SpawningKit/DummySpawner.h +3 -3
  33. data/src/agent/Core/SpawningKit/ErrorRenderer.h +1 -1
  34. data/src/agent/Core/SpawningKit/Exceptions.h +2 -2
  35. data/src/agent/Core/SpawningKit/Factory.h +1 -1
  36. data/src/agent/Core/SpawningKit/Handshake/BackgroundIOCapturer.h +1 -1
  37. data/src/agent/Core/SpawningKit/Handshake/Perform.h +13 -2
  38. data/src/agent/Core/SpawningKit/Handshake/Prepare.h +3 -3
  39. data/src/agent/Core/SpawningKit/Handshake/WorkDir.h +1 -1
  40. data/src/agent/Core/SpawningKit/Journey.h +4 -5
  41. data/src/agent/Core/SpawningKit/PipeWatcher.h +1 -1
  42. data/src/agent/Core/SpawningKit/Result.h +20 -8
  43. data/src/agent/Core/SpawningKit/Result/AutoGeneratedCode.h +1 -1
  44. data/src/agent/Core/SpawningKit/SmartSpawner.h +6 -6
  45. data/src/agent/Core/SpawningKit/Spawner.h +2 -2
  46. data/src/agent/Core/TelemetryCollector.h +13 -7
  47. data/src/agent/ExecHelper/ExecHelperMain.cpp +1 -1
  48. data/src/agent/README.md +1 -1
  49. data/src/agent/Shared/ApiAccountUtils.h +1 -1
  50. data/src/agent/Shared/ApiServerUtils.h +3 -3
  51. data/src/agent/Shared/ApplicationPoolApiKey.h +2 -2
  52. data/src/agent/Shared/Fundamentals/Initialization.cpp +4 -4
  53. data/src/agent/SpawnEnvSetupper/SpawnEnvSetupperMain.cpp +1 -1
  54. data/src/agent/SystemMetrics/SystemMetricsMain.cpp +4 -3
  55. data/src/agent/Watchdog/ApiServer.h +3 -3
  56. data/src/agent/Watchdog/Config.h +3 -2
  57. data/src/agent/Watchdog/CoreWatcher.cpp +2 -2
  58. data/src/agent/Watchdog/WatchdogMain.cpp +93 -27
  59. data/src/apache2_module/Config.cpp +14 -14
  60. data/src/apache2_module/Config.h +8 -16
  61. data/src/apache2_module/ConfigGeneral/AutoGeneratedDefinitions.cpp +505 -491
  62. data/src/apache2_module/ConfigGeneral/AutoGeneratedDefinitions.cpp.cxxcodebuilder +39 -17
  63. data/src/apache2_module/ConfigGeneral/AutoGeneratedSetterFuncs.cpp +24 -1
  64. data/src/apache2_module/ConfigGeneral/AutoGeneratedSetterFuncs.cpp.cxxcodebuilder +31 -1
  65. data/src/{cxx_supportlib/Utils/MemoryBarrier.h → apache2_module/ConfigGeneral/Common.h} +17 -25
  66. data/src/apache2_module/DirConfig/AutoGeneratedCreateFunction.cpp +12 -1
  67. data/src/apache2_module/DirConfig/AutoGeneratedCreateFunction.cpp.cxxcodebuilder +16 -1
  68. data/src/apache2_module/DirConfig/AutoGeneratedHeaderSerialization.cpp +19 -5
  69. data/src/apache2_module/DirConfig/AutoGeneratedHeaderSerialization.cpp.cxxcodebuilder +26 -9
  70. data/src/apache2_module/DirConfig/AutoGeneratedManifestGeneration.cpp +6 -1
  71. data/src/apache2_module/DirConfig/AutoGeneratedManifestGeneration.cpp.cxxcodebuilder +10 -1
  72. data/src/apache2_module/DirConfig/AutoGeneratedMergeFunction.cpp +7 -1
  73. data/src/apache2_module/DirConfig/AutoGeneratedMergeFunction.cpp.cxxcodebuilder +11 -1
  74. data/src/apache2_module/DirConfig/AutoGeneratedStruct.h +23 -1
  75. data/src/apache2_module/DirConfig/AutoGeneratedStruct.h.cxxcodebuilder +34 -1
  76. data/src/apache2_module/Hooks.cpp +3 -3
  77. data/src/apache2_module/ServerConfig/AutoGeneratedStruct.h +24 -1
  78. data/src/apache2_module/ServerConfig/AutoGeneratedStruct.h.cxxcodebuilder +36 -1
  79. data/src/cxx_supportlib/{Utils → Algorithms}/Hasher.cpp +2 -2
  80. data/src/cxx_supportlib/{Utils → Algorithms}/Hasher.h +4 -4
  81. data/src/cxx_supportlib/AppTypeDetector/Detector.h +1 -1
  82. data/src/cxx_supportlib/ConfigKit/Schema.h +2 -2
  83. data/src/cxx_supportlib/ConfigKit/Store.h +1 -1
  84. data/src/cxx_supportlib/Constants.h +1 -1
  85. data/src/cxx_supportlib/{Utils → DataStructures}/HashMap.h +4 -4
  86. data/src/cxx_supportlib/DataStructures/HashedStaticString.h +5 -5
  87. data/src/cxx_supportlib/DataStructures/LString.h +3 -3
  88. data/src/cxx_supportlib/{Utils → DataStructures}/StringMap.h +36 -36
  89. data/src/cxx_supportlib/FileTools/FileManip.cpp +1 -1
  90. data/src/cxx_supportlib/FileTools/PathManip.cpp +2 -2
  91. data/src/cxx_supportlib/FileTools/PathSecurityCheck.cpp +1 -1
  92. data/src/cxx_supportlib/Hooks.h +2 -2
  93. data/src/cxx_supportlib/{Utils → IOTools}/BufferedIO.h +5 -5
  94. data/src/cxx_supportlib/{Utils → IOTools}/IOUtils.cpp +2 -2
  95. data/src/cxx_supportlib/{Utils → IOTools}/IOUtils.h +3 -3
  96. data/src/cxx_supportlib/{Utils → IOTools}/MessageIO.h +7 -7
  97. data/src/cxx_supportlib/{MessageReadersWriters.h → IOTools/MessageSerialization.h} +5 -5
  98. data/src/cxx_supportlib/InstanceDirectory.h +4 -4
  99. data/src/cxx_supportlib/Integrations/LibevJsonUtils.h +3 -3
  100. data/src/cxx_supportlib/{Utils → JsonTools}/JsonUtils.h +5 -5
  101. data/src/cxx_supportlib/LoggingKit/Context.h +2 -2
  102. data/src/cxx_supportlib/LoggingKit/Implementation.cpp +3 -3
  103. data/src/cxx_supportlib/MemoryKit/mbuf.cpp +2 -2
  104. data/src/cxx_supportlib/ProcessManagement/Spawn.cpp +5 -5
  105. data/src/cxx_supportlib/ProcessManagement/Utils.h +10 -0
  106. data/src/cxx_supportlib/RandomGenerator.h +2 -2
  107. data/src/cxx_supportlib/{Crypto.cpp → SecurityKit/Crypto.cpp} +4 -4
  108. data/src/cxx_supportlib/{Crypto.h → SecurityKit/Crypto.h} +4 -4
  109. data/src/cxx_supportlib/{Utils → SecurityKit}/MemZeroGuard.h +0 -0
  110. data/src/cxx_supportlib/ServerKit/AcceptLoadBalancer.h +2 -2
  111. data/src/cxx_supportlib/ServerKit/Channel.h +1 -1
  112. data/src/cxx_supportlib/ServerKit/Context.h +2 -2
  113. data/src/cxx_supportlib/ServerKit/FileBufferedChannel.h +1 -1
  114. data/src/cxx_supportlib/ServerKit/HttpHeaderParser.h +3 -3
  115. data/src/cxx_supportlib/ServerKit/HttpHeaderParserState.h +2 -2
  116. data/src/cxx_supportlib/ServerKit/HttpServer.h +16 -10
  117. data/src/cxx_supportlib/ServerKit/Server.h +3 -3
  118. data/src/cxx_supportlib/{Utils → StrIntTools}/DateParsing.h +5 -5
  119. data/src/cxx_supportlib/{Utils → StrIntTools}/StrIntUtils.cpp +3 -3
  120. data/src/cxx_supportlib/{Utils → StrIntTools}/StrIntUtils.h +0 -0
  121. data/src/cxx_supportlib/{Utils → StrIntTools}/StrIntUtilsNoStrictAliasing.cpp +2 -2
  122. data/src/cxx_supportlib/{Utils → StrIntTools}/StringScanning.h +5 -5
  123. data/src/cxx_supportlib/{Utils → StrIntTools}/Template.h +30 -5
  124. data/src/cxx_supportlib/SystemTools/ContainerHelpers.h +34 -0
  125. data/src/cxx_supportlib/{Utils → SystemTools}/ProcessMetricsCollector.h +6 -6
  126. data/src/cxx_supportlib/{Utils → SystemTools}/SystemMetricsCollector.h +3 -3
  127. data/src/cxx_supportlib/{Utils → SystemTools}/SystemTime.cpp +1 -1
  128. data/src/cxx_supportlib/{Utils → SystemTools}/SystemTime.h +0 -0
  129. data/src/cxx_supportlib/SystemTools/UserDatabase.h +1 -1
  130. data/src/cxx_supportlib/Utils.cpp +2 -2
  131. data/src/cxx_supportlib/Utils/CachedFileStat.hpp +3 -3
  132. data/src/cxx_supportlib/Utils/Curl.h +2 -2
  133. data/src/cxx_supportlib/Utils/FileChangeChecker.h +2 -2
  134. data/src/cxx_supportlib/Utils/MessagePassing.h +1 -1
  135. data/src/cxx_supportlib/Utils/SpeedMeter.h +2 -2
  136. data/src/cxx_supportlib/Utils/Timer.h +2 -2
  137. data/src/cxx_supportlib/Utils/VariantMap.h +3 -3
  138. data/src/cxx_supportlib/WatchdogLauncher.h +3 -3
  139. data/src/cxx_supportlib/WebSocketCommandReverseServer.h +1 -1
  140. data/src/cxx_supportlib/WrapperRegistry/Registry.h +1 -1
  141. data/src/cxx_supportlib/vendor-modified/psg_sysqueue.h +3 -0
  142. data/src/ruby_supportlib/phusion_passenger.rb +1 -1
  143. data/src/ruby_supportlib/phusion_passenger/common_library.rb +11 -11
  144. data/src/ruby_supportlib/phusion_passenger/config/agent_compiler.rb +4 -4
  145. data/src/ruby_supportlib/phusion_passenger/config/nginx_engine_compiler.rb +1 -1
  146. data/src/ruby_supportlib/phusion_passenger/message_channel.rb +2 -2
  147. data/src/ruby_supportlib/phusion_passenger/packaging.rb +20 -19
  148. data/src/ruby_supportlib/phusion_passenger/platform_info/apache.rb +22 -4
  149. data/src/ruby_supportlib/phusion_passenger/platform_info/ruby.rb +33 -13
  150. data/src/schema_printer/SchemaPrinterMain.cpp +2 -0
  151. metadata +28 -86
  152. data/.editorconfig +0 -134
  153. data/CODE_OF_CONDUCT.md +0 -52
  154. data/dev/boost-patches/0001-Patch-boost-thread-so-that-oxt-thread-can-use-it.patch +0 -48
  155. data/dev/boost-patches/0002-Make-boost-thread_interrupted-derive-from-oxt-tracab.patch +0 -33
  156. data/dev/boost-patches/0003-Disable-a-Clang-pragma-to-prevent-warnings-on-OS-X.patch +0 -25
  157. data/dev/ci/README.md +0 -134
  158. data/dev/ci/lib/functions.sh +0 -129
  159. data/dev/ci/lib/set-container-envvars.sh +0 -53
  160. data/dev/ci/lib/setup-container.sh +0 -46
  161. data/dev/ci/run-tests-natively +0 -24
  162. data/dev/ci/run-tests-with-docker +0 -42
  163. data/dev/ci/scripts/debug-console-wrapper.sh +0 -29
  164. data/dev/ci/scripts/docker-entrypoint-stage2.sh +0 -17
  165. data/dev/ci/scripts/docker-entrypoint.sh +0 -17
  166. data/dev/ci/scripts/inituidgid +0 -17
  167. data/dev/ci/scripts/run-tests-natively-stage2.sh +0 -17
  168. data/dev/ci/scripts/setup-host-natively.sh +0 -11
  169. data/dev/ci/setup-host +0 -56
  170. data/dev/ci/tests/apache2/run +0 -6
  171. data/dev/ci/tests/apache2/setup +0 -4
  172. data/dev/ci/tests/binaries/Jenkinsfile +0 -105
  173. data/dev/ci/tests/binaries/build-linux +0 -38
  174. data/dev/ci/tests/binaries/build-macos +0 -40
  175. data/dev/ci/tests/binaries/prepare-macos +0 -38
  176. data/dev/ci/tests/binaries/test-linux +0 -45
  177. data/dev/ci/tests/binaries/test-macos +0 -38
  178. data/dev/ci/tests/cxx/run +0 -9
  179. data/dev/ci/tests/cxx/setup +0 -4
  180. data/dev/ci/tests/debian/Jenkinsfile +0 -89
  181. data/dev/ci/tests/debian/run +0 -60
  182. data/dev/ci/tests/nginx-dynamic/run +0 -20
  183. data/dev/ci/tests/nginx-dynamic/setup +0 -4
  184. data/dev/ci/tests/nginx/run +0 -5
  185. data/dev/ci/tests/nginx/setup +0 -4
  186. data/dev/ci/tests/nodejs/run +0 -4
  187. data/dev/ci/tests/nodejs/setup +0 -4
  188. data/dev/ci/tests/rpm/Jenkinsfile +0 -68
  189. data/dev/ci/tests/rpm/run +0 -63
  190. data/dev/ci/tests/ruby/run +0 -4
  191. data/dev/ci/tests/ruby/setup +0 -4
  192. data/dev/ci/tests/source-packaging/run +0 -4
  193. data/dev/ci/tests/source-packaging/setup +0 -4
  194. data/dev/ci/tests/standalone/run +0 -4
  195. data/dev/ci/tests/standalone/setup +0 -4
  196. data/dev/configkit-schemas/index.json +0 -1850
  197. data/dev/configkit-schemas/update_schema_inline_comments.rb +0 -118
  198. data/dev/rack.test/config.ru +0 -5
  199. data/dev/rack.test/public/asset.txt +0 -1
  200. data/dev/vagrant/apache_default_site.conf +0 -35
  201. data/dev/vagrant/apache_passenger.conf +0 -5
  202. data/dev/vagrant/apache_passenger.load +0 -1
  203. data/dev/vagrant/apache_ports.conf +0 -24
  204. data/dev/vagrant/apache_rack_test.conf +0 -9
  205. data/dev/vagrant/bashrc +0 -23
  206. data/dev/vagrant/nginx.conf +0 -39
  207. data/dev/vagrant/nginx_rakefile +0 -33
  208. data/dev/vagrant/nginx_start +0 -32
  209. data/dev/vagrant/provision.sh +0 -117
  210. data/dev/vagrant/sudoers.conf +0 -5
  211. data/resources/templates/error_renderer/.editorconfig +0 -19
@@ -1,5 +1,5 @@
1
1
  # Phusion Passenger - https://www.phusionpassenger.com/
2
- # Copyright (c) 2010-2017 Phusion Holding B.V.
2
+ # Copyright (c) 2010-2018 Phusion Holding B.V.
3
3
  #
4
4
  # "Passenger", "Phusion Passenger" and "Union Station" are registered
5
5
  # trademarks of Phusion Holding B.V.
@@ -48,23 +48,45 @@ def main
48
48
 
49
49
  separator
50
50
 
51
- APACHE2_CONFIGURATION_OPTIONS.each do |option|
52
- option = resolve_possible_alias(option)
53
- format =
54
- "%s(%s,\n" \
55
- "\t(%s) %s,\n" \
56
- "\tNULL,\n" \
57
- "\t%s,\n" \
58
- "\t%s),\n"
59
- code = sprintf(format,
60
- macro_for(option),
61
- name_for(option),
62
- function_type_for(option),
63
- function_for(option),
64
- definition_context_for(option),
65
- description_for(option))
66
- add_code(code)
51
+ add_code %Q[
52
+ #ifdef INTELLISENSE
53
+ // This include does nothing, but keeps IntelliSense happy.
54
+ #include <http_config.h>
55
+ #endif
56
+
57
+ namespace Passenger {
58
+ namespace Apache2Module {
59
+
60
+ extern "C" const command_rec passenger_commands[] = {
61
+ ]
62
+
63
+ indent do
64
+ APACHE2_CONFIGURATION_OPTIONS.each do |option|
65
+ option = resolve_possible_alias(option)
66
+ format =
67
+ "%s(%s,\n" \
68
+ "\t(%s) %s,\n" \
69
+ "\tNULL,\n" \
70
+ "\t%s,\n" \
71
+ "\t%s),\n"
72
+ code = sprintf(format,
73
+ macro_for(option),
74
+ name_for(option),
75
+ function_type_for(option),
76
+ function_for(option),
77
+ definition_context_for(option),
78
+ description_for(option))
79
+ add_code(code)
80
+ end
67
81
  end
82
+
83
+ add_code %Q[
84
+ { NULL }
85
+ };
86
+
87
+ } // namespace Apache2Module
88
+ } // namespace Passenger
89
+ ]
68
90
  end
69
91
 
70
92
  def resolve_possible_alias(option)
@@ -1,6 +1,6 @@
1
1
  /*
2
2
  * Phusion Passenger - https://www.phusionpassenger.com/
3
- * Copyright (c) 2010-2017 Phusion Holding B.V.
3
+ * Copyright (c) 2010-2018 Phusion Holding B.V.
4
4
  *
5
5
  * "Passenger", "Phusion Passenger" and "Union Station" are registered
6
6
  * trademarks of Phusion Holding B.V.
@@ -23,6 +23,24 @@
23
23
  * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
24
24
  * THE SOFTWARE.
25
25
  */
26
+ #ifndef _PASSENGER_APACHE2_MODULE_CONFIG_AUTOGENERATED_SETTER_FUNCS_CPP_
27
+ #define _PASSENGER_APACHE2_MODULE_CONFIG_AUTOGENERATED_SETTER_FUNCS_CPP_
28
+
29
+ #ifdef INTELLISENSE
30
+ // These includes do nothing, but keep IntelliSense happy.
31
+ #include <ap_config.h>
32
+ #include <http_config.h>
33
+ #include <http_log.h>
34
+ #include "../Config.h"
35
+
36
+ #ifdef APLOG_USE_MODULE
37
+ extern "C" module AP_MODULE_DECLARE_DATA passenger_module;
38
+ APLOG_USE_MODULE(passenger);
39
+ #endif
40
+ #endif
41
+
42
+ namespace Passenger {
43
+ namespace Apache2Module {
26
44
 
27
45
  /*
28
46
  * ConfigGeneral/AutoGeneratedSetterFuncs.cpp is automatically generated from
@@ -972,3 +990,8 @@ cmd_union_station_support(cmd_parms *cmd, void *pcfg, const char *arg) {
972
990
  return NULL;
973
991
  }
974
992
 
993
+
994
+ } // namespace Apache2Module
995
+ } // namespace Passenger
996
+
997
+ #endif /* _PASSENGER_APACHE2_MODULE_CONFIG_AUTOGENERATED_SETTER_FUNCS_CPP_ */
@@ -1,5 +1,5 @@
1
1
  # Phusion Passenger - https://www.phusionpassenger.com/
2
- # Copyright (c) 2010-2017 Phusion Holding B.V.
2
+ # Copyright (c) 2010-2018 Phusion Holding B.V.
3
3
  #
4
4
  # "Passenger", "Phusion Passenger" and "Union Station" are registered
5
5
  # trademarks of Phusion Holding B.V.
@@ -30,6 +30,27 @@ require 'phusion_passenger/apache2/config_options'
30
30
  def main
31
31
  comment copyright_header_for(__FILE__), 1
32
32
 
33
+ add_code %Q[
34
+ #ifndef _PASSENGER_APACHE2_MODULE_CONFIG_AUTOGENERATED_SETTER_FUNCS_CPP_
35
+ #define _PASSENGER_APACHE2_MODULE_CONFIG_AUTOGENERATED_SETTER_FUNCS_CPP_
36
+
37
+ #ifdef INTELLISENSE
38
+ // These includes do nothing, but keep IntelliSense happy.
39
+ #include <ap_config.h>
40
+ #include <http_config.h>
41
+ #include <http_log.h>
42
+ #include "../Config.h"
43
+
44
+ #ifdef APLOG_USE_MODULE
45
+ extern "C" module AP_MODULE_DECLARE_DATA passenger_module;
46
+ APLOG_USE_MODULE(passenger);
47
+ #endif
48
+ #endif
49
+
50
+ namespace Passenger {
51
+ namespace Apache2Module {
52
+ ]
53
+
33
54
  separator
34
55
 
35
56
  comment %q{
@@ -53,6 +74,15 @@ def main
53
74
  setter_function_body_for(option)
54
75
  end
55
76
  end
77
+
78
+ separator
79
+
80
+ add_code %Q[
81
+ } // namespace Apache2Module
82
+ } // namespace Passenger
83
+
84
+ #endif /* _PASSENGER_APACHE2_MODULE_CONFIG_AUTOGENERATED_SETTER_FUNCS_CPP_ */
85
+ ]
56
86
  end
57
87
 
58
88
  def filter_eligible_options(options)
@@ -1,6 +1,6 @@
1
1
  /*
2
2
  * Phusion Passenger - https://www.phusionpassenger.com/
3
- * Copyright (c) 2010-2017 Phusion Holding B.V.
3
+ * Copyright (c) 2010-2018 Phusion Holding B.V.
4
4
  *
5
5
  * "Passenger", "Phusion Passenger" and "Union Station" are registered
6
6
  * trademarks of Phusion Holding B.V.
@@ -23,31 +23,23 @@
23
23
  * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
24
24
  * THE SOFTWARE.
25
25
  */
26
- #ifndef _PASSENGER_MEMORY_BARRIER_H_
27
- #define _PASSENGER_MEMORY_BARRIER_H_
26
+ #ifndef _PASSENGER_APACHE2_MODULE_CONFIG_COMMON_H_
27
+ #define _PASSENGER_APACHE2_MODULE_CONFIG_COMMON_H_
28
28
 
29
- // Memory barrier macros. Also act as compiler barriers.
29
+ namespace Passenger {
30
+ namespace Apache2Module {
30
31
 
31
- #if defined(__GNUC__) || defined(__INTEL_COMPILER)
32
- #if defined(__i386__)
33
- #if defined(HAS_SSE2) || (defined(HAS_LFENCE) && defined(HAS_SFENCE))
34
- #define P_READ_BARRIER() \
35
- do { __asm__ __volatile__ ("lfence" ::: "memory"); } while (false)
36
- #define P_WRITE_BARRIER() \
37
- do { __asm__ __volatile__ ("sfence" ::: "memory"); } while (false)
38
- #else
39
- #define P_READ_BARRIER() \
40
- do { __asm__ __volatile__ ("" ::: "memory"); } while (false)
41
- #define P_WRITE_BARRIER() \
42
- do { __asm__ __volatile__ ("lock; addl $0,0(%%esp)" ::: "memory"); } while (false)
43
- #endif
44
32
 
45
- #elif defined(__x86_64__)
46
- #define P_READ_BARRIER() \
47
- do { __asm__ __volatile__ ("lfence" ::: "memory"); } while (false)
48
- #define P_WRITE_BARRIER() \
49
- do { __asm__ __volatile__ ("sfence" ::: "memory"); } while (false)
50
- #endif
51
- #endif
33
+ enum Threeway {
34
+ UNSET = -1,
35
+ DISABLED = 0,
36
+ ENABLED = 1
37
+ };
52
38
 
53
- #endif /* _PASSENGER_MEMORY_BARRIER_H_ */
39
+ #define UNSET_INT_VALUE INT_MIN
40
+
41
+
42
+ } // namespace Apache2Module
43
+ } // namespace Passenger
44
+
45
+ #endif /* _PASSENGER_APACHE2_MODULE_CONFIG_COMMON_H_ */
@@ -1,6 +1,6 @@
1
1
  /*
2
2
  * Phusion Passenger - https://www.phusionpassenger.com/
3
- * Copyright (c) 2010-2017 Phusion Holding B.V.
3
+ * Copyright (c) 2010-2018 Phusion Holding B.V.
4
4
  *
5
5
  * "Passenger", "Phusion Passenger" and "Union Station" are registered
6
6
  * trademarks of Phusion Holding B.V.
@@ -24,6 +24,15 @@
24
24
  * THE SOFTWARE.
25
25
  */
26
26
 
27
+ #ifndef _PASSENGER_APACHE2_MODULE_CONFIG_AUTOGENERATED_CREATE_FUNCTION_CPP_
28
+ #define _PASSENGER_APACHE2_MODULE_CONFIG_AUTOGENERATED_CREATE_FUNCTION_CPP_
29
+
30
+ #ifdef INTELLISENSE
31
+ // These includes do nothing, but keep IntelliSense happy.
32
+ #include <ap_config.h>
33
+ #include "../Config.h"
34
+ #endif
35
+
27
36
  /*
28
37
  * DirConfig/AutoGeneratedCreateFunction.cpp is automatically generated from DirConfig/AutoGeneratedCreateFunction.cpp.cxxcodebuilder,
29
38
  * using definitions from src/ruby_supportlib/phusion_passenger/apache2/config_options.rb.
@@ -182,3 +191,5 @@ createDirConfig_autoGenerated(DirConfig *config) {
182
191
 
183
192
  } // namespace Apache2Module
184
193
  } // namespace Passenger
194
+
195
+ #endif /* _PASSENGER_APACHE2_MODULE_CONFIG_AUTOGENERATED_CREATE_FUNCTION_CPP_ */
@@ -1,5 +1,5 @@
1
1
  # Phusion Passenger - https://www.phusionpassenger.com/
2
- # Copyright (c) 2010-2017 Phusion Holding B.V.
2
+ # Copyright (c) 2010-2018 Phusion Holding B.V.
3
3
  #
4
4
  # "Passenger", "Phusion Passenger" and "Union Station" are registered
5
5
  # trademarks of Phusion Holding B.V.
@@ -32,6 +32,19 @@ def main
32
32
 
33
33
  separator
34
34
 
35
+ add_code %Q{
36
+ #ifndef _PASSENGER_APACHE2_MODULE_CONFIG_AUTOGENERATED_CREATE_FUNCTION_CPP_
37
+ #define _PASSENGER_APACHE2_MODULE_CONFIG_AUTOGENERATED_CREATE_FUNCTION_CPP_
38
+
39
+ #ifdef INTELLISENSE
40
+ // These includes do nothing, but keep IntelliSense happy.
41
+ #include <ap_config.h>
42
+ #include "../Config.h"
43
+ #endif
44
+ }
45
+
46
+ separator
47
+
35
48
  comment %q{
36
49
  DirConfig/AutoGeneratedCreateFunction.cpp is automatically generated from DirConfig/AutoGeneratedCreateFunction.cpp.cxxcodebuilder,
37
50
  using definitions from src/ruby_supportlib/phusion_passenger/apache2/config_options.rb.
@@ -95,6 +108,8 @@ def main
95
108
  add_code %Q[
96
109
  } // namespace Apache2Module
97
110
  } // namespace Passenger
111
+
112
+ #endif /* _PASSENGER_APACHE2_MODULE_CONFIG_AUTOGENERATED_CREATE_FUNCTION_CPP_ */
98
113
  ]
99
114
  end
100
115
 
@@ -1,6 +1,6 @@
1
1
  /*
2
2
  * Phusion Passenger - https://www.phusionpassenger.com/
3
- * Copyright (c) 2010-2017 Phusion Holding B.V.
3
+ * Copyright (c) 2010-2018 Phusion Holding B.V.
4
4
  *
5
5
  * "Passenger", "Phusion Passenger" and "Union Station" are registered
6
6
  * trademarks of Phusion Holding B.V.
@@ -23,6 +23,18 @@
23
23
  * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
24
24
  * THE SOFTWARE.
25
25
  */
26
+ #ifndef _PASSENGER_APACHE2_MODULE_AUTOGENERATED_HEADER_SERIALIZATION_CPP_
27
+ #define _PASSENGER_APACHE2_MODULE_AUTOGENERATED_HEADER_SERIALIZATION_CPP_
28
+
29
+ #ifdef INTELLISENSE
30
+ // These includes do nothing, but keep IntelliSense happy.
31
+ #include <ap_config.h>
32
+ #include <string>
33
+ #include "../Config.h"
34
+ #endif
35
+
36
+ namespace Passenger {
37
+ namespace Apache2Module {
26
38
 
27
39
  /*
28
40
  * DirConfig/AutoGeneratedHeaderSerialization.cpp is automatically generated from
@@ -39,10 +51,7 @@
39
51
  */
40
52
 
41
53
  static void
42
- constructRequestHeaders_autoGenerated(request_rec *r, Passenger::Apache2Module::DirConfig *config, std::string &result) {
43
- using namespace Passenger;
44
- using namespace Passenger::Apache2Module;
45
-
54
+ constructRequestHeaders_autoGenerated(request_rec *r, DirConfig *config, std::string &result) {
46
55
  addHeader(result, StaticString("!~PASSENGER_APP_ENV",
47
56
  sizeof("!~PASSENGER_APP_ENV") - 1),
48
57
  config->mAppEnv);
@@ -114,3 +123,8 @@ constructRequestHeaders_autoGenerated(request_rec *r, Passenger::Apache2Module::
114
123
  config->mUser);
115
124
  }
116
125
 
126
+
127
+ } // namespace Apache2Module
128
+ } // namespace Passenger
129
+
130
+ #endif /* _PASSENGER_APACHE2_MODULE_AUTOGENERATED_HEADER_SERIALIZATION_CPP_ */
@@ -1,5 +1,5 @@
1
1
  # Phusion Passenger - https://www.phusionpassenger.com/
2
- # Copyright (c) 2010-2017 Phusion Holding B.V.
2
+ # Copyright (c) 2010-2018 Phusion Holding B.V.
3
3
  #
4
4
  # "Passenger", "Phusion Passenger" and "Union Station" are registered
5
5
  # trademarks of Phusion Holding B.V.
@@ -30,6 +30,21 @@ require 'phusion_passenger/apache2/config_options'
30
30
  def main
31
31
  comment copyright_header_for(__FILE__), 1
32
32
 
33
+ add_code %Q[
34
+ #ifndef _PASSENGER_APACHE2_MODULE_AUTOGENERATED_HEADER_SERIALIZATION_CPP_
35
+ #define _PASSENGER_APACHE2_MODULE_AUTOGENERATED_HEADER_SERIALIZATION_CPP_
36
+
37
+ #ifdef INTELLISENSE
38
+ // These includes do nothing, but keep IntelliSense happy.
39
+ #include <ap_config.h>
40
+ #include <string>
41
+ #include "../Config.h"
42
+ #endif
43
+
44
+ namespace Passenger {
45
+ namespace Apache2Module {
46
+ ]
47
+
33
48
  separator
34
49
 
35
50
  comment %q{
@@ -48,14 +63,7 @@ def main
48
63
 
49
64
  separator
50
65
 
51
- function 'static void constructRequestHeaders_autoGenerated(request_rec *r, Passenger::Apache2Module::DirConfig *config, std::string &result)' do
52
- add_code %Q{
53
- using namespace Passenger;
54
- using namespace Passenger::Apache2Module;
55
- }
56
-
57
- separator
58
-
66
+ function 'static void constructRequestHeaders_autoGenerated(request_rec *r, DirConfig *config, std::string &result)' do
59
67
  filter_eligible_options(APACHE2_CONFIGURATION_OPTIONS).each do |option|
60
68
  if option[:type] == :string || option[:type] == :flag
61
69
  add_code %Q{
@@ -74,6 +82,15 @@ def main
74
82
  end
75
83
  end
76
84
  end
85
+
86
+ separator
87
+
88
+ add_code %Q[
89
+ } // namespace Apache2Module
90
+ } // namespace Passenger
91
+
92
+ #endif /* _PASSENGER_APACHE2_MODULE_AUTOGENERATED_HEADER_SERIALIZATION_CPP_ */
93
+ ]
77
94
  end
78
95
 
79
96
  def filter_eligible_options(options)
@@ -1,6 +1,6 @@
1
1
  /*
2
2
  * Phusion Passenger - https://www.phusionpassenger.com/
3
- * Copyright (c) 2017 Phusion Holding B.V.
3
+ * Copyright (c) 2017-2018 Phusion Holding B.V.
4
4
  *
5
5
  * "Passenger", "Phusion Passenger" and "Union Station" are registered
6
6
  * trademarks of Phusion Holding B.V.
@@ -24,6 +24,11 @@
24
24
  * THE SOFTWARE.
25
25
  */
26
26
 
27
+ #ifdef INTELLISENSE
28
+ // This include does nothing, but keeps IntelliSense happy.
29
+ #include <ap_config.h>
30
+ #endif
31
+
27
32
  /*
28
33
  * DirConfig/AutoGeneratedManifestGeneration.cpp is automatically generated from DirConfig/AutoGeneratedManifestGeneration.cpp.cxxcodebuilder,
29
34
  * using definitions from src/ruby_supportlib/phusion_passenger/apache2/config_options.rb.
@@ -1,5 +1,5 @@
1
1
  # Phusion Passenger - https://www.phusionpassenger.com/
2
- # Copyright (c) 2017 Phusion Holding B.V.
2
+ # Copyright (c) 2017-2018 Phusion Holding B.V.
3
3
  #
4
4
  # "Passenger", "Phusion Passenger" and "Union Station" are registered
5
5
  # trademarks of Phusion Holding B.V.
@@ -32,6 +32,15 @@ def main
32
32
 
33
33
  separator
34
34
 
35
+ add_code %Q{
36
+ #ifdef INTELLISENSE
37
+ // This include does nothing, but keeps IntelliSense happy.
38
+ #include <ap_config.h>
39
+ #endif
40
+ }
41
+
42
+ separator
43
+
35
44
  comment %q{
36
45
  DirConfig/AutoGeneratedManifestGeneration.cpp is automatically generated from DirConfig/AutoGeneratedManifestGeneration.cpp.cxxcodebuilder,
37
46
  using definitions from src/ruby_supportlib/phusion_passenger/apache2/config_options.rb.
@@ -1,6 +1,6 @@
1
1
  /*
2
2
  * Phusion Passenger - https://www.phusionpassenger.com/
3
- * Copyright (c) 2010-2017 Phusion Holding B.V.
3
+ * Copyright (c) 2010-2018 Phusion Holding B.V.
4
4
  *
5
5
  * "Passenger", "Phusion Passenger" and "Union Station" are registered
6
6
  * trademarks of Phusion Holding B.V.
@@ -24,6 +24,12 @@
24
24
  * THE SOFTWARE.
25
25
  */
26
26
 
27
+ #ifdef INTELLISENSE
28
+ // These includes do nothing, but keep IntelliSense happy.
29
+ #include <ap_config.h>
30
+ #include "../Config.h"
31
+ #endif
32
+
27
33
  /*
28
34
  * DirConfig/AutoGeneratedMergeFunction.cpp is automatically generated from DirConfig/AutoGeneratedMergeFunction.cpp.cxxcodebuilder,
29
35
  * using definitions from src/ruby_supportlib/phusion_passenger/apache2/config_options.rb.