From 5f31baecb09e38e7aa57a4125f6c470efb63aed0 Mon Sep 17 00:00:00 2001 From: Rom Walton Date: Mon, 4 Feb 2008 21:54:19 +0000 Subject: [PATCH] - WIN: Update libcurl to 7.18.0 curl/ svn path=/trunk/boinc/; revision=14671 --- checkin_notes | 6 ++ curl/include/curl/curl.h | 135 ++++++++++++++++++++++++------------ curl/include/curl/curlver.h | 15 ++-- 3 files changed, 105 insertions(+), 51 deletions(-) diff --git a/checkin_notes b/checkin_notes index 150ccb6fb2..d1e75f14e1 100644 --- a/checkin_notes +++ b/checkin_notes @@ -1105,3 +1105,9 @@ Rom Feb 3 2008 client/ http_curl.C, .h + +Rom Feb 3 2008 + - WIN: Update libcurl to 7.18.0 + + curl/ + diff --git a/curl/include/curl/curl.h b/curl/include/curl/curl.h index 6a7a71963a..f303d426c8 100644 --- a/curl/include/curl/curl.h +++ b/curl/include/curl/curl.h @@ -7,7 +7,7 @@ * | (__| |_| | _ <| |___ * \___|\___/|_| \_\_____| * - * Copyright (C) 1998 - 2007, Daniel Stenberg, , et al. + * Copyright (C) 1998 - 2008, Daniel Stenberg, , et al. * * This software is licensed as described in the file COPYING, which * you should have received as part of this distribution. The terms @@ -29,6 +29,14 @@ #include "curlver.h" /* the libcurl version defines */ +/* + * Define WIN32 when build target is Win32 API + */ + +#if (defined(_WIN32) || defined(__WIN32__)) && !defined(WIN32) +#define WIN32 +#endif + #include #include @@ -41,12 +49,42 @@ # include #endif /* defined (vms) */ -typedef void CURL; +#if defined(WIN32) && !defined(_WIN32_WCE) && !defined(__GNUC__) && \ + !defined(__CYGWIN__) || defined(__MINGW32__) +#if !(defined(_WINSOCKAPI_) || defined(_WINSOCK_H)) +/* The check above prevents the winsock2 inclusion if winsock.h already was + included, since they can't co-exist without problems */ +#include +#include +#endif +#else + +/* HP-UX systems version 9, 10 and 11 lack sys/select.h and so does oldish + libc5-based Linux systems. Only include it on system that are known to + require it! */ +#if defined(_AIX) || defined(__NOVELL_LIBC__) || defined(__NetBSD__) || defined(__minix) +#include +#endif + +#ifndef _WIN32_WCE +#include +#endif +#ifndef __WATCOMC__ +#include +#endif +#include +#endif + +#ifdef __BEOS__ +#include +#endif #ifdef __cplusplus extern "C" { #endif +typedef void CURL; + /* * Decorate exportable functions for Win32 DLL linking. * This avoids using a .def file for building libcurl.dll. @@ -139,38 +177,6 @@ extern "C" { #undef FILESIZEBITS #endif -#if defined(_WIN32) && !defined(WIN32) -/* Chris Lewis mentioned that he doesn't get WIN32 defined, only _WIN32 so we - make this adjustment to catch this. */ -#define WIN32 1 -#endif - -#if defined(WIN32) && !defined(_WIN32_WCE) && !defined(__GNUC__) && \ - !defined(__CYGWIN__) || defined(__MINGW32__) -#if !(defined(_WINSOCKAPI_) || defined(_WINSOCK_H)) -/* The check above prevents the winsock2 inclusion if winsock.h already was - included, since they can't co-exist without problems */ -#include -#include -#endif -#else - -/* HP-UX systems version 9, 10 and 11 lack sys/select.h and so does oldish - libc5-based Linux systems. Only include it on system that are known to - require it! */ -#if defined(_AIX) || defined(__NOVELL_LIBC__) || defined(__NetBSD__) || defined(__minix) -#include -#endif - -#ifndef _WIN32_WCE -#include -#endif -#ifndef __WATCOMC__ -#include -#endif -#include -#endif - #ifndef curl_socket_typedef /* socket typedef */ #ifdef WIN32 @@ -224,7 +230,9 @@ typedef int (*curl_progress_callback)(void *clientp, time for those who feel adventurous. */ #define CURL_MAX_WRITE_SIZE 16384 #endif - +/* This is a magic return code for the write callback that, when returned, + will signal libcurl to pause receving on the current transfer. */ +#define CURL_WRITEFUNC_PAUSE 0x10000001 typedef size_t (*curl_write_callback)(char *buffer, size_t size, size_t nitems, @@ -233,6 +241,13 @@ typedef size_t (*curl_write_callback)(char *buffer, /* This is a return code for the read callback that, when returned, will signal libcurl to immediately abort the current transfer. */ #define CURL_READFUNC_ABORT 0x10000000 +/* This is a return code for the read callback that, when returned, will + signal libcurl to pause sending data on the current transfer. */ +#define CURL_READFUNC_PAUSE 0x10000001 +typedef int (*curl_seek_callback)(void *instream, + curl_off_t offset, + int origin); /* 'whence' */ + typedef size_t (*curl_read_callback)(char *buffer, size_t size, size_t nitems, @@ -251,7 +266,9 @@ struct curl_sockaddr { int family; int socktype; int protocol; - socklen_t addrlen; + unsigned int addrlen; /* addrlen was a socklen_t type before 7.18.0 but it + turned really ugly and painful on the systems that + lack this type */ struct sockaddr addr; }; @@ -487,10 +504,15 @@ typedef CURLcode (*curl_ssl_ctx_callback)(CURL *curl, /* easy handle */ void *userptr); typedef enum { - CURLPROXY_HTTP = 0, - CURLPROXY_SOCKS4 = 4, - CURLPROXY_SOCKS5 = 5 -} curl_proxytype; + CURLPROXY_HTTP = 0, /* added in 7.10 */ + CURLPROXY_SOCKS4 = 4, /* support added in 7.15.2, enum existed already + in 7.10 */ + CURLPROXY_SOCKS5 = 5, /* added in 7.10 */ + CURLPROXY_SOCKS4A = 6, /* added in 7.18.0 */ + CURLPROXY_SOCKS5_HOSTNAME = 7 /* Use the SOCKS5 protocol but pass along the + host name rather than the IP address. added + in 7.18.0 */ +} curl_proxytype; /* this enum was added in 7.10 */ #define CURLAUTH_NONE 0 /* nothing */ #define CURLAUTH_BASIC (1<<0) /* Basic (default) */ @@ -935,7 +957,7 @@ typedef enum { CINIT(SHARE, OBJECTPOINT, 100), /* indicates type of proxy. accepted values are CURLPROXY_HTTP (default), - CURLPROXY_SOCKS4 and CURLPROXY_SOCKS5. */ + CURLPROXY_SOCKS4, CURLPROXY_SOCKS4A and CURLPROXY_SOCKS5. */ CINIT(PROXYTYPE, LONG, 101), /* Set the Accept-Encoding string. Use this to tell a server you would like @@ -1159,6 +1181,13 @@ typedef enum { /* POST volatile input fields. */ CINIT(COPYPOSTFIELDS, OBJECTPOINT, 165), + /* set transfer mode (;type=) when doing FTP via an HTTP proxy */ + CINIT(PROXY_TRANSFER_MODE, LONG, 166), + + /* Callback function for seeking in the input stream */ + CINIT(SEEKFUNCTION, FUNCTIONPOINT, 167), + CINIT(SEEKDATA, OBJECTPOINT, 168), + CURLOPT_LASTENTRY /* the last unused */ } CURLoption; @@ -1241,10 +1270,6 @@ typedef enum { CURL_TIMECOND_LAST } curl_TimeCond; -#ifdef __BEOS__ -#include -#endif - /* curl_strequal() and curl_strnequal() are subject for removal in a future libcurl, see lib/README.curlx for details */ @@ -1737,6 +1762,26 @@ CURL_EXTERN const char *curl_easy_strerror(CURLcode); */ CURL_EXTERN const char *curl_share_strerror(CURLSHcode); +/* + * NAME curl_easy_pause() + * + * DESCRIPTION + * + * The curl_easy_pause function pauses or unpauses transfers. Select the new + * state by setting the bitmask, use the convenience defines below. + * + */ +CURL_EXTERN CURLcode curl_easy_pause(CURL *handle, int bitmask); + +#define CURLPAUSE_RECV (1<<0) +#define CURLPAUSE_RECV_CONT (0) + +#define CURLPAUSE_SEND (1<<2) +#define CURLPAUSE_SEND_CONT (0) + +#define CURLPAUSE_ALL (CURLPAUSE_RECV|CURLPAUSE_SEND) +#define CURLPAUSE_CONT (CURLPAUSE_RECV_CONT|CURLPAUSE_SEND_CONT) + #ifdef __cplusplus } #endif diff --git a/curl/include/curl/curlver.h b/curl/include/curl/curlver.h index d79d551227..7bf572c704 100644 --- a/curl/include/curl/curlver.h +++ b/curl/include/curl/curlver.h @@ -7,7 +7,7 @@ * | (__| |_| | _ <| |___ * \___|\___/|_| \_\_____| * - * Copyright (C) 1998 - 2007, Daniel Stenberg, , et al. + * Copyright (C) 1998 - 2008, Daniel Stenberg, , et al. * * This software is licensed as described in the file COPYING, which * you should have received as part of this distribution. The terms @@ -26,15 +26,18 @@ /* This header file contains nothing but libcurl version info, generated by a script at release-time. This was made its own header file in 7.11.2 */ +/* This is the global package copyright */ +#define LIBCURL_COPYRIGHT "1996 - 2008 Daniel Stenberg, ." + /* This is the version number of the libcurl package from which this header file origins: */ -#define LIBCURL_VERSION "7.17.1" +#define LIBCURL_VERSION "7.18.0" /* The numeric version number is also available "in parts" by using these defines: */ #define LIBCURL_VERSION_MAJOR 7 -#define LIBCURL_VERSION_MINOR 17 -#define LIBCURL_VERSION_PATCH 1 +#define LIBCURL_VERSION_MINOR 18 +#define LIBCURL_VERSION_PATCH 0 /* This is the numeric version of the libcurl version number, meant for easier parsing and comparions by programs. The LIBCURL_VERSION_NUM define will @@ -51,7 +54,7 @@ and it is always a greater number in a more recent release. It makes comparisons with greater than and less than work. */ -#define LIBCURL_VERSION_NUM 0x071101 +#define LIBCURL_VERSION_NUM 0x071200 /* * This is the date and time when the full source package was created. The @@ -62,6 +65,6 @@ * * "Mon Feb 12 11:35:33 UTC 2007" */ -#define LIBCURL_TIMESTAMP "Mon Oct 29 14:49:22 UTC 2007" +#define LIBCURL_TIMESTAMP "Mon Jan 28 17:28:54 UTC 2008" #endif /* __CURL_CURLVER_H */