aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorWerner Koch <[email protected]>2025-04-09 07:35:39 +0000
committerWerner Koch <[email protected]>2025-04-09 07:35:39 +0000
commit26b876030dbda890b9630595419b422aa182c0dd (patch)
treeed9cbed274183c4d7118b763e258abdca231174b
parentUse gpgrt_stream_t for the API of gpgrt_nvc_*. (diff)
downloadlibgpg-error-26b876030dbda890b9630595419b422aa182c0dd.tar.gz
libgpg-error-26b876030dbda890b9630595419b422aa182c0dd.zip
tests: Check that we do not use the es macros in the public API.
* tests/t-version.c: Undef the macros.
-rw-r--r--configure.ac4
-rw-r--r--tests/t-version.c4
2 files changed, 7 insertions, 1 deletions
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 <config.h>
#endif
+#undef GPG_ERR_ENABLE_GETTEXT_MACROS
+#undef GPGRT_ENABLE_ES_MACROS
+#undef GPGRT_ENABLE_LOG_MACROS
+#undef GPGRT_ENABLE_ARGPARSE_MACROS
#include <stdio.h>
#include <stdlib.h>