diff options
Diffstat (limited to 'src')
27 files changed, 109 insertions, 93 deletions
diff --git a/src/fs/meta_data.c b/src/fs/meta_data.c index 7112a150a..cf9448aa4 100644 --- a/src/fs/meta_data.c +++ b/src/fs/meta_data.c | |||
@@ -26,6 +26,7 @@ | |||
26 | */ | 26 | */ |
27 | 27 | ||
28 | 28 | ||
29 | #include "gnunet_common.h" | ||
29 | #include "platform.h" | 30 | #include "platform.h" |
30 | #include "gnunet_util_lib.h" | 31 | #include "gnunet_util_lib.h" |
31 | 32 | ||
@@ -1050,7 +1051,7 @@ GNUNET_FS_meta_data_deserialize (const char *input, size_t size) | |||
1050 | * @param result the buffer to store a pointer to the (allocated) metadata | 1051 | * @param result the buffer to store a pointer to the (allocated) metadata |
1051 | * @return #GNUNET_OK on success, #GNUNET_SYSERR on failure | 1052 | * @return #GNUNET_OK on success, #GNUNET_SYSERR on failure |
1052 | */ | 1053 | */ |
1053 | int | 1054 | enum GNUNET_GenericReturnValue |
1054 | GNUNET_FS_read_meta_data (struct GNUNET_BIO_ReadHandle *h, | 1055 | GNUNET_FS_read_meta_data (struct GNUNET_BIO_ReadHandle *h, |
1055 | const char *what, | 1056 | const char *what, |
1056 | struct GNUNET_FS_MetaData **result) | 1057 | struct GNUNET_FS_MetaData **result) |
diff --git a/src/gns/gnunet-gns-proxy.c b/src/gns/gnunet-gns-proxy.c index 312fde293..b38f0a425 100644 --- a/src/gns/gnunet-gns-proxy.c +++ b/src/gns/gnunet-gns-proxy.c | |||
@@ -1345,7 +1345,7 @@ create_mhd_response_from_s5r (struct Socks5Request *s5r) | |||
1345 | &resp_code)); | 1345 | &resp_code)); |
1346 | GNUNET_break (CURLE_OK == | 1346 | GNUNET_break (CURLE_OK == |
1347 | curl_easy_getinfo (s5r->curl, | 1347 | curl_easy_getinfo (s5r->curl, |
1348 | CURLINFO_CONTENT_LENGTH_DOWNLOAD, | 1348 | CURLINFO_CONTENT_LENGTH_DOWNLOAD_T, |
1349 | &content_length)); | 1349 | &content_length)); |
1350 | GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, | 1350 | GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, |
1351 | "Creating MHD response with code %d and size %d for %s%s\n", | 1351 | "Creating MHD response with code %d and size %d for %s%s\n", |
diff --git a/src/gnsrecord/gnsrecord_misc.c b/src/gnsrecord/gnsrecord_misc.c index fde553a83..4727842ea 100644 --- a/src/gnsrecord/gnsrecord_misc.c +++ b/src/gnsrecord/gnsrecord_misc.c | |||
@@ -25,6 +25,7 @@ | |||
25 | * @author Matthias Wachs | 25 | * @author Matthias Wachs |
26 | * @author Christian Grothoff | 26 | * @author Christian Grothoff |
27 | */ | 27 | */ |
28 | #include "gnunet_common.h" | ||
28 | #include "platform.h" | 29 | #include "platform.h" |
29 | #include "gnunet_util_lib.h" | 30 | #include "gnunet_util_lib.h" |
30 | #include "gnunet_constants.h" | 31 | #include "gnunet_constants.h" |
@@ -89,7 +90,7 @@ GNUNET_GNSRECORD_z2s (const struct GNUNET_IDENTITY_PublicKey *z) | |||
89 | * @param b record | 90 | * @param b record |
90 | * @return #GNUNET_YES if the records are equal or #GNUNET_NO if they are not | 91 | * @return #GNUNET_YES if the records are equal or #GNUNET_NO if they are not |
91 | */ | 92 | */ |
92 | int | 93 | enum GNUNET_GenericReturnValue |
93 | GNUNET_GNSRECORD_records_cmp (const struct GNUNET_GNSRECORD_Data *a, | 94 | GNUNET_GNSRECORD_records_cmp (const struct GNUNET_GNSRECORD_Data *a, |
94 | const struct GNUNET_GNSRECORD_Data *b) | 95 | const struct GNUNET_GNSRECORD_Data *b) |
95 | { | 96 | { |
diff --git a/src/hostlist/gnunet-daemon-hostlist_client.c b/src/hostlist/gnunet-daemon-hostlist_client.c index 399a7dc39..c212fe258 100644 --- a/src/hostlist/gnunet-daemon-hostlist_client.c +++ b/src/hostlist/gnunet-daemon-hostlist_client.c | |||
@@ -1025,9 +1025,9 @@ download_hostlist () | |||
1025 | } | 1025 | } |
1026 | CURL_EASY_SETOPT (curl, CURLOPT_FOLLOWLOCATION, 1); | 1026 | CURL_EASY_SETOPT (curl, CURLOPT_FOLLOWLOCATION, 1); |
1027 | CURL_EASY_SETOPT (curl, | 1027 | CURL_EASY_SETOPT (curl, |
1028 | CURLOPT_REDIR_PROTOCOLS, | 1028 | CURLOPT_REDIR_PROTOCOLS_STR, |
1029 | CURLPROTO_HTTP | CURLPROTO_HTTPS); | 1029 | CURLPROTO_HTTP | CURLPROTO_HTTPS); |
1030 | CURL_EASY_SETOPT (curl, CURLOPT_PROTOCOLS, CURLPROTO_HTTP | CURLPROTO_HTTPS); | 1030 | CURL_EASY_SETOPT (curl, CURLOPT_PROTOCOLS_STR, CURLPROTO_HTTP | CURLPROTO_HTTPS); |
1031 | CURL_EASY_SETOPT (curl, CURLOPT_MAXREDIRS, 4); | 1031 | CURL_EASY_SETOPT (curl, CURLOPT_MAXREDIRS, 4); |
1032 | /* no need to abort if the above failed */ | 1032 | /* no need to abort if the above failed */ |
1033 | CURL_EASY_SETOPT (curl, CURLOPT_URL, current_url); | 1033 | CURL_EASY_SETOPT (curl, CURLOPT_URL, current_url); |
diff --git a/src/include/gnunet_bio_lib.h b/src/include/gnunet_bio_lib.h index 48a1a512d..73550db7e 100644 --- a/src/include/gnunet_bio_lib.h +++ b/src/include/gnunet_bio_lib.h | |||
@@ -33,6 +33,7 @@ | |||
33 | * @{ | 33 | * @{ |
34 | */ | 34 | */ |
35 | 35 | ||
36 | #include "gnunet_common.h" | ||
36 | #if !defined (__GNUNET_UTIL_LIB_H_INSIDE__) | 37 | #if !defined (__GNUNET_UTIL_LIB_H_INSIDE__) |
37 | #error "Only <gnunet_util_lib.h> can be included directly." | 38 | #error "Only <gnunet_util_lib.h> can be included directly." |
38 | #endif | 39 | #endif |
@@ -88,7 +89,7 @@ GNUNET_BIO_read_open_buffer (void *buffer, size_t size); | |||
88 | * @param emsg set to the error message | 89 | * @param emsg set to the error message |
89 | * @return #GNUNET_OK on success, #GNUNET_SYSERR otherwise | 90 | * @return #GNUNET_OK on success, #GNUNET_SYSERR otherwise |
90 | */ | 91 | */ |
91 | int | 92 | enum GNUNET_GenericReturnValue |
92 | GNUNET_BIO_read_close (struct GNUNET_BIO_ReadHandle *h, char **emsg); | 93 | GNUNET_BIO_read_close (struct GNUNET_BIO_ReadHandle *h, char **emsg); |
93 | 94 | ||
94 | /** | 95 | /** |
@@ -110,7 +111,7 @@ GNUNET_BIO_read_set_error (struct GNUNET_BIO_ReadHandle *h, const char* emsg); | |||
110 | * @param len the number of bytes to read | 111 | * @param len the number of bytes to read |
111 | * @return #GNUNET_OK on success, #GNUNET_SYSERR on failure | 112 | * @return #GNUNET_OK on success, #GNUNET_SYSERR on failure |
112 | */ | 113 | */ |
113 | int | 114 | enum GNUNET_GenericReturnValue |
114 | GNUNET_BIO_read (struct GNUNET_BIO_ReadHandle *h, | 115 | GNUNET_BIO_read (struct GNUNET_BIO_ReadHandle *h, |
115 | const char *what, | 116 | const char *what, |
116 | void *result, | 117 | void *result, |
@@ -127,7 +128,7 @@ GNUNET_BIO_read (struct GNUNET_BIO_ReadHandle *h, | |||
127 | * @param max_length maximum allowed length for the string | 128 | * @param max_length maximum allowed length for the string |
128 | * @return #GNUNET_OK on success, #GNUNET_SYSERR on failure | 129 | * @return #GNUNET_OK on success, #GNUNET_SYSERR on failure |
129 | */ | 130 | */ |
130 | int | 131 | enum GNUNET_GenericReturnValue |
131 | GNUNET_BIO_read_string (struct GNUNET_BIO_ReadHandle *h, | 132 | GNUNET_BIO_read_string (struct GNUNET_BIO_ReadHandle *h, |
132 | const char *what, | 133 | const char *what, |
133 | char **result, | 134 | char **result, |
@@ -142,7 +143,7 @@ GNUNET_BIO_read_string (struct GNUNET_BIO_ReadHandle *h, | |||
142 | * @param what describes what is being read (for error message creation) | 143 | * @param what describes what is being read (for error message creation) |
143 | * @param f address of float to read | 144 | * @param f address of float to read |
144 | */ | 145 | */ |
145 | int | 146 | enum GNUNET_GenericReturnValue |
146 | GNUNET_BIO_read_float (struct GNUNET_BIO_ReadHandle *h, | 147 | GNUNET_BIO_read_float (struct GNUNET_BIO_ReadHandle *h, |
147 | const char *what, | 148 | const char *what, |
148 | float *f); | 149 | float *f); |
@@ -155,7 +156,7 @@ GNUNET_BIO_read_float (struct GNUNET_BIO_ReadHandle *h, | |||
155 | * @param what describes what is being read (for error message creation) | 156 | * @param what describes what is being read (for error message creation) |
156 | * @param f address of double to read | 157 | * @param f address of double to read |
157 | */ | 158 | */ |
158 | int | 159 | enum GNUNET_GenericReturnValue |
159 | GNUNET_BIO_read_double (struct GNUNET_BIO_ReadHandle *h, | 160 | GNUNET_BIO_read_double (struct GNUNET_BIO_ReadHandle *h, |
160 | const char *what, | 161 | const char *what, |
161 | double *f); | 162 | double *f); |
@@ -169,7 +170,7 @@ GNUNET_BIO_read_double (struct GNUNET_BIO_ReadHandle *h, | |||
169 | * @param i where to store the data | 170 | * @param i where to store the data |
170 | * @return #GNUNET_OK on success, #GNUNET_SYSERR on error | 171 | * @return #GNUNET_OK on success, #GNUNET_SYSERR on error |
171 | */ | 172 | */ |
172 | int | 173 | enum GNUNET_GenericReturnValue |
173 | GNUNET_BIO_read_int32 (struct GNUNET_BIO_ReadHandle *h, | 174 | GNUNET_BIO_read_int32 (struct GNUNET_BIO_ReadHandle *h, |
174 | const char *what, | 175 | const char *what, |
175 | int32_t *i); | 176 | int32_t *i); |
@@ -183,7 +184,7 @@ GNUNET_BIO_read_int32 (struct GNUNET_BIO_ReadHandle *h, | |||
183 | * @param i where to store the data | 184 | * @param i where to store the data |
184 | * @return #GNUNET_OK on success, #GNUNET_SYSERR on error | 185 | * @return #GNUNET_OK on success, #GNUNET_SYSERR on error |
185 | */ | 186 | */ |
186 | int | 187 | enum GNUNET_GenericReturnValue |
187 | GNUNET_BIO_read_int64 (struct GNUNET_BIO_ReadHandle *h, | 188 | GNUNET_BIO_read_int64 (struct GNUNET_BIO_ReadHandle *h, |
188 | const char *what, | 189 | const char *what, |
189 | int64_t *i); | 190 | int64_t *i); |
@@ -224,7 +225,7 @@ GNUNET_BIO_write_open_buffer (void); | |||
224 | * @return #GNUNET_OK upon success. Upon failure #GNUNET_SYSERR is returned | 225 | * @return #GNUNET_OK upon success. Upon failure #GNUNET_SYSERR is returned |
225 | * and the file is closed | 226 | * and the file is closed |
226 | */ | 227 | */ |
227 | int | 228 | enum GNUNET_GenericReturnValue |
228 | GNUNET_BIO_flush (struct GNUNET_BIO_WriteHandle *h); | 229 | GNUNET_BIO_flush (struct GNUNET_BIO_WriteHandle *h); |
229 | 230 | ||
230 | 231 | ||
@@ -240,7 +241,7 @@ GNUNET_BIO_flush (struct GNUNET_BIO_WriteHandle *h); | |||
240 | * @param size where to store the size of @e contents | 241 | * @param size where to store the size of @e contents |
241 | * @return #GNUNET_OK on success, #GNUNET_SYSERR otherwise | 242 | * @return #GNUNET_OK on success, #GNUNET_SYSERR otherwise |
242 | */ | 243 | */ |
243 | int | 244 | enum GNUNET_GenericReturnValue |
244 | GNUNET_BIO_get_buffer_contents (struct GNUNET_BIO_WriteHandle *h, | 245 | GNUNET_BIO_get_buffer_contents (struct GNUNET_BIO_WriteHandle *h, |
245 | char **emsg, | 246 | char **emsg, |
246 | void **contents, | 247 | void **contents, |
@@ -256,7 +257,7 @@ GNUNET_BIO_get_buffer_contents (struct GNUNET_BIO_WriteHandle *h, | |||
256 | * if the handle has an error message, the return value is #GNUNET_SYSERR | 257 | * if the handle has an error message, the return value is #GNUNET_SYSERR |
257 | * @return #GNUNET_OK on success, #GNUNET_SYSERR otherwise | 258 | * @return #GNUNET_OK on success, #GNUNET_SYSERR otherwise |
258 | */ | 259 | */ |
259 | int | 260 | enum GNUNET_GenericReturnValue |
260 | GNUNET_BIO_write_close (struct GNUNET_BIO_WriteHandle *h, char **emsg); | 261 | GNUNET_BIO_write_close (struct GNUNET_BIO_WriteHandle *h, char **emsg); |
261 | 262 | ||
262 | 263 | ||
@@ -269,7 +270,7 @@ GNUNET_BIO_write_close (struct GNUNET_BIO_WriteHandle *h, char **emsg); | |||
269 | * @param n number of bytes to write | 270 | * @param n number of bytes to write |
270 | * @return #GNUNET_OK on success, #GNUNET_SYSERR on error | 271 | * @return #GNUNET_OK on success, #GNUNET_SYSERR on error |
271 | */ | 272 | */ |
272 | int | 273 | enum GNUNET_GenericReturnValue |
273 | GNUNET_BIO_write (struct GNUNET_BIO_WriteHandle *h, | 274 | GNUNET_BIO_write (struct GNUNET_BIO_WriteHandle *h, |
274 | const char *what, | 275 | const char *what, |
275 | const void *buffer, | 276 | const void *buffer, |
@@ -284,7 +285,7 @@ GNUNET_BIO_write (struct GNUNET_BIO_WriteHandle *h, | |||
284 | * @param s string to write (can be NULL) | 285 | * @param s string to write (can be NULL) |
285 | * @return #GNUNET_OK on success, #GNUNET_SYSERR on error | 286 | * @return #GNUNET_OK on success, #GNUNET_SYSERR on error |
286 | */ | 287 | */ |
287 | int | 288 | enum GNUNET_GenericReturnValue |
288 | GNUNET_BIO_write_string (struct GNUNET_BIO_WriteHandle *h, | 289 | GNUNET_BIO_write_string (struct GNUNET_BIO_WriteHandle *h, |
289 | const char *what, | 290 | const char *what, |
290 | const char *s); | 291 | const char *s); |
@@ -298,7 +299,7 @@ GNUNET_BIO_write_string (struct GNUNET_BIO_WriteHandle *h, | |||
298 | * @param what what is being written (for error message creation) | 299 | * @param what what is being written (for error message creation) |
299 | * @param f float to write (must be a variable) | 300 | * @param f float to write (must be a variable) |
300 | */ | 301 | */ |
301 | int | 302 | enum GNUNET_GenericReturnValue |
302 | GNUNET_BIO_write_float (struct GNUNET_BIO_WriteHandle *h, | 303 | GNUNET_BIO_write_float (struct GNUNET_BIO_WriteHandle *h, |
303 | const char *what, | 304 | const char *what, |
304 | float f); | 305 | float f); |
@@ -310,7 +311,7 @@ GNUNET_BIO_write_float (struct GNUNET_BIO_WriteHandle *h, | |||
310 | * @param what what is being written (for error message creation) | 311 | * @param what what is being written (for error message creation) |
311 | * @param f double to write (must be a variable) | 312 | * @param f double to write (must be a variable) |
312 | */ | 313 | */ |
313 | int | 314 | enum GNUNET_GenericReturnValue |
314 | GNUNET_BIO_write_double (struct GNUNET_BIO_WriteHandle *h, | 315 | GNUNET_BIO_write_double (struct GNUNET_BIO_WriteHandle *h, |
315 | const char *what, | 316 | const char *what, |
316 | double f); | 317 | double f); |
@@ -324,7 +325,7 @@ GNUNET_BIO_write_double (struct GNUNET_BIO_WriteHandle *h, | |||
324 | * @param i 32-bit integer to write | 325 | * @param i 32-bit integer to write |
325 | * @return #GNUNET_OK on success, #GNUNET_SYSERR on error | 326 | * @return #GNUNET_OK on success, #GNUNET_SYSERR on error |
326 | */ | 327 | */ |
327 | int | 328 | enum GNUNET_GenericReturnValue |
328 | GNUNET_BIO_write_int32 (struct GNUNET_BIO_WriteHandle *h, | 329 | GNUNET_BIO_write_int32 (struct GNUNET_BIO_WriteHandle *h, |
329 | const char *what, | 330 | const char *what, |
330 | int32_t i); | 331 | int32_t i); |
@@ -338,7 +339,7 @@ GNUNET_BIO_write_int32 (struct GNUNET_BIO_WriteHandle *h, | |||
338 | * @param i 64-bit integer to write | 339 | * @param i 64-bit integer to write |
339 | * @return #GNUNET_OK on success, #GNUNET_SYSERR on error | 340 | * @return #GNUNET_OK on success, #GNUNET_SYSERR on error |
340 | */ | 341 | */ |
341 | int | 342 | enum GNUNET_GenericReturnValue |
342 | GNUNET_BIO_write_int64 (struct GNUNET_BIO_WriteHandle *h, | 343 | GNUNET_BIO_write_int64 (struct GNUNET_BIO_WriteHandle *h, |
343 | const char *what, | 344 | const char *what, |
344 | int64_t i); | 345 | int64_t i); |
@@ -489,7 +490,7 @@ GNUNET_BIO_read_spec_double (const char *what, double *f); | |||
489 | * the last element must be #GNUNET_BIO_read_spec_end | 490 | * the last element must be #GNUNET_BIO_read_spec_end |
490 | * @return #GNUNET_OK on success, #GNUNET_SYSERR otherwise | 491 | * @return #GNUNET_OK on success, #GNUNET_SYSERR otherwise |
491 | */ | 492 | */ |
492 | int | 493 | enum GNUNET_GenericReturnValue |
493 | GNUNET_BIO_read_spec_commit (struct GNUNET_BIO_ReadHandle *h, | 494 | GNUNET_BIO_read_spec_commit (struct GNUNET_BIO_ReadHandle *h, |
494 | struct GNUNET_BIO_ReadSpec *rs); | 495 | struct GNUNET_BIO_ReadSpec *rs); |
495 | 496 | ||
@@ -635,7 +636,7 @@ GNUNET_BIO_write_spec_double (const char *what, double *f); | |||
635 | * the last element must be #GNUNET_BIO_write_spec_end | 636 | * the last element must be #GNUNET_BIO_write_spec_end |
636 | * @return #GNUNET_OK on success, #GNUNET_SYSERR otherwise | 637 | * @return #GNUNET_OK on success, #GNUNET_SYSERR otherwise |
637 | */ | 638 | */ |
638 | int | 639 | enum GNUNET_GenericReturnValue |
639 | GNUNET_BIO_write_spec_commit (struct GNUNET_BIO_WriteHandle *h, | 640 | GNUNET_BIO_write_spec_commit (struct GNUNET_BIO_WriteHandle *h, |
640 | struct GNUNET_BIO_WriteSpec *ws); | 641 | struct GNUNET_BIO_WriteSpec *ws); |
641 | 642 | ||
diff --git a/src/include/gnunet_container_lib.h b/src/include/gnunet_container_lib.h index ce1b8f296..df38317ca 100644 --- a/src/include/gnunet_container_lib.h +++ b/src/include/gnunet_container_lib.h | |||
@@ -52,6 +52,7 @@ | |||
52 | * @} | 52 | * @} |
53 | */ | 53 | */ |
54 | 54 | ||
55 | #include "gnunet_common.h" | ||
55 | #if !defined (__GNUNET_UTIL_LIB_H_INSIDE__) | 56 | #if !defined (__GNUNET_UTIL_LIB_H_INSIDE__) |
56 | #error "Only <gnunet_util_lib.h> can be included directly." | 57 | #error "Only <gnunet_util_lib.h> can be included directly." |
57 | #endif | 58 | #endif |
@@ -177,7 +178,7 @@ GNUNET_CONTAINER_bloomfilter_init (const char *data, | |||
177 | * @param size the size of the given @a data array | 178 | * @param size the size of the given @a data array |
178 | * @return #GNUNET_SYSERR if the data array of the wrong size | 179 | * @return #GNUNET_SYSERR if the data array of the wrong size |
179 | */ | 180 | */ |
180 | int | 181 | enum GNUNET_GenericReturnValue |
181 | GNUNET_CONTAINER_bloomfilter_get_raw_data ( | 182 | GNUNET_CONTAINER_bloomfilter_get_raw_data ( |
182 | const struct GNUNET_CONTAINER_BloomFilter *bf, | 183 | const struct GNUNET_CONTAINER_BloomFilter *bf, |
183 | char *data, | 184 | char *data, |
@@ -291,7 +292,7 @@ GNUNET_CONTAINER_bloomfilter_clear (struct GNUNET_CONTAINER_BloomFilter *bf); | |||
291 | * @param size size of @a data | 292 | * @param size size of @a data |
292 | * @return #GNUNET_OK on success | 293 | * @return #GNUNET_OK on success |
293 | */ | 294 | */ |
294 | int | 295 | enum GNUNET_GenericReturnValue |
295 | GNUNET_CONTAINER_bloomfilter_or (struct GNUNET_CONTAINER_BloomFilter *bf, | 296 | GNUNET_CONTAINER_bloomfilter_or (struct GNUNET_CONTAINER_BloomFilter *bf, |
296 | const char *data, | 297 | const char *data, |
297 | size_t size); | 298 | size_t size); |
@@ -307,7 +308,7 @@ GNUNET_CONTAINER_bloomfilter_or (struct GNUNET_CONTAINER_BloomFilter *bf, | |||
307 | * @param to_or the bloomfilter to or-in | 308 | * @param to_or the bloomfilter to or-in |
308 | * @return #GNUNET_OK on success | 309 | * @return #GNUNET_OK on success |
309 | */ | 310 | */ |
310 | int | 311 | enum GNUNET_GenericReturnValue |
311 | GNUNET_CONTAINER_bloomfilter_or2 ( | 312 | GNUNET_CONTAINER_bloomfilter_or2 ( |
312 | struct GNUNET_CONTAINER_BloomFilter *bf, | 313 | struct GNUNET_CONTAINER_BloomFilter *bf, |
313 | const struct GNUNET_CONTAINER_BloomFilter *to_or); | 314 | const struct GNUNET_CONTAINER_BloomFilter *to_or); |
@@ -577,7 +578,7 @@ GNUNET_CONTAINER_multihashmap_size ( | |||
577 | * @return the number of key value pairs processed, | 578 | * @return the number of key value pairs processed, |
578 | * #GNUNET_SYSERR if it aborted iteration | 579 | * #GNUNET_SYSERR if it aborted iteration |
579 | */ | 580 | */ |
580 | int | 581 | enum GNUNET_GenericReturnValue |
581 | GNUNET_CONTAINER_multihashmap_iterate ( | 582 | GNUNET_CONTAINER_multihashmap_iterate ( |
582 | struct GNUNET_CONTAINER_MultiHashMap *map, | 583 | struct GNUNET_CONTAINER_MultiHashMap *map, |
583 | GNUNET_CONTAINER_MultiHashMapIteratorCallback it, | 584 | GNUNET_CONTAINER_MultiHashMapIteratorCallback it, |
@@ -646,7 +647,7 @@ GNUNET_CONTAINER_multihashmap_iterator_destroy ( | |||
646 | * @return the number of key value pairs processed, | 647 | * @return the number of key value pairs processed, |
647 | * #GNUNET_SYSERR if it aborted iteration | 648 | * #GNUNET_SYSERR if it aborted iteration |
648 | */ | 649 | */ |
649 | int | 650 | enum GNUNET_GenericReturnValue |
650 | GNUNET_CONTAINER_multihashmap_get_multiple ( | 651 | GNUNET_CONTAINER_multihashmap_get_multiple ( |
651 | struct GNUNET_CONTAINER_MultiHashMap *map, | 652 | struct GNUNET_CONTAINER_MultiHashMap *map, |
652 | const struct GNUNET_HashCode *key, | 653 | const struct GNUNET_HashCode *key, |
@@ -1423,7 +1424,7 @@ GNUNET_CONTAINER_multiuuidmap_size ( | |||
1423 | * @return the number of key value pairs processed, | 1424 | * @return the number of key value pairs processed, |
1424 | * #GNUNET_SYSERR if it aborted iteration | 1425 | * #GNUNET_SYSERR if it aborted iteration |
1425 | */ | 1426 | */ |
1426 | int | 1427 | enum GNUNET_GenericReturnValue |
1427 | GNUNET_CONTAINER_multiuuidmap_iterate ( | 1428 | GNUNET_CONTAINER_multiuuidmap_iterate ( |
1428 | struct GNUNET_CONTAINER_MultiUuidmap *map, | 1429 | struct GNUNET_CONTAINER_MultiUuidmap *map, |
1429 | GNUNET_CONTAINER_MultiUuidmapIteratorCallback it, | 1430 | GNUNET_CONTAINER_MultiUuidmapIteratorCallback it, |
diff --git a/src/include/gnunet_crypto_lib.h b/src/include/gnunet_crypto_lib.h index 289aa5649..44dfb4e44 100644 --- a/src/include/gnunet_crypto_lib.h +++ b/src/include/gnunet_crypto_lib.h | |||
@@ -2817,7 +2817,7 @@ GNUNET_CRYPTO_rsa_public_key_cmp (const struct GNUNET_CRYPTO_RsaPublicKey *p1, | |||
2817 | * @param[out] buf_size number of bytes stored in @a buf | 2817 | * @param[out] buf_size number of bytes stored in @a buf |
2818 | * @return #GNUNET_YES if successful, #GNUNET_NO if RSA key is malicious | 2818 | * @return #GNUNET_YES if successful, #GNUNET_NO if RSA key is malicious |
2819 | */ | 2819 | */ |
2820 | int | 2820 | enum GNUNET_GenericReturnValue |
2821 | GNUNET_CRYPTO_rsa_blind (const struct GNUNET_HashCode *hash, | 2821 | GNUNET_CRYPTO_rsa_blind (const struct GNUNET_HashCode *hash, |
2822 | const struct GNUNET_CRYPTO_RsaBlindingKeySecret *bks, | 2822 | const struct GNUNET_CRYPTO_RsaBlindingKeySecret *bks, |
2823 | struct GNUNET_CRYPTO_RsaPublicKey *pkey, | 2823 | struct GNUNET_CRYPTO_RsaPublicKey *pkey, |
diff --git a/src/include/gnunet_curl_lib.h b/src/include/gnunet_curl_lib.h index bdf3843b1..967170085 100644 --- a/src/include/gnunet_curl_lib.h +++ b/src/include/gnunet_curl_lib.h | |||
@@ -433,7 +433,7 @@ GNUNET_CURL_enable_async_scope_header (struct GNUNET_CURL_Context *ctx, | |||
433 | * | 433 | * |
434 | * @returns #GNUNET_YES iff given a valid scope ID | 434 | * @returns #GNUNET_YES iff given a valid scope ID |
435 | */ | 435 | */ |
436 | int | 436 | enum GNUNET_GenericReturnValue |
437 | GNUNET_CURL_is_valid_scope_id (const char *scope_id); | 437 | GNUNET_CURL_is_valid_scope_id (const char *scope_id); |
438 | 438 | ||
439 | 439 | ||
diff --git a/src/include/gnunet_gnsrecord_lib.h b/src/include/gnunet_gnsrecord_lib.h index 3aee30117..338f22223 100644 --- a/src/include/gnunet_gnsrecord_lib.h +++ b/src/include/gnunet_gnsrecord_lib.h | |||
@@ -38,6 +38,7 @@ | |||
38 | #define GNUNET_GNSRECORD_LIB_H | 38 | #define GNUNET_GNSRECORD_LIB_H |
39 | 39 | ||
40 | 40 | ||
41 | #include "gnunet_common.h" | ||
41 | #include "gnunet_identity_service.h" | 42 | #include "gnunet_identity_service.h" |
42 | 43 | ||
43 | #ifdef __cplusplus | 44 | #ifdef __cplusplus |
@@ -653,7 +654,7 @@ GNUNET_GNSRECORD_block_create2 (const struct GNUNET_IDENTITY_PrivateKey *key, | |||
653 | * @param block block to verify | 654 | * @param block block to verify |
654 | * @return #GNUNET_OK if the signature is valid | 655 | * @return #GNUNET_OK if the signature is valid |
655 | */ | 656 | */ |
656 | int | 657 | enum GNUNET_GenericReturnValue |
657 | GNUNET_GNSRECORD_block_verify (const struct GNUNET_GNSRECORD_Block *block); | 658 | GNUNET_GNSRECORD_block_verify (const struct GNUNET_GNSRECORD_Block *block); |
658 | 659 | ||
659 | 660 | ||
@@ -668,7 +669,7 @@ GNUNET_GNSRECORD_block_verify (const struct GNUNET_GNSRECORD_Block *block); | |||
668 | * @return #GNUNET_OK on success, #GNUNET_SYSERR if the block was | 669 | * @return #GNUNET_OK on success, #GNUNET_SYSERR if the block was |
669 | * not well-formed | 670 | * not well-formed |
670 | */ | 671 | */ |
671 | int | 672 | enum GNUNET_GenericReturnValue |
672 | GNUNET_GNSRECORD_block_decrypt ( | 673 | GNUNET_GNSRECORD_block_decrypt ( |
673 | const struct GNUNET_GNSRECORD_Block *block, | 674 | const struct GNUNET_GNSRECORD_Block *block, |
674 | const struct GNUNET_IDENTITY_PublicKey *zone_key, const char *label, | 675 | const struct GNUNET_IDENTITY_PublicKey *zone_key, const char *label, |
@@ -682,7 +683,7 @@ GNUNET_GNSRECORD_block_decrypt ( | |||
682 | * @param b another record | 683 | * @param b another record |
683 | * @return #GNUNET_YES if the records are equal, or #GNUNET_NO if not. | 684 | * @return #GNUNET_YES if the records are equal, or #GNUNET_NO if not. |
684 | */ | 685 | */ |
685 | int | 686 | enum GNUNET_GenericReturnValue |
686 | GNUNET_GNSRECORD_records_cmp (const struct GNUNET_GNSRECORD_Data *a, | 687 | GNUNET_GNSRECORD_records_cmp (const struct GNUNET_GNSRECORD_Data *a, |
687 | const struct GNUNET_GNSRECORD_Data *b); | 688 | const struct GNUNET_GNSRECORD_Data *b); |
688 | 689 | ||
diff --git a/src/include/gnunet_mq_lib.h b/src/include/gnunet_mq_lib.h index f424c49c2..3eca71f0f 100644 --- a/src/include/gnunet_mq_lib.h +++ b/src/include/gnunet_mq_lib.h | |||
@@ -18,6 +18,7 @@ | |||
18 | SPDX-License-Identifier: AGPL3.0-or-later | 18 | SPDX-License-Identifier: AGPL3.0-or-later |
19 | */ | 19 | */ |
20 | 20 | ||
21 | #include "gnunet_common.h" | ||
21 | #if !defined (__GNUNET_UTIL_LIB_H_INSIDE__) | 22 | #if !defined (__GNUNET_UTIL_LIB_H_INSIDE__) |
22 | #error "Only <gnunet_util_lib.h> can be included directly." | 23 | #error "Only <gnunet_util_lib.h> can be included directly." |
23 | #endif | 24 | #endif |
@@ -691,7 +692,7 @@ struct GNUNET_MQ_MessageHandler | |||
691 | * @return #GNUNET_OK on success, #GNUNET_NO if no handler matched, | 692 | * @return #GNUNET_OK on success, #GNUNET_NO if no handler matched, |
692 | * #GNUNET_SYSERR if message was rejected by check function | 693 | * #GNUNET_SYSERR if message was rejected by check function |
693 | */ | 694 | */ |
694 | int | 695 | enum GNUNET_GenericReturnValue |
695 | GNUNET_MQ_handle_message (const struct GNUNET_MQ_MessageHandler *handlers, | 696 | GNUNET_MQ_handle_message (const struct GNUNET_MQ_MessageHandler *handlers, |
696 | const struct GNUNET_MessageHeader *mh); | 697 | const struct GNUNET_MessageHeader *mh); |
697 | 698 | ||
diff --git a/src/include/gnunet_mst_lib.h b/src/include/gnunet_mst_lib.h index af2dd3353..5b848bbd6 100644 --- a/src/include/gnunet_mst_lib.h +++ b/src/include/gnunet_mst_lib.h | |||
@@ -127,7 +127,7 @@ GNUNET_MST_from_buffer (struct GNUNET_MessageStreamTokenizer *mst, | |||
127 | * #GNUNET_NO if one_shot was set and we have another message ready | 127 | * #GNUNET_NO if one_shot was set and we have another message ready |
128 | * #GNUNET_SYSERR if the data stream is corrupt | 128 | * #GNUNET_SYSERR if the data stream is corrupt |
129 | */ | 129 | */ |
130 | int | 130 | enum GNUNET_GenericReturnValue |
131 | GNUNET_MST_read (struct GNUNET_MessageStreamTokenizer *mst, | 131 | GNUNET_MST_read (struct GNUNET_MessageStreamTokenizer *mst, |
132 | struct GNUNET_NETWORK_Handle *sock, | 132 | struct GNUNET_NETWORK_Handle *sock, |
133 | int purge, | 133 | int purge, |
@@ -145,7 +145,7 @@ GNUNET_MST_read (struct GNUNET_MessageStreamTokenizer *mst, | |||
145 | * #GNUNET_NO if one_shot was set and we have another message ready | 145 | * #GNUNET_NO if one_shot was set and we have another message ready |
146 | * #GNUNET_SYSERR if the data stream is corrupt | 146 | * #GNUNET_SYSERR if the data stream is corrupt |
147 | */ | 147 | */ |
148 | int | 148 | enum GNUNET_GenericReturnValue |
149 | GNUNET_MST_next (struct GNUNET_MessageStreamTokenizer *mst, | 149 | GNUNET_MST_next (struct GNUNET_MessageStreamTokenizer *mst, |
150 | int one_shot); | 150 | int one_shot); |
151 | 151 | ||
diff --git a/src/include/gnunet_network_lib.h b/src/include/gnunet_network_lib.h index 8d71d7764..764b7b29d 100644 --- a/src/include/gnunet_network_lib.h +++ b/src/include/gnunet_network_lib.h | |||
@@ -39,6 +39,7 @@ | |||
39 | #ifndef GNUNET_NETWORK_LIB_H | 39 | #ifndef GNUNET_NETWORK_LIB_H |
40 | #define GNUNET_NETWORK_LIB_H | 40 | #define GNUNET_NETWORK_LIB_H |
41 | 41 | ||
42 | #include "gnunet_common.h" | ||
42 | #ifdef __cplusplus | 43 | #ifdef __cplusplus |
43 | extern "C" | 44 | extern "C" |
44 | { | 45 | { |
@@ -157,7 +158,7 @@ GNUNET_NETWORK_socket_box_native (int fd); | |||
157 | * @param doBlock blocking mode | 158 | * @param doBlock blocking mode |
158 | * @return #GNUNET_OK on success, #GNUNET_SYSERR on error | 159 | * @return #GNUNET_OK on success, #GNUNET_SYSERR on error |
159 | */ | 160 | */ |
160 | int | 161 | enum GNUNET_GenericReturnValue |
161 | GNUNET_NETWORK_socket_set_blocking (struct GNUNET_NETWORK_Handle *fd, | 162 | GNUNET_NETWORK_socket_set_blocking (struct GNUNET_NETWORK_Handle *fd, |
162 | int doBlock); | 163 | int doBlock); |
163 | 164 | ||
diff --git a/src/include/gnunet_plugin_lib.h b/src/include/gnunet_plugin_lib.h index a3135e2cf..2a9cde47f 100644 --- a/src/include/gnunet_plugin_lib.h +++ b/src/include/gnunet_plugin_lib.h | |||
@@ -70,7 +70,7 @@ typedef void * | |||
70 | * @param library_name name of the plugin to test if it is installed | 70 | * @param library_name name of the plugin to test if it is installed |
71 | * @return #GNUNET_YES if the plugin exists, #GNUNET_NO if not | 71 | * @return #GNUNET_YES if the plugin exists, #GNUNET_NO if not |
72 | */ | 72 | */ |
73 | int | 73 | enum GNUNET_GenericReturnValue |
74 | GNUNET_PLUGIN_test (const char *library_name); | 74 | GNUNET_PLUGIN_test (const char *library_name); |
75 | 75 | ||
76 | 76 | ||
diff --git a/src/namestore/gnunet-service-namestore.c b/src/namestore/gnunet-service-namestore.c index ed06b1dc5..f6594c6f9 100644 --- a/src/namestore/gnunet-service-namestore.c +++ b/src/namestore/gnunet-service-namestore.c | |||
@@ -1738,14 +1738,12 @@ handle_record_store (void *cls, const struct RecordStoreMessage *rp_msg) | |||
1738 | size_t rp_msg_len; | 1738 | size_t rp_msg_len; |
1739 | size_t rs_len; | 1739 | size_t rs_len; |
1740 | size_t rs_off; | 1740 | size_t rs_off; |
1741 | size_t body_len; | ||
1742 | struct StoreActivity *sa; | 1741 | struct StoreActivity *sa; |
1743 | struct RecordSet *rs; | 1742 | struct RecordSet *rs; |
1744 | enum GNUNET_ErrorCode res; | 1743 | enum GNUNET_ErrorCode res; |
1745 | 1744 | ||
1746 | key_len = ntohs (rp_msg->key_len); | 1745 | key_len = ntohs (rp_msg->key_len); |
1747 | rp_msg_len = ntohs (rp_msg->gns_header.header.size); | 1746 | rp_msg_len = ntohs (rp_msg->gns_header.header.size); |
1748 | body_len = rp_msg_len - sizeof (*rp_msg); | ||
1749 | rs_off = sizeof (*rp_msg) + key_len; | 1747 | rs_off = sizeof (*rp_msg) + key_len; |
1750 | rs_len = rp_msg_len - rs_off; | 1748 | rs_len = rp_msg_len - rs_off; |
1751 | if ((GNUNET_SYSERR == | 1749 | if ((GNUNET_SYSERR == |
diff --git a/src/sq/sq.c b/src/sq/sq.c index 777fb6311..557ec2771 100644 --- a/src/sq/sq.c +++ b/src/sq/sq.c | |||
@@ -22,11 +22,12 @@ | |||
22 | * @brief helper functions for Sqlite3 DB interactions | 22 | * @brief helper functions for Sqlite3 DB interactions |
23 | * @author Christian Grothoff | 23 | * @author Christian Grothoff |
24 | */ | 24 | */ |
25 | #include "gnunet_common.h" | ||
25 | #include "platform.h" | 26 | #include "platform.h" |
26 | #include "gnunet_sq_lib.h" | 27 | #include "gnunet_sq_lib.h" |
27 | 28 | ||
28 | 29 | ||
29 | int | 30 | enum GNUNET_GenericReturnValue |
30 | GNUNET_SQ_bind (sqlite3_stmt *stmt, | 31 | GNUNET_SQ_bind (sqlite3_stmt *stmt, |
31 | const struct GNUNET_SQ_QueryParam *params) | 32 | const struct GNUNET_SQ_QueryParam *params) |
32 | { | 33 | { |
@@ -71,7 +72,7 @@ GNUNET_SQ_bind (sqlite3_stmt *stmt, | |||
71 | * #GNUNET_OK if all results could be extracted | 72 | * #GNUNET_OK if all results could be extracted |
72 | * #GNUNET_SYSERR if a result was invalid (non-existing field) | 73 | * #GNUNET_SYSERR if a result was invalid (non-existing field) |
73 | */ | 74 | */ |
74 | int | 75 | enum GNUNET_GenericReturnValue |
75 | GNUNET_SQ_extract_result (sqlite3_stmt *result, | 76 | GNUNET_SQ_extract_result (sqlite3_stmt *result, |
76 | struct GNUNET_SQ_ResultSpec *rs) | 77 | struct GNUNET_SQ_ResultSpec *rs) |
77 | { | 78 | { |
diff --git a/src/sq/sq_exec.c b/src/sq/sq_exec.c index 8c47c22b4..d4690ee99 100644 --- a/src/sq/sq_exec.c +++ b/src/sq/sq_exec.c | |||
@@ -72,7 +72,7 @@ GNUNET_SQ_make_try_execute (const char *sql) | |||
72 | * @return #GNUNET_OK on success (modulo statements where errors can be ignored) | 72 | * @return #GNUNET_OK on success (modulo statements where errors can be ignored) |
73 | * #GNUNET_SYSERR on error | 73 | * #GNUNET_SYSERR on error |
74 | */ | 74 | */ |
75 | int | 75 | enum GNUNET_GenericReturnValue |
76 | GNUNET_SQ_exec_statements (sqlite3 *dbh, | 76 | GNUNET_SQ_exec_statements (sqlite3 *dbh, |
77 | const struct GNUNET_SQ_ExecuteStatement *es) | 77 | const struct GNUNET_SQ_ExecuteStatement *es) |
78 | { | 78 | { |
diff --git a/src/sq/sq_prepare.c b/src/sq/sq_prepare.c index b3825ee71..1df564bfb 100644 --- a/src/sq/sq_prepare.c +++ b/src/sq/sq_prepare.c | |||
@@ -22,6 +22,7 @@ | |||
22 | * @brief helper functions for executing SQL statements | 22 | * @brief helper functions for executing SQL statements |
23 | * @author Christian Grothoff | 23 | * @author Christian Grothoff |
24 | */ | 24 | */ |
25 | #include "gnunet_common.h" | ||
25 | #include "platform.h" | 26 | #include "platform.h" |
26 | #include "gnunet_sq_lib.h" | 27 | #include "gnunet_sq_lib.h" |
27 | 28 | ||
@@ -46,7 +47,7 @@ GNUNET_SQ_make_prepare (const char *sql, | |||
46 | } | 47 | } |
47 | 48 | ||
48 | 49 | ||
49 | int | 50 | enum GNUNET_GenericReturnValue |
50 | GNUNET_SQ_prepare (sqlite3 *dbh, | 51 | GNUNET_SQ_prepare (sqlite3 *dbh, |
51 | const struct GNUNET_SQ_PrepareStatement *ps) | 52 | const struct GNUNET_SQ_PrepareStatement *ps) |
52 | { | 53 | { |
diff --git a/src/util/bio.c b/src/util/bio.c index 7e3aa0d16..3a463bcd1 100644 --- a/src/util/bio.c +++ b/src/util/bio.c | |||
@@ -23,6 +23,7 @@ | |||
23 | * @author Christian Grothoff | 23 | * @author Christian Grothoff |
24 | */ | 24 | */ |
25 | 25 | ||
26 | #include "gnunet_common.h" | ||
26 | #include "platform.h" | 27 | #include "platform.h" |
27 | #include "gnunet_util_lib.h" | 28 | #include "gnunet_util_lib.h" |
28 | 29 | ||
@@ -158,7 +159,7 @@ GNUNET_BIO_read_open_buffer (void *buffer, size_t size) | |||
158 | * value is #GNUNET_SYSERR | 159 | * value is #GNUNET_SYSERR |
159 | * @return #GNUNET_OK on success, #GNUNET_SYSERR otherwise | 160 | * @return #GNUNET_OK on success, #GNUNET_SYSERR otherwise |
160 | */ | 161 | */ |
161 | int | 162 | enum GNUNET_GenericReturnValue |
162 | GNUNET_BIO_read_close (struct GNUNET_BIO_ReadHandle *h, char **emsg) | 163 | GNUNET_BIO_read_close (struct GNUNET_BIO_ReadHandle *h, char **emsg) |
163 | { | 164 | { |
164 | int err; | 165 | int err; |
@@ -287,7 +288,7 @@ read_from_buffer (struct GNUNET_BIO_ReadHandle *h, | |||
287 | * @param len the number of bytes to read | 288 | * @param len the number of bytes to read |
288 | * @return #GNUNET_OK on success, #GNUNET_SYSERR on failure | 289 | * @return #GNUNET_OK on success, #GNUNET_SYSERR on failure |
289 | */ | 290 | */ |
290 | int | 291 | enum GNUNET_GenericReturnValue |
291 | GNUNET_BIO_read (struct GNUNET_BIO_ReadHandle *h, | 292 | GNUNET_BIO_read (struct GNUNET_BIO_ReadHandle *h, |
292 | const char *what, | 293 | const char *what, |
293 | void *result, | 294 | void *result, |
@@ -326,7 +327,7 @@ GNUNET_BIO_read (struct GNUNET_BIO_ReadHandle *h, | |||
326 | * @param max_length maximum allowed length for the string | 327 | * @param max_length maximum allowed length for the string |
327 | * @return #GNUNET_OK on success, #GNUNET_SYSERR on failure | 328 | * @return #GNUNET_OK on success, #GNUNET_SYSERR on failure |
328 | */ | 329 | */ |
329 | int | 330 | enum GNUNET_GenericReturnValue |
330 | GNUNET_BIO_read_string (struct GNUNET_BIO_ReadHandle *h, | 331 | GNUNET_BIO_read_string (struct GNUNET_BIO_ReadHandle *h, |
331 | const char *what, | 332 | const char *what, |
332 | char **result, | 333 | char **result, |
@@ -388,7 +389,7 @@ GNUNET_BIO_read_string (struct GNUNET_BIO_ReadHandle *h, | |||
388 | * @param what describes what is being read (for error message creation) | 389 | * @param what describes what is being read (for error message creation) |
389 | * @param f address of float to read | 390 | * @param f address of float to read |
390 | */ | 391 | */ |
391 | int | 392 | enum GNUNET_GenericReturnValue |
392 | GNUNET_BIO_read_float (struct GNUNET_BIO_ReadHandle *h, | 393 | GNUNET_BIO_read_float (struct GNUNET_BIO_ReadHandle *h, |
393 | const char *what, | 394 | const char *what, |
394 | float *f) | 395 | float *f) |
@@ -405,7 +406,7 @@ GNUNET_BIO_read_float (struct GNUNET_BIO_ReadHandle *h, | |||
405 | * @param what describes what is being read (for error message creation) | 406 | * @param what describes what is being read (for error message creation) |
406 | * @param f address of double to read | 407 | * @param f address of double to read |
407 | */ | 408 | */ |
408 | int | 409 | enum GNUNET_GenericReturnValue |
409 | GNUNET_BIO_read_double (struct GNUNET_BIO_ReadHandle *h, | 410 | GNUNET_BIO_read_double (struct GNUNET_BIO_ReadHandle *h, |
410 | const char *what, | 411 | const char *what, |
411 | double *f) | 412 | double *f) |
@@ -423,7 +424,7 @@ GNUNET_BIO_read_double (struct GNUNET_BIO_ReadHandle *h, | |||
423 | * @param i where to store the data | 424 | * @param i where to store the data |
424 | * @return #GNUNET_OK on success, #GNUNET_SYSERR on error | 425 | * @return #GNUNET_OK on success, #GNUNET_SYSERR on error |
425 | */ | 426 | */ |
426 | int | 427 | enum GNUNET_GenericReturnValue |
427 | GNUNET_BIO_read_int32 (struct GNUNET_BIO_ReadHandle *h, | 428 | GNUNET_BIO_read_int32 (struct GNUNET_BIO_ReadHandle *h, |
428 | const char *what, | 429 | const char *what, |
429 | int32_t *i) | 430 | int32_t *i) |
@@ -445,7 +446,7 @@ GNUNET_BIO_read_int32 (struct GNUNET_BIO_ReadHandle *h, | |||
445 | * @param i where to store the data | 446 | * @param i where to store the data |
446 | * @return #GNUNET_OK on success, #GNUNET_SYSERR on error | 447 | * @return #GNUNET_OK on success, #GNUNET_SYSERR on error |
447 | */ | 448 | */ |
448 | int | 449 | enum GNUNET_GenericReturnValue |
449 | GNUNET_BIO_read_int64 (struct GNUNET_BIO_ReadHandle *h, | 450 | GNUNET_BIO_read_int64 (struct GNUNET_BIO_ReadHandle *h, |
450 | const char *what, | 451 | const char *what, |
451 | int64_t *i) | 452 | int64_t *i) |
@@ -748,7 +749,7 @@ write_to_buffer (struct GNUNET_BIO_WriteHandle *h, | |||
748 | * @param n number of bytes to write | 749 | * @param n number of bytes to write |
749 | * @return #GNUNET_OK on success, #GNUNET_SYSERR on error | 750 | * @return #GNUNET_OK on success, #GNUNET_SYSERR on error |
750 | */ | 751 | */ |
751 | int | 752 | enum GNUNET_GenericReturnValue |
752 | GNUNET_BIO_write (struct GNUNET_BIO_WriteHandle *h, | 753 | GNUNET_BIO_write (struct GNUNET_BIO_WriteHandle *h, |
753 | const char *what, | 754 | const char *what, |
754 | const void *buffer, | 755 | const void *buffer, |
@@ -785,7 +786,7 @@ GNUNET_BIO_write (struct GNUNET_BIO_WriteHandle *h, | |||
785 | * @param s string to write (can be NULL) | 786 | * @param s string to write (can be NULL) |
786 | * @return #GNUNET_OK on success, #GNUNET_SYSERR on error | 787 | * @return #GNUNET_OK on success, #GNUNET_SYSERR on error |
787 | */ | 788 | */ |
788 | int | 789 | enum GNUNET_GenericReturnValue |
789 | GNUNET_BIO_write_string (struct GNUNET_BIO_WriteHandle *h, | 790 | GNUNET_BIO_write_string (struct GNUNET_BIO_WriteHandle *h, |
790 | const char *what, | 791 | const char *what, |
791 | const char *s) | 792 | const char *s) |
@@ -808,7 +809,7 @@ GNUNET_BIO_write_string (struct GNUNET_BIO_WriteHandle *h, | |||
808 | * @param what what is being written (for error message creation) | 809 | * @param what what is being written (for error message creation) |
809 | * @param f float to write | 810 | * @param f float to write |
810 | */ | 811 | */ |
811 | int | 812 | enum GNUNET_GenericReturnValue |
812 | GNUNET_BIO_write_float (struct GNUNET_BIO_WriteHandle *h, | 813 | GNUNET_BIO_write_float (struct GNUNET_BIO_WriteHandle *h, |
813 | const char *what, | 814 | const char *what, |
814 | float f) | 815 | float f) |
@@ -825,7 +826,7 @@ GNUNET_BIO_write_float (struct GNUNET_BIO_WriteHandle *h, | |||
825 | * @param what what is being written (for error message creation) | 826 | * @param what what is being written (for error message creation) |
826 | * @param f double to write | 827 | * @param f double to write |
827 | */ | 828 | */ |
828 | int | 829 | enum GNUNET_GenericReturnValue |
829 | GNUNET_BIO_write_double (struct GNUNET_BIO_WriteHandle *h, | 830 | GNUNET_BIO_write_double (struct GNUNET_BIO_WriteHandle *h, |
830 | const char *what, | 831 | const char *what, |
831 | double f) | 832 | double f) |
@@ -843,7 +844,7 @@ GNUNET_BIO_write_double (struct GNUNET_BIO_WriteHandle *h, | |||
843 | * @param i 32-bit integer to write | 844 | * @param i 32-bit integer to write |
844 | * @return #GNUNET_OK on success, #GNUNET_SYSERR on error | 845 | * @return #GNUNET_OK on success, #GNUNET_SYSERR on error |
845 | */ | 846 | */ |
846 | int | 847 | enum GNUNET_GenericReturnValue |
847 | GNUNET_BIO_write_int32 (struct GNUNET_BIO_WriteHandle *h, | 848 | GNUNET_BIO_write_int32 (struct GNUNET_BIO_WriteHandle *h, |
848 | const char *what, | 849 | const char *what, |
849 | int32_t i) | 850 | int32_t i) |
@@ -863,7 +864,7 @@ GNUNET_BIO_write_int32 (struct GNUNET_BIO_WriteHandle *h, | |||
863 | * @param i 64-bit integer to write | 864 | * @param i 64-bit integer to write |
864 | * @return #GNUNET_OK on success, #GNUNET_SYSERR on error | 865 | * @return #GNUNET_OK on success, #GNUNET_SYSERR on error |
865 | */ | 866 | */ |
866 | int | 867 | enum GNUNET_GenericReturnValue |
867 | GNUNET_BIO_write_int64 (struct GNUNET_BIO_WriteHandle *h, | 868 | GNUNET_BIO_write_int64 (struct GNUNET_BIO_WriteHandle *h, |
868 | const char *what, | 869 | const char *what, |
869 | int64_t i) | 870 | int64_t i) |
@@ -1104,7 +1105,7 @@ GNUNET_BIO_read_spec_double (const char *what, double *f) | |||
1104 | * the last element must be #GNUNET_BIO_read_spec_end | 1105 | * the last element must be #GNUNET_BIO_read_spec_end |
1105 | * @return #GNUNET_OK on success, #GNUNET_SYSERR otherwise | 1106 | * @return #GNUNET_OK on success, #GNUNET_SYSERR otherwise |
1106 | */ | 1107 | */ |
1107 | int | 1108 | enum GNUNET_GenericReturnValue |
1108 | GNUNET_BIO_read_spec_commit (struct GNUNET_BIO_ReadHandle *h, | 1109 | GNUNET_BIO_read_spec_commit (struct GNUNET_BIO_ReadHandle *h, |
1109 | struct GNUNET_BIO_ReadSpec *rs) | 1110 | struct GNUNET_BIO_ReadSpec *rs) |
1110 | { | 1111 | { |
@@ -1355,7 +1356,7 @@ GNUNET_BIO_write_spec_double (const char *what, double *f) | |||
1355 | * the last element must be #GNUNET_BIO_write_spec_end | 1356 | * the last element must be #GNUNET_BIO_write_spec_end |
1356 | * @return #GNUNET_OK on success, #GNUNET_SYSERR otherwise | 1357 | * @return #GNUNET_OK on success, #GNUNET_SYSERR otherwise |
1357 | */ | 1358 | */ |
1358 | int | 1359 | enum GNUNET_GenericReturnValue |
1359 | GNUNET_BIO_write_spec_commit (struct GNUNET_BIO_WriteHandle *h, | 1360 | GNUNET_BIO_write_spec_commit (struct GNUNET_BIO_WriteHandle *h, |
1360 | struct GNUNET_BIO_WriteSpec *ws) | 1361 | struct GNUNET_BIO_WriteSpec *ws) |
1361 | { | 1362 | { |
diff --git a/src/util/configuration.c b/src/util/configuration.c index 05c030f79..45aec7981 100644 --- a/src/util/configuration.c +++ b/src/util/configuration.c | |||
@@ -23,6 +23,7 @@ | |||
23 | * @author Christian Grothoff | 23 | * @author Christian Grothoff |
24 | */ | 24 | */ |
25 | 25 | ||
26 | #include "gnunet_common.h" | ||
26 | #include "platform.h" | 27 | #include "platform.h" |
27 | #include "gnunet_util_lib.h" | 28 | #include "gnunet_util_lib.h" |
28 | #include "gnunet_configuration_lib.h" | 29 | #include "gnunet_configuration_lib.h" |
@@ -2491,7 +2492,7 @@ GNUNET_CONFIGURATION_default (void) | |||
2491 | * @param filename name of the configuration file, NULL to load defaults | 2492 | * @param filename name of the configuration file, NULL to load defaults |
2492 | * @return #GNUNET_OK on success, #GNUNET_SYSERR on error | 2493 | * @return #GNUNET_OK on success, #GNUNET_SYSERR on error |
2493 | */ | 2494 | */ |
2494 | int | 2495 | enum GNUNET_GenericReturnValue |
2495 | GNUNET_CONFIGURATION_load (struct GNUNET_CONFIGURATION_Handle *cfg, | 2496 | GNUNET_CONFIGURATION_load (struct GNUNET_CONFIGURATION_Handle *cfg, |
2496 | const char *filename) | 2497 | const char *filename) |
2497 | { | 2498 | { |
diff --git a/src/util/container_heap.c b/src/util/container_heap.c index 77b828d31..56a002f8c 100644 --- a/src/util/container_heap.c +++ b/src/util/container_heap.c | |||
@@ -26,6 +26,7 @@ | |||
26 | */ | 26 | */ |
27 | 27 | ||
28 | 28 | ||
29 | #include "gnunet_common.h" | ||
29 | #include "platform.h" | 30 | #include "platform.h" |
30 | #include "gnunet_util_lib.h" | 31 | #include "gnunet_util_lib.h" |
31 | 32 | ||
@@ -167,7 +168,7 @@ GNUNET_CONTAINER_heap_peek (const struct GNUNET_CONTAINER_Heap *heap) | |||
167 | * @return #GNUNET_YES if an element is returned, | 168 | * @return #GNUNET_YES if an element is returned, |
168 | * #GNUNET_NO if the heap is empty. | 169 | * #GNUNET_NO if the heap is empty. |
169 | */ | 170 | */ |
170 | int | 171 | enum GNUNET_GenericReturnValue |
171 | GNUNET_CONTAINER_heap_peek2 (const struct GNUNET_CONTAINER_Heap *heap, | 172 | GNUNET_CONTAINER_heap_peek2 (const struct GNUNET_CONTAINER_Heap *heap, |
172 | void **element, | 173 | void **element, |
173 | GNUNET_CONTAINER_HeapCostType *cost) | 174 | GNUNET_CONTAINER_HeapCostType *cost) |
diff --git a/src/util/container_multihashmap.c b/src/util/container_multihashmap.c index b61395471..65d7f33c0 100644 --- a/src/util/container_multihashmap.c +++ b/src/util/container_multihashmap.c | |||
@@ -24,6 +24,7 @@ | |||
24 | */ | 24 | */ |
25 | 25 | ||
26 | 26 | ||
27 | #include "gnunet_common.h" | ||
27 | #include "platform.h" | 28 | #include "platform.h" |
28 | #include "gnunet_util_lib.h" | 29 | #include "gnunet_util_lib.h" |
29 | 30 | ||
@@ -305,7 +306,7 @@ GNUNET_CONTAINER_multihashmap_get ( | |||
305 | } | 306 | } |
306 | 307 | ||
307 | 308 | ||
308 | int | 309 | enum GNUNET_GenericReturnValue |
309 | GNUNET_CONTAINER_multihashmap_iterate ( | 310 | GNUNET_CONTAINER_multihashmap_iterate ( |
310 | struct GNUNET_CONTAINER_MultiHashMap *map, | 311 | struct GNUNET_CONTAINER_MultiHashMap *map, |
311 | GNUNET_CONTAINER_MultiHashMapIteratorCallback it, | 312 | GNUNET_CONTAINER_MultiHashMapIteratorCallback it, |
@@ -402,7 +403,7 @@ update_next_cache_sme (struct GNUNET_CONTAINER_MultiHashMap *map, | |||
402 | } | 403 | } |
403 | 404 | ||
404 | 405 | ||
405 | int | 406 | enum GNUNET_GenericReturnValue |
406 | GNUNET_CONTAINER_multihashmap_remove (struct GNUNET_CONTAINER_MultiHashMap *map, | 407 | GNUNET_CONTAINER_multihashmap_remove (struct GNUNET_CONTAINER_MultiHashMap *map, |
407 | const struct GNUNET_HashCode *key, | 408 | const struct GNUNET_HashCode *key, |
408 | const void *value) | 409 | const void *value) |
@@ -578,7 +579,7 @@ GNUNET_CONTAINER_multihashmap_clear (struct GNUNET_CONTAINER_MultiHashMap *map) | |||
578 | } | 579 | } |
579 | 580 | ||
580 | 581 | ||
581 | int | 582 | enum GNUNET_GenericReturnValue |
582 | GNUNET_CONTAINER_multihashmap_contains ( | 583 | GNUNET_CONTAINER_multihashmap_contains ( |
583 | const struct GNUNET_CONTAINER_MultiHashMap *map, | 584 | const struct GNUNET_CONTAINER_MultiHashMap *map, |
584 | const struct GNUNET_HashCode *key) | 585 | const struct GNUNET_HashCode *key) |
@@ -606,7 +607,7 @@ GNUNET_CONTAINER_multihashmap_contains ( | |||
606 | } | 607 | } |
607 | 608 | ||
608 | 609 | ||
609 | int | 610 | enum GNUNET_GenericReturnValue |
610 | GNUNET_CONTAINER_multihashmap_contains_value ( | 611 | GNUNET_CONTAINER_multihashmap_contains_value ( |
611 | const struct GNUNET_CONTAINER_MultiHashMap *map, | 612 | const struct GNUNET_CONTAINER_MultiHashMap *map, |
612 | const struct GNUNET_HashCode *key, | 613 | const struct GNUNET_HashCode *key, |
@@ -706,7 +707,7 @@ grow (struct GNUNET_CONTAINER_MultiHashMap *map) | |||
706 | * #GNUNET_SYSERR if UNIQUE_ONLY was the option and the | 707 | * #GNUNET_SYSERR if UNIQUE_ONLY was the option and the |
707 | * value already exists | 708 | * value already exists |
708 | */ | 709 | */ |
709 | int | 710 | enum GNUNET_GenericReturnValue |
710 | GNUNET_CONTAINER_multihashmap_put (struct GNUNET_CONTAINER_MultiHashMap *map, | 711 | GNUNET_CONTAINER_multihashmap_put (struct GNUNET_CONTAINER_MultiHashMap *map, |
711 | const struct GNUNET_HashCode *key, | 712 | const struct GNUNET_HashCode *key, |
712 | void *value, | 713 | void *value, |
@@ -777,7 +778,7 @@ GNUNET_CONTAINER_multihashmap_put (struct GNUNET_CONTAINER_MultiHashMap *map, | |||
777 | } | 778 | } |
778 | 779 | ||
779 | 780 | ||
780 | int | 781 | enum GNUNET_GenericReturnValue |
781 | GNUNET_CONTAINER_multihashmap_get_multiple ( | 782 | GNUNET_CONTAINER_multihashmap_get_multiple ( |
782 | struct GNUNET_CONTAINER_MultiHashMap *map, | 783 | struct GNUNET_CONTAINER_MultiHashMap *map, |
783 | const struct GNUNET_HashCode *key, | 784 | const struct GNUNET_HashCode *key, |
@@ -918,7 +919,7 @@ GNUNET_CONTAINER_multihashmap_iterator_create ( | |||
918 | } | 919 | } |
919 | 920 | ||
920 | 921 | ||
921 | int | 922 | enum GNUNET_GenericReturnValue |
922 | GNUNET_CONTAINER_multihashmap_iterator_next ( | 923 | GNUNET_CONTAINER_multihashmap_iterator_next ( |
923 | struct GNUNET_CONTAINER_MultiHashMapIterator *iter, | 924 | struct GNUNET_CONTAINER_MultiHashMapIterator *iter, |
924 | struct GNUNET_HashCode *key, | 925 | struct GNUNET_HashCode *key, |
diff --git a/src/util/container_multihashmap32.c b/src/util/container_multihashmap32.c index 4ddf0053b..698e08e3a 100644 --- a/src/util/container_multihashmap32.c +++ b/src/util/container_multihashmap32.c | |||
@@ -26,6 +26,7 @@ | |||
26 | */ | 26 | */ |
27 | 27 | ||
28 | 28 | ||
29 | #include "gnunet_common.h" | ||
29 | #include "platform.h" | 30 | #include "platform.h" |
30 | #include "gnunet_util_lib.h" | 31 | #include "gnunet_util_lib.h" |
31 | 32 | ||
@@ -276,7 +277,7 @@ update_next_cache (struct GNUNET_CONTAINER_MultiHashMap32 *map, | |||
276 | } | 277 | } |
277 | 278 | ||
278 | 279 | ||
279 | int | 280 | enum GNUNET_GenericReturnValue |
280 | GNUNET_CONTAINER_multihashmap32_remove ( | 281 | GNUNET_CONTAINER_multihashmap32_remove ( |
281 | struct GNUNET_CONTAINER_MultiHashMap32 *map, | 282 | struct GNUNET_CONTAINER_MultiHashMap32 *map, |
282 | uint32_t key, | 283 | uint32_t key, |
@@ -354,7 +355,7 @@ GNUNET_CONTAINER_multihashmap32_remove_all ( | |||
354 | } | 355 | } |
355 | 356 | ||
356 | 357 | ||
357 | int | 358 | enum GNUNET_GenericReturnValue |
358 | GNUNET_CONTAINER_multihashmap32_contains ( | 359 | GNUNET_CONTAINER_multihashmap32_contains ( |
359 | const struct GNUNET_CONTAINER_MultiHashMap32 *map, | 360 | const struct GNUNET_CONTAINER_MultiHashMap32 *map, |
360 | uint32_t key) | 361 | uint32_t key) |
@@ -372,7 +373,7 @@ GNUNET_CONTAINER_multihashmap32_contains ( | |||
372 | } | 373 | } |
373 | 374 | ||
374 | 375 | ||
375 | int | 376 | enum GNUNET_GenericReturnValue |
376 | GNUNET_CONTAINER_multihashmap32_contains_value ( | 377 | GNUNET_CONTAINER_multihashmap32_contains_value ( |
377 | const struct GNUNET_CONTAINER_MultiHashMap32 *map, | 378 | const struct GNUNET_CONTAINER_MultiHashMap32 *map, |
378 | uint32_t key, | 379 | uint32_t key, |
@@ -445,7 +446,7 @@ grow (struct GNUNET_CONTAINER_MultiHashMap32 *map) | |||
445 | * #GNUNET_SYSERR if UNIQUE_ONLY was the option and the | 446 | * #GNUNET_SYSERR if UNIQUE_ONLY was the option and the |
446 | * value already exists | 447 | * value already exists |
447 | */ | 448 | */ |
448 | int | 449 | enum GNUNET_GenericReturnValue |
449 | GNUNET_CONTAINER_multihashmap32_put ( | 450 | GNUNET_CONTAINER_multihashmap32_put ( |
450 | struct GNUNET_CONTAINER_MultiHashMap32 *map, | 451 | struct GNUNET_CONTAINER_MultiHashMap32 *map, |
451 | uint32_t key, | 452 | uint32_t key, |
@@ -560,7 +561,7 @@ GNUNET_CONTAINER_multihashmap32_iterator_create ( | |||
560 | * @return #GNUNET_YES we returned an element, | 561 | * @return #GNUNET_YES we returned an element, |
561 | * #GNUNET_NO if we are out of elements | 562 | * #GNUNET_NO if we are out of elements |
562 | */ | 563 | */ |
563 | int | 564 | enum GNUNET_GenericReturnValue |
564 | GNUNET_CONTAINER_multihashmap32_iterator_next ( | 565 | GNUNET_CONTAINER_multihashmap32_iterator_next ( |
565 | struct GNUNET_CONTAINER_MultiHashMap32Iterator *iter, | 566 | struct GNUNET_CONTAINER_MultiHashMap32Iterator *iter, |
566 | uint32_t *key, | 567 | uint32_t *key, |
diff --git a/src/util/container_multipeermap.c b/src/util/container_multipeermap.c index 82a240fff..7ccfb62c8 100644 --- a/src/util/container_multipeermap.c +++ b/src/util/container_multipeermap.c | |||
@@ -385,7 +385,7 @@ update_next_cache_sme (struct GNUNET_CONTAINER_MultiPeerMap *map, | |||
385 | } | 385 | } |
386 | 386 | ||
387 | 387 | ||
388 | int | 388 | enum GNUNET_GenericReturnValue |
389 | GNUNET_CONTAINER_multipeermap_remove (struct GNUNET_CONTAINER_MultiPeerMap *map, | 389 | GNUNET_CONTAINER_multipeermap_remove (struct GNUNET_CONTAINER_MultiPeerMap *map, |
390 | const struct GNUNET_PeerIdentity *key, | 390 | const struct GNUNET_PeerIdentity *key, |
391 | const void *value) | 391 | const void *value) |
@@ -520,7 +520,7 @@ GNUNET_CONTAINER_multipeermap_remove_all ( | |||
520 | } | 520 | } |
521 | 521 | ||
522 | 522 | ||
523 | int | 523 | enum GNUNET_GenericReturnValue |
524 | GNUNET_CONTAINER_multipeermap_contains ( | 524 | GNUNET_CONTAINER_multipeermap_contains ( |
525 | const struct GNUNET_CONTAINER_MultiPeerMap *map, | 525 | const struct GNUNET_CONTAINER_MultiPeerMap *map, |
526 | const struct GNUNET_PeerIdentity *key) | 526 | const struct GNUNET_PeerIdentity *key) |
@@ -544,7 +544,7 @@ GNUNET_CONTAINER_multipeermap_contains ( | |||
544 | } | 544 | } |
545 | 545 | ||
546 | 546 | ||
547 | int | 547 | enum GNUNET_GenericReturnValue |
548 | GNUNET_CONTAINER_multipeermap_contains_value ( | 548 | GNUNET_CONTAINER_multipeermap_contains_value ( |
549 | const struct GNUNET_CONTAINER_MultiPeerMap *map, | 549 | const struct GNUNET_CONTAINER_MultiPeerMap *map, |
550 | const struct GNUNET_PeerIdentity *key, | 550 | const struct GNUNET_PeerIdentity *key, |
@@ -839,7 +839,7 @@ GNUNET_CONTAINER_multipeermap_iterator_create ( | |||
839 | } | 839 | } |
840 | 840 | ||
841 | 841 | ||
842 | int | 842 | enum GNUNET_GenericReturnValue |
843 | GNUNET_CONTAINER_multipeermap_iterator_next ( | 843 | GNUNET_CONTAINER_multipeermap_iterator_next ( |
844 | struct GNUNET_CONTAINER_MultiPeerMapIterator *iter, | 844 | struct GNUNET_CONTAINER_MultiPeerMapIterator *iter, |
845 | struct GNUNET_PeerIdentity *key, | 845 | struct GNUNET_PeerIdentity *key, |
diff --git a/src/util/container_multishortmap.c b/src/util/container_multishortmap.c index 3c0adc196..327616048 100644 --- a/src/util/container_multishortmap.c +++ b/src/util/container_multishortmap.c | |||
@@ -24,6 +24,7 @@ | |||
24 | */ | 24 | */ |
25 | 25 | ||
26 | 26 | ||
27 | #include "gnunet_common.h" | ||
27 | #include "platform.h" | 28 | #include "platform.h" |
28 | #include "gnunet_util_lib.h" | 29 | #include "gnunet_util_lib.h" |
29 | 30 | ||
@@ -640,7 +641,7 @@ grow (struct GNUNET_CONTAINER_MultiShortmap *map) | |||
640 | } | 641 | } |
641 | 642 | ||
642 | 643 | ||
643 | int | 644 | enum GNUNET_GenericReturnValue |
644 | GNUNET_CONTAINER_multishortmap_put ( | 645 | GNUNET_CONTAINER_multishortmap_put ( |
645 | struct GNUNET_CONTAINER_MultiShortmap *map, | 646 | struct GNUNET_CONTAINER_MultiShortmap *map, |
646 | const struct GNUNET_ShortHashCode *key, | 647 | const struct GNUNET_ShortHashCode *key, |
@@ -848,7 +849,7 @@ GNUNET_CONTAINER_multishortmap_iterator_create ( | |||
848 | } | 849 | } |
849 | 850 | ||
850 | 851 | ||
851 | int | 852 | enum GNUNET_GenericReturnValue |
852 | GNUNET_CONTAINER_multishortmap_iterator_next ( | 853 | GNUNET_CONTAINER_multishortmap_iterator_next ( |
853 | struct GNUNET_CONTAINER_MultiShortmapIterator *iter, | 854 | struct GNUNET_CONTAINER_MultiShortmapIterator *iter, |
854 | struct GNUNET_ShortHashCode *key, | 855 | struct GNUNET_ShortHashCode *key, |
diff --git a/src/util/container_multiuuidmap.c b/src/util/container_multiuuidmap.c index 96398e4f5..53975b3f7 100644 --- a/src/util/container_multiuuidmap.c +++ b/src/util/container_multiuuidmap.c | |||
@@ -24,6 +24,7 @@ | |||
24 | */ | 24 | */ |
25 | 25 | ||
26 | 26 | ||
27 | #include "gnunet_common.h" | ||
27 | #include "platform.h" | 28 | #include "platform.h" |
28 | #include "gnunet_util_lib.h" | 29 | #include "gnunet_util_lib.h" |
29 | 30 | ||
@@ -303,7 +304,7 @@ GNUNET_CONTAINER_multiuuidmap_get ( | |||
303 | } | 304 | } |
304 | 305 | ||
305 | 306 | ||
306 | int | 307 | enum GNUNET_GenericReturnValue |
307 | GNUNET_CONTAINER_multiuuidmap_iterate ( | 308 | GNUNET_CONTAINER_multiuuidmap_iterate ( |
308 | struct GNUNET_CONTAINER_MultiUuidmap *map, | 309 | struct GNUNET_CONTAINER_MultiUuidmap *map, |
309 | GNUNET_CONTAINER_MultiUuidmapIteratorCallback it, | 310 | GNUNET_CONTAINER_MultiUuidmapIteratorCallback it, |
@@ -397,7 +398,7 @@ update_next_cache_sme (struct GNUNET_CONTAINER_MultiUuidmap *map, | |||
397 | } | 398 | } |
398 | 399 | ||
399 | 400 | ||
400 | int | 401 | enum GNUNET_GenericReturnValue |
401 | GNUNET_CONTAINER_multiuuidmap_remove (struct GNUNET_CONTAINER_MultiUuidmap *map, | 402 | GNUNET_CONTAINER_multiuuidmap_remove (struct GNUNET_CONTAINER_MultiUuidmap *map, |
402 | const struct GNUNET_Uuid *key, | 403 | const struct GNUNET_Uuid *key, |
403 | const void *value) | 404 | const void *value) |
@@ -532,7 +533,7 @@ GNUNET_CONTAINER_multiuuidmap_remove_all ( | |||
532 | } | 533 | } |
533 | 534 | ||
534 | 535 | ||
535 | int | 536 | enum GNUNET_GenericReturnValue |
536 | GNUNET_CONTAINER_multiuuidmap_contains ( | 537 | GNUNET_CONTAINER_multiuuidmap_contains ( |
537 | const struct GNUNET_CONTAINER_MultiUuidmap *map, | 538 | const struct GNUNET_CONTAINER_MultiUuidmap *map, |
538 | const struct GNUNET_Uuid *key) | 539 | const struct GNUNET_Uuid *key) |
@@ -556,7 +557,7 @@ GNUNET_CONTAINER_multiuuidmap_contains ( | |||
556 | } | 557 | } |
557 | 558 | ||
558 | 559 | ||
559 | int | 560 | enum GNUNET_GenericReturnValue |
560 | GNUNET_CONTAINER_multiuuidmap_contains_value ( | 561 | GNUNET_CONTAINER_multiuuidmap_contains_value ( |
561 | const struct GNUNET_CONTAINER_MultiUuidmap *map, | 562 | const struct GNUNET_CONTAINER_MultiUuidmap *map, |
562 | const struct GNUNET_Uuid *key, | 563 | const struct GNUNET_Uuid *key, |
@@ -639,7 +640,7 @@ grow (struct GNUNET_CONTAINER_MultiUuidmap *map) | |||
639 | } | 640 | } |
640 | 641 | ||
641 | 642 | ||
642 | int | 643 | enum GNUNET_GenericReturnValue |
643 | GNUNET_CONTAINER_multiuuidmap_put (struct GNUNET_CONTAINER_MultiUuidmap *map, | 644 | GNUNET_CONTAINER_multiuuidmap_put (struct GNUNET_CONTAINER_MultiUuidmap *map, |
644 | const struct GNUNET_Uuid *key, | 645 | const struct GNUNET_Uuid *key, |
645 | void *value, | 646 | void *value, |
@@ -846,7 +847,7 @@ GNUNET_CONTAINER_multiuuidmap_iterator_create ( | |||
846 | } | 847 | } |
847 | 848 | ||
848 | 849 | ||
849 | int | 850 | enum GNUNET_GenericReturnValue |
850 | GNUNET_CONTAINER_multiuuidmap_iterator_next ( | 851 | GNUNET_CONTAINER_multiuuidmap_iterator_next ( |
851 | struct GNUNET_CONTAINER_MultiUuidmapIterator *iter, | 852 | struct GNUNET_CONTAINER_MultiUuidmapIterator *iter, |
852 | struct GNUNET_Uuid *key, | 853 | struct GNUNET_Uuid *key, |
diff --git a/src/util/helper.c b/src/util/helper.c index fe8643d31..d7fbb5ead 100644 --- a/src/util/helper.c +++ b/src/util/helper.c | |||
@@ -26,6 +26,7 @@ | |||
26 | * @author Christian Grothoff | 26 | * @author Christian Grothoff |
27 | */ | 27 | */ |
28 | 28 | ||
29 | #include "gnunet_common.h" | ||
29 | #include "platform.h" | 30 | #include "platform.h" |
30 | #include "gnunet_util_lib.h" | 31 | #include "gnunet_util_lib.h" |
31 | 32 | ||
@@ -163,7 +164,7 @@ struct GNUNET_HELPER_Handle | |||
163 | }; | 164 | }; |
164 | 165 | ||
165 | 166 | ||
166 | int | 167 | enum GNUNET_GenericReturnValue |
167 | GNUNET_HELPER_kill (struct GNUNET_HELPER_Handle *h, int soft_kill) | 168 | GNUNET_HELPER_kill (struct GNUNET_HELPER_Handle *h, int soft_kill) |
168 | { | 169 | { |
169 | struct GNUNET_HELPER_SendHandle *sh; | 170 | struct GNUNET_HELPER_SendHandle *sh; |
@@ -203,7 +204,7 @@ GNUNET_HELPER_kill (struct GNUNET_HELPER_Handle *h, int soft_kill) | |||
203 | } | 204 | } |
204 | 205 | ||
205 | 206 | ||
206 | int | 207 | enum GNUNET_GenericReturnValue |
207 | GNUNET_HELPER_wait (struct GNUNET_HELPER_Handle *h) | 208 | GNUNET_HELPER_wait (struct GNUNET_HELPER_Handle *h) |
208 | { | 209 | { |
209 | struct GNUNET_HELPER_SendHandle *sh; | 210 | struct GNUNET_HELPER_SendHandle *sh; |
diff --git a/src/util/network.c b/src/util/network.c index ac3de89bf..34f34eec6 100644 --- a/src/util/network.c +++ b/src/util/network.c | |||
@@ -25,6 +25,7 @@ | |||
25 | * @author Christian Grothoff | 25 | * @author Christian Grothoff |
26 | */ | 26 | */ |
27 | 27 | ||
28 | #include "gnunet_common.h" | ||
28 | #include "platform.h" | 29 | #include "platform.h" |
29 | #include "disk.h" | 30 | #include "disk.h" |
30 | 31 | ||
@@ -597,7 +598,7 @@ GNUNET_NETWORK_socket_box_native (int fd) | |||
597 | * @param address_len length of @a address | 598 | * @param address_len length of @a address |
598 | * @return #GNUNET_OK on success, #GNUNET_SYSERR otherwise | 599 | * @return #GNUNET_OK on success, #GNUNET_SYSERR otherwise |
599 | */ | 600 | */ |
600 | int | 601 | enum GNUNET_GenericReturnValue |
601 | GNUNET_NETWORK_socket_connect (const struct GNUNET_NETWORK_Handle *desc, | 602 | GNUNET_NETWORK_socket_connect (const struct GNUNET_NETWORK_Handle *desc, |
602 | const struct sockaddr *address, | 603 | const struct sockaddr *address, |
603 | socklen_t address_len) | 604 | socklen_t address_len) |
@@ -622,7 +623,7 @@ GNUNET_NETWORK_socket_connect (const struct GNUNET_NETWORK_Handle *desc, | |||
622 | * @param optlen length of @a optval | 623 | * @param optlen length of @a optval |
623 | * @return #GNUNET_OK on success, #GNUNET_SYSERR otherwise | 624 | * @return #GNUNET_OK on success, #GNUNET_SYSERR otherwise |
624 | */ | 625 | */ |
625 | int | 626 | enum GNUNET_GenericReturnValue |
626 | GNUNET_NETWORK_socket_getsockopt (const struct GNUNET_NETWORK_Handle *desc, | 627 | GNUNET_NETWORK_socket_getsockopt (const struct GNUNET_NETWORK_Handle *desc, |
627 | int level, | 628 | int level, |
628 | int optname, | 629 | int optname, |
@@ -647,7 +648,7 @@ GNUNET_NETWORK_socket_getsockopt (const struct GNUNET_NETWORK_Handle *desc, | |||
647 | * @param backlog length of the listen queue | 648 | * @param backlog length of the listen queue |
648 | * @return #GNUNET_OK on success, #GNUNET_SYSERR otherwise | 649 | * @return #GNUNET_OK on success, #GNUNET_SYSERR otherwise |
649 | */ | 650 | */ |
650 | int | 651 | enum GNUNET_GenericReturnValue |
651 | GNUNET_NETWORK_socket_listen (const struct GNUNET_NETWORK_Handle *desc, | 652 | GNUNET_NETWORK_socket_listen (const struct GNUNET_NETWORK_Handle *desc, |
652 | int backlog) | 653 | int backlog) |
653 | { | 654 | { |
@@ -856,7 +857,7 @@ GNUNET_NETWORK_socket_create (int domain, | |||
856 | * @param how type of shutdown | 857 | * @param how type of shutdown |
857 | * @return #GNUNET_OK on success, #GNUNET_SYSERR otherwise | 858 | * @return #GNUNET_OK on success, #GNUNET_SYSERR otherwise |
858 | */ | 859 | */ |
859 | int | 860 | enum GNUNET_GenericReturnValue |
860 | GNUNET_NETWORK_socket_shutdown (struct GNUNET_NETWORK_Handle *desc, | 861 | GNUNET_NETWORK_socket_shutdown (struct GNUNET_NETWORK_Handle *desc, |
861 | int how) | 862 | int how) |
862 | { | 863 | { |
@@ -877,7 +878,7 @@ GNUNET_NETWORK_socket_shutdown (struct GNUNET_NETWORK_Handle *desc, | |||
877 | * @param desc socket | 878 | * @param desc socket |
878 | * @return #GNUNET_OK on success, #GNUNET_SYSERR otherwise | 879 | * @return #GNUNET_OK on success, #GNUNET_SYSERR otherwise |
879 | */ | 880 | */ |
880 | int | 881 | enum GNUNET_GenericReturnValue |
881 | GNUNET_NETWORK_socket_disable_corking (struct GNUNET_NETWORK_Handle *desc) | 882 | GNUNET_NETWORK_socket_disable_corking (struct GNUNET_NETWORK_Handle *desc) |
882 | { | 883 | { |
883 | int ret = 0; | 884 | int ret = 0; |