├── .gitattributes ├── .github └── workflows │ ├── codeql-analysis.yml │ ├── luarocks.yml │ ├── release.yml │ └── test.yml ├── .gitignore ├── .vscode └── settings.json ├── CMakeLists.txt ├── Jenkinsfile ├── LICENSE_1_0.txt ├── Lua-CMakeLists.txt ├── README.md ├── cmake ├── FindLua.cmake ├── ReduceDependencies.cmake └── Toolchain-cross-mingw32-linux.cmake ├── include └── lrdb │ ├── basic_server.hpp │ ├── client.hpp │ ├── command_stream │ ├── socket.hpp │ └── stdstream.hpp │ ├── debugger.hpp │ ├── message.hpp │ ├── optional.hpp │ └── server.hpp ├── lrdb-0.3.1-1.rockspec ├── luarocks_cmake.txt ├── node ├── .eslintignore ├── .eslintrc.js ├── .gitignore ├── .npmignore ├── .prettierignore ├── .prettierrc.json ├── README.md ├── bin │ ├── ChildDebuggableLua.js │ └── node_lua_with_lrdb.d.ts ├── jest.config.js ├── package-lock.json ├── package.json ├── src │ ├── Adapter │ │ ├── ChildProcessAdapter.ts │ │ ├── TcpAdapter.ts │ │ └── index.ts │ ├── Client.ts │ ├── JsonRpc.ts │ ├── LuaWasm.ts │ ├── TypedEventEmitter.ts │ ├── __tests__ │ │ ├── ChildProcessClient.test.ts │ │ ├── __snapshots__ │ │ │ └── ChildProcessClient.test.ts.snap │ │ └── node_lua_with_lrdb.test.ts │ └── index.ts └── tsconfig.json ├── renovate.json ├── src ├── debug_server_module.cpp ├── lua_with_lrdb_server.cpp └── node_lua_with_lrdb.cpp ├── test ├── kaguya.hpp ├── lrdb_server_test.cpp ├── lrdb_server_test1.cpp ├── lua │ ├── break_coroutine_test1.lua │ ├── env_change_test1.lua │ ├── eval_test1.lua │ ├── eval_test2.lua │ ├── get_local_var_test1.lua │ ├── infinite_loop.lua │ ├── loadmodule.lua │ ├── loop_test.lua │ ├── require_module.lua │ ├── step_in_test1.lua │ ├── step_out_test1.lua │ ├── step_over_test1.lua │ ├── table.lua │ ├── test1.lua │ └── vaarg_test1.lua └── lua_debugger_test.cpp ├── test_runner.py └── third_party ├── asio ├── .gitignore └── asio │ ├── COPYING │ ├── INSTALL │ ├── LICENSE_1_0.txt │ ├── Makefile.am │ ├── Makefile.in │ ├── README │ ├── aclocal.m4 │ ├── compile │ ├── config.guess │ ├── config.sub │ ├── configure │ ├── configure.ac │ ├── depcomp │ ├── include │ ├── Makefile.am │ ├── Makefile.in │ ├── asio.hpp │ └── asio │ │ ├── async_result.hpp │ │ ├── basic_datagram_socket.hpp │ │ ├── basic_deadline_timer.hpp │ │ ├── basic_io_object.hpp │ │ ├── basic_raw_socket.hpp │ │ ├── basic_seq_packet_socket.hpp │ │ ├── basic_serial_port.hpp │ │ ├── basic_signal_set.hpp │ │ ├── basic_socket.hpp │ │ ├── basic_socket_acceptor.hpp │ │ ├── basic_socket_iostream.hpp │ │ ├── basic_socket_streambuf.hpp │ │ ├── basic_stream_socket.hpp │ │ ├── basic_streambuf.hpp │ │ ├── basic_streambuf_fwd.hpp │ │ ├── basic_waitable_timer.hpp │ │ ├── buffer.hpp │ │ ├── buffered_read_stream.hpp │ │ ├── buffered_read_stream_fwd.hpp │ │ ├── buffered_stream.hpp │ │ ├── buffered_stream_fwd.hpp │ │ ├── buffered_write_stream.hpp │ │ ├── buffered_write_stream_fwd.hpp │ │ ├── buffers_iterator.hpp │ │ ├── completion_condition.hpp │ │ ├── connect.hpp │ │ ├── coroutine.hpp │ │ ├── datagram_socket_service.hpp │ │ ├── deadline_timer.hpp │ │ ├── deadline_timer_service.hpp │ │ ├── detail │ │ ├── addressof.hpp │ │ ├── array.hpp │ │ ├── array_fwd.hpp │ │ ├── assert.hpp │ │ ├── atomic_count.hpp │ │ ├── base_from_completion_cond.hpp │ │ ├── bind_handler.hpp │ │ ├── buffer_resize_guard.hpp │ │ ├── buffer_sequence_adapter.hpp │ │ ├── buffered_stream_storage.hpp │ │ ├── call_stack.hpp │ │ ├── chrono_time_traits.hpp │ │ ├── completion_handler.hpp │ │ ├── config.hpp │ │ ├── consuming_buffers.hpp │ │ ├── cstdint.hpp │ │ ├── date_time_fwd.hpp │ │ ├── deadline_timer_service.hpp │ │ ├── dependent_type.hpp │ │ ├── descriptor_ops.hpp │ │ ├── descriptor_read_op.hpp │ │ ├── descriptor_write_op.hpp │ │ ├── dev_poll_reactor.hpp │ │ ├── epoll_reactor.hpp │ │ ├── event.hpp │ │ ├── eventfd_select_interrupter.hpp │ │ ├── fd_set_adapter.hpp │ │ ├── fenced_block.hpp │ │ ├── function.hpp │ │ ├── gcc_arm_fenced_block.hpp │ │ ├── gcc_hppa_fenced_block.hpp │ │ ├── gcc_sync_fenced_block.hpp │ │ ├── gcc_x86_fenced_block.hpp │ │ ├── handler_alloc_helpers.hpp │ │ ├── handler_cont_helpers.hpp │ │ ├── handler_invoke_helpers.hpp │ │ ├── handler_tracking.hpp │ │ ├── handler_type_requirements.hpp │ │ ├── hash_map.hpp │ │ ├── impl │ │ │ ├── buffer_sequence_adapter.ipp │ │ │ ├── descriptor_ops.ipp │ │ │ ├── dev_poll_reactor.hpp │ │ │ ├── dev_poll_reactor.ipp │ │ │ ├── epoll_reactor.hpp │ │ │ ├── epoll_reactor.ipp │ │ │ ├── eventfd_select_interrupter.ipp │ │ │ ├── handler_tracking.ipp │ │ │ ├── kqueue_reactor.hpp │ │ │ ├── kqueue_reactor.ipp │ │ │ ├── pipe_select_interrupter.ipp │ │ │ ├── posix_event.ipp │ │ │ ├── posix_mutex.ipp │ │ │ ├── posix_thread.ipp │ │ │ ├── posix_tss_ptr.ipp │ │ │ ├── reactive_descriptor_service.ipp │ │ │ ├── reactive_serial_port_service.ipp │ │ │ ├── reactive_socket_service_base.ipp │ │ │ ├── resolver_service_base.ipp │ │ │ ├── select_reactor.hpp │ │ │ ├── select_reactor.ipp │ │ │ ├── service_registry.hpp │ │ │ ├── service_registry.ipp │ │ │ ├── signal_set_service.ipp │ │ │ ├── socket_ops.ipp │ │ │ ├── socket_select_interrupter.ipp │ │ │ ├── strand_service.hpp │ │ │ ├── strand_service.ipp │ │ │ ├── task_io_service.hpp │ │ │ ├── task_io_service.ipp │ │ │ ├── throw_error.ipp │ │ │ ├── timer_queue_ptime.ipp │ │ │ ├── timer_queue_set.ipp │ │ │ ├── win_event.ipp │ │ │ ├── win_iocp_handle_service.ipp │ │ │ ├── win_iocp_io_service.hpp │ │ │ ├── win_iocp_io_service.ipp │ │ │ ├── win_iocp_serial_port_service.ipp │ │ │ ├── win_iocp_socket_service_base.ipp │ │ │ ├── win_mutex.ipp │ │ │ ├── win_object_handle_service.ipp │ │ │ ├── win_static_mutex.ipp │ │ │ ├── win_thread.ipp │ │ │ ├── win_tss_ptr.ipp │ │ │ ├── winrt_ssocket_service_base.ipp │ │ │ ├── winrt_timer_scheduler.hpp │ │ │ ├── winrt_timer_scheduler.ipp │ │ │ └── winsock_init.ipp │ │ ├── io_control.hpp │ │ ├── keyword_tss_ptr.hpp │ │ ├── kqueue_reactor.hpp │ │ ├── limits.hpp │ │ ├── local_free_on_block_exit.hpp │ │ ├── macos_fenced_block.hpp │ │ ├── mutex.hpp │ │ ├── noncopyable.hpp │ │ ├── null_event.hpp │ │ ├── null_fenced_block.hpp │ │ ├── null_mutex.hpp │ │ ├── null_reactor.hpp │ │ ├── null_signal_blocker.hpp │ │ ├── null_socket_service.hpp │ │ ├── null_static_mutex.hpp │ │ ├── null_thread.hpp │ │ ├── null_tss_ptr.hpp │ │ ├── object_pool.hpp │ │ ├── old_win_sdk_compat.hpp │ │ ├── op_queue.hpp │ │ ├── operation.hpp │ │ ├── pipe_select_interrupter.hpp │ │ ├── pop_options.hpp │ │ ├── posix_event.hpp │ │ ├── posix_fd_set_adapter.hpp │ │ ├── posix_mutex.hpp │ │ ├── posix_signal_blocker.hpp │ │ ├── posix_static_mutex.hpp │ │ ├── posix_thread.hpp │ │ ├── posix_tss_ptr.hpp │ │ ├── push_options.hpp │ │ ├── reactive_descriptor_service.hpp │ │ ├── reactive_null_buffers_op.hpp │ │ ├── reactive_serial_port_service.hpp │ │ ├── reactive_socket_accept_op.hpp │ │ ├── reactive_socket_connect_op.hpp │ │ ├── reactive_socket_recv_op.hpp │ │ ├── reactive_socket_recvfrom_op.hpp │ │ ├── reactive_socket_recvmsg_op.hpp │ │ ├── reactive_socket_send_op.hpp │ │ ├── reactive_socket_sendto_op.hpp │ │ ├── reactive_socket_service.hpp │ │ ├── reactive_socket_service_base.hpp │ │ ├── reactor.hpp │ │ ├── reactor_fwd.hpp │ │ ├── reactor_op.hpp │ │ ├── reactor_op_queue.hpp │ │ ├── regex_fwd.hpp │ │ ├── resolve_endpoint_op.hpp │ │ ├── resolve_op.hpp │ │ ├── resolver_service.hpp │ │ ├── resolver_service_base.hpp │ │ ├── scoped_lock.hpp │ │ ├── scoped_ptr.hpp │ │ ├── select_interrupter.hpp │ │ ├── select_reactor.hpp │ │ ├── service_registry.hpp │ │ ├── shared_ptr.hpp │ │ ├── signal_blocker.hpp │ │ ├── signal_handler.hpp │ │ ├── signal_init.hpp │ │ ├── signal_op.hpp │ │ ├── signal_set_service.hpp │ │ ├── socket_holder.hpp │ │ ├── socket_ops.hpp │ │ ├── socket_option.hpp │ │ ├── socket_select_interrupter.hpp │ │ ├── socket_types.hpp │ │ ├── solaris_fenced_block.hpp │ │ ├── static_mutex.hpp │ │ ├── std_event.hpp │ │ ├── std_mutex.hpp │ │ ├── std_static_mutex.hpp │ │ ├── std_thread.hpp │ │ ├── strand_service.hpp │ │ ├── task_io_service.hpp │ │ ├── task_io_service_operation.hpp │ │ ├── task_io_service_thread_info.hpp │ │ ├── thread.hpp │ │ ├── thread_info_base.hpp │ │ ├── throw_error.hpp │ │ ├── throw_exception.hpp │ │ ├── timer_queue.hpp │ │ ├── timer_queue_base.hpp │ │ ├── timer_queue_ptime.hpp │ │ ├── timer_queue_set.hpp │ │ ├── timer_scheduler.hpp │ │ ├── timer_scheduler_fwd.hpp │ │ ├── tss_ptr.hpp │ │ ├── type_traits.hpp │ │ ├── variadic_templates.hpp │ │ ├── wait_handler.hpp │ │ ├── wait_op.hpp │ │ ├── weak_ptr.hpp │ │ ├── win_event.hpp │ │ ├── win_fd_set_adapter.hpp │ │ ├── win_fenced_block.hpp │ │ ├── win_iocp_handle_read_op.hpp │ │ ├── win_iocp_handle_service.hpp │ │ ├── win_iocp_handle_write_op.hpp │ │ ├── win_iocp_io_service.hpp │ │ ├── win_iocp_null_buffers_op.hpp │ │ ├── win_iocp_operation.hpp │ │ ├── win_iocp_overlapped_op.hpp │ │ ├── win_iocp_overlapped_ptr.hpp │ │ ├── win_iocp_serial_port_service.hpp │ │ ├── win_iocp_socket_accept_op.hpp │ │ ├── win_iocp_socket_connect_op.hpp │ │ ├── win_iocp_socket_recv_op.hpp │ │ ├── win_iocp_socket_recvfrom_op.hpp │ │ ├── win_iocp_socket_recvmsg_op.hpp │ │ ├── win_iocp_socket_send_op.hpp │ │ ├── win_iocp_socket_service.hpp │ │ ├── win_iocp_socket_service_base.hpp │ │ ├── win_iocp_thread_info.hpp │ │ ├── win_mutex.hpp │ │ ├── win_object_handle_service.hpp │ │ ├── win_static_mutex.hpp │ │ ├── win_thread.hpp │ │ ├── win_tss_ptr.hpp │ │ ├── wince_thread.hpp │ │ ├── winrt_async_manager.hpp │ │ ├── winrt_async_op.hpp │ │ ├── winrt_resolve_op.hpp │ │ ├── winrt_resolver_service.hpp │ │ ├── winrt_socket_connect_op.hpp │ │ ├── winrt_socket_recv_op.hpp │ │ ├── winrt_socket_send_op.hpp │ │ ├── winrt_ssocket_service.hpp │ │ ├── winrt_ssocket_service_base.hpp │ │ ├── winrt_timer_scheduler.hpp │ │ ├── winrt_utils.hpp │ │ ├── winsock_init.hpp │ │ └── wrapped_handler.hpp │ │ ├── error.hpp │ │ ├── error_code.hpp │ │ ├── generic │ │ ├── basic_endpoint.hpp │ │ ├── datagram_protocol.hpp │ │ ├── detail │ │ │ ├── endpoint.hpp │ │ │ └── impl │ │ │ │ └── endpoint.ipp │ │ ├── raw_protocol.hpp │ │ ├── seq_packet_protocol.hpp │ │ └── stream_protocol.hpp │ │ ├── handler_alloc_hook.hpp │ │ ├── handler_continuation_hook.hpp │ │ ├── handler_invoke_hook.hpp │ │ ├── handler_type.hpp │ │ ├── high_resolution_timer.hpp │ │ ├── impl │ │ ├── buffered_read_stream.hpp │ │ ├── buffered_write_stream.hpp │ │ ├── connect.hpp │ │ ├── error.ipp │ │ ├── error_code.ipp │ │ ├── handler_alloc_hook.ipp │ │ ├── io_service.hpp │ │ ├── io_service.ipp │ │ ├── read.hpp │ │ ├── read_at.hpp │ │ ├── read_until.hpp │ │ ├── serial_port_base.hpp │ │ ├── serial_port_base.ipp │ │ ├── spawn.hpp │ │ ├── src.cpp │ │ ├── src.hpp │ │ ├── use_future.hpp │ │ ├── write.hpp │ │ └── write_at.hpp │ │ ├── io_service.hpp │ │ ├── ip │ │ ├── address.hpp │ │ ├── address_v4.hpp │ │ ├── address_v6.hpp │ │ ├── basic_endpoint.hpp │ │ ├── basic_resolver.hpp │ │ ├── basic_resolver_entry.hpp │ │ ├── basic_resolver_iterator.hpp │ │ ├── basic_resolver_query.hpp │ │ ├── detail │ │ │ ├── endpoint.hpp │ │ │ ├── impl │ │ │ │ └── endpoint.ipp │ │ │ └── socket_option.hpp │ │ ├── host_name.hpp │ │ ├── icmp.hpp │ │ ├── impl │ │ │ ├── address.hpp │ │ │ ├── address.ipp │ │ │ ├── address_v4.hpp │ │ │ ├── address_v4.ipp │ │ │ ├── address_v6.hpp │ │ │ ├── address_v6.ipp │ │ │ ├── basic_endpoint.hpp │ │ │ └── host_name.ipp │ │ ├── multicast.hpp │ │ ├── resolver_query_base.hpp │ │ ├── resolver_service.hpp │ │ ├── tcp.hpp │ │ ├── udp.hpp │ │ ├── unicast.hpp │ │ └── v6_only.hpp │ │ ├── is_read_buffered.hpp │ │ ├── is_write_buffered.hpp │ │ ├── local │ │ ├── basic_endpoint.hpp │ │ ├── connect_pair.hpp │ │ ├── datagram_protocol.hpp │ │ ├── detail │ │ │ ├── endpoint.hpp │ │ │ └── impl │ │ │ │ └── endpoint.ipp │ │ └── stream_protocol.hpp │ │ ├── placeholders.hpp │ │ ├── posix │ │ ├── basic_descriptor.hpp │ │ ├── basic_stream_descriptor.hpp │ │ ├── descriptor_base.hpp │ │ ├── stream_descriptor.hpp │ │ └── stream_descriptor_service.hpp │ │ ├── raw_socket_service.hpp │ │ ├── read.hpp │ │ ├── read_at.hpp │ │ ├── read_until.hpp │ │ ├── seq_packet_socket_service.hpp │ │ ├── serial_port.hpp │ │ ├── serial_port_base.hpp │ │ ├── serial_port_service.hpp │ │ ├── signal_set.hpp │ │ ├── signal_set_service.hpp │ │ ├── socket_acceptor_service.hpp │ │ ├── socket_base.hpp │ │ ├── spawn.hpp │ │ ├── ssl.hpp │ │ ├── ssl │ │ ├── basic_context.hpp │ │ ├── context.hpp │ │ ├── context_base.hpp │ │ ├── context_service.hpp │ │ ├── detail │ │ │ ├── buffered_handshake_op.hpp │ │ │ ├── engine.hpp │ │ │ ├── handshake_op.hpp │ │ │ ├── impl │ │ │ │ ├── engine.ipp │ │ │ │ └── openssl_init.ipp │ │ │ ├── io.hpp │ │ │ ├── openssl_init.hpp │ │ │ ├── openssl_types.hpp │ │ │ ├── password_callback.hpp │ │ │ ├── read_op.hpp │ │ │ ├── shutdown_op.hpp │ │ │ ├── stream_core.hpp │ │ │ ├── verify_callback.hpp │ │ │ └── write_op.hpp │ │ ├── error.hpp │ │ ├── impl │ │ │ ├── context.hpp │ │ │ ├── context.ipp │ │ │ ├── error.ipp │ │ │ ├── rfc2818_verification.ipp │ │ │ └── src.hpp │ │ ├── old │ │ │ ├── basic_context.hpp │ │ │ ├── context_service.hpp │ │ │ ├── detail │ │ │ │ ├── openssl_context_service.hpp │ │ │ │ ├── openssl_operation.hpp │ │ │ │ └── openssl_stream_service.hpp │ │ │ ├── stream.hpp │ │ │ └── stream_service.hpp │ │ ├── rfc2818_verification.hpp │ │ ├── stream.hpp │ │ ├── stream_base.hpp │ │ ├── stream_service.hpp │ │ ├── verify_context.hpp │ │ └── verify_mode.hpp │ │ ├── steady_timer.hpp │ │ ├── strand.hpp │ │ ├── stream_socket_service.hpp │ │ ├── streambuf.hpp │ │ ├── system_error.hpp │ │ ├── system_timer.hpp │ │ ├── thread.hpp │ │ ├── time_traits.hpp │ │ ├── unyield.hpp │ │ ├── use_future.hpp │ │ ├── version.hpp │ │ ├── wait_traits.hpp │ │ ├── waitable_timer_service.hpp │ │ ├── windows │ │ ├── basic_handle.hpp │ │ ├── basic_object_handle.hpp │ │ ├── basic_random_access_handle.hpp │ │ ├── basic_stream_handle.hpp │ │ ├── object_handle.hpp │ │ ├── object_handle_service.hpp │ │ ├── overlapped_ptr.hpp │ │ ├── random_access_handle.hpp │ │ ├── random_access_handle_service.hpp │ │ ├── stream_handle.hpp │ │ └── stream_handle_service.hpp │ │ ├── write.hpp │ │ ├── write_at.hpp │ │ └── yield.hpp │ ├── install-sh │ ├── missing │ └── test-driver ├── googletest ├── .gitignore ├── CHANGES ├── CMakeLists.txt ├── CONTRIBUTORS ├── LICENSE ├── Makefile.am ├── README.md ├── build-aux │ └── .keep ├── cmake │ └── internal_utils.cmake ├── codegear │ ├── gtest.cbproj │ ├── gtest.groupproj │ ├── gtest_all.cc │ ├── gtest_link.cc │ ├── gtest_main.cbproj │ └── gtest_unittest.cbproj ├── configure.ac ├── docs │ ├── AdvancedGuide.md │ ├── DevGuide.md │ ├── Documentation.md │ ├── FAQ.md │ ├── Primer.md │ ├── PumpManual.md │ ├── Samples.md │ ├── V1_5_AdvancedGuide.md │ ├── V1_5_Documentation.md │ ├── V1_5_FAQ.md │ ├── V1_5_Primer.md │ ├── V1_5_PumpManual.md │ ├── V1_5_XcodeGuide.md │ ├── V1_6_AdvancedGuide.md │ ├── V1_6_Documentation.md │ ├── V1_6_FAQ.md │ ├── V1_6_Primer.md │ ├── V1_6_PumpManual.md │ ├── V1_6_Samples.md │ ├── V1_6_XcodeGuide.md │ ├── V1_7_AdvancedGuide.md │ ├── V1_7_Documentation.md │ ├── V1_7_FAQ.md │ ├── V1_7_Primer.md │ ├── V1_7_PumpManual.md │ ├── V1_7_Samples.md │ ├── V1_7_XcodeGuide.md │ └── XcodeGuide.md ├── include │ └── gtest │ │ ├── gtest-death-test.h │ │ ├── gtest-message.h │ │ ├── gtest-param-test.h │ │ ├── gtest-param-test.h.pump │ │ ├── gtest-printers.h │ │ ├── gtest-spi.h │ │ ├── gtest-test-part.h │ │ ├── gtest-typed-test.h │ │ ├── gtest.h │ │ ├── gtest_pred_impl.h │ │ ├── gtest_prod.h │ │ └── internal │ │ ├── custom │ │ ├── gtest-port.h │ │ ├── gtest-printers.h │ │ └── gtest.h │ │ ├── gtest-death-test-internal.h │ │ ├── gtest-filepath.h │ │ ├── gtest-internal.h │ │ ├── gtest-linked_ptr.h │ │ ├── gtest-param-util-generated.h │ │ ├── gtest-param-util-generated.h.pump │ │ ├── gtest-param-util.h │ │ ├── gtest-port-arch.h │ │ ├── gtest-port.h │ │ ├── gtest-string.h │ │ ├── gtest-tuple.h │ │ ├── gtest-tuple.h.pump │ │ ├── gtest-type-util.h │ │ └── gtest-type-util.h.pump ├── m4 │ ├── acx_pthread.m4 │ └── gtest.m4 ├── make │ └── Makefile ├── msvc │ ├── gtest-md.sln │ ├── gtest-md.vcproj │ ├── gtest.sln │ ├── gtest.vcproj │ ├── gtest_main-md.vcproj │ ├── gtest_main.vcproj │ ├── gtest_prod_test-md.vcproj │ ├── gtest_prod_test.vcproj │ ├── gtest_unittest-md.vcproj │ └── gtest_unittest.vcproj ├── samples │ ├── prime_tables.h │ ├── sample1.cc │ ├── sample1.h │ ├── sample10_unittest.cc │ ├── sample1_unittest.cc │ ├── sample2.cc │ ├── sample2.h │ ├── sample2_unittest.cc │ ├── sample3-inl.h │ ├── sample3_unittest.cc │ ├── sample4.cc │ ├── sample4.h │ ├── sample4_unittest.cc │ ├── sample5_unittest.cc │ ├── sample6_unittest.cc │ ├── sample7_unittest.cc │ ├── sample8_unittest.cc │ └── sample9_unittest.cc ├── scripts │ ├── common.py │ ├── fuse_gtest_files.py │ ├── gen_gtest_pred_impl.py │ ├── gtest-config.in │ ├── pump.py │ ├── release_docs.py │ ├── test │ │ └── Makefile │ ├── upload.py │ └── upload_gtest.py ├── src │ ├── gtest-all.cc │ ├── gtest-death-test.cc │ ├── gtest-filepath.cc │ ├── gtest-internal-inl.h │ ├── gtest-port.cc │ ├── gtest-printers.cc │ ├── gtest-test-part.cc │ ├── gtest-typed-test.cc │ ├── gtest.cc │ └── gtest_main.cc ├── test │ ├── gtest-death-test_ex_test.cc │ ├── gtest-death-test_test.cc │ ├── gtest-filepath_test.cc │ ├── gtest-linked_ptr_test.cc │ ├── gtest-listener_test.cc │ ├── gtest-message_test.cc │ ├── gtest-options_test.cc │ ├── gtest-param-test2_test.cc │ ├── gtest-param-test_test.cc │ ├── gtest-param-test_test.h │ ├── gtest-port_test.cc │ ├── gtest-printers_test.cc │ ├── gtest-test-part_test.cc │ ├── gtest-tuple_test.cc │ ├── gtest-typed-test2_test.cc │ ├── gtest-typed-test_test.cc │ ├── gtest-typed-test_test.h │ ├── gtest-unittest-api_test.cc │ ├── gtest_all_test.cc │ ├── gtest_break_on_failure_unittest.py │ ├── gtest_break_on_failure_unittest_.cc │ ├── gtest_catch_exceptions_test.py │ ├── gtest_catch_exceptions_test_.cc │ ├── gtest_color_test.py │ ├── gtest_color_test_.cc │ ├── gtest_env_var_test.py │ ├── gtest_env_var_test_.cc │ ├── gtest_environment_test.cc │ ├── gtest_filter_unittest.py │ ├── gtest_filter_unittest_.cc │ ├── gtest_help_test.py │ ├── gtest_help_test_.cc │ ├── gtest_list_tests_unittest.py │ ├── gtest_list_tests_unittest_.cc │ ├── gtest_main_unittest.cc │ ├── gtest_no_test_unittest.cc │ ├── gtest_output_test.py │ ├── gtest_output_test_.cc │ ├── gtest_output_test_golden_lin.txt │ ├── gtest_pred_impl_unittest.cc │ ├── gtest_premature_exit_test.cc │ ├── gtest_prod_test.cc │ ├── gtest_repeat_test.cc │ ├── gtest_shuffle_test.py │ ├── gtest_shuffle_test_.cc │ ├── gtest_sole_header_test.cc │ ├── gtest_stress_test.cc │ ├── gtest_test_utils.py │ ├── gtest_throw_on_failure_ex_test.cc │ ├── gtest_throw_on_failure_test.py │ ├── gtest_throw_on_failure_test_.cc │ ├── gtest_uninitialized_test.py │ ├── gtest_uninitialized_test_.cc │ ├── gtest_unittest.cc │ ├── gtest_xml_outfile1_test_.cc │ ├── gtest_xml_outfile2_test_.cc │ ├── gtest_xml_outfiles_test.py │ ├── gtest_xml_output_unittest.py │ ├── gtest_xml_output_unittest_.cc │ ├── gtest_xml_test_utils.py │ ├── production.cc │ └── production.h └── xcode │ ├── Config │ ├── DebugProject.xcconfig │ ├── FrameworkTarget.xcconfig │ ├── General.xcconfig │ ├── ReleaseProject.xcconfig │ ├── StaticLibraryTarget.xcconfig │ └── TestTarget.xcconfig │ ├── Resources │ └── Info.plist │ ├── Samples │ └── FrameworkSample │ │ ├── Info.plist │ │ ├── WidgetFramework.xcodeproj │ │ └── project.pbxproj │ │ ├── runtests.sh │ │ ├── widget.cc │ │ ├── widget.h │ │ └── widget_test.cc │ ├── Scripts │ ├── runtests.sh │ └── versiongenerate.py │ └── gtest.xcodeproj │ └── project.pbxproj ├── lua-5.3.4 ├── Makefile ├── README ├── doc │ ├── contents.html │ ├── index.css │ ├── logo.gif │ ├── lua.1 │ ├── lua.css │ ├── luac.1 │ ├── manual.css │ ├── manual.html │ ├── osi-certified-72x60.png │ └── readme.html └── src │ ├── Makefile │ ├── lapi.c │ ├── lapi.h │ ├── lauxlib.c │ ├── lauxlib.h │ ├── lbaselib.c │ ├── lbitlib.c │ ├── lcode.c │ ├── lcode.h │ ├── lcorolib.c │ ├── lctype.c │ ├── lctype.h │ ├── ldblib.c │ ├── ldebug.c │ ├── ldebug.h │ ├── ldo.c │ ├── ldo.h │ ├── ldump.c │ ├── lfunc.c │ ├── lfunc.h │ ├── lgc.c │ ├── lgc.h │ ├── linit.c │ ├── liolib.c │ ├── llex.c │ ├── llex.h │ ├── llimits.h │ ├── lmathlib.c │ ├── lmem.c │ ├── lmem.h │ ├── loadlib.c │ ├── lobject.c │ ├── lobject.h │ ├── lopcodes.c │ ├── lopcodes.h │ ├── loslib.c │ ├── lparser.c │ ├── lparser.h │ ├── lprefix.h │ ├── lstate.c │ ├── lstate.h │ ├── lstring.c │ ├── lstring.h │ ├── lstrlib.c │ ├── ltable.c │ ├── ltable.h │ ├── ltablib.c │ ├── ltm.c │ ├── ltm.h │ ├── lua.c │ ├── lua.h │ ├── lua.hpp │ ├── luac.c │ ├── luaconf.h │ ├── lualib.h │ ├── lundump.c │ ├── lundump.h │ ├── lutf8lib.c │ ├── lvm.c │ ├── lvm.h │ ├── lzio.c │ └── lzio.h └── picojson ├── .gitignore ├── .gitmodules ├── .travis.yml ├── Changes ├── LICENSE ├── Makefile ├── README.mkdn ├── examples ├── github-issues.cc ├── iostream.cc └── streaming.cc ├── picojson.h ├── picotest ├── picotest.c └── picotest.h └── test.cc /.gitattributes: -------------------------------------------------------------------------------- 1 | # Auto detect text files and perform LF normalization 2 | * text=auto 3 | 4 | # Custom for Visual Studio 5 | *.cs diff=csharp 6 | 7 | # Standard to msysgit 8 | *.doc diff=astextplain 9 | *.DOC diff=astextplain 10 | *.docx diff=astextplain 11 | *.DOCX diff=astextplain 12 | *.dot diff=astextplain 13 | *.DOT diff=astextplain 14 | *.pdf diff=astextplain 15 | *.PDF diff=astextplain 16 | *.rtf diff=astextplain 17 | *.RTF diff=astextplain 18 | -------------------------------------------------------------------------------- /.github/workflows/luarocks.yml: -------------------------------------------------------------------------------- 1 | name: luarocks 2 | 3 | on: 4 | push: 5 | branches: 6 | - main 7 | pull_request: 8 | branches: 9 | - main 10 | 11 | jobs: 12 | build: 13 | strategy: 14 | fail-fast: false 15 | matrix: 16 | luaVersion: ["5.1", "5.2", "5.3", "5.4", "luajit"] 17 | runs-on: ubuntu-latest 18 | steps: 19 | - uses: actions/checkout@v2 20 | - uses: leafo/gh-actions-lua@v11 21 | with: 22 | luaVersion: ${{ matrix.luaVersion }} 23 | - uses: leafo/gh-actions-luarocks@v5 24 | - run: luarocks make -------------------------------------------------------------------------------- /.github/workflows/release.yml: -------------------------------------------------------------------------------- 1 | name: Release 2 | on: 3 | push: 4 | branches: 5 | - main 6 | jobs: 7 | build_wasm: 8 | name: build for node.js 9 | runs-on: ubuntu-latest 10 | steps: 11 | - uses: mymindstorm/setup-emsdk@v13 12 | - uses: actions/checkout@v4 13 | - run: cmake -E make_directory build 14 | - run: emcmake cmake $GITHUB_WORKSPACE -DCMAKE_BUILD_TYPE=Release 15 | working-directory: build 16 | - run: cmake --build . && cmake --build . --target install 17 | working-directory: build 18 | - name: Archive build result for js 19 | uses: actions/upload-artifact@v4 20 | with: 21 | name: node_lua_with_lrdb 22 | path: node/bin/node_lua_with_lrdb.* 23 | release: 24 | needs: build_wasm 25 | name: Release 26 | runs-on: ubuntu-latest 27 | steps: 28 | - name: Checkout 29 | uses: actions/checkout@v4 30 | with: 31 | fetch-depth: 0 32 | persist-credentials: false 33 | - name: Setup Node.js 34 | uses: actions/setup-node@v4 35 | with: 36 | node-version: 20 37 | - name: Download a node_lua_with_lrdb 38 | uses: actions/download-artifact@v4 39 | with: 40 | name: node_lua_with_lrdb 41 | path: node/bin/ 42 | - run: npm ci 43 | working-directory: node 44 | - run: npm run bundle 45 | working-directory: node 46 | - name: Release 47 | env: 48 | GITHUB_TOKEN: ${{ secrets.GH_TOKEN }} 49 | NPM_TOKEN: ${{ secrets.NPM_TOKEN }} 50 | run: npx semantic-release 51 | working-directory: node 52 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | # Compiled Object files 2 | *.slo 3 | *.lo 4 | *.o 5 | *.obj 6 | 7 | # Precompiled Headers 8 | *.gch 9 | *.pch 10 | 11 | # Compiled Dynamic libraries 12 | *.so 13 | *.dylib 14 | *.dll 15 | 16 | # Fortran module files 17 | *.mod 18 | 19 | # Compiled Static libraries 20 | *.lai 21 | *.la 22 | *.a 23 | *.lib 24 | 25 | # Executables 26 | *.exe 27 | *.out 28 | *.app 29 | 30 | # ========================= 31 | # Operating System Files 32 | # ========================= 33 | 34 | # OSX 35 | # ========================= 36 | 37 | .DS_Store 38 | .AppleDouble 39 | .LSOverride 40 | 41 | # Thumbnails 42 | ._* 43 | 44 | # Files that might appear in the root of a volume 45 | .DocumentRevisions-V100 46 | .fseventsd 47 | .Spotlight-V100 48 | .TemporaryItems 49 | .Trashes 50 | .VolumeIcon.icns 51 | 52 | # Directories potentially created on remote AFP share 53 | .AppleDB 54 | .AppleDesktop 55 | Network Trash Folder 56 | Temporary Items 57 | .apdisk 58 | 59 | # Windows 60 | # ========================= 61 | 62 | # Windows image file caches 63 | Thumbs.db 64 | ehthumbs.db 65 | 66 | # Folder config file 67 | Desktop.ini 68 | 69 | # Recycle Bin used on file shares 70 | $RECYCLE.BIN/ 71 | 72 | # Windows Installer files 73 | *.cab 74 | *.msi 75 | *.msm 76 | *.msp 77 | 78 | # Windows shortcuts 79 | *.lnk 80 | 81 | build 82 | _build 83 | build* 84 | -------------------------------------------------------------------------------- /Jenkinsfile: -------------------------------------------------------------------------------- 1 | node { 2 | stage 'Build and Test' 3 | checkout scm 4 | sh 'python test_runner.py' 5 | } 6 | -------------------------------------------------------------------------------- /LICENSE_1_0.txt: -------------------------------------------------------------------------------- 1 | Boost Software License - Version 1.0 - August 17th, 2003 2 | 3 | Permission is hereby granted, free of charge, to any person or organization 4 | obtaining a copy of the software and accompanying documentation covered by 5 | this license (the "Software") to use, reproduce, display, distribute, 6 | execute, and transmit the Software, and to prepare derivative works of the 7 | Software, and to permit third-parties to whom the Software is furnished to 8 | do so, all subject to the following: 9 | 10 | The copyright notices in the Software and this entire statement, including 11 | the above license grant, this restriction and the following disclaimer, 12 | must be included in all copies of the Software, in whole or in part, and 13 | all derivative works of the Software, unless such copies or derivative 14 | works are solely in the form of machine-executable object code generated by 15 | a source language processor. 16 | 17 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 18 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 19 | FITNESS FOR A PARTICULAR PURPOSE, TITLE AND NON-INFRINGEMENT. IN NO EVENT 20 | SHALL THE COPYRIGHT HOLDERS OR ANYONE DISTRIBUTING THE SOFTWARE BE LIABLE 21 | FOR ANY DAMAGES OR OTHER LIABILITY, WHETHER IN CONTRACT, TORT OR OTHERWISE, 22 | ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER 23 | DEALINGS IN THE SOFTWARE. 24 | -------------------------------------------------------------------------------- /Lua-CMakeLists.txt: -------------------------------------------------------------------------------- 1 | cmake_minimum_required (VERSION 2.6) 2 | project (lua) 3 | 4 | file(GLOB LIB_LUA_SRCS RELATIVE ${CMAKE_CURRENT_SOURCE_DIR} 5 | src/*.h 6 | src/*.c 7 | include/*.h) 8 | 9 | include_directories("src/") 10 | include_directories("include/") 11 | 12 | list(REMOVE_ITEM LIB_LUA_SRCS src/lua.c src/luac.c) 13 | 14 | add_library(liblua STATIC ${LIB_LUA_SRCS}) 15 | SET_TARGET_PROPERTIES(liblua PROPERTIES OUTPUT_NAME lua) 16 | 17 | if(UNIX AND NOT EMSCRIPTEN) 18 | add_definitions("-DLUA_USE_POSIX -DLUA_USE_DLOPEN") 19 | target_link_libraries(liblua m dl) 20 | endif(UNIX AND NOT EMSCRIPTEN) 21 | 22 | #add_executable(lua src/lua.c) 23 | #target_link_libraries(lua liblua) 24 | 25 | #add_executable(luac src/luac.c) 26 | #target_link_libraries(luac liblua) 27 | -------------------------------------------------------------------------------- /cmake/FindLua.cmake: -------------------------------------------------------------------------------- 1 | 2 | if(LOCAL_LUA_DIRECTORY) 3 | #search local directory 4 | if(EXISTS ${CMAKE_CURRENT_SOURCE_DIR}/${LOCAL_LUA_DIRECTORY}) 5 | file(COPY Lua-CMakeLists.txt DESTINATION ${CMAKE_CURRENT_SOURCE_DIR}/${LOCAL_LUA_DIRECTORY}) 6 | file(RENAME ${CMAKE_CURRENT_SOURCE_DIR}/${LOCAL_LUA_DIRECTORY}/Lua-CMakeLists.txt ${CMAKE_CURRENT_SOURCE_DIR}/${LOCAL_LUA_DIRECTORY}/CMakeLists.txt) 7 | add_subdirectory(${LOCAL_LUA_DIRECTORY}) 8 | 9 | set(LUA_INCLUDE_DIRS ${CMAKE_CURRENT_SOURCE_DIR}/${LOCAL_LUA_DIRECTORY}/src) 10 | if(NOT EXISTS ${LUA_INCLUDE_DIRS}/lua.h) 11 | set(LUA_INCLUDE_DIRS ${CMAKE_CURRENT_SOURCE_DIR}/${LOCAL_LUA_DIRECTORY}/include) 12 | endif() 13 | set(LUA_LIBRARIES liblua) 14 | endif() 15 | endif() 16 | 17 | if(NOT LUA_INCLUDE_DIRS) 18 | find_package(PkgConfig) 19 | set(LUA_SEARCHVERS ${LUA_SEARCH_LIB_NAME} lua5.3 lua5.2 luajit lua5.1 lua) 20 | foreach(modulename ${LUA_SEARCHVERS}) 21 | pkg_search_module(LUA ${modulename}) 22 | endforeach(modulename) 23 | endif(NOT LUA_INCLUDE_DIRS) 24 | 25 | if(NOT LUA_INCLUDE_DIRS) 26 | # message(SEND_ERROR "Can't find lua library") 27 | endif(NOT LUA_INCLUDE_DIRS) 28 | 29 | 30 | if(NOT EXISTS ${LUA_INCLUDE_DIRS}/lua.h) 31 | message(SEND_ERROR "Can't find lua.h in ${LUA_INCLUDE_DIRS}") 32 | endif() 33 | -------------------------------------------------------------------------------- /cmake/ReduceDependencies.cmake: -------------------------------------------------------------------------------- 1 | # We statically link to reduce dependencies 2 | if(MSVC) 3 | foreach(flag_var CMAKE_CXX_FLAGS CMAKE_CXX_FLAGS_DEBUG CMAKE_CXX_FLAGS_RELEASE CMAKE_CXX_FLAGS_MINSIZEREL CMAKE_CXX_FLAGS_RELWITHDEBINFO CMAKE_C_FLAGS CMAKE_C_FLAGS_DEBUG CMAKE_C_FLAGS_RELEASE CMAKE_C_FLAGS_MINSIZEREL CMAKE_C_FLAGS_RELWITHDEBINFO) 4 | string(REGEX REPLACE "/MD" "/MT" ${flag_var} "${${flag_var}}") 5 | string(REGEX REPLACE "/MDd" "/MTd" ${flag_var} "${${flag_var}}") 6 | string(REGEX REPLACE "/MD" "/MT" ${flag_var}_INIT "${${flag_var}_INIT}") 7 | string(REGEX REPLACE "/MDd" "/MTd" ${flag_var}_INIT "${${flag_var}_INIT}") 8 | endforeach(flag_var) 9 | elseif(CMAKE_COMPILER_IS_GNUCXX) 10 | set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -static-libgcc -static-libstdc++") 11 | endif(MSVC) 12 | -------------------------------------------------------------------------------- /cmake/Toolchain-cross-mingw32-linux.cmake: -------------------------------------------------------------------------------- 1 | # the name of the target operating system 2 | SET(CMAKE_SYSTEM_NAME Windows) 3 | 4 | # Choose an appropriate compiler prefix 5 | 6 | # for classical mingw32 7 | # see http://www.mingw.org/ 8 | #set(COMPILER_PREFIX "i586-mingw32msvc") 9 | 10 | # for 32 or 64 bits mingw-w64 11 | # see http://mingw-w64.sourceforge.net/ 12 | #set(COMPILER_PREFIX "i586-mingw32msvc") 13 | set(COMPILER_PREFIX "i686-w64-mingw32") 14 | #set(COMPILER_PREFIX "x86_64-w64-mingw32" 15 | 16 | set(MINGW TRUE) 17 | 18 | # which compilers to use for C and C++ 19 | #find_program(CMAKE_RC_COMPILER NAMES ${COMPILER_PREFIX}-windres) 20 | SET(CMAKE_RC_COMPILER ${COMPILER_PREFIX}-windres) 21 | #find_program(CMAKE_C_COMPILER NAMES ${COMPILER_PREFIX}-gcc) 22 | SET(CMAKE_C_COMPILER ${COMPILER_PREFIX}-gcc) 23 | #find_program(CMAKE_CXX_COMPILER NAMES ${COMPILER_PREFIX}-g++) 24 | SET(CMAKE_CXX_COMPILER ${COMPILER_PREFIX}-g++) 25 | 26 | 27 | 28 | # adjust the default behaviour of the FIND_XXX() commands: 29 | # search headers and libraries in the target environment, search 30 | # programs in the host environment 31 | set(CMAKE_FIND_ROOT_PATH_MODE_PROGRAM NEVER) 32 | set(CMAKE_FIND_ROOT_PATH_MODE_LIBRARY ONLY) 33 | set(CMAKE_FIND_ROOT_PATH_MODE_INCLUDE ONLY) 34 | -------------------------------------------------------------------------------- /include/lrdb/client.hpp: -------------------------------------------------------------------------------- 1 | #pragma once 2 | #include 3 | #include 4 | 5 | // Not implemented now 6 | -------------------------------------------------------------------------------- /include/lrdb/server.hpp: -------------------------------------------------------------------------------- 1 | #pragma once 2 | 3 | #if __cplusplus >= 201103L || (defined(_MSC_VER) && _MSC_VER >= 1800) 4 | #include 5 | #include 6 | #include 7 | 8 | #include "basic_server.hpp" 9 | #include "command_stream/socket.hpp" 10 | namespace lrdb { 11 | typedef basic_server server; 12 | } 13 | 14 | #else 15 | #error Needs at least a C++11 compiler 16 | #endif -------------------------------------------------------------------------------- /lrdb-0.3.1-1.rockspec: -------------------------------------------------------------------------------- 1 | package = "LRDB" 2 | version = "0.3.1-1" 3 | source = { 4 | url = "git+https://github.com/satoren/LRDB", 5 | tag = "v0.3.1" 6 | } 7 | description = { 8 | summary = "Remote Debugger for Lua", 9 | detailed = [[ 10 | Remote debugger for Lua with Visual Studio Code extension. 11 | https://marketplace.visualstudio.com/items?itemName=satoren.lrdb 12 | ]], 13 | homepage = "https://github.com/satoren/LRDB", 14 | license = "Boost" 15 | } 16 | dependencies = { 17 | "lua >= 5.1" 18 | } 19 | 20 | build = { 21 | type = "cmake", 22 | cmake = 'cmake_minimum_required(VERSION 2.8)\n include(luarocks_cmake.txt)', 23 | variables ={CFLAGS="$(CFLAGS)", 24 | LIBFLAG="$(LIBFLAG)", 25 | LUA="$(LUA)", 26 | LUALIB="$(LUALIB)", 27 | LUA_BINDIR="$(LUA_BINDIR)", 28 | LUADIR="$(LUADIR)", 29 | LUA_LIBDIR="$(LUA_LIBDIR)", 30 | LIBDIR="$(LIBDIR)", 31 | LUA_INCDIR="$(LUA_INCDIR)", 32 | CMAKE_INSTALL_PREFIX="$(PREFIX)"} 33 | } -------------------------------------------------------------------------------- /luarocks_cmake.txt: -------------------------------------------------------------------------------- 1 | 2 | 3 | include_directories("${LUA_INCDIR}") 4 | LINK_DIRECTORIES("${LUA_LIBDIR}") 5 | 6 | include_directories("${CMAKE_CURRENT_SOURCE_DIR}/third_party/asio/asio/include") 7 | include_directories("${CMAKE_CURRENT_SOURCE_DIR}/third_party/picojson") 8 | 9 | 10 | include_directories("${CMAKE_CURRENT_SOURCE_DIR}/include") 11 | 12 | if(NOT MSVC)#-Wall nonsense on MSVC 13 | add_definitions("-std=c++11") 14 | endif(NOT MSVC) 15 | 16 | add_library(lrdb_server MODULE src/debug_server_module.cpp) 17 | IF(LUALIB) 18 | TARGET_LINK_LIBRARIES(lrdb_server ${LUALIB}) 19 | ENDIF() 20 | 21 | set(CMAKE_MODULE_LINKER_FLAGS ${LIBFLAG}) 22 | 23 | 24 | if (CMAKE_INSTALL_PREFIX) 25 | install(TARGETS lrdb_server DESTINATION "${CMAKE_INSTALL_PREFIX}/lib") 26 | endif(CMAKE_INSTALL_PREFIX) -------------------------------------------------------------------------------- /node/.eslintignore: -------------------------------------------------------------------------------- 1 | **/dist/**/* 2 | **/__tests__/**/* 3 | **/__mocks__/**/* -------------------------------------------------------------------------------- /node/.eslintrc.js: -------------------------------------------------------------------------------- 1 | module.exports = { 2 | root: true, 3 | parser: '@typescript-eslint/parser', 4 | plugins: ['@typescript-eslint', 'jest'], 5 | extends: [ 6 | 'eslint:recommended', 7 | 'plugin:@typescript-eslint/recommended', 8 | 'plugin:jest/recommended', 9 | ], 10 | } 11 | -------------------------------------------------------------------------------- /node/.gitignore: -------------------------------------------------------------------------------- 1 | dist 2 | node_modules 3 | coverage 4 | .eslintcache -------------------------------------------------------------------------------- /node/.npmignore: -------------------------------------------------------------------------------- 1 | src 2 | __tests__ 3 | coverage 4 | .github 5 | .vscode 6 | jest.config.js 7 | .prettier* 8 | .eslint* 9 | -------------------------------------------------------------------------------- /node/.prettierignore: -------------------------------------------------------------------------------- 1 | dist 2 | bin 3 | coverage 4 | .github -------------------------------------------------------------------------------- /node/.prettierrc.json: -------------------------------------------------------------------------------- 1 | { 2 | "semi": false, 3 | "overrides": [ 4 | { 5 | "files": ["*.md", "*.html"], 6 | "options": { 7 | "tabWidth": 4 8 | } 9 | } 10 | ], 11 | "singleQuote": true 12 | } 13 | -------------------------------------------------------------------------------- /node/README.md: -------------------------------------------------------------------------------- 1 | # Lua wasm 2 | 3 | Compiled Lua with Wasm include LRDB 4 | -------------------------------------------------------------------------------- /node/bin/ChildDebuggableLua.js: -------------------------------------------------------------------------------- 1 | const DebuggableLuaInit = require('./node_lua_with_lrdb.js') 2 | const process = require('process') 3 | 4 | DebuggableLuaInit().then((D) => { 5 | const lua = new D.Lua((m) => { 6 | if (process.send) { 7 | const message = JSON.parse(m) 8 | process.send(message) 9 | } 10 | }) 11 | 12 | process.on('message', (m) => { 13 | lua.debug_command(JSON.stringify(m)) 14 | }) 15 | 16 | lua.do_file(process.argv[2], process.argv.slice(3), (ret) => { 17 | lua.exit() 18 | process.exit(ret ? 0 : -1) 19 | }) 20 | }) 21 | -------------------------------------------------------------------------------- /node/bin/node_lua_with_lrdb.d.ts: -------------------------------------------------------------------------------- 1 | declare interface DebuggableLua { 2 | readonly Lua: LuaConstructor 3 | } 4 | 5 | interface LuaConstructor { 6 | new (opts: (message: string) => void): Lua 7 | } 8 | interface Lua { 9 | do_string( 10 | script: string, 11 | args: string[], 12 | callback: (ret: boolean) => void 13 | ): Promise 14 | do_file( 15 | file: string, 16 | args: string[], 17 | callback: (ret: boolean) => void 18 | ): Promise 19 | debug_command(command_json: string) 20 | error(err: string) 21 | delete() 22 | } 23 | 24 | export declare function DebuggableLuaInit(): Promise 25 | export default DebuggableLuaInit 26 | -------------------------------------------------------------------------------- /node/jest.config.js: -------------------------------------------------------------------------------- 1 | module.exports = { 2 | rootDir: '.', 3 | testMatch: [ 4 | '**/__tests__/**/?(*.)+(spec|test).+(ts|tsx|js)', 5 | '**/?(*.)+(spec|test).+(ts|tsx|js)', 6 | '!**/dist/**/*', 7 | ], 8 | transform: { 9 | '^.+\\.(ts|tsx)$': 'ts-jest', 10 | }, 11 | moduleNameMapper: { 12 | '~(.*)$': '/$1', 13 | }, 14 | collectCoverageFrom: [ 15 | '**/src/**/*.{js,jsx,ts,tsx}', 16 | '!**/node_modules/', 17 | '!**/__tests__/**', 18 | '!**/__mocks__/**', 19 | '!**/examples/**', 20 | '!**/examples-*/**', 21 | ], 22 | } 23 | -------------------------------------------------------------------------------- /node/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "lrdb-debuggable-lua", 3 | "version": "0.6.0", 4 | "main": "dist/index", 5 | "license": "MIT", 6 | "scripts": { 7 | "build": "tsc", 8 | "bundle": "npx ncc build -m src/index.ts -o dist", 9 | "test": "jest", 10 | "lint:eslint": "eslint . --cache --ext ts", 11 | "lint:prettier": "prettier . --check", 12 | "lint": "run-s lint:eslint lint:prettier", 13 | "fix": "run-s fix:eslint fix:prettier", 14 | "fix:eslint": "npm run lint:eslint -- --fix", 15 | "fix:prettier": "npm run lint:prettier -- --write", 16 | "test-ci": "jest --coverage", 17 | "clean": "rm -Rf ./dist", 18 | "prepack": "run-s clean bundle" 19 | }, 20 | "devDependencies": { 21 | "@types/jest": "^29.5.12", 22 | "@types/node": "^20.11.30", 23 | "@typescript-eslint/eslint-plugin": "^7.3.1", 24 | "@typescript-eslint/parser": "^7.3.1", 25 | "@vercel/ncc": "^0.38.1", 26 | "eslint": "^8.57.0", 27 | "eslint-plugin-jest": "^27.9.0", 28 | "jest": "^29.7.0", 29 | "npm-run-all": "^4.1.5", 30 | "prettier": "^3.2.5", 31 | "semantic-release": "^23.0.2", 32 | "ts-jest": "^29.1.2", 33 | "ts-node": "^10.9.2", 34 | "typescript": "^5.4.3" 35 | }, 36 | "release": { 37 | "branches": [ 38 | "main" 39 | ], 40 | "plugins": [ 41 | "@semantic-release/commit-analyzer", 42 | "@semantic-release/release-notes-generator", 43 | "@semantic-release/npm" 44 | ] 45 | } 46 | } 47 | -------------------------------------------------------------------------------- /node/src/Adapter/ChildProcessAdapter.ts: -------------------------------------------------------------------------------- 1 | import { isJsonRpcMessage, JsonRpcMessage } from '../JsonRpc' 2 | import { DebugRequest, DebugClientAdapter } from '../Client' 3 | import { TypedEventEmitter } from '../TypedEventEmitter' 4 | import { ChildProcess, ForkOptions } from 'child_process' 5 | import * as LuaWasm from '../LuaWasm' 6 | 7 | export class ChildProcessAdapter implements DebugClientAdapter { 8 | onMessage: TypedEventEmitter = 9 | new TypedEventEmitter() 10 | public child: ChildProcess 11 | 12 | public constructor(child: ChildProcess) 13 | public constructor(file: string, args: string[], options?: ForkOptions) 14 | 15 | public constructor( 16 | child: ChildProcess | string, 17 | args?: string[], 18 | options?: ForkOptions, 19 | ) { 20 | if (typeof child === 'string') { 21 | this.child = LuaWasm.run(child, args, options) 22 | } else { 23 | this.child = child 24 | } 25 | this.initChildProcess() 26 | } 27 | initChildProcess(): void { 28 | setTimeout(() => { 29 | this.onOpen.emit() 30 | }, 0) 31 | this.child.on('message', (msg: unknown) => { 32 | if (isJsonRpcMessage(msg)) { 33 | this.onMessage.emit(msg) 34 | } 35 | }) 36 | this.child.on('close', () => { 37 | this.onClose.emit() 38 | }) 39 | } 40 | send(request: DebugRequest): boolean { 41 | return this.child.send(request) 42 | } 43 | end(): void { 44 | this.child.kill() 45 | } 46 | onClose: TypedEventEmitter = new TypedEventEmitter() 47 | onOpen: TypedEventEmitter = new TypedEventEmitter() 48 | onError: TypedEventEmitter = new TypedEventEmitter() 49 | } 50 | -------------------------------------------------------------------------------- /node/src/Adapter/TcpAdapter.ts: -------------------------------------------------------------------------------- 1 | import { isJsonRpcMessage, JsonRpcMessage } from '../JsonRpc' 2 | import { DebugRequest, DebugClientAdapter } from '../Client' 3 | import { TypedEventEmitter } from '../TypedEventEmitter' 4 | import * as net from 'net' 5 | import * as readline from 'readline' 6 | 7 | export class TcpAdapter implements DebugClientAdapter { 8 | private _connection: net.Socket 9 | onMessage: TypedEventEmitter = 10 | new TypedEventEmitter() 11 | public constructor(port: number, host: string) { 12 | const connection = net.connect(port, host) 13 | this._connection = connection 14 | 15 | connection.on('connect', () => { 16 | this.onOpen.emit() 17 | }) 18 | 19 | connection.on('close', () => { 20 | this.onClose.emit() 21 | }) 22 | 23 | connection.on('error', (err: Error) => { 24 | this.onError.emit(err) 25 | }) 26 | 27 | const rl = readline.createInterface({ 28 | input: connection, 29 | }) 30 | 31 | rl.on('line', (input: string) => { 32 | const message = JSON.parse(input) 33 | if (isJsonRpcMessage(message)) { 34 | this.onMessage.emit(message) 35 | } 36 | }) 37 | } 38 | send(request: DebugRequest): boolean { 39 | return this._connection.write(`${JSON.stringify(request)}\n`) 40 | } 41 | end(): void { 42 | this._connection.end() 43 | } 44 | onClose: TypedEventEmitter = new TypedEventEmitter() 45 | onOpen: TypedEventEmitter = new TypedEventEmitter() 46 | onError: TypedEventEmitter = new TypedEventEmitter() 47 | } 48 | -------------------------------------------------------------------------------- /node/src/Adapter/index.ts: -------------------------------------------------------------------------------- 1 | export { TcpAdapter } from './TcpAdapter' 2 | export { ChildProcessAdapter } from './ChildProcessAdapter' 3 | -------------------------------------------------------------------------------- /node/src/JsonRpc.ts: -------------------------------------------------------------------------------- 1 | export type JsonRpcMessage = JsonRpcRequest | JsonRpcResponse | JsonRpcNotify 2 | 3 | export interface JsonRpcRequest { 4 | jsonrpc: '2.0' 5 | method: string 6 | params?: unknown 7 | id: string | number 8 | } 9 | 10 | export function isJsonRpcRequest( 11 | message: JsonRpcMessage, 12 | ): message is JsonRpcRequest { 13 | return ( 14 | (message as JsonRpcRequest).id != null && 15 | typeof (message as JsonRpcRequest).method === 'string' 16 | ) 17 | } 18 | export function isJsonRpcResponse( 19 | message: JsonRpcMessage, 20 | ): message is JsonRpcResponse { 21 | return (message as JsonRpcResponse).id != null && !isJsonRpcRequest(message) 22 | } 23 | export function isJsonRpcNotify( 24 | message: JsonRpcMessage, 25 | ): message is JsonRpcNotify { 26 | return ( 27 | typeof (message as JsonRpcNotify).method === 'string' && 28 | !isJsonRpcRequest(message) && 29 | !isJsonRpcResponse(message) 30 | ) 31 | } 32 | export function isJsonRpcMessage(v: unknown): v is JsonRpcMessage { 33 | return ( 34 | isJsonRpcRequest(v as JsonRpcMessage) || 35 | isJsonRpcResponse(v as JsonRpcMessage) || 36 | isJsonRpcNotify(v as JsonRpcMessage) 37 | ) 38 | } 39 | 40 | export interface JsonRpcResponse { 41 | jsonrpc: '2.0' 42 | result?: unknown 43 | error?: unknown 44 | id: string | number 45 | } 46 | 47 | export interface JsonRpcNotify { 48 | jsonrpc: '2.0' 49 | method: string 50 | params?: unknown 51 | } 52 | -------------------------------------------------------------------------------- /node/src/LuaWasm.ts: -------------------------------------------------------------------------------- 1 | import * as path from 'path' 2 | import { ChildProcess, ForkOptions, fork } from 'child_process' 3 | 4 | export const modulePath = path.resolve( 5 | __dirname, 6 | '../bin/ChildDebuggableLua.js', 7 | ) 8 | 9 | export const run = ( 10 | file: string, 11 | args: string[] = [], 12 | options?: ForkOptions, 13 | ): ChildProcess => fork(modulePath, [file, ...args], options) 14 | 15 | export default { modulePath, run } 16 | -------------------------------------------------------------------------------- /node/src/TypedEventEmitter.ts: -------------------------------------------------------------------------------- 1 | export interface TypedEventListener { 2 | (event: T): Promise | void 3 | } 4 | export interface TypedEventTarget { 5 | on: (listener: TypedEventListener) => void 6 | once: (listener: TypedEventListener) => void 7 | off: (listener: TypedEventListener) => void 8 | } 9 | 10 | export class TypedEventEmitter { 11 | private listeners: TypedEventListener[] = [] 12 | private listenersOncer: TypedEventListener[] = [] 13 | 14 | on = (listener: TypedEventListener): void => { 15 | this.listeners.push(listener) 16 | } 17 | 18 | once = (listener: TypedEventListener): void => { 19 | this.listenersOncer.push(listener) 20 | } 21 | 22 | off = (listener: TypedEventListener): void => { 23 | const callbackIndex = this.listeners.indexOf(listener) 24 | if (callbackIndex > -1) this.listeners.splice(callbackIndex, 1) 25 | } 26 | 27 | emit = async (event: T): Promise => { 28 | const emitted = [ 29 | ...this.listeners.map((listener) => listener(event)), 30 | ...this.listenersOncer.map((listener) => listener(event)), 31 | ] 32 | this.listenersOncer = [] 33 | await Promise.all(emitted) 34 | } 35 | } 36 | -------------------------------------------------------------------------------- /node/src/__tests__/node_lua_with_lrdb.test.ts: -------------------------------------------------------------------------------- 1 | import path from 'path' 2 | import DebuggableLuaInit from '../../bin/node_lua_with_lrdb' 3 | 4 | import { isJsonRpcNotify } from '../JsonRpc' 5 | import { DebugRequest } from '../Client' 6 | 7 | const testScriptDir = path.resolve(__dirname, '../../../test/lua/') 8 | test('exec', async () => { 9 | const stepinRequest: DebugRequest = { 10 | method: 'step_in', 11 | jsonrpc: '2.0', 12 | id: 0, 13 | } 14 | const DebuggableLua = await DebuggableLuaInit() 15 | const lua = new DebuggableLua.Lua((m) => { 16 | const message = JSON.parse(m) 17 | if (isJsonRpcNotify(message)) { 18 | if (message.method === 'paused') { 19 | setTimeout(() => { 20 | lua.debug_command(JSON.stringify(stepinRequest)) 21 | }) 22 | } 23 | } 24 | }) 25 | 26 | const a = await new Promise((resolve) => 27 | lua.do_file( 28 | path.resolve(testScriptDir, 'break_coroutine_test1.lua'), 29 | [], 30 | resolve, 31 | ), 32 | ) 33 | expect(a).toBe(true) 34 | }) 35 | -------------------------------------------------------------------------------- /node/src/index.ts: -------------------------------------------------------------------------------- 1 | export * as LRDBClient from './Client' 2 | export * as LRDBAdapter from './Adapter' 3 | export * as LuaWasm from './LuaWasm' 4 | -------------------------------------------------------------------------------- /node/tsconfig.json: -------------------------------------------------------------------------------- 1 | { 2 | "compilerOptions": { 3 | "target": "es2015", 4 | "module": "commonjs", 5 | "declaration": true, 6 | "strict": true, 7 | "noImplicitAny": true, 8 | "strictNullChecks": true, 9 | "strictFunctionTypes": true, 10 | "strictBindCallApply": true, 11 | "strictPropertyInitialization": true, 12 | "noImplicitThis": true, 13 | "alwaysStrict": true, 14 | "moduleResolution": "node", 15 | "esModuleInterop": true, 16 | "skipLibCheck": true, 17 | "forceConsistentCasingInFileNames": true, 18 | "outDir": "./dist", 19 | "rootDir": "./src" 20 | }, 21 | "exclude": [ 22 | "node_modules", 23 | ".yarn/releases/*", 24 | "**/__tests__/**/*", 25 | "**/__mocks__/**/*", 26 | "**/dist/**/*" 27 | ], 28 | "include": ["src"] 29 | } 30 | -------------------------------------------------------------------------------- /renovate.json: -------------------------------------------------------------------------------- 1 | { 2 | "$schema": "https://docs.renovatebot.com/renovate-schema.json", 3 | "extends": [ 4 | "config:base" 5 | ] 6 | } 7 | -------------------------------------------------------------------------------- /src/debug_server_module.cpp: -------------------------------------------------------------------------------- 1 | #include 2 | 3 | #include "lrdb/server.hpp" 4 | 5 | typedef std::unique_ptr server_ptr; 6 | 7 | int lrdb_activate(lua_State* L) { 8 | server_ptr* server = (server_ptr*)lua_touserdata(L, lua_upvalueindex(1)); 9 | if (lua_isnumber(L, 1)) { 10 | server->reset(new lrdb::server((int16_t)lua_tonumber(L, 1))); 11 | } else { 12 | server->reset(new lrdb::server(21110)); 13 | } 14 | (*server)->reset(L); 15 | return 0; 16 | } 17 | int lrdb_deactivate(lua_State* L) { 18 | server_ptr* server = (server_ptr*)lua_touserdata(L, lua_upvalueindex(1)); 19 | server->reset(); 20 | return 0; 21 | } 22 | int lrdb_destruct(lua_State* L) { 23 | server_ptr* server = (server_ptr*)lua_touserdata(L, 1); 24 | server->~server_ptr(); 25 | return 0; 26 | } 27 | 28 | #if defined(_WIN32) || defined(_WIN64) 29 | extern "C" __declspec(dllexport) 30 | #else 31 | extern "C" __attribute__((visibility("default"))) 32 | #endif 33 | int luaopen_lrdb_server(lua_State* L) { 34 | // luaL_dostring(L, "debug=nil"); 35 | lua_createtable(L, 0, 3); 36 | int mod = lua_gettop(L); 37 | 38 | void* storage = lua_newuserdata(L, sizeof(server_ptr)); 39 | new (storage) server_ptr(); 40 | int sserver = lua_gettop(L); 41 | lua_createtable(L, 0, 1); 42 | lua_pushcclosure(L, &lrdb_destruct, 0); 43 | lua_setfield(L, -2, "__gc"); 44 | lua_setmetatable(L, sserver); 45 | lua_pushvalue(L, sserver); 46 | lua_pushcclosure(L, &lrdb_activate, 1); 47 | lua_setfield(L, mod, "activate"); 48 | lua_pushvalue(L, sserver); 49 | lua_pushcclosure(L, &lrdb_deactivate, 1); 50 | lua_setfield(L, mod, "deactivate"); 51 | 52 | lua_pushvalue(L, mod); 53 | return 1; 54 | } -------------------------------------------------------------------------------- /test/lua/break_coroutine_test1.lua: -------------------------------------------------------------------------------- 1 | local value = 1 2 | function testfn(arg) 3 | local local_value1 = value 4 | local local_value2 = "abc" 5 | local local_value3 = 4234.33 6 | local local_value4 ={4234.3} 7 | end 8 | 9 | local co = coroutine.create(testfn) 10 | local stat, ret = coroutine.resume( co, 5 ) -------------------------------------------------------------------------------- /test/lua/env_change_test1.lua: -------------------------------------------------------------------------------- 1 | local _ENV={envvar=5456} 2 | local value = 1 3 | local function testfn() 4 | local local_value1 = 1 5 | local local_value2 = "abc" 6 | local local_value3 = 4234.33 7 | local local_value4 ={envvar} 8 | end 9 | 10 | testfn() 11 | -------------------------------------------------------------------------------- /test/lua/eval_test1.lua: -------------------------------------------------------------------------------- 1 | local value = 1 2 | function testfn(arg) 3 | local local_value=value*2 4 | local local_value2=3 5 | end 6 | local value3 = 1 7 | function testfn2(arg) 8 | local local_value3=4 9 | testfn(4) 10 | end 11 | testfn2(2) 12 | -------------------------------------------------------------------------------- /test/lua/eval_test2.lua: -------------------------------------------------------------------------------- 1 | local _ENV={envvar=5456} 2 | local local_value1=1 3 | local local_value2=2 4 | local local_value3={3} 5 | -------------------------------------------------------------------------------- /test/lua/get_local_var_test1.lua: -------------------------------------------------------------------------------- 1 | local value = 1 2 | function testfn() 3 | local local_value1 = 1 4 | local local_value2 = "abc" 5 | local local_value3 = 4234.33 6 | local local_value4 ={4234.3} 7 | end 8 | 9 | testfn() 10 | -------------------------------------------------------------------------------- /test/lua/infinite_loop.lua: -------------------------------------------------------------------------------- 1 | local a = 0 2 | while true do 3 | a = a + 1 4 | end -------------------------------------------------------------------------------- /test/lua/loadmodule.lua: -------------------------------------------------------------------------------- 1 | local a=1 2 | local b=2 3 | return a + b -------------------------------------------------------------------------------- /test/lua/loop_test.lua: -------------------------------------------------------------------------------- 1 | local value = 1 2 | 3 | function testfn() 4 | local local_value1 = 1 5 | local local_value2 = "abc" 6 | local local_value3 = 4234.33 7 | local local_value4 ={envvar} 8 | end 9 | 10 | for i = 1, 10 do 11 | testfn() 12 | end 13 | -------------------------------------------------------------------------------- /test/lua/require_module.lua: -------------------------------------------------------------------------------- 1 | local mod = require("loadmodule") 2 | return mod -------------------------------------------------------------------------------- /test/lua/step_in_test1.lua: -------------------------------------------------------------------------------- 1 | local value = 1 2 | function testfn() 3 | local local_value1 = 1 4 | local local_value2 = "abc" 5 | local local_value3 = 4234.33 6 | local local_value4 ={4234.3} 7 | end 8 | --8 9 | testfn() 10 | -------------------------------------------------------------------------------- /test/lua/step_out_test1.lua: -------------------------------------------------------------------------------- 1 | local value = 1 2 | function testfn() 3 | local local_value1 = 1 4 | local local_value2 = "abc" 5 | local local_value3 = 4234.33 6 | local local_value4 ={4234.3} 7 | end 8 | 9 | local ret = testfn() 10 | 11 | local a = ret -------------------------------------------------------------------------------- /test/lua/step_over_test1.lua: -------------------------------------------------------------------------------- 1 | local value = 1 2 | function testfn() 3 | local local_value1 = 1 4 | local local_value2 = "abc" 5 | local local_value3 = 4234.33 6 | local local_value4 ={4234.3} 7 | end 8 | 9 | testfn() 10 | -------------------------------------------------------------------------------- /test/lua/table.lua: -------------------------------------------------------------------------------- 1 | local t = {} 2 | t[1000] = "hi" 3 | local t2 = {} -------------------------------------------------------------------------------- /test/lua/test1.lua: -------------------------------------------------------------------------------- 1 | local value = 1 2 | function testfn(arg) 3 | local local_array = {4234.3,value,"abc",{}} 4 | local local_table = {key1=4234.3,key2=value,key3="abc",key4={3,4,5,6,5}} 5 | local local_value3 = 4234.33 6 | local local_value4 ={4234.3} 7 | end 8 | 9 | testfn(2) 10 | -------------------------------------------------------------------------------- /test/lua/vaarg_test1.lua: -------------------------------------------------------------------------------- 1 | local value = 1 2 | function testfn(v1, ...) 3 | local local_value1 = 1 4 | local local_value2 = "abc" 5 | local local_value3 = 4234.33 6 | local local_value4 ={4234.3} 7 | return ... 8 | end 9 | 10 | testfn(2,1,3) 11 | -------------------------------------------------------------------------------- /third_party/asio/.gitignore: -------------------------------------------------------------------------------- 1 | /*.cpp 2 | /*.hpp 3 | /boost 4 | -------------------------------------------------------------------------------- /third_party/asio/asio/COPYING: -------------------------------------------------------------------------------- 1 | Copyright (c) 2003-2014 Christopher M. Kohlhoff (chris at kohlhoff dot com) 2 | 3 | Distributed under the Boost Software License, Version 1.0. (See accompanying 4 | file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) 5 | -------------------------------------------------------------------------------- /third_party/asio/asio/INSTALL: -------------------------------------------------------------------------------- 1 | See doc/index.html for information on: 2 | - External dependencies 3 | - Using asio 4 | - Supported platforms 5 | - How to build the tests and examples 6 | -------------------------------------------------------------------------------- /third_party/asio/asio/LICENSE_1_0.txt: -------------------------------------------------------------------------------- 1 | Boost Software License - Version 1.0 - August 17th, 2003 2 | 3 | Permission is hereby granted, free of charge, to any person or organization 4 | obtaining a copy of the software and accompanying documentation covered by 5 | this license (the "Software") to use, reproduce, display, distribute, 6 | execute, and transmit the Software, and to prepare derivative works of the 7 | Software, and to permit third-parties to whom the Software is furnished to 8 | do so, all subject to the following: 9 | 10 | The copyright notices in the Software and this entire statement, including 11 | the above license grant, this restriction and the following disclaimer, 12 | must be included in all copies of the Software, in whole or in part, and 13 | all derivative works of the Software, unless such copies or derivative 14 | works are solely in the form of machine-executable object code generated by 15 | a source language processor. 16 | 17 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 18 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 19 | FITNESS FOR A PARTICULAR PURPOSE, TITLE AND NON-INFRINGEMENT. IN NO EVENT 20 | SHALL THE COPYRIGHT HOLDERS OR ANYONE DISTRIBUTING THE SOFTWARE BE LIABLE 21 | FOR ANY DAMAGES OR OTHER LIABILITY, WHETHER IN CONTRACT, TORT OR OTHERWISE, 22 | ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER 23 | DEALINGS IN THE SOFTWARE. 24 | -------------------------------------------------------------------------------- /third_party/asio/asio/Makefile.am: -------------------------------------------------------------------------------- 1 | AUTOMAKE_OPTIONS = foreign dist-bzip2 dist-zip 2 | 3 | SUBDIRS = include src 4 | 5 | MAINTAINERCLEANFILES = \ 6 | $(srcdir)/aclocal.m4 \ 7 | $(srcdir)/configure \ 8 | $(srcdir)/config.guess \ 9 | $(srcdir)/config.sub \ 10 | $(srcdir)/depcomp \ 11 | $(srcdir)/install-sh \ 12 | $(srcdir)/missing \ 13 | $(srcdir)/mkinstalldirs \ 14 | $(srcdir)/Makefile.in \ 15 | asio-*.tar.gz 16 | 17 | EXTRA_DIST = \ 18 | LICENSE_1_0.txt \ 19 | doc 20 | -------------------------------------------------------------------------------- /third_party/asio/asio/README: -------------------------------------------------------------------------------- 1 | asio version 1.10.6 2 | Released Tuesday, 24 March 2015. 3 | 4 | See doc/index.html for API documentation and a tutorial. 5 | -------------------------------------------------------------------------------- /third_party/asio/asio/include/asio/basic_streambuf_fwd.hpp: -------------------------------------------------------------------------------- 1 | // 2 | // basic_streambuf_fwd.hpp 3 | // ~~~~~~~~~~~~~~~~~~~~~~~ 4 | // 5 | // Copyright (c) 2003-2015 Christopher M. Kohlhoff (chris at kohlhoff dot com) 6 | // 7 | // Distributed under the Boost Software License, Version 1.0. (See accompanying 8 | // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) 9 | // 10 | 11 | #ifndef ASIO_BASIC_STREAMBUF_FWD_HPP 12 | #define ASIO_BASIC_STREAMBUF_FWD_HPP 13 | 14 | #if defined(_MSC_VER) && (_MSC_VER >= 1200) 15 | # pragma once 16 | #endif // defined(_MSC_VER) && (_MSC_VER >= 1200) 17 | 18 | #include "asio/detail/config.hpp" 19 | 20 | #if !defined(ASIO_NO_IOSTREAM) 21 | 22 | #include 23 | 24 | namespace asio { 25 | 26 | template > 27 | class basic_streambuf; 28 | 29 | } // namespace asio 30 | 31 | #endif // !defined(ASIO_NO_IOSTREAM) 32 | 33 | #endif // ASIO_BASIC_STREAMBUF_FWD_HPP 34 | -------------------------------------------------------------------------------- /third_party/asio/asio/include/asio/buffered_read_stream_fwd.hpp: -------------------------------------------------------------------------------- 1 | // 2 | // buffered_read_stream_fwd.hpp 3 | // ~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 4 | // 5 | // Copyright (c) 2003-2015 Christopher M. Kohlhoff (chris at kohlhoff dot com) 6 | // 7 | // Distributed under the Boost Software License, Version 1.0. (See accompanying 8 | // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) 9 | // 10 | 11 | #ifndef ASIO_BUFFERED_READ_STREAM_FWD_HPP 12 | #define ASIO_BUFFERED_READ_STREAM_FWD_HPP 13 | 14 | #if defined(_MSC_VER) && (_MSC_VER >= 1200) 15 | # pragma once 16 | #endif // defined(_MSC_VER) && (_MSC_VER >= 1200) 17 | 18 | namespace asio { 19 | 20 | template 21 | class buffered_read_stream; 22 | 23 | } // namespace asio 24 | 25 | #endif // ASIO_BUFFERED_READ_STREAM_FWD_HPP 26 | -------------------------------------------------------------------------------- /third_party/asio/asio/include/asio/buffered_stream_fwd.hpp: -------------------------------------------------------------------------------- 1 | // 2 | // buffered_stream_fwd.hpp 3 | // ~~~~~~~~~~~~~~~~~~~~~~~ 4 | // 5 | // Copyright (c) 2003-2015 Christopher M. Kohlhoff (chris at kohlhoff dot com) 6 | // 7 | // Distributed under the Boost Software License, Version 1.0. (See accompanying 8 | // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) 9 | // 10 | 11 | #ifndef ASIO_BUFFERED_STREAM_FWD_HPP 12 | #define ASIO_BUFFERED_STREAM_FWD_HPP 13 | 14 | #if defined(_MSC_VER) && (_MSC_VER >= 1200) 15 | # pragma once 16 | #endif // defined(_MSC_VER) && (_MSC_VER >= 1200) 17 | 18 | namespace asio { 19 | 20 | template 21 | class buffered_stream; 22 | 23 | } // namespace asio 24 | 25 | #endif // ASIO_BUFFERED_STREAM_FWD_HPP 26 | -------------------------------------------------------------------------------- /third_party/asio/asio/include/asio/buffered_write_stream_fwd.hpp: -------------------------------------------------------------------------------- 1 | // 2 | // buffered_write_stream_fwd.hpp 3 | // ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 4 | // 5 | // Copyright (c) 2003-2015 Christopher M. Kohlhoff (chris at kohlhoff dot com) 6 | // 7 | // Distributed under the Boost Software License, Version 1.0. (See accompanying 8 | // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) 9 | // 10 | 11 | #ifndef ASIO_BUFFERED_WRITE_STREAM_FWD_HPP 12 | #define ASIO_BUFFERED_WRITE_STREAM_FWD_HPP 13 | 14 | #if defined(_MSC_VER) && (_MSC_VER >= 1200) 15 | # pragma once 16 | #endif // defined(_MSC_VER) && (_MSC_VER >= 1200) 17 | 18 | namespace asio { 19 | 20 | template 21 | class buffered_write_stream; 22 | 23 | } // namespace asio 24 | 25 | #endif // ASIO_BUFFERED_WRITE_STREAM_FWD_HPP 26 | -------------------------------------------------------------------------------- /third_party/asio/asio/include/asio/deadline_timer.hpp: -------------------------------------------------------------------------------- 1 | // 2 | // deadline_timer.hpp 3 | // ~~~~~~~~~~~~~~~~~~ 4 | // 5 | // Copyright (c) 2003-2015 Christopher M. Kohlhoff (chris at kohlhoff dot com) 6 | // 7 | // Distributed under the Boost Software License, Version 1.0. (See accompanying 8 | // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) 9 | // 10 | 11 | #ifndef ASIO_DEADLINE_TIMER_HPP 12 | #define ASIO_DEADLINE_TIMER_HPP 13 | 14 | #if defined(_MSC_VER) && (_MSC_VER >= 1200) 15 | # pragma once 16 | #endif // defined(_MSC_VER) && (_MSC_VER >= 1200) 17 | 18 | #include "asio/detail/config.hpp" 19 | 20 | #if defined(ASIO_HAS_BOOST_DATE_TIME) \ 21 | || defined(GENERATING_DOCUMENTATION) 22 | 23 | #include "asio/detail/socket_types.hpp" // Must come before posix_time. 24 | #include "asio/basic_deadline_timer.hpp" 25 | 26 | #include 27 | 28 | namespace asio { 29 | 30 | /// Typedef for the typical usage of timer. Uses a UTC clock. 31 | typedef basic_deadline_timer deadline_timer; 32 | 33 | } // namespace asio 34 | 35 | #endif // defined(ASIO_HAS_BOOST_DATE_TIME) 36 | // || defined(GENERATING_DOCUMENTATION) 37 | 38 | #endif // ASIO_DEADLINE_TIMER_HPP 39 | -------------------------------------------------------------------------------- /third_party/asio/asio/include/asio/detail/addressof.hpp: -------------------------------------------------------------------------------- 1 | // 2 | // detail/addressof.hpp 3 | // ~~~~~~~~~~~~~~~~~~~~ 4 | // 5 | // Copyright (c) 2003-2015 Christopher M. Kohlhoff (chris at kohlhoff dot com) 6 | // 7 | // Distributed under the Boost Software License, Version 1.0. (See accompanying 8 | // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) 9 | // 10 | 11 | #ifndef ASIO_DETAIL_ADDRESSOF_HPP 12 | #define ASIO_DETAIL_ADDRESSOF_HPP 13 | 14 | #if defined(_MSC_VER) && (_MSC_VER >= 1200) 15 | # pragma once 16 | #endif // defined(_MSC_VER) && (_MSC_VER >= 1200) 17 | 18 | #include "asio/detail/config.hpp" 19 | 20 | #if defined(ASIO_HAS_STD_ADDRESSOF) 21 | # include 22 | #else // defined(ASIO_HAS_STD_ADDRESSOF) 23 | # include 24 | #endif // defined(ASIO_HAS_STD_ADDRESSOF) 25 | 26 | namespace asio { 27 | namespace detail { 28 | 29 | #if defined(ASIO_HAS_STD_ADDRESSOF) 30 | using std::addressof; 31 | #else // defined(ASIO_HAS_STD_ADDRESSOF) 32 | using boost::addressof; 33 | #endif // defined(ASIO_HAS_STD_ADDRESSOF) 34 | 35 | } // namespace detail 36 | } // namespace asio 37 | 38 | #endif // ASIO_DETAIL_ADDRESSOF_HPP 39 | -------------------------------------------------------------------------------- /third_party/asio/asio/include/asio/detail/array.hpp: -------------------------------------------------------------------------------- 1 | // 2 | // detail/array.hpp 3 | // ~~~~~~~~~~~~~~~~ 4 | // 5 | // Copyright (c) 2003-2015 Christopher M. Kohlhoff (chris at kohlhoff dot com) 6 | // 7 | // Distributed under the Boost Software License, Version 1.0. (See accompanying 8 | // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) 9 | // 10 | 11 | #ifndef ASIO_DETAIL_ARRAY_HPP 12 | #define ASIO_DETAIL_ARRAY_HPP 13 | 14 | #if defined(_MSC_VER) && (_MSC_VER >= 1200) 15 | # pragma once 16 | #endif // defined(_MSC_VER) && (_MSC_VER >= 1200) 17 | 18 | #include "asio/detail/config.hpp" 19 | 20 | #if defined(ASIO_HAS_STD_ARRAY) 21 | # include 22 | #else // defined(ASIO_HAS_STD_ARRAY) 23 | # include 24 | #endif // defined(ASIO_HAS_STD_ARRAY) 25 | 26 | namespace asio { 27 | namespace detail { 28 | 29 | #if defined(ASIO_HAS_STD_ARRAY) 30 | using std::array; 31 | #else // defined(ASIO_HAS_STD_ARRAY) 32 | using boost::array; 33 | #endif // defined(ASIO_HAS_STD_ARRAY) 34 | 35 | } // namespace detail 36 | } // namespace asio 37 | 38 | #endif // ASIO_DETAIL_ARRAY_HPP 39 | -------------------------------------------------------------------------------- /third_party/asio/asio/include/asio/detail/array_fwd.hpp: -------------------------------------------------------------------------------- 1 | // 2 | // detail/array_fwd.hpp 3 | // ~~~~~~~~~~~~~~~~~~~~ 4 | // 5 | // Copyright (c) 2003-2015 Christopher M. Kohlhoff (chris at kohlhoff dot com) 6 | // 7 | // Distributed under the Boost Software License, Version 1.0. (See accompanying 8 | // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) 9 | // 10 | 11 | #ifndef ASIO_DETAIL_ARRAY_FWD_HPP 12 | #define ASIO_DETAIL_ARRAY_FWD_HPP 13 | 14 | #if defined(_MSC_VER) && (_MSC_VER >= 1200) 15 | # pragma once 16 | #endif // defined(_MSC_VER) && (_MSC_VER >= 1200) 17 | 18 | #include "asio/detail/config.hpp" 19 | 20 | namespace boost { 21 | 22 | template 23 | class array; 24 | 25 | } // namespace boost 26 | 27 | // Standard library components can't be forward declared, so we'll have to 28 | // include the array header. Fortunately, it's fairly lightweight and doesn't 29 | // add significantly to the compile time. 30 | #if defined(ASIO_HAS_STD_ARRAY) 31 | # include 32 | #endif // defined(ASIO_HAS_STD_ARRAY) 33 | 34 | #endif // ASIO_DETAIL_ARRAY_FWD_HPP 35 | -------------------------------------------------------------------------------- /third_party/asio/asio/include/asio/detail/assert.hpp: -------------------------------------------------------------------------------- 1 | // 2 | // detail/assert.hpp 3 | // ~~~~~~~~~~~~~~~~~ 4 | // 5 | // Copyright (c) 2003-2015 Christopher M. Kohlhoff (chris at kohlhoff dot com) 6 | // 7 | // Distributed under the Boost Software License, Version 1.0. (See accompanying 8 | // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) 9 | // 10 | 11 | #ifndef ASIO_DETAIL_ASSERT_HPP 12 | #define ASIO_DETAIL_ASSERT_HPP 13 | 14 | #if defined(_MSC_VER) && (_MSC_VER >= 1200) 15 | # pragma once 16 | #endif // defined(_MSC_VER) && (_MSC_VER >= 1200) 17 | 18 | #include "asio/detail/config.hpp" 19 | 20 | #if defined(ASIO_HAS_BOOST_ASSERT) 21 | # include 22 | #else // defined(ASIO_HAS_BOOST_ASSERT) 23 | # include 24 | #endif // defined(ASIO_HAS_BOOST_ASSERT) 25 | 26 | #if defined(ASIO_HAS_BOOST_ASSERT) 27 | # define ASIO_ASSERT(expr) BOOST_ASSERT(expr) 28 | #else // defined(ASIO_HAS_BOOST_ASSERT) 29 | # define ASIO_ASSERT(expr) assert(expr) 30 | #endif // defined(ASIO_HAS_BOOST_ASSERT) 31 | 32 | #endif // ASIO_DETAIL_ASSERT_HPP 33 | -------------------------------------------------------------------------------- /third_party/asio/asio/include/asio/detail/atomic_count.hpp: -------------------------------------------------------------------------------- 1 | // 2 | // detail/atomic_count.hpp 3 | // ~~~~~~~~~~~~~~~~~~~~~~~ 4 | // 5 | // Copyright (c) 2003-2015 Christopher M. Kohlhoff (chris at kohlhoff dot com) 6 | // 7 | // Distributed under the Boost Software License, Version 1.0. (See accompanying 8 | // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) 9 | // 10 | 11 | #ifndef ASIO_DETAIL_ATOMIC_COUNT_HPP 12 | #define ASIO_DETAIL_ATOMIC_COUNT_HPP 13 | 14 | #if defined(_MSC_VER) && (_MSC_VER >= 1200) 15 | # pragma once 16 | #endif // defined(_MSC_VER) && (_MSC_VER >= 1200) 17 | 18 | #include "asio/detail/config.hpp" 19 | 20 | #if !defined(ASIO_HAS_THREADS) 21 | // Nothing to include. 22 | #elif defined(ASIO_HAS_STD_ATOMIC) 23 | # include 24 | #else // defined(ASIO_HAS_STD_ATOMIC) 25 | # include 26 | #endif // defined(ASIO_HAS_STD_ATOMIC) 27 | 28 | namespace asio { 29 | namespace detail { 30 | 31 | #if !defined(ASIO_HAS_THREADS) 32 | typedef long atomic_count; 33 | inline void increment(atomic_count& a, long b) { a += b; } 34 | #elif defined(ASIO_HAS_STD_ATOMIC) 35 | typedef std::atomic atomic_count; 36 | inline void increment(atomic_count& a, long b) { a += b; } 37 | #else // defined(ASIO_HAS_STD_ATOMIC) 38 | typedef boost::detail::atomic_count atomic_count; 39 | inline void increment(atomic_count& a, long b) { while (b > 0) ++a, --b; } 40 | #endif // defined(ASIO_HAS_STD_ATOMIC) 41 | 42 | } // namespace detail 43 | } // namespace asio 44 | 45 | #endif // ASIO_DETAIL_ATOMIC_COUNT_HPP 46 | -------------------------------------------------------------------------------- /third_party/asio/asio/include/asio/detail/buffer_resize_guard.hpp: -------------------------------------------------------------------------------- 1 | // 2 | // detail/buffer_resize_guard.hpp 3 | // ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 4 | // 5 | // Copyright (c) 2003-2015 Christopher M. Kohlhoff (chris at kohlhoff dot com) 6 | // 7 | // Distributed under the Boost Software License, Version 1.0. (See accompanying 8 | // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) 9 | // 10 | 11 | #ifndef ASIO_DETAIL_BUFFER_RESIZE_GUARD_HPP 12 | #define ASIO_DETAIL_BUFFER_RESIZE_GUARD_HPP 13 | 14 | #if defined(_MSC_VER) && (_MSC_VER >= 1200) 15 | # pragma once 16 | #endif // defined(_MSC_VER) && (_MSC_VER >= 1200) 17 | 18 | #include "asio/detail/config.hpp" 19 | #include "asio/detail/limits.hpp" 20 | 21 | #include "asio/detail/push_options.hpp" 22 | 23 | namespace asio { 24 | namespace detail { 25 | 26 | // Helper class to manage buffer resizing in an exception safe way. 27 | template 28 | class buffer_resize_guard 29 | { 30 | public: 31 | // Constructor. 32 | buffer_resize_guard(Buffer& buffer) 33 | : buffer_(buffer), 34 | old_size_(buffer.size()) 35 | { 36 | } 37 | 38 | // Destructor rolls back the buffer resize unless commit was called. 39 | ~buffer_resize_guard() 40 | { 41 | if (old_size_ != (std::numeric_limits::max)()) 42 | { 43 | buffer_.resize(old_size_); 44 | } 45 | } 46 | 47 | // Commit the resize transaction. 48 | void commit() 49 | { 50 | old_size_ = (std::numeric_limits::max)(); 51 | } 52 | 53 | private: 54 | // The buffer being managed. 55 | Buffer& buffer_; 56 | 57 | // The size of the buffer at the time the guard was constructed. 58 | size_t old_size_; 59 | }; 60 | 61 | } // namespace detail 62 | } // namespace asio 63 | 64 | #include "asio/detail/pop_options.hpp" 65 | 66 | #endif // ASIO_DETAIL_BUFFER_RESIZE_GUARD_HPP 67 | -------------------------------------------------------------------------------- /third_party/asio/asio/include/asio/detail/cstdint.hpp: -------------------------------------------------------------------------------- 1 | // 2 | // detail/cstdint.hpp 3 | // ~~~~~~~~~~~~~~~~~~ 4 | // 5 | // Copyright (c) 2003-2015 Christopher M. Kohlhoff (chris at kohlhoff dot com) 6 | // 7 | // Distributed under the Boost Software License, Version 1.0. (See accompanying 8 | // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) 9 | // 10 | 11 | #ifndef ASIO_DETAIL_CSTDINT_HPP 12 | #define ASIO_DETAIL_CSTDINT_HPP 13 | 14 | #if defined(_MSC_VER) && (_MSC_VER >= 1200) 15 | # pragma once 16 | #endif // defined(_MSC_VER) && (_MSC_VER >= 1200) 17 | 18 | #include "asio/detail/config.hpp" 19 | 20 | #if defined(ASIO_HAS_CSTDINT) 21 | # include 22 | #else // defined(ASIO_HAS_CSTDINT) 23 | # include 24 | #endif // defined(ASIO_HAS_CSTDINT) 25 | 26 | namespace asio { 27 | 28 | #if defined(ASIO_HAS_CSTDINT) 29 | using std::int16_t; 30 | using std::uint16_t; 31 | using std::int32_t; 32 | using std::uint32_t; 33 | using std::int64_t; 34 | using std::uint64_t; 35 | #else // defined(ASIO_HAS_CSTDINT) 36 | using boost::int16_t; 37 | using boost::uint16_t; 38 | using boost::int32_t; 39 | using boost::uint32_t; 40 | using boost::int64_t; 41 | using boost::uint64_t; 42 | #endif // defined(ASIO_HAS_CSTDINT) 43 | 44 | } // namespace asio 45 | 46 | #endif // ASIO_DETAIL_CSTDINT_HPP 47 | -------------------------------------------------------------------------------- /third_party/asio/asio/include/asio/detail/date_time_fwd.hpp: -------------------------------------------------------------------------------- 1 | // 2 | // detail/date_time_fwd.hpp 3 | // ~~~~~~~~~~~~~~~~~~~~~~~~ 4 | // 5 | // Copyright (c) 2003-2015 Christopher M. Kohlhoff (chris at kohlhoff dot com) 6 | // 7 | // Distributed under the Boost Software License, Version 1.0. (See accompanying 8 | // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) 9 | // 10 | 11 | #ifndef ASIO_DETAIL_DATE_TIME_FWD_HPP 12 | #define ASIO_DETAIL_DATE_TIME_FWD_HPP 13 | 14 | #if defined(_MSC_VER) && (_MSC_VER >= 1200) 15 | # pragma once 16 | #endif // defined(_MSC_VER) && (_MSC_VER >= 1200) 17 | 18 | #include "asio/detail/config.hpp" 19 | 20 | namespace boost { 21 | namespace date_time { 22 | 23 | template 24 | class base_time; 25 | 26 | } // namespace date_time 27 | namespace posix_time { 28 | 29 | class ptime; 30 | 31 | } // namespace posix_time 32 | } // namespace boost 33 | 34 | #endif // ASIO_DETAIL_DATE_TIME_FWD_HPP 35 | -------------------------------------------------------------------------------- /third_party/asio/asio/include/asio/detail/dependent_type.hpp: -------------------------------------------------------------------------------- 1 | // 2 | // detail/dependent_type.hpp 3 | // ~~~~~~~~~~~~~~~~~~~~~~~~~ 4 | // 5 | // Copyright (c) 2003-2015 Christopher M. Kohlhoff (chris at kohlhoff dot com) 6 | // 7 | // Distributed under the Boost Software License, Version 1.0. (See accompanying 8 | // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) 9 | // 10 | 11 | #ifndef ASIO_DETAIL_DEPENDENT_TYPE_HPP 12 | #define ASIO_DETAIL_DEPENDENT_TYPE_HPP 13 | 14 | #if defined(_MSC_VER) && (_MSC_VER >= 1200) 15 | # pragma once 16 | #endif // defined(_MSC_VER) && (_MSC_VER >= 1200) 17 | 18 | #include "asio/detail/config.hpp" 19 | 20 | #include "asio/detail/push_options.hpp" 21 | 22 | namespace asio { 23 | namespace detail { 24 | 25 | template 26 | struct dependent_type 27 | { 28 | typedef T type; 29 | }; 30 | 31 | } // namespace detail 32 | } // namespace asio 33 | 34 | #include "asio/detail/pop_options.hpp" 35 | 36 | #endif // ASIO_DETAIL_DEPENDENT_TYPE_HPP 37 | -------------------------------------------------------------------------------- /third_party/asio/asio/include/asio/detail/event.hpp: -------------------------------------------------------------------------------- 1 | // 2 | // detail/event.hpp 3 | // ~~~~~~~~~~~~~~~~ 4 | // 5 | // Copyright (c) 2003-2015 Christopher M. Kohlhoff (chris at kohlhoff dot com) 6 | // 7 | // Distributed under the Boost Software License, Version 1.0. (See accompanying 8 | // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) 9 | // 10 | 11 | #ifndef ASIO_DETAIL_EVENT_HPP 12 | #define ASIO_DETAIL_EVENT_HPP 13 | 14 | #if defined(_MSC_VER) && (_MSC_VER >= 1200) 15 | # pragma once 16 | #endif // defined(_MSC_VER) && (_MSC_VER >= 1200) 17 | 18 | #include "asio/detail/config.hpp" 19 | 20 | #if !defined(ASIO_HAS_THREADS) 21 | # include "asio/detail/null_event.hpp" 22 | #elif defined(ASIO_WINDOWS) 23 | # include "asio/detail/win_event.hpp" 24 | #elif defined(ASIO_HAS_PTHREADS) 25 | # include "asio/detail/posix_event.hpp" 26 | #elif defined(ASIO_HAS_STD_MUTEX_AND_CONDVAR) 27 | # include "asio/detail/std_event.hpp" 28 | #else 29 | # error Only Windows, POSIX and std::condition_variable are supported! 30 | #endif 31 | 32 | namespace asio { 33 | namespace detail { 34 | 35 | #if !defined(ASIO_HAS_THREADS) 36 | typedef null_event event; 37 | #elif defined(ASIO_WINDOWS) 38 | typedef win_event event; 39 | #elif defined(ASIO_HAS_PTHREADS) 40 | typedef posix_event event; 41 | #elif defined(ASIO_HAS_STD_MUTEX_AND_CONDVAR) 42 | typedef std_event event; 43 | #endif 44 | 45 | } // namespace detail 46 | } // namespace asio 47 | 48 | #endif // ASIO_DETAIL_EVENT_HPP 49 | -------------------------------------------------------------------------------- /third_party/asio/asio/include/asio/detail/fd_set_adapter.hpp: -------------------------------------------------------------------------------- 1 | // 2 | // detail/fd_set_adapter.hpp 3 | // ~~~~~~~~~~~~~~~~~~~~~~~~~ 4 | // 5 | // Copyright (c) 2003-2015 Christopher M. Kohlhoff (chris at kohlhoff dot com) 6 | // 7 | // Distributed under the Boost Software License, Version 1.0. (See accompanying 8 | // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) 9 | // 10 | 11 | #ifndef ASIO_DETAIL_FD_SET_ADAPTER_HPP 12 | #define ASIO_DETAIL_FD_SET_ADAPTER_HPP 13 | 14 | #if defined(_MSC_VER) && (_MSC_VER >= 1200) 15 | # pragma once 16 | #endif // defined(_MSC_VER) && (_MSC_VER >= 1200) 17 | 18 | #include "asio/detail/config.hpp" 19 | 20 | #if !defined(ASIO_WINDOWS_RUNTIME) 21 | 22 | #include "asio/detail/posix_fd_set_adapter.hpp" 23 | #include "asio/detail/win_fd_set_adapter.hpp" 24 | 25 | namespace asio { 26 | namespace detail { 27 | 28 | #if defined(ASIO_WINDOWS) || defined(__CYGWIN__) 29 | typedef win_fd_set_adapter fd_set_adapter; 30 | #else 31 | typedef posix_fd_set_adapter fd_set_adapter; 32 | #endif 33 | 34 | } // namespace detail 35 | } // namespace asio 36 | 37 | #endif // !defined(ASIO_WINDOWS_RUNTIME) 38 | 39 | #endif // ASIO_DETAIL_FD_SET_ADAPTER_HPP 40 | -------------------------------------------------------------------------------- /third_party/asio/asio/include/asio/detail/function.hpp: -------------------------------------------------------------------------------- 1 | // 2 | // detail/function.hpp 3 | // ~~~~~~~~~~~~~~~~~~~ 4 | // 5 | // Copyright (c) 2003-2015 Christopher M. Kohlhoff (chris at kohlhoff dot com) 6 | // 7 | // Distributed under the Boost Software License, Version 1.0. (See accompanying 8 | // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) 9 | // 10 | 11 | #ifndef ASIO_DETAIL_FUNCTION_HPP 12 | #define ASIO_DETAIL_FUNCTION_HPP 13 | 14 | #if defined(_MSC_VER) && (_MSC_VER >= 1200) 15 | # pragma once 16 | #endif // defined(_MSC_VER) && (_MSC_VER >= 1200) 17 | 18 | #include "asio/detail/config.hpp" 19 | 20 | #if defined(ASIO_HAS_STD_FUNCTION) 21 | # include 22 | #else // defined(ASIO_HAS_STD_FUNCTION) 23 | # include 24 | #endif // defined(ASIO_HAS_STD_FUNCTION) 25 | 26 | namespace asio { 27 | namespace detail { 28 | 29 | #if defined(ASIO_HAS_STD_FUNCTION) 30 | using std::function; 31 | #else // defined(ASIO_HAS_STD_FUNCTION) 32 | using boost::function; 33 | #endif // defined(ASIO_HAS_STD_FUNCTION) 34 | 35 | } // namespace detail 36 | } // namespace asio 37 | 38 | #endif // ASIO_DETAIL_FUNCTION_HPP 39 | -------------------------------------------------------------------------------- /third_party/asio/asio/include/asio/detail/gcc_hppa_fenced_block.hpp: -------------------------------------------------------------------------------- 1 | // 2 | // detail/gcc_hppa_fenced_block.hpp 3 | // ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 4 | // 5 | // Copyright (c) 2003-2015 Christopher M. Kohlhoff (chris at kohlhoff dot com) 6 | // 7 | // Distributed under the Boost Software License, Version 1.0. (See accompanying 8 | // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) 9 | // 10 | 11 | #ifndef ASIO_DETAIL_GCC_HPPA_FENCED_BLOCK_HPP 12 | #define ASIO_DETAIL_GCC_HPPA_FENCED_BLOCK_HPP 13 | 14 | #if defined(_MSC_VER) && (_MSC_VER >= 1200) 15 | # pragma once 16 | #endif // defined(_MSC_VER) && (_MSC_VER >= 1200) 17 | 18 | #include "asio/detail/config.hpp" 19 | 20 | #if defined(__GNUC__) && (defined(__hppa) || defined(__hppa__)) 21 | 22 | #include "asio/detail/push_options.hpp" 23 | 24 | namespace asio { 25 | namespace detail { 26 | 27 | class gcc_hppa_fenced_block 28 | : private noncopyable 29 | { 30 | public: 31 | enum half_t { half }; 32 | enum full_t { full }; 33 | 34 | // Constructor for a half fenced block. 35 | explicit gcc_hppa_fenced_block(half_t) 36 | { 37 | } 38 | 39 | // Constructor for a full fenced block. 40 | explicit gcc_hppa_fenced_block(full_t) 41 | { 42 | barrier(); 43 | } 44 | 45 | // Destructor. 46 | ~gcc_hppa_fenced_block() 47 | { 48 | barrier(); 49 | } 50 | 51 | private: 52 | static void barrier() 53 | { 54 | // This is just a placeholder and almost certainly not sufficient. 55 | __asm__ __volatile__ ("" : : : "memory"); 56 | } 57 | }; 58 | 59 | } // namespace detail 60 | } // namespace asio 61 | 62 | #include "asio/detail/pop_options.hpp" 63 | 64 | #endif // defined(__GNUC__) && (defined(__hppa) || defined(__hppa__)) 65 | 66 | #endif // ASIO_DETAIL_GCC_HPPA_FENCED_BLOCK_HPP 67 | -------------------------------------------------------------------------------- /third_party/asio/asio/include/asio/detail/gcc_sync_fenced_block.hpp: -------------------------------------------------------------------------------- 1 | // 2 | // detail/gcc_sync_fenced_block.hpp 3 | // ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 4 | // 5 | // Copyright (c) 2003-2015 Christopher M. Kohlhoff (chris at kohlhoff dot com) 6 | // 7 | // Distributed under the Boost Software License, Version 1.0. (See accompanying 8 | // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) 9 | // 10 | 11 | #ifndef ASIO_DETAIL_GCC_SYNC_FENCED_BLOCK_HPP 12 | #define ASIO_DETAIL_GCC_SYNC_FENCED_BLOCK_HPP 13 | 14 | #if defined(_MSC_VER) && (_MSC_VER >= 1200) 15 | # pragma once 16 | #endif // defined(_MSC_VER) && (_MSC_VER >= 1200) 17 | 18 | #include "asio/detail/config.hpp" 19 | 20 | #if defined(__GNUC__) \ 21 | && ((__GNUC__ == 4 && __GNUC_MINOR__ >= 1) || (__GNUC__ > 4)) \ 22 | && !defined(__INTEL_COMPILER) && !defined(__ICL) \ 23 | && !defined(__ICC) && !defined(__ECC) && !defined(__PATHSCALE__) 24 | 25 | #include "asio/detail/push_options.hpp" 26 | 27 | namespace asio { 28 | namespace detail { 29 | 30 | class gcc_sync_fenced_block 31 | : private noncopyable 32 | { 33 | public: 34 | enum half_or_full_t { half, full }; 35 | 36 | // Constructor. 37 | explicit gcc_sync_fenced_block(half_or_full_t) 38 | : value_(0) 39 | { 40 | __sync_lock_test_and_set(&value_, 1); 41 | } 42 | 43 | // Destructor. 44 | ~gcc_sync_fenced_block() 45 | { 46 | __sync_lock_release(&value_); 47 | } 48 | 49 | private: 50 | int value_; 51 | }; 52 | 53 | } // namespace detail 54 | } // namespace asio 55 | 56 | #include "asio/detail/pop_options.hpp" 57 | 58 | #endif // defined(__GNUC__) 59 | // && ((__GNUC__ == 4 && __GNUC_MINOR__ >= 1) || (__GNUC__ > 4)) 60 | // && !defined(__INTEL_COMPILER) && !defined(__ICL) 61 | // && !defined(__ICC) && !defined(__ECC) && !defined(__PATHSCALE__) 62 | 63 | #endif // ASIO_DETAIL_GCC_SYNC_FENCED_BLOCK_HPP 64 | -------------------------------------------------------------------------------- /third_party/asio/asio/include/asio/detail/handler_cont_helpers.hpp: -------------------------------------------------------------------------------- 1 | // 2 | // detail/handler_cont_helpers.hpp 3 | // ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 4 | // 5 | // Copyright (c) 2003-2015 Christopher M. Kohlhoff (chris at kohlhoff dot com) 6 | // 7 | // Distributed under the Boost Software License, Version 1.0. (See accompanying 8 | // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) 9 | // 10 | 11 | #ifndef ASIO_DETAIL_HANDLER_CONT_HELPERS_HPP 12 | #define ASIO_DETAIL_HANDLER_CONT_HELPERS_HPP 13 | 14 | #if defined(_MSC_VER) && (_MSC_VER >= 1200) 15 | # pragma once 16 | #endif // defined(_MSC_VER) && (_MSC_VER >= 1200) 17 | 18 | #include "asio/detail/config.hpp" 19 | #include "asio/detail/addressof.hpp" 20 | #include "asio/handler_continuation_hook.hpp" 21 | 22 | #include "asio/detail/push_options.hpp" 23 | 24 | // Calls to asio_handler_is_continuation must be made from a namespace that 25 | // does not contain overloads of this function. This namespace is defined here 26 | // for that purpose. 27 | namespace asio_handler_cont_helpers { 28 | 29 | template 30 | inline bool is_continuation(Context& context) 31 | { 32 | #if !defined(ASIO_HAS_HANDLER_HOOKS) 33 | return false; 34 | #else 35 | using asio::asio_handler_is_continuation; 36 | return asio_handler_is_continuation( 37 | asio::detail::addressof(context)); 38 | #endif 39 | } 40 | 41 | } // namespace asio_handler_cont_helpers 42 | 43 | #include "asio/detail/pop_options.hpp" 44 | 45 | #endif // ASIO_DETAIL_HANDLER_CONT_HELPERS_HPP 46 | -------------------------------------------------------------------------------- /third_party/asio/asio/include/asio/detail/impl/posix_event.ipp: -------------------------------------------------------------------------------- 1 | // 2 | // detail/impl/posix_event.ipp 3 | // ~~~~~~~~~~~~~~~~~~~~~~~~~~~ 4 | // 5 | // Copyright (c) 2003-2015 Christopher M. Kohlhoff (chris at kohlhoff dot com) 6 | // 7 | // Distributed under the Boost Software License, Version 1.0. (See accompanying 8 | // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) 9 | // 10 | 11 | #ifndef ASIO_DETAIL_IMPL_POSIX_EVENT_IPP 12 | #define ASIO_DETAIL_IMPL_POSIX_EVENT_IPP 13 | 14 | #if defined(_MSC_VER) && (_MSC_VER >= 1200) 15 | # pragma once 16 | #endif // defined(_MSC_VER) && (_MSC_VER >= 1200) 17 | 18 | #include "asio/detail/config.hpp" 19 | 20 | #if defined(ASIO_HAS_PTHREADS) 21 | 22 | #include "asio/detail/posix_event.hpp" 23 | #include "asio/detail/throw_error.hpp" 24 | #include "asio/error.hpp" 25 | 26 | #include "asio/detail/push_options.hpp" 27 | 28 | namespace asio { 29 | namespace detail { 30 | 31 | posix_event::posix_event() 32 | : state_(0) 33 | { 34 | int error = ::pthread_cond_init(&cond_, 0); 35 | asio::error_code ec(error, 36 | asio::error::get_system_category()); 37 | asio::detail::throw_error(ec, "event"); 38 | } 39 | 40 | } // namespace detail 41 | } // namespace asio 42 | 43 | #include "asio/detail/pop_options.hpp" 44 | 45 | #endif // defined(ASIO_HAS_PTHREADS) 46 | 47 | #endif // ASIO_DETAIL_IMPL_POSIX_EVENT_IPP 48 | -------------------------------------------------------------------------------- /third_party/asio/asio/include/asio/detail/impl/posix_mutex.ipp: -------------------------------------------------------------------------------- 1 | // 2 | // detail/impl/posix_mutex.ipp 3 | // ~~~~~~~~~~~~~~~~~~~~~~~~~~~ 4 | // 5 | // Copyright (c) 2003-2015 Christopher M. Kohlhoff (chris at kohlhoff dot com) 6 | // 7 | // Distributed under the Boost Software License, Version 1.0. (See accompanying 8 | // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) 9 | // 10 | 11 | #ifndef ASIO_DETAIL_IMPL_POSIX_MUTEX_IPP 12 | #define ASIO_DETAIL_IMPL_POSIX_MUTEX_IPP 13 | 14 | #if defined(_MSC_VER) && (_MSC_VER >= 1200) 15 | # pragma once 16 | #endif // defined(_MSC_VER) && (_MSC_VER >= 1200) 17 | 18 | #include "asio/detail/config.hpp" 19 | 20 | #if defined(ASIO_HAS_PTHREADS) 21 | 22 | #include "asio/detail/posix_mutex.hpp" 23 | #include "asio/detail/throw_error.hpp" 24 | #include "asio/error.hpp" 25 | 26 | #include "asio/detail/push_options.hpp" 27 | 28 | namespace asio { 29 | namespace detail { 30 | 31 | posix_mutex::posix_mutex() 32 | { 33 | int error = ::pthread_mutex_init(&mutex_, 0); 34 | asio::error_code ec(error, 35 | asio::error::get_system_category()); 36 | asio::detail::throw_error(ec, "mutex"); 37 | } 38 | 39 | } // namespace detail 40 | } // namespace asio 41 | 42 | #include "asio/detail/pop_options.hpp" 43 | 44 | #endif // defined(ASIO_HAS_PTHREADS) 45 | 46 | #endif // ASIO_DETAIL_IMPL_POSIX_MUTEX_IPP 47 | -------------------------------------------------------------------------------- /third_party/asio/asio/include/asio/detail/impl/posix_tss_ptr.ipp: -------------------------------------------------------------------------------- 1 | // 2 | // detail/impl/posix_tss_ptr.ipp 3 | // ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 4 | // 5 | // Copyright (c) 2003-2015 Christopher M. Kohlhoff (chris at kohlhoff dot com) 6 | // 7 | // Distributed under the Boost Software License, Version 1.0. (See accompanying 8 | // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) 9 | // 10 | 11 | #ifndef ASIO_DETAIL_IMPL_POSIX_TSS_PTR_IPP 12 | #define ASIO_DETAIL_IMPL_POSIX_TSS_PTR_IPP 13 | 14 | #if defined(_MSC_VER) && (_MSC_VER >= 1200) 15 | # pragma once 16 | #endif // defined(_MSC_VER) && (_MSC_VER >= 1200) 17 | 18 | #include "asio/detail/config.hpp" 19 | 20 | #if defined(ASIO_HAS_PTHREADS) 21 | 22 | #include "asio/detail/posix_tss_ptr.hpp" 23 | #include "asio/detail/throw_error.hpp" 24 | #include "asio/error.hpp" 25 | 26 | #include "asio/detail/push_options.hpp" 27 | 28 | namespace asio { 29 | namespace detail { 30 | 31 | void posix_tss_ptr_create(pthread_key_t& key) 32 | { 33 | int error = ::pthread_key_create(&key, 0); 34 | asio::error_code ec(error, 35 | asio::error::get_system_category()); 36 | asio::detail::throw_error(ec, "tss"); 37 | } 38 | 39 | } // namespace detail 40 | } // namespace asio 41 | 42 | #include "asio/detail/pop_options.hpp" 43 | 44 | #endif // defined(ASIO_HAS_PTHREADS) 45 | 46 | #endif // ASIO_DETAIL_IMPL_POSIX_TSS_PTR_IPP 47 | -------------------------------------------------------------------------------- /third_party/asio/asio/include/asio/detail/impl/win_event.ipp: -------------------------------------------------------------------------------- 1 | // 2 | // detail/win_event.ipp 3 | // ~~~~~~~~~~~~~~~~~~~~ 4 | // 5 | // Copyright (c) 2003-2015 Christopher M. Kohlhoff (chris at kohlhoff dot com) 6 | // 7 | // Distributed under the Boost Software License, Version 1.0. (See accompanying 8 | // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) 9 | // 10 | 11 | #ifndef ASIO_DETAIL_IMPL_WIN_EVENT_IPP 12 | #define ASIO_DETAIL_IMPL_WIN_EVENT_IPP 13 | 14 | #if defined(_MSC_VER) && (_MSC_VER >= 1200) 15 | # pragma once 16 | #endif // defined(_MSC_VER) && (_MSC_VER >= 1200) 17 | 18 | #include "asio/detail/config.hpp" 19 | 20 | #if defined(ASIO_WINDOWS) 21 | 22 | #include "asio/detail/throw_error.hpp" 23 | #include "asio/detail/win_event.hpp" 24 | #include "asio/error.hpp" 25 | 26 | #include "asio/detail/push_options.hpp" 27 | 28 | namespace asio { 29 | namespace detail { 30 | 31 | win_event::win_event() 32 | : state_(0) 33 | { 34 | events_[0] = ::CreateEvent(0, true, false, 0); 35 | if (!events_[0]) 36 | { 37 | DWORD last_error = ::GetLastError(); 38 | asio::error_code ec(last_error, 39 | asio::error::get_system_category()); 40 | asio::detail::throw_error(ec, "event"); 41 | } 42 | 43 | events_[1] = ::CreateEvent(0, false, false, 0); 44 | if (!events_[1]) 45 | { 46 | DWORD last_error = ::GetLastError(); 47 | ::CloseHandle(events_[0]); 48 | asio::error_code ec(last_error, 49 | asio::error::get_system_category()); 50 | asio::detail::throw_error(ec, "event"); 51 | } 52 | } 53 | 54 | win_event::~win_event() 55 | { 56 | ::CloseHandle(events_[0]); 57 | ::CloseHandle(events_[1]); 58 | } 59 | 60 | } // namespace detail 61 | } // namespace asio 62 | 63 | #include "asio/detail/pop_options.hpp" 64 | 65 | #endif // defined(ASIO_WINDOWS) 66 | 67 | #endif // ASIO_DETAIL_IMPL_WIN_EVENT_IPP 68 | -------------------------------------------------------------------------------- /third_party/asio/asio/include/asio/detail/impl/win_tss_ptr.ipp: -------------------------------------------------------------------------------- 1 | // 2 | // detail/impl/win_tss_ptr.ipp 3 | // ~~~~~~~~~~~~~~~~~~~~~~~~~~~ 4 | // 5 | // Copyright (c) 2003-2015 Christopher M. Kohlhoff (chris at kohlhoff dot com) 6 | // 7 | // Distributed under the Boost Software License, Version 1.0. (See accompanying 8 | // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) 9 | // 10 | 11 | #ifndef ASIO_DETAIL_IMPL_WIN_TSS_PTR_IPP 12 | #define ASIO_DETAIL_IMPL_WIN_TSS_PTR_IPP 13 | 14 | #if defined(_MSC_VER) && (_MSC_VER >= 1200) 15 | # pragma once 16 | #endif // defined(_MSC_VER) && (_MSC_VER >= 1200) 17 | 18 | #include "asio/detail/config.hpp" 19 | 20 | #if defined(ASIO_WINDOWS) 21 | 22 | #include "asio/detail/throw_error.hpp" 23 | #include "asio/detail/win_tss_ptr.hpp" 24 | #include "asio/error.hpp" 25 | 26 | #include "asio/detail/push_options.hpp" 27 | 28 | namespace asio { 29 | namespace detail { 30 | 31 | DWORD win_tss_ptr_create() 32 | { 33 | #if defined(UNDER_CE) 34 | enum { out_of_indexes = 0xFFFFFFFF }; 35 | #else 36 | enum { out_of_indexes = TLS_OUT_OF_INDEXES }; 37 | #endif 38 | 39 | DWORD tss_key = ::TlsAlloc(); 40 | if (tss_key == out_of_indexes) 41 | { 42 | DWORD last_error = ::GetLastError(); 43 | asio::error_code ec(last_error, 44 | asio::error::get_system_category()); 45 | asio::detail::throw_error(ec, "tss"); 46 | } 47 | return tss_key; 48 | } 49 | 50 | } // namespace detail 51 | } // namespace asio 52 | 53 | #include "asio/detail/pop_options.hpp" 54 | 55 | #endif // defined(ASIO_WINDOWS) 56 | 57 | #endif // ASIO_DETAIL_IMPL_WIN_TSS_PTR_IPP 58 | -------------------------------------------------------------------------------- /third_party/asio/asio/include/asio/detail/keyword_tss_ptr.hpp: -------------------------------------------------------------------------------- 1 | // 2 | // detail/keyword_tss_ptr.hpp 3 | // ~~~~~~~~~~~~~~~~~~~~~~~~~~ 4 | // 5 | // Copyright (c) 2003-2015 Christopher M. Kohlhoff (chris at kohlhoff dot com) 6 | // 7 | // Distributed under the Boost Software License, Version 1.0. (See accompanying 8 | // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) 9 | // 10 | 11 | #ifndef ASIO_DETAIL_KEYWORD_TSS_PTR_HPP 12 | #define ASIO_DETAIL_KEYWORD_TSS_PTR_HPP 13 | 14 | #if defined(_MSC_VER) && (_MSC_VER >= 1200) 15 | # pragma once 16 | #endif // defined(_MSC_VER) && (_MSC_VER >= 1200) 17 | 18 | #include "asio/detail/config.hpp" 19 | 20 | #if defined(ASIO_HAS_THREAD_KEYWORD_EXTENSION) 21 | 22 | #include "asio/detail/noncopyable.hpp" 23 | 24 | #include "asio/detail/push_options.hpp" 25 | 26 | namespace asio { 27 | namespace detail { 28 | 29 | template 30 | class keyword_tss_ptr 31 | : private noncopyable 32 | { 33 | public: 34 | // Constructor. 35 | keyword_tss_ptr() 36 | { 37 | } 38 | 39 | // Destructor. 40 | ~keyword_tss_ptr() 41 | { 42 | } 43 | 44 | // Get the value. 45 | operator T*() const 46 | { 47 | return value_; 48 | } 49 | 50 | // Set the value. 51 | void operator=(T* value) 52 | { 53 | value_ = value; 54 | } 55 | 56 | private: 57 | static ASIO_THREAD_KEYWORD T* value_; 58 | }; 59 | 60 | template 61 | ASIO_THREAD_KEYWORD T* keyword_tss_ptr::value_; 62 | 63 | } // namespace detail 64 | } // namespace asio 65 | 66 | #include "asio/detail/pop_options.hpp" 67 | 68 | #endif // defined(ASIO_HAS_THREAD_KEYWORD_EXTENSION) 69 | 70 | #endif // ASIO_DETAIL_KEYWORD_TSS_PTR_HPP 71 | -------------------------------------------------------------------------------- /third_party/asio/asio/include/asio/detail/limits.hpp: -------------------------------------------------------------------------------- 1 | // 2 | // detail/limits.hpp 3 | // ~~~~~~~~~~~~~~~~~ 4 | // 5 | // Copyright (c) 2003-2011 Christopher M. Kohlhoff (chris at kohlhoff dot com) 6 | // 7 | // Distributed under the Boost Software License, Version 1.0. (See accompanying 8 | // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) 9 | // 10 | 11 | #ifndef ASIO_DETAIL_LIMITS_HPP 12 | #define ASIO_DETAIL_LIMITS_HPP 13 | 14 | #if defined(_MSC_VER) && (_MSC_VER >= 1200) 15 | # pragma once 16 | #endif // defined(_MSC_VER) && (_MSC_VER >= 1200) 17 | 18 | #include "asio/detail/config.hpp" 19 | 20 | #if defined(ASIO_HAS_BOOST_LIMITS) 21 | # include 22 | #else // defined(ASIO_HAS_BOOST_LIMITS) 23 | # include 24 | #endif // defined(ASIO_HAS_BOOST_LIMITS) 25 | 26 | #endif // ASIO_DETAIL_LIMITS_HPP 27 | -------------------------------------------------------------------------------- /third_party/asio/asio/include/asio/detail/local_free_on_block_exit.hpp: -------------------------------------------------------------------------------- 1 | // 2 | // detail/local_free_on_block_exit.hpp 3 | // ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 4 | // 5 | // Copyright (c) 2003-2015 Christopher M. Kohlhoff (chris at kohlhoff dot com) 6 | // 7 | // Distributed under the Boost Software License, Version 1.0. (See accompanying 8 | // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) 9 | // 10 | 11 | #ifndef ASIO_DETAIL_LOCAL_FREE_ON_BLOCK_EXIT_HPP 12 | #define ASIO_DETAIL_LOCAL_FREE_ON_BLOCK_EXIT_HPP 13 | 14 | #if defined(_MSC_VER) && (_MSC_VER >= 1200) 15 | # pragma once 16 | #endif // defined(_MSC_VER) && (_MSC_VER >= 1200) 17 | 18 | #include "asio/detail/config.hpp" 19 | 20 | #if defined(ASIO_WINDOWS) || defined(__CYGWIN__) 21 | 22 | #include "asio/detail/noncopyable.hpp" 23 | #include "asio/detail/socket_types.hpp" 24 | 25 | #include "asio/detail/push_options.hpp" 26 | 27 | namespace asio { 28 | namespace detail { 29 | 30 | class local_free_on_block_exit 31 | : private noncopyable 32 | { 33 | public: 34 | // Constructor blocks all signals for the calling thread. 35 | explicit local_free_on_block_exit(void* p) 36 | : p_(p) 37 | { 38 | } 39 | 40 | // Destructor restores the previous signal mask. 41 | ~local_free_on_block_exit() 42 | { 43 | ::LocalFree(p_); 44 | } 45 | 46 | private: 47 | void* p_; 48 | }; 49 | 50 | } // namespace detail 51 | } // namespace asio 52 | 53 | #include "asio/detail/pop_options.hpp" 54 | 55 | #endif // defined(ASIO_WINDOWS) || defined(__CYGWIN__) 56 | 57 | #endif // ASIO_DETAIL_LOCAL_FREE_ON_BLOCK_EXIT_HPP 58 | -------------------------------------------------------------------------------- /third_party/asio/asio/include/asio/detail/macos_fenced_block.hpp: -------------------------------------------------------------------------------- 1 | // 2 | // detail/macos_fenced_block.hpp 3 | // ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 4 | // 5 | // Copyright (c) 2003-2015 Christopher M. Kohlhoff (chris at kohlhoff dot com) 6 | // 7 | // Distributed under the Boost Software License, Version 1.0. (See accompanying 8 | // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) 9 | // 10 | 11 | #ifndef ASIO_DETAIL_MACOS_FENCED_BLOCK_HPP 12 | #define ASIO_DETAIL_MACOS_FENCED_BLOCK_HPP 13 | 14 | #if defined(_MSC_VER) && (_MSC_VER >= 1200) 15 | # pragma once 16 | #endif // defined(_MSC_VER) && (_MSC_VER >= 1200) 17 | 18 | #include "asio/detail/config.hpp" 19 | 20 | #if defined(__MACH__) && defined(__APPLE__) 21 | 22 | #include 23 | 24 | #include "asio/detail/push_options.hpp" 25 | 26 | namespace asio { 27 | namespace detail { 28 | 29 | class macos_fenced_block 30 | : private noncopyable 31 | { 32 | public: 33 | enum half_t { half }; 34 | enum full_t { full }; 35 | 36 | // Constructor for a half fenced block. 37 | explicit macos_fenced_block(half_t) 38 | { 39 | } 40 | 41 | // Constructor for a full fenced block. 42 | explicit macos_fenced_block(full_t) 43 | { 44 | OSMemoryBarrier(); 45 | } 46 | 47 | // Destructor. 48 | ~macos_fenced_block() 49 | { 50 | OSMemoryBarrier(); 51 | } 52 | }; 53 | 54 | } // namespace detail 55 | } // namespace asio 56 | 57 | #include "asio/detail/pop_options.hpp" 58 | 59 | #endif // defined(__MACH__) && defined(__APPLE__) 60 | 61 | #endif // ASIO_DETAIL_MACOS_FENCED_BLOCK_HPP 62 | -------------------------------------------------------------------------------- /third_party/asio/asio/include/asio/detail/mutex.hpp: -------------------------------------------------------------------------------- 1 | // 2 | // detail/mutex.hpp 3 | // ~~~~~~~~~~~~~~~~ 4 | // 5 | // Copyright (c) 2003-2015 Christopher M. Kohlhoff (chris at kohlhoff dot com) 6 | // 7 | // Distributed under the Boost Software License, Version 1.0. (See accompanying 8 | // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) 9 | // 10 | 11 | #ifndef ASIO_DETAIL_MUTEX_HPP 12 | #define ASIO_DETAIL_MUTEX_HPP 13 | 14 | #if defined(_MSC_VER) && (_MSC_VER >= 1200) 15 | # pragma once 16 | #endif // defined(_MSC_VER) && (_MSC_VER >= 1200) 17 | 18 | #include "asio/detail/config.hpp" 19 | 20 | #if !defined(ASIO_HAS_THREADS) 21 | # include "asio/detail/null_mutex.hpp" 22 | #elif defined(ASIO_WINDOWS) 23 | # include "asio/detail/win_mutex.hpp" 24 | #elif defined(ASIO_HAS_PTHREADS) 25 | # include "asio/detail/posix_mutex.hpp" 26 | #elif defined(ASIO_HAS_STD_MUTEX_AND_CONDVAR) 27 | # include "asio/detail/std_mutex.hpp" 28 | #else 29 | # error Only Windows, POSIX and std::mutex are supported! 30 | #endif 31 | 32 | namespace asio { 33 | namespace detail { 34 | 35 | #if !defined(ASIO_HAS_THREADS) 36 | typedef null_mutex mutex; 37 | #elif defined(ASIO_WINDOWS) 38 | typedef win_mutex mutex; 39 | #elif defined(ASIO_HAS_PTHREADS) 40 | typedef posix_mutex mutex; 41 | #elif defined(ASIO_HAS_STD_MUTEX_AND_CONDVAR) 42 | typedef std_mutex mutex; 43 | #endif 44 | 45 | } // namespace detail 46 | } // namespace asio 47 | 48 | #endif // ASIO_DETAIL_MUTEX_HPP 49 | -------------------------------------------------------------------------------- /third_party/asio/asio/include/asio/detail/noncopyable.hpp: -------------------------------------------------------------------------------- 1 | // 2 | // detail/noncopyable.hpp 3 | // ~~~~~~~~~~~~~~~~~~~~~~ 4 | // 5 | // Copyright (c) 2003-2015 Christopher M. Kohlhoff (chris at kohlhoff dot com) 6 | // 7 | // Distributed under the Boost Software License, Version 1.0. (See accompanying 8 | // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) 9 | // 10 | 11 | #ifndef ASIO_DETAIL_NONCOPYABLE_HPP 12 | #define ASIO_DETAIL_NONCOPYABLE_HPP 13 | 14 | #if defined(_MSC_VER) && (_MSC_VER >= 1200) 15 | # pragma once 16 | #endif // defined(_MSC_VER) && (_MSC_VER >= 1200) 17 | 18 | #include "asio/detail/config.hpp" 19 | 20 | #include "asio/detail/push_options.hpp" 21 | 22 | namespace asio { 23 | namespace detail { 24 | 25 | class noncopyable 26 | { 27 | protected: 28 | noncopyable() {} 29 | ~noncopyable() {} 30 | private: 31 | noncopyable(const noncopyable&); 32 | const noncopyable& operator=(const noncopyable&); 33 | }; 34 | 35 | } // namespace detail 36 | 37 | using asio::detail::noncopyable; 38 | 39 | } // namespace asio 40 | 41 | #include "asio/detail/pop_options.hpp" 42 | 43 | #endif // ASIO_DETAIL_NONCOPYABLE_HPP 44 | -------------------------------------------------------------------------------- /third_party/asio/asio/include/asio/detail/null_fenced_block.hpp: -------------------------------------------------------------------------------- 1 | // 2 | // detail/null_fenced_block.hpp 3 | // ~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 4 | // 5 | // Copyright (c) 2003-2015 Christopher M. Kohlhoff (chris at kohlhoff dot com) 6 | // 7 | // Distributed under the Boost Software License, Version 1.0. (See accompanying 8 | // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) 9 | // 10 | 11 | #ifndef ASIO_DETAIL_NULL_FENCED_BLOCK_HPP 12 | #define ASIO_DETAIL_NULL_FENCED_BLOCK_HPP 13 | 14 | #if defined(_MSC_VER) && (_MSC_VER >= 1200) 15 | # pragma once 16 | #endif // defined(_MSC_VER) && (_MSC_VER >= 1200) 17 | 18 | #include "asio/detail/push_options.hpp" 19 | 20 | namespace asio { 21 | namespace detail { 22 | 23 | class null_fenced_block 24 | : private noncopyable 25 | { 26 | public: 27 | enum half_or_full_t { half, full }; 28 | 29 | // Constructor. 30 | explicit null_fenced_block(half_or_full_t) 31 | { 32 | } 33 | 34 | // Destructor. 35 | ~null_fenced_block() 36 | { 37 | } 38 | }; 39 | 40 | } // namespace detail 41 | } // namespace asio 42 | 43 | #include "asio/detail/pop_options.hpp" 44 | 45 | #endif // ASIO_DETAIL_NULL_FENCED_BLOCK_HPP 46 | -------------------------------------------------------------------------------- /third_party/asio/asio/include/asio/detail/null_mutex.hpp: -------------------------------------------------------------------------------- 1 | // 2 | // detail/null_mutex.hpp 3 | // ~~~~~~~~~~~~~~~~~~~~~ 4 | // 5 | // Copyright (c) 2003-2015 Christopher M. Kohlhoff (chris at kohlhoff dot com) 6 | // 7 | // Distributed under the Boost Software License, Version 1.0. (See accompanying 8 | // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) 9 | // 10 | 11 | #ifndef ASIO_DETAIL_NULL_MUTEX_HPP 12 | #define ASIO_DETAIL_NULL_MUTEX_HPP 13 | 14 | #if defined(_MSC_VER) && (_MSC_VER >= 1200) 15 | # pragma once 16 | #endif // defined(_MSC_VER) && (_MSC_VER >= 1200) 17 | 18 | #include "asio/detail/config.hpp" 19 | 20 | #if !defined(ASIO_HAS_THREADS) 21 | 22 | #include "asio/detail/noncopyable.hpp" 23 | #include "asio/detail/scoped_lock.hpp" 24 | 25 | #include "asio/detail/push_options.hpp" 26 | 27 | namespace asio { 28 | namespace detail { 29 | 30 | class null_mutex 31 | : private noncopyable 32 | { 33 | public: 34 | typedef asio::detail::scoped_lock scoped_lock; 35 | 36 | // Constructor. 37 | null_mutex() 38 | { 39 | } 40 | 41 | // Destructor. 42 | ~null_mutex() 43 | { 44 | } 45 | 46 | // Lock the mutex. 47 | void lock() 48 | { 49 | } 50 | 51 | // Unlock the mutex. 52 | void unlock() 53 | { 54 | } 55 | }; 56 | 57 | } // namespace detail 58 | } // namespace asio 59 | 60 | #include "asio/detail/pop_options.hpp" 61 | 62 | #endif // !defined(ASIO_HAS_THREADS) 63 | 64 | #endif // ASIO_DETAIL_NULL_MUTEX_HPP 65 | -------------------------------------------------------------------------------- /third_party/asio/asio/include/asio/detail/null_reactor.hpp: -------------------------------------------------------------------------------- 1 | // 2 | // detail/null_reactor.hpp 3 | // ~~~~~~~~~~~~~~~~~~~~~~~ 4 | // 5 | // Copyright (c) 2003-2015 Christopher M. Kohlhoff (chris at kohlhoff dot com) 6 | // 7 | // Distributed under the Boost Software License, Version 1.0. (See accompanying 8 | // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) 9 | // 10 | 11 | #ifndef ASIO_DETAIL_NULL_REACTOR_HPP 12 | #define ASIO_DETAIL_NULL_REACTOR_HPP 13 | 14 | #if defined(_MSC_VER) && (_MSC_VER >= 1200) 15 | # pragma once 16 | #endif // defined(_MSC_VER) && (_MSC_VER >= 1200) 17 | 18 | #include "asio/detail/config.hpp" 19 | 20 | #if defined(ASIO_WINDOWS_RUNTIME) 21 | 22 | #include "asio/io_service.hpp" 23 | 24 | #include "asio/detail/push_options.hpp" 25 | 26 | namespace asio { 27 | namespace detail { 28 | 29 | class null_reactor 30 | : public asio::detail::service_base 31 | { 32 | public: 33 | // Constructor. 34 | null_reactor(asio::io_service& io_service) 35 | : asio::detail::service_base(io_service) 36 | { 37 | } 38 | 39 | // Destructor. 40 | ~null_reactor() 41 | { 42 | } 43 | 44 | // Destroy all user-defined handler objects owned by the service. 45 | void shutdown_service() 46 | { 47 | } 48 | 49 | // No-op because should never be called. 50 | void run(bool /*block*/, op_queue& /*ops*/) 51 | { 52 | } 53 | 54 | // No-op. 55 | void interrupt() 56 | { 57 | } 58 | }; 59 | 60 | } // namespace detail 61 | } // namespace asio 62 | 63 | #include "asio/detail/pop_options.hpp" 64 | 65 | #endif // defined(ASIO_WINDOWS_RUNTIME) 66 | 67 | #endif // ASIO_DETAIL_NULL_REACTOR_HPP 68 | -------------------------------------------------------------------------------- /third_party/asio/asio/include/asio/detail/null_signal_blocker.hpp: -------------------------------------------------------------------------------- 1 | // 2 | // detail/null_signal_blocker.hpp 3 | // ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 4 | // 5 | // Copyright (c) 2003-2015 Christopher M. Kohlhoff (chris at kohlhoff dot com) 6 | // 7 | // Distributed under the Boost Software License, Version 1.0. (See accompanying 8 | // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) 9 | // 10 | 11 | #ifndef ASIO_DETAIL_NULL_SIGNAL_BLOCKER_HPP 12 | #define ASIO_DETAIL_NULL_SIGNAL_BLOCKER_HPP 13 | 14 | #if defined(_MSC_VER) && (_MSC_VER >= 1200) 15 | # pragma once 16 | #endif // defined(_MSC_VER) && (_MSC_VER >= 1200) 17 | 18 | #include "asio/detail/config.hpp" 19 | 20 | #if !defined(ASIO_HAS_THREADS) \ 21 | || defined(ASIO_WINDOWS) \ 22 | || defined(ASIO_WINDOWS_RUNTIME) \ 23 | || defined(__CYGWIN__) \ 24 | || defined(__SYMBIAN32__) 25 | 26 | #include "asio/detail/noncopyable.hpp" 27 | 28 | #include "asio/detail/push_options.hpp" 29 | 30 | namespace asio { 31 | namespace detail { 32 | 33 | class null_signal_blocker 34 | : private noncopyable 35 | { 36 | public: 37 | // Constructor blocks all signals for the calling thread. 38 | null_signal_blocker() 39 | { 40 | } 41 | 42 | // Destructor restores the previous signal mask. 43 | ~null_signal_blocker() 44 | { 45 | } 46 | 47 | // Block all signals for the calling thread. 48 | void block() 49 | { 50 | } 51 | 52 | // Restore the previous signal mask. 53 | void unblock() 54 | { 55 | } 56 | }; 57 | 58 | } // namespace detail 59 | } // namespace asio 60 | 61 | #include "asio/detail/pop_options.hpp" 62 | 63 | #endif // !defined(ASIO_HAS_THREADS) 64 | // || defined(ASIO_WINDOWS) 65 | // || defined(ASIO_WINDOWS_RUNTIME) 66 | // || defined(__CYGWIN__) 67 | // || defined(__SYMBIAN32__) 68 | 69 | #endif // ASIO_DETAIL_NULL_SIGNAL_BLOCKER_HPP 70 | -------------------------------------------------------------------------------- /third_party/asio/asio/include/asio/detail/null_static_mutex.hpp: -------------------------------------------------------------------------------- 1 | // 2 | // detail/null_static_mutex.hpp 3 | // ~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 4 | // 5 | // Copyright (c) 2003-2015 Christopher M. Kohlhoff (chris at kohlhoff dot com) 6 | // 7 | // Distributed under the Boost Software License, Version 1.0. (See accompanying 8 | // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) 9 | // 10 | 11 | #ifndef ASIO_DETAIL_NULL_STATIC_MUTEX_HPP 12 | #define ASIO_DETAIL_NULL_STATIC_MUTEX_HPP 13 | 14 | #if defined(_MSC_VER) && (_MSC_VER >= 1200) 15 | # pragma once 16 | #endif // defined(_MSC_VER) && (_MSC_VER >= 1200) 17 | 18 | #include "asio/detail/config.hpp" 19 | 20 | #if !defined(ASIO_HAS_THREADS) 21 | 22 | #include "asio/detail/scoped_lock.hpp" 23 | 24 | #include "asio/detail/push_options.hpp" 25 | 26 | namespace asio { 27 | namespace detail { 28 | 29 | struct null_static_mutex 30 | { 31 | typedef asio::detail::scoped_lock scoped_lock; 32 | 33 | // Initialise the mutex. 34 | void init() 35 | { 36 | } 37 | 38 | // Lock the mutex. 39 | void lock() 40 | { 41 | } 42 | 43 | // Unlock the mutex. 44 | void unlock() 45 | { 46 | } 47 | 48 | int unused_; 49 | }; 50 | 51 | #define ASIO_NULL_STATIC_MUTEX_INIT { 0 } 52 | 53 | } // namespace detail 54 | } // namespace asio 55 | 56 | #include "asio/detail/pop_options.hpp" 57 | 58 | #endif // !defined(ASIO_HAS_THREADS) 59 | 60 | #endif // ASIO_DETAIL_NULL_STATIC_MUTEX_HPP 61 | -------------------------------------------------------------------------------- /third_party/asio/asio/include/asio/detail/null_thread.hpp: -------------------------------------------------------------------------------- 1 | // 2 | // detail/null_thread.hpp 3 | // ~~~~~~~~~~~~~~~~~~~~~~ 4 | // 5 | // Copyright (c) 2003-2015 Christopher M. Kohlhoff (chris at kohlhoff dot com) 6 | // 7 | // Distributed under the Boost Software License, Version 1.0. (See accompanying 8 | // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) 9 | // 10 | 11 | #ifndef ASIO_DETAIL_NULL_THREAD_HPP 12 | #define ASIO_DETAIL_NULL_THREAD_HPP 13 | 14 | #if defined(_MSC_VER) && (_MSC_VER >= 1200) 15 | # pragma once 16 | #endif // defined(_MSC_VER) && (_MSC_VER >= 1200) 17 | 18 | #include "asio/detail/config.hpp" 19 | 20 | #if !defined(ASIO_HAS_THREADS) 21 | 22 | #include "asio/detail/noncopyable.hpp" 23 | #include "asio/detail/throw_error.hpp" 24 | #include "asio/error.hpp" 25 | 26 | #include "asio/detail/push_options.hpp" 27 | 28 | namespace asio { 29 | namespace detail { 30 | 31 | class null_thread 32 | : private noncopyable 33 | { 34 | public: 35 | // Constructor. 36 | template 37 | null_thread(Function, unsigned int = 0) 38 | { 39 | asio::detail::throw_error( 40 | asio::error::operation_not_supported, "thread"); 41 | } 42 | 43 | // Destructor. 44 | ~null_thread() 45 | { 46 | } 47 | 48 | // Wait for the thread to exit. 49 | void join() 50 | { 51 | } 52 | }; 53 | 54 | } // namespace detail 55 | } // namespace asio 56 | 57 | #include "asio/detail/pop_options.hpp" 58 | 59 | #endif // !defined(ASIO_HAS_THREADS) 60 | 61 | #endif // ASIO_DETAIL_NULL_THREAD_HPP 62 | -------------------------------------------------------------------------------- /third_party/asio/asio/include/asio/detail/null_tss_ptr.hpp: -------------------------------------------------------------------------------- 1 | // 2 | // detail/null_tss_ptr.hpp 3 | // ~~~~~~~~~~~~~~~~~~~~~~~ 4 | // 5 | // Copyright (c) 2003-2015 Christopher M. Kohlhoff (chris at kohlhoff dot com) 6 | // 7 | // Distributed under the Boost Software License, Version 1.0. (See accompanying 8 | // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) 9 | // 10 | 11 | #ifndef ASIO_DETAIL_NULL_TSS_PTR_HPP 12 | #define ASIO_DETAIL_NULL_TSS_PTR_HPP 13 | 14 | #if defined(_MSC_VER) && (_MSC_VER >= 1200) 15 | # pragma once 16 | #endif // defined(_MSC_VER) && (_MSC_VER >= 1200) 17 | 18 | #include "asio/detail/config.hpp" 19 | 20 | #if !defined(ASIO_HAS_THREADS) 21 | 22 | #include "asio/detail/noncopyable.hpp" 23 | 24 | #include "asio/detail/push_options.hpp" 25 | 26 | namespace asio { 27 | namespace detail { 28 | 29 | template 30 | class null_tss_ptr 31 | : private noncopyable 32 | { 33 | public: 34 | // Constructor. 35 | null_tss_ptr() 36 | : value_(0) 37 | { 38 | } 39 | 40 | // Destructor. 41 | ~null_tss_ptr() 42 | { 43 | } 44 | 45 | // Get the value. 46 | operator T*() const 47 | { 48 | return value_; 49 | } 50 | 51 | // Set the value. 52 | void operator=(T* value) 53 | { 54 | value_ = value; 55 | } 56 | 57 | private: 58 | T* value_; 59 | }; 60 | 61 | } // namespace detail 62 | } // namespace asio 63 | 64 | #include "asio/detail/pop_options.hpp" 65 | 66 | #endif // !defined(ASIO_HAS_THREADS) 67 | 68 | #endif // ASIO_DETAIL_NULL_TSS_PTR_HPP 69 | -------------------------------------------------------------------------------- /third_party/asio/asio/include/asio/detail/operation.hpp: -------------------------------------------------------------------------------- 1 | // 2 | // detail/operation.hpp 3 | // ~~~~~~~~~~~~~~~~~~~~ 4 | // 5 | // Copyright (c) 2003-2015 Christopher M. Kohlhoff (chris at kohlhoff dot com) 6 | // 7 | // Distributed under the Boost Software License, Version 1.0. (See accompanying 8 | // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) 9 | // 10 | 11 | #ifndef ASIO_DETAIL_OPERATION_HPP 12 | #define ASIO_DETAIL_OPERATION_HPP 13 | 14 | #if defined(_MSC_VER) && (_MSC_VER >= 1200) 15 | # pragma once 16 | #endif // defined(_MSC_VER) && (_MSC_VER >= 1200) 17 | 18 | #include "asio/detail/config.hpp" 19 | 20 | #if defined(ASIO_HAS_IOCP) 21 | # include "asio/detail/win_iocp_operation.hpp" 22 | #else 23 | # include "asio/detail/task_io_service_operation.hpp" 24 | #endif 25 | 26 | namespace asio { 27 | namespace detail { 28 | 29 | #if defined(ASIO_HAS_IOCP) 30 | typedef win_iocp_operation operation; 31 | #else 32 | typedef task_io_service_operation operation; 33 | #endif 34 | 35 | } // namespace detail 36 | } // namespace asio 37 | 38 | #endif // ASIO_DETAIL_OPERATION_HPP 39 | -------------------------------------------------------------------------------- /third_party/asio/asio/include/asio/detail/posix_mutex.hpp: -------------------------------------------------------------------------------- 1 | // 2 | // detail/posix_mutex.hpp 3 | // ~~~~~~~~~~~~~~~~~~~~~~ 4 | // 5 | // Copyright (c) 2003-2015 Christopher M. Kohlhoff (chris at kohlhoff dot com) 6 | // 7 | // Distributed under the Boost Software License, Version 1.0. (See accompanying 8 | // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) 9 | // 10 | 11 | #ifndef ASIO_DETAIL_POSIX_MUTEX_HPP 12 | #define ASIO_DETAIL_POSIX_MUTEX_HPP 13 | 14 | #if defined(_MSC_VER) && (_MSC_VER >= 1200) 15 | # pragma once 16 | #endif // defined(_MSC_VER) && (_MSC_VER >= 1200) 17 | 18 | #include "asio/detail/config.hpp" 19 | 20 | #if defined(ASIO_HAS_PTHREADS) 21 | 22 | #include 23 | #include "asio/detail/noncopyable.hpp" 24 | #include "asio/detail/scoped_lock.hpp" 25 | 26 | #include "asio/detail/push_options.hpp" 27 | 28 | namespace asio { 29 | namespace detail { 30 | 31 | class posix_event; 32 | 33 | class posix_mutex 34 | : private noncopyable 35 | { 36 | public: 37 | typedef asio::detail::scoped_lock scoped_lock; 38 | 39 | // Constructor. 40 | ASIO_DECL posix_mutex(); 41 | 42 | // Destructor. 43 | ~posix_mutex() 44 | { 45 | ::pthread_mutex_destroy(&mutex_); // Ignore EBUSY. 46 | } 47 | 48 | // Lock the mutex. 49 | void lock() 50 | { 51 | (void)::pthread_mutex_lock(&mutex_); // Ignore EINVAL. 52 | } 53 | 54 | // Unlock the mutex. 55 | void unlock() 56 | { 57 | (void)::pthread_mutex_unlock(&mutex_); // Ignore EINVAL. 58 | } 59 | 60 | private: 61 | friend class posix_event; 62 | ::pthread_mutex_t mutex_; 63 | }; 64 | 65 | } // namespace detail 66 | } // namespace asio 67 | 68 | #include "asio/detail/pop_options.hpp" 69 | 70 | #if defined(ASIO_HEADER_ONLY) 71 | # include "asio/detail/impl/posix_mutex.ipp" 72 | #endif // defined(ASIO_HEADER_ONLY) 73 | 74 | #endif // defined(ASIO_HAS_PTHREADS) 75 | 76 | #endif // ASIO_DETAIL_POSIX_MUTEX_HPP 77 | -------------------------------------------------------------------------------- /third_party/asio/asio/include/asio/detail/posix_static_mutex.hpp: -------------------------------------------------------------------------------- 1 | // 2 | // detail/posix_static_mutex.hpp 3 | // ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 4 | // 5 | // Copyright (c) 2003-2015 Christopher M. Kohlhoff (chris at kohlhoff dot com) 6 | // 7 | // Distributed under the Boost Software License, Version 1.0. (See accompanying 8 | // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) 9 | // 10 | 11 | #ifndef ASIO_DETAIL_POSIX_STATIC_MUTEX_HPP 12 | #define ASIO_DETAIL_POSIX_STATIC_MUTEX_HPP 13 | 14 | #if defined(_MSC_VER) && (_MSC_VER >= 1200) 15 | # pragma once 16 | #endif // defined(_MSC_VER) && (_MSC_VER >= 1200) 17 | 18 | #include "asio/detail/config.hpp" 19 | 20 | #if defined(ASIO_HAS_PTHREADS) 21 | 22 | #include 23 | #include "asio/detail/scoped_lock.hpp" 24 | 25 | #include "asio/detail/push_options.hpp" 26 | 27 | namespace asio { 28 | namespace detail { 29 | 30 | struct posix_static_mutex 31 | { 32 | typedef asio::detail::scoped_lock scoped_lock; 33 | 34 | // Initialise the mutex. 35 | void init() 36 | { 37 | // Nothing to do. 38 | } 39 | 40 | // Lock the mutex. 41 | void lock() 42 | { 43 | (void)::pthread_mutex_lock(&mutex_); // Ignore EINVAL. 44 | } 45 | 46 | // Unlock the mutex. 47 | void unlock() 48 | { 49 | (void)::pthread_mutex_unlock(&mutex_); // Ignore EINVAL. 50 | } 51 | 52 | ::pthread_mutex_t mutex_; 53 | }; 54 | 55 | #define ASIO_POSIX_STATIC_MUTEX_INIT { PTHREAD_MUTEX_INITIALIZER } 56 | 57 | } // namespace detail 58 | } // namespace asio 59 | 60 | #include "asio/detail/pop_options.hpp" 61 | 62 | #endif // defined(ASIO_HAS_PTHREADS) 63 | 64 | #endif // ASIO_DETAIL_POSIX_STATIC_MUTEX_HPP 65 | -------------------------------------------------------------------------------- /third_party/asio/asio/include/asio/detail/reactor.hpp: -------------------------------------------------------------------------------- 1 | // 2 | // detail/reactor.hpp 3 | // ~~~~~~~~~~~~~~~~~~ 4 | // 5 | // Copyright (c) 2003-2015 Christopher M. Kohlhoff (chris at kohlhoff dot com) 6 | // 7 | // Distributed under the Boost Software License, Version 1.0. (See accompanying 8 | // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) 9 | // 10 | 11 | #ifndef ASIO_DETAIL_REACTOR_HPP 12 | #define ASIO_DETAIL_REACTOR_HPP 13 | 14 | #if defined(_MSC_VER) && (_MSC_VER >= 1200) 15 | # pragma once 16 | #endif // defined(_MSC_VER) && (_MSC_VER >= 1200) 17 | 18 | #include "asio/detail/reactor_fwd.hpp" 19 | 20 | #if defined(ASIO_HAS_EPOLL) 21 | # include "asio/detail/epoll_reactor.hpp" 22 | #elif defined(ASIO_HAS_KQUEUE) 23 | # include "asio/detail/kqueue_reactor.hpp" 24 | #elif defined(ASIO_HAS_DEV_POLL) 25 | # include "asio/detail/dev_poll_reactor.hpp" 26 | #elif defined(ASIO_WINDOWS_RUNTIME) 27 | # include "asio/detail/null_reactor.hpp" 28 | #else 29 | # include "asio/detail/select_reactor.hpp" 30 | #endif 31 | 32 | #endif // ASIO_DETAIL_REACTOR_HPP 33 | -------------------------------------------------------------------------------- /third_party/asio/asio/include/asio/detail/reactor_fwd.hpp: -------------------------------------------------------------------------------- 1 | // 2 | // detail/reactor_fwd.hpp 3 | // ~~~~~~~~~~~~~~~~~~~~~~ 4 | // 5 | // Copyright (c) 2003-2015 Christopher M. Kohlhoff (chris at kohlhoff dot com) 6 | // 7 | // Distributed under the Boost Software License, Version 1.0. (See accompanying 8 | // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) 9 | // 10 | 11 | #ifndef ASIO_DETAIL_REACTOR_FWD_HPP 12 | #define ASIO_DETAIL_REACTOR_FWD_HPP 13 | 14 | #if defined(_MSC_VER) && (_MSC_VER >= 1200) 15 | # pragma once 16 | #endif // defined(_MSC_VER) && (_MSC_VER >= 1200) 17 | 18 | #include "asio/detail/config.hpp" 19 | 20 | namespace asio { 21 | namespace detail { 22 | 23 | #if defined(ASIO_WINDOWS_RUNTIME) 24 | typedef class null_reactor reactor; 25 | #elif defined(ASIO_HAS_IOCP) 26 | typedef class select_reactor reactor; 27 | #elif defined(ASIO_HAS_EPOLL) 28 | typedef class epoll_reactor reactor; 29 | #elif defined(ASIO_HAS_KQUEUE) 30 | typedef class kqueue_reactor reactor; 31 | #elif defined(ASIO_HAS_DEV_POLL) 32 | typedef class dev_poll_reactor reactor; 33 | #else 34 | typedef class select_reactor reactor; 35 | #endif 36 | 37 | } // namespace detail 38 | } // namespace asio 39 | 40 | #endif // ASIO_DETAIL_REACTOR_FWD_HPP 41 | -------------------------------------------------------------------------------- /third_party/asio/asio/include/asio/detail/reactor_op.hpp: -------------------------------------------------------------------------------- 1 | // 2 | // detail/reactor_op.hpp 3 | // ~~~~~~~~~~~~~~~~~~~~~ 4 | // 5 | // Copyright (c) 2003-2015 Christopher M. Kohlhoff (chris at kohlhoff dot com) 6 | // 7 | // Distributed under the Boost Software License, Version 1.0. (See accompanying 8 | // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) 9 | // 10 | 11 | #ifndef ASIO_DETAIL_REACTOR_OP_HPP 12 | #define ASIO_DETAIL_REACTOR_OP_HPP 13 | 14 | #if defined(_MSC_VER) && (_MSC_VER >= 1200) 15 | # pragma once 16 | #endif // defined(_MSC_VER) && (_MSC_VER >= 1200) 17 | 18 | #include "asio/detail/config.hpp" 19 | #include "asio/detail/operation.hpp" 20 | 21 | #include "asio/detail/push_options.hpp" 22 | 23 | namespace asio { 24 | namespace detail { 25 | 26 | class reactor_op 27 | : public operation 28 | { 29 | public: 30 | // The error code to be passed to the completion handler. 31 | asio::error_code ec_; 32 | 33 | // The number of bytes transferred, to be passed to the completion handler. 34 | std::size_t bytes_transferred_; 35 | 36 | // Perform the operation. Returns true if it is finished. 37 | bool perform() 38 | { 39 | return perform_func_(this); 40 | } 41 | 42 | protected: 43 | typedef bool (*perform_func_type)(reactor_op*); 44 | 45 | reactor_op(perform_func_type perform_func, func_type complete_func) 46 | : operation(complete_func), 47 | bytes_transferred_(0), 48 | perform_func_(perform_func) 49 | { 50 | } 51 | 52 | private: 53 | perform_func_type perform_func_; 54 | }; 55 | 56 | } // namespace detail 57 | } // namespace asio 58 | 59 | #include "asio/detail/pop_options.hpp" 60 | 61 | #endif // ASIO_DETAIL_REACTOR_OP_HPP 62 | -------------------------------------------------------------------------------- /third_party/asio/asio/include/asio/detail/regex_fwd.hpp: -------------------------------------------------------------------------------- 1 | // 2 | // detail/regex_fwd.hpp 3 | // ~~~~~~~~~~~~~~~~~~~~ 4 | // 5 | // Copyright (c) 2003-2015 Christopher M. Kohlhoff (chris at kohlhoff dot com) 6 | // 7 | // Distributed under the Boost Software License, Version 1.0. (See accompanying 8 | // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) 9 | // 10 | 11 | #ifndef ASIO_DETAIL_REGEX_FWD_HPP 12 | #define ASIO_DETAIL_REGEX_FWD_HPP 13 | 14 | #if defined(_MSC_VER) && (_MSC_VER >= 1200) 15 | # pragma once 16 | #endif // defined(_MSC_VER) && (_MSC_VER >= 1200) 17 | 18 | #if defined(ASIO_HAS_BOOST_REGEX) 19 | 20 | #include 21 | #include 22 | 23 | namespace boost { 24 | 25 | template 26 | struct sub_match; 27 | 28 | template 29 | class match_results; 30 | 31 | } // namespace boost 32 | 33 | #endif // defined(ASIO_HAS_BOOST_REGEX) 34 | 35 | #endif // ASIO_DETAIL_REGEX_FWD_HPP 36 | -------------------------------------------------------------------------------- /third_party/asio/asio/include/asio/detail/scoped_ptr.hpp: -------------------------------------------------------------------------------- 1 | // 2 | // detail/scoped_ptr.hpp 3 | // ~~~~~~~~~~~~~~~~~~~~~ 4 | // 5 | // Copyright (c) 2003-2015 Christopher M. Kohlhoff (chris at kohlhoff dot com) 6 | // 7 | // Distributed under the Boost Software License, Version 1.0. (See accompanying 8 | // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) 9 | // 10 | 11 | #ifndef ASIO_DETAIL_SCOPED_PTR_HPP 12 | #define ASIO_DETAIL_SCOPED_PTR_HPP 13 | 14 | #if defined(_MSC_VER) && (_MSC_VER >= 1200) 15 | # pragma once 16 | #endif // defined(_MSC_VER) && (_MSC_VER >= 1200) 17 | 18 | #include "asio/detail/config.hpp" 19 | 20 | #include "asio/detail/push_options.hpp" 21 | 22 | namespace asio { 23 | namespace detail { 24 | 25 | template 26 | class scoped_ptr 27 | { 28 | public: 29 | // Constructor. 30 | explicit scoped_ptr(T* p = 0) 31 | : p_(p) 32 | { 33 | } 34 | 35 | // Destructor. 36 | ~scoped_ptr() 37 | { 38 | delete p_; 39 | } 40 | 41 | // Access. 42 | T* get() 43 | { 44 | return p_; 45 | } 46 | 47 | // Access. 48 | T* operator->() 49 | { 50 | return p_; 51 | } 52 | 53 | // Dereference. 54 | T& operator*() 55 | { 56 | return *p_; 57 | } 58 | 59 | // Reset pointer. 60 | void reset(T* p = 0) 61 | { 62 | delete p_; 63 | p_ = p; 64 | } 65 | 66 | private: 67 | // Disallow copying and assignment. 68 | scoped_ptr(const scoped_ptr&); 69 | scoped_ptr& operator=(const scoped_ptr&); 70 | 71 | T* p_; 72 | }; 73 | 74 | } // namespace detail 75 | } // namespace asio 76 | 77 | #include "asio/detail/pop_options.hpp" 78 | 79 | #endif // ASIO_DETAIL_SCOPED_PTR_HPP 80 | -------------------------------------------------------------------------------- /third_party/asio/asio/include/asio/detail/select_interrupter.hpp: -------------------------------------------------------------------------------- 1 | // 2 | // detail/select_interrupter.hpp 3 | // ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 4 | // 5 | // Copyright (c) 2003-2015 Christopher M. Kohlhoff (chris at kohlhoff dot com) 6 | // 7 | // Distributed under the Boost Software License, Version 1.0. (See accompanying 8 | // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) 9 | // 10 | 11 | #ifndef ASIO_DETAIL_SELECT_INTERRUPTER_HPP 12 | #define ASIO_DETAIL_SELECT_INTERRUPTER_HPP 13 | 14 | #if defined(_MSC_VER) && (_MSC_VER >= 1200) 15 | # pragma once 16 | #endif // defined(_MSC_VER) && (_MSC_VER >= 1200) 17 | 18 | #include "asio/detail/config.hpp" 19 | 20 | #if !defined(ASIO_WINDOWS_RUNTIME) 21 | 22 | #if defined(ASIO_WINDOWS) || defined(__CYGWIN__) || defined(__SYMBIAN32__) 23 | # include "asio/detail/socket_select_interrupter.hpp" 24 | #elif defined(ASIO_HAS_EVENTFD) 25 | # include "asio/detail/eventfd_select_interrupter.hpp" 26 | #else 27 | # include "asio/detail/pipe_select_interrupter.hpp" 28 | #endif 29 | 30 | namespace asio { 31 | namespace detail { 32 | 33 | #if defined(ASIO_WINDOWS) || defined(__CYGWIN__) || defined(__SYMBIAN32__) 34 | typedef socket_select_interrupter select_interrupter; 35 | #elif defined(ASIO_HAS_EVENTFD) 36 | typedef eventfd_select_interrupter select_interrupter; 37 | #else 38 | typedef pipe_select_interrupter select_interrupter; 39 | #endif 40 | 41 | } // namespace detail 42 | } // namespace asio 43 | 44 | #endif // !defined(ASIO_WINDOWS_RUNTIME) 45 | 46 | #endif // ASIO_DETAIL_SELECT_INTERRUPTER_HPP 47 | -------------------------------------------------------------------------------- /third_party/asio/asio/include/asio/detail/shared_ptr.hpp: -------------------------------------------------------------------------------- 1 | // 2 | // detail/shared_ptr.hpp 3 | // ~~~~~~~~~~~~~~~~~~~~~ 4 | // 5 | // Copyright (c) 2003-2015 Christopher M. Kohlhoff (chris at kohlhoff dot com) 6 | // 7 | // Distributed under the Boost Software License, Version 1.0. (See accompanying 8 | // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) 9 | // 10 | 11 | #ifndef ASIO_DETAIL_SHARED_PTR_HPP 12 | #define ASIO_DETAIL_SHARED_PTR_HPP 13 | 14 | #if defined(_MSC_VER) && (_MSC_VER >= 1200) 15 | # pragma once 16 | #endif // defined(_MSC_VER) && (_MSC_VER >= 1200) 17 | 18 | #include "asio/detail/config.hpp" 19 | 20 | #if defined(ASIO_HAS_STD_SHARED_PTR) 21 | # include 22 | #else // defined(ASIO_HAS_STD_SHARED_PTR) 23 | # include 24 | #endif // defined(ASIO_HAS_STD_SHARED_PTR) 25 | 26 | namespace asio { 27 | namespace detail { 28 | 29 | #if defined(ASIO_HAS_STD_SHARED_PTR) 30 | using std::shared_ptr; 31 | #else // defined(ASIO_HAS_STD_SHARED_PTR) 32 | using boost::shared_ptr; 33 | #endif // defined(ASIO_HAS_STD_SHARED_PTR) 34 | 35 | } // namespace detail 36 | } // namespace asio 37 | 38 | #endif // ASIO_DETAIL_SHARED_PTR_HPP 39 | -------------------------------------------------------------------------------- /third_party/asio/asio/include/asio/detail/signal_blocker.hpp: -------------------------------------------------------------------------------- 1 | // 2 | // detail/signal_blocker.hpp 3 | // ~~~~~~~~~~~~~~~~~~~~~~~~~ 4 | // 5 | // Copyright (c) 2003-2015 Christopher M. Kohlhoff (chris at kohlhoff dot com) 6 | // 7 | // Distributed under the Boost Software License, Version 1.0. (See accompanying 8 | // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) 9 | // 10 | 11 | #ifndef ASIO_DETAIL_SIGNAL_BLOCKER_HPP 12 | #define ASIO_DETAIL_SIGNAL_BLOCKER_HPP 13 | 14 | #if defined(_MSC_VER) && (_MSC_VER >= 1200) 15 | # pragma once 16 | #endif // defined(_MSC_VER) && (_MSC_VER >= 1200) 17 | 18 | #include "asio/detail/config.hpp" 19 | 20 | #if !defined(ASIO_HAS_THREADS) || defined(ASIO_WINDOWS) \ 21 | || defined(ASIO_WINDOWS_RUNTIME) \ 22 | || defined(__CYGWIN__) || defined(__SYMBIAN32__) 23 | # include "asio/detail/null_signal_blocker.hpp" 24 | #elif defined(ASIO_HAS_PTHREADS) 25 | # include "asio/detail/posix_signal_blocker.hpp" 26 | #else 27 | # error Only Windows and POSIX are supported! 28 | #endif 29 | 30 | namespace asio { 31 | namespace detail { 32 | 33 | #if !defined(ASIO_HAS_THREADS) || defined(ASIO_WINDOWS) \ 34 | || defined(ASIO_WINDOWS_RUNTIME) \ 35 | || defined(__CYGWIN__) || defined(__SYMBIAN32__) 36 | typedef null_signal_blocker signal_blocker; 37 | #elif defined(ASIO_HAS_PTHREADS) 38 | typedef posix_signal_blocker signal_blocker; 39 | #endif 40 | 41 | } // namespace detail 42 | } // namespace asio 43 | 44 | #endif // ASIO_DETAIL_SIGNAL_BLOCKER_HPP 45 | -------------------------------------------------------------------------------- /third_party/asio/asio/include/asio/detail/signal_init.hpp: -------------------------------------------------------------------------------- 1 | // 2 | // detail/signal_init.hpp 3 | // ~~~~~~~~~~~~~~~~~~~~~~ 4 | // 5 | // Copyright (c) 2003-2015 Christopher M. Kohlhoff (chris at kohlhoff dot com) 6 | // 7 | // Distributed under the Boost Software License, Version 1.0. (See accompanying 8 | // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) 9 | // 10 | 11 | #ifndef ASIO_DETAIL_SIGNAL_INIT_HPP 12 | #define ASIO_DETAIL_SIGNAL_INIT_HPP 13 | 14 | #if defined(_MSC_VER) && (_MSC_VER >= 1200) 15 | # pragma once 16 | #endif // defined(_MSC_VER) && (_MSC_VER >= 1200) 17 | 18 | #include "asio/detail/config.hpp" 19 | 20 | #if !defined(ASIO_WINDOWS) && !defined(__CYGWIN__) 21 | 22 | #include 23 | 24 | #include "asio/detail/push_options.hpp" 25 | 26 | namespace asio { 27 | namespace detail { 28 | 29 | template 30 | class signal_init 31 | { 32 | public: 33 | // Constructor. 34 | signal_init() 35 | { 36 | std::signal(Signal, SIG_IGN); 37 | } 38 | }; 39 | 40 | } // namespace detail 41 | } // namespace asio 42 | 43 | #include "asio/detail/pop_options.hpp" 44 | 45 | #endif // !defined(ASIO_WINDOWS) && !defined(__CYGWIN__) 46 | 47 | #endif // ASIO_DETAIL_SIGNAL_INIT_HPP 48 | -------------------------------------------------------------------------------- /third_party/asio/asio/include/asio/detail/signal_op.hpp: -------------------------------------------------------------------------------- 1 | // 2 | // detail/signal_op.hpp 3 | // ~~~~~~~~~~~~~~~~~~~~ 4 | // 5 | // Copyright (c) 2003-2015 Christopher M. Kohlhoff (chris at kohlhoff dot com) 6 | // 7 | // Distributed under the Boost Software License, Version 1.0. (See accompanying 8 | // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) 9 | // 10 | 11 | #ifndef ASIO_DETAIL_SIGNAL_OP_HPP 12 | #define ASIO_DETAIL_SIGNAL_OP_HPP 13 | 14 | #if defined(_MSC_VER) && (_MSC_VER >= 1200) 15 | # pragma once 16 | #endif // defined(_MSC_VER) && (_MSC_VER >= 1200) 17 | 18 | #include "asio/detail/config.hpp" 19 | #include "asio/detail/operation.hpp" 20 | 21 | #include "asio/detail/push_options.hpp" 22 | 23 | namespace asio { 24 | namespace detail { 25 | 26 | class signal_op 27 | : public operation 28 | { 29 | public: 30 | // The error code to be passed to the completion handler. 31 | asio::error_code ec_; 32 | 33 | // The signal number to be passed to the completion handler. 34 | int signal_number_; 35 | 36 | protected: 37 | signal_op(func_type func) 38 | : operation(func), 39 | signal_number_(0) 40 | { 41 | } 42 | }; 43 | 44 | } // namespace detail 45 | } // namespace asio 46 | 47 | #include "asio/detail/pop_options.hpp" 48 | 49 | #endif // ASIO_DETAIL_SIGNAL_OP_HPP 50 | -------------------------------------------------------------------------------- /third_party/asio/asio/include/asio/detail/solaris_fenced_block.hpp: -------------------------------------------------------------------------------- 1 | // 2 | // detail/solaris_fenced_block.hpp 3 | // ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 4 | // 5 | // Copyright (c) 2003-2015 Christopher M. Kohlhoff (chris at kohlhoff dot com) 6 | // 7 | // Distributed under the Boost Software License, Version 1.0. (See accompanying 8 | // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) 9 | // 10 | 11 | #ifndef ASIO_DETAIL_SOLARIS_FENCED_BLOCK_HPP 12 | #define ASIO_DETAIL_SOLARIS_FENCED_BLOCK_HPP 13 | 14 | #if defined(_MSC_VER) && (_MSC_VER >= 1200) 15 | # pragma once 16 | #endif // defined(_MSC_VER) && (_MSC_VER >= 1200) 17 | 18 | #include "asio/detail/config.hpp" 19 | 20 | #if defined(__sun) 21 | 22 | #include 23 | 24 | #include "asio/detail/push_options.hpp" 25 | 26 | namespace asio { 27 | namespace detail { 28 | 29 | class solaris_fenced_block 30 | : private noncopyable 31 | { 32 | public: 33 | enum half_t { half }; 34 | enum full_t { full }; 35 | 36 | // Constructor for a half fenced block. 37 | explicit solaris_fenced_block(half_t) 38 | { 39 | } 40 | 41 | // Constructor for a full fenced block. 42 | explicit solaris_fenced_block(full_t) 43 | { 44 | membar_consumer(); 45 | } 46 | 47 | // Destructor. 48 | ~solaris_fenced_block() 49 | { 50 | membar_producer(); 51 | } 52 | }; 53 | 54 | } // namespace detail 55 | } // namespace asio 56 | 57 | #include "asio/detail/pop_options.hpp" 58 | 59 | #endif // defined(__sun) 60 | 61 | #endif // ASIO_DETAIL_SOLARIS_FENCED_BLOCK_HPP 62 | -------------------------------------------------------------------------------- /third_party/asio/asio/include/asio/detail/static_mutex.hpp: -------------------------------------------------------------------------------- 1 | // 2 | // detail/static_mutex.hpp 3 | // ~~~~~~~~~~~~~~~~~~~~~~~ 4 | // 5 | // Copyright (c) 2003-2015 Christopher M. Kohlhoff (chris at kohlhoff dot com) 6 | // 7 | // Distributed under the Boost Software License, Version 1.0. (See accompanying 8 | // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) 9 | // 10 | 11 | #ifndef ASIO_DETAIL_STATIC_MUTEX_HPP 12 | #define ASIO_DETAIL_STATIC_MUTEX_HPP 13 | 14 | #if defined(_MSC_VER) && (_MSC_VER >= 1200) 15 | # pragma once 16 | #endif // defined(_MSC_VER) && (_MSC_VER >= 1200) 17 | 18 | #include "asio/detail/config.hpp" 19 | 20 | #if !defined(ASIO_HAS_THREADS) 21 | # include "asio/detail/null_static_mutex.hpp" 22 | #elif defined(ASIO_WINDOWS) 23 | # include "asio/detail/win_static_mutex.hpp" 24 | #elif defined(ASIO_HAS_PTHREADS) 25 | # include "asio/detail/posix_static_mutex.hpp" 26 | #elif defined(ASIO_HAS_STD_MUTEX_AND_CONDVAR) 27 | # include "asio/detail/std_static_mutex.hpp" 28 | #else 29 | # error Only Windows and POSIX are supported! 30 | #endif 31 | 32 | namespace asio { 33 | namespace detail { 34 | 35 | #if !defined(ASIO_HAS_THREADS) 36 | typedef null_static_mutex static_mutex; 37 | # define ASIO_STATIC_MUTEX_INIT ASIO_NULL_STATIC_MUTEX_INIT 38 | #elif defined(ASIO_WINDOWS) 39 | typedef win_static_mutex static_mutex; 40 | # define ASIO_STATIC_MUTEX_INIT ASIO_WIN_STATIC_MUTEX_INIT 41 | #elif defined(ASIO_HAS_PTHREADS) 42 | typedef posix_static_mutex static_mutex; 43 | # define ASIO_STATIC_MUTEX_INIT ASIO_POSIX_STATIC_MUTEX_INIT 44 | #elif defined(ASIO_HAS_STD_MUTEX_AND_CONDVAR) 45 | typedef std_static_mutex static_mutex; 46 | # define ASIO_STATIC_MUTEX_INIT ASIO_STD_STATIC_MUTEX_INIT 47 | #endif 48 | 49 | } // namespace detail 50 | } // namespace asio 51 | 52 | #endif // ASIO_DETAIL_STATIC_MUTEX_HPP 53 | -------------------------------------------------------------------------------- /third_party/asio/asio/include/asio/detail/std_mutex.hpp: -------------------------------------------------------------------------------- 1 | // 2 | // detail/std_mutex.hpp 3 | // ~~~~~~~~~~~~~~~~~~~~ 4 | // 5 | // Copyright (c) 2003-2015 Christopher M. Kohlhoff (chris at kohlhoff dot com) 6 | // 7 | // Distributed under the Boost Software License, Version 1.0. (See accompanying 8 | // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) 9 | // 10 | 11 | #ifndef ASIO_DETAIL_STD_MUTEX_HPP 12 | #define ASIO_DETAIL_STD_MUTEX_HPP 13 | 14 | #if defined(_MSC_VER) && (_MSC_VER >= 1200) 15 | # pragma once 16 | #endif // defined(_MSC_VER) && (_MSC_VER >= 1200) 17 | 18 | #include "asio/detail/config.hpp" 19 | 20 | #if defined(ASIO_HAS_STD_MUTEX_AND_CONDVAR) 21 | 22 | #include 23 | #include "asio/detail/noncopyable.hpp" 24 | #include "asio/detail/scoped_lock.hpp" 25 | 26 | #include "asio/detail/push_options.hpp" 27 | 28 | namespace asio { 29 | namespace detail { 30 | 31 | class std_event; 32 | 33 | class std_mutex 34 | : private noncopyable 35 | { 36 | public: 37 | typedef asio::detail::scoped_lock scoped_lock; 38 | 39 | // Constructor. 40 | std_mutex() 41 | { 42 | } 43 | 44 | // Destructor. 45 | ~std_mutex() 46 | { 47 | } 48 | 49 | // Lock the mutex. 50 | void lock() 51 | { 52 | mutex_.lock(); 53 | } 54 | 55 | // Unlock the mutex. 56 | void unlock() 57 | { 58 | mutex_.unlock(); 59 | } 60 | 61 | private: 62 | friend class std_event; 63 | std::mutex mutex_; 64 | }; 65 | 66 | } // namespace detail 67 | } // namespace asio 68 | 69 | #include "asio/detail/pop_options.hpp" 70 | 71 | #endif // defined(ASIO_HAS_STD_MUTEX_AND_CONDVAR) 72 | 73 | #endif // ASIO_DETAIL_STD_MUTEX_HPP 74 | -------------------------------------------------------------------------------- /third_party/asio/asio/include/asio/detail/std_static_mutex.hpp: -------------------------------------------------------------------------------- 1 | // 2 | // detail/std_static_mutex.hpp 3 | // ~~~~~~~~~~~~~~~~~~~~~~~~~~~ 4 | // 5 | // Copyright (c) 2003-2015 Christopher M. Kohlhoff (chris at kohlhoff dot com) 6 | // 7 | // Distributed under the Boost Software License, Version 1.0. (See accompanying 8 | // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) 9 | // 10 | 11 | #ifndef ASIO_DETAIL_STD_STATIC_MUTEX_HPP 12 | #define ASIO_DETAIL_STD_STATIC_MUTEX_HPP 13 | 14 | #if defined(_MSC_VER) && (_MSC_VER >= 1200) 15 | # pragma once 16 | #endif // defined(_MSC_VER) && (_MSC_VER >= 1200) 17 | 18 | #include "asio/detail/config.hpp" 19 | 20 | #if defined(ASIO_HAS_STD_MUTEX_AND_CONDVAR) 21 | 22 | #include 23 | #include "asio/detail/noncopyable.hpp" 24 | #include "asio/detail/scoped_lock.hpp" 25 | 26 | #include "asio/detail/push_options.hpp" 27 | 28 | namespace asio { 29 | namespace detail { 30 | 31 | class std_event; 32 | 33 | class std_static_mutex 34 | : private noncopyable 35 | { 36 | public: 37 | typedef asio::detail::scoped_lock scoped_lock; 38 | 39 | // Constructor. 40 | std_static_mutex(int) 41 | { 42 | } 43 | 44 | // Destructor. 45 | ~std_static_mutex() 46 | { 47 | } 48 | 49 | // Initialise the mutex. 50 | void init() 51 | { 52 | // Nothing to do. 53 | } 54 | 55 | // Lock the mutex. 56 | void lock() 57 | { 58 | mutex_.lock(); 59 | } 60 | 61 | // Unlock the mutex. 62 | void unlock() 63 | { 64 | mutex_.unlock(); 65 | } 66 | 67 | private: 68 | friend class std_event; 69 | std::mutex mutex_; 70 | }; 71 | 72 | #define ASIO_STD_STATIC_MUTEX_INIT 0 73 | 74 | } // namespace detail 75 | } // namespace asio 76 | 77 | #include "asio/detail/pop_options.hpp" 78 | 79 | #endif // defined(ASIO_HAS_STD_MUTEX_AND_CONDVAR) 80 | 81 | #endif // ASIO_DETAIL_STD_STATIC_MUTEX_HPP 82 | -------------------------------------------------------------------------------- /third_party/asio/asio/include/asio/detail/std_thread.hpp: -------------------------------------------------------------------------------- 1 | // 2 | // detail/std_thread.hpp 3 | // ~~~~~~~~~~~~~~~~~~~~~ 4 | // 5 | // Copyright (c) 2003-2015 Christopher M. Kohlhoff (chris at kohlhoff dot com) 6 | // 7 | // Distributed under the Boost Software License, Version 1.0. (See accompanying 8 | // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) 9 | // 10 | 11 | #ifndef ASIO_DETAIL_STD_THREAD_HPP 12 | #define ASIO_DETAIL_STD_THREAD_HPP 13 | 14 | #if defined(_MSC_VER) && (_MSC_VER >= 1200) 15 | # pragma once 16 | #endif // defined(_MSC_VER) && (_MSC_VER >= 1200) 17 | 18 | #include "asio/detail/config.hpp" 19 | 20 | #if defined(ASIO_HAS_STD_THREAD) 21 | 22 | #include 23 | #include "asio/detail/noncopyable.hpp" 24 | 25 | #include "asio/detail/push_options.hpp" 26 | 27 | namespace asio { 28 | namespace detail { 29 | 30 | class std_thread 31 | : private noncopyable 32 | { 33 | public: 34 | // Constructor. 35 | template 36 | std_thread(Function f, unsigned int = 0) 37 | : thread_(f) 38 | { 39 | } 40 | 41 | // Destructor. 42 | ~std_thread() 43 | { 44 | join(); 45 | } 46 | 47 | // Wait for the thread to exit. 48 | void join() 49 | { 50 | if (thread_.joinable()) 51 | thread_.join(); 52 | } 53 | 54 | private: 55 | std::thread thread_; 56 | }; 57 | 58 | } // namespace detail 59 | } // namespace asio 60 | 61 | #include "asio/detail/pop_options.hpp" 62 | 63 | #endif // defined(ASIO_HAS_STD_THREAD) 64 | 65 | #endif // ASIO_DETAIL_STD_THREAD_HPP 66 | -------------------------------------------------------------------------------- /third_party/asio/asio/include/asio/detail/task_io_service_thread_info.hpp: -------------------------------------------------------------------------------- 1 | // 2 | // detail/task_io_service_thread_info.hpp 3 | // ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 4 | // 5 | // Copyright (c) 2003-2015 Christopher M. Kohlhoff (chris at kohlhoff dot com) 6 | // 7 | // Distributed under the Boost Software License, Version 1.0. (See accompanying 8 | // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) 9 | // 10 | 11 | #ifndef ASIO_DETAIL_TASK_IO_SERVICE_THREAD_INFO_HPP 12 | #define ASIO_DETAIL_TASK_IO_SERVICE_THREAD_INFO_HPP 13 | 14 | #if defined(_MSC_VER) && (_MSC_VER >= 1200) 15 | # pragma once 16 | #endif // defined(_MSC_VER) && (_MSC_VER >= 1200) 17 | 18 | #include "asio/detail/op_queue.hpp" 19 | #include "asio/detail/thread_info_base.hpp" 20 | 21 | #include "asio/detail/push_options.hpp" 22 | 23 | namespace asio { 24 | namespace detail { 25 | 26 | class task_io_service; 27 | class task_io_service_operation; 28 | 29 | struct task_io_service_thread_info : public thread_info_base 30 | { 31 | op_queue private_op_queue; 32 | long private_outstanding_work; 33 | }; 34 | 35 | } // namespace detail 36 | } // namespace asio 37 | 38 | #include "asio/detail/pop_options.hpp" 39 | 40 | #endif // ASIO_DETAIL_TASK_IO_SERVICE_THREAD_INFO_HPP 41 | -------------------------------------------------------------------------------- /third_party/asio/asio/include/asio/detail/thread.hpp: -------------------------------------------------------------------------------- 1 | // 2 | // detail/thread.hpp 3 | // ~~~~~~~~~~~~~~~~~ 4 | // 5 | // Copyright (c) 2003-2015 Christopher M. Kohlhoff (chris at kohlhoff dot com) 6 | // 7 | // Distributed under the Boost Software License, Version 1.0. (See accompanying 8 | // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) 9 | // 10 | 11 | #ifndef ASIO_DETAIL_THREAD_HPP 12 | #define ASIO_DETAIL_THREAD_HPP 13 | 14 | #if defined(_MSC_VER) && (_MSC_VER >= 1200) 15 | # pragma once 16 | #endif // defined(_MSC_VER) && (_MSC_VER >= 1200) 17 | 18 | #include "asio/detail/config.hpp" 19 | 20 | #if !defined(ASIO_HAS_THREADS) 21 | # include "asio/detail/null_thread.hpp" 22 | #elif defined(ASIO_WINDOWS) 23 | # if defined(UNDER_CE) 24 | # include "asio/detail/wince_thread.hpp" 25 | # else 26 | # include "asio/detail/win_thread.hpp" 27 | # endif 28 | #elif defined(ASIO_HAS_PTHREADS) 29 | # include "asio/detail/posix_thread.hpp" 30 | #elif defined(ASIO_HAS_STD_THREAD) 31 | # include "asio/detail/std_thread.hpp" 32 | #else 33 | # error Only Windows, POSIX and std::thread are supported! 34 | #endif 35 | 36 | namespace asio { 37 | namespace detail { 38 | 39 | #if !defined(ASIO_HAS_THREADS) 40 | typedef null_thread thread; 41 | #elif defined(ASIO_WINDOWS) 42 | # if defined(UNDER_CE) 43 | typedef wince_thread thread; 44 | # else 45 | typedef win_thread thread; 46 | # endif 47 | #elif defined(ASIO_HAS_PTHREADS) 48 | typedef posix_thread thread; 49 | #elif defined(ASIO_HAS_STD_THREAD) 50 | typedef std_thread thread; 51 | #endif 52 | 53 | } // namespace detail 54 | } // namespace asio 55 | 56 | #endif // ASIO_DETAIL_THREAD_HPP 57 | -------------------------------------------------------------------------------- /third_party/asio/asio/include/asio/detail/throw_error.hpp: -------------------------------------------------------------------------------- 1 | // 2 | // detail/throw_error.hpp 3 | // ~~~~~~~~~~~~~~~~~~~~~~ 4 | // 5 | // Copyright (c) 2003-2015 Christopher M. Kohlhoff (chris at kohlhoff dot com) 6 | // 7 | // Distributed under the Boost Software License, Version 1.0. (See accompanying 8 | // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) 9 | // 10 | 11 | #ifndef ASIO_DETAIL_THROW_ERROR_HPP 12 | #define ASIO_DETAIL_THROW_ERROR_HPP 13 | 14 | #if defined(_MSC_VER) && (_MSC_VER >= 1200) 15 | # pragma once 16 | #endif // defined(_MSC_VER) && (_MSC_VER >= 1200) 17 | 18 | #include "asio/detail/config.hpp" 19 | #include "asio/error_code.hpp" 20 | 21 | #include "asio/detail/push_options.hpp" 22 | 23 | namespace asio { 24 | namespace detail { 25 | 26 | ASIO_DECL void do_throw_error(const asio::error_code& err); 27 | 28 | ASIO_DECL void do_throw_error(const asio::error_code& err, 29 | const char* location); 30 | 31 | inline void throw_error(const asio::error_code& err) 32 | { 33 | if (err) 34 | do_throw_error(err); 35 | } 36 | 37 | inline void throw_error(const asio::error_code& err, 38 | const char* location) 39 | { 40 | if (err) 41 | do_throw_error(err, location); 42 | } 43 | 44 | } // namespace detail 45 | } // namespace asio 46 | 47 | #include "asio/detail/pop_options.hpp" 48 | 49 | #if defined(ASIO_HEADER_ONLY) 50 | # include "asio/detail/impl/throw_error.ipp" 51 | #endif // defined(ASIO_HEADER_ONLY) 52 | 53 | #endif // ASIO_DETAIL_THROW_ERROR_HPP 54 | -------------------------------------------------------------------------------- /third_party/asio/asio/include/asio/detail/throw_exception.hpp: -------------------------------------------------------------------------------- 1 | // 2 | // detail/throw_exception.hpp 3 | // ~~~~~~~~~~~~~~~~~~~~~~~~~~ 4 | // 5 | // Copyright (c) 2003-2015 Christopher M. Kohlhoff (chris at kohlhoff dot com) 6 | // 7 | // Distributed under the Boost Software License, Version 1.0. (See accompanying 8 | // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) 9 | // 10 | 11 | #ifndef ASIO_DETAIL_THROW_EXCEPTION_HPP 12 | #define ASIO_DETAIL_THROW_EXCEPTION_HPP 13 | 14 | #if defined(_MSC_VER) && (_MSC_VER >= 1200) 15 | # pragma once 16 | #endif // defined(_MSC_VER) && (_MSC_VER >= 1200) 17 | 18 | #include "asio/detail/config.hpp" 19 | 20 | #if defined(ASIO_HAS_BOOST_THROW_EXCEPTION) 21 | # include 22 | #endif // defined(ASIO_BOOST_THROW_EXCEPTION) 23 | 24 | namespace asio { 25 | namespace detail { 26 | 27 | #if defined(ASIO_HAS_BOOST_THROW_EXCEPTION) 28 | using boost::throw_exception; 29 | #else // defined(ASIO_HAS_BOOST_THROW_EXCEPTION) 30 | 31 | // Declare the throw_exception function for all targets. 32 | template 33 | void throw_exception(const Exception& e); 34 | 35 | // Only define the throw_exception function when exceptions are enabled. 36 | // Otherwise, it is up to the application to provide a definition of this 37 | // function. 38 | # if !defined(ASIO_NO_EXCEPTIONS) 39 | template 40 | void throw_exception(const Exception& e) 41 | { 42 | throw e; 43 | } 44 | # endif // !defined(ASIO_NO_EXCEPTIONS) 45 | 46 | #endif // defined(ASIO_HAS_BOOST_THROW_EXCEPTION) 47 | 48 | } // namespace detail 49 | } // namespace asio 50 | 51 | #endif // ASIO_DETAIL_THROW_EXCEPTION_HPP 52 | -------------------------------------------------------------------------------- /third_party/asio/asio/include/asio/detail/timer_scheduler.hpp: -------------------------------------------------------------------------------- 1 | // 2 | // detail/timer_scheduler.hpp 3 | // ~~~~~~~~~~~~~~~~~~~~~~~~~~ 4 | // 5 | // Copyright (c) 2003-2015 Christopher M. Kohlhoff (chris at kohlhoff dot com) 6 | // 7 | // Distributed under the Boost Software License, Version 1.0. (See accompanying 8 | // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) 9 | // 10 | 11 | #ifndef ASIO_DETAIL_TIMER_SCHEDULER_HPP 12 | #define ASIO_DETAIL_TIMER_SCHEDULER_HPP 13 | 14 | #if defined(_MSC_VER) && (_MSC_VER >= 1200) 15 | # pragma once 16 | #endif // defined(_MSC_VER) && (_MSC_VER >= 1200) 17 | 18 | #include "asio/detail/config.hpp" 19 | #include "asio/detail/timer_scheduler_fwd.hpp" 20 | 21 | #if defined(ASIO_WINDOWS_RUNTIME) 22 | # include "asio/detail/winrt_timer_scheduler.hpp" 23 | #elif defined(ASIO_HAS_IOCP) 24 | # include "asio/detail/win_iocp_io_service.hpp" 25 | #elif defined(ASIO_HAS_EPOLL) 26 | # include "asio/detail/epoll_reactor.hpp" 27 | #elif defined(ASIO_HAS_KQUEUE) 28 | # include "asio/detail/kqueue_reactor.hpp" 29 | #elif defined(ASIO_HAS_DEV_POLL) 30 | # include "asio/detail/dev_poll_reactor.hpp" 31 | #else 32 | # include "asio/detail/select_reactor.hpp" 33 | #endif 34 | 35 | #endif // ASIO_DETAIL_TIMER_SCHEDULER_HPP 36 | -------------------------------------------------------------------------------- /third_party/asio/asio/include/asio/detail/timer_scheduler_fwd.hpp: -------------------------------------------------------------------------------- 1 | // 2 | // detail/timer_scheduler_fwd.hpp 3 | // ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 4 | // 5 | // Copyright (c) 2003-2015 Christopher M. Kohlhoff (chris at kohlhoff dot com) 6 | // 7 | // Distributed under the Boost Software License, Version 1.0. (See accompanying 8 | // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) 9 | // 10 | 11 | #ifndef ASIO_DETAIL_TIMER_SCHEDULER_FWD_HPP 12 | #define ASIO_DETAIL_TIMER_SCHEDULER_FWD_HPP 13 | 14 | #if defined(_MSC_VER) && (_MSC_VER >= 1200) 15 | # pragma once 16 | #endif // defined(_MSC_VER) && (_MSC_VER >= 1200) 17 | 18 | #include "asio/detail/config.hpp" 19 | 20 | namespace asio { 21 | namespace detail { 22 | 23 | #if defined(ASIO_WINDOWS_RUNTIME) 24 | typedef class winrt_timer_scheduler timer_scheduler; 25 | #elif defined(ASIO_HAS_IOCP) 26 | typedef class win_iocp_io_service timer_scheduler; 27 | #elif defined(ASIO_HAS_EPOLL) 28 | typedef class epoll_reactor timer_scheduler; 29 | #elif defined(ASIO_HAS_KQUEUE) 30 | typedef class kqueue_reactor timer_scheduler; 31 | #elif defined(ASIO_HAS_DEV_POLL) 32 | typedef class dev_poll_reactor timer_scheduler; 33 | #else 34 | typedef class select_reactor timer_scheduler; 35 | #endif 36 | 37 | } // namespace detail 38 | } // namespace asio 39 | 40 | #endif // ASIO_DETAIL_TIMER_SCHEDULER_FWD_HPP 41 | -------------------------------------------------------------------------------- /third_party/asio/asio/include/asio/detail/wait_op.hpp: -------------------------------------------------------------------------------- 1 | // 2 | // detail/wait_op.hpp 3 | // ~~~~~~~~~~~~~~~~~~ 4 | // 5 | // Copyright (c) 2003-2015 Christopher M. Kohlhoff (chris at kohlhoff dot com) 6 | // 7 | // Distributed under the Boost Software License, Version 1.0. (See accompanying 8 | // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) 9 | // 10 | 11 | #ifndef ASIO_DETAIL_WAIT_OP_HPP 12 | #define ASIO_DETAIL_WAIT_OP_HPP 13 | 14 | #if defined(_MSC_VER) && (_MSC_VER >= 1200) 15 | # pragma once 16 | #endif // defined(_MSC_VER) && (_MSC_VER >= 1200) 17 | 18 | #include "asio/detail/config.hpp" 19 | #include "asio/detail/operation.hpp" 20 | 21 | #include "asio/detail/push_options.hpp" 22 | 23 | namespace asio { 24 | namespace detail { 25 | 26 | class wait_op 27 | : public operation 28 | { 29 | public: 30 | // The error code to be passed to the completion handler. 31 | asio::error_code ec_; 32 | 33 | protected: 34 | wait_op(func_type func) 35 | : operation(func) 36 | { 37 | } 38 | }; 39 | 40 | } // namespace detail 41 | } // namespace asio 42 | 43 | #include "asio/detail/pop_options.hpp" 44 | 45 | #endif // ASIO_DETAIL_WAIT_OP_HPP 46 | -------------------------------------------------------------------------------- /third_party/asio/asio/include/asio/detail/weak_ptr.hpp: -------------------------------------------------------------------------------- 1 | // 2 | // detail/weak_ptr.hpp 3 | // ~~~~~~~~~~~~~~~~~~~ 4 | // 5 | // Copyright (c) 2003-2015 Christopher M. Kohlhoff (chris at kohlhoff dot com) 6 | // 7 | // Distributed under the Boost Software License, Version 1.0. (See accompanying 8 | // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) 9 | // 10 | 11 | #ifndef ASIO_DETAIL_WEAK_PTR_HPP 12 | #define ASIO_DETAIL_WEAK_PTR_HPP 13 | 14 | #if defined(_MSC_VER) && (_MSC_VER >= 1200) 15 | # pragma once 16 | #endif // defined(_MSC_VER) && (_MSC_VER >= 1200) 17 | 18 | #include "asio/detail/config.hpp" 19 | 20 | #if defined(ASIO_HAS_STD_SHARED_PTR) 21 | # include 22 | #else // defined(ASIO_HAS_STD_SHARED_PTR) 23 | # include 24 | #endif // defined(ASIO_HAS_STD_SHARED_PTR) 25 | 26 | namespace asio { 27 | namespace detail { 28 | 29 | #if defined(ASIO_HAS_STD_SHARED_PTR) 30 | using std::weak_ptr; 31 | #else // defined(ASIO_HAS_STD_SHARED_PTR) 32 | using boost::weak_ptr; 33 | #endif // defined(ASIO_HAS_STD_SHARED_PTR) 34 | 35 | } // namespace detail 36 | } // namespace asio 37 | 38 | #endif // ASIO_DETAIL_WEAK_PTR_HPP 39 | -------------------------------------------------------------------------------- /third_party/asio/asio/include/asio/detail/win_iocp_thread_info.hpp: -------------------------------------------------------------------------------- 1 | // 2 | // detail/win_iocp_thread_info.hpp 3 | // ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 4 | // 5 | // Copyright (c) 2003-2015 Christopher M. Kohlhoff (chris at kohlhoff dot com) 6 | // 7 | // Distributed under the Boost Software License, Version 1.0. (See accompanying 8 | // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) 9 | // 10 | 11 | #ifndef ASIO_DETAIL_WIN_IOCP_THREAD_INFO_HPP 12 | #define ASIO_DETAIL_WIN_IOCP_THREAD_INFO_HPP 13 | 14 | #if defined(_MSC_VER) && (_MSC_VER >= 1200) 15 | # pragma once 16 | #endif // defined(_MSC_VER) && (_MSC_VER >= 1200) 17 | 18 | #include "asio/detail/thread_info_base.hpp" 19 | 20 | #include "asio/detail/push_options.hpp" 21 | 22 | namespace asio { 23 | namespace detail { 24 | 25 | struct win_iocp_thread_info : public thread_info_base 26 | { 27 | }; 28 | 29 | } // namespace detail 30 | } // namespace asio 31 | 32 | #include "asio/detail/pop_options.hpp" 33 | 34 | #endif // ASIO_DETAIL_WIN_IOCP_THREAD_INFO_HPP 35 | -------------------------------------------------------------------------------- /third_party/asio/asio/include/asio/detail/winrt_async_op.hpp: -------------------------------------------------------------------------------- 1 | // 2 | // detail/winrt_async_op.hpp 3 | // ~~~~~~~~~~~~~~~~~~~~~~~~~ 4 | // 5 | // Copyright (c) 2003-2015 Christopher M. Kohlhoff (chris at kohlhoff dot com) 6 | // 7 | // Distributed under the Boost Software License, Version 1.0. (See accompanying 8 | // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) 9 | // 10 | 11 | #ifndef ASIO_DETAIL_WINRT_ASYNC_OP_HPP 12 | #define ASIO_DETAIL_WINRT_ASYNC_OP_HPP 13 | 14 | #if defined(_MSC_VER) && (_MSC_VER >= 1200) 15 | # pragma once 16 | #endif // defined(_MSC_VER) && (_MSC_VER >= 1200) 17 | 18 | #include "asio/detail/config.hpp" 19 | #include "asio/detail/operation.hpp" 20 | 21 | #include "asio/detail/push_options.hpp" 22 | 23 | namespace asio { 24 | namespace detail { 25 | 26 | template 27 | class winrt_async_op 28 | : public operation 29 | { 30 | public: 31 | // The error code to be passed to the completion handler. 32 | asio::error_code ec_; 33 | 34 | // The result of the operation, to be passed to the completion handler. 35 | TResult result_; 36 | 37 | protected: 38 | winrt_async_op(func_type complete_func) 39 | : operation(complete_func), 40 | result_() 41 | { 42 | } 43 | }; 44 | 45 | template <> 46 | class winrt_async_op 47 | : public operation 48 | { 49 | public: 50 | // The error code to be passed to the completion handler. 51 | asio::error_code ec_; 52 | 53 | protected: 54 | winrt_async_op(func_type complete_func) 55 | : operation(complete_func) 56 | { 57 | } 58 | }; 59 | 60 | } // namespace detail 61 | } // namespace asio 62 | 63 | #include "asio/detail/pop_options.hpp" 64 | 65 | #endif // ASIO_DETAIL_WINRT_ASYNC_OP_HPP 66 | -------------------------------------------------------------------------------- /third_party/asio/asio/include/asio/handler_continuation_hook.hpp: -------------------------------------------------------------------------------- 1 | // 2 | // handler_continuation_hook.hpp 3 | // ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 4 | // 5 | // Copyright (c) 2003-2015 Christopher M. Kohlhoff (chris at kohlhoff dot com) 6 | // 7 | // Distributed under the Boost Software License, Version 1.0. (See accompanying 8 | // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) 9 | // 10 | 11 | #ifndef ASIO_HANDLER_CONTINUATION_HOOK_HPP 12 | #define ASIO_HANDLER_CONTINUATION_HOOK_HPP 13 | 14 | #if defined(_MSC_VER) && (_MSC_VER >= 1200) 15 | # pragma once 16 | #endif // defined(_MSC_VER) && (_MSC_VER >= 1200) 17 | 18 | #include "asio/detail/config.hpp" 19 | 20 | #include "asio/detail/push_options.hpp" 21 | 22 | namespace asio { 23 | 24 | /// Default continuation function for handlers. 25 | /** 26 | * Asynchronous operations may represent a continuation of the asynchronous 27 | * control flow associated with the current handler. The implementation can use 28 | * this knowledge to optimise scheduling of the handler. 29 | * 30 | * Implement asio_handler_is_continuation for your own handlers to indicate 31 | * when a handler represents a continuation. 32 | * 33 | * The default implementation of the continuation hook returns false. 34 | * 35 | * @par Example 36 | * @code 37 | * class my_handler; 38 | * 39 | * bool asio_handler_is_continuation(my_handler* context) 40 | * { 41 | * return true; 42 | * } 43 | * @endcode 44 | */ 45 | inline bool asio_handler_is_continuation(...) 46 | { 47 | return false; 48 | } 49 | 50 | } // namespace asio 51 | 52 | #include "asio/detail/pop_options.hpp" 53 | 54 | #endif // ASIO_HANDLER_CONTINUATION_HOOK_HPP 55 | -------------------------------------------------------------------------------- /third_party/asio/asio/include/asio/impl/serial_port_base.hpp: -------------------------------------------------------------------------------- 1 | // 2 | // impl/serial_port_base.hpp 3 | // ~~~~~~~~~~~~~~~~~~~~~~~~~ 4 | // 5 | // Copyright (c) 2003-2015 Christopher M. Kohlhoff (chris at kohlhoff dot com) 6 | // Copyright (c) 2008 Rep Invariant Systems, Inc. (info@repinvariant.com) 7 | // 8 | // Distributed under the Boost Software License, Version 1.0. (See accompanying 9 | // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) 10 | // 11 | 12 | #ifndef ASIO_IMPL_SERIAL_PORT_BASE_HPP 13 | #define ASIO_IMPL_SERIAL_PORT_BASE_HPP 14 | 15 | #if defined(_MSC_VER) && (_MSC_VER >= 1200) 16 | # pragma once 17 | #endif // defined(_MSC_VER) && (_MSC_VER >= 1200) 18 | 19 | #include "asio/detail/push_options.hpp" 20 | 21 | namespace asio { 22 | 23 | inline serial_port_base::baud_rate::baud_rate(unsigned int rate) 24 | : value_(rate) 25 | { 26 | } 27 | 28 | inline unsigned int serial_port_base::baud_rate::value() const 29 | { 30 | return value_; 31 | } 32 | 33 | inline serial_port_base::flow_control::type 34 | serial_port_base::flow_control::value() const 35 | { 36 | return value_; 37 | } 38 | 39 | inline serial_port_base::parity::type serial_port_base::parity::value() const 40 | { 41 | return value_; 42 | } 43 | 44 | inline serial_port_base::stop_bits::type 45 | serial_port_base::stop_bits::value() const 46 | { 47 | return value_; 48 | } 49 | 50 | inline unsigned int serial_port_base::character_size::value() const 51 | { 52 | return value_; 53 | } 54 | 55 | } // namespace asio 56 | 57 | #include "asio/detail/pop_options.hpp" 58 | 59 | #endif // ASIO_IMPL_SERIAL_PORT_BASE_HPP 60 | -------------------------------------------------------------------------------- /third_party/asio/asio/include/asio/impl/src.cpp: -------------------------------------------------------------------------------- 1 | // 2 | // impl/src.cpp 3 | // ~~~~~~~~~~~~ 4 | // 5 | // Copyright (c) 2003-2015 Christopher M. Kohlhoff (chris at kohlhoff dot com) 6 | // 7 | // Distributed under the Boost Software License, Version 1.0. (See accompanying 8 | // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) 9 | // 10 | 11 | #if defined(_MSC_VER) \ 12 | || defined(__BORLANDC__) \ 13 | || defined(__DMC__) 14 | # pragma message ( \ 15 | "This file is deprecated. " \ 16 | "Please #include instead.") 17 | #elif defined(__GNUC__) \ 18 | || defined(__HP_aCC) \ 19 | || defined(__SUNPRO_CC) \ 20 | || defined(__IBMCPP__) 21 | # warning "This file is deprecated." 22 | # warning "Please #include instead." 23 | #endif 24 | 25 | #include "asio/impl/src.hpp" 26 | -------------------------------------------------------------------------------- /third_party/asio/asio/include/asio/ip/host_name.hpp: -------------------------------------------------------------------------------- 1 | // 2 | // ip/host_name.hpp 3 | // ~~~~~~~~~~~~~~~~ 4 | // 5 | // Copyright (c) 2003-2015 Christopher M. Kohlhoff (chris at kohlhoff dot com) 6 | // 7 | // Distributed under the Boost Software License, Version 1.0. (See accompanying 8 | // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) 9 | // 10 | 11 | #ifndef ASIO_IP_HOST_NAME_HPP 12 | #define ASIO_IP_HOST_NAME_HPP 13 | 14 | #if defined(_MSC_VER) && (_MSC_VER >= 1200) 15 | # pragma once 16 | #endif // defined(_MSC_VER) && (_MSC_VER >= 1200) 17 | 18 | #include "asio/detail/config.hpp" 19 | #include 20 | #include "asio/error_code.hpp" 21 | 22 | #include "asio/detail/push_options.hpp" 23 | 24 | namespace asio { 25 | namespace ip { 26 | 27 | /// Get the current host name. 28 | ASIO_DECL std::string host_name(); 29 | 30 | /// Get the current host name. 31 | ASIO_DECL std::string host_name(asio::error_code& ec); 32 | 33 | } // namespace ip 34 | } // namespace asio 35 | 36 | #include "asio/detail/pop_options.hpp" 37 | 38 | #if defined(ASIO_HEADER_ONLY) 39 | # include "asio/ip/impl/host_name.ipp" 40 | #endif // defined(ASIO_HEADER_ONLY) 41 | 42 | #endif // ASIO_IP_HOST_NAME_HPP 43 | -------------------------------------------------------------------------------- /third_party/asio/asio/include/asio/ip/impl/address.hpp: -------------------------------------------------------------------------------- 1 | // 2 | // ip/impl/address.hpp 3 | // ~~~~~~~~~~~~~~~~~~~ 4 | // 5 | // Copyright (c) 2003-2015 Christopher M. Kohlhoff (chris at kohlhoff dot com) 6 | // 7 | // Distributed under the Boost Software License, Version 1.0. (See accompanying 8 | // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) 9 | // 10 | 11 | #ifndef ASIO_IP_IMPL_ADDRESS_HPP 12 | #define ASIO_IP_IMPL_ADDRESS_HPP 13 | 14 | #if defined(_MSC_VER) && (_MSC_VER >= 1200) 15 | # pragma once 16 | #endif // defined(_MSC_VER) && (_MSC_VER >= 1200) 17 | 18 | #if !defined(ASIO_NO_IOSTREAM) 19 | 20 | #include "asio/detail/throw_error.hpp" 21 | 22 | #include "asio/detail/push_options.hpp" 23 | 24 | namespace asio { 25 | namespace ip { 26 | 27 | template 28 | std::basic_ostream& operator<<( 29 | std::basic_ostream& os, const address& addr) 30 | { 31 | asio::error_code ec; 32 | std::string s = addr.to_string(ec); 33 | if (ec) 34 | { 35 | if (os.exceptions() & std::basic_ostream::failbit) 36 | asio::detail::throw_error(ec); 37 | else 38 | os.setstate(std::basic_ostream::failbit); 39 | } 40 | else 41 | for (std::string::iterator i = s.begin(); i != s.end(); ++i) 42 | os << os.widen(*i); 43 | return os; 44 | } 45 | 46 | } // namespace ip 47 | } // namespace asio 48 | 49 | #include "asio/detail/pop_options.hpp" 50 | 51 | #endif // !defined(ASIO_NO_IOSTREAM) 52 | 53 | #endif // ASIO_IP_IMPL_ADDRESS_HPP 54 | -------------------------------------------------------------------------------- /third_party/asio/asio/include/asio/ip/impl/address_v4.hpp: -------------------------------------------------------------------------------- 1 | // 2 | // ip/impl/address_v4.hpp 3 | // ~~~~~~~~~~~~~~~~~~~~~~ 4 | // 5 | // Copyright (c) 2003-2015 Christopher M. Kohlhoff (chris at kohlhoff dot com) 6 | // 7 | // Distributed under the Boost Software License, Version 1.0. (See accompanying 8 | // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) 9 | // 10 | 11 | #ifndef ASIO_IP_IMPL_ADDRESS_V4_HPP 12 | #define ASIO_IP_IMPL_ADDRESS_V4_HPP 13 | 14 | #if defined(_MSC_VER) && (_MSC_VER >= 1200) 15 | # pragma once 16 | #endif // defined(_MSC_VER) && (_MSC_VER >= 1200) 17 | 18 | #if !defined(ASIO_NO_IOSTREAM) 19 | 20 | #include "asio/detail/throw_error.hpp" 21 | 22 | #include "asio/detail/push_options.hpp" 23 | 24 | namespace asio { 25 | namespace ip { 26 | 27 | template 28 | std::basic_ostream& operator<<( 29 | std::basic_ostream& os, const address_v4& addr) 30 | { 31 | asio::error_code ec; 32 | std::string s = addr.to_string(ec); 33 | if (ec) 34 | { 35 | if (os.exceptions() & std::basic_ostream::failbit) 36 | asio::detail::throw_error(ec); 37 | else 38 | os.setstate(std::basic_ostream::failbit); 39 | } 40 | else 41 | for (std::string::iterator i = s.begin(); i != s.end(); ++i) 42 | os << os.widen(*i); 43 | return os; 44 | } 45 | 46 | } // namespace ip 47 | } // namespace asio 48 | 49 | #include "asio/detail/pop_options.hpp" 50 | 51 | #endif // !defined(ASIO_NO_IOSTREAM) 52 | 53 | #endif // ASIO_IP_IMPL_ADDRESS_V4_HPP 54 | -------------------------------------------------------------------------------- /third_party/asio/asio/include/asio/ip/impl/address_v6.hpp: -------------------------------------------------------------------------------- 1 | // 2 | // ip/impl/address_v6.hpp 3 | // ~~~~~~~~~~~~~~~~~~~~~~ 4 | // 5 | // Copyright (c) 2003-2015 Christopher M. Kohlhoff (chris at kohlhoff dot com) 6 | // 7 | // Distributed under the Boost Software License, Version 1.0. (See accompanying 8 | // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) 9 | // 10 | 11 | #ifndef ASIO_IP_IMPL_ADDRESS_V6_HPP 12 | #define ASIO_IP_IMPL_ADDRESS_V6_HPP 13 | 14 | #if defined(_MSC_VER) && (_MSC_VER >= 1200) 15 | # pragma once 16 | #endif // defined(_MSC_VER) && (_MSC_VER >= 1200) 17 | 18 | #if !defined(ASIO_NO_IOSTREAM) 19 | 20 | #include "asio/detail/throw_error.hpp" 21 | 22 | #include "asio/detail/push_options.hpp" 23 | 24 | namespace asio { 25 | namespace ip { 26 | 27 | template 28 | std::basic_ostream& operator<<( 29 | std::basic_ostream& os, const address_v6& addr) 30 | { 31 | asio::error_code ec; 32 | std::string s = addr.to_string(ec); 33 | if (ec) 34 | { 35 | if (os.exceptions() & std::basic_ostream::failbit) 36 | asio::detail::throw_error(ec); 37 | else 38 | os.setstate(std::basic_ostream::failbit); 39 | } 40 | else 41 | for (std::string::iterator i = s.begin(); i != s.end(); ++i) 42 | os << os.widen(*i); 43 | return os; 44 | } 45 | 46 | } // namespace ip 47 | } // namespace asio 48 | 49 | #include "asio/detail/pop_options.hpp" 50 | 51 | #endif // !defined(ASIO_NO_IOSTREAM) 52 | 53 | #endif // ASIO_IP_IMPL_ADDRESS_V6_HPP 54 | -------------------------------------------------------------------------------- /third_party/asio/asio/include/asio/ip/impl/basic_endpoint.hpp: -------------------------------------------------------------------------------- 1 | // 2 | // ip/impl/basic_endpoint.hpp 3 | // ~~~~~~~~~~~~~~~~~~~~~~~~~~ 4 | // 5 | // Copyright (c) 2003-2015 Christopher M. Kohlhoff (chris at kohlhoff dot com) 6 | // 7 | // Distributed under the Boost Software License, Version 1.0. (See accompanying 8 | // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) 9 | // 10 | 11 | #ifndef ASIO_IP_IMPL_BASIC_ENDPOINT_HPP 12 | #define ASIO_IP_IMPL_BASIC_ENDPOINT_HPP 13 | 14 | #if defined(_MSC_VER) && (_MSC_VER >= 1200) 15 | # pragma once 16 | #endif // defined(_MSC_VER) && (_MSC_VER >= 1200) 17 | 18 | #if !defined(ASIO_NO_IOSTREAM) 19 | 20 | #include "asio/detail/throw_error.hpp" 21 | 22 | #include "asio/detail/push_options.hpp" 23 | 24 | namespace asio { 25 | namespace ip { 26 | 27 | template 28 | std::basic_ostream& operator<<( 29 | std::basic_ostream& os, 30 | const basic_endpoint& endpoint) 31 | { 32 | asio::ip::detail::endpoint tmp_ep(endpoint.address(), endpoint.port()); 33 | asio::error_code ec; 34 | std::string s = tmp_ep.to_string(ec); 35 | if (ec) 36 | { 37 | if (os.exceptions() & std::basic_ostream::failbit) 38 | asio::detail::throw_error(ec); 39 | else 40 | os.setstate(std::basic_ostream::failbit); 41 | } 42 | else 43 | for (std::string::iterator i = s.begin(); i != s.end(); ++i) 44 | os << os.widen(*i); 45 | return os; 46 | } 47 | 48 | } // namespace ip 49 | } // namespace asio 50 | 51 | #include "asio/detail/pop_options.hpp" 52 | 53 | #endif // !defined(ASIO_NO_IOSTREAM) 54 | 55 | #endif // ASIO_IP_IMPL_BASIC_ENDPOINT_HPP 56 | -------------------------------------------------------------------------------- /third_party/asio/asio/include/asio/ip/impl/host_name.ipp: -------------------------------------------------------------------------------- 1 | // 2 | // ip/impl/host_name.ipp 3 | // ~~~~~~~~~~~~~~~~~~~~~ 4 | // 5 | // Copyright (c) 2003-2015 Christopher M. Kohlhoff (chris at kohlhoff dot com) 6 | // 7 | // Distributed under the Boost Software License, Version 1.0. (See accompanying 8 | // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) 9 | // 10 | 11 | #ifndef ASIO_IP_IMPL_HOST_NAME_IPP 12 | #define ASIO_IP_IMPL_HOST_NAME_IPP 13 | 14 | #if defined(_MSC_VER) && (_MSC_VER >= 1200) 15 | # pragma once 16 | #endif // defined(_MSC_VER) && (_MSC_VER >= 1200) 17 | 18 | #include "asio/detail/config.hpp" 19 | #include "asio/detail/socket_ops.hpp" 20 | #include "asio/detail/throw_error.hpp" 21 | #include "asio/detail/winsock_init.hpp" 22 | #include "asio/ip/host_name.hpp" 23 | 24 | #include "asio/detail/push_options.hpp" 25 | 26 | namespace asio { 27 | namespace ip { 28 | 29 | std::string host_name() 30 | { 31 | char name[1024]; 32 | asio::error_code ec; 33 | if (asio::detail::socket_ops::gethostname(name, sizeof(name), ec) != 0) 34 | { 35 | asio::detail::throw_error(ec); 36 | return std::string(); 37 | } 38 | return std::string(name); 39 | } 40 | 41 | std::string host_name(asio::error_code& ec) 42 | { 43 | char name[1024]; 44 | if (asio::detail::socket_ops::gethostname(name, sizeof(name), ec) != 0) 45 | return std::string(); 46 | return std::string(name); 47 | } 48 | 49 | } // namespace ip 50 | } // namespace asio 51 | 52 | #include "asio/detail/pop_options.hpp" 53 | 54 | #endif // ASIO_IP_IMPL_HOST_NAME_IPP 55 | -------------------------------------------------------------------------------- /third_party/asio/asio/include/asio/is_read_buffered.hpp: -------------------------------------------------------------------------------- 1 | // 2 | // is_read_buffered.hpp 3 | // ~~~~~~~~~~~~~~~~~~~~ 4 | // 5 | // Copyright (c) 2003-2015 Christopher M. Kohlhoff (chris at kohlhoff dot com) 6 | // 7 | // Distributed under the Boost Software License, Version 1.0. (See accompanying 8 | // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) 9 | // 10 | 11 | #ifndef ASIO_IS_READ_BUFFERED_HPP 12 | #define ASIO_IS_READ_BUFFERED_HPP 13 | 14 | #if defined(_MSC_VER) && (_MSC_VER >= 1200) 15 | # pragma once 16 | #endif // defined(_MSC_VER) && (_MSC_VER >= 1200) 17 | 18 | #include "asio/detail/config.hpp" 19 | #include "asio/buffered_read_stream_fwd.hpp" 20 | #include "asio/buffered_stream_fwd.hpp" 21 | 22 | #include "asio/detail/push_options.hpp" 23 | 24 | namespace asio { 25 | 26 | namespace detail { 27 | 28 | template 29 | char is_read_buffered_helper(buffered_stream* s); 30 | 31 | template 32 | char is_read_buffered_helper(buffered_read_stream* s); 33 | 34 | struct is_read_buffered_big_type { char data[10]; }; 35 | is_read_buffered_big_type is_read_buffered_helper(...); 36 | 37 | } // namespace detail 38 | 39 | /// The is_read_buffered class is a traits class that may be used to determine 40 | /// whether a stream type supports buffering of read data. 41 | template 42 | class is_read_buffered 43 | { 44 | public: 45 | #if defined(GENERATING_DOCUMENTATION) 46 | /// The value member is true only if the Stream type supports buffering of 47 | /// read data. 48 | static const bool value; 49 | #else 50 | ASIO_STATIC_CONSTANT(bool, 51 | value = sizeof(detail::is_read_buffered_helper((Stream*)0)) == 1); 52 | #endif 53 | }; 54 | 55 | } // namespace asio 56 | 57 | #include "asio/detail/pop_options.hpp" 58 | 59 | #endif // ASIO_IS_READ_BUFFERED_HPP 60 | -------------------------------------------------------------------------------- /third_party/asio/asio/include/asio/is_write_buffered.hpp: -------------------------------------------------------------------------------- 1 | // 2 | // is_write_buffered.hpp 3 | // ~~~~~~~~~~~~~~~~~~~~~ 4 | // 5 | // Copyright (c) 2003-2015 Christopher M. Kohlhoff (chris at kohlhoff dot com) 6 | // 7 | // Distributed under the Boost Software License, Version 1.0. (See accompanying 8 | // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) 9 | // 10 | 11 | #ifndef ASIO_IS_WRITE_BUFFERED_HPP 12 | #define ASIO_IS_WRITE_BUFFERED_HPP 13 | 14 | #if defined(_MSC_VER) && (_MSC_VER >= 1200) 15 | # pragma once 16 | #endif // defined(_MSC_VER) && (_MSC_VER >= 1200) 17 | 18 | #include "asio/detail/config.hpp" 19 | #include "asio/buffered_stream_fwd.hpp" 20 | #include "asio/buffered_write_stream_fwd.hpp" 21 | 22 | #include "asio/detail/push_options.hpp" 23 | 24 | namespace asio { 25 | 26 | namespace detail { 27 | 28 | template 29 | char is_write_buffered_helper(buffered_stream* s); 30 | 31 | template 32 | char is_write_buffered_helper(buffered_write_stream* s); 33 | 34 | struct is_write_buffered_big_type { char data[10]; }; 35 | is_write_buffered_big_type is_write_buffered_helper(...); 36 | 37 | } // namespace detail 38 | 39 | /// The is_write_buffered class is a traits class that may be used to determine 40 | /// whether a stream type supports buffering of written data. 41 | template 42 | class is_write_buffered 43 | { 44 | public: 45 | #if defined(GENERATING_DOCUMENTATION) 46 | /// The value member is true only if the Stream type supports buffering of 47 | /// written data. 48 | static const bool value; 49 | #else 50 | ASIO_STATIC_CONSTANT(bool, 51 | value = sizeof(detail::is_write_buffered_helper((Stream*)0)) == 1); 52 | #endif 53 | }; 54 | 55 | } // namespace asio 56 | 57 | #include "asio/detail/pop_options.hpp" 58 | 59 | #endif // ASIO_IS_WRITE_BUFFERED_HPP 60 | -------------------------------------------------------------------------------- /third_party/asio/asio/include/asio/posix/stream_descriptor.hpp: -------------------------------------------------------------------------------- 1 | // 2 | // posix/stream_descriptor.hpp 3 | // ~~~~~~~~~~~~~~~~~~~~~~~~~~~ 4 | // 5 | // Copyright (c) 2003-2015 Christopher M. Kohlhoff (chris at kohlhoff dot com) 6 | // 7 | // Distributed under the Boost Software License, Version 1.0. (See accompanying 8 | // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) 9 | // 10 | 11 | #ifndef ASIO_POSIX_STREAM_DESCRIPTOR_HPP 12 | #define ASIO_POSIX_STREAM_DESCRIPTOR_HPP 13 | 14 | #if defined(_MSC_VER) && (_MSC_VER >= 1200) 15 | # pragma once 16 | #endif // defined(_MSC_VER) && (_MSC_VER >= 1200) 17 | 18 | #include "asio/detail/config.hpp" 19 | 20 | #if defined(ASIO_HAS_POSIX_STREAM_DESCRIPTOR) \ 21 | || defined(GENERATING_DOCUMENTATION) 22 | 23 | #include "asio/posix/basic_stream_descriptor.hpp" 24 | 25 | namespace asio { 26 | namespace posix { 27 | 28 | /// Typedef for the typical usage of a stream-oriented descriptor. 29 | typedef basic_stream_descriptor<> stream_descriptor; 30 | 31 | } // namespace posix 32 | } // namespace asio 33 | 34 | #endif // defined(ASIO_HAS_POSIX_STREAM_DESCRIPTOR) 35 | // || defined(GENERATING_DOCUMENTATION) 36 | 37 | #endif // ASIO_POSIX_STREAM_DESCRIPTOR_HPP 38 | -------------------------------------------------------------------------------- /third_party/asio/asio/include/asio/serial_port.hpp: -------------------------------------------------------------------------------- 1 | // 2 | // serial_port.hpp 3 | // ~~~~~~~~~~~~~~~ 4 | // 5 | // Copyright (c) 2003-2015 Christopher M. Kohlhoff (chris at kohlhoff dot com) 6 | // Copyright (c) 2008 Rep Invariant Systems, Inc. (info@repinvariant.com) 7 | // 8 | // Distributed under the Boost Software License, Version 1.0. (See accompanying 9 | // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) 10 | // 11 | 12 | #ifndef ASIO_SERIAL_PORT_HPP 13 | #define ASIO_SERIAL_PORT_HPP 14 | 15 | #if defined(_MSC_VER) && (_MSC_VER >= 1200) 16 | # pragma once 17 | #endif // defined(_MSC_VER) && (_MSC_VER >= 1200) 18 | 19 | #include "asio/detail/config.hpp" 20 | 21 | #if defined(ASIO_HAS_SERIAL_PORT) \ 22 | || defined(GENERATING_DOCUMENTATION) 23 | 24 | #include "asio/basic_serial_port.hpp" 25 | 26 | namespace asio { 27 | 28 | /// Typedef for the typical usage of a serial port. 29 | typedef basic_serial_port<> serial_port; 30 | 31 | } // namespace asio 32 | 33 | #endif // defined(ASIO_HAS_SERIAL_PORT) 34 | // || defined(GENERATING_DOCUMENTATION) 35 | 36 | #endif // ASIO_SERIAL_PORT_HPP 37 | -------------------------------------------------------------------------------- /third_party/asio/asio/include/asio/signal_set.hpp: -------------------------------------------------------------------------------- 1 | // 2 | // signal_set.hpp 3 | // ~~~~~~~~~~~~~~ 4 | // 5 | // Copyright (c) 2003-2015 Christopher M. Kohlhoff (chris at kohlhoff dot com) 6 | // 7 | // Distributed under the Boost Software License, Version 1.0. (See accompanying 8 | // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) 9 | // 10 | 11 | #ifndef ASIO_SIGNAL_SET_HPP 12 | #define ASIO_SIGNAL_SET_HPP 13 | 14 | #if defined(_MSC_VER) && (_MSC_VER >= 1200) 15 | # pragma once 16 | #endif // defined(_MSC_VER) && (_MSC_VER >= 1200) 17 | 18 | #include "asio/detail/config.hpp" 19 | #include "asio/basic_signal_set.hpp" 20 | 21 | namespace asio { 22 | 23 | /// Typedef for the typical usage of a signal set. 24 | typedef basic_signal_set<> signal_set; 25 | 26 | } // namespace asio 27 | 28 | #endif // ASIO_SIGNAL_SET_HPP 29 | -------------------------------------------------------------------------------- /third_party/asio/asio/include/asio/ssl.hpp: -------------------------------------------------------------------------------- 1 | // 2 | // ssl.hpp 3 | // ~~~~~~~ 4 | // 5 | // Copyright (c) 2003-2015 Christopher M. Kohlhoff (chris at kohlhoff dot com) 6 | // 7 | // Distributed under the Boost Software License, Version 1.0. (See accompanying 8 | // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) 9 | // 10 | 11 | #ifndef ASIO_SSL_HPP 12 | #define ASIO_SSL_HPP 13 | 14 | #if defined(_MSC_VER) && (_MSC_VER >= 1200) 15 | # pragma once 16 | #endif // defined(_MSC_VER) && (_MSC_VER >= 1200) 17 | 18 | #include "asio/ssl/basic_context.hpp" 19 | #include "asio/ssl/context.hpp" 20 | #include "asio/ssl/context_base.hpp" 21 | #include "asio/ssl/context_service.hpp" 22 | #include "asio/ssl/error.hpp" 23 | #include "asio/ssl/rfc2818_verification.hpp" 24 | #include "asio/ssl/stream.hpp" 25 | #include "asio/ssl/stream_base.hpp" 26 | #include "asio/ssl/stream_service.hpp" 27 | #include "asio/ssl/verify_context.hpp" 28 | #include "asio/ssl/verify_mode.hpp" 29 | 30 | #endif // ASIO_SSL_HPP 31 | -------------------------------------------------------------------------------- /third_party/asio/asio/include/asio/ssl/basic_context.hpp: -------------------------------------------------------------------------------- 1 | // 2 | // ssl/basic_context.hpp 3 | // ~~~~~~~~~~~~~~~~~~~~~ 4 | // 5 | // Copyright (c) 2003-2015 Christopher M. Kohlhoff (chris at kohlhoff dot com) 6 | // 7 | // Distributed under the Boost Software License, Version 1.0. (See accompanying 8 | // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) 9 | // 10 | 11 | #ifndef ASIO_SSL_BASIC_CONTEXT_HPP 12 | #define ASIO_SSL_BASIC_CONTEXT_HPP 13 | 14 | #if defined(_MSC_VER) && (_MSC_VER >= 1200) 15 | # pragma once 16 | #endif // defined(_MSC_VER) && (_MSC_VER >= 1200) 17 | 18 | #include "asio/detail/config.hpp" 19 | 20 | #if defined(ASIO_ENABLE_OLD_SSL) 21 | # include "asio/ssl/old/basic_context.hpp" 22 | #endif // defined(ASIO_ENABLE_OLD_SSL) 23 | 24 | #include "asio/detail/push_options.hpp" 25 | 26 | namespace asio { 27 | namespace ssl { 28 | 29 | #if defined(ASIO_ENABLE_OLD_SSL) 30 | 31 | using asio::ssl::old::basic_context; 32 | 33 | #endif // defined(ASIO_ENABLE_OLD_SSL) 34 | 35 | } // namespace ssl 36 | } // namespace asio 37 | 38 | #include "asio/detail/pop_options.hpp" 39 | 40 | #endif // ASIO_SSL_BASIC_CONTEXT_HPP 41 | -------------------------------------------------------------------------------- /third_party/asio/asio/include/asio/ssl/context_service.hpp: -------------------------------------------------------------------------------- 1 | // 2 | // ssl/context_service.hpp 3 | // ~~~~~~~~~~~~~~~~~~~~~~~ 4 | // 5 | // Copyright (c) 2003-2015 Christopher M. Kohlhoff (chris at kohlhoff dot com) 6 | // 7 | // Distributed under the Boost Software License, Version 1.0. (See accompanying 8 | // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) 9 | // 10 | 11 | #ifndef ASIO_SSL_CONTEXT_SERVICE_HPP 12 | #define ASIO_SSL_CONTEXT_SERVICE_HPP 13 | 14 | #if defined(_MSC_VER) && (_MSC_VER >= 1200) 15 | # pragma once 16 | #endif // defined(_MSC_VER) && (_MSC_VER >= 1200) 17 | 18 | #include "asio/detail/config.hpp" 19 | 20 | #if defined(ASIO_ENABLE_OLD_SSL) 21 | # include "asio/ssl/old/context_service.hpp" 22 | #endif // defined(ASIO_ENABLE_OLD_SSL) 23 | 24 | #include "asio/detail/push_options.hpp" 25 | 26 | namespace asio { 27 | namespace ssl { 28 | 29 | #if defined(ASIO_ENABLE_OLD_SSL) 30 | 31 | using asio::ssl::old::context_service; 32 | 33 | #endif // defined(ASIO_ENABLE_OLD_SSL) 34 | 35 | } // namespace ssl 36 | } // namespace asio 37 | 38 | #include "asio/detail/pop_options.hpp" 39 | 40 | #endif // ASIO_SSL_CONTEXT_SERVICE_HPP 41 | -------------------------------------------------------------------------------- /third_party/asio/asio/include/asio/ssl/detail/handshake_op.hpp: -------------------------------------------------------------------------------- 1 | // 2 | // ssl/detail/handshake_op.hpp 3 | // ~~~~~~~~~~~~~~~~~~~~~~~~~~~ 4 | // 5 | // Copyright (c) 2003-2015 Christopher M. Kohlhoff (chris at kohlhoff dot com) 6 | // 7 | // Distributed under the Boost Software License, Version 1.0. (See accompanying 8 | // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) 9 | // 10 | 11 | #ifndef ASIO_SSL_DETAIL_HANDSHAKE_OP_HPP 12 | #define ASIO_SSL_DETAIL_HANDSHAKE_OP_HPP 13 | 14 | #if defined(_MSC_VER) && (_MSC_VER >= 1200) 15 | # pragma once 16 | #endif // defined(_MSC_VER) && (_MSC_VER >= 1200) 17 | 18 | #include "asio/detail/config.hpp" 19 | 20 | #if !defined(ASIO_ENABLE_OLD_SSL) 21 | # include "asio/ssl/detail/engine.hpp" 22 | #endif // !defined(ASIO_ENABLE_OLD_SSL) 23 | 24 | #include "asio/detail/push_options.hpp" 25 | 26 | namespace asio { 27 | namespace ssl { 28 | namespace detail { 29 | 30 | #if !defined(ASIO_ENABLE_OLD_SSL) 31 | 32 | class handshake_op 33 | { 34 | public: 35 | handshake_op(stream_base::handshake_type type) 36 | : type_(type) 37 | { 38 | } 39 | 40 | engine::want operator()(engine& eng, 41 | asio::error_code& ec, 42 | std::size_t& bytes_transferred) const 43 | { 44 | bytes_transferred = 0; 45 | return eng.handshake(type_, ec); 46 | } 47 | 48 | template 49 | void call_handler(Handler& handler, 50 | const asio::error_code& ec, 51 | const std::size_t&) const 52 | { 53 | handler(ec); 54 | } 55 | 56 | private: 57 | stream_base::handshake_type type_; 58 | }; 59 | 60 | #endif // !defined(ASIO_ENABLE_OLD_SSL) 61 | 62 | } // namespace detail 63 | } // namespace ssl 64 | } // namespace asio 65 | 66 | #include "asio/detail/pop_options.hpp" 67 | 68 | #endif // ASIO_SSL_DETAIL_HANDSHAKE_OP_HPP 69 | -------------------------------------------------------------------------------- /third_party/asio/asio/include/asio/ssl/detail/openssl_types.hpp: -------------------------------------------------------------------------------- 1 | // 2 | // ssl/detail/openssl_types.hpp 3 | // ~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 4 | // 5 | // Copyright (c) 2003-2015 Christopher M. Kohlhoff (chris at kohlhoff dot com) 6 | // 7 | // Distributed under the Boost Software License, Version 1.0. (See accompanying 8 | // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) 9 | // 10 | 11 | #ifndef ASIO_SSL_DETAIL_OPENSSL_TYPES_HPP 12 | #define ASIO_SSL_DETAIL_OPENSSL_TYPES_HPP 13 | 14 | #if defined(_MSC_VER) && (_MSC_VER >= 1200) 15 | # pragma once 16 | #endif // defined(_MSC_VER) && (_MSC_VER >= 1200) 17 | 18 | #include "asio/detail/config.hpp" 19 | #include 20 | #include 21 | #if !defined(OPENSSL_NO_ENGINE) 22 | # include 23 | #endif // !defined(OPENSSL_NO_ENGINE) 24 | #include 25 | #include 26 | #include "asio/detail/socket_types.hpp" 27 | 28 | #endif // ASIO_SSL_DETAIL_OPENSSL_TYPES_HPP 29 | -------------------------------------------------------------------------------- /third_party/asio/asio/include/asio/ssl/detail/shutdown_op.hpp: -------------------------------------------------------------------------------- 1 | // 2 | // ssl/detail/shutdown_op.hpp 3 | // ~~~~~~~~~~~~~~~~~~~~~~~~~~ 4 | // 5 | // Copyright (c) 2003-2015 Christopher M. Kohlhoff (chris at kohlhoff dot com) 6 | // 7 | // Distributed under the Boost Software License, Version 1.0. (See accompanying 8 | // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) 9 | // 10 | 11 | #ifndef ASIO_SSL_DETAIL_SHUTDOWN_OP_HPP 12 | #define ASIO_SSL_DETAIL_SHUTDOWN_OP_HPP 13 | 14 | #if defined(_MSC_VER) && (_MSC_VER >= 1200) 15 | # pragma once 16 | #endif // defined(_MSC_VER) && (_MSC_VER >= 1200) 17 | 18 | #include "asio/detail/config.hpp" 19 | 20 | #if !defined(ASIO_ENABLE_OLD_SSL) 21 | # include "asio/ssl/detail/engine.hpp" 22 | #endif // !defined(ASIO_ENABLE_OLD_SSL) 23 | 24 | #include "asio/detail/push_options.hpp" 25 | 26 | namespace asio { 27 | namespace ssl { 28 | namespace detail { 29 | 30 | #if !defined(ASIO_ENABLE_OLD_SSL) 31 | 32 | class shutdown_op 33 | { 34 | public: 35 | engine::want operator()(engine& eng, 36 | asio::error_code& ec, 37 | std::size_t& bytes_transferred) const 38 | { 39 | bytes_transferred = 0; 40 | return eng.shutdown(ec); 41 | } 42 | 43 | template 44 | void call_handler(Handler& handler, 45 | const asio::error_code& ec, 46 | const std::size_t&) const 47 | { 48 | handler(ec); 49 | } 50 | }; 51 | 52 | #endif // !defined(ASIO_ENABLE_OLD_SSL) 53 | 54 | } // namespace detail 55 | } // namespace ssl 56 | } // namespace asio 57 | 58 | #include "asio/detail/pop_options.hpp" 59 | 60 | #endif // ASIO_SSL_DETAIL_SHUTDOWN_OP_HPP 61 | -------------------------------------------------------------------------------- /third_party/asio/asio/include/asio/ssl/detail/verify_callback.hpp: -------------------------------------------------------------------------------- 1 | // 2 | // ssl/detail/verify_callback.hpp 3 | // ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 4 | // 5 | // Copyright (c) 2003-2015 Christopher M. Kohlhoff (chris at kohlhoff dot com) 6 | // 7 | // Distributed under the Boost Software License, Version 1.0. (See accompanying 8 | // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) 9 | // 10 | 11 | #ifndef ASIO_SSL_DETAIL_VERIFY_CALLBACK_HPP 12 | #define ASIO_SSL_DETAIL_VERIFY_CALLBACK_HPP 13 | 14 | #if defined(_MSC_VER) && (_MSC_VER >= 1200) 15 | # pragma once 16 | #endif // defined(_MSC_VER) && (_MSC_VER >= 1200) 17 | 18 | #include "asio/detail/config.hpp" 19 | 20 | #if !defined(ASIO_ENABLE_OLD_SSL) 21 | # include "asio/ssl/verify_context.hpp" 22 | #endif // !defined(ASIO_ENABLE_OLD_SSL) 23 | 24 | #include "asio/detail/push_options.hpp" 25 | 26 | namespace asio { 27 | namespace ssl { 28 | namespace detail { 29 | 30 | #if !defined(ASIO_ENABLE_OLD_SSL) 31 | 32 | class verify_callback_base 33 | { 34 | public: 35 | virtual ~verify_callback_base() 36 | { 37 | } 38 | 39 | virtual bool call(bool preverified, verify_context& ctx) = 0; 40 | }; 41 | 42 | template 43 | class verify_callback : public verify_callback_base 44 | { 45 | public: 46 | explicit verify_callback(VerifyCallback callback) 47 | : callback_(callback) 48 | { 49 | } 50 | 51 | virtual bool call(bool preverified, verify_context& ctx) 52 | { 53 | return callback_(preverified, ctx); 54 | } 55 | 56 | private: 57 | VerifyCallback callback_; 58 | }; 59 | 60 | #endif // !defined(ASIO_ENABLE_OLD_SSL) 61 | 62 | } // namespace detail 63 | } // namespace ssl 64 | } // namespace asio 65 | 66 | #include "asio/detail/pop_options.hpp" 67 | 68 | #endif // ASIO_SSL_DETAIL_VERIFY_CALLBACK_HPP 69 | -------------------------------------------------------------------------------- /third_party/asio/asio/include/asio/ssl/error.hpp: -------------------------------------------------------------------------------- 1 | // 2 | // ssl/error.hpp 3 | // ~~~~~~~~~~~~~ 4 | // 5 | // Copyright (c) 2003-2015 Christopher M. Kohlhoff (chris at kohlhoff dot com) 6 | // 7 | // Distributed under the Boost Software License, Version 1.0. (See accompanying 8 | // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) 9 | // 10 | 11 | #ifndef ASIO_SSL_ERROR_HPP 12 | #define ASIO_SSL_ERROR_HPP 13 | 14 | #if defined(_MSC_VER) && (_MSC_VER >= 1200) 15 | # pragma once 16 | #endif // defined(_MSC_VER) && (_MSC_VER >= 1200) 17 | 18 | #include "asio/detail/config.hpp" 19 | #include "asio/error_code.hpp" 20 | 21 | #include "asio/detail/push_options.hpp" 22 | 23 | namespace asio { 24 | namespace error { 25 | 26 | enum ssl_errors 27 | { 28 | }; 29 | 30 | extern ASIO_DECL 31 | const asio::error_category& get_ssl_category(); 32 | 33 | static const asio::error_category& ssl_category 34 | = asio::error::get_ssl_category(); 35 | 36 | } // namespace error 37 | } // namespace asio 38 | 39 | #if defined(ASIO_HAS_STD_SYSTEM_ERROR) 40 | namespace std { 41 | 42 | template<> struct is_error_code_enum 43 | { 44 | static const bool value = true; 45 | }; 46 | 47 | } // namespace std 48 | #endif // defined(ASIO_HAS_STD_SYSTEM_ERROR) 49 | 50 | namespace asio { 51 | namespace error { 52 | 53 | inline asio::error_code make_error_code(ssl_errors e) 54 | { 55 | return asio::error_code( 56 | static_cast(e), get_ssl_category()); 57 | } 58 | 59 | } // namespace error 60 | } // namespace asio 61 | 62 | #include "asio/detail/pop_options.hpp" 63 | 64 | #if defined(ASIO_HEADER_ONLY) 65 | # include "asio/ssl/impl/error.ipp" 66 | #endif // defined(ASIO_HEADER_ONLY) 67 | 68 | #endif // ASIO_SSL_ERROR_HPP 69 | -------------------------------------------------------------------------------- /third_party/asio/asio/include/asio/ssl/impl/error.ipp: -------------------------------------------------------------------------------- 1 | // 2 | // ssl/impl/error.ipp 3 | // ~~~~~~~~~~~~~~~~~~ 4 | // 5 | // Copyright (c) 2003-2015 Christopher M. Kohlhoff (chris at kohlhoff dot com) 6 | // 7 | // Distributed under the Boost Software License, Version 1.0. (See accompanying 8 | // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) 9 | // 10 | 11 | #ifndef ASIO_SSL_IMPL_ERROR_IPP 12 | #define ASIO_SSL_IMPL_ERROR_IPP 13 | 14 | #if defined(_MSC_VER) && (_MSC_VER >= 1200) 15 | # pragma once 16 | #endif // defined(_MSC_VER) && (_MSC_VER >= 1200) 17 | 18 | #include "asio/detail/config.hpp" 19 | #include "asio/ssl/error.hpp" 20 | #include "asio/ssl/detail/openssl_init.hpp" 21 | 22 | #include "asio/detail/push_options.hpp" 23 | 24 | namespace asio { 25 | namespace error { 26 | 27 | namespace detail { 28 | 29 | class ssl_category : public asio::error_category 30 | { 31 | public: 32 | const char* name() const ASIO_ERROR_CATEGORY_NOEXCEPT 33 | { 34 | return "asio.ssl"; 35 | } 36 | 37 | std::string message(int value) const 38 | { 39 | const char* s = ::ERR_reason_error_string(value); 40 | return s ? s : "asio.ssl error"; 41 | } 42 | }; 43 | 44 | } // namespace detail 45 | 46 | const asio::error_category& get_ssl_category() 47 | { 48 | static detail::ssl_category instance; 49 | return instance; 50 | } 51 | 52 | } // namespace error 53 | } // namespace asio 54 | 55 | #include "asio/detail/pop_options.hpp" 56 | 57 | #endif // ASIO_SSL_IMPL_ERROR_IPP 58 | -------------------------------------------------------------------------------- /third_party/asio/asio/include/asio/ssl/impl/src.hpp: -------------------------------------------------------------------------------- 1 | // 2 | // impl/ssl/src.hpp 3 | // ~~~~~~~~~~~~~~~~ 4 | // 5 | // Copyright (c) 2003-2015 Christopher M. Kohlhoff (chris at kohlhoff dot com) 6 | // 7 | // Distributed under the Boost Software License, Version 1.0. (See accompanying 8 | // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) 9 | // 10 | 11 | #ifndef ASIO_SSL_IMPL_SRC_HPP 12 | #define ASIO_SSL_IMPL_SRC_HPP 13 | 14 | #define ASIO_SOURCE 15 | 16 | #include "asio/detail/config.hpp" 17 | 18 | #if defined(ASIO_HEADER_ONLY) 19 | # error Do not compile Asio library source with ASIO_HEADER_ONLY defined 20 | #endif 21 | 22 | #include "asio/ssl/impl/context.ipp" 23 | #include "asio/ssl/impl/error.ipp" 24 | #include "asio/ssl/detail/impl/engine.ipp" 25 | #include "asio/ssl/detail/impl/openssl_init.ipp" 26 | #include "asio/ssl/impl/rfc2818_verification.ipp" 27 | 28 | #endif // ASIO_SSL_IMPL_SRC_HPP 29 | -------------------------------------------------------------------------------- /third_party/asio/asio/include/asio/ssl/stream_base.hpp: -------------------------------------------------------------------------------- 1 | // 2 | // ssl/stream_base.hpp 3 | // ~~~~~~~~~~~~~~~~~~~ 4 | // 5 | // Copyright (c) 2003-2015 Christopher M. Kohlhoff (chris at kohlhoff dot com) 6 | // 7 | // Distributed under the Boost Software License, Version 1.0. (See accompanying 8 | // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) 9 | // 10 | 11 | #ifndef ASIO_SSL_STREAM_BASE_HPP 12 | #define ASIO_SSL_STREAM_BASE_HPP 13 | 14 | #if defined(_MSC_VER) && (_MSC_VER >= 1200) 15 | # pragma once 16 | #endif // defined(_MSC_VER) && (_MSC_VER >= 1200) 17 | 18 | #include "asio/detail/config.hpp" 19 | 20 | #include "asio/detail/push_options.hpp" 21 | 22 | namespace asio { 23 | namespace ssl { 24 | 25 | /// The stream_base class is used as a base for the asio::ssl::stream 26 | /// class template so that we have a common place to define various enums. 27 | class stream_base 28 | { 29 | public: 30 | /// Different handshake types. 31 | enum handshake_type 32 | { 33 | /// Perform handshaking as a client. 34 | client, 35 | 36 | /// Perform handshaking as a server. 37 | server 38 | }; 39 | 40 | protected: 41 | /// Protected destructor to prevent deletion through this type. 42 | ~stream_base() 43 | { 44 | } 45 | }; 46 | 47 | } // namespace ssl 48 | } // namespace asio 49 | 50 | #include "asio/detail/pop_options.hpp" 51 | 52 | #endif // ASIO_SSL_STREAM_BASE_HPP 53 | -------------------------------------------------------------------------------- /third_party/asio/asio/include/asio/ssl/stream_service.hpp: -------------------------------------------------------------------------------- 1 | // 2 | // ssl/stream_service.hpp 3 | // ~~~~~~~~~~~~~~~~~~~~~~ 4 | // 5 | // Copyright (c) 2003-2015 Christopher M. Kohlhoff (chris at kohlhoff dot com) 6 | // 7 | // Distributed under the Boost Software License, Version 1.0. (See accompanying 8 | // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) 9 | // 10 | 11 | #ifndef ASIO_SSL_STREAM_SERVICE_HPP 12 | #define ASIO_SSL_STREAM_SERVICE_HPP 13 | 14 | #if defined(_MSC_VER) && (_MSC_VER >= 1200) 15 | # pragma once 16 | #endif // defined(_MSC_VER) && (_MSC_VER >= 1200) 17 | 18 | #include "asio/detail/config.hpp" 19 | 20 | #if defined(ASIO_ENABLE_OLD_SSL) 21 | # include "asio/ssl/old/stream_service.hpp" 22 | #endif // defined(ASIO_ENABLE_OLD_SSL) 23 | 24 | #include "asio/detail/push_options.hpp" 25 | 26 | namespace asio { 27 | namespace ssl { 28 | 29 | #if defined(ASIO_ENABLE_OLD_SSL) 30 | 31 | using asio::ssl::old::stream_service; 32 | 33 | #endif // defined(ASIO_ENABLE_OLD_SSL) 34 | 35 | } // namespace ssl 36 | } // namespace asio 37 | 38 | #include "asio/detail/pop_options.hpp" 39 | 40 | #endif // ASIO_SSL_STREAM_SERVICE_HPP 41 | -------------------------------------------------------------------------------- /third_party/asio/asio/include/asio/streambuf.hpp: -------------------------------------------------------------------------------- 1 | // 2 | // streambuf.hpp 3 | // ~~~~~~~~~~~~~ 4 | // 5 | // Copyright (c) 2003-2015 Christopher M. Kohlhoff (chris at kohlhoff dot com) 6 | // 7 | // Distributed under the Boost Software License, Version 1.0. (See accompanying 8 | // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) 9 | // 10 | 11 | #ifndef ASIO_STREAMBUF_HPP 12 | #define ASIO_STREAMBUF_HPP 13 | 14 | #if defined(_MSC_VER) && (_MSC_VER >= 1200) 15 | # pragma once 16 | #endif // defined(_MSC_VER) && (_MSC_VER >= 1200) 17 | 18 | #include "asio/detail/config.hpp" 19 | 20 | #if !defined(ASIO_NO_IOSTREAM) 21 | 22 | #include "asio/basic_streambuf.hpp" 23 | 24 | namespace asio { 25 | 26 | /// Typedef for the typical usage of basic_streambuf. 27 | typedef basic_streambuf<> streambuf; 28 | 29 | } // namespace asio 30 | 31 | #endif // !defined(ASIO_NO_IOSTREAM) 32 | 33 | #endif // ASIO_STREAMBUF_HPP 34 | -------------------------------------------------------------------------------- /third_party/asio/asio/include/asio/unyield.hpp: -------------------------------------------------------------------------------- 1 | // 2 | // unyield.hpp 3 | // ~~~~~~~~~~~ 4 | // 5 | // Copyright (c) 2003-2015 Christopher M. Kohlhoff (chris at kohlhoff dot com) 6 | // 7 | // Distributed under the Boost Software License, Version 1.0. (See accompanying 8 | // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) 9 | // 10 | 11 | #ifdef reenter 12 | # undef reenter 13 | #endif 14 | 15 | #ifdef yield 16 | # undef yield 17 | #endif 18 | 19 | #ifdef fork 20 | # undef fork 21 | #endif 22 | -------------------------------------------------------------------------------- /third_party/asio/asio/include/asio/version.hpp: -------------------------------------------------------------------------------- 1 | // 2 | // version.hpp 3 | // ~~~~~~~~~~~ 4 | // 5 | // Copyright (c) 2003-2015 Christopher M. Kohlhoff (chris at kohlhoff dot com) 6 | // 7 | // Distributed under the Boost Software License, Version 1.0. (See accompanying 8 | // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) 9 | // 10 | 11 | #ifndef ASIO_VERSION_HPP 12 | #define ASIO_VERSION_HPP 13 | 14 | #if defined(_MSC_VER) && (_MSC_VER >= 1200) 15 | # pragma once 16 | #endif // defined(_MSC_VER) && (_MSC_VER >= 1200) 17 | 18 | // ASIO_VERSION % 100 is the sub-minor version 19 | // ASIO_VERSION / 100 % 1000 is the minor version 20 | // ASIO_VERSION / 100000 is the major version 21 | #define ASIO_VERSION 101006 // 1.10.6 22 | 23 | #endif // ASIO_VERSION_HPP 24 | -------------------------------------------------------------------------------- /third_party/asio/asio/include/asio/wait_traits.hpp: -------------------------------------------------------------------------------- 1 | // 2 | // wait_traits.hpp 3 | // ~~~~~~~~~~~~~~~ 4 | // 5 | // Copyright (c) 2003-2015 Christopher M. Kohlhoff (chris at kohlhoff dot com) 6 | // 7 | // Distributed under the Boost Software License, Version 1.0. (See accompanying 8 | // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) 9 | // 10 | 11 | #ifndef ASIO_WAIT_TRAITS_HPP 12 | #define ASIO_WAIT_TRAITS_HPP 13 | 14 | #if defined(_MSC_VER) && (_MSC_VER >= 1200) 15 | # pragma once 16 | #endif // defined(_MSC_VER) && (_MSC_VER >= 1200) 17 | 18 | #include "asio/detail/push_options.hpp" 19 | 20 | namespace asio { 21 | 22 | /// Wait traits suitable for use with the basic_waitable_timer class template. 23 | template 24 | struct wait_traits 25 | { 26 | /// Convert a clock duration into a duration used for waiting. 27 | /** 28 | * @returns @c d. 29 | */ 30 | static typename Clock::duration to_wait_duration( 31 | const typename Clock::duration& d) 32 | { 33 | return d; 34 | } 35 | }; 36 | 37 | } // namespace asio 38 | 39 | #include "asio/detail/pop_options.hpp" 40 | 41 | #endif // ASIO_WAIT_TRAITS_HPP 42 | -------------------------------------------------------------------------------- /third_party/asio/asio/include/asio/windows/object_handle.hpp: -------------------------------------------------------------------------------- 1 | // 2 | // windows/object_handle.hpp 3 | // ~~~~~~~~~~~~~~~~~~~~~~~~~ 4 | // 5 | // Copyright (c) 2003-2015 Christopher M. Kohlhoff (chris at kohlhoff dot com) 6 | // Copyright (c) 2011 Boris Schaeling (boris@highscore.de) 7 | // 8 | // Distributed under the Boost Software License, Version 1.0. (See accompanying 9 | // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) 10 | // 11 | 12 | #ifndef ASIO_WINDOWS_OBJECT_HANDLE_HPP 13 | #define ASIO_WINDOWS_OBJECT_HANDLE_HPP 14 | 15 | #if defined(_MSC_VER) && (_MSC_VER >= 1200) 16 | # pragma once 17 | #endif // defined(_MSC_VER) && (_MSC_VER >= 1200) 18 | 19 | #include "asio/detail/config.hpp" 20 | 21 | #if defined(ASIO_HAS_WINDOWS_OBJECT_HANDLE) \ 22 | || defined(GENERATING_DOCUMENTATION) 23 | 24 | #include "asio/windows/basic_object_handle.hpp" 25 | 26 | namespace asio { 27 | namespace windows { 28 | 29 | /// Typedef for the typical usage of an object handle. 30 | typedef basic_object_handle<> object_handle; 31 | 32 | } // namespace windows 33 | } // namespace asio 34 | 35 | #endif // defined(ASIO_HAS_WINDOWS_OBJECT_HANDLE) 36 | // || defined(GENERATING_DOCUMENTATION) 37 | 38 | #endif // ASIO_WINDOWS_OBJECT_HANDLE_HPP 39 | -------------------------------------------------------------------------------- /third_party/asio/asio/include/asio/windows/random_access_handle.hpp: -------------------------------------------------------------------------------- 1 | // 2 | // windows/random_access_handle.hpp 3 | // ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 4 | // 5 | // Copyright (c) 2003-2015 Christopher M. Kohlhoff (chris at kohlhoff dot com) 6 | // 7 | // Distributed under the Boost Software License, Version 1.0. (See accompanying 8 | // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) 9 | // 10 | 11 | #ifndef ASIO_WINDOWS_RANDOM_ACCESS_HANDLE_HPP 12 | #define ASIO_WINDOWS_RANDOM_ACCESS_HANDLE_HPP 13 | 14 | #if defined(_MSC_VER) && (_MSC_VER >= 1200) 15 | # pragma once 16 | #endif // defined(_MSC_VER) && (_MSC_VER >= 1200) 17 | 18 | #include "asio/detail/config.hpp" 19 | 20 | #if defined(ASIO_HAS_WINDOWS_RANDOM_ACCESS_HANDLE) \ 21 | || defined(GENERATING_DOCUMENTATION) 22 | 23 | #include "asio/windows/basic_random_access_handle.hpp" 24 | 25 | namespace asio { 26 | namespace windows { 27 | 28 | /// Typedef for the typical usage of a random-access handle. 29 | typedef basic_random_access_handle<> random_access_handle; 30 | 31 | } // namespace windows 32 | } // namespace asio 33 | 34 | #endif // defined(ASIO_HAS_WINDOWS_RANDOM_ACCESS_HANDLE) 35 | // || defined(GENERATING_DOCUMENTATION) 36 | 37 | #endif // ASIO_WINDOWS_RANDOM_ACCESS_HANDLE_HPP 38 | -------------------------------------------------------------------------------- /third_party/asio/asio/include/asio/windows/stream_handle.hpp: -------------------------------------------------------------------------------- 1 | // 2 | // windows/stream_handle.hpp 3 | // ~~~~~~~~~~~~~~~~~~~~~~~~~ 4 | // 5 | // Copyright (c) 2003-2015 Christopher M. Kohlhoff (chris at kohlhoff dot com) 6 | // 7 | // Distributed under the Boost Software License, Version 1.0. (See accompanying 8 | // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) 9 | // 10 | 11 | #ifndef ASIO_WINDOWS_STREAM_HANDLE_HPP 12 | #define ASIO_WINDOWS_STREAM_HANDLE_HPP 13 | 14 | #if defined(_MSC_VER) && (_MSC_VER >= 1200) 15 | # pragma once 16 | #endif // defined(_MSC_VER) && (_MSC_VER >= 1200) 17 | 18 | #include "asio/detail/config.hpp" 19 | 20 | #if defined(ASIO_HAS_WINDOWS_STREAM_HANDLE) \ 21 | || defined(GENERATING_DOCUMENTATION) 22 | 23 | #include "asio/windows/basic_stream_handle.hpp" 24 | 25 | namespace asio { 26 | namespace windows { 27 | 28 | /// Typedef for the typical usage of a stream-oriented handle. 29 | typedef basic_stream_handle<> stream_handle; 30 | 31 | } // namespace windows 32 | } // namespace asio 33 | 34 | #endif // defined(ASIO_HAS_WINDOWS_STREAM_HANDLE) 35 | // || defined(GENERATING_DOCUMENTATION) 36 | 37 | #endif // ASIO_WINDOWS_STREAM_HANDLE_HPP 38 | -------------------------------------------------------------------------------- /third_party/asio/asio/include/asio/yield.hpp: -------------------------------------------------------------------------------- 1 | // 2 | // yield.hpp 3 | // ~~~~~~~~~ 4 | // 5 | // Copyright (c) 2003-2015 Christopher M. Kohlhoff (chris at kohlhoff dot com) 6 | // 7 | // Distributed under the Boost Software License, Version 1.0. (See accompanying 8 | // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) 9 | // 10 | 11 | #include "coroutine.hpp" 12 | 13 | #ifndef reenter 14 | # define reenter(c) ASIO_CORO_REENTER(c) 15 | #endif 16 | 17 | #ifndef yield 18 | # define yield ASIO_CORO_YIELD 19 | #endif 20 | 21 | #ifndef fork 22 | # define fork ASIO_CORO_FORK 23 | #endif 24 | -------------------------------------------------------------------------------- /third_party/googletest/.gitignore: -------------------------------------------------------------------------------- 1 | # python 2 | *.pyc 3 | -------------------------------------------------------------------------------- /third_party/googletest/CONTRIBUTORS: -------------------------------------------------------------------------------- 1 | # This file contains a list of people who've made non-trivial 2 | # contribution to the Google C++ Testing Framework project. People 3 | # who commit code to the project are encouraged to add their names 4 | # here. Please keep the list sorted by first names. 5 | 6 | Ajay Joshi 7 | Balázs Dán 8 | Bharat Mediratta 9 | Chandler Carruth 10 | Chris Prince 11 | Chris Taylor 12 | Dan Egnor 13 | Eric Roman 14 | Hady Zalek 15 | Jeffrey Yasskin 16 | Jói Sigurðsson 17 | Keir Mierle 18 | Keith Ray 19 | Kenton Varda 20 | Manuel Klimek 21 | Markus Heule 22 | Mika Raento 23 | Miklós Fazekas 24 | Pasi Valminen 25 | Patrick Hanna 26 | Patrick Riley 27 | Peter Kaminski 28 | Preston Jackson 29 | Rainer Klaffenboeck 30 | Russ Cox 31 | Russ Rufer 32 | Sean Mcafee 33 | Sigurður Ásgeirsson 34 | Tracy Bialik 35 | Vadim Berman 36 | Vlad Losev 37 | Zhanyong Wan 38 | -------------------------------------------------------------------------------- /third_party/googletest/LICENSE: -------------------------------------------------------------------------------- 1 | Copyright 2008, Google Inc. 2 | All rights reserved. 3 | 4 | Redistribution and use in source and binary forms, with or without 5 | modification, are permitted provided that the following conditions are 6 | met: 7 | 8 | * Redistributions of source code must retain the above copyright 9 | notice, this list of conditions and the following disclaimer. 10 | * Redistributions in binary form must reproduce the above 11 | copyright notice, this list of conditions and the following disclaimer 12 | in the documentation and/or other materials provided with the 13 | distribution. 14 | * Neither the name of Google Inc. nor the names of its 15 | contributors may be used to endorse or promote products derived from 16 | this software without specific prior written permission. 17 | 18 | THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 19 | "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 20 | LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 21 | A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT 22 | OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 23 | SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 24 | LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 25 | DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 26 | THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 27 | (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 28 | OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 29 | -------------------------------------------------------------------------------- /third_party/googletest/build-aux/.keep: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/satoren/LRDB/345fd485083e1b62135a145b3bb4041b47b55a55/third_party/googletest/build-aux/.keep -------------------------------------------------------------------------------- /third_party/googletest/docs/Documentation.md: -------------------------------------------------------------------------------- 1 | This page lists all documentation wiki pages for Google Test **(the SVN trunk version)** 2 | -- **if you use a released version of Google Test, please read the 3 | documentation for that specific version instead.** 4 | 5 | * [Primer](Primer.md) -- start here if you are new to Google Test. 6 | * [Samples](Samples.md) -- learn from examples. 7 | * [AdvancedGuide](AdvancedGuide.md) -- learn more about Google Test. 8 | * [XcodeGuide](XcodeGuide.md) -- how to use Google Test in Xcode on Mac. 9 | * [Frequently-Asked Questions](FAQ.md) -- check here before asking a question on the mailing list. 10 | 11 | To contribute code to Google Test, read: 12 | 13 | * [DevGuide](DevGuide.md) -- read this _before_ writing your first patch. 14 | * [PumpManual](PumpManual.md) -- how we generate some of Google Test's source files. -------------------------------------------------------------------------------- /third_party/googletest/docs/Samples.md: -------------------------------------------------------------------------------- 1 | If you're like us, you'd like to look at some Google Test sample code. The 2 | [samples folder](../samples) has a number of well-commented samples showing how to use a 3 | variety of Google Test features. 4 | 5 | * [Sample #1](../samples/sample1_unittest.cc) shows the basic steps of using Google Test to test C++ functions. 6 | * [Sample #2](../samples/sample2_unittest.cc) shows a more complex unit test for a class with multiple member functions. 7 | * [Sample #3](../samples/sample3_unittest.cc) uses a test fixture. 8 | * [Sample #4](../samples/sample4_unittest.cc) is another basic example of using Google Test. 9 | * [Sample #5](../samples/sample5_unittest.cc) teaches how to reuse a test fixture in multiple test cases by deriving sub-fixtures from it. 10 | * [Sample #6](../samples/sample6_unittest.cc) demonstrates type-parameterized tests. 11 | * [Sample #7](../samples/sample7_unittest.cc) teaches the basics of value-parameterized tests. 12 | * [Sample #8](../samples/sample8_unittest.cc) shows using `Combine()` in value-parameterized tests. 13 | * [Sample #9](../samples/sample9_unittest.cc) shows use of the listener API to modify Google Test's console output and the use of its reflection API to inspect test results. 14 | * [Sample #10](../samples/sample10_unittest.cc) shows use of the listener API to implement a primitive memory leak checker. 15 | -------------------------------------------------------------------------------- /third_party/googletest/docs/V1_5_Documentation.md: -------------------------------------------------------------------------------- 1 | This page lists all official documentation wiki pages for Google Test **1.5.0** -- **if you use a different version of Google Test, make sure to read the documentation for that version instead.** 2 | 3 | * [Primer](V1_5_Primer.md) -- start here if you are new to Google Test. 4 | * [Samples](Samples.md) -- learn from examples. 5 | * [AdvancedGuide](V1_5_AdvancedGuide.md) -- learn more about Google Test. 6 | * [XcodeGuide](V1_5_XcodeGuide.md) -- how to use Google Test in Xcode on Mac. 7 | * [Frequently-Asked Questions](V1_5_FAQ.md) -- check here before asking a question on the mailing list. 8 | 9 | To contribute code to Google Test, read: 10 | 11 | * DevGuide -- read this _before_ writing your first patch. 12 | * [PumpManual](V1_5_PumpManual.md) -- how we generate some of Google Test's source files. -------------------------------------------------------------------------------- /third_party/googletest/docs/V1_6_Documentation.md: -------------------------------------------------------------------------------- 1 | This page lists all documentation wiki pages for Google Test **1.6** 2 | -- **if you use a released version of Google Test, please read the 3 | documentation for that specific version instead.** 4 | 5 | * [Primer](V1_6_Primer.md) -- start here if you are new to Google Test. 6 | * [Samples](V1_6_Samples.md) -- learn from examples. 7 | * [AdvancedGuide](V1_6_AdvancedGuide.md) -- learn more about Google Test. 8 | * [XcodeGuide](V1_6_XcodeGuide.md) -- how to use Google Test in Xcode on Mac. 9 | * [Frequently-Asked Questions](V1_6_FAQ.md) -- check here before asking a question on the mailing list. 10 | 11 | To contribute code to Google Test, read: 12 | 13 | * [DevGuide](DevGuide.md) -- read this _before_ writing your first patch. 14 | * [PumpManual](V1_6_PumpManual.md) -- how we generate some of Google Test's source files. -------------------------------------------------------------------------------- /third_party/googletest/docs/V1_6_Samples.md: -------------------------------------------------------------------------------- 1 | If you're like us, you'd like to look at some Google Test sample code. The 2 | [samples folder](../samples) has a number of well-commented samples showing how to use a 3 | variety of Google Test features. 4 | 5 | * [Sample #1](../samples/sample1_unittest.cc) shows the basic steps of using Google Test to test C++ functions. 6 | * [Sample #2](../samples/sample2_unittest.cc) shows a more complex unit test for a class with multiple member functions. 7 | * [Sample #3](../samples/sample3_unittest.cc) uses a test fixture. 8 | * [Sample #4](../samples/sample4_unittest.cc) is another basic example of using Google Test. 9 | * [Sample #5](../samples/sample5_unittest.cc) teaches how to reuse a test fixture in multiple test cases by deriving sub-fixtures from it. 10 | * [Sample #6](../samples/sample6_unittest.cc) demonstrates type-parameterized tests. 11 | * [Sample #7](../samples/sample7_unittest.cc) teaches the basics of value-parameterized tests. 12 | * [Sample #8](../samples/sample8_unittest.cc) shows using `Combine()` in value-parameterized tests. 13 | * [Sample #9](../samples/sample9_unittest.cc) shows use of the listener API to modify Google Test's console output and the use of its reflection API to inspect test results. 14 | * [Sample #10](../samples/sample10_unittest.cc) shows use of the listener API to implement a primitive memory leak checker. 15 | -------------------------------------------------------------------------------- /third_party/googletest/docs/V1_7_Documentation.md: -------------------------------------------------------------------------------- 1 | This page lists all documentation wiki pages for Google Test **(the SVN trunk version)** 2 | -- **if you use a released version of Google Test, please read the 3 | documentation for that specific version instead.** 4 | 5 | * [Primer](V1_7_Primer.md) -- start here if you are new to Google Test. 6 | * [Samples](V1_7_Samples.md) -- learn from examples. 7 | * [AdvancedGuide](V1_7_AdvancedGuide.md) -- learn more about Google Test. 8 | * [XcodeGuide](V1_7_XcodeGuide.md) -- how to use Google Test in Xcode on Mac. 9 | * [Frequently-Asked Questions](V1_7_FAQ.md) -- check here before asking a question on the mailing list. 10 | 11 | To contribute code to Google Test, read: 12 | 13 | * [DevGuide](DevGuide.md) -- read this _before_ writing your first patch. 14 | * [PumpManual](V1_7_PumpManual.md) -- how we generate some of Google Test's source files. -------------------------------------------------------------------------------- /third_party/googletest/docs/V1_7_Samples.md: -------------------------------------------------------------------------------- 1 | If you're like us, you'd like to look at some Google Test sample code. The 2 | [samples folder](../samples) has a number of well-commented samples showing how to use a 3 | variety of Google Test features. 4 | 5 | * [Sample #1](../samples/sample1_unittest.cc) shows the basic steps of using Google Test to test C++ functions. 6 | * [Sample #2](../samples/sample2_unittest.cc) shows a more complex unit test for a class with multiple member functions. 7 | * [Sample #3](../samples/sample3_unittest.cc) uses a test fixture. 8 | * [Sample #4](../samples/sample4_unittest.cc) is another basic example of using Google Test. 9 | * [Sample #5](../samples/sample5_unittest.cc) teaches how to reuse a test fixture in multiple test cases by deriving sub-fixtures from it. 10 | * [Sample #6](../samples/sample6_unittest.cc) demonstrates type-parameterized tests. 11 | * [Sample #7](../samples/sample7_unittest.cc) teaches the basics of value-parameterized tests. 12 | * [Sample #8](../samples/sample8_unittest.cc) shows using `Combine()` in value-parameterized tests. 13 | * [Sample #9](../samples/sample9_unittest.cc) shows use of the listener API to modify Google Test's console output and the use of its reflection API to inspect test results. 14 | * [Sample #10](../samples/sample10_unittest.cc) shows use of the listener API to implement a primitive memory leak checker. 15 | -------------------------------------------------------------------------------- /third_party/googletest/test/production.cc: -------------------------------------------------------------------------------- 1 | // Copyright 2006, Google Inc. 2 | // All rights reserved. 3 | // 4 | // Redistribution and use in source and binary forms, with or without 5 | // modification, are permitted provided that the following conditions are 6 | // met: 7 | // 8 | // * Redistributions of source code must retain the above copyright 9 | // notice, this list of conditions and the following disclaimer. 10 | // * Redistributions in binary form must reproduce the above 11 | // copyright notice, this list of conditions and the following disclaimer 12 | // in the documentation and/or other materials provided with the 13 | // distribution. 14 | // * Neither the name of Google Inc. nor the names of its 15 | // contributors may be used to endorse or promote products derived from 16 | // this software without specific prior written permission. 17 | // 18 | // THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 19 | // "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 20 | // LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 21 | // A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT 22 | // OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 23 | // SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 24 | // LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 25 | // DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 26 | // THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 27 | // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 28 | // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 29 | // 30 | // Author: wan@google.com (Zhanyong Wan) 31 | // 32 | // This is part of the unit test for include/gtest/gtest_prod.h. 33 | 34 | #include "production.h" 35 | 36 | PrivateCode::PrivateCode() : x_(0) {} 37 | -------------------------------------------------------------------------------- /third_party/googletest/xcode/Config/DebugProject.xcconfig: -------------------------------------------------------------------------------- 1 | // 2 | // DebugProject.xcconfig 3 | // 4 | // These are Debug Configuration project settings for the gtest framework and 5 | // examples. It is set in the "Based On:" dropdown in the "Project" info 6 | // dialog. 7 | // This file is based on the Xcode Configuration files in: 8 | // http://code.google.com/p/google-toolbox-for-mac/ 9 | // 10 | 11 | #include "General.xcconfig" 12 | 13 | // No optimization 14 | GCC_OPTIMIZATION_LEVEL = 0 15 | 16 | // Deployment postprocessing is what triggers Xcode to strip, turn it off 17 | DEPLOYMENT_POSTPROCESSING = NO 18 | 19 | // Dead code stripping off 20 | DEAD_CODE_STRIPPING = NO 21 | 22 | // Debug symbols should be on obviously 23 | GCC_GENERATE_DEBUGGING_SYMBOLS = YES 24 | 25 | // Define the DEBUG macro in all debug builds 26 | OTHER_CFLAGS = $(OTHER_CFLAGS) -DDEBUG=1 27 | 28 | // These are turned off to avoid STL incompatibilities with client code 29 | // // Turns on special C++ STL checks to "encourage" good STL use 30 | // GCC_PREPROCESSOR_DEFINITIONS = $(GCC_PREPROCESSOR_DEFINITIONS) _GLIBCXX_DEBUG_PEDANTIC _GLIBCXX_DEBUG _GLIBCPP_CONCEPT_CHECKS 31 | -------------------------------------------------------------------------------- /third_party/googletest/xcode/Config/FrameworkTarget.xcconfig: -------------------------------------------------------------------------------- 1 | // 2 | // FrameworkTarget.xcconfig 3 | // 4 | // These are Framework target settings for the gtest framework and examples. It 5 | // is set in the "Based On:" dropdown in the "Target" info dialog. 6 | // This file is based on the Xcode Configuration files in: 7 | // http://code.google.com/p/google-toolbox-for-mac/ 8 | // 9 | 10 | // Dynamic libs need to be position independent 11 | GCC_DYNAMIC_NO_PIC = NO 12 | 13 | // Dynamic libs should not have their external symbols stripped. 14 | STRIP_STYLE = non-global 15 | 16 | // Let the user install by specifying the $DSTROOT with xcodebuild 17 | SKIP_INSTALL = NO 18 | -------------------------------------------------------------------------------- /third_party/googletest/xcode/Config/General.xcconfig: -------------------------------------------------------------------------------- 1 | // 2 | // General.xcconfig 3 | // 4 | // These are General configuration settings for the gtest framework and 5 | // examples. 6 | // This file is based on the Xcode Configuration files in: 7 | // http://code.google.com/p/google-toolbox-for-mac/ 8 | // 9 | 10 | // Build for PPC and Intel, 32- and 64-bit 11 | ARCHS = i386 x86_64 ppc ppc64 12 | 13 | // Zerolink prevents link warnings so turn it off 14 | ZERO_LINK = NO 15 | 16 | // Prebinding considered unhelpful in 10.3 and later 17 | PREBINDING = NO 18 | 19 | // Strictest warning policy 20 | WARNING_CFLAGS = -Wall -Werror -Wendif-labels -Wnewline-eof -Wno-sign-compare -Wshadow 21 | 22 | // Work around Xcode bugs by using external strip. See: 23 | // http://lists.apple.com/archives/Xcode-users/2006/Feb/msg00050.html 24 | SEPARATE_STRIP = YES 25 | 26 | // Force C99 dialect 27 | GCC_C_LANGUAGE_STANDARD = c99 28 | 29 | // not sure why apple defaults this on, but it's pretty risky 30 | ALWAYS_SEARCH_USER_PATHS = NO 31 | 32 | // Turn on position dependent code for most cases (overridden where appropriate) 33 | GCC_DYNAMIC_NO_PIC = YES 34 | 35 | // Default SDK and minimum OS version is 10.4 36 | SDKROOT = $(DEVELOPER_SDK_DIR)/MacOSX10.4u.sdk 37 | MACOSX_DEPLOYMENT_TARGET = 10.4 38 | GCC_VERSION = 4.0 39 | 40 | // VERSIONING BUILD SETTINGS (used in Info.plist) 41 | GTEST_VERSIONINFO_ABOUT = © 2008 Google Inc. 42 | -------------------------------------------------------------------------------- /third_party/googletest/xcode/Config/ReleaseProject.xcconfig: -------------------------------------------------------------------------------- 1 | // 2 | // ReleaseProject.xcconfig 3 | // 4 | // These are Release Configuration project settings for the gtest framework 5 | // and examples. It is set in the "Based On:" dropdown in the "Project" info 6 | // dialog. 7 | // This file is based on the Xcode Configuration files in: 8 | // http://code.google.com/p/google-toolbox-for-mac/ 9 | // 10 | 11 | #include "General.xcconfig" 12 | 13 | // subconfig/Release.xcconfig 14 | 15 | // Optimize for space and size (Apple recommendation) 16 | GCC_OPTIMIZATION_LEVEL = s 17 | 18 | // Deploment postprocessing is what triggers Xcode to strip 19 | DEPLOYMENT_POSTPROCESSING = YES 20 | 21 | // No symbols 22 | GCC_GENERATE_DEBUGGING_SYMBOLS = NO 23 | 24 | // Dead code strip does not affect ObjC code but can help for C 25 | DEAD_CODE_STRIPPING = YES 26 | 27 | // NDEBUG is used by things like assert.h, so define it for general compat. 28 | // ASSERT going away in release tends to create unused vars. 29 | OTHER_CFLAGS = $(OTHER_CFLAGS) -DNDEBUG=1 -Wno-unused-variable 30 | 31 | // When we strip we want to strip all symbols in release, but save externals. 32 | STRIP_STYLE = all 33 | -------------------------------------------------------------------------------- /third_party/googletest/xcode/Config/StaticLibraryTarget.xcconfig: -------------------------------------------------------------------------------- 1 | // 2 | // StaticLibraryTarget.xcconfig 3 | // 4 | // These are static library target settings for libgtest.a. It 5 | // is set in the "Based On:" dropdown in the "Target" info dialog. 6 | // This file is based on the Xcode Configuration files in: 7 | // http://code.google.com/p/google-toolbox-for-mac/ 8 | // 9 | 10 | // Static libs can be included in bundles so make them position independent 11 | GCC_DYNAMIC_NO_PIC = NO 12 | 13 | // Static libs should not have their internal globals or external symbols 14 | // stripped. 15 | STRIP_STYLE = debugging 16 | 17 | // Let the user install by specifying the $DSTROOT with xcodebuild 18 | SKIP_INSTALL = NO 19 | -------------------------------------------------------------------------------- /third_party/googletest/xcode/Config/TestTarget.xcconfig: -------------------------------------------------------------------------------- 1 | // 2 | // TestTarget.xcconfig 3 | // 4 | // These are Test target settings for the gtest framework and examples. It 5 | // is set in the "Based On:" dropdown in the "Target" info dialog. 6 | 7 | PRODUCT_NAME = $(TARGET_NAME) 8 | HEADER_SEARCH_PATHS = ../include 9 | -------------------------------------------------------------------------------- /third_party/googletest/xcode/Resources/Info.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | CFBundleDevelopmentRegion 6 | English 7 | CFBundleExecutable 8 | ${EXECUTABLE_NAME} 9 | CFBundleIconFile 10 | 11 | CFBundleIdentifier 12 | com.google.${PRODUCT_NAME} 13 | CFBundleInfoDictionaryVersion 14 | 6.0 15 | CFBundlePackageType 16 | FMWK 17 | CFBundleSignature 18 | ???? 19 | CFBundleVersion 20 | GTEST_VERSIONINFO_LONG 21 | CFBundleShortVersionString 22 | GTEST_VERSIONINFO_SHORT 23 | CFBundleGetInfoString 24 | ${PRODUCT_NAME} GTEST_VERSIONINFO_LONG, ${GTEST_VERSIONINFO_ABOUT} 25 | NSHumanReadableCopyright 26 | ${GTEST_VERSIONINFO_ABOUT} 27 | CSResourcesFileMapped 28 | 29 | 30 | 31 | -------------------------------------------------------------------------------- /third_party/googletest/xcode/Samples/FrameworkSample/Info.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | CFBundleDevelopmentRegion 6 | English 7 | CFBundleExecutable 8 | ${EXECUTABLE_NAME} 9 | CFBundleIconFile 10 | 11 | CFBundleIdentifier 12 | com.google.gtest.${PRODUCT_NAME:identifier} 13 | CFBundleInfoDictionaryVersion 14 | 6.0 15 | CFBundleName 16 | ${PRODUCT_NAME} 17 | CFBundlePackageType 18 | FMWK 19 | CFBundleShortVersionString 20 | 1.0 21 | CFBundleSignature 22 | ???? 23 | CFBundleVersion 24 | 1.0 25 | CSResourcesFileMapped 26 | 27 | 28 | 29 | -------------------------------------------------------------------------------- /third_party/lua-5.3.4/README: -------------------------------------------------------------------------------- 1 | 2 | This is Lua 5.3.4, released on 12 Jan 2017. 3 | 4 | For installation instructions, license details, and 5 | further information about Lua, see doc/readme.html. 6 | 7 | -------------------------------------------------------------------------------- /third_party/lua-5.3.4/doc/index.css: -------------------------------------------------------------------------------- 1 | ul { 2 | list-style-type: none ; 3 | } 4 | 5 | ul.contents { 6 | padding: 0 ; 7 | } 8 | 9 | table { 10 | border: none ; 11 | border-spacing: 0 ; 12 | border-collapse: collapse ; 13 | } 14 | 15 | td { 16 | vertical-align: top ; 17 | padding: 0 ; 18 | text-align: left ; 19 | line-height: 1.25 ; 20 | width: 15% ; 21 | } 22 | -------------------------------------------------------------------------------- /third_party/lua-5.3.4/doc/logo.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/satoren/LRDB/345fd485083e1b62135a145b3bb4041b47b55a55/third_party/lua-5.3.4/doc/logo.gif -------------------------------------------------------------------------------- /third_party/lua-5.3.4/doc/manual.css: -------------------------------------------------------------------------------- 1 | h3 code { 2 | font-family: inherit ; 3 | font-size: inherit ; 4 | } 5 | 6 | pre, code { 7 | font-size: 12pt ; 8 | } 9 | 10 | span.apii { 11 | color: gray ; 12 | float: right ; 13 | font-family: inherit ; 14 | font-style: normal ; 15 | font-size: small ; 16 | } 17 | 18 | h2:before { 19 | content: "" ; 20 | padding-right: 0em ; 21 | } 22 | -------------------------------------------------------------------------------- /third_party/lua-5.3.4/doc/osi-certified-72x60.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/satoren/LRDB/345fd485083e1b62135a145b3bb4041b47b55a55/third_party/lua-5.3.4/doc/osi-certified-72x60.png -------------------------------------------------------------------------------- /third_party/lua-5.3.4/src/lapi.h: -------------------------------------------------------------------------------- 1 | /* 2 | ** $Id: lapi.h,v 2.9 2015/03/06 19:49:50 roberto Exp $ 3 | ** Auxiliary functions from Lua API 4 | ** See Copyright Notice in lua.h 5 | */ 6 | 7 | #ifndef lapi_h 8 | #define lapi_h 9 | 10 | 11 | #include "llimits.h" 12 | #include "lstate.h" 13 | 14 | #define api_incr_top(L) {L->top++; api_check(L, L->top <= L->ci->top, \ 15 | "stack overflow");} 16 | 17 | #define adjustresults(L,nres) \ 18 | { if ((nres) == LUA_MULTRET && L->ci->top < L->top) L->ci->top = L->top; } 19 | 20 | #define api_checknelems(L,n) api_check(L, (n) < (L->top - L->ci->func), \ 21 | "not enough elements in the stack") 22 | 23 | 24 | #endif 25 | -------------------------------------------------------------------------------- /third_party/lua-5.3.4/src/ldebug.h: -------------------------------------------------------------------------------- 1 | /* 2 | ** $Id: ldebug.h,v 2.14 2015/05/22 17:45:56 roberto Exp $ 3 | ** Auxiliary functions from Debug Interface module 4 | ** See Copyright Notice in lua.h 5 | */ 6 | 7 | #ifndef ldebug_h 8 | #define ldebug_h 9 | 10 | 11 | #include "lstate.h" 12 | 13 | 14 | #define pcRel(pc, p) (cast(int, (pc) - (p)->code) - 1) 15 | 16 | #define getfuncline(f,pc) (((f)->lineinfo) ? (f)->lineinfo[pc] : -1) 17 | 18 | #define resethookcount(L) (L->hookcount = L->basehookcount) 19 | 20 | 21 | LUAI_FUNC l_noret luaG_typeerror (lua_State *L, const TValue *o, 22 | const char *opname); 23 | LUAI_FUNC l_noret luaG_concaterror (lua_State *L, const TValue *p1, 24 | const TValue *p2); 25 | LUAI_FUNC l_noret luaG_opinterror (lua_State *L, const TValue *p1, 26 | const TValue *p2, 27 | const char *msg); 28 | LUAI_FUNC l_noret luaG_tointerror (lua_State *L, const TValue *p1, 29 | const TValue *p2); 30 | LUAI_FUNC l_noret luaG_ordererror (lua_State *L, const TValue *p1, 31 | const TValue *p2); 32 | LUAI_FUNC l_noret luaG_runerror (lua_State *L, const char *fmt, ...); 33 | LUAI_FUNC const char *luaG_addinfo (lua_State *L, const char *msg, 34 | TString *src, int line); 35 | LUAI_FUNC l_noret luaG_errormsg (lua_State *L); 36 | LUAI_FUNC void luaG_traceexec (lua_State *L); 37 | 38 | 39 | #endif 40 | -------------------------------------------------------------------------------- /third_party/lua-5.3.4/src/lfunc.h: -------------------------------------------------------------------------------- 1 | /* 2 | ** $Id: lfunc.h,v 2.15 2015/01/13 15:49:11 roberto Exp $ 3 | ** Auxiliary functions to manipulate prototypes and closures 4 | ** See Copyright Notice in lua.h 5 | */ 6 | 7 | #ifndef lfunc_h 8 | #define lfunc_h 9 | 10 | 11 | #include "lobject.h" 12 | 13 | 14 | #define sizeCclosure(n) (cast(int, sizeof(CClosure)) + \ 15 | cast(int, sizeof(TValue)*((n)-1))) 16 | 17 | #define sizeLclosure(n) (cast(int, sizeof(LClosure)) + \ 18 | cast(int, sizeof(TValue *)*((n)-1))) 19 | 20 | 21 | /* test whether thread is in 'twups' list */ 22 | #define isintwups(L) (L->twups != L) 23 | 24 | 25 | /* 26 | ** maximum number of upvalues in a closure (both C and Lua). (Value 27 | ** must fit in a VM register.) 28 | */ 29 | #define MAXUPVAL 255 30 | 31 | 32 | /* 33 | ** Upvalues for Lua closures 34 | */ 35 | struct UpVal { 36 | TValue *v; /* points to stack or to its own value */ 37 | lu_mem refcount; /* reference counter */ 38 | union { 39 | struct { /* (when open) */ 40 | UpVal *next; /* linked list */ 41 | int touched; /* mark to avoid cycles with dead threads */ 42 | } open; 43 | TValue value; /* the value (when closed) */ 44 | } u; 45 | }; 46 | 47 | #define upisopen(up) ((up)->v != &(up)->u.value) 48 | 49 | 50 | LUAI_FUNC Proto *luaF_newproto (lua_State *L); 51 | LUAI_FUNC CClosure *luaF_newCclosure (lua_State *L, int nelems); 52 | LUAI_FUNC LClosure *luaF_newLclosure (lua_State *L, int nelems); 53 | LUAI_FUNC void luaF_initupvals (lua_State *L, LClosure *cl); 54 | LUAI_FUNC UpVal *luaF_findupval (lua_State *L, StkId level); 55 | LUAI_FUNC void luaF_close (lua_State *L, StkId level); 56 | LUAI_FUNC void luaF_freeproto (lua_State *L, Proto *f); 57 | LUAI_FUNC const char *luaF_getlocalname (const Proto *func, int local_number, 58 | int pc); 59 | 60 | 61 | #endif 62 | -------------------------------------------------------------------------------- /third_party/lua-5.3.4/src/lprefix.h: -------------------------------------------------------------------------------- 1 | /* 2 | ** $Id: lprefix.h,v 1.2 2014/12/29 16:54:13 roberto Exp $ 3 | ** Definitions for Lua code that must come before any other header file 4 | ** See Copyright Notice in lua.h 5 | */ 6 | 7 | #ifndef lprefix_h 8 | #define lprefix_h 9 | 10 | 11 | /* 12 | ** Allows POSIX/XSI stuff 13 | */ 14 | #if !defined(LUA_USE_C89) /* { */ 15 | 16 | #if !defined(_XOPEN_SOURCE) 17 | #define _XOPEN_SOURCE 600 18 | #elif _XOPEN_SOURCE == 0 19 | #undef _XOPEN_SOURCE /* use -D_XOPEN_SOURCE=0 to undefine it */ 20 | #endif 21 | 22 | /* 23 | ** Allows manipulation of large files in gcc and some other compilers 24 | */ 25 | #if !defined(LUA_32BITS) && !defined(_FILE_OFFSET_BITS) 26 | #define _LARGEFILE_SOURCE 1 27 | #define _FILE_OFFSET_BITS 64 28 | #endif 29 | 30 | #endif /* } */ 31 | 32 | 33 | /* 34 | ** Windows stuff 35 | */ 36 | #if defined(_WIN32) /* { */ 37 | 38 | #if !defined(_CRT_SECURE_NO_WARNINGS) 39 | #define _CRT_SECURE_NO_WARNINGS /* avoid warnings about ISO C functions */ 40 | #endif 41 | 42 | #endif /* } */ 43 | 44 | #endif 45 | 46 | -------------------------------------------------------------------------------- /third_party/lua-5.3.4/src/lstring.h: -------------------------------------------------------------------------------- 1 | /* 2 | ** $Id: lstring.h,v 1.61 2015/11/03 15:36:01 roberto Exp $ 3 | ** String table (keep all strings handled by Lua) 4 | ** See Copyright Notice in lua.h 5 | */ 6 | 7 | #ifndef lstring_h 8 | #define lstring_h 9 | 10 | #include "lgc.h" 11 | #include "lobject.h" 12 | #include "lstate.h" 13 | 14 | 15 | #define sizelstring(l) (sizeof(union UTString) + ((l) + 1) * sizeof(char)) 16 | 17 | #define sizeludata(l) (sizeof(union UUdata) + (l)) 18 | #define sizeudata(u) sizeludata((u)->len) 19 | 20 | #define luaS_newliteral(L, s) (luaS_newlstr(L, "" s, \ 21 | (sizeof(s)/sizeof(char))-1)) 22 | 23 | 24 | /* 25 | ** test whether a string is a reserved word 26 | */ 27 | #define isreserved(s) ((s)->tt == LUA_TSHRSTR && (s)->extra > 0) 28 | 29 | 30 | /* 31 | ** equality for short strings, which are always internalized 32 | */ 33 | #define eqshrstr(a,b) check_exp((a)->tt == LUA_TSHRSTR, (a) == (b)) 34 | 35 | 36 | LUAI_FUNC unsigned int luaS_hash (const char *str, size_t l, unsigned int seed); 37 | LUAI_FUNC unsigned int luaS_hashlongstr (TString *ts); 38 | LUAI_FUNC int luaS_eqlngstr (TString *a, TString *b); 39 | LUAI_FUNC void luaS_resize (lua_State *L, int newsize); 40 | LUAI_FUNC void luaS_clearcache (global_State *g); 41 | LUAI_FUNC void luaS_init (lua_State *L); 42 | LUAI_FUNC void luaS_remove (lua_State *L, TString *ts); 43 | LUAI_FUNC Udata *luaS_newudata (lua_State *L, size_t s); 44 | LUAI_FUNC TString *luaS_newlstr (lua_State *L, const char *str, size_t l); 45 | LUAI_FUNC TString *luaS_new (lua_State *L, const char *str); 46 | LUAI_FUNC TString *luaS_createlngstrobj (lua_State *L, size_t l); 47 | 48 | 49 | #endif 50 | -------------------------------------------------------------------------------- /third_party/lua-5.3.4/src/lua.hpp: -------------------------------------------------------------------------------- 1 | // lua.hpp 2 | // Lua header files for C++ 3 | // <> not supplied automatically because Lua also compiles as C++ 4 | 5 | extern "C" { 6 | #include "lua.h" 7 | #include "lualib.h" 8 | #include "lauxlib.h" 9 | } 10 | -------------------------------------------------------------------------------- /third_party/lua-5.3.4/src/lualib.h: -------------------------------------------------------------------------------- 1 | /* 2 | ** $Id: lualib.h,v 1.45 2017/01/12 17:14:26 roberto Exp $ 3 | ** Lua standard libraries 4 | ** See Copyright Notice in lua.h 5 | */ 6 | 7 | 8 | #ifndef lualib_h 9 | #define lualib_h 10 | 11 | #include "lua.h" 12 | 13 | 14 | /* version suffix for environment variable names */ 15 | #define LUA_VERSUFFIX "_" LUA_VERSION_MAJOR "_" LUA_VERSION_MINOR 16 | 17 | 18 | LUAMOD_API int (luaopen_base) (lua_State *L); 19 | 20 | #define LUA_COLIBNAME "coroutine" 21 | LUAMOD_API int (luaopen_coroutine) (lua_State *L); 22 | 23 | #define LUA_TABLIBNAME "table" 24 | LUAMOD_API int (luaopen_table) (lua_State *L); 25 | 26 | #define LUA_IOLIBNAME "io" 27 | LUAMOD_API int (luaopen_io) (lua_State *L); 28 | 29 | #define LUA_OSLIBNAME "os" 30 | LUAMOD_API int (luaopen_os) (lua_State *L); 31 | 32 | #define LUA_STRLIBNAME "string" 33 | LUAMOD_API int (luaopen_string) (lua_State *L); 34 | 35 | #define LUA_UTF8LIBNAME "utf8" 36 | LUAMOD_API int (luaopen_utf8) (lua_State *L); 37 | 38 | #define LUA_BITLIBNAME "bit32" 39 | LUAMOD_API int (luaopen_bit32) (lua_State *L); 40 | 41 | #define LUA_MATHLIBNAME "math" 42 | LUAMOD_API int (luaopen_math) (lua_State *L); 43 | 44 | #define LUA_DBLIBNAME "debug" 45 | LUAMOD_API int (luaopen_debug) (lua_State *L); 46 | 47 | #define LUA_LOADLIBNAME "package" 48 | LUAMOD_API int (luaopen_package) (lua_State *L); 49 | 50 | 51 | /* open all previous libraries */ 52 | LUALIB_API void (luaL_openlibs) (lua_State *L); 53 | 54 | 55 | 56 | #if !defined(lua_assert) 57 | #define lua_assert(x) ((void)0) 58 | #endif 59 | 60 | 61 | #endif 62 | -------------------------------------------------------------------------------- /third_party/lua-5.3.4/src/lundump.h: -------------------------------------------------------------------------------- 1 | /* 2 | ** $Id: lundump.h,v 1.45 2015/09/08 15:41:05 roberto Exp $ 3 | ** load precompiled Lua chunks 4 | ** See Copyright Notice in lua.h 5 | */ 6 | 7 | #ifndef lundump_h 8 | #define lundump_h 9 | 10 | #include "llimits.h" 11 | #include "lobject.h" 12 | #include "lzio.h" 13 | 14 | 15 | /* data to catch conversion errors */ 16 | #define LUAC_DATA "\x19\x93\r\n\x1a\n" 17 | 18 | #define LUAC_INT 0x5678 19 | #define LUAC_NUM cast_num(370.5) 20 | 21 | #define MYINT(s) (s[0]-'0') 22 | #define LUAC_VERSION (MYINT(LUA_VERSION_MAJOR)*16+MYINT(LUA_VERSION_MINOR)) 23 | #define LUAC_FORMAT 0 /* this is the official format */ 24 | 25 | /* load one chunk; from lundump.c */ 26 | LUAI_FUNC LClosure* luaU_undump (lua_State* L, ZIO* Z, const char* name); 27 | 28 | /* dump one chunk; from ldump.c */ 29 | LUAI_FUNC int luaU_dump (lua_State* L, const Proto* f, lua_Writer w, 30 | void* data, int strip); 31 | 32 | #endif 33 | -------------------------------------------------------------------------------- /third_party/lua-5.3.4/src/lzio.c: -------------------------------------------------------------------------------- 1 | /* 2 | ** $Id: lzio.c,v 1.37 2015/09/08 15:41:05 roberto Exp $ 3 | ** Buffered streams 4 | ** See Copyright Notice in lua.h 5 | */ 6 | 7 | #define lzio_c 8 | #define LUA_CORE 9 | 10 | #include "lprefix.h" 11 | 12 | 13 | #include 14 | 15 | #include "lua.h" 16 | 17 | #include "llimits.h" 18 | #include "lmem.h" 19 | #include "lstate.h" 20 | #include "lzio.h" 21 | 22 | 23 | int luaZ_fill (ZIO *z) { 24 | size_t size; 25 | lua_State *L = z->L; 26 | const char *buff; 27 | lua_unlock(L); 28 | buff = z->reader(L, z->data, &size); 29 | lua_lock(L); 30 | if (buff == NULL || size == 0) 31 | return EOZ; 32 | z->n = size - 1; /* discount char being returned */ 33 | z->p = buff; 34 | return cast_uchar(*(z->p++)); 35 | } 36 | 37 | 38 | void luaZ_init (lua_State *L, ZIO *z, lua_Reader reader, void *data) { 39 | z->L = L; 40 | z->reader = reader; 41 | z->data = data; 42 | z->n = 0; 43 | z->p = NULL; 44 | } 45 | 46 | 47 | /* --------------------------------------------------------------- read --- */ 48 | size_t luaZ_read (ZIO *z, void *b, size_t n) { 49 | while (n) { 50 | size_t m; 51 | if (z->n == 0) { /* no bytes in buffer? */ 52 | if (luaZ_fill(z) == EOZ) /* try to read more */ 53 | return n; /* no more input; return number of missing bytes */ 54 | else { 55 | z->n++; /* luaZ_fill consumed first byte; put it back */ 56 | z->p--; 57 | } 58 | } 59 | m = (n <= z->n) ? n : z->n; /* min. between n and z->n */ 60 | memcpy(b, z->p, m); 61 | z->n -= m; 62 | z->p += m; 63 | b = (char *)b + m; 64 | n -= m; 65 | } 66 | return 0; 67 | } 68 | 69 | -------------------------------------------------------------------------------- /third_party/lua-5.3.4/src/lzio.h: -------------------------------------------------------------------------------- 1 | /* 2 | ** $Id: lzio.h,v 1.31 2015/09/08 15:41:05 roberto Exp $ 3 | ** Buffered streams 4 | ** See Copyright Notice in lua.h 5 | */ 6 | 7 | 8 | #ifndef lzio_h 9 | #define lzio_h 10 | 11 | #include "lua.h" 12 | 13 | #include "lmem.h" 14 | 15 | 16 | #define EOZ (-1) /* end of stream */ 17 | 18 | typedef struct Zio ZIO; 19 | 20 | #define zgetc(z) (((z)->n--)>0 ? cast_uchar(*(z)->p++) : luaZ_fill(z)) 21 | 22 | 23 | typedef struct Mbuffer { 24 | char *buffer; 25 | size_t n; 26 | size_t buffsize; 27 | } Mbuffer; 28 | 29 | #define luaZ_initbuffer(L, buff) ((buff)->buffer = NULL, (buff)->buffsize = 0) 30 | 31 | #define luaZ_buffer(buff) ((buff)->buffer) 32 | #define luaZ_sizebuffer(buff) ((buff)->buffsize) 33 | #define luaZ_bufflen(buff) ((buff)->n) 34 | 35 | #define luaZ_buffremove(buff,i) ((buff)->n -= (i)) 36 | #define luaZ_resetbuffer(buff) ((buff)->n = 0) 37 | 38 | 39 | #define luaZ_resizebuffer(L, buff, size) \ 40 | ((buff)->buffer = luaM_reallocvchar(L, (buff)->buffer, \ 41 | (buff)->buffsize, size), \ 42 | (buff)->buffsize = size) 43 | 44 | #define luaZ_freebuffer(L, buff) luaZ_resizebuffer(L, buff, 0) 45 | 46 | 47 | LUAI_FUNC void luaZ_init (lua_State *L, ZIO *z, lua_Reader reader, 48 | void *data); 49 | LUAI_FUNC size_t luaZ_read (ZIO* z, void *b, size_t n); /* read next n bytes */ 50 | 51 | 52 | 53 | /* --------- Private Part ------------------ */ 54 | 55 | struct Zio { 56 | size_t n; /* bytes still unread */ 57 | const char *p; /* current position in buffer */ 58 | lua_Reader reader; /* reader function */ 59 | void *data; /* additional data */ 60 | lua_State *L; /* Lua state (for reader) */ 61 | }; 62 | 63 | 64 | LUAI_FUNC int luaZ_fill (ZIO *z); 65 | 66 | #endif 67 | -------------------------------------------------------------------------------- /third_party/picojson/.gitignore: -------------------------------------------------------------------------------- 1 | *~ 2 | a.out 3 | test-core 4 | test-core-int64 5 | -------------------------------------------------------------------------------- /third_party/picojson/.gitmodules: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/satoren/LRDB/345fd485083e1b62135a145b3bb4041b47b55a55/third_party/picojson/.gitmodules -------------------------------------------------------------------------------- /third_party/picojson/.travis.yml: -------------------------------------------------------------------------------- 1 | language: cpp 2 | 3 | compiler: 4 | - clang 5 | - gcc 6 | 7 | script: 8 | - make test 9 | -------------------------------------------------------------------------------- /third_party/picojson/Changes: -------------------------------------------------------------------------------- 1 | Revision history for picojson 2 | 3 | 1.3.0 2015-02-25 13:05:00+0900 4 | - `make check` is now synonym of `make test` (#62) 5 | - operator= is now safe when part of LHS is being assigned, as well as exception-safe (#66) 6 | 7 | 1.2.1 2014-12-16 15:33:00+0900 8 | - bundle the contents of `picotest/` (#61) 9 | 10 | 1.2.0 2014-12-15 16:20:00+0900 11 | - `make install` to install picojson.h (#58) 12 | - two-argument `picojson::parse()` for ease-of-use (#57) 13 | 14 | 1.1.1 2014-06-25 10:35:00+0900 15 | - tweaks to suppress compiler errors / warning (#38 #39) 16 | - clarify the licenses of the files in exmaple/ (#42) 17 | 18 | 1.1 2014-06-16 12:57:00+0900 19 | - added experimental support for int64 type (#34) 20 | - by default, throw std::runtime_error instead of using assert for runtime errors (#33) 21 | - refine compatibility regarding the use of isinf/isnan (#29, #36) 22 | - remove `.get()` (#35) 23 | 24 | 1.0 2014-06-05 12:54:00+0900 25 | - initial release with a version number 26 | -------------------------------------------------------------------------------- /third_party/picojson/LICENSE: -------------------------------------------------------------------------------- 1 | Copyright 2009-2010 Cybozu Labs, Inc. 2 | Copyright 2011-2014 Kazuho Oku 3 | All rights reserved. 4 | 5 | Redistribution and use in source and binary forms, with or without 6 | modification, are permitted provided that the following conditions are met: 7 | 8 | 1. Redistributions of source code must retain the above copyright notice, 9 | this list of conditions and the following disclaimer. 10 | 11 | 2. Redistributions in binary form must reproduce the above copyright notice, 12 | this list of conditions and the following disclaimer in the documentation 13 | and/or other materials provided with the distribution. 14 | 15 | THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" 16 | AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 17 | IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 18 | ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE 19 | LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR 20 | CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF 21 | SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS 22 | INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN 23 | CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) 24 | ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE 25 | POSSIBILITY OF SUCH DAMAGE. 26 | -------------------------------------------------------------------------------- /third_party/picojson/Makefile: -------------------------------------------------------------------------------- 1 | prefix=/usr/local 2 | includedir=$(prefix)/include 3 | 4 | check: test 5 | 6 | test: test-core test-core-int64 7 | ./test-core 8 | ./test-core-int64 9 | 10 | test-core: picojson.h test.cc picotest/picotest.c picotest/picotest.h 11 | $(CXX) -Wall test.cc picotest/picotest.c -o $@ 12 | 13 | test-core-int64: picojson.h test.cc picotest/picotest.c picotest/picotest.h 14 | $(CXX) -Wall -DPICOJSON_USE_INT64 test.cc picotest/picotest.c -o $@ 15 | 16 | clean: 17 | rm -f test-core test-core-int64 18 | 19 | install: 20 | install -d $(DESTDIR)$(includedir) 21 | install -p -m 0644 picojson.h $(DESTDIR)$(includedir) 22 | 23 | uninstall: 24 | rm -f $(DESTDIR)$(includedir)/picojson.h 25 | 26 | .PHONY: test check clean install uninstall 27 | -------------------------------------------------------------------------------- /third_party/picojson/picotest/picotest.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2014 DeNA Co., Ltd. 3 | * 4 | * Permission is hereby granted, free of charge, to any person obtaining a copy 5 | * of this software and associated documentation files (the "Software"), to 6 | * deal in the Software without restriction, including without limitation the 7 | * rights to use, copy, modify, merge, publish, distribute, sublicense, and/or 8 | * sell copies of the Software, and to permit persons to whom the Software is 9 | * furnished to do so, subject to the following conditions: 10 | * 11 | * The above copyright notice and this permission notice shall be included in 12 | * all copies or substantial portions of the Software. 13 | * 14 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 15 | * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 16 | * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 17 | * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 18 | * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING 19 | * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS 20 | * IN THE SOFTWARE. 21 | */ 22 | #ifndef picotest_h 23 | #define picotest_h 24 | 25 | #ifdef __cplusplus 26 | extern "C" { 27 | #endif 28 | 29 | void note(const char *fmt, ...) __attribute__((format (printf, 1, 2))); 30 | void _ok(int cond, const char *fmt, ...) __attribute__((format (printf, 2, 3))); 31 | #define ok(cond) _ok(cond, "%s %d", __FILE__, __LINE__) 32 | int done_testing(void); 33 | void subtest(const char *name, void (*cb)(void)); 34 | 35 | #ifdef __cplusplus 36 | } 37 | #endif 38 | 39 | #endif 40 | --------------------------------------------------------------------------------