aboutsummaryrefslogtreecommitdiff
path: root/src/util
diff options
context:
space:
mode:
authorMartin Schanzenbach <schanzen@gnunet.org>2022-12-04 19:35:42 +0900
committerMartin Schanzenbach <schanzen@gnunet.org>2022-12-04 19:35:42 +0900
commit38e77d7ab84a21e9aebd558558105c95254ac430 (patch)
tree016efa7b50dfd39e42b41b6e3075874de6e5b633 /src/util
parent292cefa2a12a78ae54fb56a3961452f439cb744f (diff)
downloadgnunet-38e77d7ab84a21e9aebd558558105c95254ac430.tar.gz
gnunet-38e77d7ab84a21e9aebd558558105c95254ac430.zip
UTIL: Allow only inlcusion of util glib-style.
Diffstat (limited to 'src/util')
-rw-r--r--src/util/buffer.c1
-rw-r--r--src/util/child_management.c1
-rw-r--r--src/util/common_allocation.c2
-rw-r--r--src/util/common_endian.c2
-rw-r--r--src/util/common_logging.c4
-rw-r--r--src/util/configuration.c6
-rw-r--r--src/util/container_heap.c2
-rw-r--r--src/util/container_multihashmap.c2
-rw-r--r--src/util/container_multihashmap32.c2
-rw-r--r--src/util/crypto_crc.c2
-rw-r--r--src/util/crypto_cs.c2
-rw-r--r--src/util/crypto_ecc.c3
-rw-r--r--src/util/crypto_ecc_dlog.c3
-rw-r--r--src/util/crypto_ecc_gnsrecord.c3
-rw-r--r--src/util/crypto_edx25519.c3
-rw-r--r--src/util/crypto_hash.c3
-rw-r--r--src/util/crypto_hkdf.c4
-rw-r--r--src/util/crypto_kdf.c2
-rw-r--r--src/util/crypto_mpi.c2
-rw-r--r--src/util/crypto_pow.c2
-rw-r--r--src/util/crypto_random.c3
-rw-r--r--src/util/crypto_rsa.c2
-rw-r--r--src/util/crypto_symmetric.c2
-rw-r--r--src/util/disk.c4
-rw-r--r--src/util/disk.h3
-rw-r--r--src/util/helper.c2
-rw-r--r--src/util/network.c1
-rw-r--r--src/util/peer.c2
-rw-r--r--src/util/proc_compat.c1
-rw-r--r--src/util/regex.c1
-rw-r--r--src/util/strings.c4
-rw-r--r--src/util/test_plugin_plug.c1
32 files changed, 26 insertions, 51 deletions
diff --git a/src/util/buffer.c b/src/util/buffer.c
index 38c3ccac9..f88c56849 100644
--- a/src/util/buffer.c
+++ b/src/util/buffer.c
@@ -21,7 +21,6 @@
21 21
22#include "platform.h" 22#include "platform.h"
23#include "gnunet_util_lib.h" 23#include "gnunet_util_lib.h"
24#include "gnunet_buffer_lib.h"
25 24
26/** 25/**
27 * Initialize a buffer with the given capacity. 26 * Initialize a buffer with the given capacity.
diff --git a/src/util/child_management.c b/src/util/child_management.c
index 14d64ec33..680dbcabe 100644
--- a/src/util/child_management.c
+++ b/src/util/child_management.c
@@ -28,7 +28,6 @@
28 28
29#include "platform.h" 29#include "platform.h"
30#include "gnunet_util_lib.h" 30#include "gnunet_util_lib.h"
31#include "gnunet_child_management_lib.h"
32 31
33/** 32/**
34 * Generic logging shortcut 33 * Generic logging shortcut
diff --git a/src/util/common_allocation.c b/src/util/common_allocation.c
index 5ebed750c..36d49eddb 100644
--- a/src/util/common_allocation.c
+++ b/src/util/common_allocation.c
@@ -25,7 +25,7 @@
25 */ 25 */
26 26
27#include "platform.h" 27#include "platform.h"
28#include "gnunet_crypto_lib.h" 28#include "gnunet_util_lib.h"
29#if HAVE_MALLOC_H 29#if HAVE_MALLOC_H
30#include <malloc.h> 30#include <malloc.h>
31#endif 31#endif
diff --git a/src/util/common_endian.c b/src/util/common_endian.c
index da70d4538..59c15326d 100644
--- a/src/util/common_endian.c
+++ b/src/util/common_endian.c
@@ -27,7 +27,7 @@
27 27
28 28
29#include "platform.h" 29#include "platform.h"
30#include "gnunet_crypto_lib.h" 30#include "gnunet_util_lib.h"
31 31
32#define LOG(kind, ...) GNUNET_log_from (kind, "util-common-endian", __VA_ARGS__) 32#define LOG(kind, ...) GNUNET_log_from (kind, "util-common-endian", __VA_ARGS__)
33 33
diff --git a/src/util/common_logging.c b/src/util/common_logging.c
index 409910c48..d27f70e83 100644
--- a/src/util/common_logging.c
+++ b/src/util/common_logging.c
@@ -25,9 +25,7 @@
25 */ 25 */
26 26
27#include "platform.h" 27#include "platform.h"
28#include "gnunet_crypto_lib.h" 28#include "gnunet_util_lib.h"
29#include "gnunet_disk_lib.h"
30#include "gnunet_strings_lib.h"
31#include <regex.h> 29#include <regex.h>
32 30
33 31
diff --git a/src/util/configuration.c b/src/util/configuration.c
index b6e9d42ce..af8a0746e 100644
--- a/src/util/configuration.c
+++ b/src/util/configuration.c
@@ -24,13 +24,9 @@
24 */ 24 */
25 25
26#include "platform.h" 26#include "platform.h"
27#include "gnunet_crypto_lib.h" 27#include "gnunet_util_lib.h"
28#include "gnunet_strings_lib.h"
29#include "gnunet_os_lib.h" 28#include "gnunet_os_lib.h"
30#include "gnunet_configuration_lib.h" 29#include "gnunet_configuration_lib.h"
31#include "gnunet_disk_lib.h"
32#include "gnunet_buffer_lib.h"
33#include "gnunet_container_lib.h"
34 30
35#define LOG(kind, ...) GNUNET_log_from (kind, "util", __VA_ARGS__) 31#define LOG(kind, ...) GNUNET_log_from (kind, "util", __VA_ARGS__)
36 32
diff --git a/src/util/container_heap.c b/src/util/container_heap.c
index f480fefd3..77b828d31 100644
--- a/src/util/container_heap.c
+++ b/src/util/container_heap.c
@@ -27,7 +27,7 @@
27 27
28 28
29#include "platform.h" 29#include "platform.h"
30#include "gnunet_container_lib.h" 30#include "gnunet_util_lib.h"
31 31
32#define LOG(kind, ...) GNUNET_log_from (kind, "util-container-heap", \ 32#define LOG(kind, ...) GNUNET_log_from (kind, "util-container-heap", \
33 __VA_ARGS__) 33 __VA_ARGS__)
diff --git a/src/util/container_multihashmap.c b/src/util/container_multihashmap.c
index 84e35d3cd..ab909484a 100644
--- a/src/util/container_multihashmap.c
+++ b/src/util/container_multihashmap.c
@@ -25,7 +25,7 @@
25 25
26 26
27#include "platform.h" 27#include "platform.h"
28#include "gnunet_container_lib.h" 28#include "gnunet_util_lib.h"
29 29
30#define LOG(kind, ...) \ 30#define LOG(kind, ...) \
31 GNUNET_log_from (kind, "util-container-multihashmap", __VA_ARGS__) 31 GNUNET_log_from (kind, "util-container-multihashmap", __VA_ARGS__)
diff --git a/src/util/container_multihashmap32.c b/src/util/container_multihashmap32.c
index 2ae35911b..4ff4e1678 100644
--- a/src/util/container_multihashmap32.c
+++ b/src/util/container_multihashmap32.c
@@ -27,7 +27,7 @@
27 27
28 28
29#include "platform.h" 29#include "platform.h"
30#include "gnunet_container_lib.h" 30#include "gnunet_util_lib.h"
31 31
32#define LOG(kind, ...) \ 32#define LOG(kind, ...) \
33 GNUNET_log_from (kind, "util-container-multihashmap32", __VA_ARGS__) 33 GNUNET_log_from (kind, "util-container-multihashmap32", __VA_ARGS__)
diff --git a/src/util/crypto_crc.c b/src/util/crypto_crc.c
index 7629bbffe..d33a19db2 100644
--- a/src/util/crypto_crc.c
+++ b/src/util/crypto_crc.c
@@ -29,7 +29,7 @@
29 */ 29 */
30 30
31#include "platform.h" 31#include "platform.h"
32#include "gnunet_crypto_lib.h" 32#include "gnunet_util_lib.h"
33 33
34#define LOG(kind, ...) GNUNET_log_from (kind, "util-crypto-crc", __VA_ARGS__) 34#define LOG(kind, ...) GNUNET_log_from (kind, "util-crypto-crc", __VA_ARGS__)
35 35
diff --git a/src/util/crypto_cs.c b/src/util/crypto_cs.c
index eea456792..8506c7fa6 100644
--- a/src/util/crypto_cs.c
+++ b/src/util/crypto_cs.c
@@ -26,7 +26,7 @@
26 */ 26 */
27 27
28#include "platform.h" 28#include "platform.h"
29#include "gnunet_crypto_lib.h" 29#include "gnunet_util_lib.h"
30#include <sodium.h> 30#include <sodium.h>
31#include <gcrypt.h> 31#include <gcrypt.h>
32 32
diff --git a/src/util/crypto_ecc.c b/src/util/crypto_ecc.c
index e6220d148..7f9e3c070 100644
--- a/src/util/crypto_ecc.c
+++ b/src/util/crypto_ecc.c
@@ -28,8 +28,7 @@
28#include "platform.h" 28#include "platform.h"
29#include <gcrypt.h> 29#include <gcrypt.h>
30#include <sodium.h> 30#include <sodium.h>
31#include "gnunet_crypto_lib.h" 31#include "gnunet_util_lib.h"
32#include "gnunet_strings_lib.h"
33#include "benchmark.h" 32#include "benchmark.h"
34 33
35#define EXTRA_CHECKS 0 34#define EXTRA_CHECKS 0
diff --git a/src/util/crypto_ecc_dlog.c b/src/util/crypto_ecc_dlog.c
index c193be2b7..6e333686f 100644
--- a/src/util/crypto_ecc_dlog.c
+++ b/src/util/crypto_ecc_dlog.c
@@ -28,8 +28,7 @@
28 28
29#include "platform.h" 29#include "platform.h"
30#include <gcrypt.h> 30#include <gcrypt.h>
31#include "gnunet_crypto_lib.h" 31#include "gnunet_util_lib.h"
32#include "gnunet_container_lib.h"
33 32
34 33
35/** 34/**
diff --git a/src/util/crypto_ecc_gnsrecord.c b/src/util/crypto_ecc_gnsrecord.c
index bd4a631b7..b902e0e0a 100644
--- a/src/util/crypto_ecc_gnsrecord.c
+++ b/src/util/crypto_ecc_gnsrecord.c
@@ -29,8 +29,7 @@
29#include "platform.h" 29#include "platform.h"
30#include <gcrypt.h> 30#include <gcrypt.h>
31#include <sodium.h> 31#include <sodium.h>
32#include "gnunet_crypto_lib.h" 32#include "gnunet_util_lib.h"
33#include "gnunet_strings_lib.h"
34 33
35#define CURVE "Ed25519" 34#define CURVE "Ed25519"
36 35
diff --git a/src/util/crypto_edx25519.c b/src/util/crypto_edx25519.c
index 440dd27c2..2d9a76aa3 100644
--- a/src/util/crypto_edx25519.c
+++ b/src/util/crypto_edx25519.c
@@ -30,8 +30,7 @@
30#include "platform.h" 30#include "platform.h"
31#include <gcrypt.h> 31#include <gcrypt.h>
32#include <sodium.h> 32#include <sodium.h>
33#include "gnunet_crypto_lib.h" 33#include "gnunet_util_lib.h"
34#include "gnunet_strings_lib.h"
35 34
36#define CURVE "Ed25519" 35#define CURVE "Ed25519"
37 36
diff --git a/src/util/crypto_hash.c b/src/util/crypto_hash.c
index a77a0f82a..e45cb42e0 100644
--- a/src/util/crypto_hash.c
+++ b/src/util/crypto_hash.c
@@ -25,8 +25,7 @@
25 */ 25 */
26 26
27#include "platform.h" 27#include "platform.h"
28#include "gnunet_crypto_lib.h" 28#include "gnunet_util_lib.h"
29#include "gnunet_strings_lib.h"
30#include "benchmark.h" 29#include "benchmark.h"
31#include <gcrypt.h> 30#include <gcrypt.h>
32 31
diff --git a/src/util/crypto_hkdf.c b/src/util/crypto_hkdf.c
index 22d4643eb..e724bc9ba 100644
--- a/src/util/crypto_hkdf.c
+++ b/src/util/crypto_hkdf.c
@@ -52,7 +52,7 @@
52#if GNUNET_BUILD 52#if GNUNET_BUILD
53 53
54#include "platform.h" 54#include "platform.h"
55#include "gnunet_crypto_lib.h" 55#include "gnunet_util_lib.h"
56#include "benchmark.h" 56#include "benchmark.h"
57#else 57#else
58#define GNUNET_NO 0 58#define GNUNET_NO 0
@@ -127,7 +127,7 @@ getPRK (gcry_md_hd_t mac,
127 if (0 == xts_len) 127 if (0 == xts_len)
128 { 128 {
129 char zero_salt[dlen]; 129 char zero_salt[dlen];
130 130
131 memset (zero_salt, 0, dlen); 131 memset (zero_salt, 0, dlen);
132 ret = doHMAC (mac, zero_salt, dlen, skm, skm_len); 132 ret = doHMAC (mac, zero_salt, dlen, skm, skm_len);
133 } 133 }
diff --git a/src/util/crypto_kdf.c b/src/util/crypto_kdf.c
index 039cd135f..7cfd8fea4 100644
--- a/src/util/crypto_kdf.c
+++ b/src/util/crypto_kdf.c
@@ -29,7 +29,7 @@
29#include <gcrypt.h> 29#include <gcrypt.h>
30 30
31 31
32#include "gnunet_crypto_lib.h" 32#include "gnunet_util_lib.h"
33 33
34#define LOG(kind, ...) GNUNET_log_from (kind, "util-crypto-kdf", __VA_ARGS__) 34#define LOG(kind, ...) GNUNET_log_from (kind, "util-crypto-kdf", __VA_ARGS__)
35 35
diff --git a/src/util/crypto_mpi.c b/src/util/crypto_mpi.c
index 3d810f27b..06f2fd786 100644
--- a/src/util/crypto_mpi.c
+++ b/src/util/crypto_mpi.c
@@ -27,7 +27,7 @@
27 27
28#include "platform.h" 28#include "platform.h"
29#include <gcrypt.h> 29#include <gcrypt.h>
30#include "gnunet_crypto_lib.h" 30#include "gnunet_util_lib.h"
31 31
32 32
33#define LOG(kind, ...) GNUNET_log_from (kind, "util-crypto-mpi", __VA_ARGS__) 33#define LOG(kind, ...) GNUNET_log_from (kind, "util-crypto-mpi", __VA_ARGS__)
diff --git a/src/util/crypto_pow.c b/src/util/crypto_pow.c
index 038e58cae..bfaaf555d 100644
--- a/src/util/crypto_pow.c
+++ b/src/util/crypto_pow.c
@@ -25,7 +25,7 @@
25 */ 25 */
26 26
27#include "platform.h" 27#include "platform.h"
28#include "gnunet_crypto_lib.h" 28#include "gnunet_util_lib.h"
29#include <sodium.h> 29#include <sodium.h>
30 30
31/** 31/**
diff --git a/src/util/crypto_random.c b/src/util/crypto_random.c
index 492bfdb9e..72474d04b 100644
--- a/src/util/crypto_random.c
+++ b/src/util/crypto_random.c
@@ -26,8 +26,7 @@
26 */ 26 */
27 27
28#include "platform.h" 28#include "platform.h"
29#include "gnunet_crypto_lib.h" 29#include "gnunet_util_lib.h"
30#include "gnunet_time_lib.h"
31#include <gcrypt.h> 30#include <gcrypt.h>
32 31
33#define LOG(kind, ...) GNUNET_log_from (kind, "util-crypto-random", __VA_ARGS__) 32#define LOG(kind, ...) GNUNET_log_from (kind, "util-crypto-random", __VA_ARGS__)
diff --git a/src/util/crypto_rsa.c b/src/util/crypto_rsa.c
index 4a866a5df..2c446d21a 100644
--- a/src/util/crypto_rsa.c
+++ b/src/util/crypto_rsa.c
@@ -28,7 +28,7 @@
28 28
29#include "platform.h" 29#include "platform.h"
30#include <gcrypt.h> 30#include <gcrypt.h>
31#include "gnunet_crypto_lib.h" 31#include "gnunet_util_lib.h"
32#include "benchmark.h" 32#include "benchmark.h"
33 33
34#define LOG(kind, ...) GNUNET_log_from (kind, "util-crypto-rsa", __VA_ARGS__) 34#define LOG(kind, ...) GNUNET_log_from (kind, "util-crypto-rsa", __VA_ARGS__)
diff --git a/src/util/crypto_symmetric.c b/src/util/crypto_symmetric.c
index f663f2da1..a9217febd 100644
--- a/src/util/crypto_symmetric.c
+++ b/src/util/crypto_symmetric.c
@@ -27,7 +27,7 @@
27 27
28 28
29#include "platform.h" 29#include "platform.h"
30#include "gnunet_crypto_lib.h" 30#include "gnunet_util_lib.h"
31#include <gcrypt.h> 31#include <gcrypt.h>
32 32
33#define LOG(kind, ...) GNUNET_log_from (kind, "util-crypto-symmetric", \ 33#define LOG(kind, ...) GNUNET_log_from (kind, "util-crypto-symmetric", \
diff --git a/src/util/disk.c b/src/util/disk.c
index 4ccadc78e..1d0e14b98 100644
--- a/src/util/disk.c
+++ b/src/util/disk.c
@@ -25,9 +25,7 @@
25 */ 25 */
26 26
27#include "platform.h" 27#include "platform.h"
28#include "disk.h" 28#include "gnunet_util_lib.h"
29#include "gnunet_strings_lib.h"
30#include "gnunet_disk_lib.h"
31 29
32#define LOG(kind, ...) GNUNET_log_from (kind, "util-disk", __VA_ARGS__) 30#define LOG(kind, ...) GNUNET_log_from (kind, "util-disk", __VA_ARGS__)
33 31
diff --git a/src/util/disk.h b/src/util/disk.h
index 89ff76687..bca398e26 100644
--- a/src/util/disk.h
+++ b/src/util/disk.h
@@ -26,8 +26,7 @@
26#ifndef GNUNET_DISK_H_ 26#ifndef GNUNET_DISK_H_
27#define GNUNET_DISK_H_ 27#define GNUNET_DISK_H_
28 28
29#include "gnunet_crypto_lib.h" 29#include "gnunet_util_lib.h"
30#include "gnunet_disk_lib.h"
31 30
32/** 31/**
33 * Retrieve OS file handle 32 * Retrieve OS file handle
diff --git a/src/util/helper.c b/src/util/helper.c
index ad4423f3a..fe8643d31 100644
--- a/src/util/helper.c
+++ b/src/util/helper.c
@@ -28,8 +28,6 @@
28 28
29#include "platform.h" 29#include "platform.h"
30#include "gnunet_util_lib.h" 30#include "gnunet_util_lib.h"
31#include "gnunet_mst_lib.h"
32
33 31
34/** 32/**
35 * Entry in the queue of messages we need to transmit to the helper. 33 * Entry in the queue of messages we need to transmit to the helper.
diff --git a/src/util/network.c b/src/util/network.c
index 82b6ee464..ac3de89bf 100644
--- a/src/util/network.c
+++ b/src/util/network.c
@@ -26,7 +26,6 @@
26 */ 26 */
27 27
28#include "platform.h" 28#include "platform.h"
29#include "gnunet_util_lib.h"
30#include "disk.h" 29#include "disk.h"
31 30
32#define LOG(kind, ...) GNUNET_log_from (kind, "util-network", __VA_ARGS__) 31#define LOG(kind, ...) GNUNET_log_from (kind, "util-network", __VA_ARGS__)
diff --git a/src/util/peer.c b/src/util/peer.c
index c82317654..e5c15b098 100644
--- a/src/util/peer.c
+++ b/src/util/peer.c
@@ -25,7 +25,7 @@
25 */ 25 */
26 26
27#include "platform.h" 27#include "platform.h"
28#include "gnunet_peer_lib.h" 28#include "gnunet_util_lib.h"
29 29
30#define LOG(kind, ...) GNUNET_log_from (kind, "util-peer", __VA_ARGS__) 30#define LOG(kind, ...) GNUNET_log_from (kind, "util-peer", __VA_ARGS__)
31 31
diff --git a/src/util/proc_compat.c b/src/util/proc_compat.c
index a278ec045..0423a0d5c 100644
--- a/src/util/proc_compat.c
+++ b/src/util/proc_compat.c
@@ -27,7 +27,6 @@
27 */ 27 */
28 28
29#include "platform.h" 29#include "platform.h"
30#include "platform.h"
31 30
32/** 31/**
33 * memrchr as defined in glibc 32 * memrchr as defined in glibc
diff --git a/src/util/regex.c b/src/util/regex.c
index f06fd85d6..282d3aa99 100644
--- a/src/util/regex.c
+++ b/src/util/regex.c
@@ -26,7 +26,6 @@
26 26
27#include "platform.h" 27#include "platform.h"
28#include "gnunet_util_lib.h" 28#include "gnunet_util_lib.h"
29#include "gnunet_tun_lib.h"
30 29
31/** 30/**
32 * 'wildcard', matches all possible values (for HEX encoding). 31 * 'wildcard', matches all possible values (for HEX encoding).
diff --git a/src/util/strings.c b/src/util/strings.c
index 817e4d3ce..479c0fcd6 100644
--- a/src/util/strings.c
+++ b/src/util/strings.c
@@ -29,9 +29,7 @@
29#if HAVE_ICONV 29#if HAVE_ICONV
30#include <iconv.h> 30#include <iconv.h>
31#endif 31#endif
32#include "gnunet_crypto_lib.h" 32#include "gnunet_util_lib.h"
33#include "gnunet_buffer_lib.h"
34#include "gnunet_strings_lib.h"
35#include <unicase.h> 33#include <unicase.h>
36#include <unistr.h> 34#include <unistr.h>
37#include <uniconv.h> 35#include <uniconv.h>
diff --git a/src/util/test_plugin_plug.c b/src/util/test_plugin_plug.c
index f8b0b89f4..ed582517b 100644
--- a/src/util/test_plugin_plug.c
+++ b/src/util/test_plugin_plug.c
@@ -23,7 +23,6 @@
23 */ 23 */
24 24
25#include "platform.h" 25#include "platform.h"
26#include "platform.h"
27 26
28 27
29void * 28void *