diff options
author | Christian Grothoff <christian@grothoff.org> | 2020-07-18 00:44:39 +0200 |
---|---|---|
committer | Christian Grothoff <christian@grothoff.org> | 2020-07-18 00:44:39 +0200 |
commit | 7f4ddbcab8598e3d5e29c23ce883cdfa664408f1 (patch) | |
tree | 5f1b18463f641f24fad519e0aefb60b97d707b52 /src/include | |
parent | 28ab2c446fba4980a8295d59fdf203a028a35dd6 (diff) | |
download | gnunet-7f4ddbcab8598e3d5e29c23ce883cdfa664408f1.tar.gz gnunet-7f4ddbcab8598e3d5e29c23ce883cdfa664408f1.zip |
merge flags into enum for GNUNET_DISK_pipe() API, fixing #6188
Diffstat (limited to 'src/include')
-rw-r--r-- | src/include/gnunet_bio_lib.h | 35 | ||||
-rw-r--r-- | src/include/gnunet_buffer_lib.h | 2 | ||||
-rw-r--r-- | src/include/gnunet_common.h | 38 | ||||
-rw-r--r-- | src/include/gnunet_configuration_lib.h | 2 | ||||
-rw-r--r-- | src/include/gnunet_constants.h | 3 | ||||
-rw-r--r-- | src/include/gnunet_container_lib.h | 52 | ||||
-rw-r--r-- | src/include/gnunet_curl_lib.h | 2 | ||||
-rw-r--r-- | src/include/gnunet_disk_lib.h | 46 | ||||
-rw-r--r-- | src/include/gnunet_mq_lib.h | 6 | ||||
-rw-r--r-- | src/include/gnunet_reclaim_lib.h | 2 | ||||
-rw-r--r-- | src/include/gnunet_reclaim_plugin.h | 6 | ||||
-rw-r--r-- | src/include/gnunet_reclaim_service.h | 6 | ||||
-rw-r--r-- | src/include/platform.h | 4 |
13 files changed, 113 insertions, 91 deletions
diff --git a/src/include/gnunet_bio_lib.h b/src/include/gnunet_bio_lib.h index 687334c1c..e49ce1354 100644 --- a/src/include/gnunet_bio_lib.h +++ b/src/include/gnunet_bio_lib.h | |||
@@ -138,9 +138,9 @@ GNUNET_BIO_read_meta_data (struct GNUNET_BIO_ReadHandle *h, | |||
138 | * @param f address of float to read | 138 | * @param f address of float to read |
139 | */ | 139 | */ |
140 | int | 140 | int |
141 | GNUNET_BIO_read_float(struct GNUNET_BIO_ReadHandle *h, | 141 | GNUNET_BIO_read_float (struct GNUNET_BIO_ReadHandle *h, |
142 | const char *what, | 142 | const char *what, |
143 | float *f); | 143 | float *f); |
144 | 144 | ||
145 | 145 | ||
146 | /** | 146 | /** |
@@ -151,10 +151,9 @@ GNUNET_BIO_read_float(struct GNUNET_BIO_ReadHandle *h, | |||
151 | * @param f address of double to read | 151 | * @param f address of double to read |
152 | */ | 152 | */ |
153 | int | 153 | int |
154 | GNUNET_BIO_read_double(struct GNUNET_BIO_ReadHandle *h, | 154 | GNUNET_BIO_read_double (struct GNUNET_BIO_ReadHandle *h, |
155 | const char *what, | 155 | const char *what, |
156 | double *f); | 156 | double *f); |
157 | |||
158 | 157 | ||
159 | 158 | ||
160 | /** | 159 | /** |
@@ -171,7 +170,6 @@ GNUNET_BIO_read_int32 (struct GNUNET_BIO_ReadHandle *h, | |||
171 | int32_t *i); | 170 | int32_t *i); |
172 | 171 | ||
173 | 172 | ||
174 | |||
175 | /** | 173 | /** |
176 | * Read an (u)int64_t. | 174 | * Read an (u)int64_t. |
177 | * | 175 | * |
@@ -186,7 +184,6 @@ GNUNET_BIO_read_int64 (struct GNUNET_BIO_ReadHandle *h, | |||
186 | int64_t *i); | 184 | int64_t *i); |
187 | 185 | ||
188 | 186 | ||
189 | |||
190 | /****************************** WRITING API *******************************/ | 187 | /****************************** WRITING API *******************************/ |
191 | 188 | ||
192 | /** | 189 | /** |
@@ -310,9 +307,9 @@ GNUNET_BIO_write_meta_data (struct GNUNET_BIO_WriteHandle *h, | |||
310 | * @param f float to write (must be a variable) | 307 | * @param f float to write (must be a variable) |
311 | */ | 308 | */ |
312 | int | 309 | int |
313 | GNUNET_BIO_write_float(struct GNUNET_BIO_WriteHandle *h, | 310 | GNUNET_BIO_write_float (struct GNUNET_BIO_WriteHandle *h, |
314 | const char *what, | 311 | const char *what, |
315 | float f); | 312 | float f); |
316 | 313 | ||
317 | /** | 314 | /** |
318 | * Write a double. | 315 | * Write a double. |
@@ -322,9 +319,9 @@ GNUNET_BIO_write_float(struct GNUNET_BIO_WriteHandle *h, | |||
322 | * @param f double to write (must be a variable) | 319 | * @param f double to write (must be a variable) |
323 | */ | 320 | */ |
324 | int | 321 | int |
325 | GNUNET_BIO_write_double(struct GNUNET_BIO_WriteHandle *h, | 322 | GNUNET_BIO_write_double (struct GNUNET_BIO_WriteHandle *h, |
326 | const char *what, | 323 | const char *what, |
327 | double f); | 324 | double f); |
328 | 325 | ||
329 | 326 | ||
330 | /** | 327 | /** |
@@ -490,7 +487,7 @@ GNUNET_BIO_read_spec_int64 (const char *what, | |||
490 | * @param f address of float to read | 487 | * @param f address of float to read |
491 | */ | 488 | */ |
492 | struct GNUNET_BIO_ReadSpec | 489 | struct GNUNET_BIO_ReadSpec |
493 | GNUNET_BIO_read_spec_float(const char *what, float *f); | 490 | GNUNET_BIO_read_spec_float (const char *what, float *f); |
494 | 491 | ||
495 | 492 | ||
496 | /** | 493 | /** |
@@ -500,7 +497,7 @@ GNUNET_BIO_read_spec_float(const char *what, float *f); | |||
500 | * @param f address of double to read | 497 | * @param f address of double to read |
501 | */ | 498 | */ |
502 | struct GNUNET_BIO_ReadSpec | 499 | struct GNUNET_BIO_ReadSpec |
503 | GNUNET_BIO_read_spec_double(const char *what, double *f); | 500 | GNUNET_BIO_read_spec_double (const char *what, double *f); |
504 | 501 | ||
505 | 502 | ||
506 | /** | 503 | /** |
@@ -647,7 +644,7 @@ GNUNET_BIO_write_spec_int64 (const char *what, | |||
647 | * @return the write spec | 644 | * @return the write spec |
648 | */ | 645 | */ |
649 | struct GNUNET_BIO_WriteSpec | 646 | struct GNUNET_BIO_WriteSpec |
650 | GNUNET_BIO_write_spec_float(const char *what, float *f); | 647 | GNUNET_BIO_write_spec_float (const char *what, float *f); |
651 | 648 | ||
652 | 649 | ||
653 | /** | 650 | /** |
@@ -658,7 +655,7 @@ GNUNET_BIO_write_spec_float(const char *what, float *f); | |||
658 | * @return the write spec | 655 | * @return the write spec |
659 | */ | 656 | */ |
660 | struct GNUNET_BIO_WriteSpec | 657 | struct GNUNET_BIO_WriteSpec |
661 | GNUNET_BIO_write_spec_double(const char *what, double *f); | 658 | GNUNET_BIO_write_spec_double (const char *what, double *f); |
662 | 659 | ||
663 | 660 | ||
664 | /** | 661 | /** |
diff --git a/src/include/gnunet_buffer_lib.h b/src/include/gnunet_buffer_lib.h index e23536ab2..e09ec130a 100644 --- a/src/include/gnunet_buffer_lib.h +++ b/src/include/gnunet_buffer_lib.h | |||
@@ -147,7 +147,7 @@ GNUNET_buffer_write_fstr (struct GNUNET_Buffer *buf, const char *fmt, ...); | |||
147 | */ | 147 | */ |
148 | void | 148 | void |
149 | GNUNET_buffer_write_vfstr (struct GNUNET_Buffer *buf, const char *fmt, va_list | 149 | GNUNET_buffer_write_vfstr (struct GNUNET_Buffer *buf, const char *fmt, va_list |
150 | args); | 150 | args); |
151 | 151 | ||
152 | 152 | ||
153 | /** | 153 | /** |
diff --git a/src/include/gnunet_common.h b/src/include/gnunet_common.h index b2f99cd55..91d4a5bd4 100644 --- a/src/include/gnunet_common.h +++ b/src/include/gnunet_common.h | |||
@@ -457,11 +457,11 @@ __attribute__ ((format (printf, 2, 3))); | |||
457 | __extension__ ({ \ | 457 | __extension__ ({ \ |
458 | int _gnunet_boolean_var_; \ | 458 | int _gnunet_boolean_var_; \ |
459 | if (expr) \ | 459 | if (expr) \ |
460 | _gnunet_boolean_var_ = 1; \ | 460 | _gnunet_boolean_var_ = 1; \ |
461 | else \ | 461 | else \ |
462 | _gnunet_boolean_var_ = 0; \ | 462 | _gnunet_boolean_var_ = 0; \ |
463 | _gnunet_boolean_var_; \ | 463 | _gnunet_boolean_var_; \ |
464 | }) | 464 | }) |
465 | #define GN_LIKELY(expr) (__builtin_expect (_GNUNET_BOOLEAN_EXPR (expr), 1)) | 465 | #define GN_LIKELY(expr) (__builtin_expect (_GNUNET_BOOLEAN_EXPR (expr), 1)) |
466 | #define GN_UNLIKELY(expr) (__builtin_expect (_GNUNET_BOOLEAN_EXPR (expr), 0)) | 466 | #define GN_UNLIKELY(expr) (__builtin_expect (_GNUNET_BOOLEAN_EXPR (expr), 0)) |
467 | #else | 467 | #else |
@@ -499,12 +499,12 @@ GNUNET_log_from_nocheck (enum GNUNET_ErrorType kind, | |||
499 | ((GNUNET_ERROR_TYPE_DEBUG & (kind)) == 0)) \ | 499 | ((GNUNET_ERROR_TYPE_DEBUG & (kind)) == 0)) \ |
500 | { \ | 500 | { \ |
501 | if (GN_UNLIKELY (log_call_enabled == -1)) \ | 501 | if (GN_UNLIKELY (log_call_enabled == -1)) \ |
502 | log_call_enabled = \ | 502 | log_call_enabled = \ |
503 | GNUNET_get_log_call_status ((kind) & (~GNUNET_ERROR_TYPE_BULK), \ | 503 | GNUNET_get_log_call_status ((kind) & (~GNUNET_ERROR_TYPE_BULK), \ |
504 | (comp), \ | 504 | (comp), \ |
505 | __FILE__, \ | 505 | __FILE__, \ |
506 | __FUNCTION__, \ | 506 | __FUNCTION__, \ |
507 | __LINE__); \ | 507 | __LINE__); \ |
508 | if (GN_UNLIKELY (GNUNET_get_log_skip () > 0)) \ | 508 | if (GN_UNLIKELY (GNUNET_get_log_skip () > 0)) \ |
509 | { \ | 509 | { \ |
510 | GNUNET_log_skip (-1, GNUNET_NO); \ | 510 | GNUNET_log_skip (-1, GNUNET_NO); \ |
@@ -512,7 +512,7 @@ GNUNET_log_from_nocheck (enum GNUNET_ErrorType kind, | |||
512 | else \ | 512 | else \ |
513 | { \ | 513 | { \ |
514 | if (GN_UNLIKELY (log_call_enabled)) \ | 514 | if (GN_UNLIKELY (log_call_enabled)) \ |
515 | GNUNET_log_from_nocheck ((kind), comp, __VA_ARGS__); \ | 515 | GNUNET_log_from_nocheck ((kind), comp, __VA_ARGS__); \ |
516 | } \ | 516 | } \ |
517 | } \ | 517 | } \ |
518 | } while (0) | 518 | } while (0) |
@@ -525,12 +525,12 @@ GNUNET_log_from_nocheck (enum GNUNET_ErrorType kind, | |||
525 | ((GNUNET_ERROR_TYPE_DEBUG & (kind)) == 0)) \ | 525 | ((GNUNET_ERROR_TYPE_DEBUG & (kind)) == 0)) \ |
526 | { \ | 526 | { \ |
527 | if (GN_UNLIKELY (log_call_enabled == -1)) \ | 527 | if (GN_UNLIKELY (log_call_enabled == -1)) \ |
528 | log_call_enabled = \ | 528 | log_call_enabled = \ |
529 | GNUNET_get_log_call_status ((kind) & (~GNUNET_ERROR_TYPE_BULK), \ | 529 | GNUNET_get_log_call_status ((kind) & (~GNUNET_ERROR_TYPE_BULK), \ |
530 | NULL, \ | 530 | NULL, \ |
531 | __FILE__, \ | 531 | __FILE__, \ |
532 | __FUNCTION__, \ | 532 | __FUNCTION__, \ |
533 | __LINE__); \ | 533 | __LINE__); \ |
534 | if (GN_UNLIKELY (GNUNET_get_log_skip () > 0)) \ | 534 | if (GN_UNLIKELY (GNUNET_get_log_skip () > 0)) \ |
535 | { \ | 535 | { \ |
536 | GNUNET_log_skip (-1, GNUNET_NO); \ | 536 | GNUNET_log_skip (-1, GNUNET_NO); \ |
@@ -538,7 +538,7 @@ GNUNET_log_from_nocheck (enum GNUNET_ErrorType kind, | |||
538 | else \ | 538 | else \ |
539 | { \ | 539 | { \ |
540 | if (GN_UNLIKELY (log_call_enabled)) \ | 540 | if (GN_UNLIKELY (log_call_enabled)) \ |
541 | GNUNET_log_nocheck ((kind), __VA_ARGS__); \ | 541 | GNUNET_log_nocheck ((kind), __VA_ARGS__); \ |
542 | } \ | 542 | } \ |
543 | } \ | 543 | } \ |
544 | } while (0) | 544 | } while (0) |
@@ -1319,8 +1319,8 @@ GNUNET_is_zero_ (const void *a, | |||
1319 | * been returned by #GNUNET_strdup, #GNUNET_strndup, #GNUNET_malloc or #GNUNET_array_grow earlier. NULL is allowed. | 1319 | * been returned by #GNUNET_strdup, #GNUNET_strndup, #GNUNET_malloc or #GNUNET_array_grow earlier. NULL is allowed. |
1320 | */ | 1320 | */ |
1321 | #define GNUNET_free(ptr) do { \ | 1321 | #define GNUNET_free(ptr) do { \ |
1322 | GNUNET_xfree_ (ptr, __FILE__, __LINE__); \ | 1322 | GNUNET_xfree_ (ptr, __FILE__, __LINE__); \ |
1323 | ptr = NULL; \ | 1323 | ptr = NULL; \ |
1324 | } while (0) | 1324 | } while (0) |
1325 | 1325 | ||
1326 | 1326 | ||
diff --git a/src/include/gnunet_configuration_lib.h b/src/include/gnunet_configuration_lib.h index b5ceb5b94..f782509eb 100644 --- a/src/include/gnunet_configuration_lib.h +++ b/src/include/gnunet_configuration_lib.h | |||
@@ -109,7 +109,7 @@ GNUNET_CONFIGURATION_load_from (struct GNUNET_CONFIGURATION_Handle *cfg, | |||
109 | * @return a freshly allocated configuration | 109 | * @return a freshly allocated configuration |
110 | */ | 110 | */ |
111 | struct GNUNET_CONFIGURATION_Handle * | 111 | struct GNUNET_CONFIGURATION_Handle * |
112 | GNUNET_CONFIGURATION_default(void); | 112 | GNUNET_CONFIGURATION_default (void); |
113 | 113 | ||
114 | 114 | ||
115 | /** | 115 | /** |
diff --git a/src/include/gnunet_constants.h b/src/include/gnunet_constants.h index c83bec683..8b3cbc7e6 100644 --- a/src/include/gnunet_constants.h +++ b/src/include/gnunet_constants.h | |||
@@ -47,7 +47,8 @@ extern "C" | |||
47 | * so that at least one maximum-size message can be send roughly once | 47 | * so that at least one maximum-size message can be send roughly once |
48 | * per minute. | 48 | * per minute. |
49 | */ | 49 | */ |
50 | #define GNUNET_CONSTANTS_DEFAULT_BW_IN_OUT GNUNET_BANDWIDTH_value_init (1024*1024) | 50 | #define GNUNET_CONSTANTS_DEFAULT_BW_IN_OUT GNUNET_BANDWIDTH_value_init (1024 \ |
51 | * 1024) | ||
51 | 52 | ||
52 | /** | 53 | /** |
53 | * After how long do we consider a connection to a peer dead | 54 | * After how long do we consider a connection to a peer dead |
diff --git a/src/include/gnunet_container_lib.h b/src/include/gnunet_container_lib.h index f3325a064..8d8cbf4c1 100644 --- a/src/include/gnunet_container_lib.h +++ b/src/include/gnunet_container_lib.h | |||
@@ -2158,9 +2158,9 @@ GNUNET_CONTAINER_multihashmap32_iterator_destroy ( | |||
2158 | (element)->next = (head); \ | 2158 | (element)->next = (head); \ |
2159 | (element)->prev = NULL; \ | 2159 | (element)->prev = NULL; \ |
2160 | if ((tail) == NULL) \ | 2160 | if ((tail) == NULL) \ |
2161 | (tail) = element; \ | 2161 | (tail) = element; \ |
2162 | else \ | 2162 | else \ |
2163 | (head)->prev = element; \ | 2163 | (head)->prev = element; \ |
2164 | (head) = (element); \ | 2164 | (head) = (element); \ |
2165 | } while (0) | 2165 | } while (0) |
2166 | 2166 | ||
@@ -2182,9 +2182,9 @@ GNUNET_CONTAINER_multihashmap32_iterator_destroy ( | |||
2182 | (element)->prev = (tail); \ | 2182 | (element)->prev = (tail); \ |
2183 | (element)->next = NULL; \ | 2183 | (element)->next = NULL; \ |
2184 | if ((head) == NULL) \ | 2184 | if ((head) == NULL) \ |
2185 | (head) = element; \ | 2185 | (head) = element; \ |
2186 | else \ | 2186 | else \ |
2187 | (tail)->next = element; \ | 2187 | (tail)->next = element; \ |
2188 | (tail) = (element); \ | 2188 | (tail) = (element); \ |
2189 | } while (0) | 2189 | } while (0) |
2190 | 2190 | ||
@@ -2216,9 +2216,9 @@ GNUNET_CONTAINER_multihashmap32_iterator_destroy ( | |||
2216 | (other)->next = (element); \ | 2216 | (other)->next = (element); \ |
2217 | } \ | 2217 | } \ |
2218 | if (NULL == (element)->next) \ | 2218 | if (NULL == (element)->next) \ |
2219 | (tail) = (element); \ | 2219 | (tail) = (element); \ |
2220 | else \ | 2220 | else \ |
2221 | (element)->next->prev = (element); \ | 2221 | (element)->next->prev = (element); \ |
2222 | } while (0) | 2222 | } while (0) |
2223 | 2223 | ||
2224 | 2224 | ||
@@ -2249,9 +2249,9 @@ GNUNET_CONTAINER_multihashmap32_iterator_destroy ( | |||
2249 | (other)->prev = (element); \ | 2249 | (other)->prev = (element); \ |
2250 | } \ | 2250 | } \ |
2251 | if (NULL == (element)->prev) \ | 2251 | if (NULL == (element)->prev) \ |
2252 | (head) = (element); \ | 2252 | (head) = (element); \ |
2253 | else \ | 2253 | else \ |
2254 | (element)->prev->next = (element); \ | 2254 | (element)->prev->next = (element); \ |
2255 | } while (0) | 2255 | } while (0) |
2256 | 2256 | ||
2257 | 2257 | ||
@@ -2275,13 +2275,13 @@ GNUNET_CONTAINER_multihashmap32_iterator_destroy ( | |||
2275 | GNUNET_assert (((element)->prev != NULL) || ((head) == (element))); \ | 2275 | GNUNET_assert (((element)->prev != NULL) || ((head) == (element))); \ |
2276 | GNUNET_assert (((element)->next != NULL) || ((tail) == (element))); \ | 2276 | GNUNET_assert (((element)->next != NULL) || ((tail) == (element))); \ |
2277 | if ((element)->prev == NULL) \ | 2277 | if ((element)->prev == NULL) \ |
2278 | (head) = (element)->next; \ | 2278 | (head) = (element)->next; \ |
2279 | else \ | 2279 | else \ |
2280 | (element)->prev->next = (element)->next; \ | 2280 | (element)->prev->next = (element)->next; \ |
2281 | if ((element)->next == NULL) \ | 2281 | if ((element)->next == NULL) \ |
2282 | (tail) = (element)->prev; \ | 2282 | (tail) = (element)->prev; \ |
2283 | else \ | 2283 | else \ |
2284 | (element)->next->prev = (element)->prev; \ | 2284 | (element)->next->prev = (element)->prev; \ |
2285 | (element)->next = NULL; \ | 2285 | (element)->next = NULL; \ |
2286 | (element)->prev = NULL; \ | 2286 | (element)->prev = NULL; \ |
2287 | } while (0) | 2287 | } while (0) |
@@ -2308,9 +2308,9 @@ GNUNET_CONTAINER_multihashmap32_iterator_destroy ( | |||
2308 | (element)->next_ ## mdll = (head); \ | 2308 | (element)->next_ ## mdll = (head); \ |
2309 | (element)->prev_ ## mdll = NULL; \ | 2309 | (element)->prev_ ## mdll = NULL; \ |
2310 | if ((tail) == NULL) \ | 2310 | if ((tail) == NULL) \ |
2311 | (tail) = element; \ | 2311 | (tail) = element; \ |
2312 | else \ | 2312 | else \ |
2313 | (head)->prev_ ## mdll = element; \ | 2313 | (head)->prev_ ## mdll = element; \ |
2314 | (head) = (element); \ | 2314 | (head) = (element); \ |
2315 | } while (0) | 2315 | } while (0) |
2316 | 2316 | ||
@@ -2333,9 +2333,9 @@ GNUNET_CONTAINER_multihashmap32_iterator_destroy ( | |||
2333 | (element)->prev_ ## mdll = (tail); \ | 2333 | (element)->prev_ ## mdll = (tail); \ |
2334 | (element)->next_ ## mdll = NULL; \ | 2334 | (element)->next_ ## mdll = NULL; \ |
2335 | if ((head) == NULL) \ | 2335 | if ((head) == NULL) \ |
2336 | (head) = element; \ | 2336 | (head) = element; \ |
2337 | else \ | 2337 | else \ |
2338 | (tail)->next_ ## mdll = element; \ | 2338 | (tail)->next_ ## mdll = element; \ |
2339 | (tail) = (element); \ | 2339 | (tail) = (element); \ |
2340 | } while (0) | 2340 | } while (0) |
2341 | 2341 | ||
@@ -2368,9 +2368,9 @@ GNUNET_CONTAINER_multihashmap32_iterator_destroy ( | |||
2368 | (other)->next_ ## mdll = (element); \ | 2368 | (other)->next_ ## mdll = (element); \ |
2369 | } \ | 2369 | } \ |
2370 | if (NULL == (element)->next_ ## mdll) \ | 2370 | if (NULL == (element)->next_ ## mdll) \ |
2371 | (tail) = (element); \ | 2371 | (tail) = (element); \ |
2372 | else \ | 2372 | else \ |
2373 | (element)->next_ ## mdll->prev_ ## mdll = (element); \ | 2373 | (element)->next_ ## mdll->prev_ ## mdll = (element); \ |
2374 | } while (0) | 2374 | } while (0) |
2375 | 2375 | ||
2376 | 2376 | ||
@@ -2402,9 +2402,9 @@ GNUNET_CONTAINER_multihashmap32_iterator_destroy ( | |||
2402 | (other)->prev_ ## mdll = (element); \ | 2402 | (other)->prev_ ## mdll = (element); \ |
2403 | } \ | 2403 | } \ |
2404 | if (NULL == (element)->prev_ ## mdll) \ | 2404 | if (NULL == (element)->prev_ ## mdll) \ |
2405 | (head) = (element); \ | 2405 | (head) = (element); \ |
2406 | else \ | 2406 | else \ |
2407 | (element)->prev_ ## mdll->next_ ## mdll = (element); \ | 2407 | (element)->prev_ ## mdll->next_ ## mdll = (element); \ |
2408 | } while (0) | 2408 | } while (0) |
2409 | 2409 | ||
2410 | 2410 | ||
@@ -2425,13 +2425,13 @@ GNUNET_CONTAINER_multihashmap32_iterator_destroy ( | |||
2425 | GNUNET_assert (((element)->prev_ ## mdll != NULL) || ((head) == (element))); \ | 2425 | GNUNET_assert (((element)->prev_ ## mdll != NULL) || ((head) == (element))); \ |
2426 | GNUNET_assert (((element)->next_ ## mdll != NULL) || ((tail) == (element))); \ | 2426 | GNUNET_assert (((element)->next_ ## mdll != NULL) || ((tail) == (element))); \ |
2427 | if ((element)->prev_ ## mdll == NULL) \ | 2427 | if ((element)->prev_ ## mdll == NULL) \ |
2428 | (head) = (element)->next_ ## mdll; \ | 2428 | (head) = (element)->next_ ## mdll; \ |
2429 | else \ | 2429 | else \ |
2430 | (element)->prev_ ## mdll->next_ ## mdll = (element)->next_ ## mdll; \ | 2430 | (element)->prev_ ## mdll->next_ ## mdll = (element)->next_ ## mdll; \ |
2431 | if ((element)->next_ ## mdll == NULL) \ | 2431 | if ((element)->next_ ## mdll == NULL) \ |
2432 | (tail) = (element)->prev_ ## mdll; \ | 2432 | (tail) = (element)->prev_ ## mdll; \ |
2433 | else \ | 2433 | else \ |
2434 | (element)->next_ ## mdll->prev_ ## mdll = (element)->prev_ ## mdll; \ | 2434 | (element)->next_ ## mdll->prev_ ## mdll = (element)->prev_ ## mdll; \ |
2435 | (element)->next_ ## mdll = NULL; \ | 2435 | (element)->next_ ## mdll = NULL; \ |
2436 | (element)->prev_ ## mdll = NULL; \ | 2436 | (element)->prev_ ## mdll = NULL; \ |
2437 | } while (0) | 2437 | } while (0) |
@@ -2468,8 +2468,8 @@ GNUNET_CONTAINER_multihashmap32_iterator_destroy ( | |||
2468 | TYPE *pos; \ | 2468 | TYPE *pos; \ |
2469 | \ | 2469 | \ |
2470 | for (pos = head; NULL != pos; pos = pos->next) \ | 2470 | for (pos = head; NULL != pos; pos = pos->next) \ |
2471 | if (0 < comparator (comparator_cls, element, pos)) \ | 2471 | if (0 < comparator (comparator_cls, element, pos)) \ |
2472 | break; /* element < pos */ \ | 2472 | break; /* element < pos */ \ |
2473 | if (NULL == pos) /* => element > tail */ \ | 2473 | if (NULL == pos) /* => element > tail */ \ |
2474 | { \ | 2474 | { \ |
2475 | GNUNET_CONTAINER_DLL_insert_tail (head, tail, element); \ | 2475 | GNUNET_CONTAINER_DLL_insert_tail (head, tail, element); \ |
diff --git a/src/include/gnunet_curl_lib.h b/src/include/gnunet_curl_lib.h index 8f744512d..9de58d608 100644 --- a/src/include/gnunet_curl_lib.h +++ b/src/include/gnunet_curl_lib.h | |||
@@ -262,7 +262,7 @@ GNUNET_CURL_job_add_with_ct_json (struct GNUNET_CURL_Context *ctx, | |||
262 | 262 | ||
263 | 263 | ||
264 | /** | 264 | /** |
265 | * Force use of the provided username and password | 265 | * Force use of the provided username and password |
266 | * for client authentication for all operations performed | 266 | * for client authentication for all operations performed |
267 | * with @a ctx. | 267 | * with @a ctx. |
268 | * | 268 | * |
diff --git a/src/include/gnunet_disk_lib.h b/src/include/gnunet_disk_lib.h index f43cf8943..51ae7d8d5 100644 --- a/src/include/gnunet_disk_lib.h +++ b/src/include/gnunet_disk_lib.h | |||
@@ -391,33 +391,54 @@ GNUNET_DISK_file_handle_size (struct GNUNET_DISK_FileHandle *fh, | |||
391 | 391 | ||
392 | 392 | ||
393 | /** | 393 | /** |
394 | * Flags for #GNUNET_DISK_pipe(). | ||
395 | */ | ||
396 | enum GNUNET_DISK_PipeFlags | ||
397 | { | ||
398 | |||
399 | /** | ||
400 | * No special options, use non-blocking read/write operations. | ||
401 | */ | ||
402 | GNUNET_DISK_PF_NONE, | ||
403 | |||
404 | /** | ||
405 | * Configure read end to block when reading if set. | ||
406 | */ | ||
407 | GNUNET_DISK_PF_BLOCKING_READ = 1, | ||
408 | /** | ||
409 | * Configure write end to block when writing if set. | ||
410 | */ | ||
411 | GNUNET_DISK_PF_BLOCKING_WRITE = 2, | ||
412 | |||
413 | /** | ||
414 | * Configure both pipe ends for blocking operations if set. | ||
415 | */ | ||
416 | GNUNET_DISK_PF_BLOCKING_RW = GNUNET_DISK_PF_BLOCKING_READ | ||
417 | | GNUNET_DISK_PF_BLOCKING_WRITE | ||
418 | |||
419 | }; | ||
420 | |||
421 | |||
422 | /** | ||
394 | * Creates an interprocess channel | 423 | * Creates an interprocess channel |
395 | * | 424 | * |
396 | * @param blocking_read creates an asynchronous pipe for reading if set to #GNUNET_NO | 425 | * @param pf how to configure the pipe |
397 | * @param blocking_write creates an asynchronous pipe for writing if set to #GNUNET_NO | ||
398 | * @param inherit_read 1 to make read handle inheritable, 0 otherwise (NT only) | ||
399 | * @param inherit_write 1 to make write handle inheritable, 0 otherwise (NT only) | ||
400 | * @return handle to the new pipe, NULL on error | 426 | * @return handle to the new pipe, NULL on error |
401 | */ | 427 | */ |
402 | struct GNUNET_DISK_PipeHandle * | 428 | struct GNUNET_DISK_PipeHandle * |
403 | GNUNET_DISK_pipe (int blocking_read, | 429 | GNUNET_DISK_pipe (enum GNUNET_DISK_PipeFlags pf); |
404 | int blocking_write, | ||
405 | int inherit_read, | ||
406 | int inherit_write); | ||
407 | 430 | ||
408 | 431 | ||
409 | /** | 432 | /** |
410 | * Creates a pipe object from a couple of file descriptors. | 433 | * Creates a pipe object from a couple of file descriptors. |
411 | * Useful for wrapping existing pipe FDs. | 434 | * Useful for wrapping existing pipe FDs. |
412 | * | 435 | * |
413 | * @param blocking_read creates an asynchronous pipe for reading if set to #GNUNET_NO | 436 | * @param pf how to configure the pipe |
414 | * @param blocking_write creates an asynchronous pipe for writing if set to #GNUNET_NO | ||
415 | * @param fd an array of two fd values. One of them may be -1 for read-only or write-only pipes | 437 | * @param fd an array of two fd values. One of them may be -1 for read-only or write-only pipes |
416 | * @return handle to the new pipe, NULL on error | 438 | * @return handle to the new pipe, NULL on error |
417 | */ | 439 | */ |
418 | struct GNUNET_DISK_PipeHandle * | 440 | struct GNUNET_DISK_PipeHandle * |
419 | GNUNET_DISK_pipe_from_fd (int blocking_read, | 441 | GNUNET_DISK_pipe_from_fd (enum GNUNET_DISK_PipeFlags pf, |
420 | int blocking_write, | ||
421 | int fd[2]); | 442 | int fd[2]); |
422 | 443 | ||
423 | 444 | ||
@@ -479,6 +500,7 @@ const struct GNUNET_DISK_FileHandle * | |||
479 | GNUNET_DISK_pipe_handle (const struct GNUNET_DISK_PipeHandle *p, | 500 | GNUNET_DISK_pipe_handle (const struct GNUNET_DISK_PipeHandle *p, |
480 | enum GNUNET_DISK_PipeEnd n); | 501 | enum GNUNET_DISK_PipeEnd n); |
481 | 502 | ||
503 | |||
482 | /** | 504 | /** |
483 | * Update POSIX permissions mask of a file on disk. If both argumets | 505 | * Update POSIX permissions mask of a file on disk. If both argumets |
484 | * are #GNUNET_NO, the file is made world-read-write-executable (777). | 506 | * are #GNUNET_NO, the file is made world-read-write-executable (777). |
diff --git a/src/include/gnunet_mq_lib.h b/src/include/gnunet_mq_lib.h index 520027dbb..37f21e5b1 100644 --- a/src/include/gnunet_mq_lib.h +++ b/src/include/gnunet_mq_lib.h | |||
@@ -547,7 +547,7 @@ struct GNUNET_MQ_MessageHandler | |||
547 | */ | 547 | */ |
548 | #define GNUNET_MQ_hd_fixed_size(name, code, str, ctx) \ | 548 | #define GNUNET_MQ_hd_fixed_size(name, code, str, ctx) \ |
549 | ({ \ | 549 | ({ \ |
550 | void (*_cb)(void *cls, const str * msg) = &handle_ ## name; \ | 550 | void (*_cb)(void *cls, const str *msg) = &handle_ ## name; \ |
551 | ((struct GNUNET_MQ_MessageHandler){ NULL, \ | 551 | ((struct GNUNET_MQ_MessageHandler){ NULL, \ |
552 | (GNUNET_MQ_MessageCallback) _cb, \ | 552 | (GNUNET_MQ_MessageCallback) _cb, \ |
553 | (ctx), \ | 553 | (ctx), \ |
@@ -598,8 +598,8 @@ struct GNUNET_MQ_MessageHandler | |||
598 | */ | 598 | */ |
599 | #define GNUNET_MQ_hd_var_size(name, code, str, ctx) \ | 599 | #define GNUNET_MQ_hd_var_size(name, code, str, ctx) \ |
600 | __extension__ ({ \ | 600 | __extension__ ({ \ |
601 | int (*_mv)(void *cls, const str * msg) = &check_ ## name; \ | 601 | int (*_mv)(void *cls, const str *msg) = &check_ ## name; \ |
602 | void (*_cb)(void *cls, const str * msg) = &handle_ ## name; \ | 602 | void (*_cb)(void *cls, const str *msg) = &handle_ ## name; \ |
603 | ((struct GNUNET_MQ_MessageHandler){ (GNUNET_MQ_MessageValidationCallback) \ | 603 | ((struct GNUNET_MQ_MessageHandler){ (GNUNET_MQ_MessageValidationCallback) \ |
604 | _mv, \ | 604 | _mv, \ |
605 | (GNUNET_MQ_MessageCallback) _cb, \ | 605 | (GNUNET_MQ_MessageCallback) _cb, \ |
diff --git a/src/include/gnunet_reclaim_lib.h b/src/include/gnunet_reclaim_lib.h index 54d284f3c..4f2d6dba5 100644 --- a/src/include/gnunet_reclaim_lib.h +++ b/src/include/gnunet_reclaim_lib.h | |||
@@ -80,7 +80,7 @@ static const struct GNUNET_RECLAIM_Identifier GNUNET_RECLAIM_ID_ZERO; | |||
80 | memcmp (a, \ | 80 | memcmp (a, \ |
81 | b, \ | 81 | b, \ |
82 | sizeof (GNUNET_RECLAIM_ID_ZERO))) \ | 82 | sizeof (GNUNET_RECLAIM_ID_ZERO))) \ |
83 | ? \ | 83 | ? \ |
84 | GNUNET_YES : GNUNET_NO) | 84 | GNUNET_YES : GNUNET_NO) |
85 | 85 | ||
86 | 86 | ||
diff --git a/src/include/gnunet_reclaim_plugin.h b/src/include/gnunet_reclaim_plugin.h index 992ad0cc3..7ee9e730f 100644 --- a/src/include/gnunet_reclaim_plugin.h +++ b/src/include/gnunet_reclaim_plugin.h | |||
@@ -172,7 +172,9 @@ typedef const char *(*GNUNET_RECLAIM_AttestationNumberToTypenameFunction) ( | |||
172 | * @param attest the attestation object | 172 | * @param attest the attestation object |
173 | * @return an attribute list | 173 | * @return an attribute list |
174 | */ | 174 | */ |
175 | typedef struct GNUNET_RECLAIM_AttributeList *(*GNUNET_RECLAIM_AttestationGetAttributesFunction) ( | 175 | typedef struct |
176 | GNUNET_RECLAIM_AttributeList *(* | ||
177 | GNUNET_RECLAIM_AttestationGetAttributesFunction) ( | ||
176 | void *cls, | 178 | void *cls, |
177 | const struct GNUNET_RECLAIM_Attestation *attest); | 179 | const struct GNUNET_RECLAIM_Attestation *attest); |
178 | 180 | ||
@@ -201,7 +203,6 @@ typedef int (*GNUNET_RECLAIM_AttestationGetExpirationFunction) ( | |||
201 | struct GNUNET_TIME_Absolute *expiration); | 203 | struct GNUNET_TIME_Absolute *expiration); |
202 | 204 | ||
203 | 205 | ||
204 | |||
205 | /** | 206 | /** |
206 | * Each plugin is required to return a pointer to a struct of this | 207 | * Each plugin is required to return a pointer to a struct of this |
207 | * type as the return value from its entry point. | 208 | * type as the return value from its entry point. |
@@ -283,7 +284,6 @@ struct GNUNET_RECLAIM_AttestationPluginFunctions | |||
283 | }; | 284 | }; |
284 | 285 | ||
285 | 286 | ||
286 | |||
287 | #if 0 /* keep Emacsens' auto-indent happy */ | 287 | #if 0 /* keep Emacsens' auto-indent happy */ |
288 | { | 288 | { |
289 | #endif | 289 | #endif |
diff --git a/src/include/gnunet_reclaim_service.h b/src/include/gnunet_reclaim_service.h index 813bc1a59..139c44ae7 100644 --- a/src/include/gnunet_reclaim_service.h +++ b/src/include/gnunet_reclaim_service.h | |||
@@ -335,7 +335,8 @@ GNUNET_RECLAIM_get_attestations_start ( | |||
335 | * @param it the iterator | 335 | * @param it the iterator |
336 | */ | 336 | */ |
337 | void | 337 | void |
338 | GNUNET_RECLAIM_get_attestations_next (struct GNUNET_RECLAIM_AttestationIterator *ait); | 338 | GNUNET_RECLAIM_get_attestations_next (struct |
339 | GNUNET_RECLAIM_AttestationIterator *ait); | ||
339 | 340 | ||
340 | 341 | ||
341 | /** | 342 | /** |
@@ -346,7 +347,8 @@ GNUNET_RECLAIM_get_attestations_next (struct GNUNET_RECLAIM_AttestationIterator | |||
346 | * @param it the iterator | 347 | * @param it the iterator |
347 | */ | 348 | */ |
348 | void | 349 | void |
349 | GNUNET_RECLAIM_get_attestations_stop (struct GNUNET_RECLAIM_AttestationIterator *ait); | 350 | GNUNET_RECLAIM_get_attestations_stop (struct |
351 | GNUNET_RECLAIM_AttestationIterator *ait); | ||
350 | 352 | ||
351 | 353 | ||
352 | /** | 354 | /** |
diff --git a/src/include/platform.h b/src/include/platform.h index baaf26ad6..10248e5bb 100644 --- a/src/include/platform.h +++ b/src/include/platform.h | |||
@@ -233,8 +233,8 @@ atoll (const char *nptr); | |||
233 | 233 | ||
234 | 234 | ||
235 | #if defined(__sparc__) | 235 | #if defined(__sparc__) |
236 | #define MAKE_UNALIGNED(val) ({ __typeof__((val))__tmp; memmove (&__tmp, &(val), \ | 236 | #define MAKE_UNALIGNED(val) ({ __typeof__((val)) __tmp; memmove (&__tmp, &(val), \ |
237 | sizeof((val))); \ | 237 | sizeof((val))); \ |
238 | __tmp; }) | 238 | __tmp; }) |
239 | #else | 239 | #else |
240 | #define MAKE_UNALIGNED(val) val | 240 | #define MAKE_UNALIGNED(val) val |