From 111e2f413374b77b04be9ff991aa74c995e96ff0 Mon Sep 17 00:00:00 2001 From: 3gg <3gg@shellblade.net> Date: Sat, 13 Apr 2024 13:24:51 -0700 Subject: Avoid __VA_OPT__; not available until C2X. --- cassert/include/cassert.h | 17 ++++++++++++----- 1 file changed, 12 insertions(+), 5 deletions(-) diff --git a/cassert/include/cassert.h b/cassert/include/cassert.h index ef6e033..8cd1391 100644 --- a/cassert/include/cassert.h +++ b/cassert/include/cassert.h @@ -6,11 +6,18 @@ // Allow the client to define their own LOGE() macro. #ifndef LOGE #include -#define LOGE(format, ...) \ - { \ - fprintf( \ - stderr, "[ASSERT] %s:%d " format "\n", __FILE__, \ - __LINE__ __VA_OPT__(, ) __VA_ARGS__); \ +// __VA_OPT__ is not available until C2X. +/*#define LOGE(format, ...) \ +// { \ +// fprintf( \ +// stderr, "[ASSERT] %s:%d " format "\n", __FILE__, \ +// __LINE__ __VA_OPT__(, ) __VA_ARGS__); \ +// }*/ +#define LOGE(...) \ + { \ + fprintf(stderr, "[ASSERT] %s:%d ", __FILE__, __LINE__); \ + fprintf(stderr, __VA_ARGS__); \ + fprintf(stderr, "\n"); \ } #endif // LOGE -- cgit v1.2.3