From 9303b107978fe04dcb96ecf55cc0136a756fc5fd Mon Sep 17 00:00:00 2001 From: Martin Pulec Date: Fri, 26 Jul 2024 09:21:46 +0200 Subject: [PATCH] aja_common.hpp: compilation fixes AJA is built as a standalone library and the some of the actual dependencies are overriden in aja_common.hpp header. --- src/aja_common.cpp | 2 +- src/aja_common.hpp | 5 +++++ 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/src/aja_common.cpp b/src/aja_common.cpp index 1ad50752c..2e3c462a2 100644 --- a/src/aja_common.cpp +++ b/src/aja_common.cpp @@ -46,8 +46,8 @@ #pragma GCC diagnostic ignored "-Wcast-qual" #include // for CNTV2Card -#include "aja_common.hpp" #include "utils/color_out.h" // for color_printf, TUNDERLINE +#include "aja_common.hpp" // include after color_out to override its stuff for MSVC #ifndef BYTE_SWAP #ifdef WORDS_BIGENDIAN diff --git a/src/aja_common.hpp b/src/aja_common.hpp index 474c1fcd1..5fbeda8bd 100644 --- a/src/aja_common.hpp +++ b/src/aja_common.hpp @@ -46,8 +46,13 @@ class CNTV2Card; #define log_msg(x, ...) fprintf(stderr, __VA_ARGS__) #define color_printf printf #undef LOG +#include #define LOG(level) if (level > log_level) ; else std::cerr #define col() std::cout +#undef TUNDERLINE +#define TUNDERLINE(x) x +#undef SUNDERLINE +#define SUNDERLINE(x) x #endif // compat