gnunet

Main GNUnet Logic
Log | Files | Refs | Submodules | README | LICENSE

commit 1a32f93e466698f9ea703bf0e6ae7651f8e2c6f5
parent d98fcde0fe7777e80d3e6f85665ebc72bcdb7156
Author: Christian Grothoff <christian@grothoff.org>
Date:   Fri, 31 May 2024 23:12:41 +0200

-fix compiler warnings from undefined #defines

Diffstat:
Msrc/include/gettext.h | 10+++++++---
Msrc/include/gnunet_os_lib.h | 70++++++++++++++++++++++++++++++++++++++++++----------------------------
Msrc/include/gnunet_protocols.h | 17++++-------------
Msrc/lib/util/Makefile.am | 2+-
4 files changed, 54 insertions(+), 45 deletions(-)

diff --git a/src/include/gettext.h b/src/include/gettext.h @@ -20,6 +20,10 @@ #define _LIBGETTEXT_H 1 /* NLS can be disabled through the configure --disable-nls option. */ +#ifndef ENABLE_NLS +#define ENABLE_NLS 0 +#endif + #if ENABLE_NLS /* Get declarations of GNU message catalog functions. */ @@ -47,11 +51,11 @@ #define dgettext(Domainname, Msgid) ((const char *) (Msgid)) #define dcgettext(Domainname, Msgid, Category) ((const char *) (Msgid)) #define ngettext(Msgid1, Msgid2, N) \ - ((N) == 1 ? (const char *) (Msgid1) : (const char *) (Msgid2)) + ((N) == 1 ? (const char *) (Msgid1) : (const char *) (Msgid2)) #define dngettext(Domainname, Msgid1, Msgid2, N) \ - ((N) == 1 ? (const char *) (Msgid1) : (const char *) (Msgid2)) + ((N) == 1 ? (const char *) (Msgid1) : (const char *) (Msgid2)) #define dcngettext(Domainname, Msgid1, Msgid2, N, Category) \ - ((N) == 1 ? (const char *) (Msgid1) : (const char *) (Msgid2)) + ((N) == 1 ? (const char *) (Msgid1) : (const char *) (Msgid2)) /* slight modification here to avoid warnings: generate GNUNET_NO code, not even the cast... */ #define textdomain(Domainname) diff --git a/src/include/gnunet_os_lib.h b/src/include/gnunet_os_lib.h @@ -403,6 +403,10 @@ void GNUNET_OS_network_interfaces_list (GNUNET_OS_NetworkInterfaceProcessor proc, void *proc_cls); +#ifndef HAVE_SYSCONF +#define HAVE_SYSCONF 0 +#endif + /** * @brief Get maximum string length returned by gethostname() */ @@ -473,12 +477,13 @@ GNUNET_OS_process_get_pid (struct GNUNET_OS_Process *proc); * @return pointer to process structure of the new process, NULL on error */ struct GNUNET_OS_Process * -GNUNET_OS_start_process_vap (enum GNUNET_OS_InheritStdioFlags std_inheritance, - struct GNUNET_DISK_PipeHandle *pipe_stdin, - struct GNUNET_DISK_PipeHandle *pipe_stdout, - struct GNUNET_DISK_PipeHandle *pipe_stderr, - const char *filename, - char *const argv[]); +GNUNET_OS_start_process_vap ( + enum GNUNET_OS_InheritStdioFlags std_inheritance, + struct GNUNET_DISK_PipeHandle *pipe_stdin, + struct GNUNET_DISK_PipeHandle *pipe_stdout, + struct GNUNET_DISK_PipeHandle *pipe_stderr, + const char *filename, + char *const argv[]); /** @@ -493,11 +498,13 @@ GNUNET_OS_start_process_vap (enum GNUNET_OS_InheritStdioFlags std_inheritance, * @return pointer to process structure of the new process, NULL on error */ struct GNUNET_OS_Process * -GNUNET_OS_start_process (enum GNUNET_OS_InheritStdioFlags std_inheritance, - struct GNUNET_DISK_PipeHandle *pipe_stdin, - struct GNUNET_DISK_PipeHandle *pipe_stdout, - struct GNUNET_DISK_PipeHandle *pipe_stderr, - const char *filename, ...); +GNUNET_OS_start_process ( + enum GNUNET_OS_InheritStdioFlags std_inheritance, + struct GNUNET_DISK_PipeHandle *pipe_stdin, + struct GNUNET_DISK_PipeHandle *pipe_stdout, + struct GNUNET_DISK_PipeHandle *pipe_stderr, + const char *filename, + ...); /** @@ -512,11 +519,14 @@ GNUNET_OS_start_process (enum GNUNET_OS_InheritStdioFlags std_inheritance, * @return pointer to process structure of the new process, NULL on error */ struct GNUNET_OS_Process * -GNUNET_OS_start_process_va (enum GNUNET_OS_InheritStdioFlags std_inheritance, - struct GNUNET_DISK_PipeHandle *pipe_stdin, - struct GNUNET_DISK_PipeHandle *pipe_stdout, - struct GNUNET_DISK_PipeHandle *pipe_stderr, - const char *filename, va_list va); +GNUNET_OS_start_process_va ( + enum GNUNET_OS_InheritStdioFlags std_inheritance, + struct GNUNET_DISK_PipeHandle *pipe_stdin, + struct GNUNET_DISK_PipeHandle *pipe_stdout, + struct GNUNET_DISK_PipeHandle *pipe_stderr, + const char *filename, + va_list va); + /** * Start a process. @@ -530,10 +540,11 @@ GNUNET_OS_start_process_va (enum GNUNET_OS_InheritStdioFlags std_inheritance, * @return pointer to process structure of the new process, NULL on error */ struct GNUNET_OS_Process * -GNUNET_OS_start_process_v (enum GNUNET_OS_InheritStdioFlags std_inheritance, - const int *lsocks, - const char *filename, - char *const argv[]); +GNUNET_OS_start_process_v ( + enum GNUNET_OS_InheritStdioFlags std_inheritance, + const int *lsocks, + const char *filename, + char *const argv[]); /** @@ -554,9 +565,11 @@ GNUNET_OS_start_process_v (enum GNUNET_OS_InheritStdioFlags std_inheritance, * @return pointer to process structure of the new process, NULL on error */ struct GNUNET_OS_Process * -GNUNET_OS_start_process_s (enum GNUNET_OS_InheritStdioFlags std_inheritance, - const int *lsocks, - const char *filename, ...); +GNUNET_OS_start_process_s ( + enum GNUNET_OS_InheritStdioFlags std_inheritance, + const int *lsocks, + const char *filename, + ...); /** @@ -596,11 +609,12 @@ GNUNET_OS_command_stop (struct GNUNET_OS_CommandHandle *cmd); * @return NULL on error */ struct GNUNET_OS_CommandHandle * -GNUNET_OS_command_run (GNUNET_OS_LineProcessor proc, - void *proc_cls, - struct GNUNET_TIME_Relative timeout, - const char *binary, - ...); +GNUNET_OS_command_run ( + GNUNET_OS_LineProcessor proc, + void *proc_cls, + struct GNUNET_TIME_Relative timeout, + const char *binary, + ...); /** diff --git a/src/include/gnunet_protocols.h b/src/include/gnunet_protocols.h @@ -2778,19 +2778,6 @@ extern "C" { */ #define GNUNET_MESSAGE_TYPE_XDHT_P2P_NOTIFY_SUCCESSOR_CONFIRMATION 892 -#if ENABLE_MALICIOUS -/** - * Turn X-VINE DHT service malicious - */ -#define GNUNET_MESSAGE_TYPE_DHT_ACT_MALICIOUS 893 - -/** - * Acknowledge receiving ACT MALICIOUS request - */ -#define GNUNET_MESSAGE_TYPE_DHT_CLIENT_ACT_MALICIOUS_OK 894 - -#endif - /******************************************************************************* * Whanau DHT messages @@ -2875,6 +2862,10 @@ extern "C" { */ #define GNUNET_MESSAGE_TYPE_RPS_CS_SEED 954 +#ifndef ENABLE_MALICIOUS +#define ENABLE_MALICIOUS 0 +#endif + #if ENABLE_MALICIOUS /** * Turn RPS service malicious diff --git a/src/lib/util/Makefile.am b/src/lib/util/Makefile.am @@ -84,7 +84,7 @@ libgnunetutil_la_SOURCES = \ mq.c \ nc.c \ network.c \ - nt.c \ + nt.c \ os_installation.c \ os_network.c \ os_priority.c \