From 7ff9290162ddcad90b27a266588dcd7ade2b414e Mon Sep 17 00:00:00 2001 From: Christian Grothoff Date: Sun, 10 Nov 2019 23:10:40 +0100 Subject: [PATCH] get rid of SOCKTYPE and FDTYPE --- src/arm/arm_api.c | 4 ++-- src/arm/gnunet-service-arm.c | 2 +- src/include/platform.h | 3 --- src/transport/gnunet-helper-transport-bluetooth.c | 1 - src/transport/gnunet-helper-transport-wlan.c | 2 -- src/util/network.c | 2 +- src/util/os_priority.c | 6 +++--- 7 files changed, 7 insertions(+), 13 deletions(-) diff --git a/src/arm/arm_api.c b/src/arm/arm_api.c index 4c6ce3240..1c402a8e0 100644 --- a/src/arm/arm_api.c +++ b/src/arm/arm_api.c @@ -662,8 +662,8 @@ start_arm_service (struct GNUNET_ARM_Handle *h, char *config; char *loprefix; char *lopostfix; - SOCKTYPE ld[2]; - SOCKTYPE *lsocks; + int ld[2]; + int *lsocks; if (NULL == sigfd) { diff --git a/src/arm/gnunet-service-arm.c b/src/arm/gnunet-service-arm.c index 6b6264757..01bc48960 100644 --- a/src/arm/gnunet-service-arm.c +++ b/src/arm/gnunet-service-arm.c @@ -756,7 +756,7 @@ start_process (struct ServiceList *sl, int use_debug; int is_simple_service; struct ServiceListeningInfo *sli; - SOCKTYPE *lsocks; + int *lsocks; unsigned int ls; char *binary; char *quotedbinary; diff --git a/src/include/platform.h b/src/include/platform.h index dd5e28760..0dddd9741 100644 --- a/src/include/platform.h +++ b/src/include/platform.h @@ -236,9 +236,6 @@ atoll (const char *nptr); #define MAKE_UNALIGNED(val) val #endif -#define FDTYPE int -#define SOCKTYPE int - /** * The termination signal */ diff --git a/src/transport/gnunet-helper-transport-bluetooth.c b/src/transport/gnunet-helper-transport-bluetooth.c index 9b56d0922..74806e630 100644 --- a/src/transport/gnunet-helper-transport-bluetooth.c +++ b/src/transport/gnunet-helper-transport-bluetooth.c @@ -21,7 +21,6 @@ */ #include "gnunet_config.h" -#define SOCKTYPE int #include #include #include diff --git a/src/transport/gnunet-helper-transport-wlan.c b/src/transport/gnunet-helper-transport-wlan.c index 68adadbe8..2d5a2cf46 100644 --- a/src/transport/gnunet-helper-transport-wlan.c +++ b/src/transport/gnunet-helper-transport-wlan.c @@ -110,8 +110,6 @@ * parts taken from aircrack-ng, parts changend. */ #include "gnunet_config.h" -#define SOCKTYPE int -#define FDTYPE int #include #include #include diff --git a/src/util/network.c b/src/util/network.c index 99de5a7aa..2b407d97c 100644 --- a/src/util/network.c +++ b/src/util/network.c @@ -633,7 +633,7 @@ GNUNET_NETWORK_socket_free_memory_only_ (struct GNUNET_NETWORK_Handle *desc) * @return NULL on error (including not supported on target platform) */ struct GNUNET_NETWORK_Handle * -GNUNET_NETWORK_socket_box_native (SOCKTYPE fd) +GNUNET_NETWORK_socket_box_native (int fd) { struct GNUNET_NETWORK_Handle *ret; diff --git a/src/util/os_priority.c b/src/util/os_priority.c index 3b4858ca4..d93e0d44f 100644 --- a/src/util/os_priority.c +++ b/src/util/os_priority.c @@ -346,7 +346,7 @@ start_process (int pipe_control, struct GNUNET_DISK_PipeHandle *pipe_stdin, struct GNUNET_DISK_PipeHandle *pipe_stdout, struct GNUNET_DISK_PipeHandle *pipe_stderr, - const SOCKTYPE *lsocks, + const int *lsocks, const char *filename, char *const argv[]) { @@ -725,7 +725,7 @@ GNUNET_OS_start_process (int pipe_control, struct GNUNET_OS_Process * GNUNET_OS_start_process_v (int pipe_control, enum GNUNET_OS_InheritStdioFlags std_inheritance, - const SOCKTYPE *lsocks, + const int *lsocks, const char *filename, char *const argv[]) { @@ -761,7 +761,7 @@ GNUNET_OS_start_process_v (int pipe_control, struct GNUNET_OS_Process * GNUNET_OS_start_process_s (int pipe_control, unsigned int std_inheritance, - const SOCKTYPE *lsocks, + const int *lsocks, const char *filename, ...) { -- 2.25.1