commit 9e4ac84b6eed7cc622d041c396bc460ce7e1bf07
parent 597c9950a34801ed80f3cdcb030c20950cb55e9b
Author: Christian Grothoff <christian@grothoff.org>
Date: Mon, 5 Dec 2022 14:03:43 +0100
force include of taler_util.h, not of taler_crypto_lib.h or taler_amount_lib.h
Diffstat:
12 files changed, 22 insertions(+), 10 deletions(-)
diff --git a/contrib/sigp/h.header b/contrib/sigp/h.header
@@ -27,6 +27,5 @@
#ifndef TALER_SIGNATURES_H
#define TALER_SIGNATURES_H
-#include <gnunet/gnunet_util_lib.h>
-#include "taler_amount_lib.h"
-#include "taler_crypto_lib.h"
+
+
diff --git a/src/exchange/taler-exchange-httpd.h b/src/exchange/taler-exchange-httpd.h
@@ -25,7 +25,7 @@
#include <microhttpd.h>
#include "taler_json_lib.h"
-#include "taler_crypto_lib.h"
+#include "taler_util.h"
#include "taler_kyclogic_plugin.h"
#include "taler_extensions.h"
#include <gnunet/gnunet_mhd_compat.h>
diff --git a/src/include/taler_amount_lib.h b/src/include/taler_amount_lib.h
@@ -18,6 +18,10 @@
* @brief amount-representation utility functions
* @author Sree Harsha Totakura <sreeharsha@totakura.in>
*/
+#if ! defined (__TALER_UTIL_LIB_H_INSIDE__)
+#error "Only <taler_util.h> can be included directly."
+#endif
+
#ifndef TALER_AMOUNT_LIB_H
#define TALER_AMOUNT_LIB_H
diff --git a/src/include/taler_auditordb_plugin.h b/src/include/taler_auditordb_plugin.h
@@ -25,6 +25,7 @@
#include <jansson.h>
#include <gnunet/gnunet_util_lib.h>
#include <gnunet/gnunet_db_lib.h>
+#include "taler_util.h"
#include "taler_auditordb_lib.h"
#include "taler_signatures.h"
diff --git a/src/include/taler_crypto_lib.h b/src/include/taler_crypto_lib.h
@@ -19,6 +19,10 @@
* @author Sree Harsha Totakura <sreeharsha@totakura.in>
* @author Christian Grothoff <christian@grothoff.org>
*/
+#if ! defined (__TALER_UTIL_LIB_H_INSIDE__)
+#error "Only <taler_util.h> can be included directly."
+#endif
+
#ifndef TALER_CRYPTO_LIB_H
#define TALER_CRYPTO_LIB_H
diff --git a/src/include/taler_extensions.h b/src/include/taler_extensions.h
@@ -22,7 +22,7 @@
#define TALER_EXTENSIONS_H
#include <gnunet/gnunet_util_lib.h>
-#include "taler_crypto_lib.h"
+#include "taler_util.h"
#include "taler_json_lib.h"
#include "taler_mhd_lib.h"
#include "taler_extensions_policy.h"
diff --git a/src/include/taler_extensions_policy.h b/src/include/taler_extensions_policy.h
@@ -22,7 +22,7 @@
#define TALER_EXTENSIONS_POLICY_H
#include <gnunet/gnunet_util_lib.h>
-#include "taler_crypto_lib.h"
+#include "taler_util.h"
#include "taler_json_lib.h"
#include "taler_mhd_lib.h"
diff --git a/src/include/taler_util.h b/src/include/taler_util.h
@@ -21,6 +21,8 @@
#ifndef TALER_UTIL_H
#define TALER_UTIL_H
+#define __TALER_UTIL_LIB_H_INSIDE__
+
#include <gnunet/gnunet_util_lib.h>
#include <microhttpd.h>
#include "taler_amount_lib.h"
@@ -551,4 +553,6 @@ enum GNUNET_GenericReturnValue
TALER_JSON_parse_age_groups (const json_t *root,
struct TALER_AgeMask *mask);
+#undef __TALER_UTIL_LIB_H_INSIDE__
+
#endif
diff --git a/src/kyclogic/taler-exchange-kyc-tester.c b/src/kyclogic/taler-exchange-kyc-tester.c
@@ -28,7 +28,7 @@
#include "taler_mhd_lib.h"
#include "taler_json_lib.h"
#include "taler_templating_lib.h"
-#include "taler_crypto_lib.h"
+#include "taler_util.h"
#include "taler_kyclogic_lib.h"
#include "taler_kyclogic_plugin.h"
#include <gnunet/gnunet_mhd_compat.h>
diff --git a/src/lib/exchange_api_handle.h b/src/lib/exchange_api_handle.h
@@ -25,7 +25,7 @@
#include <gnunet/gnunet_curl_lib.h>
#include "taler_auditor_service.h"
#include "taler_exchange_service.h"
-#include "taler_crypto_lib.h"
+#include "taler_util.h"
#include "taler_curl_lib.h"
/**
diff --git a/src/lib/exchange_api_management_get_keys.c b/src/lib/exchange_api_management_get_keys.c
@@ -26,7 +26,7 @@
#include "exchange_api_curl_defaults.h"
#include "taler_signatures.h"
#include "taler_curl_lib.h"
-#include "taler_crypto_lib.h"
+#include "taler_util.h"
#include "taler_json_lib.h"
/**
diff --git a/src/sq/sq_result_helper.c b/src/sq/sq_result_helper.c
@@ -23,7 +23,7 @@
#include <gnunet/gnunet_util_lib.h>
#include <gnunet/gnunet_sq_lib.h>
#include "taler_sq_lib.h"
-#include "taler_amount_lib.h"
+#include "taler_util.h"
/**