1 #ifndef HEADER_CURL_FUNCTYPES_H 2 #define HEADER_CURL_FUNCTYPES_H 3 /*************************************************************************** 4 * _ _ ____ _ 5 * Project ___| | | | _ \| | 6 * / __| | | | |_) | | 7 * | (__| |_| | _ <| |___ 8 * \___|\___/|_| \_\_____| 9 * 10 * Copyright (C) Daniel Stenberg, <daniel@haxx.se>, et al. 11 * 12 * This software is licensed as described in the file COPYING, which 13 * you should have received as part of this distribution. The terms 14 * are also available at https://curl.se/docs/copyright.html. 15 * 16 * You may opt to use, copy, modify, merge, publish, distribute and/or sell 17 * copies of the Software, and permit persons to whom the Software is 18 * furnished to do so, under the terms of the COPYING file. 19 * 20 * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY 21 * KIND, either express or implied. 22 * 23 * SPDX-License-Identifier: curl 24 * 25 ***************************************************************************/ 26 27 #include "curl_setup.h" 28 29 /* defaults: 30 31 ssize_t recv(int, void *, size_t, int); 32 ssize_t send(int, const void *, size_t, int); 33 34 If other argument or return types are needed: 35 36 1. For systems that run configure or cmake, the alternatives are provided 37 here. 38 2. For systems with config-*.h files, define them there. 39 */ 40 41 #ifdef _WIN32 42 /* int recv(SOCKET, char *, int, int) */ 43 #define RECV_TYPE_ARG1 SOCKET 44 #define RECV_TYPE_ARG2 char * 45 #define RECV_TYPE_ARG3 int 46 #define RECV_TYPE_RETV int 47 48 /* int send(SOCKET, const char *, int, int); */ 49 #define SEND_TYPE_ARG1 SOCKET 50 #define SEND_TYPE_ARG2 char * 51 #define SEND_TYPE_ARG3 int 52 #define SEND_TYPE_RETV int 53 54 #elif defined(__AMIGA__) /* Any AmigaOS flavour */ 55 56 /* long recv(long, char *, long, long); */ 57 #define RECV_TYPE_ARG1 long 58 #define RECV_TYPE_ARG2 char * 59 #define RECV_TYPE_ARG3 long 60 #define RECV_TYPE_ARG4 long 61 #define RECV_TYPE_RETV long 62 63 /* int send(int, const char *, int, int); */ 64 #define SEND_TYPE_ARG1 int 65 #define SEND_QUAL_ARG2 66 #define SEND_TYPE_ARG2 char * 67 #define SEND_TYPE_ARG3 int 68 #define SEND_TYPE_RETV int 69 #endif 70 71 72 #ifndef RECV_TYPE_ARG1 73 #define RECV_TYPE_ARG1 int 74 #endif 75 76 #ifndef RECV_TYPE_ARG2 77 #define RECV_TYPE_ARG2 void * 78 #endif 79 80 #ifndef RECV_TYPE_ARG3 81 #define RECV_TYPE_ARG3 size_t 82 #endif 83 84 #ifndef RECV_TYPE_ARG4 85 #define RECV_TYPE_ARG4 int 86 #endif 87 88 #ifndef RECV_TYPE_RETV 89 #define RECV_TYPE_RETV ssize_t 90 #endif 91 92 #ifndef SEND_QUAL_ARG2 93 #define SEND_QUAL_ARG2 const 94 #endif 95 96 #ifndef SEND_TYPE_ARG1 97 #define SEND_TYPE_ARG1 int 98 #endif 99 100 #ifndef SEND_TYPE_ARG2 101 #define SEND_TYPE_ARG2 void * 102 #endif 103 104 #ifndef SEND_TYPE_ARG3 105 #define SEND_TYPE_ARG3 size_t 106 #endif 107 108 #ifndef SEND_TYPE_ARG4 109 #define SEND_TYPE_ARG4 int 110 #endif 111 112 #ifndef SEND_TYPE_RETV 113 #define SEND_TYPE_RETV ssize_t 114 #endif 115 116 #endif /* HEADER_CURL_FUNCTYPES_H */ 117