summaryrefslogtreecommitdiff
path: root/Utilities/cmcurl/lib/curl_setup.h
diff options
context:
space:
mode:
authorBrad King <brad.king@kitware.com>2017-10-04 07:28:34 -0400
committerBrad King <brad.king@kitware.com>2017-10-10 11:15:16 -0400
commit9e3ef40edb6eae36e822c129bec5d4ee9de0dd57 (patch)
treec739e929f90b5e6c4e26d4f5fea7f17d3772aefb /Utilities/cmcurl/lib/curl_setup.h
parent2fad0e20b6b2b4c3cfc177267cf9689658f50c23 (diff)
parentde7c21d677db1ddaeece03c19e13e448f4031511 (diff)
downloadcmake-9e3ef40edb6eae36e822c129bec5d4ee9de0dd57.tar.gz
Merge branch 'upstream-curl' into update-curl
* upstream-curl: curl 2017-10-04 (3ea76790)
Diffstat (limited to 'Utilities/cmcurl/lib/curl_setup.h')
-rw-r--r--Utilities/cmcurl/lib/curl_setup.h42
1 files changed, 23 insertions, 19 deletions
diff --git a/Utilities/cmcurl/lib/curl_setup.h b/Utilities/cmcurl/lib/curl_setup.h
index a6268adf23..5880dc0c41 100644
--- a/Utilities/cmcurl/lib/curl_setup.h
+++ b/Utilities/cmcurl/lib/curl_setup.h
@@ -7,7 +7,7 @@
* | (__| |_| | _ <| |___
* \___|\___/|_| \_\_____|
*
- * Copyright (C) 1998 - 2016, Daniel Stenberg, <daniel@haxx.se>, et al.
+ * Copyright (C) 1998 - 2017, 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
@@ -22,6 +22,10 @@
*
***************************************************************************/
+#if defined(BUILDING_LIBCURL) && !defined(CURL_NO_OLDIES)
+#define CURL_NO_OLDIES
+#endif
+
/*
* Define WIN32 when build target is Win32 API
*/
@@ -31,6 +35,17 @@
#define WIN32
#endif
+#ifdef WIN32
+/*
+ * Don't include unneeded stuff in Windows headers to avoid compiler
+ * warnings and macro clashes.
+ * Make sure to define this macro before including any Windows headers.
+ */
+# ifndef WIN32_LEAN_AND_MEAN
+# define WIN32_LEAN_AND_MEAN
+# endif
+#endif
+
/*
* Include configuration script results or hand-crafted
* configuration file for platforms which lack config tool.
@@ -130,14 +145,7 @@
#include <curl/curl.h>
-/*
- * Ensure that no one is using the old SIZEOF_CURL_OFF_T macro
- */
-
-#ifdef SIZEOF_CURL_OFF_T
-# error "SIZEOF_CURL_OFF_T shall not be defined!"
- Error Compilation_aborted_SIZEOF_CURL_OFF_T_shall_not_be_defined
-#endif
+#define CURL_SIZEOF_CURL_OFF_T SIZEOF_CURL_OFF_T
/*
* Disable other protocols when http is the only one desired.
@@ -174,9 +182,6 @@
# ifndef CURL_DISABLE_SMTP
# define CURL_DISABLE_SMTP
# endif
-# ifndef CURL_DISABLE_RTMP
-# define CURL_DISABLE_RTMP
-# endif
# ifndef CURL_DISABLE_GOPHER
# define CURL_DISABLE_GOPHER
# endif
@@ -195,7 +200,7 @@
/* ================================================================ */
/* No system header file shall be included in this file before this */
-/* point. The only allowed ones are those included from curlbuild.h */
+/* point. The only allowed ones are those included from curl/system.h */
/* ================================================================ */
/*
@@ -241,9 +246,6 @@
# if defined(_UNICODE) && !defined(UNICODE)
# define UNICODE
# endif
-# ifndef WIN32_LEAN_AND_MEAN
-# define WIN32_LEAN_AND_MEAN
-# endif
# include <windows.h>
# ifdef HAVE_WINSOCK2_H
# include <winsock2.h>
@@ -655,9 +657,8 @@ int netware_init(void);
#endif
#endif
-/* non-configure builds may define CURL_WANTS_CA_BUNDLE_ENV */
-#if defined(CURL_WANTS_CA_BUNDLE_ENV) && !defined(CURL_CA_BUNDLE)
-#define CURL_CA_BUNDLE getenv("CURL_CA_BUNDLE")
+#ifdef CURL_WANTS_CA_BUNDLE_ENV
+#error "No longer supported. Set CURLOPT_CAINFO at runtime instead."
#endif
/*
@@ -731,6 +732,7 @@ Therefore we specify it explicitly. https://github.com/curl/curl/pull/258
#if defined(WIN32) || defined(MSDOS)
#define FOPEN_READTEXT "rt"
#define FOPEN_WRITETEXT "wt"
+#define FOPEN_APPENDTEXT "at"
#elif defined(__CYGWIN__)
/* Cygwin has specific behavior we need to address when WIN32 is not defined.
https://cygwin.com/cygwin-ug-net/using-textbinary.html
@@ -740,9 +742,11 @@ endings either CRLF or LF so 't' is appropriate.
*/
#define FOPEN_READTEXT "rt"
#define FOPEN_WRITETEXT "w"
+#define FOPEN_APPENDTEXT "a"
#else
#define FOPEN_READTEXT "r"
#define FOPEN_WRITETEXT "w"
+#define FOPEN_APPENDTEXT "a"
#endif
/* WinSock destroys recv() buffer when send() failed.