From 26b876030dbda890b9630595419b422aa182c0dd Mon Sep 17 00:00:00 2001 From: Werner Koch Date: Wed, 9 Apr 2025 09:35:39 +0200 Subject: tests: Check that we do not use the es macros in the public API. * tests/t-version.c: Undef the macros. --- configure.ac | 4 +++- tests/t-version.c | 4 ++++ 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/configure.ac b/configure.ac index 8473cd7..89e5553 100644 --- a/configure.ac +++ b/configure.ac @@ -210,7 +210,9 @@ AH_BOTTOM([ #define _ESTREAM_PRINTF_REALLOC _gpgrt_realloc #define _ESTREAM_PRINTF_EXTRA_INCLUDE "gpgrt-int.h" -/* For building we need to define these macro. */ +/* For building we need to define these macro. Note that they + * are undef-ed in tests/t-version.c so that we don't accidently + * use them in the public API. */ #define GPG_ERR_ENABLE_GETTEXT_MACROS 1 #define GPGRT_ENABLE_ES_MACROS 1 #define GPGRT_ENABLE_LOG_MACROS 1 diff --git a/tests/t-version.c b/tests/t-version.c index d71f360..98f540a 100644 --- a/tests/t-version.c +++ b/tests/t-version.c @@ -20,6 +20,10 @@ #ifdef HAVE_CONFIG_H #include #endif +#undef GPG_ERR_ENABLE_GETTEXT_MACROS +#undef GPGRT_ENABLE_ES_MACROS +#undef GPGRT_ENABLE_LOG_MACROS +#undef GPGRT_ENABLE_ARGPARSE_MACROS #include #include -- cgit v1.2.3