From 227743a147967bf1418525770082a5943b3f9f41 Mon Sep 17 00:00:00 2001 From: Thijs Schreijer Date: Wed, 31 Jul 2024 14:49:07 +0200 Subject: chore(term): add descriptive error on Windows for lack of VT (#32) --- src/term.c | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'src') diff --git a/src/term.c b/src/term.c index 1bb6c75..e58e190 100644 --- a/src/term.c +++ b/src/term.c @@ -107,6 +107,11 @@ typedef struct ls_RegConst { // This is needed because some flags are not defined on all platforms. So we // still export the constants, but they will be all 0, and hence not do anything. #ifdef _WIN32 +// check compatibility: Windows virtual terminal processing was added in 2015, +// some older compiler suites don't have the proper headers. +#ifndef ENABLE_VIRTUAL_TERMINAL_INPUT +#error Virtual terminal macros are undefined (eg. ENABLE_VIRTUAL_TERMINAL_INPUT). Update the toolchain or revert to Luasystem < 0.4 +#endif #define CHECK_WIN_FLAG_OR_ZERO(flag) flag #define CHECK_NIX_FLAG_OR_ZERO(flag) 0 #else -- cgit v1.2.3-55-g6feb