From 6aa97a68a85b83267de597bfb30b70c04b7de97b Mon Sep 17 00:00:00 2001 From: Robin Haberkorn Date: Sun, 23 Aug 2026 12:27:44 +0200 Subject: curses/UNIX: improved error handling in teco_interface_{set,get}_clipboard() Now use the teco_spawn_check_wait_status(), which was previously in spawn.c, so we no longer have to handle the UNIX-specific WEXITSTATUS() macros. --- src/spawn.h | 13 +++++++++++++ 1 file changed, 13 insertions(+) (limited to 'src/spawn.h') diff --git a/src/spawn.h b/src/spawn.h index 5d2a5a4..bac27ca 100644 --- a/src/spawn.h +++ b/src/spawn.h @@ -16,8 +16,21 @@ */ #pragma once +#include + #include "parser.h" +/* + * Glib v2.70 deprecates g_spawn_check_exit_status(), + * renaming it to g_spawn_check_wait_status(). + * This leaves no way to work on both new and old versions without warnings. + */ +#if GLIB_CHECK_VERSION(2,70,0) +#define teco_spawn_check_wait_status g_spawn_check_wait_status +#else +#define teco_spawn_check_wait_status g_spawn_check_exit_status +#endif + gchar **teco_parse_shell_command_line(const gchar *cmdline, GError **error); extern teco_state_t teco_state_execute; -- cgit v1.2.3