27 #define CURL_DISABLE_FTP
28 #define CURL_DISABLE_LDAP
29 #define CURL_DISABLE_TELNET
30 #define CURL_DISABLE_DICT
31 #define CURL_DISABLE_FILE
32 #define CURL_DISABLE_GOPHER
35 #if !defined(WIN32) && defined(__WIN32__)
45 #include "config-win32.h"
51 #include "config-vms.h"
55 #include "config-netware.h"
59 #include "config-mac.h"
73 #if !defined(__cplusplus) && !defined(__BEOS__)
74 typedef unsigned char bool;
79 #define LONG_LONG long long
83 #define LONG_LONG __int64
88 #ifndef SIZEOF_CURL_OFF_T
92 #define SIZEOF_CURL_OFF_T 4
96 #if SIZEOF_CURL_OFF_T > 4
97 #define FORMAT_OFF_T "lld"
99 #define FORMAT_OFF_T "ld"
102 #ifdef NEED_REENTRANT
119 #if defined(HAVE_X509_H) && defined(HAVE_SSL_H) && defined(HAVE_RSA_H) && \
120 defined(HAVE_PEM_H) && defined(HAVE_ERR_H) && defined(HAVE_CRYPTO_H) && \
121 defined(HAVE_LIBSSL) && defined(HAVE_LIBCRYPTO)
126 #if defined(HAVE_OPENSSL_X509_H) && defined(HAVE_OPENSSL_SSL_H) && \
127 defined(HAVE_OPENSSL_RSA_H) && defined(HAVE_OPENSSL_PEM_H) && \
128 defined(HAVE_OPENSSL_ERR_H) && defined(HAVE_OPENSSL_CRYPTO_H) && \
129 defined(HAVE_LIBSSL) && defined(HAVE_LIBCRYPTO)
133 #define USE_OPENSSL 1
138 #include "../include/curl/stdcheaders.h"
144 #if defined(CURLDEBUG) && defined(HAVE_ASSERT_H)
146 #define curlassert(x) assert(x)
149 #define curlassert(x)
155 #define SEND_4TH_ARG MSG_NOSIGNAL
156 #define HAVE_MSG_NOSIGNAL 1
158 #define SEND_4TH_ARG 0
173 #ifndef WIN32_LEAN_AND_MEAN
174 #define WIN32_LEAN_AND_MEAN
177 #include <winsock2.h>
179 #if defined(ENABLE_IPV6) || defined(USE_SSLEAY)
180 #include <ws2tcpip.h>
183 #if !defined(__GNUC__) || defined(__MINGW32__)
184 #define sclose(x) closesocket(x)
185 #define sread(x,y,z) recv(x,y,z, SEND_4TH_ARG)
186 #define swrite(x,y,z) (size_t)send(x,y,z, SEND_4TH_ARG)
190 #define sclose(x) close(x)
191 #define sread(x,y,z) recv(x,y,z, SEND_4TH_ARG)
192 #define swrite(x,y,z) send(x,y,z, SEND_4TH_ARG)
196 #define DIR_CHAR "\\"
202 #define sclose(x) close_s(x)
203 #define sread(x,y,z) read_s(x,y,z)
204 #define swrite(x,y,z) write_s(x,y,z)
205 #define select(n,r,w,x,t) select_s(n,r,w,x,t)
206 #define ioctl(x,y,z) ioctlsocket(x,y,(char *)(z))
216 #define sclose(x) closesocket(x)
217 #define sread(x,y,z) (ssize_t)recv(x,y,z, SEND_4TH_ARG)
218 #define swrite(x,y,z) (ssize_t)send(x,y,z, SEND_4TH_ARG)
220 #define sclose(x) close(x)
221 #define sread(x,y,z) recv(x,y,z, SEND_4TH_ARG)
222 #define swrite(x,y,z) send(x,y,z, SEND_4TH_ARG)
232 #define sclose(x) CloseSocket(x)
244 int fileno( FILE *stream);
252 #define CURL_SOCKET_BAD INVALID_SOCKET
255 #define CURL_SOCKET_BAD -1
258 #if defined(ENABLE_IPV6) && defined(USE_ARES)
259 #error "ares does not yet support IPv6. Disable IPv6 or ares and rebuild"
262 #if defined(WIN32) && !defined(__CYGWIN32__) && !defined(USE_ARES) && !defined(ENABLE_IPV6)
263 #define USE_THREADING_GETHOSTBYNAME
289 #define ECONNRESET WSAECONNRESET
293 #define ECONNRESET 10000
struct in_addr Curl_ipconnect
struct hostent Curl_addrinfo