summaryrefslogtreecommitdiffstats
path: root/lib/curl_setup.h
diff options
context:
space:
mode:
authorCurl Upstream <curl-library@cool.haxx.se>2016-08-03 06:37:16 (GMT)
committerBrad King <brad.king@kitware.com>2016-08-03 18:26:29 (GMT)
commit202adcfe056681109fe61569ecdb3bd69f0b4f97 (patch)
treebabb186f9f5f5e1345c61a2b2a4b955a9bae7849 /lib/curl_setup.h
parent7ec709d3d7cc988d4cf6dc2c49713d4c55f09542 (diff)
downloadCMake-202adcfe056681109fe61569ecdb3bd69f0b4f97.zip
CMake-202adcfe056681109fe61569ecdb3bd69f0b4f97.tar.gz
CMake-202adcfe056681109fe61569ecdb3bd69f0b4f97.tar.bz2
curl 2016-08-03 (f2cb3a01)
Code extracted from: https://github.com/bagder/curl.git at commit f2cb3a01192d36395d16acec6cdb93446ca6fd45 (curl-7_50_1).
Diffstat (limited to 'lib/curl_setup.h')
-rw-r--r--lib/curl_setup.h49
1 files changed, 34 insertions, 15 deletions
diff --git a/lib/curl_setup.h b/lib/curl_setup.h
index ab0c139..7dcc4c4 100644
--- a/lib/curl_setup.h
+++ b/lib/curl_setup.h
@@ -7,11 +7,11 @@
* | (__| |_| | _ <| |___
* \___|\___/|_| \_\_____|
*
- * Copyright (C) 1998 - 2015, Daniel Stenberg, <daniel@haxx.se>, et al.
+ * Copyright (C) 1998 - 2016, Daniel Stenberg, <daniel@haxx.se>, et al.
*
* This software is licensed as described in the file COPYING, which
* you should have received as part of this distribution. The terms
- * are also available at http://curl.haxx.se/docs/copyright.html.
+ * are also available at https://curl.haxx.se/docs/copyright.html.
*
* You may opt to use, copy, modify, merge, publish, distribute and/or sell
* copies of the Software, and permit persons to whom the Software is
@@ -181,9 +181,6 @@
# ifndef CURL_DISABLE_SMTP
# define CURL_DISABLE_SMTP
# endif
-# ifndef CURL_DISABLE_RTSP
-# define CURL_DISABLE_RTSP
-# endif
# ifndef CURL_DISABLE_RTMP
# define CURL_DISABLE_RTMP
# endif
@@ -225,6 +222,15 @@
#endif
/*
+ * Use getaddrinfo to resolve the IPv4 address literal. If the current network
+ * interface doesn’t support IPv4, but supports IPv6, NAT64, and DNS64,
+ * performing this task will result in a synthesized IPv6 address.
+ */
+#ifdef __APPLE__
+#define USE_RESOLVE_ON_IPS 1
+#endif
+
+/*
* Include header files for windows builds before redefining anything.
* Use this preprocessor block only to include or exclude windows.h,
* winsock2.h, ws2tcpip.h or winsock.h. Any other windows thing belongs
@@ -249,7 +255,7 @@
# ifdef HAVE_WINSOCK2_H
# include <winsock2.h>
# ifdef HAVE_WS2TCPIP_H
-# include <ws2tcpip.h>
+# include <ws2tcpip.h>
# endif
# else
# ifdef HAVE_WINSOCK_H
@@ -476,7 +482,7 @@
# endif
# ifndef fileno /* sunos 4 have this as a macro! */
- int fileno( FILE *stream);
+ int fileno(FILE *stream);
# endif
#endif /* WIN32 */
@@ -484,9 +490,10 @@
/*
* msvc 6.0 requires PSDK in order to have INET6_ADDRSTRLEN
* defined in ws2tcpip.h as well as to provide IPv6 support.
+ * Does not apply if lwIP is used.
*/
-#if defined(_MSC_VER) && !defined(__POCC__)
+#if defined(_MSC_VER) && !defined(__POCC__) && !defined(USE_LWIPSOCK)
# if !defined(HAVE_WS2TCPIP_H) || \
((_MSC_VER < 1300) && !defined(INET6_ADDRSTRLEN))
# undef HAVE_GETADDRINFO_THREADSAFE
@@ -530,6 +537,7 @@
# define CURLRES_ARES
/* now undef the stock libc functions just to avoid them being used */
# undef HAVE_GETADDRINFO
+# undef HAVE_FREEADDRINFO
# undef HAVE_GETHOSTBYNAME
#elif defined(USE_THREADS_POSIX) || defined(USE_THREADS_WIN32)
# define CURLRES_ASYNCH
@@ -605,7 +613,7 @@ int netware_init(void);
#define LIBIDN_REQUIRED_VERSION "0.4.1"
#if defined(USE_GNUTLS) || defined(USE_OPENSSL) || defined(USE_NSS) || \
- defined(USE_POLARSSL) || defined(USE_AXTLS) || \
+ defined(USE_POLARSSL) || defined(USE_AXTLS) || defined(USE_MBEDTLS) || \
defined(USE_CYASSL) || defined(USE_SCHANNEL) || \
defined(USE_DARWINSSL) || defined(USE_GSKIT)
#define USE_SSL /* SSL support has been enabled */
@@ -629,13 +637,9 @@ int netware_init(void);
defined(USE_GNUTLS) || defined(USE_NSS) || defined(USE_DARWINSSL) || \
defined(USE_OS400CRYPTO) || defined(USE_WIN32_CRYPTO)
-#ifdef HAVE_BORINGSSL /* BoringSSL is not NTLM capable */
-#undef USE_NTLM
-#else
#define USE_NTLM
#endif
#endif
-#endif
/* non-configure builds may define CURL_WANTS_CA_BUNDLE_ENV */
#if defined(CURL_WANTS_CA_BUNDLE_ENV) && !defined(CURL_CA_BUNDLE)
@@ -677,7 +681,7 @@ int netware_init(void);
* Ensure that Winsock and lwIP TCP/IP stacks are not mixed.
*/
-#if defined(__LWIP_OPT_H__)
+#if defined(__LWIP_OPT_H__) || defined(LWIP_HDR_OPT_H)
# if defined(SOCKET) || \
defined(USE_WINSOCK) || \
defined(HAVE_WINSOCK_H) || \
@@ -708,7 +712,7 @@ int netware_init(void);
#endif
/* In Windows the default file mode is text but an application can override it.
-Therefore we specify it explicitly. https://github.com/bagder/curl/pull/258
+Therefore we specify it explicitly. https://github.com/curl/curl/pull/258
*/
#if defined(WIN32) || defined(MSDOS)
#define FOPEN_READTEXT "rt"
@@ -727,4 +731,19 @@ endings either CRLF or LF so 't' is appropriate.
#define FOPEN_WRITETEXT "w"
#endif
+/* WinSock destroys recv() buffer when send() failed.
+ * Enabled automatically for Windows and for Cygwin as Cygwin sockets are
+ * wrappers for WinSock sockets. https://github.com/curl/curl/issues/657
+ * Define DONT_USE_RECV_BEFORE_SEND_WORKAROUND to force disable workaround.
+ */
+#if !defined(DONT_USE_RECV_BEFORE_SEND_WORKAROUND)
+# if defined(WIN32) || defined(__CYGWIN__)
+# define USE_RECV_BEFORE_SEND_WORKAROUND
+# endif
+#else /* DONT_USE_RECV_BEFORE_SEND_WORKAROUNDS */
+# ifdef USE_RECV_BEFORE_SEND_WORKAROUND
+# undef USE_RECV_BEFORE_SEND_WORKAROUND
+# endif
+#endif /* DONT_USE_RECV_BEFORE_SEND_WORKAROUNDS */
+
#endif /* HEADER_CURL_SETUP_H */