diff options
author | Christian Grothoff <christian@grothoff.org> | 2013-09-30 19:24:12 +0000 |
---|---|---|
committer | Christian Grothoff <christian@grothoff.org> | 2013-09-30 19:24:12 +0000 |
commit | 427dd6f998fb1fde515a3b5c800f9f6d308197b2 (patch) | |
tree | 8cbe9bf7b43fafae07ed1a25753ccccdbe430148 /src/util | |
parent | b18fa7b1e7fcb4d48e2ef314a7d822ccddd8bd60 (diff) | |
download | gnunet-427dd6f998fb1fde515a3b5c800f9f6d308197b2.tar.gz gnunet-427dd6f998fb1fde515a3b5c800f9f6d308197b2.zip |
-towards addressing #3047, note this causes the code to FTBFS
Diffstat (limited to 'src/util')
79 files changed, 111 insertions, 275 deletions
diff --git a/src/util/Makefile.am b/src/util/Makefile.am index ee3349db7..564204862 100644 --- a/src/util/Makefile.am +++ b/src/util/Makefile.am | |||
@@ -416,7 +416,7 @@ test_os_network_LDADD = \ | |||
416 | test_peer_SOURCES = \ | 416 | test_peer_SOURCES = \ |
417 | test_peer.c | 417 | test_peer.c |
418 | test_peer_LDADD = \ | 418 | test_peer_LDADD = \ |
419 | $(top_builddir)/src/util/libgnunetutil.la | 419 | $(top_builddir)/src/util/libgnunetutil.la -lgcrypt |
420 | 420 | ||
421 | test_plugin_SOURCES = \ | 421 | test_plugin_SOURCES = \ |
422 | test_plugin.c | 422 | test_plugin.c |
diff --git a/src/util/common_allocation.c b/src/util/common_allocation.c index a7f6d1c67..27dda5e59 100644 --- a/src/util/common_allocation.c +++ b/src/util/common_allocation.c | |||
@@ -24,7 +24,7 @@ | |||
24 | * @author Christian Grothoff | 24 | * @author Christian Grothoff |
25 | */ | 25 | */ |
26 | #include "platform.h" | 26 | #include "platform.h" |
27 | #include "gnunet_common.h" | 27 | #include "gnunet_util_lib.h" |
28 | #if HAVE_MALLOC_H | 28 | #if HAVE_MALLOC_H |
29 | #include <malloc.h> | 29 | #include <malloc.h> |
30 | #endif | 30 | #endif |
diff --git a/src/util/common_endian.c b/src/util/common_endian.c index 3d69f99e3..247e9e876 100644 --- a/src/util/common_endian.c +++ b/src/util/common_endian.c | |||
@@ -25,7 +25,7 @@ | |||
25 | */ | 25 | */ |
26 | 26 | ||
27 | #include "platform.h" | 27 | #include "platform.h" |
28 | #include "gnunet_common.h" | 28 | #include "gnunet_util_lib.h" |
29 | 29 | ||
30 | #define LOG(kind,...) GNUNET_log_from (kind, "util",__VA_ARGS__) | 30 | #define LOG(kind,...) GNUNET_log_from (kind, "util",__VA_ARGS__) |
31 | 31 | ||
diff --git a/src/util/common_logging.c b/src/util/common_logging.c index 0c9973d44..6493aae38 100644 --- a/src/util/common_logging.c +++ b/src/util/common_logging.c | |||
@@ -25,7 +25,6 @@ | |||
25 | * @author Christian Grothoff | 25 | * @author Christian Grothoff |
26 | */ | 26 | */ |
27 | #include "platform.h" | 27 | #include "platform.h" |
28 | #include "gnunet_common.h" | ||
29 | #include "gnunet_util_lib.h" | 28 | #include "gnunet_util_lib.h" |
30 | #include <regex.h> | 29 | #include <regex.h> |
31 | 30 | ||
@@ -1082,16 +1081,19 @@ GNUNET_h2s_full (const struct GNUNET_HashCode * hc) | |||
1082 | * | 1081 | * |
1083 | * @param pid the peer identity | 1082 | * @param pid the peer identity |
1084 | * @return string form of the pid; will be overwritten by next | 1083 | * @return string form of the pid; will be overwritten by next |
1085 | * call to GNUNET_i2s. | 1084 | * call to #GNUNET_i2s. |
1086 | */ | 1085 | */ |
1087 | const char * | 1086 | const char * |
1088 | GNUNET_i2s (const struct GNUNET_PeerIdentity *pid) | 1087 | GNUNET_i2s (const struct GNUNET_PeerIdentity *pid) |
1089 | { | 1088 | { |
1090 | static struct GNUNET_CRYPTO_HashAsciiEncoded ret; | 1089 | static char buf[256]; |
1091 | 1090 | char *ret; | |
1092 | GNUNET_CRYPTO_hash_to_enc (&pid->hashPubKey, &ret); | 1091 | |
1093 | ret.encoding[4] = '\0'; | 1092 | ret = GNUNET_CRYPTO_ecc_public_sign_key_to_string (&pid->public_key); |
1094 | return (const char *) ret.encoding; | 1093 | strcpy (buf, ret); |
1094 | GNUNET_free (ret); | ||
1095 | buf[4] = '\0'; | ||
1096 | return buf; | ||
1095 | } | 1097 | } |
1096 | 1098 | ||
1097 | 1099 | ||
@@ -1102,15 +1104,18 @@ GNUNET_i2s (const struct GNUNET_PeerIdentity *pid) | |||
1102 | * | 1104 | * |
1103 | * @param pid the peer identity | 1105 | * @param pid the peer identity |
1104 | * @return string form of the pid; will be overwritten by next | 1106 | * @return string form of the pid; will be overwritten by next |
1105 | * call to GNUNET_i2s. | 1107 | * call to #GNUNET_i2s_full. |
1106 | */ | 1108 | */ |
1107 | const char * | 1109 | const char * |
1108 | GNUNET_i2s_full (const struct GNUNET_PeerIdentity *pid) | 1110 | GNUNET_i2s_full (const struct GNUNET_PeerIdentity *pid) |
1109 | { | 1111 | { |
1110 | static struct GNUNET_CRYPTO_HashAsciiEncoded ret; | 1112 | static char buf[256]; |
1113 | char *ret; | ||
1111 | 1114 | ||
1112 | GNUNET_CRYPTO_hash_to_enc (&pid->hashPubKey, &ret); | 1115 | ret = GNUNET_CRYPTO_ecc_public_sign_key_to_string (&pid->public_key); |
1113 | return (const char *) ret.encoding; | 1116 | strcpy (buf, ret); |
1117 | GNUNET_free (ret); | ||
1118 | return buf; | ||
1114 | } | 1119 | } |
1115 | 1120 | ||
1116 | 1121 | ||
diff --git a/src/util/configuration.c b/src/util/configuration.c index 0899ed7c9..69e2168c1 100644 --- a/src/util/configuration.c +++ b/src/util/configuration.c | |||
@@ -25,10 +25,7 @@ | |||
25 | */ | 25 | */ |
26 | 26 | ||
27 | #include "platform.h" | 27 | #include "platform.h" |
28 | #include "gnunet_common.h" | ||
29 | #include "gnunet_util_lib.h" | 28 | #include "gnunet_util_lib.h" |
30 | #include "gnunet_crypto_lib.h" | ||
31 | #include "gnunet_strings_lib.h" | ||
32 | 29 | ||
33 | #define LOG(kind,...) GNUNET_log_from (kind, "util", __VA_ARGS__) | 30 | #define LOG(kind,...) GNUNET_log_from (kind, "util", __VA_ARGS__) |
34 | 31 | ||
diff --git a/src/util/connection.c b/src/util/connection.c index 3290abcfc..e90fa9f51 100644 --- a/src/util/connection.c +++ b/src/util/connection.c | |||
@@ -30,9 +30,7 @@ | |||
30 | * These rules should apply in general, but for this | 30 | * These rules should apply in general, but for this |
31 | * module they are VERY, VERY important. | 31 | * module they are VERY, VERY important. |
32 | */ | 32 | */ |
33 | |||
34 | #include "platform.h" | 33 | #include "platform.h" |
35 | #include "gnunet_common.h" | ||
36 | #include "gnunet_util_lib.h" | 34 | #include "gnunet_util_lib.h" |
37 | #include "gnunet_resolver_service.h" | 35 | #include "gnunet_resolver_service.h" |
38 | 36 | ||
diff --git a/src/util/container_bloomfilter.c b/src/util/container_bloomfilter.c index 825a45f55..f9487f98f 100644 --- a/src/util/container_bloomfilter.c +++ b/src/util/container_bloomfilter.c | |||
@@ -40,9 +40,7 @@ | |||
40 | */ | 40 | */ |
41 | 41 | ||
42 | #include "platform.h" | 42 | #include "platform.h" |
43 | #include "gnunet_common.h" | 43 | #include "gnunet_util_lib.h" |
44 | #include "gnunet_container_lib.h" | ||
45 | #include "gnunet_disk_lib.h" | ||
46 | 44 | ||
47 | #define LOG(kind,...) GNUNET_log_from (kind, "util", __VA_ARGS__) | 45 | #define LOG(kind,...) GNUNET_log_from (kind, "util", __VA_ARGS__) |
48 | 46 | ||
diff --git a/src/util/container_meta_data.c b/src/util/container_meta_data.c index 777e0b6c3..6e77c40a2 100644 --- a/src/util/container_meta_data.c +++ b/src/util/container_meta_data.c | |||
@@ -25,10 +25,7 @@ | |||
25 | */ | 25 | */ |
26 | 26 | ||
27 | #include "platform.h" | 27 | #include "platform.h" |
28 | #include "gnunet_common.h" | 28 | #include "gnunet_util_lib.h" |
29 | #include "gnunet_container_lib.h" | ||
30 | #include "gnunet_strings_lib.h" | ||
31 | #include "gnunet_time_lib.h" | ||
32 | #include <extractor.h> | 29 | #include <extractor.h> |
33 | #include <zlib.h> | 30 | #include <zlib.h> |
34 | 31 | ||
diff --git a/src/util/container_multihashmap.c b/src/util/container_multihashmap.c index 5d12644cf..24eae9f0d 100644 --- a/src/util/container_multihashmap.c +++ b/src/util/container_multihashmap.c | |||
@@ -24,9 +24,7 @@ | |||
24 | */ | 24 | */ |
25 | 25 | ||
26 | #include "platform.h" | 26 | #include "platform.h" |
27 | #include "gnunet_common.h" | 27 | #include "gnunet_util_lib.h" |
28 | #include "gnunet_container_lib.h" | ||
29 | #include "gnunet_crypto_lib.h" | ||
30 | 28 | ||
31 | #define LOG(kind,...) GNUNET_log_from (kind, "util", __VA_ARGS__) | 29 | #define LOG(kind,...) GNUNET_log_from (kind, "util", __VA_ARGS__) |
32 | 30 | ||
diff --git a/src/util/container_multihashmap32.c b/src/util/container_multihashmap32.c index 29ad14d3a..5448a3cde 100644 --- a/src/util/container_multihashmap32.c +++ b/src/util/container_multihashmap32.c | |||
@@ -26,9 +26,7 @@ | |||
26 | */ | 26 | */ |
27 | 27 | ||
28 | #include "platform.h" | 28 | #include "platform.h" |
29 | #include "gnunet_common.h" | 29 | #include "gnunet_util_lib.h" |
30 | #include "gnunet_container_lib.h" | ||
31 | #include "gnunet_crypto_lib.h" | ||
32 | 30 | ||
33 | #define LOG(kind,...) GNUNET_log_from (kind, "util", __VA_ARGS__) | 31 | #define LOG(kind,...) GNUNET_log_from (kind, "util", __VA_ARGS__) |
34 | 32 | ||
diff --git a/src/util/container_multipeermap.c b/src/util/container_multipeermap.c index 6519f6c84..54a1d1635 100644 --- a/src/util/container_multipeermap.c +++ b/src/util/container_multipeermap.c | |||
@@ -24,9 +24,7 @@ | |||
24 | */ | 24 | */ |
25 | 25 | ||
26 | #include "platform.h" | 26 | #include "platform.h" |
27 | #include "gnunet_common.h" | 27 | #include "gnunet_util_lib.h" |
28 | #include "gnunet_container_lib.h" | ||
29 | #include "gnunet_crypto_lib.h" | ||
30 | 28 | ||
31 | #define LOG(kind,...) GNUNET_log_from (kind, "util", __VA_ARGS__) | 29 | #define LOG(kind,...) GNUNET_log_from (kind, "util", __VA_ARGS__) |
32 | 30 | ||
diff --git a/src/util/crypto_crc.c b/src/util/crypto_crc.c index 82ca59456..cda6243be 100644 --- a/src/util/crypto_crc.c +++ b/src/util/crypto_crc.c | |||
@@ -28,8 +28,7 @@ | |||
28 | * @author Christian Grothoff | 28 | * @author Christian Grothoff |
29 | */ | 29 | */ |
30 | #include "platform.h" | 30 | #include "platform.h" |
31 | #include "gnunet_common.h" | 31 | #include "gnunet_util_lib.h" |
32 | #include "gnunet_crypto_lib.h" | ||
33 | 32 | ||
34 | #define LOG(kind,...) GNUNET_log_from (kind, "util", __VA_ARGS__) | 33 | #define LOG(kind,...) GNUNET_log_from (kind, "util", __VA_ARGS__) |
35 | 34 | ||
diff --git a/src/util/crypto_ecc.c b/src/util/crypto_ecc.c index e393ad1e5..770b0c37c 100644 --- a/src/util/crypto_ecc.c +++ b/src/util/crypto_ecc.c | |||
@@ -25,7 +25,6 @@ | |||
25 | */ | 25 | */ |
26 | #include "platform.h" | 26 | #include "platform.h" |
27 | #include <gcrypt.h> | 27 | #include <gcrypt.h> |
28 | #include "gnunet_common.h" | ||
29 | #include "gnunet_util_lib.h" | 28 | #include "gnunet_util_lib.h" |
30 | 29 | ||
31 | #define EXTRA_CHECKS ALLOW_EXTRA_CHECKS | 30 | #define EXTRA_CHECKS ALLOW_EXTRA_CHECKS |
@@ -746,7 +745,6 @@ GNUNET_CRYPTO_get_host_identity (const struct GNUNET_CONFIGURATION_Handle *cfg, | |||
746 | struct GNUNET_PeerIdentity *dst) | 745 | struct GNUNET_PeerIdentity *dst) |
747 | { | 746 | { |
748 | struct GNUNET_CRYPTO_EccPrivateKey *priv; | 747 | struct GNUNET_CRYPTO_EccPrivateKey *priv; |
749 | struct GNUNET_CRYPTO_EccPublicSignKey pub; | ||
750 | 748 | ||
751 | if (NULL == (priv = GNUNET_CRYPTO_ecc_key_create_from_configuration (cfg))) | 749 | if (NULL == (priv = GNUNET_CRYPTO_ecc_key_create_from_configuration (cfg))) |
752 | { | 750 | { |
@@ -754,9 +752,8 @@ GNUNET_CRYPTO_get_host_identity (const struct GNUNET_CONFIGURATION_Handle *cfg, | |||
754 | _("Could not load peer's private key\n")); | 752 | _("Could not load peer's private key\n")); |
755 | return GNUNET_SYSERR; | 753 | return GNUNET_SYSERR; |
756 | } | 754 | } |
757 | GNUNET_CRYPTO_ecc_key_get_public_for_signature (priv, &pub); | 755 | GNUNET_CRYPTO_ecc_key_get_public_for_signature (priv, &dst->public_key); |
758 | GNUNET_free (priv); | 756 | GNUNET_free (priv); |
759 | GNUNET_CRYPTO_hash (&pub, sizeof (pub), &dst->hashPubKey); | ||
760 | return GNUNET_OK; | 757 | return GNUNET_OK; |
761 | } | 758 | } |
762 | 759 | ||
diff --git a/src/util/crypto_hash.c b/src/util/crypto_hash.c index e1997c3bb..67cf92d17 100644 --- a/src/util/crypto_hash.c +++ b/src/util/crypto_hash.c | |||
@@ -26,10 +26,7 @@ | |||
26 | */ | 26 | */ |
27 | 27 | ||
28 | #include "platform.h" | 28 | #include "platform.h" |
29 | #include "gnunet_common.h" | 29 | #include "gnunet_util_lib.h" |
30 | #include "gnunet_crypto_lib.h" | ||
31 | #include "gnunet_disk_lib.h" | ||
32 | #include "gnunet_strings_lib.h" | ||
33 | #include <gcrypt.h> | 30 | #include <gcrypt.h> |
34 | 31 | ||
35 | #define LOG(kind,...) GNUNET_log_from (kind, "util", __VA_ARGS__) | 32 | #define LOG(kind,...) GNUNET_log_from (kind, "util", __VA_ARGS__) |
diff --git a/src/util/crypto_random.c b/src/util/crypto_random.c index 935bbc3ea..e3388faad 100644 --- a/src/util/crypto_random.c +++ b/src/util/crypto_random.c | |||
@@ -25,9 +25,7 @@ | |||
25 | * @author Christian Grothoff | 25 | * @author Christian Grothoff |
26 | */ | 26 | */ |
27 | #include "platform.h" | 27 | #include "platform.h" |
28 | #include "gnunet_common.h" | 28 | #include "gnunet_util_lib.h" |
29 | #include "gnunet_crypto_lib.h" | ||
30 | #include "gnunet_os_lib.h" | ||
31 | #include <gcrypt.h> | 29 | #include <gcrypt.h> |
32 | 30 | ||
33 | #define LOG(kind,...) GNUNET_log_from (kind, "util", __VA_ARGS__) | 31 | #define LOG(kind,...) GNUNET_log_from (kind, "util", __VA_ARGS__) |
diff --git a/src/util/crypto_symmetric.c b/src/util/crypto_symmetric.c index 3e4f9d748..3cc546652 100644 --- a/src/util/crypto_symmetric.c +++ b/src/util/crypto_symmetric.c | |||
@@ -26,8 +26,7 @@ | |||
26 | */ | 26 | */ |
27 | 27 | ||
28 | #include "platform.h" | 28 | #include "platform.h" |
29 | #include "gnunet_common.h" | 29 | #include "gnunet_util_lib.h" |
30 | #include "gnunet_crypto_lib.h" | ||
31 | #include <gcrypt.h> | 30 | #include <gcrypt.h> |
32 | 31 | ||
33 | #define LOG(kind,...) GNUNET_log_from (kind, "util", __VA_ARGS__) | 32 | #define LOG(kind,...) GNUNET_log_from (kind, "util", __VA_ARGS__) |
diff --git a/src/util/disk.c b/src/util/disk.c index 066b0b99b..7729fd8ee 100644 --- a/src/util/disk.c +++ b/src/util/disk.c | |||
@@ -26,12 +26,8 @@ | |||
26 | */ | 26 | */ |
27 | 27 | ||
28 | #include "platform.h" | 28 | #include "platform.h" |
29 | #include "gnunet_common.h" | ||
30 | #include "gnunet_directories.h" | 29 | #include "gnunet_directories.h" |
31 | #include "gnunet_disk_lib.h" | 30 | #include "gnunet_util_lib.h" |
32 | #include "gnunet_scheduler_lib.h" | ||
33 | #include "gnunet_strings_lib.h" | ||
34 | #include "gnunet_crypto_lib.h" | ||
35 | #include "disk.h" | 31 | #include "disk.h" |
36 | 32 | ||
37 | #define LOG(kind,...) GNUNET_log_from (kind, "util", __VA_ARGS__) | 33 | #define LOG(kind,...) GNUNET_log_from (kind, "util", __VA_ARGS__) |
diff --git a/src/util/disk.h b/src/util/disk.h index 890281a93..fa786ea68 100644 --- a/src/util/disk.h +++ b/src/util/disk.h | |||
@@ -26,7 +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_disk_lib.h" | 29 | #include "gnunet_util_lib.h" |
30 | 30 | ||
31 | /** | 31 | /** |
32 | * Retrieve OS file handle | 32 | * Retrieve OS file handle |
@@ -34,8 +34,8 @@ | |||
34 | * @internal | 34 | * @internal |
35 | * @param fh GNUnet file descriptor | 35 | * @param fh GNUnet file descriptor |
36 | * @param dst destination buffer | 36 | * @param dst destination buffer |
37 | * @param dst_len length of dst | 37 | * @param dst_len length of @a dst |
38 | * @return GNUNET_OK on success, GNUNET_SYSERR otherwise | 38 | * @return #GNUNET_OK on success, #GNUNET_SYSERR otherwise |
39 | */ | 39 | */ |
40 | int | 40 | int |
41 | GNUNET_DISK_internal_file_handle_ (const struct GNUNET_DISK_FileHandle *fh, | 41 | GNUNET_DISK_internal_file_handle_ (const struct GNUNET_DISK_FileHandle *fh, |
diff --git a/src/util/getopt.c b/src/util/getopt.c index 936e3b1e3..7b2f3cf5d 100644 --- a/src/util/getopt.c +++ b/src/util/getopt.c | |||
@@ -37,10 +37,8 @@ Copyright (C) 2006 Christian Grothoff | |||
37 | * replace main GNU getopt parser with one that | 37 | * replace main GNU getopt parser with one that |
38 | * actually fits our API. | 38 | * actually fits our API. |
39 | */ | 39 | */ |
40 | |||
41 | #include "platform.h" | 40 | #include "platform.h" |
42 | #include "gnunet_common.h" | 41 | #include "gnunet_util_lib.h" |
43 | #include "gnunet_getopt_lib.h" | ||
44 | 42 | ||
45 | #ifdef VMS | 43 | #ifdef VMS |
46 | #include <unixlib.h> | 44 | #include <unixlib.h> |
diff --git a/src/util/getopt_helpers.c b/src/util/getopt_helpers.c index 349f9e477..798ced005 100644 --- a/src/util/getopt_helpers.c +++ b/src/util/getopt_helpers.c | |||
@@ -23,9 +23,7 @@ | |||
23 | * @brief implements command line that sets option | 23 | * @brief implements command line that sets option |
24 | * @author Christian Grothoff | 24 | * @author Christian Grothoff |
25 | */ | 25 | */ |
26 | |||
27 | #include "platform.h" | 26 | #include "platform.h" |
28 | #include "gnunet_common.h" | ||
29 | #include "gnunet_util_lib.h" | 27 | #include "gnunet_util_lib.h" |
30 | 28 | ||
31 | #define LOG(kind,...) GNUNET_log_from (kind, "util", __VA_ARGS__) | 29 | #define LOG(kind,...) GNUNET_log_from (kind, "util", __VA_ARGS__) |
diff --git a/src/util/gnunet-ecc.c b/src/util/gnunet-ecc.c index 9f76d6b8e..59c0f5fe2 100644 --- a/src/util/gnunet-ecc.c +++ b/src/util/gnunet-ecc.c | |||
@@ -111,7 +111,6 @@ run (void *cls, char *const *args, const char *cfgfile, | |||
111 | { | 111 | { |
112 | struct GNUNET_CRYPTO_EccPrivateKey *pk; | 112 | struct GNUNET_CRYPTO_EccPrivateKey *pk; |
113 | struct GNUNET_CRYPTO_EccPublicSignKey pub; | 113 | struct GNUNET_CRYPTO_EccPublicSignKey pub; |
114 | struct GNUNET_PeerIdentity pid; | ||
115 | 114 | ||
116 | if (NULL == args[0]) | 115 | if (NULL == args[0]) |
117 | { | 116 | { |
@@ -137,12 +136,14 @@ run (void *cls, char *const *args, const char *cfgfile, | |||
137 | } | 136 | } |
138 | if (print_peer_identity) | 137 | if (print_peer_identity) |
139 | { | 138 | { |
140 | struct GNUNET_CRYPTO_HashAsciiEncoded enc; | 139 | char *str; |
141 | 140 | ||
142 | GNUNET_CRYPTO_ecc_key_get_public_for_signature (pk, &pub); | 141 | GNUNET_CRYPTO_ecc_key_get_public_for_signature (pk, &pub); |
143 | GNUNET_CRYPTO_hash (&pub, sizeof (pub), &pid.hashPubKey); | 142 | str = GNUNET_CRYPTO_ecc_public_sign_key_to_string (&pub); |
144 | GNUNET_CRYPTO_hash_to_enc (&pid.hashPubKey, &enc); | 143 | fprintf (stdout, |
145 | fprintf (stdout, "%s\n", enc.encoding); | 144 | "%s\n", |
145 | str); | ||
146 | GNUNET_free (str); | ||
146 | } | 147 | } |
147 | GNUNET_free (pk); | 148 | GNUNET_free (pk); |
148 | } | 149 | } |
diff --git a/src/util/mq.c b/src/util/mq.c index 289ac1ade..733329a2c 100644 --- a/src/util/mq.c +++ b/src/util/mq.c | |||
@@ -23,9 +23,7 @@ | |||
23 | * @file util/mq.c | 23 | * @file util/mq.c |
24 | * @brief general purpose request queue | 24 | * @brief general purpose request queue |
25 | */ | 25 | */ |
26 | |||
27 | #include "platform.h" | 26 | #include "platform.h" |
28 | #include "gnunet_common.h" | ||
29 | #include "gnunet_util_lib.h" | 27 | #include "gnunet_util_lib.h" |
30 | 28 | ||
31 | #define LOG(kind,...) GNUNET_log_from (kind, "mq",__VA_ARGS__) | 29 | #define LOG(kind,...) GNUNET_log_from (kind, "mq",__VA_ARGS__) |
diff --git a/src/util/network.c b/src/util/network.c index c0b977368..162948420 100644 --- a/src/util/network.c +++ b/src/util/network.c | |||
@@ -25,8 +25,8 @@ | |||
25 | * @author Christian Grothoff | 25 | * @author Christian Grothoff |
26 | */ | 26 | */ |
27 | #include "platform.h" | 27 | #include "platform.h" |
28 | #include "disk.h" | ||
29 | #include "gnunet_util_lib.h" | 28 | #include "gnunet_util_lib.h" |
29 | #include "disk.h" | ||
30 | 30 | ||
31 | #define LOG(kind,...) GNUNET_log_from (kind, "util", __VA_ARGS__) | 31 | #define LOG(kind,...) GNUNET_log_from (kind, "util", __VA_ARGS__) |
32 | #define LOG_STRERROR_FILE(kind,syscall,filename) GNUNET_log_from_strerror_file (kind, "util", syscall, filename) | 32 | #define LOG_STRERROR_FILE(kind,syscall,filename) GNUNET_log_from_strerror_file (kind, "util", syscall, filename) |
diff --git a/src/util/os_installation.c b/src/util/os_installation.c index a596ca2c0..06eb4ed60 100644 --- a/src/util/os_installation.c +++ b/src/util/os_installation.c | |||
@@ -30,11 +30,7 @@ | |||
30 | #include <unistr.h> /* for u16_to_u8 */ | 30 | #include <unistr.h> /* for u16_to_u8 */ |
31 | 31 | ||
32 | #include "platform.h" | 32 | #include "platform.h" |
33 | #include "gnunet_common.h" | 33 | #include "gnunet_util_lib.h" |
34 | #include "gnunet_configuration_lib.h" | ||
35 | #include "gnunet_disk_lib.h" | ||
36 | #include "gnunet_os_lib.h" | ||
37 | #include "gnunet_strings_lib.h" | ||
38 | #if DARWIN | 34 | #if DARWIN |
39 | #include <mach-o/ldsyms.h> | 35 | #include <mach-o/ldsyms.h> |
40 | #include <mach-o/dyld.h> | 36 | #include <mach-o/dyld.h> |
diff --git a/src/util/os_network.c b/src/util/os_network.c index b11f07157..4d9155ae2 100644 --- a/src/util/os_network.c +++ b/src/util/os_network.c | |||
@@ -27,10 +27,8 @@ | |||
27 | * @author Jake Dust | 27 | * @author Jake Dust |
28 | * @author LRN | 28 | * @author LRN |
29 | */ | 29 | */ |
30 | |||
31 | #include "platform.h" | 30 | #include "platform.h" |
32 | #include "gnunet_common.h" | 31 | #include "gnunet_util_lib.h" |
33 | #include "gnunet_os_lib.h" | ||
34 | 32 | ||
35 | 33 | ||
36 | #define LOG(kind,...) GNUNET_log_from (kind, "util", __VA_ARGS__) | 34 | #define LOG(kind,...) GNUNET_log_from (kind, "util", __VA_ARGS__) |
diff --git a/src/util/os_priority.c b/src/util/os_priority.c index f019bd605..7a6d93858 100644 --- a/src/util/os_priority.c +++ b/src/util/os_priority.c | |||
@@ -25,11 +25,7 @@ | |||
25 | */ | 25 | */ |
26 | 26 | ||
27 | #include "platform.h" | 27 | #include "platform.h" |
28 | #include "gnunet_common.h" | 28 | #include "gnunet_util_lib.h" |
29 | #include "gnunet_os_lib.h" | ||
30 | #include "gnunet_scheduler_lib.h" | ||
31 | #include "gnunet_strings_lib.h" | ||
32 | #include "gnunet_crypto_lib.h" | ||
33 | #include "disk.h" | 29 | #include "disk.h" |
34 | #include <unistr.h> | 30 | #include <unistr.h> |
35 | 31 | ||
diff --git a/src/util/peer.c b/src/util/peer.c index e58b96211..08062e364 100644 --- a/src/util/peer.c +++ b/src/util/peer.c | |||
@@ -23,7 +23,6 @@ | |||
23 | * @brief peer-ID table that assigns integer IDs to peer-IDs to save memory | 23 | * @brief peer-ID table that assigns integer IDs to peer-IDs to save memory |
24 | * @author Christian Grothoff | 24 | * @author Christian Grothoff |
25 | */ | 25 | */ |
26 | |||
27 | #include "platform.h" | 26 | #include "platform.h" |
28 | #include "gnunet_peer_lib.h" | 27 | #include "gnunet_peer_lib.h" |
29 | 28 | ||
@@ -56,11 +55,11 @@ struct PeerEntry | |||
56 | static struct PeerEntry **table; | 55 | static struct PeerEntry **table; |
57 | 56 | ||
58 | /** | 57 | /** |
59 | * Hashmap of PeerIdentities to "struct PeerEntry" | 58 | * Peermap of PeerIdentities to "struct PeerEntry" |
60 | * (for fast lookup). NULL until the library | 59 | * (for fast lookup). NULL until the library |
61 | * is actually being used. | 60 | * is actually being used. |
62 | */ | 61 | */ |
63 | static struct GNUNET_CONTAINER_MultiHashMap *map; | 62 | static struct GNUNET_CONTAINER_MultiPeerMap *map; |
64 | 63 | ||
65 | /** | 64 | /** |
66 | * Size of the "table". | 65 | * Size of the "table". |
@@ -89,7 +88,7 @@ GNUNET_PEER_search (const struct GNUNET_PeerIdentity *pid) | |||
89 | return 0; | 88 | return 0; |
90 | if (NULL == map) | 89 | if (NULL == map) |
91 | return 0; | 90 | return 0; |
92 | e = GNUNET_CONTAINER_multihashmap_get (map, &pid->hashPubKey); | 91 | e = GNUNET_CONTAINER_multipeermap_get (map, pid); |
93 | if (NULL == e) | 92 | if (NULL == e) |
94 | return 0; | 93 | return 0; |
95 | GNUNET_assert (e->rc > 0); | 94 | GNUNET_assert (e->rc > 0); |
@@ -114,8 +113,8 @@ GNUNET_PEER_intern (const struct GNUNET_PeerIdentity *pid) | |||
114 | if (NULL == pid) | 113 | if (NULL == pid) |
115 | return 0; | 114 | return 0; |
116 | if (NULL == map) | 115 | if (NULL == map) |
117 | map = GNUNET_CONTAINER_multihashmap_create (32, GNUNET_YES); | 116 | map = GNUNET_CONTAINER_multipeermap_create (32, GNUNET_YES); |
118 | e = GNUNET_CONTAINER_multihashmap_get (map, &pid->hashPubKey); | 117 | e = GNUNET_CONTAINER_multipeermap_get (map, pid); |
119 | if (NULL != e) | 118 | if (NULL != e) |
120 | { | 119 | { |
121 | GNUNET_assert (e->rc > 0); | 120 | GNUNET_assert (e->rc > 0); |
@@ -145,8 +144,8 @@ GNUNET_PEER_intern (const struct GNUNET_PeerIdentity *pid) | |||
145 | table[ret]->rc = 1; | 144 | table[ret]->rc = 1; |
146 | table[ret]->pid = ret; | 145 | table[ret]->pid = ret; |
147 | GNUNET_break (GNUNET_OK == | 146 | GNUNET_break (GNUNET_OK == |
148 | GNUNET_CONTAINER_multihashmap_put (map, | 147 | GNUNET_CONTAINER_multipeermap_put (map, |
149 | &table[ret]->id.hashPubKey, | 148 | &table[ret]->id, |
150 | table[ret], | 149 | table[ret], |
151 | GNUNET_CONTAINER_MULTIHASHMAPOPTION_UNIQUE_ONLY)); | 150 | GNUNET_CONTAINER_MULTIHASHMAPOPTION_UNIQUE_ONLY)); |
152 | return ret; | 151 | return ret; |
@@ -178,8 +177,8 @@ GNUNET_PEER_decrement_rcs (const GNUNET_PEER_Id *ids, unsigned int count) | |||
178 | if (0 == table[id]->rc) | 177 | if (0 == table[id]->rc) |
179 | { | 178 | { |
180 | GNUNET_break (GNUNET_OK == | 179 | GNUNET_break (GNUNET_OK == |
181 | GNUNET_CONTAINER_multihashmap_remove (map, | 180 | GNUNET_CONTAINER_multipeermap_remove (map, |
182 | &table[id]->id.hashPubKey, | 181 | &table[id]->id, |
183 | table[id])); | 182 | table[id])); |
184 | table[id]->pid = free_list_start; | 183 | table[id]->pid = free_list_start; |
185 | free_list_start = id; | 184 | free_list_start = id; |
@@ -206,8 +205,8 @@ GNUNET_PEER_change_rc (GNUNET_PEER_Id id, int delta) | |||
206 | if (0 == table[id]->rc) | 205 | if (0 == table[id]->rc) |
207 | { | 206 | { |
208 | GNUNET_break (GNUNET_OK == | 207 | GNUNET_break (GNUNET_OK == |
209 | GNUNET_CONTAINER_multihashmap_remove (map, | 208 | GNUNET_CONTAINER_multipeermap_remove (map, |
210 | &table[id]->id.hashPubKey, | 209 | &table[id]->id, |
211 | table[id])); | 210 | table[id])); |
212 | table[id]->pid = free_list_start; | 211 | table[id]->pid = free_list_start; |
213 | free_list_start = id; | 212 | free_list_start = id; |
diff --git a/src/util/plugin.c b/src/util/plugin.c index b22976574..fe8281c32 100644 --- a/src/util/plugin.c +++ b/src/util/plugin.c | |||
@@ -26,9 +26,7 @@ | |||
26 | 26 | ||
27 | #include "platform.h" | 27 | #include "platform.h" |
28 | #include <ltdl.h> | 28 | #include <ltdl.h> |
29 | #include "gnunet_common.h" | 29 | #include "gnunet_util_lib.h" |
30 | #include "gnunet_os_lib.h" | ||
31 | #include "gnunet_plugin_lib.h" | ||
32 | 30 | ||
33 | #define LOG(kind,...) GNUNET_log_from (kind, "util", __VA_ARGS__) | 31 | #define LOG(kind,...) GNUNET_log_from (kind, "util", __VA_ARGS__) |
34 | 32 | ||
diff --git a/src/util/program.c b/src/util/program.c index 16a2f5086..aae58db49 100644 --- a/src/util/program.c +++ b/src/util/program.c | |||
@@ -25,15 +25,9 @@ | |||
25 | */ | 25 | */ |
26 | 26 | ||
27 | #include "platform.h" | 27 | #include "platform.h" |
28 | #include "gnunet_common.h" | 28 | #include "gnunet_util_lib.h" |
29 | #include "gnunet_configuration_lib.h" | ||
30 | #include "gnunet_crypto_lib.h" | ||
31 | #include "gnunet_directories.h" | ||
32 | #include "gnunet_getopt_lib.h" | ||
33 | #include "gnunet_os_lib.h" | ||
34 | #include "gnunet_program_lib.h" | ||
35 | #include "gnunet_resolver_service.h" | 29 | #include "gnunet_resolver_service.h" |
36 | #include "gnunet_scheduler_lib.h" | 30 | #include "gnunet_directories.h" |
37 | #include <gcrypt.h> | 31 | #include <gcrypt.h> |
38 | 32 | ||
39 | #define LOG(kind,...) GNUNET_log_from (kind, "util", __VA_ARGS__) | 33 | #define LOG(kind,...) GNUNET_log_from (kind, "util", __VA_ARGS__) |
diff --git a/src/util/scheduler.c b/src/util/scheduler.c index b7c24e2ad..a38bebf84 100644 --- a/src/util/scheduler.c +++ b/src/util/scheduler.c | |||
@@ -24,11 +24,7 @@ | |||
24 | * @author Christian Grothoff | 24 | * @author Christian Grothoff |
25 | */ | 25 | */ |
26 | #include "platform.h" | 26 | #include "platform.h" |
27 | #include "gnunet_common.h" | 27 | #include "gnunet_util_lib.h" |
28 | #include "gnunet_os_lib.h" | ||
29 | #include "gnunet_scheduler_lib.h" | ||
30 | #include "gnunet_signal_lib.h" | ||
31 | #include "gnunet_time_lib.h" | ||
32 | #include "disk.h" | 28 | #include "disk.h" |
33 | 29 | ||
34 | #define LOG(kind,...) GNUNET_log_from (kind, "util-scheduler", __VA_ARGS__) | 30 | #define LOG(kind,...) GNUNET_log_from (kind, "util-scheduler", __VA_ARGS__) |
diff --git a/src/util/server.c b/src/util/server.c index 9e88992ca..dce03bdcf 100644 --- a/src/util/server.c +++ b/src/util/server.c | |||
@@ -25,7 +25,6 @@ | |||
25 | */ | 25 | */ |
26 | 26 | ||
27 | #include "platform.h" | 27 | #include "platform.h" |
28 | #include "gnunet_common.h" | ||
29 | #include "gnunet_util_lib.h" | 28 | #include "gnunet_util_lib.h" |
30 | #include "gnunet_protocols.h" | 29 | #include "gnunet_protocols.h" |
31 | 30 | ||
diff --git a/src/util/server_mst.c b/src/util/server_mst.c index 7eac75bed..34ffc6da7 100644 --- a/src/util/server_mst.c +++ b/src/util/server_mst.c | |||
@@ -25,11 +25,7 @@ | |||
25 | */ | 25 | */ |
26 | 26 | ||
27 | #include "platform.h" | 27 | #include "platform.h" |
28 | #include "gnunet_common.h" | 28 | #include "gnunet_util_lib.h" |
29 | #include "gnunet_connection_lib.h" | ||
30 | #include "gnunet_scheduler_lib.h" | ||
31 | #include "gnunet_server_lib.h" | ||
32 | #include "gnunet_time_lib.h" | ||
33 | 29 | ||
34 | 30 | ||
35 | #if HAVE_UNALIGNED_64_ACCESS | 31 | #if HAVE_UNALIGNED_64_ACCESS |
diff --git a/src/util/server_nc.c b/src/util/server_nc.c index 37dd9d84c..d11025680 100644 --- a/src/util/server_nc.c +++ b/src/util/server_nc.c | |||
@@ -26,12 +26,7 @@ | |||
26 | */ | 26 | */ |
27 | 27 | ||
28 | #include "platform.h" | 28 | #include "platform.h" |
29 | #include "gnunet_common.h" | 29 | #include "gnunet_util_lib.h" |
30 | #include "gnunet_connection_lib.h" | ||
31 | #include "gnunet_container_lib.h" | ||
32 | #include "gnunet_scheduler_lib.h" | ||
33 | #include "gnunet_server_lib.h" | ||
34 | #include "gnunet_time_lib.h" | ||
35 | 30 | ||
36 | #define LOG(kind,...) GNUNET_log_from (kind, "util-server-nc", __VA_ARGS__) | 31 | #define LOG(kind,...) GNUNET_log_from (kind, "util-server-nc", __VA_ARGS__) |
37 | 32 | ||
diff --git a/src/util/server_tc.c b/src/util/server_tc.c index f02d06d2c..780b5f003 100644 --- a/src/util/server_tc.c +++ b/src/util/server_tc.c | |||
@@ -26,11 +26,7 @@ | |||
26 | */ | 26 | */ |
27 | 27 | ||
28 | #include "platform.h" | 28 | #include "platform.h" |
29 | #include "gnunet_common.h" | 29 | #include "gnunet_util_lib.h" |
30 | #include "gnunet_connection_lib.h" | ||
31 | #include "gnunet_scheduler_lib.h" | ||
32 | #include "gnunet_server_lib.h" | ||
33 | #include "gnunet_time_lib.h" | ||
34 | 30 | ||
35 | 31 | ||
36 | #define LOG(kind,...) GNUNET_log_from (kind, "util", __VA_ARGS__) | 32 | #define LOG(kind,...) GNUNET_log_from (kind, "util", __VA_ARGS__) |
diff --git a/src/util/service.c b/src/util/service.c index b91be9664..cab8a8aef 100644 --- a/src/util/service.c +++ b/src/util/service.c | |||
@@ -24,17 +24,10 @@ | |||
24 | * @author Christian Grothoff | 24 | * @author Christian Grothoff |
25 | */ | 25 | */ |
26 | #include "platform.h" | 26 | #include "platform.h" |
27 | #include "gnunet_common.h" | 27 | #include "gnunet_util_lib.h" |
28 | #include "gnunet_configuration_lib.h" | ||
29 | #include "gnunet_crypto_lib.h" | ||
30 | #include "gnunet_directories.h" | ||
31 | #include "gnunet_disk_lib.h" | ||
32 | #include "gnunet_getopt_lib.h" | ||
33 | #include "gnunet_os_lib.h" | ||
34 | #include "gnunet_protocols.h" | 28 | #include "gnunet_protocols.h" |
29 | #include "gnunet_directories.h" | ||
35 | #include "gnunet_resolver_service.h" | 30 | #include "gnunet_resolver_service.h" |
36 | #include "gnunet_server_lib.h" | ||
37 | #include "gnunet_service_lib.h" | ||
38 | 31 | ||
39 | #if HAVE_MALLINFO | 32 | #if HAVE_MALLINFO |
40 | #include <malloc.h> | 33 | #include <malloc.h> |
diff --git a/src/util/signal.c b/src/util/signal.c index c3f5f023e..edce5f653 100644 --- a/src/util/signal.c +++ b/src/util/signal.c | |||
@@ -25,8 +25,7 @@ | |||
25 | */ | 25 | */ |
26 | 26 | ||
27 | #include "platform.h" | 27 | #include "platform.h" |
28 | #include "gnunet_common.h" | 28 | #include "gnunet_util_lib.h" |
29 | #include "gnunet_signal_lib.h" | ||
30 | 29 | ||
31 | #define LOG(kind,...) GNUNET_log_from (kind, "util", __VA_ARGS__) | 30 | #define LOG(kind,...) GNUNET_log_from (kind, "util", __VA_ARGS__) |
32 | 31 | ||
diff --git a/src/util/strings.c b/src/util/strings.c index 6380ea5ec..3d061fb57 100644 --- a/src/util/strings.c +++ b/src/util/strings.c | |||
@@ -29,8 +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_common.h" | 32 | #include "gnunet_util_lib.h" |
33 | #include "gnunet_strings_lib.h" | ||
34 | #include <unicase.h> | 33 | #include <unicase.h> |
35 | #include <unistr.h> | 34 | #include <unistr.h> |
36 | #include <uniconv.h> | 35 | #include <uniconv.h> |
diff --git a/src/util/test_client.c b/src/util/test_client.c index 7d7ec8cff..6dfb8349a 100644 --- a/src/util/test_client.c +++ b/src/util/test_client.c | |||
@@ -22,12 +22,7 @@ | |||
22 | * @brief tests for client.c | 22 | * @brief tests for client.c |
23 | */ | 23 | */ |
24 | #include "platform.h" | 24 | #include "platform.h" |
25 | #include "gnunet_common.h" | 25 | #include "gnunet_util_lib.h" |
26 | #include "gnunet_client_lib.h" | ||
27 | #include "gnunet_configuration_lib.h" | ||
28 | #include "gnunet_scheduler_lib.h" | ||
29 | #include "gnunet_server_lib.h" | ||
30 | #include "gnunet_time_lib.h" | ||
31 | 26 | ||
32 | 27 | ||
33 | #define PORT 14325 | 28 | #define PORT 14325 |
diff --git a/src/util/test_common_allocation.c b/src/util/test_common_allocation.c index 438d39751..0c6f5fc5a 100644 --- a/src/util/test_common_allocation.c +++ b/src/util/test_common_allocation.c | |||
@@ -23,7 +23,7 @@ | |||
23 | * @brief testcase for common_allocation.c | 23 | * @brief testcase for common_allocation.c |
24 | */ | 24 | */ |
25 | #include "platform.h" | 25 | #include "platform.h" |
26 | #include "gnunet_common.h" | 26 | #include "gnunet_util_lib.h" |
27 | 27 | ||
28 | static int | 28 | static int |
29 | check () | 29 | check () |
diff --git a/src/util/test_common_endian.c b/src/util/test_common_endian.c index a709abec6..8974b43fe 100644 --- a/src/util/test_common_endian.c +++ b/src/util/test_common_endian.c | |||
@@ -22,7 +22,7 @@ | |||
22 | * @brief testcase for common_endian.c | 22 | * @brief testcase for common_endian.c |
23 | */ | 23 | */ |
24 | #include "platform.h" | 24 | #include "platform.h" |
25 | #include "gnunet_common.h" | 25 | #include "gnunet_util_lib.h" |
26 | 26 | ||
27 | #define CHECK(n) if (n != GNUNET_htonll(GNUNET_ntohll(n))) return 1; | 27 | #define CHECK(n) if (n != GNUNET_htonll(GNUNET_ntohll(n))) return 1; |
28 | 28 | ||
diff --git a/src/util/test_common_logging.c b/src/util/test_common_logging.c index 934586926..2bf719782 100644 --- a/src/util/test_common_logging.c +++ b/src/util/test_common_logging.c | |||
@@ -24,7 +24,7 @@ | |||
24 | * @author Christian Grothoff | 24 | * @author Christian Grothoff |
25 | */ | 25 | */ |
26 | #include "platform.h" | 26 | #include "platform.h" |
27 | #include "gnunet_common.h" | 27 | #include "gnunet_util_lib.h" |
28 | 28 | ||
29 | static void | 29 | static void |
30 | my_log (void *ctx, enum GNUNET_ErrorType kind, const char *component, | 30 | my_log (void *ctx, enum GNUNET_ErrorType kind, const char *component, |
diff --git a/src/util/test_common_logging_dummy.c b/src/util/test_common_logging_dummy.c index 679dd9178..fcdf9cd27 100644 --- a/src/util/test_common_logging_dummy.c +++ b/src/util/test_common_logging_dummy.c | |||
@@ -28,9 +28,7 @@ | |||
28 | #undef GNUNET_EXTRA_LOGGING | 28 | #undef GNUNET_EXTRA_LOGGING |
29 | #define GNUNET_EXTRA_LOGGING GNUNET_YES | 29 | #define GNUNET_EXTRA_LOGGING GNUNET_YES |
30 | 30 | ||
31 | #include "gnunet_common.h" | 31 | #include "gnunet_util_lib.h" |
32 | #include "gnunet_time_lib.h" | ||
33 | #include "gnunet_network_lib.h" | ||
34 | 32 | ||
35 | /** | 33 | /** |
36 | * Artificial delay attached to each log call that is not skipped out. | 34 | * Artificial delay attached to each log call that is not skipped out. |
diff --git a/src/util/test_common_logging_runtime_loglevels.c b/src/util/test_common_logging_runtime_loglevels.c index 8edf95194..c608d59c5 100644 --- a/src/util/test_common_logging_runtime_loglevels.c +++ b/src/util/test_common_logging_runtime_loglevels.c | |||
@@ -24,11 +24,7 @@ | |||
24 | * @author LRN | 24 | * @author LRN |
25 | */ | 25 | */ |
26 | #include "platform.h" | 26 | #include "platform.h" |
27 | #include "gnunet_common.h" | 27 | #include "gnunet_util_lib.h" |
28 | #include "gnunet_scheduler_lib.h" | ||
29 | #include "gnunet_network_lib.h" | ||
30 | #include "gnunet_disk_lib.h" | ||
31 | #include "gnunet_os_lib.h" | ||
32 | 28 | ||
33 | #define VERBOSE GNUNET_NO | 29 | #define VERBOSE GNUNET_NO |
34 | 30 | ||
diff --git a/src/util/test_configuration.c b/src/util/test_configuration.c index 62ad5fa92..2d2806956 100644 --- a/src/util/test_configuration.c +++ b/src/util/test_configuration.c | |||
@@ -24,9 +24,7 @@ | |||
24 | */ | 24 | */ |
25 | 25 | ||
26 | #include "platform.h" | 26 | #include "platform.h" |
27 | #include "gnunet_common.h" | 27 | #include "gnunet_util_lib.h" |
28 | #include "gnunet_configuration_lib.h" | ||
29 | #include "gnunet_disk_lib.h" | ||
30 | 28 | ||
31 | 29 | ||
32 | /* Test Configuration Diffs Options */ | 30 | /* Test Configuration Diffs Options */ |
diff --git a/src/util/test_connection.c b/src/util/test_connection.c index 1ba20498f..124f3c9d3 100644 --- a/src/util/test_connection.c +++ b/src/util/test_connection.c | |||
@@ -22,10 +22,7 @@ | |||
22 | * @brief tests for connection.c | 22 | * @brief tests for connection.c |
23 | */ | 23 | */ |
24 | #include "platform.h" | 24 | #include "platform.h" |
25 | #include "gnunet_common.h" | 25 | #include "gnunet_util_lib.h" |
26 | #include "gnunet_connection_lib.h" | ||
27 | #include "gnunet_scheduler_lib.h" | ||
28 | #include "gnunet_time_lib.h" | ||
29 | 26 | ||
30 | #define PORT 12435 | 27 | #define PORT 12435 |
31 | 28 | ||
diff --git a/src/util/test_connection_addressing.c b/src/util/test_connection_addressing.c index eeb610dd1..ea6acdd53 100644 --- a/src/util/test_connection_addressing.c +++ b/src/util/test_connection_addressing.c | |||
@@ -22,10 +22,7 @@ | |||
22 | * @brief tests for connection.c | 22 | * @brief tests for connection.c |
23 | */ | 23 | */ |
24 | #include "platform.h" | 24 | #include "platform.h" |
25 | #include "gnunet_common.h" | 25 | #include "gnunet_util_lib.h" |
26 | #include "gnunet_connection_lib.h" | ||
27 | #include "gnunet_scheduler_lib.h" | ||
28 | #include "gnunet_time_lib.h" | ||
29 | 26 | ||
30 | 27 | ||
31 | #define PORT 12435 | 28 | #define PORT 12435 |
diff --git a/src/util/test_connection_receive_cancel.c b/src/util/test_connection_receive_cancel.c index 99905e232..e47712d3f 100644 --- a/src/util/test_connection_receive_cancel.c +++ b/src/util/test_connection_receive_cancel.c | |||
@@ -22,10 +22,7 @@ | |||
22 | * @brief tests for connection.c | 22 | * @brief tests for connection.c |
23 | */ | 23 | */ |
24 | #include "platform.h" | 24 | #include "platform.h" |
25 | #include "gnunet_common.h" | 25 | #include "gnunet_util_lib.h" |
26 | #include "gnunet_connection_lib.h" | ||
27 | #include "gnunet_scheduler_lib.h" | ||
28 | #include "gnunet_time_lib.h" | ||
29 | 26 | ||
30 | #define PORT 12435 | 27 | #define PORT 12435 |
31 | 28 | ||
diff --git a/src/util/test_connection_timeout.c b/src/util/test_connection_timeout.c index 6608e18db..27170ed41 100644 --- a/src/util/test_connection_timeout.c +++ b/src/util/test_connection_timeout.c | |||
@@ -22,10 +22,7 @@ | |||
22 | * @brief tests for connection.c | 22 | * @brief tests for connection.c |
23 | */ | 23 | */ |
24 | #include "platform.h" | 24 | #include "platform.h" |
25 | #include "gnunet_common.h" | 25 | #include "gnunet_util_lib.h" |
26 | #include "gnunet_connection_lib.h" | ||
27 | #include "gnunet_scheduler_lib.h" | ||
28 | #include "gnunet_time_lib.h" | ||
29 | 26 | ||
30 | #define PORT 12435 | 27 | #define PORT 12435 |
31 | 28 | ||
diff --git a/src/util/test_connection_timeout_no_connect.c b/src/util/test_connection_timeout_no_connect.c index 50eaf709a..cf1f8ecde 100644 --- a/src/util/test_connection_timeout_no_connect.c +++ b/src/util/test_connection_timeout_no_connect.c | |||
@@ -22,10 +22,7 @@ | |||
22 | * @brief tests for connection.c, doing timeout which connect failure | 22 | * @brief tests for connection.c, doing timeout which connect failure |
23 | */ | 23 | */ |
24 | #include "platform.h" | 24 | #include "platform.h" |
25 | #include "gnunet_common.h" | 25 | #include "gnunet_util_lib.h" |
26 | #include "gnunet_connection_lib.h" | ||
27 | #include "gnunet_scheduler_lib.h" | ||
28 | #include "gnunet_time_lib.h" | ||
29 | 26 | ||
30 | #define PORT 13425 | 27 | #define PORT 13425 |
31 | 28 | ||
diff --git a/src/util/test_connection_transmit_cancel.c b/src/util/test_connection_transmit_cancel.c index 195ac689b..c5fa5cc32 100644 --- a/src/util/test_connection_transmit_cancel.c +++ b/src/util/test_connection_transmit_cancel.c | |||
@@ -22,10 +22,7 @@ | |||
22 | * @brief tests for connection.c | 22 | * @brief tests for connection.c |
23 | */ | 23 | */ |
24 | #include "platform.h" | 24 | #include "platform.h" |
25 | #include "gnunet_common.h" | 25 | #include "gnunet_util_lib.h" |
26 | #include "gnunet_connection_lib.h" | ||
27 | #include "gnunet_scheduler_lib.h" | ||
28 | #include "gnunet_time_lib.h" | ||
29 | 26 | ||
30 | #define PORT 12435 | 27 | #define PORT 12435 |
31 | 28 | ||
diff --git a/src/util/test_container_bloomfilter.c b/src/util/test_container_bloomfilter.c index f9743bdca..f568e2548 100644 --- a/src/util/test_container_bloomfilter.c +++ b/src/util/test_container_bloomfilter.c | |||
@@ -25,8 +25,7 @@ | |||
25 | */ | 25 | */ |
26 | 26 | ||
27 | #include "platform.h" | 27 | #include "platform.h" |
28 | #include "gnunet_common.h" | 28 | #include "gnunet_util_lib.h" |
29 | #include "gnunet_container_lib.h" | ||
30 | 29 | ||
31 | #define K 4 | 30 | #define K 4 |
32 | #define SIZE 65536 | 31 | #define SIZE 65536 |
diff --git a/src/util/test_container_heap.c b/src/util/test_container_heap.c index a2a004aa7..7ae7f05af 100644 --- a/src/util/test_container_heap.c +++ b/src/util/test_container_heap.c | |||
@@ -25,8 +25,7 @@ | |||
25 | */ | 25 | */ |
26 | 26 | ||
27 | #include "platform.h" | 27 | #include "platform.h" |
28 | #include "gnunet_common.h" | 28 | #include "gnunet_util_lib.h" |
29 | #include "gnunet_container_lib.h" | ||
30 | 29 | ||
31 | static int | 30 | static int |
32 | iterator_callback (void *cls, struct GNUNET_CONTAINER_HeapNode *node, | 31 | iterator_callback (void *cls, struct GNUNET_CONTAINER_HeapNode *node, |
diff --git a/src/util/test_container_meta_data.c b/src/util/test_container_meta_data.c index fe1dd79c1..2da3bb251 100644 --- a/src/util/test_container_meta_data.c +++ b/src/util/test_container_meta_data.c | |||
@@ -25,8 +25,7 @@ | |||
25 | */ | 25 | */ |
26 | 26 | ||
27 | #include "platform.h" | 27 | #include "platform.h" |
28 | #include "gnunet_common.h" | 28 | #include "gnunet_util_lib.h" |
29 | #include "gnunet_container_lib.h" | ||
30 | 29 | ||
31 | #define ABORT(m) { fprintf(stderr, "Error at %s:%d\n", __FILE__, __LINE__); if (m != NULL) GNUNET_CONTAINER_meta_data_destroy(m); return 1; } | 30 | #define ABORT(m) { fprintf(stderr, "Error at %s:%d\n", __FILE__, __LINE__); if (m != NULL) GNUNET_CONTAINER_meta_data_destroy(m); return 1; } |
32 | 31 | ||
diff --git a/src/util/test_container_multihashmap.c b/src/util/test_container_multihashmap.c index 6b079a109..a66ae6d82 100644 --- a/src/util/test_container_multihashmap.c +++ b/src/util/test_container_multihashmap.c | |||
@@ -25,8 +25,7 @@ | |||
25 | */ | 25 | */ |
26 | 26 | ||
27 | #include "platform.h" | 27 | #include "platform.h" |
28 | #include "gnunet_common.h" | 28 | #include "gnunet_util_lib.h" |
29 | #include "gnunet_container_lib.h" | ||
30 | 29 | ||
31 | #define ABORT() { fprintf(stderr, "Error at %s:%d\n", __FILE__, __LINE__); if (m != NULL) GNUNET_CONTAINER_multihashmap_destroy(m); return 1; } | 30 | #define ABORT() { fprintf(stderr, "Error at %s:%d\n", __FILE__, __LINE__); if (m != NULL) GNUNET_CONTAINER_multihashmap_destroy(m); return 1; } |
32 | #define CHECK(c) { if (! (c)) ABORT(); } | 31 | #define CHECK(c) { if (! (c)) ABORT(); } |
diff --git a/src/util/test_container_multihashmap32.c b/src/util/test_container_multihashmap32.c index 7997c73ac..af21ecec9 100644 --- a/src/util/test_container_multihashmap32.c +++ b/src/util/test_container_multihashmap32.c | |||
@@ -26,8 +26,7 @@ | |||
26 | */ | 26 | */ |
27 | 27 | ||
28 | #include "platform.h" | 28 | #include "platform.h" |
29 | #include "gnunet_common.h" | 29 | #include "gnunet_util_lib.h" |
30 | #include "gnunet_container_lib.h" | ||
31 | 30 | ||
32 | #define ABORT() { fprintf(stderr, "Error at %s:%d\n", __FILE__, __LINE__); if (m != NULL) GNUNET_CONTAINER_multihashmap32_destroy(m); return 1; } | 31 | #define ABORT() { fprintf(stderr, "Error at %s:%d\n", __FILE__, __LINE__); if (m != NULL) GNUNET_CONTAINER_multihashmap32_destroy(m); return 1; } |
33 | #define CHECK(c) { if (! (c)) ABORT(); } | 32 | #define CHECK(c) { if (! (c)) ABORT(); } |
diff --git a/src/util/test_container_multipeermap.c b/src/util/test_container_multipeermap.c index aa67eb5e0..5eda0c8aa 100644 --- a/src/util/test_container_multipeermap.c +++ b/src/util/test_container_multipeermap.c | |||
@@ -25,8 +25,7 @@ | |||
25 | */ | 25 | */ |
26 | 26 | ||
27 | #include "platform.h" | 27 | #include "platform.h" |
28 | #include "gnunet_common.h" | 28 | #include "gnunet_util_lib.h" |
29 | #include "gnunet_container_lib.h" | ||
30 | 29 | ||
31 | #define ABORT() { fprintf(stderr, "Error at %s:%d\n", __FILE__, __LINE__); if (NULL != m) GNUNET_CONTAINER_multipeermap_destroy(m); return 1; } | 30 | #define ABORT() { fprintf(stderr, "Error at %s:%d\n", __FILE__, __LINE__); if (NULL != m) GNUNET_CONTAINER_multipeermap_destroy(m); return 1; } |
32 | #define CHECK(c) { if (! (c)) ABORT(); } | 31 | #define CHECK(c) { if (! (c)) ABORT(); } |
diff --git a/src/util/test_container_slist.c b/src/util/test_container_slist.c index 1b63d3dbc..8b4ff93d0 100644 --- a/src/util/test_container_slist.c +++ b/src/util/test_container_slist.c | |||
@@ -25,8 +25,7 @@ | |||
25 | */ | 25 | */ |
26 | 26 | ||
27 | #include "platform.h" | 27 | #include "platform.h" |
28 | #include "gnunet_common.h" | 28 | #include "gnunet_util_lib.h" |
29 | #include "gnunet_container_lib.h" | ||
30 | 29 | ||
31 | int | 30 | int |
32 | main (int argc, char *argv[]) | 31 | main (int argc, char *argv[]) |
diff --git a/src/util/test_crypto_crc.c b/src/util/test_crypto_crc.c index 99eca0cc0..3000fed34 100644 --- a/src/util/test_crypto_crc.c +++ b/src/util/test_crypto_crc.c | |||
@@ -27,8 +27,7 @@ | |||
27 | * @brief testcase for crypto_crc.c | 27 | * @brief testcase for crypto_crc.c |
28 | */ | 28 | */ |
29 | #include "platform.h" | 29 | #include "platform.h" |
30 | #include "gnunet_common.h" | 30 | #include "gnunet_util_lib.h" |
31 | #include "gnunet_crypto_lib.h" | ||
32 | 31 | ||
33 | static int expected[] = { | 32 | static int expected[] = { |
34 | -1223996378, 929797997, -1048047323, 1791081351, -425765913, 2138425902, | 33 | -1223996378, 929797997, -1048047323, 1791081351, -425765913, 2138425902, |
diff --git a/src/util/test_crypto_hash.c b/src/util/test_crypto_hash.c index 9e10702ce..1a3f90957 100644 --- a/src/util/test_crypto_hash.c +++ b/src/util/test_crypto_hash.c | |||
@@ -24,9 +24,7 @@ | |||
24 | * @brief Test for crypto_hash.c | 24 | * @brief Test for crypto_hash.c |
25 | */ | 25 | */ |
26 | #include "platform.h" | 26 | #include "platform.h" |
27 | #include "gnunet_common.h" | 27 | #include "gnunet_util_lib.h" |
28 | #include "gnunet_crypto_lib.h" | ||
29 | #include "gnunet_scheduler_lib.h" | ||
30 | 28 | ||
31 | static char block[65536]; | 29 | static char block[65536]; |
32 | 30 | ||
diff --git a/src/util/test_crypto_random.c b/src/util/test_crypto_random.c index 681947a60..11af6580a 100644 --- a/src/util/test_crypto_random.c +++ b/src/util/test_crypto_random.c | |||
@@ -24,8 +24,7 @@ | |||
24 | * @brief testcase for crypto_random.c | 24 | * @brief testcase for crypto_random.c |
25 | */ | 25 | */ |
26 | #include "platform.h" | 26 | #include "platform.h" |
27 | #include "gnunet_common.h" | 27 | #include "gnunet_util_lib.h" |
28 | #include "gnunet_crypto_lib.h" | ||
29 | 28 | ||
30 | static int | 29 | static int |
31 | test (enum GNUNET_CRYPTO_Quality mode) | 30 | test (enum GNUNET_CRYPTO_Quality mode) |
diff --git a/src/util/test_crypto_symmetric.c b/src/util/test_crypto_symmetric.c index b350e9efe..90214a4b5 100644 --- a/src/util/test_crypto_symmetric.c +++ b/src/util/test_crypto_symmetric.c | |||
@@ -24,8 +24,7 @@ | |||
24 | * @brief test for AES ciphers | 24 | * @brief test for AES ciphers |
25 | */ | 25 | */ |
26 | #include "platform.h" | 26 | #include "platform.h" |
27 | #include "gnunet_common.h" | 27 | #include "gnunet_util_lib.h" |
28 | #include "gnunet_crypto_lib.h" | ||
29 | 28 | ||
30 | #define TESTSTRING "Hello World!" | 29 | #define TESTSTRING "Hello World!" |
31 | #define INITVALUE "InitializationVectorValueinitializationvectorvalue" | 30 | #define INITVALUE "InitializationVectorValueinitializationvectorvalue" |
diff --git a/src/util/test_disk.c b/src/util/test_disk.c index 7fc8618ce..7579ac7dc 100644 --- a/src/util/test_disk.c +++ b/src/util/test_disk.c | |||
@@ -24,9 +24,7 @@ | |||
24 | * @author Christian Grothoff | 24 | * @author Christian Grothoff |
25 | */ | 25 | */ |
26 | #include "platform.h" | 26 | #include "platform.h" |
27 | #include "gnunet_common.h" | 27 | #include "gnunet_util_lib.h" |
28 | #include "gnunet_disk_lib.h" | ||
29 | #include "gnunet_scheduler_lib.h" | ||
30 | 28 | ||
31 | #define TESTSTRING "Hello World\0" | 29 | #define TESTSTRING "Hello World\0" |
32 | 30 | ||
diff --git a/src/util/test_getopt.c b/src/util/test_getopt.c index 313167d17..9e56bc843 100644 --- a/src/util/test_getopt.c +++ b/src/util/test_getopt.c | |||
@@ -22,9 +22,7 @@ | |||
22 | * @brief testcase for util/getopt.c | 22 | * @brief testcase for util/getopt.c |
23 | */ | 23 | */ |
24 | #include "platform.h" | 24 | #include "platform.h" |
25 | #include "gnunet_common.h" | 25 | #include "gnunet_util_lib.h" |
26 | #include "gnunet_configuration_lib.h" | ||
27 | #include "gnunet_getopt_lib.h" | ||
28 | 26 | ||
29 | 27 | ||
30 | static int | 28 | static int |
diff --git a/src/util/test_mq_client.c b/src/util/test_mq_client.c index 18cd8a948..4e460ebdb 100644 --- a/src/util/test_mq_client.c +++ b/src/util/test_mq_client.c | |||
@@ -23,7 +23,6 @@ | |||
23 | * @brief tests for mq with connection client | 23 | * @brief tests for mq with connection client |
24 | */ | 24 | */ |
25 | #include "platform.h" | 25 | #include "platform.h" |
26 | #include "gnunet_common.h" | ||
27 | #include "gnunet_util_lib.h" | 26 | #include "gnunet_util_lib.h" |
28 | 27 | ||
29 | #define PORT 23336 | 28 | #define PORT 23336 |
diff --git a/src/util/test_os_network.c b/src/util/test_os_network.c index 2cdd75040..b46ef8f1d 100644 --- a/src/util/test_os_network.c +++ b/src/util/test_os_network.c | |||
@@ -22,9 +22,7 @@ | |||
22 | * @brief testcase for util/os_network.c | 22 | * @brief testcase for util/os_network.c |
23 | */ | 23 | */ |
24 | #include "platform.h" | 24 | #include "platform.h" |
25 | #include "gnunet_common.h" | 25 | #include "gnunet_util_lib.h" |
26 | #include "gnunet_configuration_lib.h" | ||
27 | #include "gnunet_os_lib.h" | ||
28 | 26 | ||
29 | 27 | ||
30 | /** | 28 | /** |
diff --git a/src/util/test_os_start_process.c b/src/util/test_os_start_process.c index 124b364fb..2b1d9070c 100644 --- a/src/util/test_os_start_process.c +++ b/src/util/test_os_start_process.c | |||
@@ -26,11 +26,7 @@ | |||
26 | * correct data "HELLO" is read then all is well. | 26 | * correct data "HELLO" is read then all is well. |
27 | */ | 27 | */ |
28 | #include "platform.h" | 28 | #include "platform.h" |
29 | #include "gnunet_common.h" | 29 | #include "gnunet_util_lib.h" |
30 | #include "gnunet_getopt_lib.h" | ||
31 | #include "gnunet_os_lib.h" | ||
32 | #include "gnunet_program_lib.h" | ||
33 | #include "gnunet_scheduler_lib.h" | ||
34 | #include "disk.h" | 30 | #include "disk.h" |
35 | 31 | ||
36 | 32 | ||
diff --git a/src/util/test_peer.c b/src/util/test_peer.c index fa4d31b8d..51f759867 100644 --- a/src/util/test_peer.c +++ b/src/util/test_peer.c | |||
@@ -24,8 +24,8 @@ | |||
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_peer_lib.h" | 28 | #include <gcrypt.h> |
29 | 29 | ||
30 | #define NUMBER_OF_PEERS 10 | 30 | #define NUMBER_OF_PEERS 10 |
31 | 31 | ||
@@ -42,8 +42,9 @@ generatePeerIdList () | |||
42 | 42 | ||
43 | for (i = 0; i < NUMBER_OF_PEERS; i++) | 43 | for (i = 0; i < NUMBER_OF_PEERS; i++) |
44 | { | 44 | { |
45 | GNUNET_CRYPTO_hash_create_random (GNUNET_CRYPTO_QUALITY_WEAK, | 45 | gcry_randomize (&pidArr[i], |
46 | &pidArr[i].hashPubKey); | 46 | sizeof (struct GNUNET_PeerIdentity), |
47 | GCRY_STRONG_RANDOM); | ||
47 | GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, | 48 | GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, |
48 | "Peer %d: %s\n", i, GNUNET_i2s (&pidArr[i])); | 49 | "Peer %d: %s\n", i, GNUNET_i2s (&pidArr[i])); |
49 | } | 50 | } |
diff --git a/src/util/test_plugin.c b/src/util/test_plugin.c index f2abfa77d..e819e678a 100644 --- a/src/util/test_plugin.c +++ b/src/util/test_plugin.c | |||
@@ -22,7 +22,7 @@ | |||
22 | * @brief testcase for plugin.c | 22 | * @brief testcase for plugin.c |
23 | */ | 23 | */ |
24 | #include "platform.h" | 24 | #include "platform.h" |
25 | #include "gnunet_plugin_lib.h" | 25 | #include "gnunet_util_lib.h" |
26 | 26 | ||
27 | 27 | ||
28 | static void | 28 | static void |
diff --git a/src/util/test_program.c b/src/util/test_program.c index faeb4e716..6f4a035ad 100644 --- a/src/util/test_program.c +++ b/src/util/test_program.c | |||
@@ -22,10 +22,7 @@ | |||
22 | * @brief tests for program.c | 22 | * @brief tests for program.c |
23 | */ | 23 | */ |
24 | #include "platform.h" | 24 | #include "platform.h" |
25 | #include "gnunet_common.h" | 25 | #include "gnunet_util_lib.h" |
26 | #include "gnunet_program_lib.h" | ||
27 | #include "gnunet_scheduler_lib.h" | ||
28 | #include "gnunet_time_lib.h" | ||
29 | 26 | ||
30 | static int setme1, setme2; | 27 | static int setme1, setme2; |
31 | 28 | ||
diff --git a/src/util/test_scheduler.c b/src/util/test_scheduler.c index 50354825a..70ff95550 100644 --- a/src/util/test_scheduler.c +++ b/src/util/test_scheduler.c | |||
@@ -22,10 +22,7 @@ | |||
22 | * @brief tests for the scheduler | 22 | * @brief tests for the scheduler |
23 | */ | 23 | */ |
24 | #include "platform.h" | 24 | #include "platform.h" |
25 | #include "gnunet_common.h" | 25 | #include "gnunet_util_lib.h" |
26 | #include "gnunet_scheduler_lib.h" | ||
27 | #include "gnunet_time_lib.h" | ||
28 | #include "gnunet_disk_lib.h" | ||
29 | 26 | ||
30 | 27 | ||
31 | struct GNUNET_DISK_PipeHandle *p; | 28 | struct GNUNET_DISK_PipeHandle *p; |
diff --git a/src/util/test_server.c b/src/util/test_server.c index 454fc6413..c39744f8a 100644 --- a/src/util/test_server.c +++ b/src/util/test_server.c | |||
@@ -22,11 +22,7 @@ | |||
22 | * @brief tests for server.c | 22 | * @brief tests for server.c |
23 | */ | 23 | */ |
24 | #include "platform.h" | 24 | #include "platform.h" |
25 | #include "gnunet_common.h" | 25 | #include "gnunet_util_lib.h" |
26 | #include "gnunet_client_lib.h" | ||
27 | #include "gnunet_scheduler_lib.h" | ||
28 | #include "gnunet_server_lib.h" | ||
29 | #include "gnunet_time_lib.h" | ||
30 | 26 | ||
31 | #define PORT 12435 | 27 | #define PORT 12435 |
32 | 28 | ||
diff --git a/src/util/test_server_disconnect.c b/src/util/test_server_disconnect.c index b54df4889..917784d8e 100644 --- a/src/util/test_server_disconnect.c +++ b/src/util/test_server_disconnect.c | |||
@@ -22,11 +22,7 @@ | |||
22 | * @brief tests for server.c, specifically GNUNET_SERVER_client_disconnect | 22 | * @brief tests for server.c, specifically GNUNET_SERVER_client_disconnect |
23 | */ | 23 | */ |
24 | #include "platform.h" | 24 | #include "platform.h" |
25 | #include "gnunet_common.h" | 25 | #include "gnunet_util_lib.h" |
26 | #include "gnunet_client_lib.h" | ||
27 | #include "gnunet_scheduler_lib.h" | ||
28 | #include "gnunet_server_lib.h" | ||
29 | #include "gnunet_time_lib.h" | ||
30 | 26 | ||
31 | 27 | ||
32 | #define PORT 12435 | 28 | #define PORT 12435 |
diff --git a/src/util/test_server_mst_interrupt.c b/src/util/test_server_mst_interrupt.c index 8fd7a2b54..cfd891522 100644 --- a/src/util/test_server_mst_interrupt.c +++ b/src/util/test_server_mst_interrupt.c | |||
@@ -22,12 +22,8 @@ | |||
22 | * @brief test for interrupt message processing in server_mst.c | 22 | * @brief test for interrupt message processing in server_mst.c |
23 | */ | 23 | */ |
24 | #include "platform.h" | 24 | #include "platform.h" |
25 | #include "gnunet_common.h" | ||
26 | #include "gnunet_protocols.h" | 25 | #include "gnunet_protocols.h" |
27 | #include "gnunet_client_lib.h" | 26 | #include "gnunet_util_lib.h" |
28 | #include "gnunet_scheduler_lib.h" | ||
29 | #include "gnunet_server_lib.h" | ||
30 | #include "gnunet_time_lib.h" | ||
31 | 27 | ||
32 | static struct GNUNET_SERVER_MessageStreamTokenizer * mst; | 28 | static struct GNUNET_SERVER_MessageStreamTokenizer * mst; |
33 | 29 | ||
diff --git a/src/util/test_server_with_client.c b/src/util/test_server_with_client.c index c49456301..01971d96d 100644 --- a/src/util/test_server_with_client.c +++ b/src/util/test_server_with_client.c | |||
@@ -24,11 +24,7 @@ | |||
24 | * client_get_address and receive_done (resume processing) | 24 | * client_get_address and receive_done (resume processing) |
25 | */ | 25 | */ |
26 | #include "platform.h" | 26 | #include "platform.h" |
27 | #include "gnunet_common.h" | 27 | #include "gnunet_util_lib.h" |
28 | #include "gnunet_scheduler_lib.h" | ||
29 | #include "gnunet_client_lib.h" | ||
30 | #include "gnunet_server_lib.h" | ||
31 | #include "gnunet_time_lib.h" | ||
32 | 28 | ||
33 | #define PORT 22335 | 29 | #define PORT 22335 |
34 | 30 | ||
diff --git a/src/util/test_server_with_client_unix.c b/src/util/test_server_with_client_unix.c index 57a67d3f4..30e993411 100644 --- a/src/util/test_server_with_client_unix.c +++ b/src/util/test_server_with_client_unix.c | |||
@@ -24,11 +24,7 @@ | |||
24 | * client_get_address and receive_done (resume processing) | 24 | * client_get_address and receive_done (resume processing) |
25 | */ | 25 | */ |
26 | #include "platform.h" | 26 | #include "platform.h" |
27 | #include "gnunet_common.h" | 27 | #include "gnunet_util_lib.h" |
28 | #include "gnunet_scheduler_lib.h" | ||
29 | #include "gnunet_client_lib.h" | ||
30 | #include "gnunet_server_lib.h" | ||
31 | #include "gnunet_time_lib.h" | ||
32 | 28 | ||
33 | #define MY_TYPE 128 | 29 | #define MY_TYPE 128 |
34 | 30 | ||
diff --git a/src/util/test_service.c b/src/util/test_service.c index bdd3d8521..eee0cecc1 100644 --- a/src/util/test_service.c +++ b/src/util/test_service.c | |||
@@ -23,13 +23,7 @@ | |||
23 | * @author Christian Grothoff | 23 | * @author Christian Grothoff |
24 | */ | 24 | */ |
25 | #include "platform.h" | 25 | #include "platform.h" |
26 | #include "gnunet_common.h" | 26 | #include "gnunet_util_lib.h" |
27 | #include "gnunet_client_lib.h" | ||
28 | #include "gnunet_getopt_lib.h" | ||
29 | #include "gnunet_program_lib.h" | ||
30 | #include "gnunet_service_lib.h" | ||
31 | #include "gnunet_scheduler_lib.h" | ||
32 | #include "gnunet_time_lib.h" | ||
33 | 27 | ||
34 | 28 | ||
35 | #define PORT 12435 | 29 | #define PORT 12435 |
diff --git a/src/util/test_strings.c b/src/util/test_strings.c index e0c3cfebf..f6f872211 100644 --- a/src/util/test_strings.c +++ b/src/util/test_strings.c | |||
@@ -22,8 +22,7 @@ | |||
22 | * @brief testcase for strings.c | 22 | * @brief testcase for strings.c |
23 | */ | 23 | */ |
24 | #include "platform.h" | 24 | #include "platform.h" |
25 | #include "gnunet_common.h" | 25 | #include "gnunet_util_lib.h" |
26 | #include "gnunet_strings_lib.h" | ||
27 | 26 | ||
28 | 27 | ||
29 | #define WANT(a,b) if (0 != strcmp(a,b)) { fprintf(stderr, "Got `%s', wanted `%s'\n", b, a); GNUNET_free(b); GNUNET_break(0); return 1;} else { GNUNET_free (b); } | 28 | #define WANT(a,b) if (0 != strcmp(a,b)) { fprintf(stderr, "Got `%s', wanted `%s'\n", b, a); GNUNET_free(b); GNUNET_break(0); return 1;} else { GNUNET_free (b); } |
diff --git a/src/util/test_strings_to_data.c b/src/util/test_strings_to_data.c index 2ac680b83..125101e55 100644 --- a/src/util/test_strings_to_data.c +++ b/src/util/test_strings_to_data.c | |||
@@ -22,9 +22,7 @@ | |||
22 | * @brief testcase for strings.c | 22 | * @brief testcase for strings.c |
23 | */ | 23 | */ |
24 | #include "platform.h" | 24 | #include "platform.h" |
25 | #include "gnunet_common.h" | 25 | #include "gnunet_util_lib.h" |
26 | #include "gnunet_crypto_lib.h" | ||
27 | #include "gnunet_strings_lib.h" | ||
28 | 26 | ||
29 | 27 | ||
30 | int | 28 | int |
diff --git a/src/util/time.c b/src/util/time.c index fea0947bd..6b1b43062 100644 --- a/src/util/time.c +++ b/src/util/time.c | |||
@@ -24,7 +24,7 @@ | |||
24 | * @brief functions for handling time and time arithmetic | 24 | * @brief functions for handling time and time arithmetic |
25 | */ | 25 | */ |
26 | #include "platform.h" | 26 | #include "platform.h" |
27 | #include "gnunet_time_lib.h" | 27 | #include "gnunet_util_lib.h" |
28 | 28 | ||
29 | #define LOG(kind,...) GNUNET_log_from (kind, "util", __VA_ARGS__) | 29 | #define LOG(kind,...) GNUNET_log_from (kind, "util", __VA_ARGS__) |
30 | 30 | ||