diff options
author | Daniel Stenberg <daniel@haxx.se> | 2022-09-26 11:45:18 +0200 |
---|---|---|
committer | Daniel Stenberg <daniel@haxx.se> | 2022-09-28 09:06:11 +0200 |
commit | eb33ccd5332435fa50f1758e5debb869c6942b7f (patch) | |
tree | 818f3c3bd88714f4e80ed8ddec1c78d6a3dd1472 /lib/curl_setup_once.h | |
parent | eb0167ff7d31d3a5e1f01e8b05e25b1bf94bb2a7 (diff) | |
download | curl-eb33ccd5332435fa50f1758e5debb869c6942b7f.tar.gz |
functypes: provide the recv and send arg and return types
This header is for providing the argument types for recv() and send()
when built to not use a dedicated config-[platfor].h file.
Remove the slow brute-force checks from configure and cmake.
This change also removes the use of the types for select, as they were
not used in code.
Closes #9592
Diffstat (limited to 'lib/curl_setup_once.h')
-rw-r--r-- | lib/curl_setup_once.h | 23 |
1 files changed, 2 insertions, 21 deletions
diff --git a/lib/curl_setup_once.h b/lib/curl_setup_once.h index d5c2d4d45..f09b00f9f 100644 --- a/lib/curl_setup_once.h +++ b/lib/curl_setup_once.h @@ -87,6 +87,8 @@ #include <sys/socket.h> #endif +#include "functypes.h" + #ifdef __hpux # if !defined(_XOPEN_SOURCE_EXTENDED) || defined(_KERNEL) # ifdef OLD_APP32_64BIT_OFF_T @@ -149,20 +151,10 @@ struct timeval { * SEND_TYPE_RETV must also be defined. */ -#if !defined(RECV_TYPE_ARG1) || \ - !defined(RECV_TYPE_ARG2) || \ - !defined(RECV_TYPE_ARG3) || \ - !defined(RECV_TYPE_ARG4) || \ - !defined(RECV_TYPE_RETV) - /* */ - Error Missing_definition_of_return_and_arguments_types_of_recv - /* */ -#else #define sread(x,y,z) (ssize_t)recv((RECV_TYPE_ARG1)(x), \ (RECV_TYPE_ARG2)(y), \ (RECV_TYPE_ARG3)(z), \ (RECV_TYPE_ARG4)(0)) -#endif #else /* HAVE_RECV */ #ifndef sread /* */ @@ -179,21 +171,10 @@ struct timeval { (SEND_TYPE_ARG3)(z)) #elif defined(HAVE_SEND) -#if !defined(SEND_TYPE_ARG1) || \ - !defined(SEND_QUAL_ARG2) || \ - !defined(SEND_TYPE_ARG2) || \ - !defined(SEND_TYPE_ARG3) || \ - !defined(SEND_TYPE_ARG4) || \ - !defined(SEND_TYPE_RETV) - /* */ - Error Missing_definition_of_return_and_arguments_types_of_send - /* */ -#else #define swrite(x,y,z) (ssize_t)send((SEND_TYPE_ARG1)(x), \ (SEND_QUAL_ARG2 SEND_TYPE_ARG2)(y), \ (SEND_TYPE_ARG3)(z), \ (SEND_TYPE_ARG4)(SEND_4TH_ARG)) -#endif #else /* HAVE_SEND */ #ifndef swrite /* */ |