passenger 5.1.12 → 5.2.0

Sign up to get free protection for your applications and to get access to all the features.

Potentially problematic release.


This version of passenger might be problematic. Click here for more details.

Files changed (824) hide show
  1. checksums.yaml +4 -4
  2. data/CHANGELOG +18 -1
  3. data/Rakefile +4 -1
  4. data/build/agent.rb +2 -2
  5. data/build/apache2.rb +17 -10
  6. data/build/basics.rb +18 -4
  7. data/build/common_library.rb +7 -3
  8. data/build/cxx_tests.rb +2 -7
  9. data/build/misc.rb +3 -1
  10. data/build/nginx.rb +11 -5
  11. data/build/oxt_tests.rb +0 -3
  12. data/build/packaging.rb +3 -2
  13. data/build/schema_printer.rb +103 -0
  14. data/build/support/cplusplus.rb +2 -2
  15. data/build/support/cxx_dependency_map.rb +2575 -868
  16. data/dev/ci/lib/functions.sh +1 -1
  17. data/dev/ci/lib/set-container-envvars.sh +1 -1
  18. data/dev/ci/lib/setup-container.sh +1 -1
  19. data/dev/ci/run-tests-natively +1 -1
  20. data/dev/ci/run-tests-with-docker +1 -1
  21. data/dev/ci/scripts/debug-console-wrapper.sh +1 -1
  22. data/dev/ci/scripts/docker-entrypoint-stage2.sh +1 -1
  23. data/dev/ci/scripts/docker-entrypoint.sh +1 -1
  24. data/dev/ci/scripts/inituidgid +1 -1
  25. data/dev/ci/scripts/run-tests-natively-stage2.sh +1 -1
  26. data/dev/ci/scripts/setup-host-natively.sh +1 -1
  27. data/dev/ci/setup-host +1 -1
  28. data/dev/ci/tests/apache2/run +1 -1
  29. data/dev/ci/tests/apache2/setup +1 -1
  30. data/dev/ci/tests/cxx/run +1 -1
  31. data/dev/ci/tests/cxx/setup +1 -1
  32. data/dev/ci/tests/debian/Jenkinsfile +0 -1
  33. data/dev/ci/tests/debian/run +1 -1
  34. data/dev/ci/tests/nginx-dynamic/run +1 -1
  35. data/dev/ci/tests/nginx-dynamic/setup +1 -1
  36. data/dev/ci/tests/nginx/run +1 -1
  37. data/dev/ci/tests/nginx/setup +1 -1
  38. data/dev/ci/tests/nodejs/run +1 -1
  39. data/dev/ci/tests/nodejs/setup +1 -1
  40. data/dev/ci/tests/rpm/run +1 -1
  41. data/dev/ci/tests/ruby/run +1 -1
  42. data/dev/ci/tests/ruby/setup +1 -1
  43. data/dev/ci/tests/source-packaging/run +1 -1
  44. data/dev/ci/tests/source-packaging/setup +1 -1
  45. data/dev/ci/tests/standalone/run +1 -1
  46. data/dev/ci/tests/standalone/setup +1 -1
  47. data/dev/configkit-schemas/index.json +1708 -0
  48. data/dev/configkit-schemas/update_schema_inline_comments.rb +118 -0
  49. data/dev/copy_boost_headers +13 -1
  50. data/dev/index_cxx_dependencies.rb +20 -7
  51. data/dev/vagrant/provision.sh +1 -1
  52. data/resources/mime.types +1 -0
  53. data/resources/templates/standalone/http.erb +1 -6
  54. data/src/agent/Core/AdminPanelConnector.h +550 -0
  55. data/src/agent/Core/ApiServer.h +159 -97
  56. data/src/agent/Core/ApplicationPool/Group.h +2 -0
  57. data/src/agent/Core/ApplicationPool/Group/InternalUtils.cpp +3 -2
  58. data/src/agent/Core/ApplicationPool/Group/StateInspection.cpp +109 -0
  59. data/src/agent/Core/ApplicationPool/Implementation.cpp +5 -3
  60. data/src/agent/Core/ApplicationPool/Options.h +5 -6
  61. data/src/agent/Core/ApplicationPool/Pool.h +59 -2
  62. data/src/agent/Core/ApplicationPool/Pool/GeneralUtils.cpp +3 -3
  63. data/src/agent/Core/ApplicationPool/Pool/InitializationAndShutdown.cpp +2 -2
  64. data/src/agent/Core/ApplicationPool/Pool/Miscellaneous.cpp +6 -0
  65. data/src/agent/Core/ApplicationPool/Pool/StateInspection.cpp +129 -0
  66. data/src/agent/Core/Config.h +475 -0
  67. data/src/agent/Core/ConfigChange.cpp +349 -0
  68. data/src/agent/Core/ConfigChange.h +54 -0
  69. data/src/agent/Core/Controller.h +35 -3
  70. data/src/agent/Core/Controller/CheckoutSession.cpp +1 -1
  71. data/src/agent/Core/Controller/Config.cpp +0 -2
  72. data/src/agent/Core/Controller/Config.h +168 -104
  73. data/src/agent/Core/Controller/ForwardResponse.cpp +1 -1
  74. data/src/agent/Core/Controller/InitRequest.cpp +14 -15
  75. data/src/agent/Core/Controller/InitializationAndShutdown.cpp +34 -44
  76. data/src/agent/Core/Controller/Request.h +0 -1
  77. data/src/agent/Core/CoreMain.cpp +236 -349
  78. data/src/agent/Core/OptionParser.h +75 -89
  79. data/src/agent/Core/SecurityUpdateChecker.h +263 -100
  80. data/src/agent/Core/SpawningKit/Config.h +6 -2
  81. data/src/agent/Core/SpawningKit/Spawner.h +0 -45
  82. data/src/agent/Core/SpawningKit/UserSwitchingRules.h +1 -0
  83. data/src/agent/Shared/ApiAccountUtils.h +318 -0
  84. data/src/agent/Shared/ApiServerUtils.h +3 -104
  85. data/src/agent/Shared/Fundamentals/Initialization.cpp +81 -44
  86. data/src/agent/Shared/Fundamentals/Initialization.h +12 -7
  87. data/src/agent/TempDirToucher/TempDirToucherMain.cpp +21 -0
  88. data/src/agent/Watchdog/AgentWatcher.cpp +1 -1
  89. data/src/agent/Watchdog/ApiServer.h +100 -14
  90. data/src/agent/Watchdog/Config.h +340 -0
  91. data/src/agent/Watchdog/CoreWatcher.cpp +27 -13
  92. data/src/agent/Watchdog/InstanceDirToucher.cpp +1 -1
  93. data/src/agent/Watchdog/WatchdogMain.cpp +190 -206
  94. data/src/apache2_module/Bucket.cpp +4 -0
  95. data/src/apache2_module/Bucket.h +7 -3
  96. data/src/apache2_module/CBindings.cpp +49 -0
  97. data/src/apache2_module/Config.cpp +242 -0
  98. data/src/apache2_module/Config.h +109 -0
  99. data/src/apache2_module/ConfigGeneral/AutoGeneratedDefinitions.cpp +485 -0
  100. data/src/apache2_module/{ConfigurationCommands.cpp.cxxcodebuilder → ConfigGeneral/AutoGeneratedDefinitions.cpp.cxxcodebuilder} +29 -15
  101. data/src/apache2_module/ConfigGeneral/AutoGeneratedManifestDefaultsInitialization.cpp +298 -0
  102. data/src/apache2_module/ConfigGeneral/AutoGeneratedManifestDefaultsInitialization.cpp.cxxcodebuilder +171 -0
  103. data/src/apache2_module/ConfigGeneral/AutoGeneratedSetterFuncs.cpp +854 -0
  104. data/src/apache2_module/ConfigGeneral/AutoGeneratedSetterFuncs.cpp.cxxcodebuilder +188 -0
  105. data/src/apache2_module/ConfigGeneral/ManifestGeneration.h +610 -0
  106. data/src/apache2_module/ConfigGeneral/SetterFuncs.h +65 -0
  107. data/src/apache2_module/DirConfig/AutoGeneratedCreateFunction.cpp +174 -0
  108. data/src/apache2_module/{MergeDirConfig.cpp.cxxcodebuilder → DirConfig/AutoGeneratedCreateFunction.cpp.cxxcodebuilder} +54 -32
  109. data/src/apache2_module/DirConfig/AutoGeneratedHeaderSerialization.cpp +113 -0
  110. data/src/apache2_module/{SetHeaders.cpp.cxxcodebuilder → DirConfig/AutoGeneratedHeaderSerialization.cpp.cxxcodebuilder} +34 -23
  111. data/src/apache2_module/DirConfig/AutoGeneratedManifestGeneration.cpp +426 -0
  112. data/src/apache2_module/DirConfig/AutoGeneratedManifestGeneration.cpp.cxxcodebuilder +165 -0
  113. data/src/apache2_module/DirConfig/AutoGeneratedMergeFunction.cpp +269 -0
  114. data/src/apache2_module/DirConfig/AutoGeneratedMergeFunction.cpp.cxxcodebuilder +148 -0
  115. data/src/apache2_module/DirConfig/AutoGeneratedStruct.h +534 -0
  116. data/src/apache2_module/DirConfig/AutoGeneratedStruct.h.cxxcodebuilder +230 -0
  117. data/src/apache2_module/DirectoryMapper.h +19 -16
  118. data/src/apache2_module/Hooks.cpp +124 -138
  119. data/src/apache2_module/Hooks.h +9 -14
  120. data/src/apache2_module/ServerConfig/AutoGeneratedManifestGeneration.cpp +263 -0
  121. data/src/apache2_module/ServerConfig/AutoGeneratedManifestGeneration.cpp.cxxcodebuilder +152 -0
  122. data/src/apache2_module/ServerConfig/AutoGeneratedStruct.h +299 -0
  123. data/src/apache2_module/{ConfigurationFields.hpp.cxxcodebuilder → ServerConfig/AutoGeneratedStruct.h.cxxcodebuilder} +105 -18
  124. data/src/apache2_module/Utils.h +215 -0
  125. data/src/apache2_module/mod_passenger.c +16 -8
  126. data/src/cxx_supportlib/AppTypes.h +2 -0
  127. data/src/cxx_supportlib/ConfigKit/ConfigKit.h +1 -1
  128. data/src/cxx_supportlib/ConfigKit/DummyTranslator.h +8 -8
  129. data/src/cxx_supportlib/ConfigKit/IN_PRACTICE.md +7 -41
  130. data/src/cxx_supportlib/ConfigKit/PrefixTranslator.h +12 -66
  131. data/src/cxx_supportlib/ConfigKit/Schema.h +62 -11
  132. data/src/cxx_supportlib/ConfigKit/{ValidationUtils.h → SchemaUtils.h} +12 -3
  133. data/src/cxx_supportlib/ConfigKit/Store.h +17 -9
  134. data/src/cxx_supportlib/ConfigKit/SubComponentUtils.h +2 -1
  135. data/src/cxx_supportlib/ConfigKit/TableTranslator.h +13 -70
  136. data/src/cxx_supportlib/ConfigKit/Translator.h +125 -0
  137. data/src/cxx_supportlib/Constants.h +1 -3
  138. data/src/cxx_supportlib/FileTools/FileManip.cpp +297 -0
  139. data/src/cxx_supportlib/FileTools/FileManip.h +162 -0
  140. data/src/cxx_supportlib/{Utils → FileTools}/LargeFiles.cpp +6 -3
  141. data/src/cxx_supportlib/{Utils → FileTools}/LargeFiles.h +7 -5
  142. data/src/cxx_supportlib/FileTools/PathManip.cpp +240 -0
  143. data/src/cxx_supportlib/FileTools/PathManip.h +91 -0
  144. data/src/cxx_supportlib/FileTools/PathManipCBindings.cpp +62 -0
  145. data/src/{apache2_module/Configuration.h → cxx_supportlib/FileTools/PathManipCBindings.h} +12 -19
  146. data/src/cxx_supportlib/Hooks.h +19 -16
  147. data/src/cxx_supportlib/InstanceDirectory.h +11 -0
  148. data/src/cxx_supportlib/JsonTools/Autocast.h +79 -0
  149. data/src/cxx_supportlib/JsonTools/CBindings.cpp +364 -0
  150. data/src/cxx_supportlib/JsonTools/CBindings.h +101 -0
  151. data/src/cxx_supportlib/LoggingKit/Config.h +13 -0
  152. data/src/cxx_supportlib/LoggingKit/Context.h +5 -2
  153. data/src/cxx_supportlib/LoggingKit/Forward.h +0 -1
  154. data/src/cxx_supportlib/LoggingKit/Implementation.cpp +12 -4
  155. data/src/cxx_supportlib/ResourceLocator.h +15 -0
  156. data/src/cxx_supportlib/ServerKit/Config.h +156 -0
  157. data/src/cxx_supportlib/ServerKit/Context.h +59 -38
  158. data/src/cxx_supportlib/ServerKit/FileBufferedChannel.h +3 -2
  159. data/src/cxx_supportlib/ServerKit/HttpHeaderParser.h +2 -2
  160. data/src/cxx_supportlib/ServerKit/HttpServer.h +16 -2
  161. data/src/cxx_supportlib/ServerKit/Server.h +32 -15
  162. data/src/cxx_supportlib/Utils.cpp +0 -441
  163. data/src/cxx_supportlib/Utils.h +0 -158
  164. data/src/cxx_supportlib/Utils/Curl.h +1 -0
  165. data/src/cxx_supportlib/Utils/ProcessMetricsCollector.h +1 -0
  166. data/src/cxx_supportlib/Utils/StrIntUtilsNoStrictAliasing.cpp +2 -0
  167. data/src/cxx_supportlib/Utils/VariantMap.h +31 -0
  168. data/src/cxx_supportlib/WatchdogLauncher.cpp +7 -79
  169. data/src/cxx_supportlib/WatchdogLauncher.h +50 -53
  170. data/src/cxx_supportlib/WebSocketCommandReverseServer.h +981 -0
  171. data/src/cxx_supportlib/oxt/macros.hpp +9 -0
  172. data/src/cxx_supportlib/vendor-copy/websocketpp/COPYING +145 -0
  173. data/src/cxx_supportlib/vendor-copy/websocketpp/changelog.md +342 -0
  174. data/src/cxx_supportlib/vendor-copy/websocketpp/readme.md +49 -0
  175. data/src/cxx_supportlib/vendor-copy/websocketpp/websocketpp/base64/base64.hpp +178 -0
  176. data/src/cxx_supportlib/vendor-copy/websocketpp/websocketpp/client.hpp +33 -0
  177. data/src/cxx_supportlib/vendor-copy/websocketpp/websocketpp/close.hpp +342 -0
  178. data/src/cxx_supportlib/vendor-copy/websocketpp/websocketpp/common/asio.hpp +131 -0
  179. data/src/cxx_supportlib/vendor-copy/websocketpp/websocketpp/common/asio_ssl.hpp +39 -0
  180. data/src/cxx_supportlib/vendor-copy/websocketpp/websocketpp/common/chrono.hpp +68 -0
  181. data/src/cxx_supportlib/vendor-copy/websocketpp/websocketpp/common/connection_hdl.hpp +52 -0
  182. data/src/cxx_supportlib/vendor-copy/websocketpp/websocketpp/common/cpp11.hpp +162 -0
  183. data/src/cxx_supportlib/vendor-copy/websocketpp/websocketpp/common/functional.hpp +105 -0
  184. data/src/cxx_supportlib/vendor-copy/websocketpp/websocketpp/common/md5.hpp +448 -0
  185. data/src/cxx_supportlib/vendor-copy/websocketpp/websocketpp/common/memory.hpp +89 -0
  186. data/src/cxx_supportlib/vendor-copy/websocketpp/websocketpp/common/network.hpp +106 -0
  187. data/src/cxx_supportlib/vendor-copy/websocketpp/websocketpp/common/platforms.hpp +46 -0
  188. data/src/cxx_supportlib/vendor-copy/websocketpp/websocketpp/common/random.hpp +82 -0
  189. data/src/cxx_supportlib/vendor-copy/websocketpp/websocketpp/common/regex.hpp +59 -0
  190. data/src/cxx_supportlib/vendor-copy/websocketpp/websocketpp/common/stdint.hpp +73 -0
  191. data/src/cxx_supportlib/vendor-copy/websocketpp/websocketpp/common/system_error.hpp +84 -0
  192. data/src/cxx_supportlib/vendor-copy/websocketpp/websocketpp/common/thread.hpp +84 -0
  193. data/src/cxx_supportlib/vendor-copy/websocketpp/websocketpp/common/time.hpp +56 -0
  194. data/src/cxx_supportlib/vendor-copy/websocketpp/websocketpp/common/type_traits.hpp +65 -0
  195. data/src/cxx_supportlib/vendor-copy/websocketpp/websocketpp/concurrency/basic.hpp +46 -0
  196. data/src/cxx_supportlib/vendor-copy/websocketpp/websocketpp/concurrency/none.hpp +80 -0
  197. data/src/cxx_supportlib/vendor-copy/websocketpp/websocketpp/config/asio.hpp +77 -0
  198. data/src/cxx_supportlib/vendor-copy/websocketpp/websocketpp/config/asio_client.hpp +77 -0
  199. data/src/cxx_supportlib/vendor-copy/websocketpp/websocketpp/config/asio_no_tls.hpp +73 -0
  200. data/src/cxx_supportlib/vendor-copy/websocketpp/websocketpp/config/asio_no_tls_client.hpp +73 -0
  201. data/src/cxx_supportlib/vendor-copy/websocketpp/websocketpp/config/boost_config.hpp +72 -0
  202. data/src/cxx_supportlib/vendor-copy/websocketpp/websocketpp/config/core.hpp +285 -0
  203. data/src/cxx_supportlib/vendor-copy/websocketpp/websocketpp/config/core_client.hpp +294 -0
  204. data/src/cxx_supportlib/vendor-copy/websocketpp/websocketpp/config/debug.hpp +286 -0
  205. data/src/cxx_supportlib/vendor-copy/websocketpp/websocketpp/config/debug_asio.hpp +77 -0
  206. data/src/cxx_supportlib/vendor-copy/websocketpp/websocketpp/config/debug_asio_no_tls.hpp +73 -0
  207. data/src/cxx_supportlib/vendor-copy/websocketpp/websocketpp/config/minimal_client.hpp +72 -0
  208. data/src/cxx_supportlib/vendor-copy/websocketpp/websocketpp/config/minimal_server.hpp +312 -0
  209. data/src/cxx_supportlib/vendor-copy/websocketpp/websocketpp/connection.hpp +1651 -0
  210. data/src/cxx_supportlib/vendor-copy/websocketpp/websocketpp/connection_base.hpp +38 -0
  211. data/src/cxx_supportlib/vendor-copy/websocketpp/websocketpp/endpoint.hpp +700 -0
  212. data/src/cxx_supportlib/vendor-copy/websocketpp/websocketpp/endpoint_base.hpp +38 -0
  213. data/src/cxx_supportlib/vendor-copy/websocketpp/websocketpp/error.hpp +277 -0
  214. data/src/cxx_supportlib/vendor-copy/websocketpp/websocketpp/extensions/extension.hpp +102 -0
  215. data/src/cxx_supportlib/vendor-copy/websocketpp/websocketpp/extensions/permessage_deflate/disabled.hpp +128 -0
  216. data/src/cxx_supportlib/vendor-copy/websocketpp/websocketpp/extensions/permessage_deflate/enabled.hpp +752 -0
  217. data/src/cxx_supportlib/vendor-copy/websocketpp/websocketpp/frame.hpp +861 -0
  218. data/src/cxx_supportlib/vendor-copy/websocketpp/websocketpp/http/constants.hpp +308 -0
  219. data/src/cxx_supportlib/vendor-copy/websocketpp/websocketpp/http/impl/parser.hpp +196 -0
  220. data/src/cxx_supportlib/vendor-copy/websocketpp/websocketpp/http/impl/request.hpp +191 -0
  221. data/src/cxx_supportlib/vendor-copy/websocketpp/websocketpp/http/impl/response.hpp +266 -0
  222. data/src/cxx_supportlib/vendor-copy/websocketpp/websocketpp/http/parser.hpp +619 -0
  223. data/src/cxx_supportlib/vendor-copy/websocketpp/websocketpp/http/request.hpp +124 -0
  224. data/src/cxx_supportlib/vendor-copy/websocketpp/websocketpp/http/response.hpp +188 -0
  225. data/src/cxx_supportlib/vendor-copy/websocketpp/websocketpp/impl/connection_impl.hpp +2372 -0
  226. data/src/cxx_supportlib/vendor-copy/websocketpp/websocketpp/impl/endpoint_impl.hpp +269 -0
  227. data/src/cxx_supportlib/vendor-copy/websocketpp/websocketpp/impl/utilities_impl.hpp +87 -0
  228. data/src/cxx_supportlib/vendor-copy/websocketpp/websocketpp/logger/basic.hpp +199 -0
  229. data/src/cxx_supportlib/vendor-copy/websocketpp/websocketpp/logger/levels.hpp +203 -0
  230. data/src/cxx_supportlib/vendor-copy/websocketpp/websocketpp/logger/stub.hpp +119 -0
  231. data/src/cxx_supportlib/vendor-copy/websocketpp/websocketpp/logger/syslog.hpp +146 -0
  232. data/src/cxx_supportlib/vendor-copy/websocketpp/websocketpp/message_buffer/alloc.hpp +105 -0
  233. data/src/cxx_supportlib/vendor-copy/websocketpp/websocketpp/message_buffer/message.hpp +340 -0
  234. data/src/cxx_supportlib/vendor-copy/websocketpp/websocketpp/message_buffer/pool.hpp +229 -0
  235. data/src/cxx_supportlib/vendor-copy/websocketpp/websocketpp/processors/base.hpp +299 -0
  236. data/src/cxx_supportlib/vendor-copy/websocketpp/websocketpp/processors/hybi00.hpp +462 -0
  237. data/src/cxx_supportlib/vendor-copy/websocketpp/websocketpp/processors/hybi07.hpp +78 -0
  238. data/src/cxx_supportlib/vendor-copy/websocketpp/websocketpp/processors/hybi08.hpp +83 -0
  239. data/src/cxx_supportlib/vendor-copy/websocketpp/websocketpp/processors/hybi13.hpp +1056 -0
  240. data/src/cxx_supportlib/vendor-copy/websocketpp/websocketpp/processors/processor.hpp +407 -0
  241. data/src/cxx_supportlib/vendor-copy/websocketpp/websocketpp/random/none.hpp +60 -0
  242. data/src/cxx_supportlib/vendor-copy/websocketpp/websocketpp/random/random_device.hpp +80 -0
  243. data/src/cxx_supportlib/vendor-copy/websocketpp/websocketpp/roles/client_endpoint.hpp +173 -0
  244. data/src/cxx_supportlib/vendor-copy/websocketpp/websocketpp/roles/server_endpoint.hpp +190 -0
  245. data/src/cxx_supportlib/vendor-copy/websocketpp/websocketpp/server.hpp +33 -0
  246. data/src/cxx_supportlib/vendor-copy/websocketpp/websocketpp/sha1/sha1.hpp +189 -0
  247. data/src/cxx_supportlib/vendor-copy/websocketpp/websocketpp/transport/asio/base.hpp +232 -0
  248. data/src/cxx_supportlib/vendor-copy/websocketpp/websocketpp/transport/asio/connection.hpp +1204 -0
  249. data/src/cxx_supportlib/vendor-copy/websocketpp/websocketpp/transport/asio/endpoint.hpp +1147 -0
  250. data/src/cxx_supportlib/vendor-copy/websocketpp/websocketpp/transport/asio/security/base.hpp +159 -0
  251. data/src/cxx_supportlib/vendor-copy/websocketpp/websocketpp/transport/asio/security/none.hpp +370 -0
  252. data/src/cxx_supportlib/vendor-copy/websocketpp/websocketpp/transport/asio/security/tls.hpp +484 -0
  253. data/src/cxx_supportlib/vendor-copy/websocketpp/websocketpp/transport/base/connection.hpp +238 -0
  254. data/src/cxx_supportlib/vendor-copy/websocketpp/websocketpp/transport/base/endpoint.hpp +77 -0
  255. data/src/cxx_supportlib/vendor-copy/websocketpp/websocketpp/transport/debug/base.hpp +104 -0
  256. data/src/cxx_supportlib/vendor-copy/websocketpp/websocketpp/transport/debug/connection.hpp +412 -0
  257. data/src/cxx_supportlib/vendor-copy/websocketpp/websocketpp/transport/debug/endpoint.hpp +140 -0
  258. data/src/cxx_supportlib/vendor-copy/websocketpp/websocketpp/transport/iostream/base.hpp +133 -0
  259. data/src/cxx_supportlib/vendor-copy/websocketpp/websocketpp/transport/iostream/connection.hpp +714 -0
  260. data/src/cxx_supportlib/vendor-copy/websocketpp/websocketpp/transport/iostream/endpoint.hpp +222 -0
  261. data/src/cxx_supportlib/vendor-copy/websocketpp/websocketpp/transport/stub/base.hpp +95 -0
  262. data/src/cxx_supportlib/vendor-copy/websocketpp/websocketpp/transport/stub/connection.hpp +286 -0
  263. data/src/cxx_supportlib/vendor-copy/websocketpp/websocketpp/transport/stub/endpoint.hpp +140 -0
  264. data/src/cxx_supportlib/vendor-copy/websocketpp/websocketpp/uri.hpp +355 -0
  265. data/src/cxx_supportlib/vendor-copy/websocketpp/websocketpp/utf8_validator.hpp +154 -0
  266. data/src/cxx_supportlib/vendor-copy/websocketpp/websocketpp/utilities.hpp +182 -0
  267. data/src/cxx_supportlib/vendor-copy/websocketpp/websocketpp/version.hpp +61 -0
  268. data/src/cxx_supportlib/vendor-modified/boost/asio.hpp +121 -0
  269. data/src/cxx_supportlib/vendor-modified/boost/asio/async_result.hpp +96 -0
  270. data/src/cxx_supportlib/vendor-modified/boost/asio/basic_datagram_socket.hpp +951 -0
  271. data/src/cxx_supportlib/vendor-modified/boost/asio/basic_deadline_timer.hpp +520 -0
  272. data/src/cxx_supportlib/vendor-modified/boost/asio/basic_io_object.hpp +258 -0
  273. data/src/cxx_supportlib/vendor-modified/boost/asio/basic_raw_socket.hpp +942 -0
  274. data/src/cxx_supportlib/vendor-modified/boost/asio/basic_seq_packet_socket.hpp +567 -0
  275. data/src/cxx_supportlib/vendor-modified/boost/asio/basic_serial_port.hpp +697 -0
  276. data/src/cxx_supportlib/vendor-modified/boost/asio/basic_signal_set.hpp +386 -0
  277. data/src/cxx_supportlib/vendor-modified/boost/asio/basic_socket.hpp +1519 -0
  278. data/src/cxx_supportlib/vendor-modified/boost/asio/basic_socket_acceptor.hpp +1137 -0
  279. data/src/cxx_supportlib/vendor-modified/boost/asio/basic_socket_iostream.hpp +288 -0
  280. data/src/cxx_supportlib/vendor-modified/boost/asio/basic_socket_streambuf.hpp +569 -0
  281. data/src/cxx_supportlib/vendor-modified/boost/asio/basic_stream_socket.hpp +854 -0
  282. data/src/cxx_supportlib/vendor-modified/boost/asio/basic_streambuf.hpp +371 -0
  283. data/src/cxx_supportlib/vendor-modified/boost/asio/basic_streambuf_fwd.hpp +35 -0
  284. data/src/cxx_supportlib/vendor-modified/boost/asio/basic_waitable_timer.hpp +521 -0
  285. data/src/cxx_supportlib/vendor-modified/boost/asio/buffer.hpp +2241 -0
  286. data/src/cxx_supportlib/vendor-modified/boost/asio/buffered_read_stream.hpp +246 -0
  287. data/src/cxx_supportlib/vendor-modified/boost/asio/buffered_read_stream_fwd.hpp +27 -0
  288. data/src/cxx_supportlib/vendor-modified/boost/asio/buffered_stream.hpp +260 -0
  289. data/src/cxx_supportlib/vendor-modified/boost/asio/buffered_stream_fwd.hpp +27 -0
  290. data/src/cxx_supportlib/vendor-modified/boost/asio/buffered_write_stream.hpp +238 -0
  291. data/src/cxx_supportlib/vendor-modified/boost/asio/buffered_write_stream_fwd.hpp +27 -0
  292. data/src/cxx_supportlib/vendor-modified/boost/asio/buffers_iterator.hpp +483 -0
  293. data/src/cxx_supportlib/vendor-modified/boost/asio/completion_condition.hpp +220 -0
  294. data/src/cxx_supportlib/vendor-modified/boost/asio/connect.hpp +825 -0
  295. data/src/cxx_supportlib/vendor-modified/boost/asio/coroutine.hpp +330 -0
  296. data/src/cxx_supportlib/vendor-modified/boost/asio/datagram_socket_service.hpp +438 -0
  297. data/src/cxx_supportlib/vendor-modified/boost/asio/deadline_timer.hpp +40 -0
  298. data/src/cxx_supportlib/vendor-modified/boost/asio/deadline_timer_service.hpp +173 -0
  299. data/src/cxx_supportlib/vendor-modified/boost/asio/detail/addressof.hpp +40 -0
  300. data/src/cxx_supportlib/vendor-modified/boost/asio/detail/array.hpp +40 -0
  301. data/src/cxx_supportlib/vendor-modified/boost/asio/detail/array_fwd.hpp +34 -0
  302. data/src/cxx_supportlib/vendor-modified/boost/asio/detail/assert.hpp +32 -0
  303. data/src/cxx_supportlib/vendor-modified/boost/asio/detail/atomic_count.hpp +47 -0
  304. data/src/cxx_supportlib/vendor-modified/boost/asio/detail/base_from_completion_cond.hpp +70 -0
  305. data/src/cxx_supportlib/vendor-modified/boost/asio/detail/bind_handler.hpp +491 -0
  306. data/src/cxx_supportlib/vendor-modified/boost/asio/detail/buffer_resize_guard.hpp +68 -0
  307. data/src/cxx_supportlib/vendor-modified/boost/asio/detail/buffer_sequence_adapter.hpp +385 -0
  308. data/src/cxx_supportlib/vendor-modified/boost/asio/detail/buffered_stream_storage.hpp +128 -0
  309. data/src/cxx_supportlib/vendor-modified/boost/asio/detail/call_stack.hpp +127 -0
  310. data/src/cxx_supportlib/vendor-modified/boost/asio/detail/chrono_time_traits.hpp +192 -0
  311. data/src/cxx_supportlib/vendor-modified/boost/asio/detail/completion_handler.hpp +83 -0
  312. data/src/cxx_supportlib/vendor-modified/boost/asio/detail/config.hpp +1050 -0
  313. data/src/cxx_supportlib/vendor-modified/boost/asio/detail/consuming_buffers.hpp +294 -0
  314. data/src/cxx_supportlib/vendor-modified/boost/asio/detail/cstdint.hpp +48 -0
  315. data/src/cxx_supportlib/vendor-modified/boost/asio/detail/date_time_fwd.hpp +34 -0
  316. data/src/cxx_supportlib/vendor-modified/boost/asio/detail/deadline_timer_service.hpp +229 -0
  317. data/src/cxx_supportlib/vendor-modified/boost/asio/detail/dependent_type.hpp +38 -0
  318. data/src/cxx_supportlib/vendor-modified/boost/asio/detail/descriptor_ops.hpp +119 -0
  319. data/src/cxx_supportlib/vendor-modified/boost/asio/detail/descriptor_read_op.hpp +121 -0
  320. data/src/cxx_supportlib/vendor-modified/boost/asio/detail/descriptor_write_op.hpp +121 -0
  321. data/src/cxx_supportlib/vendor-modified/boost/asio/detail/dev_poll_reactor.hpp +208 -0
  322. data/src/cxx_supportlib/vendor-modified/boost/asio/detail/epoll_reactor.hpp +244 -0
  323. data/src/cxx_supportlib/vendor-modified/boost/asio/detail/event.hpp +50 -0
  324. data/src/cxx_supportlib/vendor-modified/boost/asio/detail/eventfd_select_interrupter.hpp +85 -0
  325. data/src/cxx_supportlib/vendor-modified/boost/asio/detail/fd_set_adapter.hpp +41 -0
  326. data/src/cxx_supportlib/vendor-modified/boost/asio/detail/fenced_block.hpp +82 -0
  327. data/src/cxx_supportlib/vendor-modified/boost/asio/detail/function.hpp +40 -0
  328. data/src/cxx_supportlib/vendor-modified/boost/asio/detail/gcc_arm_fenced_block.hpp +91 -0
  329. data/src/cxx_supportlib/vendor-modified/boost/asio/detail/gcc_hppa_fenced_block.hpp +68 -0
  330. data/src/cxx_supportlib/vendor-modified/boost/asio/detail/gcc_sync_fenced_block.hpp +65 -0
  331. data/src/cxx_supportlib/vendor-modified/boost/asio/detail/gcc_x86_fenced_block.hpp +99 -0
  332. data/src/cxx_supportlib/vendor-modified/boost/asio/detail/handler_alloc_helpers.hpp +82 -0
  333. data/src/cxx_supportlib/vendor-modified/boost/asio/detail/handler_cont_helpers.hpp +45 -0
  334. data/src/cxx_supportlib/vendor-modified/boost/asio/detail/handler_invoke_helpers.hpp +57 -0
  335. data/src/cxx_supportlib/vendor-modified/boost/asio/detail/handler_tracking.hpp +161 -0
  336. data/src/cxx_supportlib/vendor-modified/boost/asio/detail/handler_type_requirements.hpp +480 -0
  337. data/src/cxx_supportlib/vendor-modified/boost/asio/detail/hash_map.hpp +333 -0
  338. data/src/cxx_supportlib/vendor-modified/boost/asio/detail/impl/buffer_sequence_adapter.ipp +120 -0
  339. data/src/cxx_supportlib/vendor-modified/boost/asio/detail/impl/descriptor_ops.ipp +453 -0
  340. data/src/cxx_supportlib/vendor-modified/boost/asio/detail/impl/dev_poll_reactor.hpp +80 -0
  341. data/src/cxx_supportlib/vendor-modified/boost/asio/detail/impl/dev_poll_reactor.ipp +432 -0
  342. data/src/cxx_supportlib/vendor-modified/boost/asio/detail/impl/epoll_reactor.hpp +78 -0
  343. data/src/cxx_supportlib/vendor-modified/boost/asio/detail/impl/epoll_reactor.ipp +688 -0
  344. data/src/cxx_supportlib/vendor-modified/boost/asio/detail/impl/eventfd_select_interrupter.ipp +167 -0
  345. data/src/cxx_supportlib/vendor-modified/boost/asio/detail/impl/handler_tracking.ipp +307 -0
  346. data/src/cxx_supportlib/vendor-modified/boost/asio/detail/impl/kqueue_reactor.hpp +82 -0
  347. data/src/cxx_supportlib/vendor-modified/boost/asio/detail/impl/kqueue_reactor.ipp +498 -0
  348. data/src/cxx_supportlib/vendor-modified/boost/asio/detail/impl/pipe_select_interrupter.ipp +126 -0
  349. data/src/cxx_supportlib/vendor-modified/boost/asio/detail/impl/posix_event.ipp +49 -0
  350. data/src/cxx_supportlib/vendor-modified/boost/asio/detail/impl/posix_mutex.ipp +48 -0
  351. data/src/cxx_supportlib/vendor-modified/boost/asio/detail/impl/posix_thread.ipp +76 -0
  352. data/src/cxx_supportlib/vendor-modified/boost/asio/detail/impl/posix_tss_ptr.ipp +48 -0
  353. data/src/cxx_supportlib/vendor-modified/boost/asio/detail/impl/reactive_descriptor_service.ipp +210 -0
  354. data/src/cxx_supportlib/vendor-modified/boost/asio/detail/impl/reactive_serial_port_service.ipp +153 -0
  355. data/src/cxx_supportlib/vendor-modified/boost/asio/detail/impl/reactive_socket_service_base.ipp +269 -0
  356. data/src/cxx_supportlib/vendor-modified/boost/asio/detail/impl/resolver_service_base.ipp +132 -0
  357. data/src/cxx_supportlib/vendor-modified/boost/asio/detail/impl/select_reactor.hpp +89 -0
  358. data/src/cxx_supportlib/vendor-modified/boost/asio/detail/impl/select_reactor.ipp +315 -0
  359. data/src/cxx_supportlib/vendor-modified/boost/asio/detail/impl/service_registry.hpp +90 -0
  360. data/src/cxx_supportlib/vendor-modified/boost/asio/detail/impl/service_registry.ipp +190 -0
  361. data/src/cxx_supportlib/vendor-modified/boost/asio/detail/impl/signal_set_service.ipp +649 -0
  362. data/src/cxx_supportlib/vendor-modified/boost/asio/detail/impl/socket_ops.ipp +3470 -0
  363. data/src/cxx_supportlib/vendor-modified/boost/asio/detail/impl/socket_select_interrupter.ipp +178 -0
  364. data/src/cxx_supportlib/vendor-modified/boost/asio/detail/impl/strand_service.hpp +120 -0
  365. data/src/cxx_supportlib/vendor-modified/boost/asio/detail/impl/strand_service.ipp +178 -0
  366. data/src/cxx_supportlib/vendor-modified/boost/asio/detail/impl/task_io_service.hpp +80 -0
  367. data/src/cxx_supportlib/vendor-modified/boost/asio/detail/impl/task_io_service.ipp +476 -0
  368. data/src/cxx_supportlib/vendor-modified/boost/asio/detail/impl/throw_error.ipp +47 -0
  369. data/src/cxx_supportlib/vendor-modified/boost/asio/detail/impl/timer_queue_ptime.ipp +86 -0
  370. data/src/cxx_supportlib/vendor-modified/boost/asio/detail/impl/timer_queue_set.ipp +103 -0
  371. data/src/cxx_supportlib/vendor-modified/boost/asio/detail/io_control.hpp +136 -0
  372. data/src/cxx_supportlib/vendor-modified/boost/asio/detail/keyword_tss_ptr.hpp +72 -0
  373. data/src/cxx_supportlib/vendor-modified/boost/asio/detail/kqueue_reactor.hpp +222 -0
  374. data/src/cxx_supportlib/vendor-modified/boost/asio/detail/limits.hpp +26 -0
  375. data/src/cxx_supportlib/vendor-modified/boost/asio/detail/local_free_on_block_exit.hpp +61 -0
  376. data/src/cxx_supportlib/vendor-modified/boost/asio/detail/macos_fenced_block.hpp +63 -0
  377. data/src/cxx_supportlib/vendor-modified/boost/asio/detail/memory.hpp +31 -0
  378. data/src/cxx_supportlib/vendor-modified/boost/asio/detail/mutex.hpp +50 -0
  379. data/src/cxx_supportlib/vendor-modified/boost/asio/detail/noncopyable.hpp +45 -0
  380. data/src/cxx_supportlib/vendor-modified/boost/asio/detail/null_event.hpp +90 -0
  381. data/src/cxx_supportlib/vendor-modified/boost/asio/detail/null_fenced_block.hpp +47 -0
  382. data/src/cxx_supportlib/vendor-modified/boost/asio/detail/null_mutex.hpp +66 -0
  383. data/src/cxx_supportlib/vendor-modified/boost/asio/detail/null_reactor.hpp +69 -0
  384. data/src/cxx_supportlib/vendor-modified/boost/asio/detail/null_signal_blocker.hpp +71 -0
  385. data/src/cxx_supportlib/vendor-modified/boost/asio/detail/null_socket_service.hpp +500 -0
  386. data/src/cxx_supportlib/vendor-modified/boost/asio/detail/null_static_mutex.hpp +62 -0
  387. data/src/cxx_supportlib/vendor-modified/boost/asio/detail/null_thread.hpp +63 -0
  388. data/src/cxx_supportlib/vendor-modified/boost/asio/detail/null_tss_ptr.hpp +70 -0
  389. data/src/cxx_supportlib/vendor-modified/boost/asio/detail/object_pool.hpp +148 -0
  390. data/src/cxx_supportlib/vendor-modified/boost/asio/detail/old_win_sdk_compat.hpp +216 -0
  391. data/src/cxx_supportlib/vendor-modified/boost/asio/detail/op_queue.hpp +158 -0
  392. data/src/cxx_supportlib/vendor-modified/boost/asio/detail/operation.hpp +40 -0
  393. data/src/cxx_supportlib/vendor-modified/boost/asio/detail/pipe_select_interrupter.hpp +91 -0
  394. data/src/cxx_supportlib/vendor-modified/boost/asio/detail/pop_options.hpp +131 -0
  395. data/src/cxx_supportlib/vendor-modified/boost/asio/detail/posix_event.hpp +128 -0
  396. data/src/cxx_supportlib/vendor-modified/boost/asio/detail/posix_fd_set_adapter.hpp +120 -0
  397. data/src/cxx_supportlib/vendor-modified/boost/asio/detail/posix_mutex.hpp +78 -0
  398. data/src/cxx_supportlib/vendor-modified/boost/asio/detail/posix_signal_blocker.hpp +87 -0
  399. data/src/cxx_supportlib/vendor-modified/boost/asio/detail/posix_static_mutex.hpp +66 -0
  400. data/src/cxx_supportlib/vendor-modified/boost/asio/detail/posix_thread.hpp +107 -0
  401. data/src/cxx_supportlib/vendor-modified/boost/asio/detail/posix_tss_ptr.hpp +81 -0
  402. data/src/cxx_supportlib/vendor-modified/boost/asio/detail/push_options.hpp +166 -0
  403. data/src/cxx_supportlib/vendor-modified/boost/asio/detail/reactive_descriptor_service.hpp +324 -0
  404. data/src/cxx_supportlib/vendor-modified/boost/asio/detail/reactive_null_buffers_op.hpp +90 -0
  405. data/src/cxx_supportlib/vendor-modified/boost/asio/detail/reactive_serial_port_service.hpp +236 -0
  406. data/src/cxx_supportlib/vendor-modified/boost/asio/detail/reactive_socket_accept_op.hpp +138 -0
  407. data/src/cxx_supportlib/vendor-modified/boost/asio/detail/reactive_socket_connect_op.hpp +108 -0
  408. data/src/cxx_supportlib/vendor-modified/boost/asio/detail/reactive_socket_recv_op.hpp +125 -0
  409. data/src/cxx_supportlib/vendor-modified/boost/asio/detail/reactive_socket_recvfrom_op.hpp +135 -0
  410. data/src/cxx_supportlib/vendor-modified/boost/asio/detail/reactive_socket_recvmsg_op.hpp +127 -0
  411. data/src/cxx_supportlib/vendor-modified/boost/asio/detail/reactive_socket_send_op.hpp +122 -0
  412. data/src/cxx_supportlib/vendor-modified/boost/asio/detail/reactive_socket_sendto_op.hpp +125 -0
  413. data/src/cxx_supportlib/vendor-modified/boost/asio/detail/reactive_socket_service.hpp +460 -0
  414. data/src/cxx_supportlib/vendor-modified/boost/asio/detail/reactive_socket_service_base.hpp +452 -0
  415. data/src/cxx_supportlib/vendor-modified/boost/asio/detail/reactor.hpp +32 -0
  416. data/src/cxx_supportlib/vendor-modified/boost/asio/detail/reactor_fwd.hpp +42 -0
  417. data/src/cxx_supportlib/vendor-modified/boost/asio/detail/reactor_op.hpp +63 -0
  418. data/src/cxx_supportlib/vendor-modified/boost/asio/detail/reactor_op_queue.hpp +170 -0
  419. data/src/cxx_supportlib/vendor-modified/boost/asio/detail/regex_fwd.hpp +35 -0
  420. data/src/cxx_supportlib/vendor-modified/boost/asio/detail/resolve_endpoint_op.hpp +123 -0
  421. data/src/cxx_supportlib/vendor-modified/boost/asio/detail/resolve_op.hpp +133 -0
  422. data/src/cxx_supportlib/vendor-modified/boost/asio/detail/resolver_service.hpp +131 -0
  423. data/src/cxx_supportlib/vendor-modified/boost/asio/detail/resolver_service_base.hpp +131 -0
  424. data/src/cxx_supportlib/vendor-modified/boost/asio/detail/scoped_lock.hpp +103 -0
  425. data/src/cxx_supportlib/vendor-modified/boost/asio/detail/scoped_ptr.hpp +81 -0
  426. data/src/cxx_supportlib/vendor-modified/boost/asio/detail/select_interrupter.hpp +48 -0
  427. data/src/cxx_supportlib/vendor-modified/boost/asio/detail/select_reactor.hpp +221 -0
  428. data/src/cxx_supportlib/vendor-modified/boost/asio/detail/service_registry.hpp +146 -0
  429. data/src/cxx_supportlib/vendor-modified/boost/asio/detail/shared_ptr.hpp +40 -0
  430. data/src/cxx_supportlib/vendor-modified/boost/asio/detail/signal_blocker.hpp +46 -0
  431. data/src/cxx_supportlib/vendor-modified/boost/asio/detail/signal_handler.hpp +84 -0
  432. data/src/cxx_supportlib/vendor-modified/boost/asio/detail/signal_init.hpp +49 -0
  433. data/src/cxx_supportlib/vendor-modified/boost/asio/detail/signal_op.hpp +51 -0
  434. data/src/cxx_supportlib/vendor-modified/boost/asio/detail/signal_set_service.hpp +218 -0
  435. data/src/cxx_supportlib/vendor-modified/boost/asio/detail/socket_holder.hpp +100 -0
  436. data/src/cxx_supportlib/vendor-modified/boost/asio/detail/socket_ops.hpp +336 -0
  437. data/src/cxx_supportlib/vendor-modified/boost/asio/detail/socket_option.hpp +318 -0
  438. data/src/cxx_supportlib/vendor-modified/boost/asio/detail/socket_select_interrupter.hpp +93 -0
  439. data/src/cxx_supportlib/vendor-modified/boost/asio/detail/socket_types.hpp +410 -0
  440. data/src/cxx_supportlib/vendor-modified/boost/asio/detail/solaris_fenced_block.hpp +63 -0
  441. data/src/cxx_supportlib/vendor-modified/boost/asio/detail/static_mutex.hpp +54 -0
  442. data/src/cxx_supportlib/vendor-modified/boost/asio/detail/std_event.hpp +178 -0
  443. data/src/cxx_supportlib/vendor-modified/boost/asio/detail/std_fenced_block.hpp +64 -0
  444. data/src/cxx_supportlib/vendor-modified/boost/asio/detail/std_mutex.hpp +75 -0
  445. data/src/cxx_supportlib/vendor-modified/boost/asio/detail/std_static_mutex.hpp +83 -0
  446. data/src/cxx_supportlib/vendor-modified/boost/asio/detail/std_thread.hpp +67 -0
  447. data/src/cxx_supportlib/vendor-modified/boost/asio/detail/strand_service.hpp +144 -0
  448. data/src/cxx_supportlib/vendor-modified/boost/asio/detail/task_io_service.hpp +203 -0
  449. data/src/cxx_supportlib/vendor-modified/boost/asio/detail/task_io_service_operation.hpp +78 -0
  450. data/src/cxx_supportlib/vendor-modified/boost/asio/detail/task_io_service_thread_info.hpp +42 -0
  451. data/src/cxx_supportlib/vendor-modified/boost/asio/detail/thread.hpp +58 -0
  452. data/src/cxx_supportlib/vendor-modified/boost/asio/detail/thread_info_base.hpp +93 -0
  453. data/src/cxx_supportlib/vendor-modified/boost/asio/detail/throw_error.hpp +55 -0
  454. data/src/cxx_supportlib/vendor-modified/boost/asio/detail/throw_exception.hpp +53 -0
  455. data/src/cxx_supportlib/vendor-modified/boost/asio/detail/timer_queue.hpp +333 -0
  456. data/src/cxx_supportlib/vendor-modified/boost/asio/detail/timer_queue_base.hpp +70 -0
  457. data/src/cxx_supportlib/vendor-modified/boost/asio/detail/timer_queue_ptime.hpp +95 -0
  458. data/src/cxx_supportlib/vendor-modified/boost/asio/detail/timer_queue_set.hpp +68 -0
  459. data/src/cxx_supportlib/vendor-modified/boost/asio/detail/timer_scheduler.hpp +35 -0
  460. data/src/cxx_supportlib/vendor-modified/boost/asio/detail/timer_scheduler_fwd.hpp +42 -0
  461. data/src/cxx_supportlib/vendor-modified/boost/asio/detail/tss_ptr.hpp +71 -0
  462. data/src/cxx_supportlib/vendor-modified/boost/asio/detail/type_traits.hpp +60 -0
  463. data/src/cxx_supportlib/vendor-modified/boost/asio/detail/variadic_templates.hpp +63 -0
  464. data/src/cxx_supportlib/vendor-modified/boost/asio/detail/wait_handler.hpp +85 -0
  465. data/src/cxx_supportlib/vendor-modified/boost/asio/detail/wait_op.hpp +47 -0
  466. data/src/cxx_supportlib/vendor-modified/boost/asio/detail/weak_ptr.hpp +40 -0
  467. data/src/cxx_supportlib/vendor-modified/boost/asio/detail/win_iocp_serial_port_service.hpp +230 -0
  468. data/src/cxx_supportlib/vendor-modified/boost/asio/detail/winsock_init.hpp +130 -0
  469. data/src/cxx_supportlib/vendor-modified/boost/asio/detail/wrapped_handler.hpp +293 -0
  470. data/src/cxx_supportlib/vendor-modified/boost/asio/error.hpp +345 -0
  471. data/src/cxx_supportlib/vendor-modified/boost/asio/generic/basic_endpoint.hpp +195 -0
  472. data/src/cxx_supportlib/vendor-modified/boost/asio/generic/datagram_protocol.hpp +125 -0
  473. data/src/cxx_supportlib/vendor-modified/boost/asio/generic/detail/endpoint.hpp +135 -0
  474. data/src/cxx_supportlib/vendor-modified/boost/asio/generic/detail/impl/endpoint.ipp +111 -0
  475. data/src/cxx_supportlib/vendor-modified/boost/asio/generic/raw_protocol.hpp +123 -0
  476. data/src/cxx_supportlib/vendor-modified/boost/asio/generic/seq_packet_protocol.hpp +124 -0
  477. data/src/cxx_supportlib/vendor-modified/boost/asio/generic/stream_protocol.hpp +129 -0
  478. data/src/cxx_supportlib/vendor-modified/boost/asio/handler_alloc_hook.hpp +83 -0
  479. data/src/cxx_supportlib/vendor-modified/boost/asio/handler_continuation_hook.hpp +56 -0
  480. data/src/cxx_supportlib/vendor-modified/boost/asio/handler_invoke_hook.hpp +87 -0
  481. data/src/cxx_supportlib/vendor-modified/boost/asio/handler_type.hpp +114 -0
  482. data/src/cxx_supportlib/vendor-modified/boost/asio/high_resolution_timer.hpp +65 -0
  483. data/src/cxx_supportlib/vendor-modified/boost/asio/impl/buffered_read_stream.hpp +360 -0
  484. data/src/cxx_supportlib/vendor-modified/boost/asio/impl/buffered_write_stream.hpp +340 -0
  485. data/src/cxx_supportlib/vendor-modified/boost/asio/impl/connect.hpp +432 -0
  486. data/src/cxx_supportlib/vendor-modified/boost/asio/impl/error.ipp +130 -0
  487. data/src/cxx_supportlib/vendor-modified/boost/asio/impl/handler_alloc_hook.ipp +79 -0
  488. data/src/cxx_supportlib/vendor-modified/boost/asio/impl/io_service.hpp +156 -0
  489. data/src/cxx_supportlib/vendor-modified/boost/asio/impl/io_service.ipp +157 -0
  490. data/src/cxx_supportlib/vendor-modified/boost/asio/impl/read.hpp +755 -0
  491. data/src/cxx_supportlib/vendor-modified/boost/asio/impl/read_at.hpp +812 -0
  492. data/src/cxx_supportlib/vendor-modified/boost/asio/impl/read_until.hpp +1149 -0
  493. data/src/cxx_supportlib/vendor-modified/boost/asio/impl/serial_port_base.hpp +61 -0
  494. data/src/cxx_supportlib/vendor-modified/boost/asio/impl/serial_port_base.ipp +556 -0
  495. data/src/cxx_supportlib/vendor-modified/boost/asio/impl/spawn.hpp +355 -0
  496. data/src/cxx_supportlib/vendor-modified/boost/asio/impl/src.cpp +25 -0
  497. data/src/cxx_supportlib/vendor-modified/boost/asio/impl/src.hpp +73 -0
  498. data/src/cxx_supportlib/vendor-modified/boost/asio/impl/use_future.hpp +179 -0
  499. data/src/cxx_supportlib/vendor-modified/boost/asio/impl/write.hpp +767 -0
  500. data/src/cxx_supportlib/vendor-modified/boost/asio/impl/write_at.hpp +827 -0
  501. data/src/cxx_supportlib/vendor-modified/boost/asio/io_service.hpp +772 -0
  502. data/src/cxx_supportlib/vendor-modified/boost/asio/ip/address.hpp +202 -0
  503. data/src/cxx_supportlib/vendor-modified/boost/asio/ip/address_v4.hpp +243 -0
  504. data/src/cxx_supportlib/vendor-modified/boost/asio/ip/address_v6.hpp +248 -0
  505. data/src/cxx_supportlib/vendor-modified/boost/asio/ip/basic_endpoint.hpp +265 -0
  506. data/src/cxx_supportlib/vendor-modified/boost/asio/ip/basic_resolver.hpp +270 -0
  507. data/src/cxx_supportlib/vendor-modified/boost/asio/ip/basic_resolver_entry.hpp +96 -0
  508. data/src/cxx_supportlib/vendor-modified/boost/asio/ip/basic_resolver_iterator.hpp +262 -0
  509. data/src/cxx_supportlib/vendor-modified/boost/asio/ip/basic_resolver_query.hpp +246 -0
  510. data/src/cxx_supportlib/vendor-modified/boost/asio/ip/detail/endpoint.hpp +141 -0
  511. data/src/cxx_supportlib/vendor-modified/boost/asio/ip/detail/impl/endpoint.ipp +206 -0
  512. data/src/cxx_supportlib/vendor-modified/boost/asio/ip/detail/socket_option.hpp +571 -0
  513. data/src/cxx_supportlib/vendor-modified/boost/asio/ip/host_name.hpp +44 -0
  514. data/src/cxx_supportlib/vendor-modified/boost/asio/ip/icmp.hpp +117 -0
  515. data/src/cxx_supportlib/vendor-modified/boost/asio/ip/impl/address.hpp +55 -0
  516. data/src/cxx_supportlib/vendor-modified/boost/asio/ip/impl/address.ipp +228 -0
  517. data/src/cxx_supportlib/vendor-modified/boost/asio/ip/impl/address_v4.hpp +55 -0
  518. data/src/cxx_supportlib/vendor-modified/boost/asio/ip/impl/address_v4.ipp +180 -0
  519. data/src/cxx_supportlib/vendor-modified/boost/asio/ip/impl/address_v6.hpp +55 -0
  520. data/src/cxx_supportlib/vendor-modified/boost/asio/ip/impl/address_v6.ipp +300 -0
  521. data/src/cxx_supportlib/vendor-modified/boost/asio/ip/impl/basic_endpoint.hpp +57 -0
  522. data/src/cxx_supportlib/vendor-modified/boost/asio/ip/impl/host_name.ipp +56 -0
  523. data/src/cxx_supportlib/vendor-modified/boost/asio/ip/multicast.hpp +193 -0
  524. data/src/cxx_supportlib/vendor-modified/boost/asio/ip/resolver_query_base.hpp +132 -0
  525. data/src/cxx_supportlib/vendor-modified/boost/asio/ip/resolver_service.hpp +178 -0
  526. data/src/cxx_supportlib/vendor-modified/boost/asio/ip/tcp.hpp +157 -0
  527. data/src/cxx_supportlib/vendor-modified/boost/asio/ip/udp.hpp +113 -0
  528. data/src/cxx_supportlib/vendor-modified/boost/asio/ip/unicast.hpp +72 -0
  529. data/src/cxx_supportlib/vendor-modified/boost/asio/ip/v6_only.hpp +71 -0
  530. data/src/cxx_supportlib/vendor-modified/boost/asio/is_read_buffered.hpp +61 -0
  531. data/src/cxx_supportlib/vendor-modified/boost/asio/is_write_buffered.hpp +61 -0
  532. data/src/cxx_supportlib/vendor-modified/boost/asio/local/basic_endpoint.hpp +241 -0
  533. data/src/cxx_supportlib/vendor-modified/boost/asio/local/connect_pair.hpp +106 -0
  534. data/src/cxx_supportlib/vendor-modified/boost/asio/local/datagram_protocol.hpp +82 -0
  535. data/src/cxx_supportlib/vendor-modified/boost/asio/local/detail/endpoint.hpp +135 -0
  536. data/src/cxx_supportlib/vendor-modified/boost/asio/local/detail/impl/endpoint.ipp +130 -0
  537. data/src/cxx_supportlib/vendor-modified/boost/asio/local/stream_protocol.hpp +92 -0
  538. data/src/cxx_supportlib/vendor-modified/boost/asio/placeholders.hpp +125 -0
  539. data/src/cxx_supportlib/vendor-modified/boost/asio/posix/basic_descriptor.hpp +492 -0
  540. data/src/cxx_supportlib/vendor-modified/boost/asio/posix/basic_stream_descriptor.hpp +364 -0
  541. data/src/cxx_supportlib/vendor-modified/boost/asio/posix/descriptor_base.hpp +99 -0
  542. data/src/cxx_supportlib/vendor-modified/boost/asio/posix/stream_descriptor.hpp +39 -0
  543. data/src/cxx_supportlib/vendor-modified/boost/asio/posix/stream_descriptor_service.hpp +262 -0
  544. data/src/cxx_supportlib/vendor-modified/boost/asio/raw_socket_service.hpp +438 -0
  545. data/src/cxx_supportlib/vendor-modified/boost/asio/read.hpp +633 -0
  546. data/src/cxx_supportlib/vendor-modified/boost/asio/read_at.hpp +666 -0
  547. data/src/cxx_supportlib/vendor-modified/boost/asio/read_until.hpp +925 -0
  548. data/src/cxx_supportlib/vendor-modified/boost/asio/seq_packet_socket_service.hpp +386 -0
  549. data/src/cxx_supportlib/vendor-modified/boost/asio/serial_port.hpp +38 -0
  550. data/src/cxx_supportlib/vendor-modified/boost/asio/serial_port_base.hpp +169 -0
  551. data/src/cxx_supportlib/vendor-modified/boost/asio/serial_port_service.hpp +255 -0
  552. data/src/cxx_supportlib/vendor-modified/boost/asio/signal_set.hpp +30 -0
  553. data/src/cxx_supportlib/vendor-modified/boost/asio/signal_set_service.hpp +136 -0
  554. data/src/cxx_supportlib/vendor-modified/boost/asio/socket_acceptor_service.hpp +308 -0
  555. data/src/cxx_supportlib/vendor-modified/boost/asio/socket_base.hpp +522 -0
  556. data/src/cxx_supportlib/vendor-modified/boost/asio/spawn.hpp +267 -0
  557. data/src/cxx_supportlib/vendor-modified/boost/asio/ssl.hpp +30 -0
  558. data/src/cxx_supportlib/vendor-modified/boost/asio/ssl/basic_context.hpp +42 -0
  559. data/src/cxx_supportlib/vendor-modified/boost/asio/ssl/context.hpp +789 -0
  560. data/src/cxx_supportlib/vendor-modified/boost/asio/ssl/context_base.hpp +194 -0
  561. data/src/cxx_supportlib/vendor-modified/boost/asio/ssl/context_service.hpp +42 -0
  562. data/src/cxx_supportlib/vendor-modified/boost/asio/ssl/detail/buffered_handshake_op.hpp +112 -0
  563. data/src/cxx_supportlib/vendor-modified/boost/asio/ssl/detail/engine.hpp +166 -0
  564. data/src/cxx_supportlib/vendor-modified/boost/asio/ssl/detail/handshake_op.hpp +70 -0
  565. data/src/cxx_supportlib/vendor-modified/boost/asio/ssl/detail/impl/engine.ipp +327 -0
  566. data/src/cxx_supportlib/vendor-modified/boost/asio/ssl/detail/impl/openssl_init.ipp +166 -0
  567. data/src/cxx_supportlib/vendor-modified/boost/asio/ssl/detail/io.hpp +351 -0
  568. data/src/cxx_supportlib/vendor-modified/boost/asio/ssl/detail/openssl_init.hpp +103 -0
  569. data/src/cxx_supportlib/vendor-modified/boost/asio/ssl/detail/openssl_types.hpp +30 -0
  570. data/src/cxx_supportlib/vendor-modified/boost/asio/ssl/detail/password_callback.hpp +74 -0
  571. data/src/cxx_supportlib/vendor-modified/boost/asio/ssl/detail/read_op.hpp +75 -0
  572. data/src/cxx_supportlib/vendor-modified/boost/asio/ssl/detail/shutdown_op.hpp +62 -0
  573. data/src/cxx_supportlib/vendor-modified/boost/asio/ssl/detail/stream_core.hpp +128 -0
  574. data/src/cxx_supportlib/vendor-modified/boost/asio/ssl/detail/verify_callback.hpp +70 -0
  575. data/src/cxx_supportlib/vendor-modified/boost/asio/ssl/detail/write_op.hpp +75 -0
  576. data/src/cxx_supportlib/vendor-modified/boost/asio/ssl/error.hpp +115 -0
  577. data/src/cxx_supportlib/vendor-modified/boost/asio/ssl/impl/context.hpp +73 -0
  578. data/src/cxx_supportlib/vendor-modified/boost/asio/ssl/impl/context.ipp +1177 -0
  579. data/src/cxx_supportlib/vendor-modified/boost/asio/ssl/impl/error.ipp +102 -0
  580. data/src/cxx_supportlib/vendor-modified/boost/asio/ssl/impl/rfc2818_verification.ipp +168 -0
  581. data/src/cxx_supportlib/vendor-modified/boost/asio/ssl/impl/src.hpp +28 -0
  582. data/src/cxx_supportlib/vendor-modified/boost/asio/ssl/old/basic_context.hpp +436 -0
  583. data/src/cxx_supportlib/vendor-modified/boost/asio/ssl/old/context_service.hpp +176 -0
  584. data/src/cxx_supportlib/vendor-modified/boost/asio/ssl/old/detail/openssl_context_service.hpp +396 -0
  585. data/src/cxx_supportlib/vendor-modified/boost/asio/ssl/old/detail/openssl_operation.hpp +526 -0
  586. data/src/cxx_supportlib/vendor-modified/boost/asio/ssl/old/detail/openssl_stream_service.hpp +573 -0
  587. data/src/cxx_supportlib/vendor-modified/boost/asio/ssl/old/stream.hpp +503 -0
  588. data/src/cxx_supportlib/vendor-modified/boost/asio/ssl/old/stream_service.hpp +186 -0
  589. data/src/cxx_supportlib/vendor-modified/boost/asio/ssl/rfc2818_verification.hpp +102 -0
  590. data/src/cxx_supportlib/vendor-modified/boost/asio/ssl/stream.hpp +758 -0
  591. data/src/cxx_supportlib/vendor-modified/boost/asio/ssl/stream_base.hpp +54 -0
  592. data/src/cxx_supportlib/vendor-modified/boost/asio/ssl/stream_service.hpp +42 -0
  593. data/src/cxx_supportlib/vendor-modified/boost/asio/ssl/verify_context.hpp +75 -0
  594. data/src/cxx_supportlib/vendor-modified/boost/asio/ssl/verify_mode.hpp +65 -0
  595. data/src/cxx_supportlib/vendor-modified/boost/asio/steady_timer.hpp +63 -0
  596. data/src/cxx_supportlib/vendor-modified/boost/asio/strand.hpp +254 -0
  597. data/src/cxx_supportlib/vendor-modified/boost/asio/stream_socket_service.hpp +382 -0
  598. data/src/cxx_supportlib/vendor-modified/boost/asio/streambuf.hpp +35 -0
  599. data/src/cxx_supportlib/vendor-modified/boost/asio/system_timer.hpp +59 -0
  600. data/src/cxx_supportlib/vendor-modified/boost/asio/time_traits.hpp +88 -0
  601. data/src/cxx_supportlib/vendor-modified/boost/asio/unyield.hpp +21 -0
  602. data/src/cxx_supportlib/vendor-modified/boost/asio/use_future.hpp +94 -0
  603. data/src/cxx_supportlib/vendor-modified/boost/asio/version.hpp +23 -0
  604. data/src/cxx_supportlib/vendor-modified/boost/asio/wait_traits.hpp +43 -0
  605. data/src/cxx_supportlib/vendor-modified/boost/asio/waitable_timer_service.hpp +170 -0
  606. data/src/cxx_supportlib/vendor-modified/boost/asio/windows/basic_handle.hpp +283 -0
  607. data/src/cxx_supportlib/vendor-modified/boost/asio/windows/basic_object_handle.hpp +180 -0
  608. data/src/cxx_supportlib/vendor-modified/boost/asio/windows/basic_random_access_handle.hpp +378 -0
  609. data/src/cxx_supportlib/vendor-modified/boost/asio/windows/basic_stream_handle.hpp +361 -0
  610. data/src/cxx_supportlib/vendor-modified/boost/asio/windows/object_handle.hpp +40 -0
  611. data/src/cxx_supportlib/vendor-modified/boost/asio/windows/object_handle_service.hpp +179 -0
  612. data/src/cxx_supportlib/vendor-modified/boost/asio/windows/overlapped_ptr.hpp +118 -0
  613. data/src/cxx_supportlib/vendor-modified/boost/asio/windows/random_access_handle.hpp +39 -0
  614. data/src/cxx_supportlib/vendor-modified/boost/asio/windows/random_access_handle_service.hpp +222 -0
  615. data/src/cxx_supportlib/vendor-modified/boost/asio/windows/stream_handle.hpp +39 -0
  616. data/src/cxx_supportlib/vendor-modified/boost/asio/windows/stream_handle_service.hpp +220 -0
  617. data/src/cxx_supportlib/vendor-modified/boost/asio/write.hpp +620 -0
  618. data/src/cxx_supportlib/vendor-modified/boost/asio/write_at.hpp +672 -0
  619. data/src/cxx_supportlib/vendor-modified/boost/asio/yield.hpp +23 -0
  620. data/src/cxx_supportlib/vendor-modified/boost/chrono.hpp +20 -0
  621. data/src/cxx_supportlib/vendor-modified/boost/chrono/chrono.hpp +15 -0
  622. data/src/cxx_supportlib/vendor-modified/boost/chrono/chrono_io.hpp +34 -0
  623. data/src/cxx_supportlib/vendor-modified/boost/chrono/detail/inlined/chrono.hpp +46 -0
  624. data/src/cxx_supportlib/vendor-modified/boost/chrono/detail/inlined/mac/chrono.hpp +242 -0
  625. data/src/cxx_supportlib/vendor-modified/boost/chrono/detail/inlined/mac/process_cpu_clocks.hpp +356 -0
  626. data/src/cxx_supportlib/vendor-modified/boost/chrono/detail/inlined/mac/thread_clock.hpp +92 -0
  627. data/src/cxx_supportlib/vendor-modified/boost/chrono/detail/inlined/posix/chrono.hpp +121 -0
  628. data/src/cxx_supportlib/vendor-modified/boost/chrono/detail/inlined/posix/process_cpu_clocks.hpp +354 -0
  629. data/src/cxx_supportlib/vendor-modified/boost/chrono/detail/inlined/posix/thread_clock.hpp +92 -0
  630. data/src/cxx_supportlib/vendor-modified/boost/chrono/detail/inlined/process_cpu_clocks.hpp +46 -0
  631. data/src/cxx_supportlib/vendor-modified/boost/chrono/detail/inlined/thread_clock.hpp +46 -0
  632. data/src/cxx_supportlib/vendor-modified/boost/chrono/detail/no_warning/signed_unsigned_cmp.hpp +54 -0
  633. data/src/cxx_supportlib/vendor-modified/boost/chrono/detail/scan_keyword.hpp +163 -0
  634. data/src/cxx_supportlib/vendor-modified/boost/chrono/floor.hpp +36 -0
  635. data/src/cxx_supportlib/vendor-modified/boost/chrono/include.hpp +23 -0
  636. data/src/cxx_supportlib/vendor-modified/boost/chrono/io/duration_get.hpp +593 -0
  637. data/src/cxx_supportlib/vendor-modified/boost/chrono/io/duration_io.hpp +295 -0
  638. data/src/cxx_supportlib/vendor-modified/boost/chrono/io/duration_put.hpp +317 -0
  639. data/src/cxx_supportlib/vendor-modified/boost/chrono/io/duration_style.hpp +35 -0
  640. data/src/cxx_supportlib/vendor-modified/boost/chrono/io/duration_units.hpp +1003 -0
  641. data/src/cxx_supportlib/vendor-modified/boost/chrono/io/ios_base_state.hpp +152 -0
  642. data/src/cxx_supportlib/vendor-modified/boost/chrono/io/time_point_get.hpp +330 -0
  643. data/src/cxx_supportlib/vendor-modified/boost/chrono/io/time_point_io.hpp +1243 -0
  644. data/src/cxx_supportlib/vendor-modified/boost/chrono/io/time_point_put.hpp +261 -0
  645. data/src/cxx_supportlib/vendor-modified/boost/chrono/io/time_point_units.hpp +260 -0
  646. data/src/cxx_supportlib/vendor-modified/boost/chrono/io/timezone.hpp +30 -0
  647. data/src/cxx_supportlib/vendor-modified/boost/chrono/io/utility/ios_base_state_ptr.hpp +437 -0
  648. data/src/cxx_supportlib/vendor-modified/boost/chrono/io/utility/manip_base.hpp +101 -0
  649. data/src/cxx_supportlib/vendor-modified/boost/chrono/io/utility/to_string.hpp +50 -0
  650. data/src/cxx_supportlib/vendor-modified/boost/chrono/io_v1/chrono_io.hpp +637 -0
  651. data/src/cxx_supportlib/vendor-modified/boost/chrono/process_cpu_clocks.hpp +525 -0
  652. data/src/cxx_supportlib/vendor-modified/boost/chrono/round.hpp +59 -0
  653. data/src/cxx_supportlib/vendor-modified/boost/chrono/thread_clock.hpp +75 -0
  654. data/src/cxx_supportlib/vendor-modified/boost/chrono/typeof/boost/chrono/chrono.hpp +32 -0
  655. data/src/cxx_supportlib/vendor-modified/boost/chrono/typeof/boost/ratio.hpp +24 -0
  656. data/src/cxx_supportlib/vendor-modified/boost/detail/atomic_count.hpp +21 -0
  657. data/src/cxx_supportlib/vendor-modified/boost/integer/common_factor.hpp +16 -0
  658. data/src/cxx_supportlib/vendor-modified/boost/integer/common_factor_rt.hpp +460 -0
  659. data/src/cxx_supportlib/vendor-modified/boost/integer/integer_log2.hpp +112 -0
  660. data/src/cxx_supportlib/vendor-modified/boost/integer/integer_mask.hpp +126 -0
  661. data/src/cxx_supportlib/vendor-modified/boost/integer/static_min_max.hpp +51 -0
  662. data/src/cxx_supportlib/vendor-modified/boost/libs/chrono/src/chrono.cpp +15 -0
  663. data/src/cxx_supportlib/vendor-modified/boost/libs/chrono/src/process_cpu_clocks.cpp +18 -0
  664. data/src/cxx_supportlib/vendor-modified/boost/libs/chrono/src/thread_clock.cpp +19 -0
  665. data/src/cxx_supportlib/vendor-modified/boost/libs/random/src/random_device.cpp +250 -0
  666. data/src/cxx_supportlib/vendor-modified/boost/pointer_cast.hpp +121 -0
  667. data/src/cxx_supportlib/vendor-modified/boost/random.hpp +91 -0
  668. data/src/cxx_supportlib/vendor-modified/boost/random/additive_combine.hpp +283 -0
  669. data/src/cxx_supportlib/vendor-modified/boost/random/bernoulli_distribution.hpp +197 -0
  670. data/src/cxx_supportlib/vendor-modified/boost/random/beta_distribution.hpp +184 -0
  671. data/src/cxx_supportlib/vendor-modified/boost/random/binomial_distribution.hpp +434 -0
  672. data/src/cxx_supportlib/vendor-modified/boost/random/cauchy_distribution.hpp +214 -0
  673. data/src/cxx_supportlib/vendor-modified/boost/random/chi_squared_distribution.hpp +209 -0
  674. data/src/cxx_supportlib/vendor-modified/boost/random/detail/auto_link.hpp +40 -0
  675. data/src/cxx_supportlib/vendor-modified/boost/random/detail/config.hpp +18 -0
  676. data/src/cxx_supportlib/vendor-modified/boost/random/detail/const_mod.hpp +216 -0
  677. data/src/cxx_supportlib/vendor-modified/boost/random/detail/disable_warnings.hpp +29 -0
  678. data/src/cxx_supportlib/vendor-modified/boost/random/detail/enable_warnings.hpp +22 -0
  679. data/src/cxx_supportlib/vendor-modified/boost/random/detail/generator_bits.hpp +36 -0
  680. data/src/cxx_supportlib/vendor-modified/boost/random/detail/generator_seed_seq.hpp +40 -0
  681. data/src/cxx_supportlib/vendor-modified/boost/random/detail/int_float_pair.hpp +121 -0
  682. data/src/cxx_supportlib/vendor-modified/boost/random/detail/integer_log2.hpp +84 -0
  683. data/src/cxx_supportlib/vendor-modified/boost/random/detail/iterator_mixin.hpp +45 -0
  684. data/src/cxx_supportlib/vendor-modified/boost/random/detail/large_arithmetic.hpp +122 -0
  685. data/src/cxx_supportlib/vendor-modified/boost/random/detail/operators.hpp +84 -0
  686. data/src/cxx_supportlib/vendor-modified/boost/random/detail/polynomial.hpp +384 -0
  687. data/src/cxx_supportlib/vendor-modified/boost/random/detail/ptr_helper.hpp +67 -0
  688. data/src/cxx_supportlib/vendor-modified/boost/random/detail/seed.hpp +115 -0
  689. data/src/cxx_supportlib/vendor-modified/boost/random/detail/seed_impl.hpp +398 -0
  690. data/src/cxx_supportlib/vendor-modified/boost/random/detail/signed_unsigned_tools.hpp +89 -0
  691. data/src/cxx_supportlib/vendor-modified/boost/random/detail/uniform_int_float.hpp +76 -0
  692. data/src/cxx_supportlib/vendor-modified/boost/random/detail/vector_io.hpp +75 -0
  693. data/src/cxx_supportlib/vendor-modified/boost/random/discard_block.hpp +241 -0
  694. data/src/cxx_supportlib/vendor-modified/boost/random/discrete_distribution.hpp +636 -0
  695. data/src/cxx_supportlib/vendor-modified/boost/random/exponential_distribution.hpp +386 -0
  696. data/src/cxx_supportlib/vendor-modified/boost/random/extreme_value_distribution.hpp +177 -0
  697. data/src/cxx_supportlib/vendor-modified/boost/random/fisher_f_distribution.hpp +183 -0
  698. data/src/cxx_supportlib/vendor-modified/boost/random/gamma_distribution.hpp +292 -0
  699. data/src/cxx_supportlib/vendor-modified/boost/random/generate_canonical.hpp +96 -0
  700. data/src/cxx_supportlib/vendor-modified/boost/random/geometric_distribution.hpp +267 -0
  701. data/src/cxx_supportlib/vendor-modified/boost/random/hyperexponential_distribution.hpp +883 -0
  702. data/src/cxx_supportlib/vendor-modified/boost/random/independent_bits.hpp +271 -0
  703. data/src/cxx_supportlib/vendor-modified/boost/random/inversive_congruential.hpp +267 -0
  704. data/src/cxx_supportlib/vendor-modified/boost/random/lagged_fibonacci.hpp +537 -0
  705. data/src/cxx_supportlib/vendor-modified/boost/random/laplace_distribution.hpp +175 -0
  706. data/src/cxx_supportlib/vendor-modified/boost/random/linear_congruential.hpp +466 -0
  707. data/src/cxx_supportlib/vendor-modified/boost/random/linear_feedback_shift.hpp +217 -0
  708. data/src/cxx_supportlib/vendor-modified/boost/random/lognormal_distribution.hpp +254 -0
  709. data/src/cxx_supportlib/vendor-modified/boost/random/mersenne_twister.hpp +682 -0
  710. data/src/cxx_supportlib/vendor-modified/boost/random/negative_binomial_distribution.hpp +220 -0
  711. data/src/cxx_supportlib/vendor-modified/boost/random/non_central_chi_squared_distribution.hpp +221 -0
  712. data/src/cxx_supportlib/vendor-modified/boost/random/normal_distribution.hpp +374 -0
  713. data/src/cxx_supportlib/vendor-modified/boost/random/piecewise_constant_distribution.hpp +466 -0
  714. data/src/cxx_supportlib/vendor-modified/boost/random/piecewise_linear_distribution.hpp +531 -0
  715. data/src/cxx_supportlib/vendor-modified/boost/random/poisson_distribution.hpp +360 -0
  716. data/src/cxx_supportlib/vendor-modified/boost/random/random_device.hpp +143 -0
  717. data/src/cxx_supportlib/vendor-modified/boost/random/random_number_generator.hpp +73 -0
  718. data/src/cxx_supportlib/vendor-modified/boost/random/ranlux.hpp +99 -0
  719. data/src/cxx_supportlib/vendor-modified/boost/random/seed_seq.hpp +118 -0
  720. data/src/cxx_supportlib/vendor-modified/boost/random/shuffle_order.hpp +269 -0
  721. data/src/cxx_supportlib/vendor-modified/boost/random/shuffle_output.hpp +51 -0
  722. data/src/cxx_supportlib/vendor-modified/boost/random/student_t_distribution.hpp +180 -0
  723. data/src/cxx_supportlib/vendor-modified/boost/random/subtract_with_carry.hpp +613 -0
  724. data/src/cxx_supportlib/vendor-modified/boost/random/taus88.hpp +45 -0
  725. data/src/cxx_supportlib/vendor-modified/boost/random/traits.hpp +107 -0
  726. data/src/cxx_supportlib/vendor-modified/boost/random/triangle_distribution.hpp +232 -0
  727. data/src/cxx_supportlib/vendor-modified/boost/random/uniform_01.hpp +257 -0
  728. data/src/cxx_supportlib/vendor-modified/boost/random/uniform_int.hpp +99 -0
  729. data/src/cxx_supportlib/vendor-modified/boost/random/uniform_int_distribution.hpp +419 -0
  730. data/src/cxx_supportlib/vendor-modified/boost/random/uniform_on_sphere.hpp +284 -0
  731. data/src/cxx_supportlib/vendor-modified/boost/random/uniform_real.hpp +82 -0
  732. data/src/cxx_supportlib/vendor-modified/boost/random/uniform_real_distribution.hpp +241 -0
  733. data/src/cxx_supportlib/vendor-modified/boost/random/uniform_smallint.hpp +307 -0
  734. data/src/cxx_supportlib/vendor-modified/boost/random/variate_generator.hpp +122 -0
  735. data/src/cxx_supportlib/vendor-modified/boost/random/weibull_distribution.hpp +177 -0
  736. data/src/cxx_supportlib/vendor-modified/boost/random/xor_combine.hpp +208 -0
  737. data/src/cxx_supportlib/vendor-modified/boost/ratio.hpp +14 -0
  738. data/src/cxx_supportlib/vendor-modified/boost/ratio/detail/ratio_io.hpp +1342 -0
  739. data/src/cxx_supportlib/vendor-modified/boost/ratio/include.hpp +16 -0
  740. data/src/cxx_supportlib/vendor-modified/boost/ratio/mpl/abs.hpp +30 -0
  741. data/src/cxx_supportlib/vendor-modified/boost/ratio/mpl/arithmetic.hpp +22 -0
  742. data/src/cxx_supportlib/vendor-modified/boost/ratio/mpl/comparison.hpp +19 -0
  743. data/src/cxx_supportlib/vendor-modified/boost/ratio/mpl/divides.hpp +30 -0
  744. data/src/cxx_supportlib/vendor-modified/boost/ratio/mpl/equal_to.hpp +30 -0
  745. data/src/cxx_supportlib/vendor-modified/boost/ratio/mpl/gcd.hpp +30 -0
  746. data/src/cxx_supportlib/vendor-modified/boost/ratio/mpl/greater.hpp +30 -0
  747. data/src/cxx_supportlib/vendor-modified/boost/ratio/mpl/greater_equal.hpp +30 -0
  748. data/src/cxx_supportlib/vendor-modified/boost/ratio/mpl/lcm.hpp +30 -0
  749. data/src/cxx_supportlib/vendor-modified/boost/ratio/mpl/less.hpp +30 -0
  750. data/src/cxx_supportlib/vendor-modified/boost/ratio/mpl/less_equal.hpp +30 -0
  751. data/src/cxx_supportlib/vendor-modified/boost/ratio/mpl/minus.hpp +30 -0
  752. data/src/cxx_supportlib/vendor-modified/boost/ratio/mpl/negate.hpp +30 -0
  753. data/src/cxx_supportlib/vendor-modified/boost/ratio/mpl/not_equal_to.hpp +30 -0
  754. data/src/cxx_supportlib/vendor-modified/boost/ratio/mpl/numeric_cast.hpp +31 -0
  755. data/src/cxx_supportlib/vendor-modified/boost/ratio/mpl/plus.hpp +30 -0
  756. data/src/cxx_supportlib/vendor-modified/boost/ratio/mpl/rational_c_tag.hpp +25 -0
  757. data/src/cxx_supportlib/vendor-modified/boost/ratio/mpl/rational_constant.hpp +15 -0
  758. data/src/cxx_supportlib/vendor-modified/boost/ratio/mpl/sign.hpp +30 -0
  759. data/src/cxx_supportlib/vendor-modified/boost/ratio/mpl/times.hpp +30 -0
  760. data/src/cxx_supportlib/vendor-modified/boost/ratio/ratio_io.hpp +1076 -0
  761. data/src/cxx_supportlib/vendor-modified/boost/rational.hpp +1002 -0
  762. data/src/cxx_supportlib/vendor-modified/modp_b64.cpp +11 -0
  763. data/src/helper-scripts/rack-preloader.rb +1 -1
  764. data/src/nginx_module/{ConfigurationCommands.c → ConfigGeneral/AutoGeneratedDefinitions.c} +351 -134
  765. data/src/nginx_module/{ConfigurationCommands.c.cxxcodebuilder → ConfigGeneral/AutoGeneratedDefinitions.c.cxxcodebuilder} +14 -25
  766. data/src/nginx_module/ConfigGeneral/AutoGeneratedManifestDefaultsInitialization.c +396 -0
  767. data/src/nginx_module/ConfigGeneral/AutoGeneratedManifestDefaultsInitialization.c.cxxcodebuilder +160 -0
  768. data/src/nginx_module/ConfigGeneral/AutoGeneratedSetterFuncs.c +831 -0
  769. data/src/nginx_module/ConfigGeneral/AutoGeneratedSetterFuncs.c.cxxcodebuilder +168 -0
  770. data/src/nginx_module/ConfigGeneral/ManifestGeneration.c +887 -0
  771. data/src/nginx_module/ConfigGeneral/ManifestGeneration.h +100 -0
  772. data/src/nginx_module/Configuration.c +165 -621
  773. data/src/nginx_module/Configuration.h +43 -33
  774. data/src/nginx_module/ContentHandler.c +46 -40
  775. data/src/nginx_module/LocationConfig/AutoGeneratedCreateFunction.c +282 -0
  776. data/src/nginx_module/{CreateLocationConfig.c.cxxcodebuilder → LocationConfig/AutoGeneratedCreateFunction.c.cxxcodebuilder} +43 -17
  777. data/src/nginx_module/{CacheLocationConfig.c → LocationConfig/AutoGeneratedHeaderSerialization.c} +148 -180
  778. data/src/nginx_module/{CacheLocationConfig.c.cxxcodebuilder → LocationConfig/AutoGeneratedHeaderSerialization.c.cxxcodebuilder} +13 -11
  779. data/src/nginx_module/LocationConfig/AutoGeneratedManifestGeneration.c +595 -0
  780. data/src/nginx_module/LocationConfig/AutoGeneratedManifestGeneration.c.cxxcodebuilder +190 -0
  781. data/src/nginx_module/{MergeLocationConfig.c → LocationConfig/AutoGeneratedMergeFunction.c} +32 -42
  782. data/src/nginx_module/{MergeLocationConfig.c.cxxcodebuilder → LocationConfig/AutoGeneratedMergeFunction.c.cxxcodebuilder} +18 -11
  783. data/src/nginx_module/LocationConfig/AutoGeneratedStruct.h +220 -0
  784. data/src/nginx_module/{LocationConfig.h.cxxcodebuilder → LocationConfig/AutoGeneratedStruct.h.cxxcodebuilder} +70 -48
  785. data/src/nginx_module/MainConfig/AutoGeneratedCreateFunction.c +163 -0
  786. data/src/nginx_module/MainConfig/AutoGeneratedCreateFunction.c.cxxcodebuilder +125 -0
  787. data/src/nginx_module/MainConfig/AutoGeneratedManifestGeneration.c +303 -0
  788. data/src/nginx_module/MainConfig/AutoGeneratedManifestGeneration.c.cxxcodebuilder +173 -0
  789. data/src/nginx_module/MainConfig/AutoGeneratedStruct.h +133 -0
  790. data/src/nginx_module/MainConfig/AutoGeneratedStruct.h.cxxcodebuilder +154 -0
  791. data/src/nginx_module/config +13 -4
  792. data/src/nginx_module/ngx_http_passenger_module.c +154 -84
  793. data/src/ruby_supportlib/phusion_passenger.rb +2 -2
  794. data/src/ruby_supportlib/phusion_passenger/apache2/config_options.rb +613 -131
  795. data/src/ruby_supportlib/phusion_passenger/apache2/config_utils.rb +52 -0
  796. data/src/ruby_supportlib/phusion_passenger/common_library.rb +18 -4
  797. data/src/ruby_supportlib/phusion_passenger/config/main.rb +2 -0
  798. data/src/ruby_supportlib/phusion_passenger/config/system_properties_command.rb +104 -0
  799. data/src/ruby_supportlib/phusion_passenger/constants.rb +0 -2
  800. data/src/ruby_supportlib/phusion_passenger/nginx/config_options.rb +470 -138
  801. data/src/ruby_supportlib/phusion_passenger/packaging.rb +1 -0
  802. data/src/ruby_supportlib/phusion_passenger/platform_info.rb +17 -0
  803. data/src/ruby_supportlib/phusion_passenger/platform_info/apache.rb +11 -1
  804. data/src/ruby_supportlib/phusion_passenger/platform_info/compiler.rb +7 -7
  805. data/src/ruby_supportlib/phusion_passenger/platform_info/networking.rb +293 -0
  806. data/src/ruby_supportlib/phusion_passenger/standalone/config_options_list.rb +8 -54
  807. data/src/ruby_supportlib/phusion_passenger/standalone/start_command.rb +1 -5
  808. data/src/ruby_supportlib/phusion_passenger/standalone/start_command/builtin_engine.rb +4 -7
  809. data/src/ruby_supportlib/phusion_passenger/vendor/daemon_controller.rb +1 -1
  810. data/src/schema_printer/SchemaPrinterMain.cpp +78 -0
  811. data/src/schema_printer/SchemaPrinterMain.cpp.cxxcodebuilder +116 -0
  812. metadata +671 -30
  813. data/src/apache2_module/Configuration.cpp +0 -737
  814. data/src/apache2_module/Configuration.hpp +0 -274
  815. data/src/apache2_module/ConfigurationCommands.cpp +0 -199
  816. data/src/apache2_module/ConfigurationFields.hpp +0 -187
  817. data/src/apache2_module/ConfigurationSetters.cpp +0 -436
  818. data/src/apache2_module/ConfigurationSetters.cpp.cxxcodebuilder +0 -144
  819. data/src/apache2_module/CreateDirConfig.cpp +0 -68
  820. data/src/apache2_module/CreateDirConfig.cpp.cxxcodebuilder +0 -81
  821. data/src/apache2_module/MergeDirConfig.cpp +0 -155
  822. data/src/apache2_module/SetHeaders.cpp +0 -111
  823. data/src/nginx_module/CreateLocationConfig.c +0 -100
  824. data/src/nginx_module/LocationConfig.h +0 -95
@@ -0,0 +1,1243 @@
1
+ // (C) Copyright Howard Hinnant
2
+ // (C) Copyright 2010-2011 Vicente J. Botet Escriba
3
+ // Use, modification and distribution are subject to the Boost Software License,
4
+ // Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at
5
+ // http://www.boost.org/LICENSE_1_0.txt).
6
+
7
+ //===-------------------------- locale ------------------------------------===//
8
+ //
9
+ // The LLVM Compiler Infrastructure
10
+ //
11
+ // This file is dual licensed under the MIT and the University of Illinois Open
12
+ // Source Licenses. See LICENSE.TXT for details.
13
+ //
14
+ //===----------------------------------------------------------------------===//
15
+
16
+ // This code was adapted by Vicente from Howard Hinnant's experimental work
17
+ // on chrono i/o to Boost and some functions from libc++/locale to emulate the missing time_get::get()
18
+
19
+ #ifndef BOOST_CHRONO_IO_TIME_POINT_IO_HPP
20
+ #define BOOST_CHRONO_IO_TIME_POINT_IO_HPP
21
+
22
+ #include <boost/chrono/io/time_point_put.hpp>
23
+ #include <boost/chrono/io/time_point_get.hpp>
24
+ #include <boost/chrono/io/duration_io.hpp>
25
+ #include <boost/chrono/io/ios_base_state.hpp>
26
+ #include <boost/chrono/io/utility/manip_base.hpp>
27
+ #include <boost/chrono/time_point.hpp>
28
+ #include <boost/chrono/clock_string.hpp>
29
+ #include <boost/chrono/round.hpp>
30
+ #include <boost/chrono/detail/scan_keyword.hpp>
31
+ #include <boost/static_assert.hpp>
32
+ #include <boost/detail/no_exceptions_support.hpp>
33
+ #include <cstring>
34
+ #include <locale>
35
+ #include <ctime>
36
+
37
+ #define BOOST_CHRONO_INTERNAL_TIMEGM \
38
+ ( defined BOOST_WINDOWS && ! defined(__CYGWIN__) ) \
39
+ || (defined(sun) || defined(__sun)) \
40
+ || (defined __IBMCPP__) \
41
+ || defined __ANDROID__ \
42
+ || defined __QNXNTO__ \
43
+ || (defined(_AIX) && defined __GNUC__)
44
+
45
+ #define BOOST_CHRONO_INTERNAL_GMTIME \
46
+ (defined BOOST_WINDOWS && ! defined(__CYGWIN__)) \
47
+ || ( (defined(sun) || defined(__sun)) && defined __GNUC__) \
48
+ || (defined __IBMCPP__) \
49
+ || defined __ANDROID__ \
50
+ || (defined(_AIX) && defined __GNUC__)
51
+
52
+ #define BOOST_CHRONO_USES_INTERNAL_TIME_GET
53
+
54
+ namespace boost
55
+ {
56
+ namespace chrono
57
+ {
58
+ typedef double fractional_seconds;
59
+ namespace detail
60
+ {
61
+
62
+
63
+ template <class CharT, class InputIterator = std::istreambuf_iterator<CharT> >
64
+ struct time_get
65
+ {
66
+ std::time_get<CharT> const &that_;
67
+ time_get(std::time_get<CharT> const& that) : that_(that) {}
68
+
69
+ typedef std::time_get<CharT> facet;
70
+ typedef typename facet::iter_type iter_type;
71
+ typedef typename facet::char_type char_type;
72
+ typedef std::basic_string<char_type> string_type;
73
+
74
+ static int
75
+ get_up_to_n_digits(
76
+ InputIterator& b, InputIterator e,
77
+ std::ios_base::iostate& err,
78
+ const std::ctype<CharT>& ct,
79
+ int n)
80
+ {
81
+ // Precondition: n >= 1
82
+ if (b == e)
83
+ {
84
+ err |= std::ios_base::eofbit | std::ios_base::failbit;
85
+ return 0;
86
+ }
87
+ // get first digit
88
+ CharT c = *b;
89
+ if (!ct.is(std::ctype_base::digit, c))
90
+ {
91
+ err |= std::ios_base::failbit;
92
+ return 0;
93
+ }
94
+ int r = ct.narrow(c, 0) - '0';
95
+ for (++b, --n; b != e && n > 0; ++b, --n)
96
+ {
97
+ // get next digit
98
+ c = *b;
99
+ if (!ct.is(std::ctype_base::digit, c))
100
+ return r;
101
+ r = r * 10 + ct.narrow(c, 0) - '0';
102
+ }
103
+ if (b == e)
104
+ err |= std::ios_base::eofbit;
105
+ return r;
106
+ }
107
+
108
+
109
+ void get_day(
110
+ int& d,
111
+ iter_type& b, iter_type e,
112
+ std::ios_base::iostate& err,
113
+ const std::ctype<char_type>& ct) const
114
+ {
115
+ int t = get_up_to_n_digits(b, e, err, ct, 2);
116
+ if (!(err & std::ios_base::failbit) && 1 <= t && t <= 31)
117
+ d = t;
118
+ else
119
+ err |= std::ios_base::failbit;
120
+ }
121
+
122
+ void get_month(
123
+ int& m,
124
+ iter_type& b, iter_type e,
125
+ std::ios_base::iostate& err,
126
+ const std::ctype<char_type>& ct) const
127
+ {
128
+ int t = get_up_to_n_digits(b, e, err, ct, 2);
129
+ if (!(err & std::ios_base::failbit) && 1 <= t && t <= 12)
130
+ m = --t;
131
+ else
132
+ err |= std::ios_base::failbit;
133
+ }
134
+
135
+
136
+ void get_year4(int& y,
137
+ iter_type& b, iter_type e,
138
+ std::ios_base::iostate& err,
139
+ const std::ctype<char_type>& ct) const
140
+ {
141
+ int t = get_up_to_n_digits(b, e, err, ct, 4);
142
+ if (!(err & std::ios_base::failbit))
143
+ y = t - 1900;
144
+ }
145
+
146
+ void
147
+ get_hour(int& h,
148
+ iter_type& b, iter_type e,
149
+ std::ios_base::iostate& err,
150
+ const std::ctype<char_type>& ct) const
151
+ {
152
+ int t = get_up_to_n_digits(b, e, err, ct, 2);
153
+ if (!(err & std::ios_base::failbit) && t <= 23)
154
+ h = t;
155
+ else
156
+ err |= std::ios_base::failbit;
157
+ }
158
+
159
+ void
160
+ get_minute(int& m,
161
+ iter_type& b, iter_type e,
162
+ std::ios_base::iostate& err,
163
+ const std::ctype<char_type>& ct) const
164
+ {
165
+ int t = get_up_to_n_digits(b, e, err, ct, 2);
166
+ if (!(err & std::ios_base::failbit) && t <= 59)
167
+ m = t;
168
+ else
169
+ err |= std::ios_base::failbit;
170
+ }
171
+
172
+ void get_second(int& s,
173
+ iter_type& b, iter_type e,
174
+ std::ios_base::iostate& err,
175
+ const std::ctype<char_type>& ct) const
176
+ {
177
+ int t = get_up_to_n_digits(b, e, err, ct, 2);
178
+ if (!(err & std::ios_base::failbit) && t <= 60)
179
+ s = t;
180
+ else
181
+ err |= std::ios_base::failbit;
182
+ }
183
+
184
+ void get_white_space(iter_type& b, iter_type e,
185
+ std::ios_base::iostate& err,
186
+ const std::ctype<char_type>& ct) const
187
+ {
188
+ for (; b != e && ct.is(std::ctype_base::space, *b); ++b)
189
+ ;
190
+ if (b == e)
191
+ err |= std::ios_base::eofbit;
192
+ }
193
+
194
+ void get_12_hour(int& h,
195
+ iter_type& b, iter_type e,
196
+ std::ios_base::iostate& err,
197
+ const std::ctype<char_type>& ct) const
198
+ {
199
+ int t = get_up_to_n_digits(b, e, err, ct, 2);
200
+ if (!(err & std::ios_base::failbit) && 1 <= t && t <= 12)
201
+ h = t;
202
+ else
203
+ err |= std::ios_base::failbit;
204
+ }
205
+
206
+ void get_percent(iter_type& b, iter_type e,
207
+ std::ios_base::iostate& err,
208
+ const std::ctype<char_type>& ct) const
209
+ {
210
+ if (b == e)
211
+ {
212
+ err |= std::ios_base::eofbit | std::ios_base::failbit;
213
+ return;
214
+ }
215
+ if (ct.narrow(*b, 0) != '%')
216
+ err |= std::ios_base::failbit;
217
+ else if(++b == e)
218
+ err |= std::ios_base::eofbit;
219
+ }
220
+
221
+ void get_day_year_num(int& d,
222
+ iter_type& b, iter_type e,
223
+ std::ios_base::iostate& err,
224
+ const std::ctype<char_type>& ct) const
225
+ {
226
+ int t = get_up_to_n_digits(b, e, err, ct, 3);
227
+ if (!(err & std::ios_base::failbit) && 1 <= t && t <= 366)
228
+ d = --t;
229
+ else
230
+ err |= std::ios_base::failbit;
231
+ }
232
+
233
+ void
234
+ get_weekday(int& w,
235
+ iter_type& b, iter_type e,
236
+ std::ios_base::iostate& err,
237
+ const std::ctype<char_type>& ct) const
238
+ {
239
+ int t = get_up_to_n_digits(b, e, err, ct, 1);
240
+ if (!(err & std::ios_base::failbit) && t <= 6)
241
+ w = t;
242
+ else
243
+ err |= std::ios_base::failbit;
244
+ }
245
+ #if 0
246
+
247
+ void
248
+ get_am_pm(int& h,
249
+ iter_type& b, iter_type e,
250
+ std::ios_base::iostate& err,
251
+ const std::ctype<char_type>& ct) const
252
+ {
253
+ const string_type* ap = am_pm();
254
+ if (ap[0].size() + ap[1].size() == 0)
255
+ {
256
+ err |= ios_base::failbit;
257
+ return;
258
+ }
259
+ ptrdiff_t i = detail::scan_keyword(b, e, ap, ap+2, ct, err, false) - ap;
260
+ if (i == 0 && h == 12)
261
+ h = 0;
262
+ else if (i == 1 && h < 12)
263
+ h += 12;
264
+ }
265
+
266
+ #endif
267
+
268
+ InputIterator get(
269
+ iter_type b, iter_type e,
270
+ std::ios_base& iob,
271
+ std::ios_base::iostate& err,
272
+ std::tm* tm,
273
+ char fmt, char) const
274
+ {
275
+ err = std::ios_base::goodbit;
276
+ const std::ctype<char_type>& ct = std::use_facet<std::ctype<char_type> >(iob.getloc());
277
+
278
+ switch (fmt)
279
+ {
280
+ case 'a':
281
+ case 'A':
282
+ {
283
+ std::tm tm2;
284
+ std::memset(&tm2, 0, sizeof(std::tm));
285
+ that_.get_weekday(b, e, iob, err, &tm2);
286
+ //tm->tm_wday = tm2.tm_wday;
287
+ }
288
+ break;
289
+ case 'b':
290
+ case 'B':
291
+ case 'h':
292
+ {
293
+ std::tm tm2;
294
+ std::memset(&tm2, 0, sizeof(std::tm));
295
+ that_.get_monthname(b, e, iob, err, &tm2);
296
+ //tm->tm_mon = tm2.tm_mon;
297
+ }
298
+ break;
299
+ // case 'c':
300
+ // {
301
+ // const string_type& fm = c();
302
+ // b = get(b, e, iob, err, tm, fm.data(), fm.data() + fm.size());
303
+ // }
304
+ // break;
305
+ case 'd':
306
+ case 'e':
307
+ get_day(tm->tm_mday, b, e, err, ct);
308
+ break;
309
+ case 'D':
310
+ {
311
+ const char_type fm[] = {'%', 'm', '/', '%', 'd', '/', '%', 'y'};
312
+ b = get(b, e, iob, err, tm, fm, fm + sizeof(fm)/sizeof(fm[0]));
313
+ }
314
+ break;
315
+ case 'F':
316
+ {
317
+ const char_type fm[] = {'%', 'Y', '-', '%', 'm', '-', '%', 'd'};
318
+ b = get(b, e, iob, err, tm, fm, fm + sizeof(fm)/sizeof(fm[0]));
319
+ }
320
+ break;
321
+ case 'H':
322
+ get_hour(tm->tm_hour, b, e, err, ct);
323
+ break;
324
+ case 'I':
325
+ get_12_hour(tm->tm_hour, b, e, err, ct);
326
+ break;
327
+ case 'j':
328
+ get_day_year_num(tm->tm_yday, b, e, err, ct);
329
+ break;
330
+ case 'm':
331
+ get_month(tm->tm_mon, b, e, err, ct);
332
+ break;
333
+ case 'M':
334
+ get_minute(tm->tm_min, b, e, err, ct);
335
+ break;
336
+ case 'n':
337
+ case 't':
338
+ get_white_space(b, e, err, ct);
339
+ break;
340
+ // case 'p':
341
+ // get_am_pm(tm->tm_hour, b, e, err, ct);
342
+ // break;
343
+ case 'r':
344
+ {
345
+ const char_type fm[] = {'%', 'I', ':', '%', 'M', ':', '%', 'S', ' ', '%', 'p'};
346
+ b = get(b, e, iob, err, tm, fm, fm + sizeof(fm)/sizeof(fm[0]));
347
+ }
348
+ break;
349
+ case 'R':
350
+ {
351
+ const char_type fm[] = {'%', 'H', ':', '%', 'M'};
352
+ b = get(b, e, iob, err, tm, fm, fm + sizeof(fm)/sizeof(fm[0]));
353
+ }
354
+ break;
355
+ case 'S':
356
+ get_second(tm->tm_sec, b, e, err, ct);
357
+ break;
358
+ case 'T':
359
+ {
360
+ const char_type fm[] = {'%', 'H', ':', '%', 'M', ':', '%', 'S'};
361
+ b = get(b, e, iob, err, tm, fm, fm + sizeof(fm)/sizeof(fm[0]));
362
+ }
363
+ break;
364
+ case 'w':
365
+ {
366
+ get_weekday(tm->tm_wday, b, e, err, ct);
367
+ }
368
+ break;
369
+ case 'x':
370
+ return that_.get_date(b, e, iob, err, tm);
371
+ // case 'X':
372
+ // return that_.get_time(b, e, iob, err, tm);
373
+ // {
374
+ // const string_type& fm = X();
375
+ // b = that_.get(b, e, iob, err, tm, fm.data(), fm.data() + fm.size());
376
+ // }
377
+ // break;
378
+ // case 'y':
379
+ // get_year(tm->tm_year, b, e, err, ct);
380
+ break;
381
+ case 'Y':
382
+ get_year4(tm->tm_year, b, e, err, ct);
383
+ break;
384
+ case '%':
385
+ get_percent(b, e, err, ct);
386
+ break;
387
+ default:
388
+ err |= std::ios_base::failbit;
389
+ }
390
+ return b;
391
+ }
392
+
393
+
394
+ InputIterator get(
395
+ iter_type b, iter_type e,
396
+ std::ios_base& iob,
397
+ std::ios_base::iostate& err, std::tm* tm,
398
+ const char_type* fmtb, const char_type* fmte) const
399
+ {
400
+ const std::ctype<char_type>& ct = std::use_facet<std::ctype<char_type> >(iob.getloc());
401
+ err = std::ios_base::goodbit;
402
+ while (fmtb != fmte && err == std::ios_base::goodbit)
403
+ {
404
+ if (b == e)
405
+ {
406
+ err = std::ios_base::failbit;
407
+ break;
408
+ }
409
+ if (ct.narrow(*fmtb, 0) == '%')
410
+ {
411
+ if (++fmtb == fmte)
412
+ {
413
+ err = std::ios_base::failbit;
414
+ break;
415
+ }
416
+ char cmd = ct.narrow(*fmtb, 0);
417
+ char opt = '\0';
418
+ if (cmd == 'E' || cmd == '0')
419
+ {
420
+ if (++fmtb == fmte)
421
+ {
422
+ err = std::ios_base::failbit;
423
+ break;
424
+ }
425
+ opt = cmd;
426
+ cmd = ct.narrow(*fmtb, 0);
427
+ }
428
+ b = get(b, e, iob, err, tm, cmd, opt);
429
+ ++fmtb;
430
+ }
431
+ else if (ct.is(std::ctype_base::space, *fmtb))
432
+ {
433
+ for (++fmtb; fmtb != fmte && ct.is(std::ctype_base::space, *fmtb); ++fmtb)
434
+ ;
435
+ for ( ; b != e && ct.is(std::ctype_base::space, *b); ++b)
436
+ ;
437
+ }
438
+ else if (ct.toupper(*b) == ct.toupper(*fmtb))
439
+ {
440
+ ++b;
441
+ ++fmtb;
442
+ }
443
+ else
444
+ err = std::ios_base::failbit;
445
+ }
446
+ if (b == e)
447
+ err |= std::ios_base::eofbit;
448
+ return b;
449
+ }
450
+
451
+ };
452
+
453
+
454
+ template <class CharT>
455
+ class time_manip: public manip<time_manip<CharT> >
456
+ {
457
+ std::basic_string<CharT> fmt_;
458
+ timezone tz_;
459
+ public:
460
+
461
+ time_manip(timezone tz, std::basic_string<CharT> fmt)
462
+ // todo move semantics
463
+ :
464
+ fmt_(fmt), tz_(tz)
465
+ {
466
+ }
467
+
468
+ /**
469
+ * Change the timezone and time format ios state;
470
+ */
471
+ void operator()(std::ios_base &ios) const
472
+ {
473
+ set_time_fmt<CharT> (ios, fmt_);
474
+ set_timezone(ios, tz_);
475
+ }
476
+ };
477
+
478
+ class time_man: public manip<time_man>
479
+ {
480
+ timezone tz_;
481
+ public:
482
+
483
+ time_man(timezone tz)
484
+ // todo move semantics
485
+ :
486
+ tz_(tz)
487
+ {
488
+ }
489
+
490
+ /**
491
+ * Change the timezone and time format ios state;
492
+ */
493
+ void operator()(std::ios_base &ios) const
494
+ {
495
+ //set_time_fmt<typename out_stream::char_type>(ios, "");
496
+ set_timezone(ios, tz_);
497
+ }
498
+ };
499
+
500
+ }
501
+
502
+ template <class CharT>
503
+ inline detail::time_manip<CharT> time_fmt(timezone tz, const CharT* fmt)
504
+ {
505
+ return detail::time_manip<CharT>(tz, fmt);
506
+ }
507
+
508
+ template <class CharT>
509
+ inline detail::time_manip<CharT> time_fmt(timezone tz, std::basic_string<CharT> fmt)
510
+ {
511
+ // todo move semantics
512
+ return detail::time_manip<CharT>(tz, fmt);
513
+ }
514
+
515
+ inline detail::time_man time_fmt(timezone f)
516
+ {
517
+ return detail::time_man(f);
518
+ }
519
+
520
+ /**
521
+ * time_fmt_io_saver i/o saver.
522
+ *
523
+ * See Boost.IO i/o state savers for a motivating compression.
524
+ */
525
+ template <typename CharT = char, typename Traits = std::char_traits<CharT> >
526
+ struct time_fmt_io_saver
527
+ {
528
+
529
+ //! the type of the state to restore
530
+ //typedef std::basic_ostream<CharT, Traits> state_type;
531
+ typedef std::ios_base state_type;
532
+
533
+ //! the type of aspect to save
534
+ typedef std::basic_string<CharT, Traits> aspect_type;
535
+
536
+ /**
537
+ * Explicit construction from an i/o stream.
538
+ *
539
+ * Store a reference to the i/o stream and the value of the associated @c time format .
540
+ */
541
+ explicit time_fmt_io_saver(state_type &s) :
542
+ s_save_(s), a_save_(get_time_fmt<CharT>(s_save_))
543
+ {
544
+ }
545
+
546
+ /**
547
+ * Construction from an i/o stream and a @c time format to restore.
548
+ *
549
+ * Stores a reference to the i/o stream and the value @c new_value to restore given as parameter.
550
+ */
551
+ time_fmt_io_saver(state_type &s, aspect_type new_value) :
552
+ s_save_(s), a_save_(get_time_fmt<CharT>(s_save_))
553
+ {
554
+ set_time_fmt(s_save_, new_value);
555
+ }
556
+
557
+ /**
558
+ * Destructor.
559
+ *
560
+ * Restores the i/o stream with the format to be restored.
561
+ */
562
+ ~time_fmt_io_saver()
563
+ {
564
+ this->restore();
565
+ }
566
+
567
+ /**
568
+ * Restores the i/o stream with the time format to be restored.
569
+ */
570
+ void restore()
571
+ {
572
+ set_time_fmt(s_save_, a_save_);
573
+ }
574
+ private:
575
+ state_type& s_save_;
576
+ aspect_type a_save_;
577
+ };
578
+
579
+ /**
580
+ * timezone_io_saver i/o saver.
581
+ *
582
+ * See Boost.IO i/o state savers for a motivating compression.
583
+ */
584
+ struct timezone_io_saver
585
+ {
586
+
587
+ //! the type of the state to restore
588
+ typedef std::ios_base state_type;
589
+ //! the type of aspect to save
590
+ typedef timezone aspect_type;
591
+
592
+ /**
593
+ * Explicit construction from an i/o stream.
594
+ *
595
+ * Store a reference to the i/o stream and the value of the associated @c timezone.
596
+ */
597
+ explicit timezone_io_saver(state_type &s) :
598
+ s_save_(s), a_save_(get_timezone(s_save_))
599
+ {
600
+ }
601
+
602
+ /**
603
+ * Construction from an i/o stream and a @c timezone to restore.
604
+ *
605
+ * Stores a reference to the i/o stream and the value @c new_value to restore given as parameter.
606
+ */
607
+ timezone_io_saver(state_type &s, aspect_type new_value) :
608
+ s_save_(s), a_save_(get_timezone(s_save_))
609
+ {
610
+ set_timezone(s_save_, new_value);
611
+ }
612
+
613
+ /**
614
+ * Destructor.
615
+ *
616
+ * Restores the i/o stream with the format to be restored.
617
+ */
618
+ ~timezone_io_saver()
619
+ {
620
+ this->restore();
621
+ }
622
+
623
+ /**
624
+ * Restores the i/o stream with the timezone to be restored.
625
+ */
626
+ void restore()
627
+ {
628
+ set_timezone(s_save_, a_save_);
629
+ }
630
+ private:
631
+ timezone_io_saver& operator=(timezone_io_saver const& rhs) ;
632
+
633
+ state_type& s_save_;
634
+ aspect_type a_save_;
635
+ };
636
+
637
+ /**
638
+ *
639
+ * @param os
640
+ * @param tp
641
+ * @Effects Behaves as a formatted output function. After constructing a @c sentry object, if the @ sentry
642
+ * converts to true, calls to @c facet.put(os,os,os.fill(),tp) where @c facet is the @c time_point_put<CharT>
643
+ * facet associated to @c os or a new created instance of the default @c time_point_put<CharT> facet.
644
+ * @return @c os.
645
+ */
646
+ template <class CharT, class Traits, class Clock, class Duration>
647
+ std::basic_ostream<CharT, Traits>&
648
+ operator<<(std::basic_ostream<CharT, Traits>& os, const time_point<Clock, Duration>& tp)
649
+ {
650
+
651
+ bool failed = false;
652
+ BOOST_TRY
653
+ {
654
+ std::ios_base::iostate err = std::ios_base::goodbit;
655
+ BOOST_TRY
656
+ {
657
+ typename std::basic_ostream<CharT, Traits>::sentry opfx(os);
658
+ if (bool(opfx))
659
+ {
660
+ if (!std::has_facet<time_point_put<CharT> >(os.getloc()))
661
+ {
662
+ if (time_point_put<CharT> ().put(os, os, os.fill(), tp) .failed())
663
+ {
664
+ err = std::ios_base::badbit;
665
+ }
666
+ }
667
+ else
668
+ {
669
+ if (std::use_facet<time_point_put<CharT> >(os.getloc()) .put(os, os, os.fill(), tp).failed())
670
+ {
671
+ err = std::ios_base::badbit;
672
+ }
673
+ }
674
+ os.width(0);
675
+ }
676
+ }
677
+ BOOST_CATCH (...)
678
+ {
679
+ bool flag = false;
680
+ BOOST_TRY
681
+ {
682
+ os.setstate(std::ios_base::failbit);
683
+ }
684
+ BOOST_CATCH (std::ios_base::failure )
685
+ {
686
+ flag = true;
687
+ }
688
+ BOOST_CATCH_END
689
+ if (flag) throw;
690
+ }
691
+ BOOST_CATCH_END
692
+ if (err) os.setstate(err);
693
+ return os;
694
+ }
695
+ BOOST_CATCH (...)
696
+ {
697
+ failed = true;
698
+ }
699
+ BOOST_CATCH_END
700
+ if (failed) os.setstate(std::ios_base::failbit | std::ios_base::badbit);
701
+ return os;
702
+ }
703
+
704
+ template <class CharT, class Traits, class Clock, class Duration>
705
+ std::basic_istream<CharT, Traits>&
706
+ operator>>(std::basic_istream<CharT, Traits>& is, time_point<Clock, Duration>& tp)
707
+ {
708
+ std::ios_base::iostate err = std::ios_base::goodbit;
709
+
710
+ BOOST_TRY
711
+ {
712
+ typename std::basic_istream<CharT, Traits>::sentry ipfx(is);
713
+ if (bool(ipfx))
714
+ {
715
+ if (!std::has_facet<time_point_get<CharT> >(is.getloc()))
716
+ {
717
+ time_point_get<CharT> ().get(is, std::istreambuf_iterator<CharT, Traits>(), is, err, tp);
718
+ }
719
+ else
720
+ {
721
+ std::use_facet<time_point_get<CharT> >(is.getloc()).get(is, std::istreambuf_iterator<CharT, Traits>(), is,
722
+ err, tp);
723
+ }
724
+ }
725
+ }
726
+ BOOST_CATCH (...)
727
+ {
728
+ bool flag = false;
729
+ BOOST_TRY
730
+ {
731
+ is.setstate(std::ios_base::failbit);
732
+ }
733
+ BOOST_CATCH (std::ios_base::failure )
734
+ {
735
+ flag = true;
736
+ }
737
+ BOOST_CATCH_END
738
+ if (flag) throw;
739
+ }
740
+ BOOST_CATCH_END
741
+ if (err) is.setstate(err);
742
+ return is;
743
+ }
744
+
745
+
746
+ namespace detail
747
+ {
748
+
749
+ //#if BOOST_CHRONO_INTERNAL_TIMEGM
750
+
751
+ inline int32_t is_leap(int32_t year)
752
+ {
753
+ if(year % 400 == 0)
754
+ return 1;
755
+ if(year % 100 == 0)
756
+ return 0;
757
+ if(year % 4 == 0)
758
+ return 1;
759
+ return 0;
760
+ }
761
+ inline int32_t days_from_0(int32_t year)
762
+ {
763
+ year--;
764
+ return 365 * year + (year / 400) - (year/100) + (year / 4);
765
+ }
766
+ inline int32_t days_from_1970(int32_t year)
767
+ {
768
+ static const int days_from_0_to_1970 = days_from_0(1970);
769
+ return days_from_0(year) - days_from_0_to_1970;
770
+ }
771
+ inline int32_t days_from_1jan(int32_t year,int32_t month,int32_t day)
772
+ {
773
+ static const int32_t days[2][12] =
774
+ {
775
+ { 0,31,59,90,120,151,181,212,243,273,304,334},
776
+ { 0,31,60,91,121,152,182,213,244,274,305,335}
777
+ };
778
+
779
+ return days[is_leap(year)][month-1] + day - 1;
780
+ }
781
+
782
+ inline time_t internal_timegm(std::tm const *t)
783
+ {
784
+ int year = t->tm_year + 1900;
785
+ int month = t->tm_mon;
786
+ if(month > 11)
787
+ {
788
+ year += month/12;
789
+ month %= 12;
790
+ }
791
+ else if(month < 0)
792
+ {
793
+ int years_diff = (-month + 11)/12;
794
+ year -= years_diff;
795
+ month+=12 * years_diff;
796
+ }
797
+ month++;
798
+ int day = t->tm_mday;
799
+ int day_of_year = days_from_1jan(year,month,day);
800
+ int days_since_epoch = days_from_1970(year) + day_of_year ;
801
+
802
+ time_t seconds_in_day = 3600 * 24;
803
+ time_t result = seconds_in_day * days_since_epoch + 3600 * t->tm_hour + 60 * t->tm_min + t->tm_sec;
804
+
805
+ return result;
806
+ }
807
+ //#endif
808
+
809
+ /**
810
+ * from_ymd could be made more efficient by using a table
811
+ * day_count_table indexed by the y%400.
812
+ * This table could contain the day_count
813
+ * by*365 + by/4 - by/100 + by/400
814
+ *
815
+ * from_ymd = (by/400)*days_by_400_years+day_count_table[by%400] +
816
+ * days_in_year_before[is_leap_table[by%400]][m-1] + d;
817
+ */
818
+ inline unsigned days_before_years(int32_t y)
819
+ {
820
+ return y * 365 + y / 4 - y / 100 + y / 400;
821
+ }
822
+
823
+ // Returns year/month/day triple in civil calendar
824
+ // Preconditions: z is number of days since 1970-01-01 and is in the range:
825
+ // [numeric_limits<Int>::min(), numeric_limits<Int>::max()-719468].
826
+ template <class Int>
827
+ //constexpr
828
+ void
829
+ inline civil_from_days(Int z, Int& y, unsigned& m, unsigned& d) BOOST_NOEXCEPT
830
+ {
831
+ BOOST_STATIC_ASSERT_MSG(std::numeric_limits<unsigned>::digits >= 18,
832
+ "This algorithm has not been ported to a 16 bit unsigned integer");
833
+ BOOST_STATIC_ASSERT_MSG(std::numeric_limits<Int>::digits >= 20,
834
+ "This algorithm has not been ported to a 16 bit signed integer");
835
+ z += 719468;
836
+ const Int era = (z >= 0 ? z : z - 146096) / 146097;
837
+ const unsigned doe = static_cast<unsigned>(z - era * 146097); // [0, 146096]
838
+ const unsigned yoe = (doe - doe/1460 + doe/36524 - doe/146096) / 365; // [0, 399]
839
+ y = static_cast<Int>(yoe) + era * 400;
840
+ const unsigned doy = doe - (365*yoe + yoe/4 - yoe/100); // [0, 365]
841
+ const unsigned mp = (5*doy + 2)/153; // [0, 11]
842
+ d = doy - (153*mp+2)/5 + 1; // [1, 31]
843
+ m = mp + (mp < 10 ? 3 : -9); // [1, 12]
844
+ y += (m <= 2);
845
+ --m;
846
+ }
847
+ inline std::tm * internal_gmtime(std::time_t const* t, std::tm *tm)
848
+ {
849
+ if (t==0) return 0;
850
+ if (tm==0) return 0;
851
+
852
+ #if 0
853
+ static const unsigned char
854
+ day_of_year_month[2][366] =
855
+ {
856
+ { 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12 },
857
+
858
+ { 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12
859
+
860
+ } };
861
+
862
+ static const int32_t days_in_year_before[2][13] =
863
+ {
864
+ { -1, 30, 58, 89, 119, 150, 180, 211, 242, 272, 303, 333, 364 },
865
+ { -1, 30, 59, 90, 120, 151, 181, 212, 243, 273, 304, 334, 365 }
866
+ };
867
+ #endif
868
+
869
+ const time_t seconds_in_day = 3600 * 24;
870
+ int32_t days_since_epoch = static_cast<int32_t>(*t / seconds_in_day);
871
+ int32_t hms = static_cast<int32_t>(*t - seconds_in_day*days_since_epoch);
872
+ if (hms < 0) {
873
+ days_since_epoch-=1;
874
+ hms = seconds_in_day+hms;
875
+ }
876
+
877
+ #if 0
878
+ int32_t x = days_since_epoch;
879
+ int32_t y = static_cast<int32_t> (static_cast<long long> (x + 2) * 400
880
+ / 146097);
881
+ const int32_t ym1 = y - 1;
882
+ int32_t doy = x - days_before_years(y);
883
+ const int32_t doy1 = x - days_before_years(ym1);
884
+ const int32_t N = std::numeric_limits<int>::digits - 1;
885
+ const int32_t mask1 = doy >> N; // arithmetic rshift - not portable - but nearly universal
886
+ const int32_t mask0 = ~mask1;
887
+ doy = (doy & mask0) | (doy1 & mask1);
888
+ y = (y & mask0) | (ym1 & mask1);
889
+ //y -= 32767 + 2;
890
+ y += 70;
891
+ tm->tm_year=y;
892
+ const int32_t leap = is_leap(y);
893
+ tm->tm_mon = day_of_year_month[leap][doy]-1;
894
+ tm->tm_mday = doy - days_in_year_before[leap][tm->tm_mon] ;
895
+ #else
896
+ int32_t y;
897
+ unsigned m, d;
898
+ civil_from_days(days_since_epoch, y, m, d);
899
+ tm->tm_year=y-1900; tm->tm_mon=m; tm->tm_mday=d;
900
+ #endif
901
+
902
+ tm->tm_hour = hms / 3600;
903
+ const int ms = hms % 3600;
904
+ tm->tm_min = ms / 60;
905
+ tm->tm_sec = ms % 60;
906
+
907
+ tm->tm_isdst = -1;
908
+ (void)mktime(tm);
909
+ return tm;
910
+ }
911
+
912
+ } // detail
913
+ #ifndef BOOST_CHRONO_NO_UTC_TIMEPOINT
914
+
915
+ #if defined BOOST_CHRONO_PROVIDES_DATE_IO_FOR_SYSTEM_CLOCK_TIME_POINT
916
+
917
+ template <class CharT, class Traits, class Duration>
918
+ std::basic_ostream<CharT, Traits>&
919
+ operator<<(std::basic_ostream<CharT, Traits>& os, const time_point<system_clock, Duration>& tp)
920
+ {
921
+ typename std::basic_ostream<CharT, Traits>::sentry ok(os);
922
+ if (bool(ok))
923
+ {
924
+ bool failed = false;
925
+ BOOST_TRY
926
+ {
927
+ const CharT* pb = 0; //nullptr;
928
+ const CharT* pe = pb;
929
+ std::basic_string<CharT> fmt = get_time_fmt<CharT> (os);
930
+ pb = fmt.data();
931
+ pe = pb + fmt.size();
932
+
933
+ timezone tz = get_timezone(os);
934
+ std::locale loc = os.getloc();
935
+ time_t t = system_clock::to_time_t(time_point_cast<system_clock::duration>(tp));
936
+ std::tm tm;
937
+ std::memset(&tm, 0, sizeof(std::tm));
938
+ if (tz == timezone::local)
939
+ {
940
+ #if defined BOOST_WINDOWS && ! defined(__CYGWIN__)
941
+ std::tm *tmp = 0;
942
+ if ((tmp=localtime(&t)) == 0)
943
+ failed = true;
944
+ else
945
+ tm =*tmp;
946
+ #else
947
+ if (localtime_r(&t, &tm) == 0) failed = true;
948
+ #endif
949
+ }
950
+ else
951
+ {
952
+ #if BOOST_CHRONO_INTERNAL_GMTIME
953
+ if (detail::internal_gmtime(&t, &tm) == 0) failed = true;
954
+
955
+ #elif defined BOOST_WINDOWS && ! defined(__CYGWIN__)
956
+ std::tm *tmp = 0;
957
+ if((tmp = gmtime(&t)) == 0)
958
+ failed = true;
959
+ else
960
+ tm = *tmp;
961
+ #else
962
+ if (gmtime_r(&t, &tm) == 0) failed = true;
963
+ tm.tm_isdst = -1;
964
+ (void)mktime(&tm);
965
+
966
+ #endif
967
+
968
+ }
969
+ if (!failed)
970
+ {
971
+ const std::time_put<CharT>& tpf = std::use_facet<std::time_put<CharT> >(loc);
972
+ if (pb == pe)
973
+ {
974
+ CharT pattern[] =
975
+ { '%', 'Y', '-', '%', 'm', '-', '%', 'd', ' ', '%', 'H', ':', '%', 'M', ':' };
976
+ pb = pattern;
977
+ pe = pb + sizeof (pattern) / sizeof(CharT);
978
+ failed = tpf.put(os, os, os.fill(), &tm, pb, pe).failed();
979
+ if (!failed)
980
+ {
981
+ duration<fractional_seconds> d = tp - system_clock::from_time_t(t) + seconds(tm.tm_sec);
982
+ if (d.count() < 10) os << CharT('0');
983
+ //if (! os.good()) {
984
+ // throw "exception";
985
+ //}
986
+ std::ios::fmtflags flgs = os.flags();
987
+ os.setf(std::ios::fixed, std::ios::floatfield);
988
+ //if (! os.good()) {
989
+ //throw "exception";
990
+ //}
991
+ os.precision(9);
992
+ os << d.count();
993
+ //if (! os.good()) {
994
+ //throw "exception";
995
+ //}
996
+ os.flags(flgs);
997
+ if (tz == timezone::local)
998
+ {
999
+ CharT sub_pattern[] =
1000
+ { ' ', '%', 'z' };
1001
+ pb = sub_pattern;
1002
+ pe = pb + +sizeof (sub_pattern) / sizeof(CharT);
1003
+ failed = tpf.put(os, os, os.fill(), &tm, pb, pe).failed();
1004
+ }
1005
+ else
1006
+ {
1007
+ CharT sub_pattern[] =
1008
+ { ' ', '+', '0', '0', '0', '0', 0 };
1009
+ os << sub_pattern;
1010
+ }
1011
+ }
1012
+ }
1013
+ else
1014
+ {
1015
+ failed = tpf.put(os, os, os.fill(), &tm, pb, pe).failed();
1016
+ }
1017
+ }
1018
+ }
1019
+ BOOST_CATCH (...)
1020
+ {
1021
+ failed = true;
1022
+ }
1023
+ BOOST_CATCH_END
1024
+ if (failed)
1025
+ {
1026
+ os.setstate(std::ios_base::failbit | std::ios_base::badbit);
1027
+ }
1028
+ }
1029
+ return os;
1030
+ }
1031
+ #endif
1032
+
1033
+ namespace detail
1034
+ {
1035
+
1036
+ template <class CharT, class InputIterator>
1037
+ minutes extract_z(InputIterator& b, InputIterator e, std::ios_base::iostate& err, const std::ctype<CharT>& ct)
1038
+ {
1039
+ int min = 0;
1040
+ if (b != e)
1041
+ {
1042
+ char cn = ct.narrow(*b, 0);
1043
+ if (cn != '+' && cn != '-')
1044
+ {
1045
+ err |= std::ios_base::failbit;
1046
+ return minutes(0);
1047
+ }
1048
+ int sn = cn == '-' ? -1 : 1;
1049
+ int hr = 0;
1050
+ for (int i = 0; i < 2; ++i)
1051
+ {
1052
+ if (++b == e)
1053
+ {
1054
+ err |= std::ios_base::eofbit | std::ios_base::failbit;
1055
+ return minutes(0);
1056
+ }
1057
+ cn = ct.narrow(*b, 0);
1058
+ if (! ('0' <= cn && cn <= '9'))
1059
+ {
1060
+ err |= std::ios_base::failbit;
1061
+ return minutes(0);
1062
+ }
1063
+ hr = hr * 10 + cn - '0';
1064
+ }
1065
+ for (int i = 0; i < 2; ++i)
1066
+ {
1067
+ if (++b == e)
1068
+ {
1069
+ err |= std::ios_base::eofbit | std::ios_base::failbit;
1070
+ return minutes(0);
1071
+ }
1072
+ cn = ct.narrow(*b, 0);
1073
+ if (! ('0' <= cn && cn <= '9'))
1074
+ {
1075
+ err |= std::ios_base::failbit;
1076
+ return minutes(0);
1077
+ }
1078
+ min = min * 10 + cn - '0';
1079
+ }
1080
+ if (++b == e) {
1081
+ err |= std::ios_base::eofbit;
1082
+ }
1083
+ min += hr * 60;
1084
+ min *= sn;
1085
+ }
1086
+ else
1087
+ {
1088
+ err |= std::ios_base::eofbit | std::ios_base::failbit;
1089
+ }
1090
+ return minutes(min);
1091
+ }
1092
+
1093
+ } // detail
1094
+
1095
+ #if defined BOOST_CHRONO_PROVIDES_DATE_IO_FOR_SYSTEM_CLOCK_TIME_POINT
1096
+
1097
+ template <class CharT, class Traits, class Duration>
1098
+ std::basic_istream<CharT, Traits>&
1099
+ operator>>(std::basic_istream<CharT, Traits>& is, time_point<system_clock, Duration>& tp)
1100
+ {
1101
+ typename std::basic_istream<CharT, Traits>::sentry ok(is);
1102
+ if (bool(ok))
1103
+ {
1104
+ std::ios_base::iostate err = std::ios_base::goodbit;
1105
+ BOOST_TRY
1106
+ {
1107
+ const CharT* pb = 0; //nullptr;
1108
+ const CharT* pe = pb;
1109
+ std::basic_string<CharT> fmt = get_time_fmt<CharT> (is);
1110
+ pb = fmt.data();
1111
+ pe = pb + fmt.size();
1112
+
1113
+ timezone tz = get_timezone(is);
1114
+ std::locale loc = is.getloc();
1115
+ const std::time_get<CharT>& tg = std::use_facet<std::time_get<CharT> >(loc);
1116
+ const std::ctype<CharT>& ct = std::use_facet<std::ctype<CharT> >(loc);
1117
+ tm tm; // {0}
1118
+ std::memset(&tm, 0, sizeof(std::tm));
1119
+
1120
+ typedef std::istreambuf_iterator<CharT, Traits> It;
1121
+ if (pb == pe)
1122
+ {
1123
+ CharT pattern[] =
1124
+ { '%', 'Y', '-', '%', 'm', '-', '%', 'd', ' ', '%', 'H', ':', '%', 'M', ':' };
1125
+ pb = pattern;
1126
+ pe = pb + sizeof (pattern) / sizeof(CharT);
1127
+
1128
+ #if defined BOOST_CHRONO_USES_INTERNAL_TIME_GET
1129
+ const detail::time_get<CharT>& dtg(tg);
1130
+ dtg.get(is, 0, is, err, &tm, pb, pe);
1131
+ #else
1132
+ tg.get(is, 0, is, err, &tm, pb, pe);
1133
+ #endif
1134
+ if (err & std::ios_base::failbit) goto exit;
1135
+ fractional_seconds sec;
1136
+ CharT c = CharT();
1137
+ std::ios::fmtflags flgs = is.flags();
1138
+ is.setf(std::ios::fixed, std::ios::floatfield);
1139
+ is.precision(9);
1140
+ is >> sec;
1141
+ is.flags(flgs);
1142
+ if (is.fail())
1143
+ {
1144
+ err |= std::ios_base::failbit;
1145
+ goto exit;
1146
+ }
1147
+ It i(is);
1148
+ It eof;
1149
+ c = *i;
1150
+ if (++i == eof || c != ' ')
1151
+ {
1152
+ err |= std::ios_base::failbit;
1153
+ goto exit;
1154
+ }
1155
+ minutes min = detail::extract_z(i, eof, err, ct);
1156
+
1157
+ if (err & std::ios_base::failbit) goto exit;
1158
+ time_t t;
1159
+
1160
+ #if BOOST_CHRONO_INTERNAL_TIMEGM
1161
+ t = detail::internal_timegm(&tm);
1162
+ #else
1163
+ t = timegm(&tm);
1164
+ #endif
1165
+ tp = time_point_cast<Duration>(
1166
+ system_clock::from_time_t(t) - min + round<system_clock::duration> (duration<fractional_seconds> (sec))
1167
+ );
1168
+ }
1169
+ else
1170
+ {
1171
+ const CharT z[2] =
1172
+ { '%', 'z' };
1173
+ const CharT* fz = std::search(pb, pe, z, z + 2);
1174
+ #if defined BOOST_CHRONO_USES_INTERNAL_TIME_GET
1175
+ const detail::time_get<CharT>& dtg(tg);
1176
+ dtg.get(is, 0, is, err, &tm, pb, fz);
1177
+ #else
1178
+ tg.get(is, 0, is, err, &tm, pb, fz);
1179
+ #endif
1180
+ minutes minu(0);
1181
+ if (fz != pe)
1182
+ {
1183
+ if (err != std::ios_base::goodbit)
1184
+ {
1185
+ err |= std::ios_base::failbit;
1186
+ goto exit;
1187
+ }
1188
+ It i(is);
1189
+ It eof;
1190
+ minu = detail::extract_z(i, eof, err, ct);
1191
+ if (err & std::ios_base::failbit) goto exit;
1192
+ if (fz + 2 != pe)
1193
+ {
1194
+ if (err != std::ios_base::goodbit)
1195
+ {
1196
+ err |= std::ios_base::failbit;
1197
+ goto exit;
1198
+ }
1199
+ #if defined BOOST_CHRONO_USES_INTERNAL_TIME_GET
1200
+ const detail::time_get<CharT>& dtg(tg);
1201
+ dtg.get(is, 0, is, err, &tm, fz + 2, pe);
1202
+ #else
1203
+ tg.get(is, 0, is, err, &tm, fz + 2, pe);
1204
+ #endif
1205
+ if (err & std::ios_base::failbit) goto exit;
1206
+ }
1207
+ }
1208
+ tm.tm_isdst = -1;
1209
+ time_t t;
1210
+ if (tz == timezone::utc || fz != pe)
1211
+ {
1212
+ #if BOOST_CHRONO_INTERNAL_TIMEGM
1213
+ t = detail::internal_timegm(&tm);
1214
+ #else
1215
+ t = timegm(&tm);
1216
+ #endif
1217
+ }
1218
+ else
1219
+ {
1220
+ t = mktime(&tm);
1221
+ }
1222
+ tp = time_point_cast<Duration>(
1223
+ system_clock::from_time_t(t) - minu
1224
+ );
1225
+ }
1226
+ }
1227
+ BOOST_CATCH (...)
1228
+ {
1229
+ err |= std::ios_base::badbit | std::ios_base::failbit;
1230
+ }
1231
+ BOOST_CATCH_END
1232
+ exit: is.setstate(err);
1233
+ }
1234
+ return is;
1235
+ }
1236
+
1237
+ #endif
1238
+ #endif //UTC
1239
+ } // chrono
1240
+
1241
+ }
1242
+
1243
+ #endif // header