diff --git a/build.zig b/build.zig index 5457506..d26f1ca 100644 --- a/build.zig +++ b/build.zig @@ -13,7 +13,6 @@ const cppflags = [_][]const u8{ "-Wno-deprecated-declarations", "-Wno-unqualified-std-cast-call", "-Wno-bitwise-instead-of-logical", //for notcurses - "-Wno-unused-command-line-argument", //zig passes -fno-rtlib-defaultlib when cross-compiling to windows "-fno-sanitize=undefined", "-gen-cdb-fragment-path", ".cache/cdb", diff --git a/build.zig.zon b/build.zig.zon index 1958d5c..4dfe18e 100644 --- a/build.zig.zon +++ b/build.zig.zon @@ -1,13 +1,13 @@ .{ .name = .thespian, .version = "0.0.1", - .minimum_zig_version = "0.16.0", + .minimum_zig_version = "0.16.0-dev.3133+5ec8e45f3", .fingerprint = 0xe9ff00fd8e4e01a3, .dependencies = .{ .cbor = .{ - .url = "git+https://github.com/neurocyte/cbor?ref=master#8f37f71439f62b513b9d52a76d6af012395ee47c", - .hash = "cbor-1.2.0-RcQE_NtLAQCkBF-LFNB_XsGIycs6pjhCYicxEq0QzYfe", + .url = "git+https://github.com/neurocyte/cbor?ref=master#1b7cd3192552f5fd0b1679d535e5cd978794d13a", + .hash = "cbor-1.1.0-RcQE_DBMAQBrUYInw5H2ZYfBQT1Po-Y4LEwzUQYbtSJ5", }, .asio = .{ .url = "git+https://github.com/neurocyte/asio#824070c9385bf98d9de087af6c7992d7039e2836", diff --git a/include/thespian/backtrace.h b/include/thespian/backtrace.h index f3f8013..c93a082 100644 --- a/include/thespian/backtrace.h +++ b/include/thespian/backtrace.h @@ -12,11 +12,9 @@ void install_remote_debugger(); void install_backtrace(); void install_jitdebugger(); -#if !defined(_WIN32) void sighdl_debugger(int no, siginfo_t * /*sigi*/, void * /*uco*/); void sighdl_remote_debugger(int no, siginfo_t * /*sigi*/, void * /*uco*/); void sighdl_backtrace(int no, siginfo_t * /*sigi*/, void * /*uco*/); -#endif #ifdef __cplusplus } diff --git a/include/thespian/c/tcp.h b/include/thespian/c/tcp.h index ffe18af..8f73f38 100644 --- a/include/thespian/c/tcp.h +++ b/include/thespian/c/tcp.h @@ -6,11 +6,7 @@ extern "C" { #endif #include -#if defined(_WIN32) -#include -#else #include -#endif #include struct thespian_tcp_acceptor_handle; diff --git a/src/thespian.zig b/src/thespian.zig index b64a41e..740cba7 100644 --- a/src/thespian.zig +++ b/src/thespian.zig @@ -254,7 +254,7 @@ fn store_stack_trace(stack_trace: std.builtin.StackTrace, writer: *std.Io.Writer writer.print("Unable to store stack trace: debug info stripped\n", .{}) catch return; return; } - std.debug.writeErrorReturnTrace(&stack_trace, .{ .writer = writer, .mode = .no_color }) catch |err| { + std.debug.writeStackTrace(&stack_trace, .{ .writer = writer, .mode = .no_color }) catch |err| { writer.print("Unable to dump stack trace: {s}\n", .{@errorName(err)}) catch return; return; }; @@ -651,7 +651,7 @@ fn to_result(ret: result) c.thespian_result { if (!(cbor.match(msg, .{ "exit", "normal" }) catch false)) { if (env.get().is("dump-stack-trace")) { const trace_ = @errorReturnTrace(); - if (trace_) |t| std.debug.dumpErrorReturnTrace(t); + if (trace_) |t| std.debug.dumpStackTrace(t); } } return &error_buffer_tl; diff --git a/test/endpoint_unx.cpp b/test/endpoint_unx.cpp index fbf3cf2..0a01cdd 100644 --- a/test/endpoint_unx.cpp +++ b/test/endpoint_unx.cpp @@ -40,14 +40,6 @@ using namespace std::chrono_literals; #if !defined(_WIN32) namespace { -// Linux supports abstract Unix sockets (null-byte prefix, no filesystem entry). -// FreeBSD and macOS only support file-based Unix sockets. -#if defined(__linux__) -constexpr auto unx_socket_mode = mode::abstract; -#else -constexpr auto unx_socket_mode = mode::file; -#endif - struct controller { handle ep_listen; handle ep_connect; @@ -67,7 +59,7 @@ struct controller { return ok(); } if (m("path", extract(path))) { - ep_connect = connect(path, unx_socket_mode).value(); + ep_connect = connect(path).value(); return ok(); } if (m("connected")) { @@ -93,12 +85,12 @@ struct controller { auto endpoint_unx(context &ctx, bool &result, env_t env_) -> ::result { stringstream ss; - ss << "/tmp/thespian_endpoint_t_" << getpid(); + ss << "/net/vdbonline/thespian/endpoint_t_" << getpid(); const string path = ss.str(); return to_result(ctx.spawn_link( [path]() { link(env().proc("log")); - handle ep_listen = listen(path, unx_socket_mode).value(); + handle ep_listen = listen(path).value(); receive([p{make_shared(ep_listen)}](const auto &from, const auto &m) { return p->receive(from, m); diff --git a/test/ip_tcp_client_server_c.cpp b/test/ip_tcp_client_server_c.cpp index 1885039..5507216 100644 --- a/test/ip_tcp_client_server_c.cpp +++ b/test/ip_tcp_client_server_c.cpp @@ -7,9 +7,7 @@ #include #include -#ifndef _WIN32 #include -#endif #include // --------------------------------------------------------------------------- diff --git a/test/tests_cpp.zig b/test/tests_cpp.zig index b695d09..b8ee481 100644 --- a/test/tests_cpp.zig +++ b/test/tests_cpp.zig @@ -18,7 +18,7 @@ test "debug" { } test "endpoint_unx" { - if (builtin.os.tag != .windows) { + if (builtin.os.tag == .linux) { try testcase("endpoint_unx"); } }