| 1 | #ifndef HEADER_CURL_FUNCTYPES_H
|
|---|
| 2 | #define HEADER_CURL_FUNCTYPES_H
|
|---|
| 3 | /***************************************************************************
|
|---|
| 4 | * _ _ ____ _
|
|---|
| 5 | * Project ___| | | | _ \| |
|
|---|
| 6 | * / __| | | | |_) | |
|
|---|
| 7 | * | (__| |_| | _ <| |___
|
|---|
| 8 | * \___|\___/|_| \_\_____|
|
|---|
| 9 | *
|
|---|
| 10 | * Copyright (C) 1998 - 2022, 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_TYPE_ARG2 char *
|
|---|
| 66 | #define SEND_TYPE_ARG3 int
|
|---|
| 67 | #define SEND_TYPE_RETV int
|
|---|
| 68 | #endif
|
|---|
| 69 |
|
|---|
| 70 |
|
|---|
| 71 | #ifndef RECV_TYPE_ARG1
|
|---|
| 72 | #define RECV_TYPE_ARG1 int
|
|---|
| 73 | #endif
|
|---|
| 74 |
|
|---|
| 75 | #ifndef RECV_TYPE_ARG2
|
|---|
| 76 | #define RECV_TYPE_ARG2 void *
|
|---|
| 77 | #endif
|
|---|
| 78 |
|
|---|
| 79 | #ifndef RECV_TYPE_ARG3
|
|---|
| 80 | #define RECV_TYPE_ARG3 size_t
|
|---|
| 81 | #endif
|
|---|
| 82 |
|
|---|
| 83 | #ifndef RECV_TYPE_ARG4
|
|---|
| 84 | #define RECV_TYPE_ARG4 int
|
|---|
| 85 | #endif
|
|---|
| 86 |
|
|---|
| 87 | #ifndef RECV_TYPE_RETV
|
|---|
| 88 | #define RECV_TYPE_RETV ssize_t
|
|---|
| 89 | #endif
|
|---|
| 90 |
|
|---|
| 91 | #ifndef SEND_QUAL_ARG2
|
|---|
| 92 | #define SEND_QUAL_ARG2 const
|
|---|
| 93 | #endif
|
|---|
| 94 |
|
|---|
| 95 | #ifndef SEND_TYPE_ARG1
|
|---|
| 96 | #define SEND_TYPE_ARG1 int
|
|---|
| 97 | #endif
|
|---|
| 98 |
|
|---|
| 99 | #ifndef SEND_TYPE_ARG2
|
|---|
| 100 | #define SEND_TYPE_ARG2 void *
|
|---|
| 101 | #endif
|
|---|
| 102 |
|
|---|
| 103 | #ifndef SEND_TYPE_ARG3
|
|---|
| 104 | #define SEND_TYPE_ARG3 size_t
|
|---|
| 105 | #endif
|
|---|
| 106 |
|
|---|
| 107 | #ifndef SEND_TYPE_ARG4
|
|---|
| 108 | #define SEND_TYPE_ARG4 int
|
|---|
| 109 | #endif
|
|---|
| 110 |
|
|---|
| 111 | #ifndef SEND_TYPE_RETV
|
|---|
| 112 | #define SEND_TYPE_RETV ssize_t
|
|---|
| 113 | #endif
|
|---|
| 114 |
|
|---|
| 115 | #endif /* HEADER_CURL_FUNCTYPES_H */
|
|---|