aboutsummaryrefslogtreecommitdiff
path: root/src/include
diff options
context:
space:
mode:
authort3sserakt <t3ss@posteo.de>2020-07-21 12:30:37 +0200
committert3sserakt <t3ss@posteo.de>2020-07-21 12:30:37 +0200
commit5fa1c7dc809aebb55ef062cb3a2757c54eb6b7e7 (patch)
treec26167460724fea683ef51a88ffd93d1fa830412 /src/include
parent17d84245fdfeeb1a6da4ffb97898903cb55f702c (diff)
parent7f4ddbcab8598e3d5e29c23ce883cdfa664408f1 (diff)
downloadgnunet-5fa1c7dc809aebb55ef062cb3a2757c54eb6b7e7.tar.gz
gnunet-5fa1c7dc809aebb55ef062cb3a2757c54eb6b7e7.zip
Merge branch 'master' of ssh://gnunet.org/gnunet
Diffstat (limited to 'src/include')
-rw-r--r--src/include/gnunet_bio_lib.h35
-rw-r--r--src/include/gnunet_buffer_lib.h2
-rw-r--r--src/include/gnunet_common.h85
-rw-r--r--src/include/gnunet_configuration_lib.h12
-rw-r--r--src/include/gnunet_constants.h3
-rw-r--r--src/include/gnunet_container_lib.h52
-rw-r--r--src/include/gnunet_curl_lib.h63
-rw-r--r--src/include/gnunet_disk_lib.h46
-rw-r--r--src/include/gnunet_identity_service.h4
-rw-r--r--src/include/gnunet_mq_lib.h6
-rw-r--r--src/include/gnunet_os_lib.h29
-rw-r--r--src/include/gnunet_reclaim_lib.h2
-rw-r--r--src/include/gnunet_reclaim_plugin.h6
-rw-r--r--src/include/gnunet_reclaim_service.h6
-rw-r--r--src/include/platform.h4
15 files changed, 218 insertions, 137 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 */
140int 140int
141GNUNET_BIO_read_float(struct GNUNET_BIO_ReadHandle *h, 141GNUNET_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 */
153int 153int
154GNUNET_BIO_read_double(struct GNUNET_BIO_ReadHandle *h, 154GNUNET_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 */
312int 309int
313GNUNET_BIO_write_float(struct GNUNET_BIO_WriteHandle *h, 310GNUNET_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 */
324int 321int
325GNUNET_BIO_write_double(struct GNUNET_BIO_WriteHandle *h, 322GNUNET_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 */
492struct GNUNET_BIO_ReadSpec 489struct GNUNET_BIO_ReadSpec
493GNUNET_BIO_read_spec_float(const char *what, float *f); 490GNUNET_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 */
502struct GNUNET_BIO_ReadSpec 499struct GNUNET_BIO_ReadSpec
503GNUNET_BIO_read_spec_double(const char *what, double *f); 500GNUNET_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 */
649struct GNUNET_BIO_WriteSpec 646struct GNUNET_BIO_WriteSpec
650GNUNET_BIO_write_spec_float(const char *what, float *f); 647GNUNET_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 */
660struct GNUNET_BIO_WriteSpec 657struct GNUNET_BIO_WriteSpec
661GNUNET_BIO_write_spec_double(const char *what, double *f); 658GNUNET_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 */
148void 148void
149GNUNET_buffer_write_vfstr (struct GNUNET_Buffer *buf, const char *fmt, va_list 149GNUNET_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 34f419a49..91d4a5bd4 100644
--- a/src/include/gnunet_common.h
+++ b/src/include/gnunet_common.h
@@ -345,7 +345,9 @@ struct GNUNET_AsyncScopeSave
345 * #GNUNET_NO to stop iteration with no error, 345 * #GNUNET_NO to stop iteration with no error,
346 * #GNUNET_SYSERR to abort iteration with error! 346 * #GNUNET_SYSERR to abort iteration with error!
347 */ 347 */
348typedef int (*GNUNET_FileNameCallback) (void *cls, const char *filename); 348typedef int
349(*GNUNET_FileNameCallback) (void *cls,
350 const char *filename);
349 351
350 352
351/** 353/**
@@ -353,7 +355,8 @@ typedef int (*GNUNET_FileNameCallback) (void *cls, const char *filename);
353 * 355 *
354 * @param cls Closure. 356 * @param cls Closure.
355 */ 357 */
356typedef void (*GNUNET_ContinuationCallback) (void *cls); 358typedef void
359(*GNUNET_ContinuationCallback) (void *cls);
357 360
358 361
359/** 362/**
@@ -368,10 +371,11 @@ typedef void (*GNUNET_ContinuationCallback) (void *cls);
368 * @param data_size 371 * @param data_size
369 * Size of @a data. 372 * Size of @a data.
370 */ 373 */
371typedef void (*GNUNET_ResultCallback) (void *cls, 374typedef void
372 int64_t result_code, 375(*GNUNET_ResultCallback) (void *cls,
373 const void *data, 376 int64_t result_code,
374 uint16_t data_size); 377 const void *data,
378 uint16_t data_size);
375 379
376 380
377/* ****************************** logging ***************************** */ 381/* ****************************** logging ***************************** */
@@ -453,11 +457,11 @@ __attribute__ ((format (printf, 2, 3)));
453 __extension__ ({ \ 457 __extension__ ({ \
454 int _gnunet_boolean_var_; \ 458 int _gnunet_boolean_var_; \
455 if (expr) \ 459 if (expr) \
456 _gnunet_boolean_var_ = 1; \ 460 _gnunet_boolean_var_ = 1; \
457 else \ 461 else \
458 _gnunet_boolean_var_ = 0; \ 462 _gnunet_boolean_var_ = 0; \
459 _gnunet_boolean_var_; \ 463 _gnunet_boolean_var_; \
460 }) 464 })
461#define GN_LIKELY(expr) (__builtin_expect (_GNUNET_BOOLEAN_EXPR (expr), 1)) 465#define GN_LIKELY(expr) (__builtin_expect (_GNUNET_BOOLEAN_EXPR (expr), 1))
462#define GN_UNLIKELY(expr) (__builtin_expect (_GNUNET_BOOLEAN_EXPR (expr), 0)) 466#define GN_UNLIKELY(expr) (__builtin_expect (_GNUNET_BOOLEAN_EXPR (expr), 0))
463#else 467#else
@@ -495,12 +499,12 @@ GNUNET_log_from_nocheck (enum GNUNET_ErrorType kind,
495 ((GNUNET_ERROR_TYPE_DEBUG & (kind)) == 0)) \ 499 ((GNUNET_ERROR_TYPE_DEBUG & (kind)) == 0)) \
496 { \ 500 { \
497 if (GN_UNLIKELY (log_call_enabled == -1)) \ 501 if (GN_UNLIKELY (log_call_enabled == -1)) \
498 log_call_enabled = \ 502 log_call_enabled = \
499 GNUNET_get_log_call_status ((kind) & (~GNUNET_ERROR_TYPE_BULK), \ 503 GNUNET_get_log_call_status ((kind) & (~GNUNET_ERROR_TYPE_BULK), \
500 (comp), \ 504 (comp), \
501 __FILE__, \ 505 __FILE__, \
502 __FUNCTION__, \ 506 __FUNCTION__, \
503 __LINE__); \ 507 __LINE__); \
504 if (GN_UNLIKELY (GNUNET_get_log_skip () > 0)) \ 508 if (GN_UNLIKELY (GNUNET_get_log_skip () > 0)) \
505 { \ 509 { \
506 GNUNET_log_skip (-1, GNUNET_NO); \ 510 GNUNET_log_skip (-1, GNUNET_NO); \
@@ -508,7 +512,7 @@ GNUNET_log_from_nocheck (enum GNUNET_ErrorType kind,
508 else \ 512 else \
509 { \ 513 { \
510 if (GN_UNLIKELY (log_call_enabled)) \ 514 if (GN_UNLIKELY (log_call_enabled)) \
511 GNUNET_log_from_nocheck ((kind), comp, __VA_ARGS__); \ 515 GNUNET_log_from_nocheck ((kind), comp, __VA_ARGS__); \
512 } \ 516 } \
513 } \ 517 } \
514 } while (0) 518 } while (0)
@@ -521,12 +525,12 @@ GNUNET_log_from_nocheck (enum GNUNET_ErrorType kind,
521 ((GNUNET_ERROR_TYPE_DEBUG & (kind)) == 0)) \ 525 ((GNUNET_ERROR_TYPE_DEBUG & (kind)) == 0)) \
522 { \ 526 { \
523 if (GN_UNLIKELY (log_call_enabled == -1)) \ 527 if (GN_UNLIKELY (log_call_enabled == -1)) \
524 log_call_enabled = \ 528 log_call_enabled = \
525 GNUNET_get_log_call_status ((kind) & (~GNUNET_ERROR_TYPE_BULK), \ 529 GNUNET_get_log_call_status ((kind) & (~GNUNET_ERROR_TYPE_BULK), \
526 NULL, \ 530 NULL, \
527 __FILE__, \ 531 __FILE__, \
528 __FUNCTION__, \ 532 __FUNCTION__, \
529 __LINE__); \ 533 __LINE__); \
530 if (GN_UNLIKELY (GNUNET_get_log_skip () > 0)) \ 534 if (GN_UNLIKELY (GNUNET_get_log_skip () > 0)) \
531 { \ 535 { \
532 GNUNET_log_skip (-1, GNUNET_NO); \ 536 GNUNET_log_skip (-1, GNUNET_NO); \
@@ -534,7 +538,7 @@ GNUNET_log_from_nocheck (enum GNUNET_ErrorType kind,
534 else \ 538 else \
535 { \ 539 { \
536 if (GN_UNLIKELY (log_call_enabled)) \ 540 if (GN_UNLIKELY (log_call_enabled)) \
537 GNUNET_log_nocheck ((kind), __VA_ARGS__); \ 541 GNUNET_log_nocheck ((kind), __VA_ARGS__); \
538 } \ 542 } \
539 } \ 543 } \
540 } while (0) 544 } while (0)
@@ -766,6 +770,12 @@ GNUNET_e2s2 (const struct GNUNET_CRYPTO_EcdhePublicKey *p);
766 770
767 771
768/** 772/**
773 * Forward declaration to make compiler happy depending on include order.
774 */
775struct GNUNET_PeerIdentity;
776
777
778/**
769 * @ingroup logging 779 * @ingroup logging
770 * Convert a peer identity to a string (for printing debug messages). 780 * Convert a peer identity to a string (for printing debug messages).
771 * This is one of the very few calls in the entire API that is 781 * This is one of the very few calls in the entire API that is
@@ -1271,6 +1281,7 @@ GNUNET_is_zero_ (const void *a,
1271#define GNUNET_malloc_large(size) \ 1281#define GNUNET_malloc_large(size) \
1272 GNUNET_xmalloc_unchecked_ (size, __FILE__, __LINE__) 1282 GNUNET_xmalloc_unchecked_ (size, __FILE__, __LINE__)
1273 1283
1284
1274/** 1285/**
1275 * @ingroup memory 1286 * @ingroup memory
1276 * Wrapper around realloc. Reallocates size bytes of memory. 1287 * Wrapper around realloc. Reallocates size bytes of memory.
@@ -1283,6 +1294,7 @@ GNUNET_is_zero_ (const void *a,
1283#define GNUNET_realloc(ptr, size) \ 1294#define GNUNET_realloc(ptr, size) \
1284 GNUNET_xrealloc_ (ptr, size, __FILE__, __LINE__) 1295 GNUNET_xrealloc_ (ptr, size, __FILE__, __LINE__)
1285 1296
1297
1286/** 1298/**
1287 * @ingroup memory 1299 * @ingroup memory
1288 * Wrapper around free. Frees the memory referred to by ptr. 1300 * Wrapper around free. Frees the memory referred to by ptr.
@@ -1290,40 +1302,27 @@ GNUNET_is_zero_ (const void *a,
1290 * allocated with #GNUNET_array_grow using #GNUNET_array_grow(mem, size, 0) instead of #GNUNET_free_nz. 1302 * allocated with #GNUNET_array_grow using #GNUNET_array_grow(mem, size, 0) instead of #GNUNET_free_nz.
1291 * 1303 *
1292 * @param ptr location where to free the memory. ptr must have 1304 * @param ptr location where to free the memory. ptr must have
1293 * been returned by #GNUNET_strdup, #GNUNET_strndup, #GNUNET_malloc or #GNUNET_array_grow earlier. 1305 * been returned by #GNUNET_strdup, #GNUNET_strndup, #GNUNET_malloc or #GNUNET_array_grow earlier. NULL is allowed.
1294 */ 1306 */
1295#define GNUNET_free_nz(ptr) GNUNET_xfree_ (ptr, __FILE__, __LINE__) 1307#define GNUNET_free_nz(ptr) GNUNET_xfree_ (ptr, __FILE__, __LINE__)
1296 1308
1309
1297/** 1310/**
1298 * @ingroup memory 1311 * @ingroup memory
1299 * Wrapper around free. Frees the memory referred to by ptr and sets ptr to NULL. 1312 * Wrapper around free. Frees the memory referred to by ptr and sets ptr to NULL.
1300 * Note that it is generally better to free memory that was 1313 * Note that it is generally better to free memory that was
1301 * allocated with #GNUNET_array_grow using #GNUNET_array_grow(mem, size, 0) instead of #GNUNET_free. 1314 * allocated with #GNUNET_array_grow using #GNUNET_array_grow(mem, size, 0) instead of #GNUNET_free.
1302 * 1315 *
1316 * @a ptr will be set to NULL. Use #GNUNET_free_nz() if @a ptr is not an L-value.
1317 *
1303 * @param ptr location where to free the memory. ptr must have 1318 * @param ptr location where to free the memory. ptr must have
1304 * been returned by #GNUNET_strdup, #GNUNET_strndup, #GNUNET_malloc or #GNUNET_array_grow earlier. 1319 * been returned by #GNUNET_strdup, #GNUNET_strndup, #GNUNET_malloc or #GNUNET_array_grow earlier. NULL is allowed.
1305 */ 1320 */
1306#define GNUNET_free(ptr) do { \ 1321#define GNUNET_free(ptr) do { \
1307 GNUNET_xfree_ (ptr, __FILE__, __LINE__); \ 1322 GNUNET_xfree_ (ptr, __FILE__, __LINE__); \
1308 ptr = NULL; \ 1323 ptr = NULL; \
1309} while (0) 1324} while (0)
1310 1325
1311/**
1312 * @ingroup memory
1313 * Free the memory pointed to by ptr if ptr is not NULL.
1314 * Equivalent to `if (NULL != ptr) GNUNET_free(ptr)`.
1315 *
1316 * @param ptr the location in memory to free
1317 */
1318#define GNUNET_free_non_null(ptr) \
1319 do \
1320 { \
1321 void *__x__ = ptr; \
1322 if (NULL != __x__) \
1323 { \
1324 GNUNET_free (__x__); \
1325 } \
1326 } while (0)
1327 1326
1328/** 1327/**
1329 * @ingroup memory 1328 * @ingroup memory
diff --git a/src/include/gnunet_configuration_lib.h b/src/include/gnunet_configuration_lib.h
index 302429430..f782509eb 100644
--- a/src/include/gnunet_configuration_lib.h
+++ b/src/include/gnunet_configuration_lib.h
@@ -101,6 +101,18 @@ GNUNET_CONFIGURATION_load_from (struct GNUNET_CONFIGURATION_Handle *cfg,
101 101
102 102
103/** 103/**
104 * Return GNUnet's default configuration. A new configuration is allocated
105 * each time and it's up to the caller to destroy it when done. This function
106 * returns GNUnet's configuration even when #GNUNET_OS_init has been called
107 * with a value different from #GNUNET_OS_project_data_default.
108 *
109 * @return a freshly allocated configuration
110 */
111struct GNUNET_CONFIGURATION_Handle *
112GNUNET_CONFIGURATION_default (void);
113
114
115/**
104 * Parse a configuration file, add all of the options in the 116 * Parse a configuration file, add all of the options in the
105 * file to the configuration environment. 117 * file to the configuration environment.
106 * 118 *
diff --git a/src/include/gnunet_constants.h b/src/include/gnunet_constants.h
index e1572635f..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) 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 875cfa3bd..9de58d608 100644
--- a/src/include/gnunet_curl_lib.h
+++ b/src/include/gnunet_curl_lib.h
@@ -225,13 +225,9 @@ typedef void
225 * upon its completion. Note that the context will make use of the 225 * upon its completion. Note that the context will make use of the
226 * CURLOPT_PRIVATE facility of the CURL @a eh. 226 * CURLOPT_PRIVATE facility of the CURL @a eh.
227 * 227 *
228 * This function modifies the CURL handle to add the
229 * "Content-Type: application/json" header if @a add_json is set.
230 *
231 * @param ctx context to execute the job in 228 * @param ctx context to execute the job in
232 * @param eh curl easy handle for the request, will 229 * @param eh curl easy handle for the request, will
233 * be executed AND cleaned up 230 * be executed AND cleaned up
234 * @param add_json add "application/json" content type header
235 * @param jcc callback to invoke upon completion 231 * @param jcc callback to invoke upon completion
236 * @param jcc_cls closure for @a jcc 232 * @param jcc_cls closure for @a jcc
237 * @return NULL on error (in this case, @eh is still released!) 233 * @return NULL on error (in this case, @eh is still released!)
@@ -239,13 +235,70 @@ typedef void
239struct GNUNET_CURL_Job * 235struct GNUNET_CURL_Job *
240GNUNET_CURL_job_add (struct GNUNET_CURL_Context *ctx, 236GNUNET_CURL_job_add (struct GNUNET_CURL_Context *ctx,
241 CURL *eh, 237 CURL *eh,
242 int add_json,
243 GNUNET_CURL_JobCompletionCallback jcc, 238 GNUNET_CURL_JobCompletionCallback jcc,
244 void *jcc_cls); 239 void *jcc_cls);
245 240
246 241
247/** 242/**
248 * Schedule a CURL request to be executed and call the given @a jcc 243 * Schedule a CURL request to be executed and call the given @a jcc
244 * upon its completion. Note that the context will make use of the
245 * CURLOPT_PRIVATE facility of the CURL @a eh.
246 *
247 * This function modifies the CURL handle to add the
248 * "Content-Type: application/json" header.
249 *
250 * @param ctx context to execute the job in
251 * @param eh curl easy handle for the request, will
252 * be executed AND cleaned up
253 * @param jcc callback to invoke upon completion
254 * @param jcc_cls closure for @a jcc
255 * @return NULL on error (in this case, @eh is still released!)
256 */
257struct GNUNET_CURL_Job *
258GNUNET_CURL_job_add_with_ct_json (struct GNUNET_CURL_Context *ctx,
259 CURL *eh,
260 GNUNET_CURL_JobCompletionCallback jcc,
261 void *jcc_cls);
262
263
264/**
265 * Force use of the provided username and password
266 * for client authentication for all operations performed
267 * with @a ctx.
268 *
269 * @param ctx context to set authentication data for
270 * @param userpass string with "$USERNAME:$PASSWORD"
271 */
272void
273GNUNET_CURL_set_userpass (struct GNUNET_CURL_Context *ctx,
274 const char *userpass);
275
276
277/**
278 * Force use of the provided TLS client certificate
279 * for client authentication for all operations performed
280 * with @a ctx.
281 *
282 * Note that if the provided information is incorrect,
283 * the earliest operation that could fail is
284 * #GNUNET_CURL_job_add() or #GNUNET_CURL_job_add2()!
285 *
286 * @param ctx context to set authentication data for
287 * @param certtype type of the certificate
288 * @param certfile file with the certificate
289 * @param keyfile file with the private key
290 * @param keypass passphrase to decrypt @a keyfile (or NULL)
291 */
292void
293GNUNET_CURL_set_tlscert (struct GNUNET_CURL_Context *ctx,
294 const char *certtype,
295 const char *certfile,
296 const char *keyfile,
297 const char *keypass);
298
299
300/**
301 * Schedule a CURL request to be executed and call the given @a jcc
249 * upon its completion. Note that the context will make use of the 302 * upon its completion. Note that the context will make use of the
250 * CURLOPT_PRIVATE facility of the CURL @a eh. 303 * CURLOPT_PRIVATE facility of the CURL @a eh.
251 * 304 *
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 */
396enum 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 */
402struct GNUNET_DISK_PipeHandle * 428struct GNUNET_DISK_PipeHandle *
403GNUNET_DISK_pipe (int blocking_read, 429GNUNET_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 */
418struct GNUNET_DISK_PipeHandle * 440struct GNUNET_DISK_PipeHandle *
419GNUNET_DISK_pipe_from_fd (int blocking_read, 441GNUNET_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 *
479GNUNET_DISK_pipe_handle (const struct GNUNET_DISK_PipeHandle *p, 500GNUNET_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_identity_service.h b/src/include/gnunet_identity_service.h
index f4e653598..94127248e 100644
--- a/src/include/gnunet_identity_service.h
+++ b/src/include/gnunet_identity_service.h
@@ -86,9 +86,9 @@ GNUNET_IDENTITY_ego_get_private_key (const struct GNUNET_IDENTITY_Ego *ego);
86/** 86/**
87 * Obtain the ego representing 'anonymous' users. 87 * Obtain the ego representing 'anonymous' users.
88 * 88 *
89 * @return handle for the anonymous user, must not be freed 89 * @return handle for the anonymous user, MUST NOT be freed
90 */ 90 */
91const struct GNUNET_IDENTITY_Ego * 91struct GNUNET_IDENTITY_Ego *
92GNUNET_IDENTITY_ego_get_anonymous (void); 92GNUNET_IDENTITY_ego_get_anonymous (void);
93 93
94 94
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_os_lib.h b/src/include/gnunet_os_lib.h
index b583cc493..749f766d2 100644
--- a/src/include/gnunet_os_lib.h
+++ b/src/include/gnunet_os_lib.h
@@ -1,6 +1,6 @@
1/* 1/*
2 This file is part of GNUnet. 2 This file is part of GNUnet.
3 Copyright (C) 2001, 2002, 2003, 2004, 2005, 2006, 2011 GNUnet e.V. 3 Copyright (C) 2001, 2002, 2003, 2004, 2005, 2006, 2011, 2020 GNUnet e.V.
4 4
5 GNUnet is free software: you can redistribute it and/or modify it 5 GNUnet is free software: you can redistribute it and/or modify it
6 under the terms of the GNU Affero General Public License as published 6 under the terms of the GNU Affero General Public License as published
@@ -100,7 +100,12 @@ enum GNUNET_OS_InheritStdioFlags
100 * Use this option to have all of the standard streams 100 * Use this option to have all of the standard streams
101 * (stdin, stdout and stderror) be inherited. 101 * (stdin, stdout and stderror) be inherited.
102 */ 102 */
103 GNUNET_OS_INHERIT_STD_ALL = 7 103 GNUNET_OS_INHERIT_STD_ALL = 7,
104
105 /**
106 * Should a pipe be used to send signals to the child?
107 */
108 GNUNET_OS_USE_PIPE_CONTROL = 8
104}; 109};
105 110
106 111
@@ -455,7 +460,6 @@ GNUNET_OS_process_get_pid (struct GNUNET_OS_Process *proc);
455/** 460/**
456 * Start a process. 461 * Start a process.
457 * 462 *
458 * @param pipe_control should a pipe be used to send signals to the child?
459 * @param std_inheritance a set of GNUNET_OS_INHERIT_STD_* flags 463 * @param std_inheritance a set of GNUNET_OS_INHERIT_STD_* flags
460 * @param pipe_stdin pipe to use to send input to child process (or NULL) 464 * @param pipe_stdin pipe to use to send input to child process (or NULL)
461 * @param pipe_stdout pipe to use to get output from child process (or NULL) 465 * @param pipe_stdout pipe to use to get output from child process (or NULL)
@@ -465,8 +469,7 @@ GNUNET_OS_process_get_pid (struct GNUNET_OS_Process *proc);
465 * @return pointer to process structure of the new process, NULL on error 469 * @return pointer to process structure of the new process, NULL on error
466 */ 470 */
467struct GNUNET_OS_Process * 471struct GNUNET_OS_Process *
468GNUNET_OS_start_process_vap (int pipe_control, 472GNUNET_OS_start_process_vap (enum GNUNET_OS_InheritStdioFlags std_inheritance,
469 enum GNUNET_OS_InheritStdioFlags std_inheritance,
470 struct GNUNET_DISK_PipeHandle *pipe_stdin, 473 struct GNUNET_DISK_PipeHandle *pipe_stdin,
471 struct GNUNET_DISK_PipeHandle *pipe_stdout, 474 struct GNUNET_DISK_PipeHandle *pipe_stdout,
472 struct GNUNET_DISK_PipeHandle *pipe_stderr, 475 struct GNUNET_DISK_PipeHandle *pipe_stderr,
@@ -477,7 +480,6 @@ GNUNET_OS_start_process_vap (int pipe_control,
477/** 480/**
478 * Start a process. 481 * Start a process.
479 * 482 *
480 * @param pipe_control should a pipe be used to send signals to the child?
481 * @param std_inheritance a set of GNUNET_OS_INHERIT_STD_* flags 483 * @param std_inheritance a set of GNUNET_OS_INHERIT_STD_* flags
482 * @param pipe_stdin pipe to use to send input to child process (or NULL) 484 * @param pipe_stdin pipe to use to send input to child process (or NULL)
483 * @param pipe_stdout pipe to use to get output from child process (or NULL) 485 * @param pipe_stdout pipe to use to get output from child process (or NULL)
@@ -487,8 +489,7 @@ GNUNET_OS_start_process_vap (int pipe_control,
487 * @return pointer to process structure of the new process, NULL on error 489 * @return pointer to process structure of the new process, NULL on error
488 */ 490 */
489struct GNUNET_OS_Process * 491struct GNUNET_OS_Process *
490GNUNET_OS_start_process (int pipe_control, 492GNUNET_OS_start_process (enum GNUNET_OS_InheritStdioFlags std_inheritance,
491 enum GNUNET_OS_InheritStdioFlags std_inheritance,
492 struct GNUNET_DISK_PipeHandle *pipe_stdin, 493 struct GNUNET_DISK_PipeHandle *pipe_stdin,
493 struct GNUNET_DISK_PipeHandle *pipe_stdout, 494 struct GNUNET_DISK_PipeHandle *pipe_stdout,
494 struct GNUNET_DISK_PipeHandle *pipe_stderr, 495 struct GNUNET_DISK_PipeHandle *pipe_stderr,
@@ -498,7 +499,6 @@ GNUNET_OS_start_process (int pipe_control,
498/** 499/**
499 * Start a process. 500 * Start a process.
500 * 501 *
501 * @param pipe_control should a pipe be used to send signals to the child?
502 * @param std_inheritance a set of GNUNET_OS_INHERIT_STD_* flags 502 * @param std_inheritance a set of GNUNET_OS_INHERIT_STD_* flags
503 * @param pipe_stdin pipe to use to send input to child process (or NULL) 503 * @param pipe_stdin pipe to use to send input to child process (or NULL)
504 * @param pipe_stdout pipe to use to get output from child process (or NULL) 504 * @param pipe_stdout pipe to use to get output from child process (or NULL)
@@ -508,8 +508,7 @@ GNUNET_OS_start_process (int pipe_control,
508 * @return pointer to process structure of the new process, NULL on error 508 * @return pointer to process structure of the new process, NULL on error
509 */ 509 */
510struct GNUNET_OS_Process * 510struct GNUNET_OS_Process *
511GNUNET_OS_start_process_va (int pipe_control, 511GNUNET_OS_start_process_va (enum GNUNET_OS_InheritStdioFlags std_inheritance,
512 enum GNUNET_OS_InheritStdioFlags std_inheritance,
513 struct GNUNET_DISK_PipeHandle *pipe_stdin, 512 struct GNUNET_DISK_PipeHandle *pipe_stdin,
514 struct GNUNET_DISK_PipeHandle *pipe_stdout, 513 struct GNUNET_DISK_PipeHandle *pipe_stdout,
515 struct GNUNET_DISK_PipeHandle *pipe_stderr, 514 struct GNUNET_DISK_PipeHandle *pipe_stderr,
@@ -518,7 +517,6 @@ GNUNET_OS_start_process_va (int pipe_control,
518/** 517/**
519 * Start a process. 518 * Start a process.
520 * 519 *
521 * @param pipe_control should a pipe be used to send signals to the child?
522 * @param std_inheritance a set of GNUNET_OS_INHERIT_STD_* flags 520 * @param std_inheritance a set of GNUNET_OS_INHERIT_STD_* flags
523 * @param lsocks array of listen sockets to dup systemd-style (or NULL); 521 * @param lsocks array of listen sockets to dup systemd-style (or NULL);
524 * must be NULL on platforms where dup is not supported 522 * must be NULL on platforms where dup is not supported
@@ -528,8 +526,7 @@ GNUNET_OS_start_process_va (int pipe_control,
528 * @return pointer to process structure of the new process, NULL on error 526 * @return pointer to process structure of the new process, NULL on error
529 */ 527 */
530struct GNUNET_OS_Process * 528struct GNUNET_OS_Process *
531GNUNET_OS_start_process_v (int pipe_control, 529GNUNET_OS_start_process_v (enum GNUNET_OS_InheritStdioFlags std_inheritance,
532 enum GNUNET_OS_InheritStdioFlags std_inheritance,
533 const int *lsocks, 530 const int *lsocks,
534 const char *filename, 531 const char *filename,
535 char *const argv[]); 532 char *const argv[]);
@@ -542,7 +539,6 @@ GNUNET_OS_start_process_v (int pipe_control,
542 * in the order they appear. Arguments containing spaces can be used by 539 * in the order they appear. Arguments containing spaces can be used by
543 * quoting them with @em ". 540 * quoting them with @em ".
544 * 541 *
545 * @param pipe_control should a pipe be used to send signals to the child?
546 * @param std_inheritance a set of GNUNET_OS_INHERIT_STD_* flags 542 * @param std_inheritance a set of GNUNET_OS_INHERIT_STD_* flags
547 * @param lsocks array of listen sockets to dup systemd-style (or NULL); 543 * @param lsocks array of listen sockets to dup systemd-style (or NULL);
548 * must be NULL on platforms where dup is not supported 544 * must be NULL on platforms where dup is not supported
@@ -554,8 +550,7 @@ GNUNET_OS_start_process_v (int pipe_control,
554 * @return pointer to process structure of the new process, NULL on error 550 * @return pointer to process structure of the new process, NULL on error
555 */ 551 */
556struct GNUNET_OS_Process * 552struct GNUNET_OS_Process *
557GNUNET_OS_start_process_s (int pipe_control, 553GNUNET_OS_start_process_s (enum GNUNET_OS_InheritStdioFlags std_inheritance,
558 unsigned int std_inheritance,
559 const int *lsocks, 554 const int *lsocks,
560 const char *filename, ...); 555 const char *filename, ...);
561 556
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 */
175typedef struct GNUNET_RECLAIM_AttributeList *(*GNUNET_RECLAIM_AttestationGetAttributesFunction) ( 175typedef struct
176 GNUNET_RECLAIM_AttributeList *(*
177GNUNET_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 */
337void 337void
338GNUNET_RECLAIM_get_attestations_next (struct GNUNET_RECLAIM_AttestationIterator *ait); 338GNUNET_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 */
348void 349void
349GNUNET_RECLAIM_get_attestations_stop (struct GNUNET_RECLAIM_AttestationIterator *ait); 350GNUNET_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