From ae1912cb0d494b48d514d937826c9fe83ec96c4d Mon Sep 17 00:00:00 2001 From: Daniel Stenberg Date: Wed, 29 Dec 1999 14:20:26 +0000 Subject: Initial revision --- include/README | 15 ++ include/curl/curl.beos-patch | 46 +++++ include/curl/curl.h | 434 +++++++++++++++++++++++++++++++++++++++++++ include/curl/getdate.h | 0 include/curl/mprintf.h | 93 ++++++++++ include/curl/stdcheaders.h | 53 ++++++ 6 files changed, 641 insertions(+) create mode 100644 include/README create mode 100644 include/curl/curl.beos-patch create mode 100644 include/curl/curl.h create mode 100644 include/curl/getdate.h create mode 100644 include/curl/mprintf.h create mode 100644 include/curl/stdcheaders.h (limited to 'include') diff --git a/include/README b/include/README new file mode 100644 index 000000000..fc9ea9137 --- /dev/null +++ b/include/README @@ -0,0 +1,15 @@ + _ _ ____ _ + ___| | | | _ \| | + / __| | | | |_) | | + | (__| |_| | _ <| |___ + \___|\___/|_| \_\_____| + +Include files for libcurl, external users. + +They're all placed in the curl subdirectory here for better fit in any kind +of environment. You should include files from here using... + + #include + +... style and point the compiler's include path to the directory holding the +curl subdirectory. It makes it more likely to survice future modifications. diff --git a/include/curl/curl.beos-patch b/include/curl/curl.beos-patch new file mode 100644 index 000000000..67bab368e --- /dev/null +++ b/include/curl/curl.beos-patch @@ -0,0 +1,46 @@ +Index: include/curl/curl.h +=================================================================== +RCS file: /cvs/curl/curl/include/curl/curl.h,v +retrieving revision 1.5 +diff -u -r1.5 curl.h +--- curl.h 1999/11/23 08:22:42 1.5 ++++ curl.h 1999/11/24 16:19:11 +@@ -365,9 +365,13 @@ + TIMECOND_LAST + } TimeCond; + ++#ifdef __BEOS__ ++#include ++#else + #ifndef __cplusplus /* (rabe) */ + typedef char bool; + #endif /* (rabe) */ ++#endif + + /********************************************************************** + * +Index: include/curl/setup.h +=================================================================== +RCS file: /cvs/curl/curl/include/curl/setup.h,v +retrieving revision 1.2 +diff -u -r1.2 setup.h +--- setup.h 1999/10/17 11:18:34 1.2 ++++ setup.h 1999/11/24 16:19:11 +@@ -139,10 +139,17 @@ + #define DOT_CHAR "_" + + #else ++#ifdef __BEOS__ ++#define sclose(x) closesocket(x) ++#define sread(x,y,z) recv(x,y,z,0) ++#define swrite(x,y,z) send(x,y,z,0) ++#define myalarm(x) alarm(x) ++#else + #define sclose(x) close(x) + #define sread(x,y,z) read(x,y,z) + #define swrite(x,y,z) write(x,y,z) + #define myalarm(x) alarm(x) ++#endif + + #define PATH_CHAR ":" + #define DIR_CHAR "/" diff --git a/include/curl/curl.h b/include/curl/curl.h new file mode 100644 index 000000000..a74625dbd --- /dev/null +++ b/include/curl/curl.h @@ -0,0 +1,434 @@ +#ifndef __URL_H +#define __URL_H +/***************************************************************************** + * _ _ ____ _ + * Project ___| | | | _ \| | + * / __| | | | |_) | | + * | (__| |_| | _ <| |___ + * \___|\___/|_| \_\_____| + * + * The contents of this file are subject to the Mozilla Public License + * Version 1.0 (the "License"); you may not use this file except in + * compliance with the License. You may obtain a copy of the License at + * http://www.mozilla.org/MPL/ + * + * Software distributed under the License is distributed on an "AS IS" + * basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See the + * License for the specific language governing rights and limitations + * under the License. + * + * The Original Code is Curl. + * + * The Initial Developer of the Original Code is Daniel Stenberg. + * + * Portions created by the Initial Developer are Copyright (C) 1998. + * All Rights Reserved. + * + * ------------------------------------------------------------ + * Main author: + * - Daniel Stenberg + * + * http://curl.haxx.nu + * + * $Source$ + * $Revision$ + * $Date$ + * $Author$ + * $State$ + * $Locker$ + * + * ------------------------------------------------------------ + ****************************************************************************/ +#ifndef TRUE +#define TRUE 1 +#endif +#ifndef FALSE +#define FALSE 0 +#endif + + +#define CONF_DEFAULT 0 +#define CONF_PROXY (1<<0) /* set if proxy is in use */ +#define CONF_PORT (1<<1) /* set if different port than protcol-defines is + used */ +#define CONF_HTTP (1<<2) /* http get */ +#define CONF_GOPHER (1<<3) /* gopher get */ +#define CONF_FTP (1<<4) /* ftp get (binary mode) */ +#define CONF_VERBOSE (1<<5) /* talk a lot */ + +#define CONF_TELNET (1<<6) + +#define CONF_HEADER (1<<8) /* throw the header out too */ +#define CONF_USERPWD (1<<9) /* user+passwd has been specified */ +#define CONF_NOPROGRESS (1<<10) /* shut off the progress meter (auto) + see also _MUTE */ +#define CONF_NOBODY (1<<11) /* use HEAD to get http document */ +#define CONF_FAILONERROR (1<<12) /* Makes urlget() fail with a return code + WITHOUT writing anything to the output if + a return code >=300 is returned from the + server. */ +#define CONF_RANGE (1<<13) /* Byte-range request, specified parameter is set */ +#define CONF_UPLOAD (1<<14) /* this is an upload, only supported for ftp + currently */ + +#define CONF_POST (1<<15) /* HTTP POST method */ + +/* When getting an FTP directory, this switch makes the listing only show file + names and nothing else. Makes machine parsing of the output possible. This + enforces the NLST command to the ftp server, compared to the otherwise + used: LIST. */ +#define CONF_FTPLISTONLY (1<<16) + +/* Set the referer string */ +#define CONF_REFERER (1<<17) +#define CONF_PROXYUSERPWD (1<<18) /* Proxy user+passwd has been specified */ + +/* For FTP, use PORT instead of PASV! */ +#define CONF_FTPPORT (1<<19) + +/* FTP: Append instead of overwrite on upload! */ +#define CONF_FTPAPPEND (1<<20) + +#define CONF_HTTPS (1<<21) /* Use SSLeay for encrypted communication */ + +#define CONF_NETRC (1<<22) /* read user+password from .netrc */ + +#define CONF_FOLLOWLOCATION (1<<23) /* get the page that the Location: tells + us to get */ + +#define CONF_FTPASCII (1<<24) /* use TYPE A for transfer */ + +#define CONF_HTTPPOST (1<<25) /* this causes a multipart/form-data + HTTP POST */ +#define CONF_NOPROT (1<<26) /* host name specified without protocol */ + +#define CONF_PUT (1<<27) /* PUT the input file */ + +#define CONF_MUTE (1<<28) /* force NOPROGRESS */ + +#define CONF_DICT (1<<29) /* DICT:// protocol */ + +#define CONF_FILE (1<<30) /* FILE:// protocol */ + +#define CONF_LDAP (1<<31) /* LDAP:// protocol */ + +#ifdef MULTIDOC +struct MoreDoc { + struct MoreDoc *next; /* next entry in the list */ + char *path; /* pointer to allocated path */ + FILE *store; /* where to put the doc */ +}; +#endif + +struct HttpHeader { + struct HttpHeader *next; /* next entry in the list */ + char *header; /* pointer to allocated line without newline */ +}; + +struct HttpPost { + struct HttpPost *next; /* next entry in the list */ + char *name; /* pointer to allocated name */ + char *contents; /* pointer to allocated data contents */ + char *contenttype; /* Content-Type */ + struct HttpPost *more; /* if one field name has more than one file, this + link should link to following files */ + long flags; /* as defined below */ +#define HTTPPOST_FILENAME (1<<0) /* specified content is a file name */ +}; + + +/* All possible error codes from this version of urlget(). Future versions + may return other values, stay prepared. */ + +typedef enum { + URG_OK = 0, + URG_UNSUPPORTED_PROTOCOL, + URG_FAILED_INIT, + URG_URL_MALFORMAT, + URG_URL_MALFORMAT_USER, + URG_COULDNT_RESOLVE_PROXY, + URG_COULDNT_RESOLVE_HOST, + URG_COULDNT_CONNECT, + URG_FTP_WEIRD_SERVER_REPLY, + URG_FTP_ACCESS_DENIED, + URG_FTP_USER_PASSWORD_INCORRECT, + URG_FTP_WEIRD_PASS_REPLY, + URG_FTP_WEIRD_USER_REPLY, + URG_FTP_WEIRD_PASV_REPLY, + URG_FTP_WEIRD_227_FORMAT, + URG_FTP_CANT_GET_HOST, + URG_FTP_CANT_RECONNECT, + URG_FTP_COULDNT_SET_BINARY, + URG_PARTIAL_FILE, + URG_FTP_COULDNT_RETR_FILE, + URG_FTP_WRITE_ERROR, + URG_FTP_QUOTE_ERROR, + URG_HTTP_NOT_FOUND, + URG_WRITE_ERROR, + + URG_MALFORMAT_USER, /* the user name is illegally specified */ + URG_FTP_COULDNT_STOR_FILE, /* failed FTP upload */ + URG_READ_ERROR, /* could open/read from file */ + + URG_OUT_OF_MEMORY, + URG_OPERATION_TIMEOUTED, /* the timeout time was reached */ + URG_FTP_COULDNT_SET_ASCII, /* TYPE A failed */ + + URG_FTP_PORT_FAILED, /* FTP PORT operation failed */ + + URG_FTP_COULDNT_USE_REST, /* the REST command failed */ + URG_FTP_COULDNT_GET_SIZE, /* the SIZE command failed */ + + URG_HTTP_RANGE_ERROR, /* The RANGE "command" didn't seem to work */ + + URG_HTTP_POST_ERROR, + + URG_SSL_CONNECT_ERROR, /* something was wrong when connecting with SSL */ + + URG_FTP_BAD_DOWNLOAD_RESUME, /* couldn't resume download */ + + URG_FILE_COULDNT_READ_FILE, + + URG_LDAP_CANNOT_BIND, + URG_LDAP_SEARCH_FAILED, + URG_LIBRARY_NOT_FOUND, + URG_FUNCTION_NOT_FOUND, + + URL_LAST +} UrgError; + +/* This is just to make older programs not break: */ +#define URG_FTP_PARTIAL_FILE URG_PARTIAL_FILE + +#define URGTAG_DONE -1 +#define URGTAG_LAST -1 +#define URGTAG_END -1 + +#define URLGET_ERROR_SIZE 256 + +/* maximum URL length we deal with */ +#define URL_MAX_LENGTH 4096 +#define URL_MAX_LENGTH_TXT "4095" + +/* name is uppercase URGTAG_, + type is one of the defined URGTYPE_ + number is unique identifier */ +#define T(name,type,number) URGTAG_ ## name = URGTYPE_ ## type + number + +/* long may be 32 or 64 bits, but we should never depend on anything else + but 32 */ +#define URGTYPE_LONG 0 +#define URGTYPE_OBJECTPOINT 10000 +#define URGTYPE_FUNCTIONPOINT 20000 + +typedef enum { + URGTAG_NOTHING, /* the first unused */ + + /* This is the FILE * the regular output should be written to. */ + T(FILE, OBJECTPOINT, 1), + + /* The full URL to get/put */ + T(URL, OBJECTPOINT, 2), + + /* Port number to connect to, if other than default. Specify the CONF_PORT + flag in the URGTAG_FLAGS to activate this */ + T(PORT, LONG, 3), + + /* Name of proxy to use. Specify the CONF_PROXY flag in the URGTAG_FLAGS to + activate this */ + T(PROXY, OBJECTPOINT, 4), + + /* Name and password to use when fetching. Specify the CONF_USERPWD flag in + the URGTAG_FLAGS to activate this */ + T(USERPWD, OBJECTPOINT, 5), + + /* Name and password to use with Proxy. Specify the CONF_PROXYUSERPWD + flag in the URGTAG_FLAGS to activate this */ + T(PROXYUSERPWD, OBJECTPOINT, 6), + + /* Range to get, specified as an ASCII string. Specify the CONF_RANGE flag + in the URGTAG_FLAGS to activate this */ + T(RANGE, OBJECTPOINT, 7), + + /* Configuration flags */ + T(FLAGS, LONG, 8), + + /* Specified file stream to upload from (use as input): */ + T(INFILE, OBJECTPOINT, 9), + + /* Buffer to receive error messages in, must be at least URLGET_ERROR_SIZE + bytes big. If this is not used, error messages go to stderr instead: */ + T(ERRORBUFFER, OBJECTPOINT, 10), + + /* Function that will be called to store the output (instead of fwrite). The + parameters will use fwrite() syntax, make sure to follow them. */ + T(WRITEFUNCTION, FUNCTIONPOINT, 11), + + /* Function that will be called to read the input (instead of fread). The + parameters will use fread() syntax, make sure to follow them. */ + T(READFUNCTION, FUNCTIONPOINT, 12), + + /* Time-out the read operation after this amount of seconds */ + T(TIMEOUT, LONG, 13), + + /* If the URGTAG_INFILE is used, this can be used to inform urlget about how + large the file being sent really is. That allows better error checking + and better verifies that the upload was succcessful. -1 means unknown + size. */ + T(INFILESIZE, LONG, 14), + + /* POST input fields. */ + T(POSTFIELDS, OBJECTPOINT, 15), + + /* Set the referer page (needed by some CGIs) */ + T(REFERER, OBJECTPOINT, 16), + + /* Set the FTP PORT string (interface name, named or numerical IP address) + Use i.e '-' to use default address. */ + T(FTPPORT, OBJECTPOINT, 17), + + /* Set the User-Agent string (examined by some CGIs) */ + T(USERAGENT, OBJECTPOINT, 18), + + /* If the download receives less than "low speed limit" bytes/second + * during "low speed time" seconds, the operations is aborted. + * You could i.e if you have a pretty high speed connection, abort if + * it is less than 2000 bytes/sec during 20 seconds. + */ + + /* Set the "low speed limit" */ + T(LOW_SPEED_LIMIT, LONG , 19), + + /* Set the "low speed time" */ + T(LOW_SPEED_TIME, LONG, 20), + + /* Set the continuation offset */ + T(RESUME_FROM, LONG, 21), + + /* Set cookie in request: */ + T(COOKIE, OBJECTPOINT, 22), + + /* This points to a linked list of headers, struct HttpHeader kind */ + T(HTTPHEADER, OBJECTPOINT, 23), + + /* This points to a linked list of post entries, struct HttpPost */ + T(HTTPPOST, OBJECTPOINT, 24), + + /* name of the file keeping your private SSL-certificate */ + T(SSLCERT, OBJECTPOINT, 25), + + /* password for the SSL-certificate */ + T(SSLCERTPASSWD, OBJECTPOINT, 26), + + /* send TYPE parameter? */ + T(CRLF, LONG, 27), + + /* send linked-list of QUOTE commands */ + T(QUOTE, OBJECTPOINT, 28), + + /* send FILE * to store headers to */ + T(WRITEHEADER, OBJECTPOINT, 29), + +#ifdef MULTIDOC + /* send linked list of MoreDoc structs */ + T(MOREDOCS, OBJECTPOINT, 30), +#endif + + /* point to a file to read the initial cookies from, also enables + "cookie awareness" */ + T(COOKIEFILE, OBJECTPOINT, 31), + + /* What version to specifly try to use. + 3 = SSLv3, 2 = SSLv2, all else makes it try v3 first then v2 */ + T(SSLVERSION, LONG, 32), + + /* What kind of HTTP time condition to use, see defines */ + T(TIMECONDITION, LONG, 33), + + /* Time to use with the above condition. Specified in number of seconds + since 1 Jan 1970 */ + T(TIMEVALUE, LONG, 34), + + /* HTTP request, for odd commands like DELETE, TRACE and others */ + /* OBSOLETE DEFINE, left for tradition only */ + T(HTTPREQUEST, OBJECTPOINT, 35), + + /* Custom request, for customizing the get command like + HTTP: DELETE, TRACE and others + FTP: to use a different list command + */ + T(CUSTOMREQUEST, OBJECTPOINT, 35), + + /* HTTP request, for odd commands like DELETE, TRACE and others */ + T(STDERR, OBJECTPOINT, 36), + + /* Progress mode sets alternative progress mode displays, the only + one defined today is 1 which makes the #-style progress bar. */ + T(PROGRESSMODE, LONG, 37), + + URGTAG_LASTENTRY /* the last unusued */ +} UrgTag; + +#define CURL_PROGRESS_STATS 0 /* default progress display */ +#define CURL_PROGRESS_BAR 1 + +typedef enum { + TIMECOND_NONE, + + TIMECOND_IFMODSINCE, + TIMECOND_IFUNMODSINCE, + TIMECOND_LASTMOD, + + TIMECOND_LAST +} TimeCond; + +#ifdef __BEOS__ +#include +#else +#ifndef __cplusplus /* (rabe) */ +typedef char bool; +#endif /* (rabe) */ +#endif + +/********************************************************************** + * + * >>> urlget() interface #defines changed in v5! <<< + * + * You enter parameters as tags. Tags are specified as a pair of parameters. + * The first parameter in a pair is the tag identifier, telling urlget what + * kind of tag it is, and the second is the data. The tags may come in any + * order but MUST ALWAYS BE TERMINATED with an ending URGTAG_DONE (which + * needs no data). + * + * _Very_ simple example: + * + * curl_urlget(URGTAG_URL, "http://www.fts.frontec.se/~dast/", URGTAG_DONE); + * + ***********************************************************************/ + +UrgError curl_urlget(UrgTag, ...); + +/* external form function */ +int curl_FormParse(char *string, + struct HttpPost **httppost, + struct HttpPost **last_post); + +/* Unix and Win32 getenv function call */ +char *curl_GetEnv(char *variable); + +/* returns ascii string of the libcurl version */ +char *curl_version(void); + +/* This is the version number */ +#define LIBCURL_VERSION "6.3.1" + +/* linked-list structure for QUOTE */ +struct curl_slist { + char *data; + struct curl_slist *next; +}; + +struct curl_slist *curl_slist_append(struct curl_slist *list, char *data); +void curl_slist_free_all(struct curl_slist *list); + +#endif /* __URLGET_H */ diff --git a/include/curl/getdate.h b/include/curl/getdate.h new file mode 100644 index 000000000..e69de29bb diff --git a/include/curl/mprintf.h b/include/curl/mprintf.h new file mode 100644 index 000000000..65c64f439 --- /dev/null +++ b/include/curl/mprintf.h @@ -0,0 +1,93 @@ +/************************************************************************* + * + * $Id$ + * + * The contents of this file are subject to the Mozilla Public License + * Version 1.0 (the "License"); you may not use this file except in + * compliance with the License. You may obtain a copy of the License at + * http://www.mozilla.org/MPL/ + * + * Software distributed under the License is distributed on an "AS IS" + * basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See + * the License for the specific language governing rights and limitations + * under the License. + * + * The Original Code is Triacle. + * + * The Initial Developers of the Original Code are Bjorn Reese and + * Daniel Stenberg. + * + * Portions created by Initial Developers are + * + * Copyright (C) 1998 Bjorn Reese and Daniel Stenberg. + * All Rights Reserved. + * + * Contributor(s): + * + ************************************************************************* + * + * Preliminary documentation + * + * printf conversions: + * + * conversion ::= '%%' | '%' [position] ( number | float | string ) + * position ::= digits '$' + * number ::= [number-flags] ( 'd' | 'i' | 'o' | 'x' | 'X' | 'u') + * number-flags ::= 'h' | 'l' | 'L' ... + * float ::= [float-flags] ( 'f' | 'e' | 'E' | 'g' | 'G' ) + * string ::= [string-flags] 's' + * string-flags ::= padding | '#' + * digits ::= (digit)+ + * digit ::= 0-9 + * + * c + * p + * n + * + * qualifiers + * + * - : left adjustment + * + : show sign + * SPACE : padding + * # : alterative + * . : precision + * * : width + * 0 : padding / size + * 1-9 : size + * h : short + * l : long + * ll : longlong + * L : long double + * Z : long / longlong + * q : longlong + * + ************************************************************************/ + +#ifndef H_MPRINTF +#define H_MPRINTF + +#include + +int mprintf(const char *format, ...); +int mfprintf(FILE *fd, const char *format, ...); +int msprintf(char *buffer, const char *format, ...); +int msnprintf(char *buffer, size_t maxlength, const char *format, ...); +int mvprintf(const char *format, va_list args); +int mvfprintf(FILE *fd, const char *format, va_list args); +int mvsprintf(char *buffer, const char *format, va_list args); +int mvsnprintf(char *buffer, size_t maxlength, const char *format, va_list args); +char *maprintf(const char *format, ...); +char *mvaprintf(const char *format, va_list args); + +#ifdef _MPRINTF_REPLACE +# define printf mprintf +# define fprintf mfprintf +# define sprintf msprintf +# define snprintf msnprintf +# define vprintf mvprintf +# define vfprintf mvfprintf +# define vsprintf mvsprintf +# define vsnprintf mvsnprintf +#endif + +#endif /* H_MPRINTF */ diff --git a/include/curl/stdcheaders.h b/include/curl/stdcheaders.h new file mode 100644 index 000000000..3027b86e9 --- /dev/null +++ b/include/curl/stdcheaders.h @@ -0,0 +1,53 @@ +#ifndef __STDC_HEADERS_H +#define __STDC_HEADERS_H +/***************************************************************************** + * _ _ ____ _ + * Project ___| | | | _ \| | + * / __| | | | |_) | | + * | (__| |_| | _ <| |___ + * \___|\___/|_| \_\_____| + * + * The contents of this file are subject to the Mozilla Public License + * Version 1.0 (the "License"); you may not use this file except in + * compliance with the License. You may obtain a copy of the License at + * http://www.mozilla.org/MPL/ + * + * Software distributed under the License is distributed on an "AS IS" + * basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See the + * License for the specific language governing rights and limitations + * under the License. + * + * The Original Code is Curl. + * + * The Initial Developer of the Original Code is Daniel Stenberg. + * + * Portions created by the Initial Developer are Copyright (C) 1998. + * All Rights Reserved. + * + * ------------------------------------------------------------ + * Main author: + * - Daniel Stenberg + * + * http://curl.haxx.nu + * + * $Source$ + * $Revision$ + * $Date$ + * $Author$ + * $State$ + * $Locker$ + * + * ------------------------------------------------------------ + ****************************************************************************/ + +#ifdef HAVE_SYS_TYPES_H +#include +#endif + +size_t fread (void *, size_t, size_t, FILE *); +size_t fwrite (const void *, size_t, size_t, FILE *); + +int strcasecmp(const char *, const char *); +int strncasecmp(const char *, const char *, size_t); + +#endif -- cgit v1.2.1 From d5e9c59b9fbb482ade1ca4b22616288dc396619e Mon Sep 17 00:00:00 2001 From: Daniel Stenberg Date: Mon, 10 Jan 2000 23:53:10 +0000 Subject: fixes --- include/curl/curl.beos-patch | 46 -------------------------------------------- include/curl/curl.h | 9 ++++++--- 2 files changed, 6 insertions(+), 49 deletions(-) delete mode 100644 include/curl/curl.beos-patch (limited to 'include') diff --git a/include/curl/curl.beos-patch b/include/curl/curl.beos-patch deleted file mode 100644 index 67bab368e..000000000 --- a/include/curl/curl.beos-patch +++ /dev/null @@ -1,46 +0,0 @@ -Index: include/curl/curl.h -=================================================================== -RCS file: /cvs/curl/curl/include/curl/curl.h,v -retrieving revision 1.5 -diff -u -r1.5 curl.h ---- curl.h 1999/11/23 08:22:42 1.5 -+++ curl.h 1999/11/24 16:19:11 -@@ -365,9 +365,13 @@ - TIMECOND_LAST - } TimeCond; - -+#ifdef __BEOS__ -+#include -+#else - #ifndef __cplusplus /* (rabe) */ - typedef char bool; - #endif /* (rabe) */ -+#endif - - /********************************************************************** - * -Index: include/curl/setup.h -=================================================================== -RCS file: /cvs/curl/curl/include/curl/setup.h,v -retrieving revision 1.2 -diff -u -r1.2 setup.h ---- setup.h 1999/10/17 11:18:34 1.2 -+++ setup.h 1999/11/24 16:19:11 -@@ -139,10 +139,17 @@ - #define DOT_CHAR "_" - - #else -+#ifdef __BEOS__ -+#define sclose(x) closesocket(x) -+#define sread(x,y,z) recv(x,y,z,0) -+#define swrite(x,y,z) send(x,y,z,0) -+#define myalarm(x) alarm(x) -+#else - #define sclose(x) close(x) - #define sread(x,y,z) read(x,y,z) - #define swrite(x,y,z) write(x,y,z) - #define myalarm(x) alarm(x) -+#endif - - #define PATH_CHAR ":" - #define DIR_CHAR "/" diff --git a/include/curl/curl.h b/include/curl/curl.h index a74625dbd..dbb39304f 100644 --- a/include/curl/curl.h +++ b/include/curl/curl.h @@ -357,14 +357,17 @@ typedef enum { HTTP: DELETE, TRACE and others FTP: to use a different list command */ - T(CUSTOMREQUEST, OBJECTPOINT, 35), + T(CUSTOMREQUEST, OBJECTPOINT, 36), /* HTTP request, for odd commands like DELETE, TRACE and others */ - T(STDERR, OBJECTPOINT, 36), + T(STDERR, OBJECTPOINT, 37), /* Progress mode sets alternative progress mode displays, the only one defined today is 1 which makes the #-style progress bar. */ - T(PROGRESSMODE, LONG, 37), + T(PROGRESSMODE, LONG, 38), + + /* send linked-list of post-transfer QUOTE commands */ + T(POSTQUOTE, OBJECTPOINT, 39), URGTAG_LASTENTRY /* the last unusued */ } UrgTag; -- cgit v1.2.1 From ce9c2e6d2f9d5eff7d3c97fb5c485089d39eaba6 Mon Sep 17 00:00:00 2001 From: Daniel Stenberg Date: Thu, 2 Mar 2000 23:07:25 +0000 Subject: Added the WRITEINFO tag --- include/curl/curl.h | 19 +++++++------------ 1 file changed, 7 insertions(+), 12 deletions(-) (limited to 'include') diff --git a/include/curl/curl.h b/include/curl/curl.h index dbb39304f..192c51f88 100644 --- a/include/curl/curl.h +++ b/include/curl/curl.h @@ -1,5 +1,5 @@ -#ifndef __URL_H -#define __URL_H +#ifndef __CURL_H +#define __CURL_H /***************************************************************************** * _ _ ____ _ * Project ___| | | | _ \| | @@ -112,14 +112,6 @@ #define CONF_LDAP (1<<31) /* LDAP:// protocol */ -#ifdef MULTIDOC -struct MoreDoc { - struct MoreDoc *next; /* next entry in the list */ - char *path; /* pointer to allocated path */ - FILE *store; /* where to put the doc */ -}; -#endif - struct HttpHeader { struct HttpHeader *next; /* next entry in the list */ char *header; /* pointer to allocated line without newline */ @@ -136,7 +128,6 @@ struct HttpPost { #define HTTPPOST_FILENAME (1<<0) /* specified content is a file name */ }; - /* All possible error codes from this version of urlget(). Future versions may return other values, stay prepared. */ @@ -369,6 +360,10 @@ typedef enum { /* send linked-list of post-transfer QUOTE commands */ T(POSTQUOTE, OBJECTPOINT, 39), + /* Pass a pointer to string of the output using full variable-replacement + as described elsewhere. */ + T(WRITEINFO, OBJECTPOINT, 40), + URGTAG_LASTENTRY /* the last unusued */ } UrgTag; @@ -423,7 +418,7 @@ char *curl_GetEnv(char *variable); char *curl_version(void); /* This is the version number */ -#define LIBCURL_VERSION "6.3.1" +#define LIBCURL_VERSION "6.5pre1" /* linked-list structure for QUOTE */ struct curl_slist { -- cgit v1.2.1 From d070bd9b93691800d712cefc5b23c2e86f9322a2 Mon Sep 17 00:00:00 2001 From: Daniel Stenberg Date: Thu, 2 Mar 2000 23:12:55 +0000 Subject: corrected a spelling mistake --- include/README | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'include') diff --git a/include/README b/include/README index fc9ea9137..ed2a7e54d 100644 --- a/include/README +++ b/include/README @@ -12,4 +12,4 @@ of environment. You should include files from here using... #include ... style and point the compiler's include path to the directory holding the -curl subdirectory. It makes it more likely to survice future modifications. +curl subdirectory. It makes it more likely to survive future modifications. -- cgit v1.2.1 From 90030a49c7facfefeca8157255f213197343c340 Mon Sep 17 00:00:00 2001 From: Daniel Stenberg Date: Tue, 14 Mar 2000 08:33:15 +0000 Subject: 6.5 cleanup commit --- include/curl/curl.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'include') diff --git a/include/curl/curl.h b/include/curl/curl.h index 192c51f88..6533a572a 100644 --- a/include/curl/curl.h +++ b/include/curl/curl.h @@ -418,7 +418,7 @@ char *curl_GetEnv(char *variable); char *curl_version(void); /* This is the version number */ -#define LIBCURL_VERSION "6.5pre1" +#define LIBCURL_VERSION "6.5" /* linked-list structure for QUOTE */ struct curl_slist { -- cgit v1.2.1 From 475869a61203cf3d3deb9a4788052a2c6221df94 Mon Sep 17 00:00:00 2001 From: Daniel Stenberg Date: Tue, 21 Mar 2000 15:37:13 +0000 Subject: 6.5.2 release commit --- include/curl/curl.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'include') diff --git a/include/curl/curl.h b/include/curl/curl.h index 6533a572a..8a27c3e73 100644 --- a/include/curl/curl.h +++ b/include/curl/curl.h @@ -418,7 +418,7 @@ char *curl_GetEnv(char *variable); char *curl_version(void); /* This is the version number */ -#define LIBCURL_VERSION "6.5" +#define LIBCURL_VERSION "6.5.2" /* linked-list structure for QUOTE */ struct curl_slist { -- cgit v1.2.1 From 96dde76b99897352aa3d0877a0b621a9e605733e Mon Sep 17 00:00:00 2001 From: Daniel Stenberg Date: Mon, 22 May 2000 14:12:12 +0000 Subject: moved here from the newlib branch --- include/curl/curl.h | 474 ++++++++++++++++++++++++++++++++++----------------- include/curl/easy.h | 46 +++++ include/curl/types.h | 45 +++++ 3 files changed, 404 insertions(+), 161 deletions(-) create mode 100644 include/curl/easy.h create mode 100644 include/curl/types.h (limited to 'include') diff --git a/include/curl/curl.h b/include/curl/curl.h index 8a27c3e73..4226df93b 100644 --- a/include/curl/curl.h +++ b/include/curl/curl.h @@ -1,5 +1,5 @@ -#ifndef __CURL_H -#define __CURL_H +#ifndef __CURL_CURL_H +#define __CURL_CURL_H /***************************************************************************** * _ _ ____ _ * Project ___| | | | _ \| | @@ -39,6 +39,25 @@ * * ------------------------------------------------------------ ****************************************************************************/ + +/* The include stuff here is mainly for time_t! */ +#ifdef vms +# include +# include +#else +# include +# if TIME_WITH_SYS_TIME +# include +# include +# else +# if HAVE_SYS_TIME_H +# include +# else +# include +# endif +# endif +#endif /* defined (vms) */ + #ifndef TRUE #define TRUE 1 #endif @@ -46,71 +65,8 @@ #define FALSE 0 #endif +#include -#define CONF_DEFAULT 0 -#define CONF_PROXY (1<<0) /* set if proxy is in use */ -#define CONF_PORT (1<<1) /* set if different port than protcol-defines is - used */ -#define CONF_HTTP (1<<2) /* http get */ -#define CONF_GOPHER (1<<3) /* gopher get */ -#define CONF_FTP (1<<4) /* ftp get (binary mode) */ -#define CONF_VERBOSE (1<<5) /* talk a lot */ - -#define CONF_TELNET (1<<6) - -#define CONF_HEADER (1<<8) /* throw the header out too */ -#define CONF_USERPWD (1<<9) /* user+passwd has been specified */ -#define CONF_NOPROGRESS (1<<10) /* shut off the progress meter (auto) - see also _MUTE */ -#define CONF_NOBODY (1<<11) /* use HEAD to get http document */ -#define CONF_FAILONERROR (1<<12) /* Makes urlget() fail with a return code - WITHOUT writing anything to the output if - a return code >=300 is returned from the - server. */ -#define CONF_RANGE (1<<13) /* Byte-range request, specified parameter is set */ -#define CONF_UPLOAD (1<<14) /* this is an upload, only supported for ftp - currently */ - -#define CONF_POST (1<<15) /* HTTP POST method */ - -/* When getting an FTP directory, this switch makes the listing only show file - names and nothing else. Makes machine parsing of the output possible. This - enforces the NLST command to the ftp server, compared to the otherwise - used: LIST. */ -#define CONF_FTPLISTONLY (1<<16) - -/* Set the referer string */ -#define CONF_REFERER (1<<17) -#define CONF_PROXYUSERPWD (1<<18) /* Proxy user+passwd has been specified */ - -/* For FTP, use PORT instead of PASV! */ -#define CONF_FTPPORT (1<<19) - -/* FTP: Append instead of overwrite on upload! */ -#define CONF_FTPAPPEND (1<<20) - -#define CONF_HTTPS (1<<21) /* Use SSLeay for encrypted communication */ - -#define CONF_NETRC (1<<22) /* read user+password from .netrc */ - -#define CONF_FOLLOWLOCATION (1<<23) /* get the page that the Location: tells - us to get */ - -#define CONF_FTPASCII (1<<24) /* use TYPE A for transfer */ - -#define CONF_HTTPPOST (1<<25) /* this causes a multipart/form-data - HTTP POST */ -#define CONF_NOPROT (1<<26) /* host name specified without protocol */ - -#define CONF_PUT (1<<27) /* PUT the input file */ - -#define CONF_MUTE (1<<28) /* force NOPROGRESS */ - -#define CONF_DICT (1<<29) /* DICT:// protocol */ - -#define CONF_FILE (1<<30) /* FILE:// protocol */ - -#define CONF_LDAP (1<<31) /* LDAP:// protocol */ struct HttpHeader { struct HttpHeader *next; /* next entry in the list */ @@ -132,68 +88,69 @@ struct HttpPost { may return other values, stay prepared. */ typedef enum { - URG_OK = 0, - URG_UNSUPPORTED_PROTOCOL, - URG_FAILED_INIT, - URG_URL_MALFORMAT, - URG_URL_MALFORMAT_USER, - URG_COULDNT_RESOLVE_PROXY, - URG_COULDNT_RESOLVE_HOST, - URG_COULDNT_CONNECT, - URG_FTP_WEIRD_SERVER_REPLY, - URG_FTP_ACCESS_DENIED, - URG_FTP_USER_PASSWORD_INCORRECT, - URG_FTP_WEIRD_PASS_REPLY, - URG_FTP_WEIRD_USER_REPLY, - URG_FTP_WEIRD_PASV_REPLY, - URG_FTP_WEIRD_227_FORMAT, - URG_FTP_CANT_GET_HOST, - URG_FTP_CANT_RECONNECT, - URG_FTP_COULDNT_SET_BINARY, - URG_PARTIAL_FILE, - URG_FTP_COULDNT_RETR_FILE, - URG_FTP_WRITE_ERROR, - URG_FTP_QUOTE_ERROR, - URG_HTTP_NOT_FOUND, - URG_WRITE_ERROR, - - URG_MALFORMAT_USER, /* the user name is illegally specified */ - URG_FTP_COULDNT_STOR_FILE, /* failed FTP upload */ - URG_READ_ERROR, /* could open/read from file */ - - URG_OUT_OF_MEMORY, - URG_OPERATION_TIMEOUTED, /* the timeout time was reached */ - URG_FTP_COULDNT_SET_ASCII, /* TYPE A failed */ - - URG_FTP_PORT_FAILED, /* FTP PORT operation failed */ - - URG_FTP_COULDNT_USE_REST, /* the REST command failed */ - URG_FTP_COULDNT_GET_SIZE, /* the SIZE command failed */ - - URG_HTTP_RANGE_ERROR, /* The RANGE "command" didn't seem to work */ - - URG_HTTP_POST_ERROR, - - URG_SSL_CONNECT_ERROR, /* something was wrong when connecting with SSL */ - - URG_FTP_BAD_DOWNLOAD_RESUME, /* couldn't resume download */ - - URG_FILE_COULDNT_READ_FILE, - - URG_LDAP_CANNOT_BIND, - URG_LDAP_SEARCH_FAILED, - URG_LIBRARY_NOT_FOUND, - URG_FUNCTION_NOT_FOUND, - - URL_LAST -} UrgError; + CURLE_OK = 0, + CURLE_UNSUPPORTED_PROTOCOL, + CURLE_FAILED_INIT, + CURLE_URL_MALFORMAT, + CURLE_URL_MALFORMAT_USER, + CURLE_COULDNT_RESOLVE_PROXY, + CURLE_COULDNT_RESOLVE_HOST, + CURLE_COULDNT_CONNECT, + CURLE_FTP_WEIRD_SERVER_REPLY, + CURLE_FTP_ACCESS_DENIED, + CURLE_FTP_USER_PASSWORD_INCORRECT, + CURLE_FTP_WEIRD_PASS_REPLY, + CURLE_FTP_WEIRD_USER_REPLY, + CURLE_FTP_WEIRD_PASV_REPLY, + CURLE_FTP_WEIRD_227_FORMAT, + CURLE_FTP_CANT_GET_HOST, + CURLE_FTP_CANT_RECONNECT, + CURLE_FTP_COULDNT_SET_BINARY, + CURLE_PARTIAL_FILE, + CURLE_FTP_COULDNT_RETR_FILE, + CURLE_FTP_WRITE_ERROR, + CURLE_FTP_QUOTE_ERROR, + CURLE_HTTP_NOT_FOUND, + CURLE_WRITE_ERROR, + + CURLE_MALFORMAT_USER, /* the user name is illegally specified */ + CURLE_FTP_COULDNT_STOR_FILE, /* failed FTP upload */ + CURLE_READ_ERROR, /* could open/read from file */ + + CURLE_OUT_OF_MEMORY, + CURLE_OPERATION_TIMEOUTED, /* the timeout time was reached */ + CURLE_FTP_COULDNT_SET_ASCII, /* TYPE A failed */ + + CURLE_FTP_PORT_FAILED, /* FTP PORT operation failed */ + + CURLE_FTP_COULDNT_USE_REST, /* the REST command failed */ + CURLE_FTP_COULDNT_GET_SIZE, /* the SIZE command failed */ + + CURLE_HTTP_RANGE_ERROR, /* The RANGE "command" didn't seem to work */ + + CURLE_HTTP_POST_ERROR, + + CURLE_SSL_CONNECT_ERROR, /* something was wrong when connecting with SSL */ + + CURLE_FTP_BAD_DOWNLOAD_RESUME, /* couldn't resume download */ + + CURLE_FILE_COULDNT_READ_FILE, + + CURLE_LDAP_CANNOT_BIND, + CURLE_LDAP_SEARCH_FAILED, + CURLE_LIBRARY_NOT_FOUND, + CURLE_FUNCTION_NOT_FOUND, + + CURLE_ABORTED_BY_CALLBACK, -/* This is just to make older programs not break: */ -#define URG_FTP_PARTIAL_FILE URG_PARTIAL_FILE + CURLE_BAD_FUNCTION_ARGUMENT, + CURLE_BAD_CALLING_ORDER, -#define URGTAG_DONE -1 -#define URGTAG_LAST -1 -#define URGTAG_END -1 + CURL_LAST +} CURLcode; + +/* This is just to make older programs not break: */ +#define CURLE_FTP_PARTIAL_FILE CURLE_PARTIAL_FILE #define URLGET_ERROR_SIZE 256 @@ -201,19 +158,19 @@ typedef enum { #define URL_MAX_LENGTH 4096 #define URL_MAX_LENGTH_TXT "4095" -/* name is uppercase URGTAG_, - type is one of the defined URGTYPE_ +/* name is uppercase CURLOPT_, + type is one of the defined CURLOPTTYPE_ number is unique identifier */ -#define T(name,type,number) URGTAG_ ## name = URGTYPE_ ## type + number +#define T(name,type,number) CURLOPT_ ## name = CURLOPTTYPE_ ## type + number /* long may be 32 or 64 bits, but we should never depend on anything else but 32 */ -#define URGTYPE_LONG 0 -#define URGTYPE_OBJECTPOINT 10000 -#define URGTYPE_FUNCTIONPOINT 20000 +#define CURLOPTTYPE_LONG 0 +#define CURLOPTTYPE_OBJECTPOINT 10000 +#define CURLOPTTYPE_FUNCTIONPOINT 20000 typedef enum { - URGTAG_NOTHING, /* the first unused */ + T(NOTHING, LONG, 0), /********* the first one is unused ************/ /* This is the FILE * the regular output should be written to. */ T(FILE, OBJECTPOINT, 1), @@ -222,28 +179,29 @@ typedef enum { T(URL, OBJECTPOINT, 2), /* Port number to connect to, if other than default. Specify the CONF_PORT - flag in the URGTAG_FLAGS to activate this */ + flag in the CURLOPT_FLAGS to activate this */ T(PORT, LONG, 3), - /* Name of proxy to use. Specify the CONF_PROXY flag in the URGTAG_FLAGS to + /* Name of proxy to use. Specify the CONF_PROXY flag in the CURLOPT_FLAGS to activate this */ T(PROXY, OBJECTPOINT, 4), /* Name and password to use when fetching. Specify the CONF_USERPWD flag in - the URGTAG_FLAGS to activate this */ + the CURLOPT_FLAGS to activate this */ T(USERPWD, OBJECTPOINT, 5), /* Name and password to use with Proxy. Specify the CONF_PROXYUSERPWD - flag in the URGTAG_FLAGS to activate this */ + flag in the CURLOPT_FLAGS to activate this */ T(PROXYUSERPWD, OBJECTPOINT, 6), /* Range to get, specified as an ASCII string. Specify the CONF_RANGE flag - in the URGTAG_FLAGS to activate this */ + in the CURLOPT_FLAGS to activate this */ T(RANGE, OBJECTPOINT, 7), +#if 0 /* Configuration flags */ T(FLAGS, LONG, 8), - +#endif /* Specified file stream to upload from (use as input): */ T(INFILE, OBJECTPOINT, 9), @@ -262,7 +220,7 @@ typedef enum { /* Time-out the read operation after this amount of seconds */ T(TIMEOUT, LONG, 13), - /* If the URGTAG_INFILE is used, this can be used to inform urlget about how + /* If the CURLOPT_INFILE is used, this can be used to inform urlget about how large the file being sent really is. That allows better error checking and better verifies that the upload was succcessful. -1 means unknown size. */ @@ -364,8 +322,25 @@ typedef enum { as described elsewhere. */ T(WRITEINFO, OBJECTPOINT, 40), - URGTAG_LASTENTRY /* the last unusued */ -} UrgTag; + /* Previous FLAG bits */ + T(VERBOSE, LONG, 41), /* talk a lot */ + T(HEADER, LONG, 42), /* throw the header out too */ + T(NOPROGRESS, LONG, 43), /* shut off the progress meter */ + T(NOBODY, LONG, 44), /* use HEAD to get http document */ + T(FAILONERROR, LONG, 45), /* no output on http error codes >= 300 */ + T(UPLOAD, LONG, 46), /* this is an upload */ + T(POST, LONG, 47), /* HTTP POST method */ + T(FTPLISTONLY, LONG, 48), /* Use NLST when listing ftp dir */ + + T(FTPAPPEND, LONG, 50), /* Append instead of overwrite on upload! */ + T(NETRC, LONG, 51), /* read user+password from .netrc */ + T(FOLLOWLOCATION, LONG, 52), /* use Location: Luke! */ + T(FTPASCII, LONG, 53), /* use TYPE A for transfer */ + T(PUT, LONG, 54), /* PUT the input file */ + T(MUTE, LONG, 55), /* force NOPROGRESS */ + + CURLOPT_LASTENTRY /* the last unusued */ +} CURLoption; #define CURL_PROGRESS_STATS 0 /* default progress display */ #define CURL_PROGRESS_BAR 1 @@ -388,23 +363,11 @@ typedef char bool; #endif /* (rabe) */ #endif -/********************************************************************** - * - * >>> urlget() interface #defines changed in v5! <<< - * - * You enter parameters as tags. Tags are specified as a pair of parameters. - * The first parameter in a pair is the tag identifier, telling urlget what - * kind of tag it is, and the second is the data. The tags may come in any - * order but MUST ALWAYS BE TERMINATED with an ending URGTAG_DONE (which - * needs no data). - * - * _Very_ simple example: - * - * curl_urlget(URGTAG_URL, "http://www.fts.frontec.se/~dast/", URGTAG_DONE); - * - ***********************************************************************/ - +#if 0 +/* At last, I stand here in front of you today and can officially proclaim + this function prototype as history... 17th of May, 2000 */ UrgError curl_urlget(UrgTag, ...); +#endif /* external form function */ int curl_FormParse(char *string, @@ -418,9 +381,10 @@ char *curl_GetEnv(char *variable); char *curl_version(void); /* This is the version number */ -#define LIBCURL_VERSION "6.5.2" +#define LIBCURL_VERSION "7.0beta" +#define LIBCURL_VERSION_NUM 0x070000 -/* linked-list structure for QUOTE */ +/* linked-list structure for the CURLOPT_QUOTE option */ struct curl_slist { char *data; struct curl_slist *next; @@ -429,4 +393,192 @@ struct curl_slist { struct curl_slist *curl_slist_append(struct curl_slist *list, char *data); void curl_slist_free_all(struct curl_slist *list); -#endif /* __URLGET_H */ +/* + * NAME curl_init() + * + * DESCRIPTION + * + * Inits libcurl globally. This must be used before any libcurl calls can + * be used. This may install global plug-ins or whatever. (This does not + * do winsock inits in Windows.) + * + * EXAMPLE + * + * curl_init(); + * + */ +CURLcode curl_init(void); + +/* + * NAME curl_init() + * + * DESCRIPTION + * + * Frees libcurl globally. This must be used after all libcurl calls have + * been used. This may remove global plug-ins or whatever. (This does not + * do winsock cleanups in Windows.) + * + * EXAMPLE + * + * curl_free(curl); + * + */ +void curl_free(void); + +/* + * NAME curl_open() + * + * DESCRIPTION + * + * Opens a general curl session. It does not try to connect or do anything + * on the network because of this call. The specified URL is only required + * to enable curl to figure out what protocol to "activate". + * + * A session should be looked upon as a series of requests to a single host. A + * session interacts with one host only, using one single protocol. + * + * The URL is not required. If set to "" or NULL, it can still be set later + * using the curl_setopt() function. If the curl_connect() function is called + * without the URL being known, it will return error. + * + * EXAMPLE + * + * CURLcode result; + * CURL *curl; + * result = curl_open(&curl, "http://curl.haxx.nu/libcurl/"); + * if(result != CURL_OK) { + * return result; + * } + * */ +CURLcode curl_open(CURL **curl, char *url); + +/* + * NAME curl_setopt() + * + * DESCRIPTION + * + * Sets a particular option to the specified value. + * + * EXAMPLE + * + * CURL curl; + * curl_setopt(curl, CURL_HTTP_FOLLOW_LOCATION, TRUE); + */ +CURLcode curl_setopt(CURL *handle, CURLoption option, ...); + +/* + * NAME curl_close() + * + * DESCRIPTION + * + * Closes a session previously opened with curl_open() + * + * EXAMPLE + * + * CURL *curl; + * CURLcode result; + * + * result = curl_close(curl); + */ +CURLcode curl_close(CURL *curl); /* the opposite of curl_open() */ + +CURLcode curl_read(CURLconnect *c_conn, char *buf, size_t buffersize, + size_t *n); +CURLcode curl_write(CURLconnect *c_conn, char *buf, size_t amount, + size_t *n); + +/* + * NAME curl_connect() + * + * DESCRIPTION + * + * Connects to the peer server and performs the initial setup. This function + * writes a connect handle to its second argument that is a unique handle for + * this connect. This allows multiple connects from the same handle returned + * by curl_open(). + * + * EXAMPLE + * + * CURLCode result; + * CURL curl; + * CURLconnect connect; + * result = curl_connect(curl, &connect); + */ + +CURLcode curl_connect(CURL *curl, CURLconnect **in_connect); + +/* + * NAME curl_do() + * + * DESCRIPTION + * + * (Note: May 3rd 2000: this function does not currently allow you to + * specify a document, it will use the one set previously) + * + * This function asks for the particular document, file or resource that + * resides on the server we have connected to. You may specify a full URL, + * just an absolute path or even a relative path. That means, if you're just + * getting one file from the remote site, you can use the same URL as input + * for both curl_open() as well as for this function. + * + * In the even there is a host name, port number, user name or password parts + * in the URL, you can use the 'flags' argument to ignore them completely, or + * at your choice, make the function fail if you're trying to get a URL from + * different host than you connected to with curl_connect(). + * + * You can only get one document at a time using the same connection. When one + * document has been received you can although request again. + * + * When the transfer is done, curl_done() MUST be called. + * + * EXAMPLE + * + * CURLCode result; + * char *url; + * CURLconnect *connect; + * result = curl_do(connect, url, CURL_DO_NONE); */ +CURLcode curl_do(CURLconnect *in_conn); + +/* + * NAME curl_done() + * + * DESCRIPTION + * + * When the transfer following a curl_do() call is done, this function should + * get called. + * + * EXAMPLE + * + * CURLCode result; + * char *url; + * CURLconnect *connect; + * result = curl_done(connect); */ +CURLcode curl_done(CURLconnect *connect); + +/* + * NAME curl_disconnect() + * + * DESCRIPTION + * + * Disconnects from the peer server and performs connection cleanup. + * + * EXAMPLE + * + * CURLcode result; + * CURLconnect *connect; + * result = curl_disconnect(connect); */ +CURLcode curl_disconnect(CURLconnect *connect); + +/* + * NAME curl_getdate() + * + * DESCRIPTION + * + * Returns the time, in seconds since 1 Jan 1970 of the time string given in + * the first argument. The time argument in the second parameter is for cases + * where the specified time is relative now, like 'two weeks' or 'tomorrow' + * etc. + */ +time_t curl_getdate(const char *p, const time_t *now); + +#endif /* __CURL_CURL_H */ diff --git a/include/curl/easy.h b/include/curl/easy.h new file mode 100644 index 000000000..687696c2c --- /dev/null +++ b/include/curl/easy.h @@ -0,0 +1,46 @@ +#ifndef __CURL_EASY_H +#define __CURL_EASY_H +/***************************************************************************** + * _ _ ____ _ + * Project ___| | | | _ \| | + * / __| | | | |_) | | + * | (__| |_| | _ <| |___ + * \___|\___/|_| \_\_____| + * + * The contents of this file are subject to the Mozilla Public License + * Version 1.0 (the "License"); you may not use this file except in + * compliance with the License. You may obtain a copy of the License at + * http://www.mozilla.org/MPL/ + * + * Software distributed under the License is distributed on an "AS IS" + * basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See the + * License for the specific language governing rights and limitations + * under the License. + * + * The Original Code is Curl. + * + * The Initial Developer of the Original Code is Daniel Stenberg. + * + * Portions created by the Initial Developer are Copyright (C) 1998. + * All Rights Reserved. + * + * ------------------------------------------------------------ + * Main author: + * - Daniel Stenberg + * + * http://curl.haxx.nu + * + * $Source$ + * $Revision$ + * $Date$ + * $Author$ + * $State$ + * $Locker$ + * + * ------------------------------------------------------------ + ****************************************************************************/ +CURL *curl_easy_init(void); +CURLcode curl_easy_setopt(CURL *curl, CURLoption option, ...); +CURLcode curl_easy_perform(CURL *curl); +void curl_easy_cleanup(CURL *curl); +#endif diff --git a/include/curl/types.h b/include/curl/types.h new file mode 100644 index 000000000..15f7067e4 --- /dev/null +++ b/include/curl/types.h @@ -0,0 +1,45 @@ +#ifndef __CURL_TYPES_H +#define __CURL_TYPES_H +/***************************************************************************** + * _ _ ____ _ + * Project ___| | | | _ \| | + * / __| | | | |_) | | + * | (__| |_| | _ <| |___ + * \___|\___/|_| \_\_____| + * + * The contents of this file are subject to the Mozilla Public License + * Version 1.0 (the "License"); you may not use this file except in + * compliance with the License. You may obtain a copy of the License at + * http://www.mozilla.org/MPL/ + * + * Software distributed under the License is distributed on an "AS IS" + * basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See the + * License for the specific language governing rights and limitations + * under the License. + * + * The Original Code is Curl. + * + * The Initial Developer of the Original Code is Daniel Stenberg. + * + * Portions created by the Initial Developer are Copyright (C) 1998. + * All Rights Reserved. + * + * ------------------------------------------------------------ + * Main author: + * - Daniel Stenberg + * + * http://curl.haxx.nu + * + * $Source$ + * $Revision$ + * $Date$ + * $Author$ + * $State$ + * $Locker$ + * + * ------------------------------------------------------------ + ****************************************************************************/ +typedef void CURL; +typedef void CURLconnect; + +#endif /* __CURL_TYPES_H */ -- cgit v1.2.1 From 98e5d82a349b3eb5802ccfc1e0757afd1fec6b84 Mon Sep 17 00:00:00 2001 From: Daniel Stenberg Date: Mon, 22 May 2000 14:13:05 +0000 Subject: unused --- include/curl/getdate.h | 0 1 file changed, 0 insertions(+), 0 deletions(-) delete mode 100644 include/curl/getdate.h (limited to 'include') diff --git a/include/curl/getdate.h b/include/curl/getdate.h deleted file mode 100644 index e69de29bb..000000000 -- cgit v1.2.1 From fb3a5ab6ee46f19007024645d3f7b67339face31 Mon Sep 17 00:00:00 2001 From: Daniel Stenberg Date: Fri, 26 May 2000 08:12:14 +0000 Subject: fixed the CURL_ERROR_SIZE and renamed a urlget() leftover --- include/curl/curl.h | 22 +++++++++++----------- 1 file changed, 11 insertions(+), 11 deletions(-) (limited to 'include') diff --git a/include/curl/curl.h b/include/curl/curl.h index 4226df93b..813636660 100644 --- a/include/curl/curl.h +++ b/include/curl/curl.h @@ -152,7 +152,7 @@ typedef enum { /* This is just to make older programs not break: */ #define CURLE_FTP_PARTIAL_FILE CURLE_PARTIAL_FILE -#define URLGET_ERROR_SIZE 256 +#define CURL_ERROR_SIZE 256 /* maximum URL length we deal with */ #define URL_MAX_LENGTH 4096 @@ -205,25 +205,25 @@ typedef enum { /* Specified file stream to upload from (use as input): */ T(INFILE, OBJECTPOINT, 9), - /* Buffer to receive error messages in, must be at least URLGET_ERROR_SIZE - bytes big. If this is not used, error messages go to stderr instead: */ + /* Buffer to receive error messages in, must be at least CURL_ERROR_SIZE + * bytes big. If this is not used, error messages go to stderr instead: */ T(ERRORBUFFER, OBJECTPOINT, 10), /* Function that will be called to store the output (instead of fwrite). The - parameters will use fwrite() syntax, make sure to follow them. */ + * parameters will use fwrite() syntax, make sure to follow them. */ T(WRITEFUNCTION, FUNCTIONPOINT, 11), /* Function that will be called to read the input (instead of fread). The - parameters will use fread() syntax, make sure to follow them. */ + * parameters will use fread() syntax, make sure to follow them. */ T(READFUNCTION, FUNCTIONPOINT, 12), /* Time-out the read operation after this amount of seconds */ T(TIMEOUT, LONG, 13), - /* If the CURLOPT_INFILE is used, this can be used to inform urlget about how - large the file being sent really is. That allows better error checking - and better verifies that the upload was succcessful. -1 means unknown - size. */ + /* If the CURLOPT_INFILE is used, this can be used to inform libcurl about + * how large the file being sent really is. That allows better error + * checking and better verifies that the upload was succcessful. -1 means + * unknown size. */ T(INFILESIZE, LONG, 14), /* POST input fields. */ @@ -381,8 +381,8 @@ char *curl_GetEnv(char *variable); char *curl_version(void); /* This is the version number */ -#define LIBCURL_VERSION "7.0beta" -#define LIBCURL_VERSION_NUM 0x070000 +#define LIBCURL_VERSION "7.0.1beta" +#define LIBCURL_VERSION_NUM 0x070001 /* linked-list structure for the CURLOPT_QUOTE option */ struct curl_slist { -- cgit v1.2.1 From aedfcaa168173ecedc1838b72a599e20d149b1cb Mon Sep 17 00:00:00 2001 From: Daniel Stenberg Date: Thu, 8 Jun 2000 15:13:03 +0000 Subject: lower casing getenv and formparse added the progress function callback and data pointer added the callback typedefs --- include/curl/curl.h | 40 +++++++++++++++++++++++++++++----------- 1 file changed, 29 insertions(+), 11 deletions(-) (limited to 'include') diff --git a/include/curl/curl.h b/include/curl/curl.h index 813636660..4e5dbbb7e 100644 --- a/include/curl/curl.h +++ b/include/curl/curl.h @@ -67,12 +67,6 @@ #include - -struct HttpHeader { - struct HttpHeader *next; /* next entry in the list */ - char *header; /* pointer to allocated line without newline */ -}; - struct HttpPost { struct HttpPost *next; /* next entry in the list */ char *name; /* pointer to allocated name */ @@ -84,6 +78,22 @@ struct HttpPost { #define HTTPPOST_FILENAME (1<<0) /* specified content is a file name */ }; +typedef int (*curl_progress_callback)(void *clientp, + size_t dltotal, + size_t dlnow, + size_t ultotal, + size_t ulnow); + +typedef size_t (*curl_write_callback)(char *buffer, + size_t size, + size_t nitems, + FILE *outstream); + +typedef size_t (*curl_read_callback)(char *buffer, + size_t size, + size_t nitems, + FILE *instream); + /* All possible error codes from this version of urlget(). Future versions may return other values, stay prepared. */ @@ -339,6 +349,13 @@ typedef enum { T(PUT, LONG, 54), /* PUT the input file */ T(MUTE, LONG, 55), /* force NOPROGRESS */ + /* Function that will be called instead of the internal progress display + * function. This function should be defined as the curl_progress_callback + * prototype defines. */ + T(PROGRESSFUNCTION, FUNCTIONPOINT, 56), + + T(PROGRESSDATA, OBJECTPOINT, 57), + CURLOPT_LASTENTRY /* the last unusued */ } CURLoption; @@ -370,19 +387,20 @@ UrgError curl_urlget(UrgTag, ...); #endif /* external form function */ -int curl_FormParse(char *string, +int curl_formparse(char *string, struct HttpPost **httppost, struct HttpPost **last_post); -/* Unix and Win32 getenv function call */ -char *curl_GetEnv(char *variable); +/* Unix and Win32 getenv function call, this returns a malloc()'ed string that + MUST be free()ed after usage is complete. */ +char *curl_getenv(char *variable); /* returns ascii string of the libcurl version */ char *curl_version(void); /* This is the version number */ -#define LIBCURL_VERSION "7.0.1beta" -#define LIBCURL_VERSION_NUM 0x070001 +#define LIBCURL_VERSION "7.0.4beta" +#define LIBCURL_VERSION_NUM 0x070004 /* linked-list structure for the CURLOPT_QUOTE option */ struct curl_slist { -- cgit v1.2.1 From 5da5cfa33e69632972cfa11e9b367d52597f9b43 Mon Sep 17 00:00:00 2001 From: Daniel Stenberg Date: Wed, 14 Jun 2000 12:50:38 +0000 Subject: new binary stdout approach for win32 systems --- include/curl/curl.h | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'include') diff --git a/include/curl/curl.h b/include/curl/curl.h index 4e5dbbb7e..94716f8d3 100644 --- a/include/curl/curl.h +++ b/include/curl/curl.h @@ -345,7 +345,12 @@ typedef enum { T(FTPAPPEND, LONG, 50), /* Append instead of overwrite on upload! */ T(NETRC, LONG, 51), /* read user+password from .netrc */ T(FOLLOWLOCATION, LONG, 52), /* use Location: Luke! */ + + /* This FTPASCII name is now obsolete, to be removed, use the TRANSFERTEXT + instead. It goes for more protocols than just ftp... */ T(FTPASCII, LONG, 53), /* use TYPE A for transfer */ + + T(TRANSFERTEXT, LONG, 53), /* transfer data in text/ASCII format */ T(PUT, LONG, 54), /* PUT the input file */ T(MUTE, LONG, 55), /* force NOPROGRESS */ -- cgit v1.2.1 From b88136fc4ccff02338f701867ff1cc07a3961f56 Mon Sep 17 00:00:00 2001 From: Daniel Stenberg Date: Fri, 16 Jun 2000 13:19:30 +0000 Subject: PROGRESSMODE is history --- include/curl/curl.h | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) (limited to 'include') diff --git a/include/curl/curl.h b/include/curl/curl.h index 94716f8d3..8ed1e88e9 100644 --- a/include/curl/curl.h +++ b/include/curl/curl.h @@ -321,10 +321,11 @@ typedef enum { /* HTTP request, for odd commands like DELETE, TRACE and others */ T(STDERR, OBJECTPOINT, 37), - /* Progress mode sets alternative progress mode displays, the only - one defined today is 1 which makes the #-style progress bar. */ +#if 0 + /* Progress mode set alternative progress mode displays. Alternative + ones should now be made by the client, not the lib! */ T(PROGRESSMODE, LONG, 38), - +#endif /* send linked-list of post-transfer QUOTE commands */ T(POSTQUOTE, OBJECTPOINT, 39), @@ -404,8 +405,8 @@ char *curl_getenv(char *variable); char *curl_version(void); /* This is the version number */ -#define LIBCURL_VERSION "7.0.4beta" -#define LIBCURL_VERSION_NUM 0x070004 +#define LIBCURL_VERSION "7.0.6beta" +#define LIBCURL_VERSION_NUM 0x070006 /* linked-list structure for the CURLOPT_QUOTE option */ struct curl_slist { -- cgit v1.2.1 From 1c6eccbf847b9b9d2d1735dbaf1cf2573fd8e620 Mon Sep 17 00:00:00 2001 From: Daniel Stenberg Date: Tue, 20 Jun 2000 09:28:36 +0000 Subject: Added AUTOREFERER --- include/curl/curl.h | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) (limited to 'include') diff --git a/include/curl/curl.h b/include/curl/curl.h index 8ed1e88e9..c00345d0a 100644 --- a/include/curl/curl.h +++ b/include/curl/curl.h @@ -360,8 +360,12 @@ typedef enum { * prototype defines. */ T(PROGRESSFUNCTION, FUNCTIONPOINT, 56), + /* Data passed to the progress callback */ T(PROGRESSDATA, OBJECTPOINT, 57), + /* We want the referer field set automatically when following locations */ + T(AUTOREFERER, LONG, 58), + CURLOPT_LASTENTRY /* the last unusued */ } CURLoption; @@ -405,8 +409,8 @@ char *curl_getenv(char *variable); char *curl_version(void); /* This is the version number */ -#define LIBCURL_VERSION "7.0.6beta" -#define LIBCURL_VERSION_NUM 0x070006 +#define LIBCURL_VERSION "7.0.7beta" +#define LIBCURL_VERSION_NUM 0x070007 /* linked-list structure for the CURLOPT_QUOTE option */ struct curl_slist { -- cgit v1.2.1 From 841f370a9625f9508a3e2f1194139c758af48756 Mon Sep 17 00:00:00 2001 From: Daniel Stenberg Date: Tue, 25 Jul 2000 07:38:08 +0000 Subject: Added CURLOPT_PROXYPORT --- include/curl/curl.h | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) (limited to 'include') diff --git a/include/curl/curl.h b/include/curl/curl.h index c00345d0a..b49d66df9 100644 --- a/include/curl/curl.h +++ b/include/curl/curl.h @@ -366,6 +366,10 @@ typedef enum { /* We want the referer field set automatically when following locations */ T(AUTOREFERER, LONG, 58), + /* Port of the proxy, can be set in the proxy string as well with: + "[host]:[port]" */ + T(PROXYPORT, LONG, 59), + CURLOPT_LASTENTRY /* the last unusued */ } CURLoption; @@ -409,8 +413,8 @@ char *curl_getenv(char *variable); char *curl_version(void); /* This is the version number */ -#define LIBCURL_VERSION "7.0.7beta" -#define LIBCURL_VERSION_NUM 0x070007 +#define LIBCURL_VERSION "7.0.8beta" +#define LIBCURL_VERSION_NUM 0x070008 /* linked-list structure for the CURLOPT_QUOTE option */ struct curl_slist { -- cgit v1.2.1 From 5b7a5046e6309710636c3347dba554b0b4a03c7c Mon Sep 17 00:00:00 2001 From: Daniel Stenberg Date: Tue, 25 Jul 2000 12:21:22 +0000 Subject: Torsten Foertsch's improvements --- include/curl/curl.h | 1 + 1 file changed, 1 insertion(+) (limited to 'include') diff --git a/include/curl/curl.h b/include/curl/curl.h index b49d66df9..b2292e45d 100644 --- a/include/curl/curl.h +++ b/include/curl/curl.h @@ -76,6 +76,7 @@ struct HttpPost { link should link to following files */ long flags; /* as defined below */ #define HTTPPOST_FILENAME (1<<0) /* specified content is a file name */ +#define HTTPPOST_READFILE (1<<1) /* specified content is a file name */ }; typedef int (*curl_progress_callback)(void *clientp, -- cgit v1.2.1 From 0a57b8cd609826e41ccbb65022b5f81de9d02227 Mon Sep 17 00:00:00 2001 From: Daniel Stenberg Date: Mon, 31 Jul 2000 22:40:52 +0000 Subject: added to enable include file install --- include/Makefile.am | 5 +++++ include/curl/Makefile.am | 7 +++++++ 2 files changed, 12 insertions(+) create mode 100644 include/Makefile.am create mode 100644 include/curl/Makefile.am (limited to 'include') diff --git a/include/Makefile.am b/include/Makefile.am new file mode 100644 index 000000000..3b2486029 --- /dev/null +++ b/include/Makefile.am @@ -0,0 +1,5 @@ +SUBDIRS = curl + +EXTRA_DIST = README + +AUTOMAKE_OPTIONS = foreign no-dependencies diff --git a/include/curl/Makefile.am b/include/curl/Makefile.am new file mode 100644 index 000000000..34dfb7586 --- /dev/null +++ b/include/curl/Makefile.am @@ -0,0 +1,7 @@ +pkginclude_HEADERS = \ + curl.h \ + easy.h \ + mprintf.h \ + stdcheaders.h \ + types.h +pkgincludedir= $(includedir)/curl -- cgit v1.2.1 From c3c7739811fc2231182d2b46f5fd42e44007dd2c Mon Sep 17 00:00:00 2001 From: Daniel Stenberg Date: Mon, 31 Jul 2000 22:42:34 +0000 Subject: big last-beta (?) cleanup commit --- include/curl/curl.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'include') diff --git a/include/curl/curl.h b/include/curl/curl.h index b2292e45d..207befe5b 100644 --- a/include/curl/curl.h +++ b/include/curl/curl.h @@ -414,8 +414,8 @@ char *curl_getenv(char *variable); char *curl_version(void); /* This is the version number */ -#define LIBCURL_VERSION "7.0.8beta" -#define LIBCURL_VERSION_NUM 0x070008 +#define LIBCURL_VERSION "7.0.11test" +#define LIBCURL_VERSION_NUM 0x07000b /* linked-list structure for the CURLOPT_QUOTE option */ struct curl_slist { -- cgit v1.2.1 From 1f32da93d7bbe7b7ec99ad565ea8c3c5c6c2a632 Mon Sep 17 00:00:00 2001 From: Daniel Stenberg Date: Wed, 2 Aug 2000 07:16:26 +0000 Subject: Added the strequal() prototypes here --- include/curl/curl.h | 19 ++++++++++++------- 1 file changed, 12 insertions(+), 7 deletions(-) (limited to 'include') diff --git a/include/curl/curl.h b/include/curl/curl.h index 207befe5b..289c8af94 100644 --- a/include/curl/curl.h +++ b/include/curl/curl.h @@ -395,11 +395,16 @@ typedef char bool; #endif /* (rabe) */ #endif -#if 0 -/* At last, I stand here in front of you today and can officially proclaim - this function prototype as history... 17th of May, 2000 */ -UrgError curl_urlget(UrgTag, ...); -#endif + +/* These functions are in the libcurl, they're here for portable reasons and + they are used by the 'curl' client. They really should be moved to some kind + of "portability library" since it has nothing to do with file transfers and + might be usable to other programs... + + NOTE: they return TRUE if the strings match *case insensitively*. + */ +extern int (strequal)(const char *s1, const char *s2); +extern int (strnequal)(const char *s1, const char *s2, size_t n); /* external form function */ int curl_formparse(char *string, @@ -414,8 +419,8 @@ char *curl_getenv(char *variable); char *curl_version(void); /* This is the version number */ -#define LIBCURL_VERSION "7.0.11test" -#define LIBCURL_VERSION_NUM 0x07000b +#define LIBCURL_VERSION "7.0.12test" +#define LIBCURL_VERSION_NUM 0x07000c /* linked-list structure for the CURLOPT_QUOTE option */ struct curl_slist { -- cgit v1.2.1 From 8d2c24265d6d8ed74e3d2dc646cb1c3d20f290f3 Mon Sep 17 00:00:00 2001 From: Daniel Stenberg Date: Mon, 21 Aug 2000 21:57:06 +0000 Subject: 7.1.1 commit --- include/curl/curl.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'include') diff --git a/include/curl/curl.h b/include/curl/curl.h index 289c8af94..a0d05ed80 100644 --- a/include/curl/curl.h +++ b/include/curl/curl.h @@ -419,8 +419,8 @@ char *curl_getenv(char *variable); char *curl_version(void); /* This is the version number */ -#define LIBCURL_VERSION "7.0.12test" -#define LIBCURL_VERSION_NUM 0x07000c +#define LIBCURL_VERSION "7.1.1" +#define LIBCURL_VERSION_NUM 0x070101 /* linked-list structure for the CURLOPT_QUOTE option */ struct curl_slist { -- cgit v1.2.1 From a1c0a5d0f268340e1fb0ab3230023502c2783cca Mon Sep 17 00:00:00 2001 From: Daniel Stenberg Date: Thu, 24 Aug 2000 16:27:04 +0000 Subject: Added CURLOPT_POSTFIELDSIZE --- include/curl/curl.h | 3 +++ 1 file changed, 3 insertions(+) (limited to 'include') diff --git a/include/curl/curl.h b/include/curl/curl.h index a0d05ed80..ad4999e58 100644 --- a/include/curl/curl.h +++ b/include/curl/curl.h @@ -371,6 +371,9 @@ typedef enum { "[host]:[port]" */ T(PROXYPORT, LONG, 59), + /* size of the POST input data, if strlen() is not good to use */ + T(POSTFIELDSIZE, LONG, 60), + CURLOPT_LASTENTRY /* the last unusued */ } CURLoption; -- cgit v1.2.1 From 61c434273654048462873c031eda027dd4acd549 Mon Sep 17 00:00:00 2001 From: Daniel Stenberg Date: Wed, 30 Aug 2000 11:54:57 +0000 Subject: 7.2 cleanup commit --- include/curl/curl.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'include') diff --git a/include/curl/curl.h b/include/curl/curl.h index ad4999e58..316652750 100644 --- a/include/curl/curl.h +++ b/include/curl/curl.h @@ -422,8 +422,8 @@ char *curl_getenv(char *variable); char *curl_version(void); /* This is the version number */ -#define LIBCURL_VERSION "7.1.1" -#define LIBCURL_VERSION_NUM 0x070101 +#define LIBCURL_VERSION "7.2" +#define LIBCURL_VERSION_NUM 0x070200 /* linked-list structure for the CURLOPT_QUOTE option */ struct curl_slist { -- cgit v1.2.1 From 74be53a577e5fefb152312667c9c9f2446ccf11d Mon Sep 17 00:00:00 2001 From: Daniel Stenberg Date: Thu, 7 Sep 2000 11:34:08 +0000 Subject: C++ adjusted --- include/curl/curl.h | 141 ++++++++++++++++++++++++++++------------------------ include/curl/easy.h | 9 ++++ 2 files changed, 85 insertions(+), 65 deletions(-) (limited to 'include') diff --git a/include/curl/curl.h b/include/curl/curl.h index 316652750..057553381 100644 --- a/include/curl/curl.h +++ b/include/curl/curl.h @@ -67,6 +67,10 @@ #include +#ifdef __cplusplus +extern "C" { +#endif + struct HttpPost { struct HttpPost *next; /* next entry in the list */ char *name; /* pointer to allocated name */ @@ -172,7 +176,10 @@ typedef enum { /* name is uppercase CURLOPT_, type is one of the defined CURLOPTTYPE_ number is unique identifier */ -#define T(name,type,number) CURLOPT_ ## name = CURLOPTTYPE_ ## type + number +#ifdef CINIT +#undef CINIT +#endif +#define CINIT(name,type,number) CURLOPT_ ## name = CURLOPTTYPE_ ## type + number /* long may be 32 or 64 bits, but we should never depend on anything else but 32 */ @@ -181,74 +188,74 @@ typedef enum { #define CURLOPTTYPE_FUNCTIONPOINT 20000 typedef enum { - T(NOTHING, LONG, 0), /********* the first one is unused ************/ + CINIT(NOTHING, LONG, 0), /********* the first one is unused ************/ /* This is the FILE * the regular output should be written to. */ - T(FILE, OBJECTPOINT, 1), + CINIT(FILE, OBJECTPOINT, 1), /* The full URL to get/put */ - T(URL, OBJECTPOINT, 2), + CINIT(URL, OBJECTPOINT, 2), /* Port number to connect to, if other than default. Specify the CONF_PORT flag in the CURLOPT_FLAGS to activate this */ - T(PORT, LONG, 3), + CINIT(PORT, LONG, 3), /* Name of proxy to use. Specify the CONF_PROXY flag in the CURLOPT_FLAGS to activate this */ - T(PROXY, OBJECTPOINT, 4), + CINIT(PROXY, OBJECTPOINT, 4), /* Name and password to use when fetching. Specify the CONF_USERPWD flag in the CURLOPT_FLAGS to activate this */ - T(USERPWD, OBJECTPOINT, 5), + CINIT(USERPWD, OBJECTPOINT, 5), /* Name and password to use with Proxy. Specify the CONF_PROXYUSERPWD flag in the CURLOPT_FLAGS to activate this */ - T(PROXYUSERPWD, OBJECTPOINT, 6), + CINIT(PROXYUSERPWD, OBJECTPOINT, 6), /* Range to get, specified as an ASCII string. Specify the CONF_RANGE flag in the CURLOPT_FLAGS to activate this */ - T(RANGE, OBJECTPOINT, 7), + CINIT(RANGE, OBJECTPOINT, 7), #if 0 /* Configuration flags */ - T(FLAGS, LONG, 8), + CINIT(FLAGS, LONG, 8), #endif /* Specified file stream to upload from (use as input): */ - T(INFILE, OBJECTPOINT, 9), + CINIT(INFILE, OBJECTPOINT, 9), /* Buffer to receive error messages in, must be at least CURL_ERROR_SIZE * bytes big. If this is not used, error messages go to stderr instead: */ - T(ERRORBUFFER, OBJECTPOINT, 10), + CINIT(ERRORBUFFER, OBJECTPOINT, 10), /* Function that will be called to store the output (instead of fwrite). The * parameters will use fwrite() syntax, make sure to follow them. */ - T(WRITEFUNCTION, FUNCTIONPOINT, 11), + CINIT(WRITEFUNCTION, FUNCTIONPOINT, 11), /* Function that will be called to read the input (instead of fread). The * parameters will use fread() syntax, make sure to follow them. */ - T(READFUNCTION, FUNCTIONPOINT, 12), + CINIT(READFUNCTION, FUNCTIONPOINT, 12), /* Time-out the read operation after this amount of seconds */ - T(TIMEOUT, LONG, 13), + CINIT(TIMEOUT, LONG, 13), /* If the CURLOPT_INFILE is used, this can be used to inform libcurl about * how large the file being sent really is. That allows better error * checking and better verifies that the upload was succcessful. -1 means * unknown size. */ - T(INFILESIZE, LONG, 14), + CINIT(INFILESIZE, LONG, 14), /* POST input fields. */ - T(POSTFIELDS, OBJECTPOINT, 15), + CINIT(POSTFIELDS, OBJECTPOINT, 15), /* Set the referer page (needed by some CGIs) */ - T(REFERER, OBJECTPOINT, 16), + CINIT(REFERER, OBJECTPOINT, 16), /* Set the FTP PORT string (interface name, named or numerical IP address) Use i.e '-' to use default address. */ - T(FTPPORT, OBJECTPOINT, 17), + CINIT(FTPPORT, OBJECTPOINT, 17), /* Set the User-Agent string (examined by some CGIs) */ - T(USERAGENT, OBJECTPOINT, 18), + CINIT(USERAGENT, OBJECTPOINT, 18), /* If the download receives less than "low speed limit" bytes/second * during "low speed time" seconds, the operations is aborted. @@ -257,122 +264,122 @@ typedef enum { */ /* Set the "low speed limit" */ - T(LOW_SPEED_LIMIT, LONG , 19), + CINIT(LOW_SPEED_LIMIT, LONG , 19), /* Set the "low speed time" */ - T(LOW_SPEED_TIME, LONG, 20), + CINIT(LOW_SPEED_TIME, LONG, 20), /* Set the continuation offset */ - T(RESUME_FROM, LONG, 21), + CINIT(RESUME_FROM, LONG, 21), /* Set cookie in request: */ - T(COOKIE, OBJECTPOINT, 22), + CINIT(COOKIE, OBJECTPOINT, 22), /* This points to a linked list of headers, struct HttpHeader kind */ - T(HTTPHEADER, OBJECTPOINT, 23), + CINIT(HTTPHEADER, OBJECTPOINT, 23), /* This points to a linked list of post entries, struct HttpPost */ - T(HTTPPOST, OBJECTPOINT, 24), + CINIT(HTTPPOST, OBJECTPOINT, 24), /* name of the file keeping your private SSL-certificate */ - T(SSLCERT, OBJECTPOINT, 25), + CINIT(SSLCERT, OBJECTPOINT, 25), /* password for the SSL-certificate */ - T(SSLCERTPASSWD, OBJECTPOINT, 26), + CINIT(SSLCERTPASSWD, OBJECTPOINT, 26), /* send TYPE parameter? */ - T(CRLF, LONG, 27), + CINIT(CRLF, LONG, 27), /* send linked-list of QUOTE commands */ - T(QUOTE, OBJECTPOINT, 28), + CINIT(QUOTE, OBJECTPOINT, 28), /* send FILE * to store headers to */ - T(WRITEHEADER, OBJECTPOINT, 29), + CINIT(WRITEHEADER, OBJECTPOINT, 29), #ifdef MULTIDOC /* send linked list of MoreDoc structs */ - T(MOREDOCS, OBJECTPOINT, 30), + CINIT(MOREDOCS, OBJECTPOINT, 30), #endif /* point to a file to read the initial cookies from, also enables "cookie awareness" */ - T(COOKIEFILE, OBJECTPOINT, 31), + CINIT(COOKIEFILE, OBJECTPOINT, 31), /* What version to specifly try to use. 3 = SSLv3, 2 = SSLv2, all else makes it try v3 first then v2 */ - T(SSLVERSION, LONG, 32), + CINIT(SSLVERSION, LONG, 32), /* What kind of HTTP time condition to use, see defines */ - T(TIMECONDITION, LONG, 33), + CINIT(TIMECONDITION, LONG, 33), /* Time to use with the above condition. Specified in number of seconds since 1 Jan 1970 */ - T(TIMEVALUE, LONG, 34), + CINIT(TIMEVALUE, LONG, 34), /* HTTP request, for odd commands like DELETE, TRACE and others */ /* OBSOLETE DEFINE, left for tradition only */ - T(HTTPREQUEST, OBJECTPOINT, 35), + CINIT(HTTPREQUEST, OBJECTPOINT, 35), /* Custom request, for customizing the get command like HTTP: DELETE, TRACE and others FTP: to use a different list command */ - T(CUSTOMREQUEST, OBJECTPOINT, 36), + CINIT(CUSTOMREQUEST, OBJECTPOINT, 36), /* HTTP request, for odd commands like DELETE, TRACE and others */ - T(STDERR, OBJECTPOINT, 37), + CINIT(STDERR, OBJECTPOINT, 37), #if 0 /* Progress mode set alternative progress mode displays. Alternative ones should now be made by the client, not the lib! */ - T(PROGRESSMODE, LONG, 38), + CINIT(PROGRESSMODE, LONG, 38), #endif /* send linked-list of post-transfer QUOTE commands */ - T(POSTQUOTE, OBJECTPOINT, 39), + CINIT(POSTQUOTE, OBJECTPOINT, 39), /* Pass a pointer to string of the output using full variable-replacement as described elsewhere. */ - T(WRITEINFO, OBJECTPOINT, 40), + CINIT(WRITEINFO, OBJECTPOINT, 40), /* Previous FLAG bits */ - T(VERBOSE, LONG, 41), /* talk a lot */ - T(HEADER, LONG, 42), /* throw the header out too */ - T(NOPROGRESS, LONG, 43), /* shut off the progress meter */ - T(NOBODY, LONG, 44), /* use HEAD to get http document */ - T(FAILONERROR, LONG, 45), /* no output on http error codes >= 300 */ - T(UPLOAD, LONG, 46), /* this is an upload */ - T(POST, LONG, 47), /* HTTP POST method */ - T(FTPLISTONLY, LONG, 48), /* Use NLST when listing ftp dir */ - - T(FTPAPPEND, LONG, 50), /* Append instead of overwrite on upload! */ - T(NETRC, LONG, 51), /* read user+password from .netrc */ - T(FOLLOWLOCATION, LONG, 52), /* use Location: Luke! */ + CINIT(VERBOSE, LONG, 41), /* talk a lot */ + CINIT(HEADER, LONG, 42), /* throw the header out too */ + CINIT(NOPROGRESS, LONG, 43), /* shut off the progress meter */ + CINIT(NOBODY, LONG, 44), /* use HEAD to get http document */ + CINIT(FAILONERROR, LONG, 45), /* no output on http error codes >= 300 */ + CINIT(UPLOAD, LONG, 46), /* this is an upload */ + CINIT(POST, LONG, 47), /* HTTP POST method */ + CINIT(FTPLISTONLY, LONG, 48), /* Use NLST when listing ftp dir */ + + CINIT(FTPAPPEND, LONG, 50), /* Append instead of overwrite on upload! */ + CINIT(NETRC, LONG, 51), /* read user+password from .netrc */ + CINIT(FOLLOWLOCATION, LONG, 52), /* use Location: Luke! */ /* This FTPASCII name is now obsolete, to be removed, use the TRANSFERTEXT instead. It goes for more protocols than just ftp... */ - T(FTPASCII, LONG, 53), /* use TYPE A for transfer */ + CINIT(FTPASCII, LONG, 53), /* use TYPE A for transfer */ - T(TRANSFERTEXT, LONG, 53), /* transfer data in text/ASCII format */ - T(PUT, LONG, 54), /* PUT the input file */ - T(MUTE, LONG, 55), /* force NOPROGRESS */ + CINIT(TRANSFERTEXT, LONG, 53), /* transfer data in text/ASCII format */ + CINIT(PUT, LONG, 54), /* PUT the input file */ + CINIT(MUTE, LONG, 55), /* force NOPROGRESS */ /* Function that will be called instead of the internal progress display * function. This function should be defined as the curl_progress_callback * prototype defines. */ - T(PROGRESSFUNCTION, FUNCTIONPOINT, 56), + CINIT(PROGRESSFUNCTION, FUNCTIONPOINT, 56), /* Data passed to the progress callback */ - T(PROGRESSDATA, OBJECTPOINT, 57), + CINIT(PROGRESSDATA, OBJECTPOINT, 57), /* We want the referer field set automatically when following locations */ - T(AUTOREFERER, LONG, 58), + CINIT(AUTOREFERER, LONG, 58), /* Port of the proxy, can be set in the proxy string as well with: "[host]:[port]" */ - T(PROXYPORT, LONG, 59), + CINIT(PROXYPORT, LONG, 59), /* size of the POST input data, if strlen() is not good to use */ - T(POSTFIELDSIZE, LONG, 60), + CINIT(POSTFIELDSIZE, LONG, 60), CURLOPT_LASTENTRY /* the last unusued */ } CURLoption; @@ -422,8 +429,8 @@ char *curl_getenv(char *variable); char *curl_version(void); /* This is the version number */ -#define LIBCURL_VERSION "7.2" -#define LIBCURL_VERSION_NUM 0x070200 +#define LIBCURL_VERSION "7.2.1" +#define LIBCURL_VERSION_NUM 0x070201 /* linked-list structure for the CURLOPT_QUOTE option */ struct curl_slist { @@ -622,4 +629,8 @@ CURLcode curl_disconnect(CURLconnect *connect); */ time_t curl_getdate(const char *p, const time_t *now); +#ifdef __cplusplus +} +#endif + #endif /* __CURL_CURL_H */ diff --git a/include/curl/easy.h b/include/curl/easy.h index 687696c2c..de7bccef7 100644 --- a/include/curl/easy.h +++ b/include/curl/easy.h @@ -39,8 +39,17 @@ * * ------------------------------------------------------------ ****************************************************************************/ +#ifdef __cplusplus +extern "C" { +#endif + CURL *curl_easy_init(void); CURLcode curl_easy_setopt(CURL *curl, CURLoption option, ...); CURLcode curl_easy_perform(CURL *curl); void curl_easy_cleanup(CURL *curl); + +#ifdef __cplusplus +} +#endif + #endif -- cgit v1.2.1 From 23f22bd53e93279d6844a288229ab0a56b9de5d1 Mon Sep 17 00:00:00 2001 From: Daniel Stenberg Date: Thu, 14 Sep 2000 14:14:03 +0000 Subject: Added HTTPPROXYTUNNEL --- include/curl/curl.h | 3 +++ 1 file changed, 3 insertions(+) (limited to 'include') diff --git a/include/curl/curl.h b/include/curl/curl.h index 057553381..9948dc04f 100644 --- a/include/curl/curl.h +++ b/include/curl/curl.h @@ -381,6 +381,9 @@ typedef enum { /* size of the POST input data, if strlen() is not good to use */ CINIT(POSTFIELDSIZE, LONG, 60), + /* tunnel non-http operations through a HTTP proxy */ + CINIT(HTTPPROXYTUNNEL, LONG, 61), + CURLOPT_LASTENTRY /* the last unusued */ } CURLoption; -- cgit v1.2.1 From 4dba5750d407f32072127bb1edba59a29767a3d1 Mon Sep 17 00:00:00 2001 From: Daniel Stenberg Date: Mon, 18 Sep 2000 21:53:21 +0000 Subject: Stephen Kick added CURLOPT_INTERFACE --- include/curl/curl.h | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) (limited to 'include') diff --git a/include/curl/curl.h b/include/curl/curl.h index 9948dc04f..85baac630 100644 --- a/include/curl/curl.h +++ b/include/curl/curl.h @@ -145,6 +145,8 @@ typedef enum { CURLE_HTTP_POST_ERROR, + CURLE_HTTP_PORT_FAILED, /* HTTP Interface operation failed */ + CURLE_SSL_CONNECT_ERROR, /* something was wrong when connecting with SSL */ CURLE_FTP_BAD_DOWNLOAD_RESUME, /* couldn't resume download */ @@ -384,6 +386,9 @@ typedef enum { /* tunnel non-http operations through a HTTP proxy */ CINIT(HTTPPROXYTUNNEL, LONG, 61), + /* Set the interface string to use as outgoing network interface */ + CINIT(INTERFACE, OBJECTPOINT, 62), + CURLOPT_LASTENTRY /* the last unusued */ } CURLoption; @@ -432,8 +437,8 @@ char *curl_getenv(char *variable); char *curl_version(void); /* This is the version number */ -#define LIBCURL_VERSION "7.2.1" -#define LIBCURL_VERSION_NUM 0x070201 +#define LIBCURL_VERSION "7.3-pre2" +#define LIBCURL_VERSION_NUM 0x070300 /* linked-list structure for the CURLOPT_QUOTE option */ struct curl_slist { -- cgit v1.2.1 From 1754d6166c18cb32d91f6420616519ea03bd1b14 Mon Sep 17 00:00:00 2001 From: Daniel Stenberg Date: Thu, 21 Sep 2000 08:54:36 +0000 Subject: Added CURLOPT_KRB4LEVEL --- include/curl/curl.h | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) (limited to 'include') diff --git a/include/curl/curl.h b/include/curl/curl.h index 85baac630..e54ccac65 100644 --- a/include/curl/curl.h +++ b/include/curl/curl.h @@ -389,6 +389,11 @@ typedef enum { /* Set the interface string to use as outgoing network interface */ CINIT(INTERFACE, OBJECTPOINT, 62), + /* Set the krb4 security level, this also enables krb4 awareness. This is a + * string, 'clear', 'safe', 'confidential' or 'private'. If the string is + * set but doesn't match one of these, 'private' will be used. */ + CINIT(KRB4LEVEL, OBJECTPOINT, 63), + CURLOPT_LASTENTRY /* the last unusued */ } CURLoption; @@ -437,7 +442,7 @@ char *curl_getenv(char *variable); char *curl_version(void); /* This is the version number */ -#define LIBCURL_VERSION "7.3-pre2" +#define LIBCURL_VERSION "7.3-pre6" #define LIBCURL_VERSION_NUM 0x070300 /* linked-list structure for the CURLOPT_QUOTE option */ -- cgit v1.2.1 From 13962adcb55a676b0b47925680b2e17b3e4815f0 Mon Sep 17 00:00:00 2001 From: Daniel Stenberg Date: Thu, 28 Sep 2000 10:26:44 +0000 Subject: 7.3 commit --- include/curl/curl.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'include') diff --git a/include/curl/curl.h b/include/curl/curl.h index e54ccac65..a910dc4b3 100644 --- a/include/curl/curl.h +++ b/include/curl/curl.h @@ -442,7 +442,7 @@ char *curl_getenv(char *variable); char *curl_version(void); /* This is the version number */ -#define LIBCURL_VERSION "7.3-pre6" +#define LIBCURL_VERSION "7.3" #define LIBCURL_VERSION_NUM 0x070300 /* linked-list structure for the CURLOPT_QUOTE option */ -- cgit v1.2.1 From 888182c16d045dad3929747dd7ba2481b01096b0 Mon Sep 17 00:00:00 2001 From: Daniel Stenberg Date: Mon, 2 Oct 2000 06:29:39 +0000 Subject: adjusted for curl_easy_getinfo --- include/curl/curl.h | 41 +++++++++++++++++++++++++++++++++++++++-- include/curl/easy.h | 15 +++++++++++++++ 2 files changed, 54 insertions(+), 2 deletions(-) (limited to 'include') diff --git a/include/curl/curl.h b/include/curl/curl.h index a910dc4b3..53f977966 100644 --- a/include/curl/curl.h +++ b/include/curl/curl.h @@ -438,14 +438,14 @@ int curl_formparse(char *string, MUST be free()ed after usage is complete. */ char *curl_getenv(char *variable); -/* returns ascii string of the libcurl version */ +/* Returns a static ascii string of the libcurl version. */ char *curl_version(void); /* This is the version number */ #define LIBCURL_VERSION "7.3" #define LIBCURL_VERSION_NUM 0x070300 -/* linked-list structure for the CURLOPT_QUOTE option */ +/* linked-list structure for the CURLOPT_QUOTE option (and other) */ struct curl_slist { char *data; struct curl_slist *next; @@ -642,6 +642,43 @@ CURLcode curl_disconnect(CURLconnect *connect); */ time_t curl_getdate(const char *p, const time_t *now); + +#define CURLINFO_STRING 0x100000 +#define CURLINFO_LONG 0x200000 +#define CURLINFO_DOUBLE 0x300000 +#define CURLINFO_MASK 0x0fffff +#define CURLINFO_TYPEMASK 0xf00000 + +typedef enum { + CURLINFO_NONE, /* first, never use this */ + CURLINFO_EFFECTIVE_URL = CURLINFO_STRING + 1, + CURLINFO_HTTP_CODE = CURLINFO_LONG + 2, + CURLINFO_TOTAL_TIME = CURLINFO_DOUBLE + 3, + CURLINFO_NAMELOOKUP_TIME = CURLINFO_DOUBLE + 4, + CURLINFO_CONNECT_TIME = CURLINFO_DOUBLE + 5, + CURLINFO_PRETRANSFER_TIME = CURLINFO_DOUBLE + 6, + CURLINFO_SIZE_UPLOAD = CURLINFO_DOUBLE + 7, + CURLINFO_SIZE_DOWNLOAD = CURLINFO_DOUBLE + 8, + CURLINFO_SPEED_DOWNLOAD = CURLINFO_DOUBLE + 9, + CURLINFO_SPEED_UPLOAD = CURLINFO_DOUBLE + 10, + CURLINFO_LASTONE = 11, + +} CURLINFO; + +/* + * NAME curl_getinfo() + * + * DESCRIPTION + * + * Request internal information from the curl session with this function. + * The third argument MUST be a pointer to a long or a pointer to a char *. + * The data pointed to will be filled in accordingly and can be relied upon + * only if the function returns CURLE_OK. + * This function is intended to get used *AFTER* a performed transfer, all + * results are undefined before the transfer is completed. + */ +CURLcode curl_getinfo(CURL *curl, CURLINFO info, ...); + #ifdef __cplusplus } #endif diff --git a/include/curl/easy.h b/include/curl/easy.h index de7bccef7..51620b44f 100644 --- a/include/curl/easy.h +++ b/include/curl/easy.h @@ -48,6 +48,21 @@ CURLcode curl_easy_setopt(CURL *curl, CURLoption option, ...); CURLcode curl_easy_perform(CURL *curl); void curl_easy_cleanup(CURL *curl); +/* + * NAME curl_easy_getinfo() + * + * DESCRIPTION + * + * Request internal information from the curl session with this function. The + * third argument MUST be a pointer to a long, a pointer to a char * or a + * pointer to a double (as the documentation describes elsewhere). The data + * pointed to will be filled in accordingly and can be relied upon only if the + * function returns CURLE_OK. This function is intended to get used *AFTER* a + * performed transfer, all results from this function are undefined until the + * transfer is completed. + */ +CURLcode curl_easy_getinfo(CURL *curl, CURLINFO info, ...); + #ifdef __cplusplus } #endif -- cgit v1.2.1 From 8c62e337b08882a369dd2b55aaa47f9a96b003e2 Mon Sep 17 00:00:00 2001 From: Daniel Stenberg Date: Mon, 9 Oct 2000 21:35:40 +0000 Subject: bool typedef fix --- include/curl/curl.h | 12 +++++------- 1 file changed, 5 insertions(+), 7 deletions(-) (limited to 'include') diff --git a/include/curl/curl.h b/include/curl/curl.h index 53f977966..082cd52ae 100644 --- a/include/curl/curl.h +++ b/include/curl/curl.h @@ -412,10 +412,6 @@ typedef enum { #ifdef __BEOS__ #include -#else -#ifndef __cplusplus /* (rabe) */ -typedef char bool; -#endif /* (rabe) */ #endif @@ -442,8 +438,8 @@ char *curl_getenv(char *variable); char *curl_version(void); /* This is the version number */ -#define LIBCURL_VERSION "7.3" -#define LIBCURL_VERSION_NUM 0x070300 +#define LIBCURL_VERSION "7.4-pre5" +#define LIBCURL_VERSION_NUM 0x070400 /* linked-list structure for the CURLOPT_QUOTE option (and other) */ struct curl_slist { @@ -661,8 +657,10 @@ typedef enum { CURLINFO_SIZE_DOWNLOAD = CURLINFO_DOUBLE + 8, CURLINFO_SPEED_DOWNLOAD = CURLINFO_DOUBLE + 9, CURLINFO_SPEED_UPLOAD = CURLINFO_DOUBLE + 10, - CURLINFO_LASTONE = 11, + CURLINFO_HEADER_SIZE = CURLINFO_LONG + 11, + CURLINFO_REQUEST_SIZE = CURLINFO_LONG + 12, + CURLINFO_LASTONE = 13, } CURLINFO; /* -- cgit v1.2.1 From f6163b375f0aeec85172e93823078de86bdd7bf1 Mon Sep 17 00:00:00 2001 From: Daniel Stenberg Date: Mon, 16 Oct 2000 13:52:05 +0000 Subject: 7.4.1 commit --- include/curl/curl.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'include') diff --git a/include/curl/curl.h b/include/curl/curl.h index 082cd52ae..0a2c25fa7 100644 --- a/include/curl/curl.h +++ b/include/curl/curl.h @@ -438,8 +438,8 @@ char *curl_getenv(char *variable); char *curl_version(void); /* This is the version number */ -#define LIBCURL_VERSION "7.4-pre5" -#define LIBCURL_VERSION_NUM 0x070400 +#define LIBCURL_VERSION "7.4.1" +#define LIBCURL_VERSION_NUM 0x070401 /* linked-list structure for the CURLOPT_QUOTE option (and other) */ struct curl_slist { -- cgit v1.2.1 From 5c0b2f29b9423b9e0130d26ea9cb1bb8e280ccd2 Mon Sep 17 00:00:00 2001 From: Daniel Stenberg Date: Mon, 30 Oct 2000 23:15:15 +0000 Subject: Added CURLOPT_SSL_VERIFYPEER and CURLOPT_CAINFO --- include/curl/curl.h | 14 +++++++++++--- 1 file changed, 11 insertions(+), 3 deletions(-) (limited to 'include') diff --git a/include/curl/curl.h b/include/curl/curl.h index 0a2c25fa7..51cad8e7e 100644 --- a/include/curl/curl.h +++ b/include/curl/curl.h @@ -394,6 +394,13 @@ typedef enum { * set but doesn't match one of these, 'private' will be used. */ CINIT(KRB4LEVEL, OBJECTPOINT, 63), + /* Set if we should verify the peer in ssl handshake, set 1 to verify. */ + CINIT(SSL_VERIFYPEER, LONG, 64), + + /* The CApath or CAfile used to validate the peer certificate + this option is used only if SSL_VERIFYPEER is true */ + CINIT(CAINFO, OBJECTPOINT, 65), + CURLOPT_LASTENTRY /* the last unusued */ } CURLoption; @@ -438,8 +445,8 @@ char *curl_getenv(char *variable); char *curl_version(void); /* This is the version number */ -#define LIBCURL_VERSION "7.4.1" -#define LIBCURL_VERSION_NUM 0x070401 +#define LIBCURL_VERSION "7.4.2-pre2" +#define LIBCURL_VERSION_NUM 0x070402 /* linked-list structure for the CURLOPT_QUOTE option (and other) */ struct curl_slist { @@ -659,8 +666,9 @@ typedef enum { CURLINFO_SPEED_UPLOAD = CURLINFO_DOUBLE + 10, CURLINFO_HEADER_SIZE = CURLINFO_LONG + 11, CURLINFO_REQUEST_SIZE = CURLINFO_LONG + 12, + CURLINFO_SSL_VERIFYRESULT = CURLINFO_LONG + 13, - CURLINFO_LASTONE = 13, + CURLINFO_LASTONE = 14, } CURLINFO; /* -- cgit v1.2.1 From 1c0fd24a361aecc9aeadb2eca58d1b2b4191c45e Mon Sep 17 00:00:00 2001 From: Daniel Stenberg Date: Mon, 30 Oct 2000 23:17:06 +0000 Subject: removed extra comma in the CURLINFO enum typedef --- include/curl/curl.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'include') diff --git a/include/curl/curl.h b/include/curl/curl.h index 51cad8e7e..e3bcb4377 100644 --- a/include/curl/curl.h +++ b/include/curl/curl.h @@ -668,7 +668,7 @@ typedef enum { CURLINFO_REQUEST_SIZE = CURLINFO_LONG + 12, CURLINFO_SSL_VERIFYRESULT = CURLINFO_LONG + 13, - CURLINFO_LASTONE = 14, + CURLINFO_LASTONE = 14 } CURLINFO; /* -- cgit v1.2.1 From e0e01e5a59b00e617f2a90114b0316879e8cb89d Mon Sep 17 00:00:00 2001 From: Daniel Stenberg Date: Thu, 2 Nov 2000 14:34:46 +0000 Subject: error code fix --- include/curl/curl.h | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) (limited to 'include') diff --git a/include/curl/curl.h b/include/curl/curl.h index e3bcb4377..4a1245e58 100644 --- a/include/curl/curl.h +++ b/include/curl/curl.h @@ -100,7 +100,11 @@ typedef size_t (*curl_read_callback)(char *buffer, FILE *instream); /* All possible error codes from this version of urlget(). Future versions - may return other values, stay prepared. */ + may return other values, stay prepared. + + Always add new return codes last. Never *EVER* remove any. The return + codes must remain the same! + */ typedef enum { CURLE_OK = 0, @@ -145,8 +149,6 @@ typedef enum { CURLE_HTTP_POST_ERROR, - CURLE_HTTP_PORT_FAILED, /* HTTP Interface operation failed */ - CURLE_SSL_CONNECT_ERROR, /* something was wrong when connecting with SSL */ CURLE_FTP_BAD_DOWNLOAD_RESUME, /* couldn't resume download */ @@ -159,10 +161,11 @@ typedef enum { CURLE_FUNCTION_NOT_FOUND, CURLE_ABORTED_BY_CALLBACK, - CURLE_BAD_FUNCTION_ARGUMENT, CURLE_BAD_CALLING_ORDER, + CURLE_HTTP_PORT_FAILED, /* HTTP Interface operation failed */ + CURL_LAST } CURLcode; -- cgit v1.2.1 From 9f4f16b55d7df262774aee227933347e0ae3846e Mon Sep 17 00:00:00 2001 From: Daniel Stenberg Date: Mon, 6 Nov 2000 22:53:50 +0000 Subject: new getpass proto and function pointer usage --- include/curl/curl.h | 16 +++++++++++++++- 1 file changed, 15 insertions(+), 1 deletion(-) (limited to 'include') diff --git a/include/curl/curl.h b/include/curl/curl.h index 4a1245e58..f0a17011a 100644 --- a/include/curl/curl.h +++ b/include/curl/curl.h @@ -99,7 +99,12 @@ typedef size_t (*curl_read_callback)(char *buffer, size_t nitems, FILE *instream); -/* All possible error codes from this version of urlget(). Future versions +typedef int (*curl_passwd_callback)(void *clientp, + char *prompt, + char *buffer, + int buflen); + +/* All possible error codes from all sorts of curl functions. Future versions may return other values, stay prepared. Always add new return codes last. Never *EVER* remove any. The return @@ -166,6 +171,8 @@ typedef enum { CURLE_HTTP_PORT_FAILED, /* HTTP Interface operation failed */ + CURLE_BAD_PASSWORD_ENTERED, /* when the my_getpass() returns fail */ + CURL_LAST } CURLcode; @@ -404,6 +411,13 @@ typedef enum { this option is used only if SSL_VERIFYPEER is true */ CINIT(CAINFO, OBJECTPOINT, 65), + /* Function pointer to replace the internal password prompt */ + CINIT(PASSWDFUNCTION, FUNCTIONPOINT, 66), + + /* Custom pointer that gets passed as first argument to the password + function */ + CINIT(PASSWDDATA, OBJECTPOINT, 67), + CURLOPT_LASTENTRY /* the last unusued */ } CURLoption; -- cgit v1.2.1 From a03cdd7e83fb4b698e2450e9e9db7e433dabe184 Mon Sep 17 00:00:00 2001 From: Daniel Stenberg Date: Fri, 17 Nov 2000 14:21:07 +0000 Subject: curl_formfree() added --- include/curl/curl.h | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'include') diff --git a/include/curl/curl.h b/include/curl/curl.h index f0a17011a..d554b8187 100644 --- a/include/curl/curl.h +++ b/include/curl/curl.h @@ -454,6 +454,9 @@ int curl_formparse(char *string, struct HttpPost **httppost, struct HttpPost **last_post); +/* cleanup a form: */ +void curl_formfree(struct HttpPost *form); + /* Unix and Win32 getenv function call, this returns a malloc()'ed string that MUST be free()ed after usage is complete. */ char *curl_getenv(char *variable); @@ -462,7 +465,7 @@ char *curl_getenv(char *variable); char *curl_version(void); /* This is the version number */ -#define LIBCURL_VERSION "7.4.2-pre2" +#define LIBCURL_VERSION "7.4.2" #define LIBCURL_VERSION_NUM 0x070402 /* linked-list structure for the CURLOPT_QUOTE option (and other) */ -- cgit v1.2.1 From 4c0bae364930b55fc7cd3a8f870d2779d210a83c Mon Sep 17 00:00:00 2001 From: Daniel Stenberg Date: Mon, 20 Nov 2000 09:40:09 +0000 Subject: changed the comment for URL_MAX_LENGTH --- include/curl/curl.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'include') diff --git a/include/curl/curl.h b/include/curl/curl.h index d554b8187..f11afdc06 100644 --- a/include/curl/curl.h +++ b/include/curl/curl.h @@ -181,7 +181,7 @@ typedef enum { #define CURL_ERROR_SIZE 256 -/* maximum URL length we deal with */ +/* maximum URL length we deal with in headers */ #define URL_MAX_LENGTH 4096 #define URL_MAX_LENGTH_TXT "4095" -- cgit v1.2.1 From 92f53b0e4d1d030a893f882f8d2eb190711d0457 Mon Sep 17 00:00:00 2001 From: Daniel Stenberg Date: Wed, 22 Nov 2000 13:59:41 +0000 Subject: added filetime for opt and info --- include/curl/curl.h | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) (limited to 'include') diff --git a/include/curl/curl.h b/include/curl/curl.h index f11afdc06..6dcfb5d95 100644 --- a/include/curl/curl.h +++ b/include/curl/curl.h @@ -418,6 +418,10 @@ typedef enum { function */ CINIT(PASSWDDATA, OBJECTPOINT, 67), + /* Pass a pointer to a time_t to get a possible date of the requested + document! Pass a NULL to shut it off. */ + CINIT(FILETIME, OBJECTPOINT, 68), + CURLOPT_LASTENTRY /* the last unusued */ } CURLoption; @@ -465,8 +469,8 @@ char *curl_getenv(char *variable); char *curl_version(void); /* This is the version number */ -#define LIBCURL_VERSION "7.4.2" -#define LIBCURL_VERSION_NUM 0x070402 +#define LIBCURL_VERSION "7.5-pre2" +#define LIBCURL_VERSION_NUM 0x070500 /* linked-list structure for the CURLOPT_QUOTE option (and other) */ struct curl_slist { @@ -687,8 +691,9 @@ typedef enum { CURLINFO_HEADER_SIZE = CURLINFO_LONG + 11, CURLINFO_REQUEST_SIZE = CURLINFO_LONG + 12, CURLINFO_SSL_VERIFYRESULT = CURLINFO_LONG + 13, + CURLINFO_FILETIME = CURLINFO_LONG + 14, - CURLINFO_LASTONE = 14 + CURLINFO_LASTONE = 15 } CURLINFO; /* -- cgit v1.2.1 From 6f4f3c79b62e60c7f45a62bae01951e07e7d1054 Mon Sep 17 00:00:00 2001 From: Daniel Stenberg Date: Wed, 22 Nov 2000 14:27:47 +0000 Subject: 7.5-pre3 commit --- include/curl/curl.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'include') diff --git a/include/curl/curl.h b/include/curl/curl.h index 6dcfb5d95..ea3c25d5a 100644 --- a/include/curl/curl.h +++ b/include/curl/curl.h @@ -469,7 +469,7 @@ char *curl_getenv(char *variable); char *curl_version(void); /* This is the version number */ -#define LIBCURL_VERSION "7.5-pre2" +#define LIBCURL_VERSION "7.5-pre3" #define LIBCURL_VERSION_NUM 0x070500 /* linked-list structure for the CURLOPT_QUOTE option (and other) */ -- cgit v1.2.1 From 6bd75ab8400aaf72792e0ae5a083cfd27f96acc0 Mon Sep 17 00:00:00 2001 From: Daniel Stenberg Date: Tue, 28 Nov 2000 09:10:04 +0000 Subject: added maxredirs, moved CURL_PROGRESS* defines to src/main.c --- include/curl/curl.h | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) (limited to 'include') diff --git a/include/curl/curl.h b/include/curl/curl.h index ea3c25d5a..56f705681 100644 --- a/include/curl/curl.h +++ b/include/curl/curl.h @@ -172,6 +172,7 @@ typedef enum { CURLE_HTTP_PORT_FAILED, /* HTTP Interface operation failed */ CURLE_BAD_PASSWORD_ENTERED, /* when the my_getpass() returns fail */ + CURLE_TOO_MANY_REDIRECTS , /* catch endless re-direct loops */ CURL_LAST } CURLcode; @@ -417,17 +418,17 @@ typedef enum { /* Custom pointer that gets passed as first argument to the password function */ CINIT(PASSWDDATA, OBJECTPOINT, 67), + + /* Maximum number of http redirects to follow */ + CINIT(MAXREDIRS, LONG, 68), /* Pass a pointer to a time_t to get a possible date of the requested document! Pass a NULL to shut it off. */ - CINIT(FILETIME, OBJECTPOINT, 68), + CINIT(FILETIME, OBJECTPOINT, 69), CURLOPT_LASTENTRY /* the last unusued */ } CURLoption; -#define CURL_PROGRESS_STATS 0 /* default progress display */ -#define CURL_PROGRESS_BAR 1 - typedef enum { TIMECOND_NONE, @@ -469,7 +470,7 @@ char *curl_getenv(char *variable); char *curl_version(void); /* This is the version number */ -#define LIBCURL_VERSION "7.5-pre3" +#define LIBCURL_VERSION "7.5-pre4" #define LIBCURL_VERSION_NUM 0x070500 /* linked-list structure for the CURLOPT_QUOTE option (and other) */ -- cgit v1.2.1 From 52707f959058c148c8a5ef4e81d0599780a1c014 Mon Sep 17 00:00:00 2001 From: Daniel Stenberg Date: Mon, 4 Dec 2000 09:44:57 +0000 Subject: 7.5-commit --- include/curl/curl.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'include') diff --git a/include/curl/curl.h b/include/curl/curl.h index 56f705681..3cadc83ed 100644 --- a/include/curl/curl.h +++ b/include/curl/curl.h @@ -470,7 +470,7 @@ char *curl_getenv(char *variable); char *curl_version(void); /* This is the version number */ -#define LIBCURL_VERSION "7.5-pre4" +#define LIBCURL_VERSION "7.5" #define LIBCURL_VERSION_NUM 0x070500 /* linked-list structure for the CURLOPT_QUOTE option (and other) */ -- cgit v1.2.1 From 76ac228e445743027b7d7ed0e98e15c4042dbf7a Mon Sep 17 00:00:00 2001 From: Daniel Stenberg Date: Thu, 14 Dec 2000 08:34:47 +0000 Subject: added include stdio.h for the FILE --- include/curl/curl.h | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) (limited to 'include') diff --git a/include/curl/curl.h b/include/curl/curl.h index 3cadc83ed..ba25254c4 100644 --- a/include/curl/curl.h +++ b/include/curl/curl.h @@ -26,9 +26,9 @@ * * ------------------------------------------------------------ * Main author: - * - Daniel Stenberg + * - Daniel Stenberg * - * http://curl.haxx.nu + * http://curl.haxx.se * * $Source$ * $Revision$ @@ -40,6 +40,7 @@ * ------------------------------------------------------------ ****************************************************************************/ +#include /* The include stuff here is mainly for time_t! */ #ifdef vms # include @@ -470,8 +471,8 @@ char *curl_getenv(char *variable); char *curl_version(void); /* This is the version number */ -#define LIBCURL_VERSION "7.5" -#define LIBCURL_VERSION_NUM 0x070500 +#define LIBCURL_VERSION "7.5.1" +#define LIBCURL_VERSION_NUM 0x070501 /* linked-list structure for the CURLOPT_QUOTE option (and other) */ struct curl_slist { -- cgit v1.2.1 From cbaeed7232bc48a515756ba700561069729d1a3a Mon Sep 17 00:00:00 2001 From: Daniel Stenberg Date: Tue, 19 Dec 2000 13:09:23 +0000 Subject: updated email and web site --- include/curl/types.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'include') diff --git a/include/curl/types.h b/include/curl/types.h index 15f7067e4..a0c251c46 100644 --- a/include/curl/types.h +++ b/include/curl/types.h @@ -26,9 +26,9 @@ * * ------------------------------------------------------------ * Main author: - * - Daniel Stenberg + * - Daniel Stenberg * - * http://curl.haxx.nu + * http://curl.haxx.se * * $Source$ * $Revision$ -- cgit v1.2.1 From 887e728b7dbefb3f5c2e51e7d83f602e7071e27c Mon Sep 17 00:00:00 2001 From: Daniel Stenberg Date: Wed, 3 Jan 2001 09:13:07 +0000 Subject: cleanup-commit --- include/curl/curl.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'include') diff --git a/include/curl/curl.h b/include/curl/curl.h index ba25254c4..f744e2117 100644 --- a/include/curl/curl.h +++ b/include/curl/curl.h @@ -471,8 +471,8 @@ char *curl_getenv(char *variable); char *curl_version(void); /* This is the version number */ -#define LIBCURL_VERSION "7.5.1" -#define LIBCURL_VERSION_NUM 0x070501 +#define LIBCURL_VERSION "7.5.2-pre1" +#define LIBCURL_VERSION_NUM 0x070502 /* linked-list structure for the CURLOPT_QUOTE option (and other) */ struct curl_slist { -- cgit v1.2.1 From 24dee483e9e925c2ab79dd582f70c9a55ab9ba4d Mon Sep 17 00:00:00 2001 From: Daniel Stenberg Date: Wed, 3 Jan 2001 09:29:33 +0000 Subject: dual-license fix --- include/curl/curl.h | 39 +++++++++++---------------------------- include/curl/easy.h | 39 +++++++++++---------------------------- include/curl/stdcheaders.h | 39 +++++++++++---------------------------- include/curl/types.h | 39 +++++++++++---------------------------- 4 files changed, 44 insertions(+), 112 deletions(-) (limited to 'include') diff --git a/include/curl/curl.h b/include/curl/curl.h index f744e2117..332194c88 100644 --- a/include/curl/curl.h +++ b/include/curl/curl.h @@ -7,38 +7,21 @@ * | (__| |_| | _ <| |___ * \___|\___/|_| \_\_____| * - * The contents of this file are subject to the Mozilla Public License - * Version 1.0 (the "License"); you may not use this file except in - * compliance with the License. You may obtain a copy of the License at - * http://www.mozilla.org/MPL/ + * Copyright (C) 2000, Daniel Stenberg, , et al. * - * Software distributed under the License is distributed on an "AS IS" - * basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See the - * License for the specific language governing rights and limitations - * under the License. + * In order to be useful for every potential user, curl and libcurl are + * dual-licensed under the MPL and the MIT/X-derivate licenses. * - * The Original Code is Curl. + * 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 + * furnished to do so, under the terms of the MPL or the MIT/X-derivate + * licenses. You may pick one of these licenses. * - * The Initial Developer of the Original Code is Daniel Stenberg. + * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY + * KIND, either express or implied. * - * Portions created by the Initial Developer are Copyright (C) 1998. - * All Rights Reserved. - * - * ------------------------------------------------------------ - * Main author: - * - Daniel Stenberg - * - * http://curl.haxx.se - * - * $Source$ - * $Revision$ - * $Date$ - * $Author$ - * $State$ - * $Locker$ - * - * ------------------------------------------------------------ - ****************************************************************************/ + * $Id$ + *****************************************************************************/ #include /* The include stuff here is mainly for time_t! */ diff --git a/include/curl/easy.h b/include/curl/easy.h index 51620b44f..d0e102be9 100644 --- a/include/curl/easy.h +++ b/include/curl/easy.h @@ -7,38 +7,21 @@ * | (__| |_| | _ <| |___ * \___|\___/|_| \_\_____| * - * The contents of this file are subject to the Mozilla Public License - * Version 1.0 (the "License"); you may not use this file except in - * compliance with the License. You may obtain a copy of the License at - * http://www.mozilla.org/MPL/ + * Copyright (C) 2000, Daniel Stenberg, , et al. * - * Software distributed under the License is distributed on an "AS IS" - * basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See the - * License for the specific language governing rights and limitations - * under the License. + * In order to be useful for every potential user, curl and libcurl are + * dual-licensed under the MPL and the MIT/X-derivate licenses. * - * The Original Code is Curl. + * 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 + * furnished to do so, under the terms of the MPL or the MIT/X-derivate + * licenses. You may pick one of these licenses. * - * The Initial Developer of the Original Code is Daniel Stenberg. + * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY + * KIND, either express or implied. * - * Portions created by the Initial Developer are Copyright (C) 1998. - * All Rights Reserved. - * - * ------------------------------------------------------------ - * Main author: - * - Daniel Stenberg - * - * http://curl.haxx.nu - * - * $Source$ - * $Revision$ - * $Date$ - * $Author$ - * $State$ - * $Locker$ - * - * ------------------------------------------------------------ - ****************************************************************************/ + * $Id$ + *****************************************************************************/ #ifdef __cplusplus extern "C" { #endif diff --git a/include/curl/stdcheaders.h b/include/curl/stdcheaders.h index 3027b86e9..3fbaaf7b5 100644 --- a/include/curl/stdcheaders.h +++ b/include/curl/stdcheaders.h @@ -7,38 +7,21 @@ * | (__| |_| | _ <| |___ * \___|\___/|_| \_\_____| * - * The contents of this file are subject to the Mozilla Public License - * Version 1.0 (the "License"); you may not use this file except in - * compliance with the License. You may obtain a copy of the License at - * http://www.mozilla.org/MPL/ + * Copyright (C) 2000, Daniel Stenberg, , et al. * - * Software distributed under the License is distributed on an "AS IS" - * basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See the - * License for the specific language governing rights and limitations - * under the License. + * In order to be useful for every potential user, curl and libcurl are + * dual-licensed under the MPL and the MIT/X-derivate licenses. * - * The Original Code is Curl. + * 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 + * furnished to do so, under the terms of the MPL or the MIT/X-derivate + * licenses. You may pick one of these licenses. * - * The Initial Developer of the Original Code is Daniel Stenberg. + * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY + * KIND, either express or implied. * - * Portions created by the Initial Developer are Copyright (C) 1998. - * All Rights Reserved. - * - * ------------------------------------------------------------ - * Main author: - * - Daniel Stenberg - * - * http://curl.haxx.nu - * - * $Source$ - * $Revision$ - * $Date$ - * $Author$ - * $State$ - * $Locker$ - * - * ------------------------------------------------------------ - ****************************************************************************/ + * $Id$ + *****************************************************************************/ #ifdef HAVE_SYS_TYPES_H #include diff --git a/include/curl/types.h b/include/curl/types.h index a0c251c46..05f73bf53 100644 --- a/include/curl/types.h +++ b/include/curl/types.h @@ -7,38 +7,21 @@ * | (__| |_| | _ <| |___ * \___|\___/|_| \_\_____| * - * The contents of this file are subject to the Mozilla Public License - * Version 1.0 (the "License"); you may not use this file except in - * compliance with the License. You may obtain a copy of the License at - * http://www.mozilla.org/MPL/ + * Copyright (C) 2000, Daniel Stenberg, , et al. * - * Software distributed under the License is distributed on an "AS IS" - * basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See the - * License for the specific language governing rights and limitations - * under the License. + * In order to be useful for every potential user, curl and libcurl are + * dual-licensed under the MPL and the MIT/X-derivate licenses. * - * The Original Code is Curl. + * 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 + * furnished to do so, under the terms of the MPL or the MIT/X-derivate + * licenses. You may pick one of these licenses. * - * The Initial Developer of the Original Code is Daniel Stenberg. + * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY + * KIND, either express or implied. * - * Portions created by the Initial Developer are Copyright (C) 1998. - * All Rights Reserved. - * - * ------------------------------------------------------------ - * Main author: - * - Daniel Stenberg - * - * http://curl.haxx.se - * - * $Source$ - * $Revision$ - * $Date$ - * $Author$ - * $State$ - * $Locker$ - * - * ------------------------------------------------------------ - ****************************************************************************/ + * $Id$ + *****************************************************************************/ typedef void CURL; typedef void CURLconnect; -- cgit v1.2.1 From ed8dbf4ac24f08c69d0cf2020a9c3ea09203baba Mon Sep 17 00:00:00 2001 From: Daniel Stenberg Date: Thu, 4 Jan 2001 12:27:04 +0000 Subject: updated license text in headers --- include/curl/mprintf.h | 29 ++++++++--------------------- 1 file changed, 8 insertions(+), 21 deletions(-) (limited to 'include') diff --git a/include/curl/mprintf.h b/include/curl/mprintf.h index 65c64f439..5590a8df8 100644 --- a/include/curl/mprintf.h +++ b/include/curl/mprintf.h @@ -2,27 +2,14 @@ * * $Id$ * - * The contents of this file are subject to the Mozilla Public License - * Version 1.0 (the "License"); you may not use this file except in - * compliance with the License. You may obtain a copy of the License at - * http://www.mozilla.org/MPL/ - * - * Software distributed under the License is distributed on an "AS IS" - * basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See - * the License for the specific language governing rights and limitations - * under the License. - * - * The Original Code is Triacle. - * - * The Initial Developers of the Original Code are Bjorn Reese and - * Daniel Stenberg. - * - * Portions created by Initial Developers are - * - * Copyright (C) 1998 Bjorn Reese and Daniel Stenberg. - * All Rights Reserved. - * - * Contributor(s): + * Permission to use, copy, modify, and distribute this software for any + * purpose with or without fee is hereby granted, provided that the above + * copyright notice and this permission notice appear in all copies. + * + * THIS SOFTWARE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR IMPLIED + * WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED WARRANTIES OF + * MERCHANTIBILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE AUTHORS AND + * CONTRIBUTORS ACCEPT NO RESPONSIBILITY IN ANY CONCEIVABLE MANNER. * ************************************************************************* * -- cgit v1.2.1 From 9f9cac7402f9f134be6f6d5b7fb830e9946a83d8 Mon Sep 17 00:00:00 2001 From: Daniel Stenberg Date: Fri, 5 Jan 2001 06:30:18 +0000 Subject: release commit --- include/curl/curl.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'include') diff --git a/include/curl/curl.h b/include/curl/curl.h index 332194c88..6a9ff6ae8 100644 --- a/include/curl/curl.h +++ b/include/curl/curl.h @@ -454,7 +454,7 @@ char *curl_getenv(char *variable); char *curl_version(void); /* This is the version number */ -#define LIBCURL_VERSION "7.5.2-pre1" +#define LIBCURL_VERSION "7.5.2" #define LIBCURL_VERSION_NUM 0x070502 /* linked-list structure for the CURLOPT_QUOTE option (and other) */ -- cgit v1.2.1 From 4031104404c6ceed5e57134125dcdb6cac51c564 Mon Sep 17 00:00:00 2001 From: Daniel Stenberg Date: Fri, 5 Jan 2001 10:11:41 +0000 Subject: Internal symbols that aren't static are now prefixed with 'Curl_' --- include/curl/curl.h | 6 ++++-- include/curl/mprintf.h | 38 ++++++++++++++++++++------------------ 2 files changed, 24 insertions(+), 20 deletions(-) (limited to 'include') diff --git a/include/curl/curl.h b/include/curl/curl.h index 6a9ff6ae8..412511679 100644 --- a/include/curl/curl.h +++ b/include/curl/curl.h @@ -435,8 +435,10 @@ typedef enum { NOTE: they return TRUE if the strings match *case insensitively*. */ -extern int (strequal)(const char *s1, const char *s2); -extern int (strnequal)(const char *s1, const char *s2, size_t n); +extern int (Curl_strequal)(const char *s1, const char *s2); +extern int (Curl_strnequal)(const char *s1, const char *s2, size_t n); +#define strequal(a,b) Curl_strequal(a,b) +#define strnequal(a,b,c) Curl_strnequal(a,b,c) /* external form function */ int curl_formparse(char *string, diff --git a/include/curl/mprintf.h b/include/curl/mprintf.h index 5590a8df8..7e89fe7d4 100644 --- a/include/curl/mprintf.h +++ b/include/curl/mprintf.h @@ -55,26 +55,28 @@ #include -int mprintf(const char *format, ...); -int mfprintf(FILE *fd, const char *format, ...); -int msprintf(char *buffer, const char *format, ...); -int msnprintf(char *buffer, size_t maxlength, const char *format, ...); -int mvprintf(const char *format, va_list args); -int mvfprintf(FILE *fd, const char *format, va_list args); -int mvsprintf(char *buffer, const char *format, va_list args); -int mvsnprintf(char *buffer, size_t maxlength, const char *format, va_list args); -char *maprintf(const char *format, ...); -char *mvaprintf(const char *format, va_list args); +int Curl_mprintf(const char *format, ...); +int Curl_mfprintf(FILE *fd, const char *format, ...); +int Curl_msprintf(char *buffer, const char *format, ...); +int Curl_msnprintf(char *buffer, size_t maxlength, const char *format, ...); +int Curl_mvprintf(const char *format, va_list args); +int Curl_mvfprintf(FILE *fd, const char *format, va_list args); +int Curl_mvsprintf(char *buffer, const char *format, va_list args); +int Curl_mvsnprintf(char *buffer, size_t maxlength, const char *format, va_list args); +char *Curl_maprintf(const char *format, ...); +char *Curl_mvaprintf(const char *format, va_list args); #ifdef _MPRINTF_REPLACE -# define printf mprintf -# define fprintf mfprintf -# define sprintf msprintf -# define snprintf msnprintf -# define vprintf mvprintf -# define vfprintf mvfprintf -# define vsprintf mvsprintf -# define vsnprintf mvsnprintf +# define printf Curl_mprintf +# define fprintf Curl_mfprintf +# define sprintf Curl_msprintf +# define snprintf Curl_msnprintf +# define vprintf Curl_mvprintf +# define vfprintf Curl_mvfprintf +# define vsprintf Curl_mvsprintf +# define vsnprintf Curl_mvsnprintf +# define aprintf Curl_maprintf +# define vaprintf Curl_mvaprintf #endif #endif /* H_MPRINTF */ -- cgit v1.2.1 From 6403257886fffe9d320099dfa019620c6c1f8dee Mon Sep 17 00:00:00 2001 From: Daniel Stenberg Date: Fri, 5 Jan 2001 12:19:42 +0000 Subject: renamed Curl_ to curl_ for the printf() prefixes --- include/curl/mprintf.h | 40 ++++++++++++++++++++-------------------- 1 file changed, 20 insertions(+), 20 deletions(-) (limited to 'include') diff --git a/include/curl/mprintf.h b/include/curl/mprintf.h index 7e89fe7d4..6bf24791c 100644 --- a/include/curl/mprintf.h +++ b/include/curl/mprintf.h @@ -55,28 +55,28 @@ #include -int Curl_mprintf(const char *format, ...); -int Curl_mfprintf(FILE *fd, const char *format, ...); -int Curl_msprintf(char *buffer, const char *format, ...); -int Curl_msnprintf(char *buffer, size_t maxlength, const char *format, ...); -int Curl_mvprintf(const char *format, va_list args); -int Curl_mvfprintf(FILE *fd, const char *format, va_list args); -int Curl_mvsprintf(char *buffer, const char *format, va_list args); -int Curl_mvsnprintf(char *buffer, size_t maxlength, const char *format, va_list args); -char *Curl_maprintf(const char *format, ...); -char *Curl_mvaprintf(const char *format, va_list args); +int curl_mprintf(const char *format, ...); +int curl_mfprintf(FILE *fd, const char *format, ...); +int curl_msprintf(char *buffer, const char *format, ...); +int curl_msnprintf(char *buffer, size_t maxlength, const char *format, ...); +int curl_mvprintf(const char *format, va_list args); +int curl_mvfprintf(FILE *fd, const char *format, va_list args); +int curl_mvsprintf(char *buffer, const char *format, va_list args); +int curl_mvsnprintf(char *buffer, size_t maxlength, const char *format, va_list args); +char *curl_maprintf(const char *format, ...); +char *curl_mvaprintf(const char *format, va_list args); #ifdef _MPRINTF_REPLACE -# define printf Curl_mprintf -# define fprintf Curl_mfprintf -# define sprintf Curl_msprintf -# define snprintf Curl_msnprintf -# define vprintf Curl_mvprintf -# define vfprintf Curl_mvfprintf -# define vsprintf Curl_mvsprintf -# define vsnprintf Curl_mvsnprintf -# define aprintf Curl_maprintf -# define vaprintf Curl_mvaprintf +# define printf curl_mprintf +# define fprintf curl_mfprintf +# define sprintf curl_msprintf +# define snprintf curl_msnprintf +# define vprintf curl_mvprintf +# define vfprintf curl_mvfprintf +# define vsprintf curl_mvsprintf +# define vsnprintf curl_mvsnprintf +# define aprintf curl_maprintf +# define vaprintf curl_mvaprintf #endif #endif /* H_MPRINTF */ -- cgit v1.2.1 From a9ea507c6a7f8af286aebc153e4b3a31889a5819 Mon Sep 17 00:00:00 2001 From: Daniel Stenberg Date: Tue, 9 Jan 2001 12:25:32 +0000 Subject: version 7.6-pre1 --- include/curl/curl.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'include') diff --git a/include/curl/curl.h b/include/curl/curl.h index 412511679..bef3e6e91 100644 --- a/include/curl/curl.h +++ b/include/curl/curl.h @@ -456,8 +456,8 @@ char *curl_getenv(char *variable); char *curl_version(void); /* This is the version number */ -#define LIBCURL_VERSION "7.5.2" -#define LIBCURL_VERSION_NUM 0x070502 +#define LIBCURL_VERSION "7.6-pre1" +#define LIBCURL_VERSION_NUM 0x070600 /* linked-list structure for the CURLOPT_QUOTE option (and other) */ struct curl_slist { -- cgit v1.2.1 From b0c0e8d815ad06a7f6045f0c0a316da8cc0e0bf8 Mon Sep 17 00:00:00 2001 From: Daniel Stenberg Date: Thu, 11 Jan 2001 09:29:30 +0000 Subject: 7.6-pre2 --- include/curl/curl.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'include') diff --git a/include/curl/curl.h b/include/curl/curl.h index bef3e6e91..4fc1614d9 100644 --- a/include/curl/curl.h +++ b/include/curl/curl.h @@ -456,7 +456,7 @@ char *curl_getenv(char *variable); char *curl_version(void); /* This is the version number */ -#define LIBCURL_VERSION "7.6-pre1" +#define LIBCURL_VERSION "7.6-pre2" #define LIBCURL_VERSION_NUM 0x070600 /* linked-list structure for the CURLOPT_QUOTE option (and other) */ -- cgit v1.2.1 From d80f87554cf16e3d69154ea021a940bf1d80f443 Mon Sep 17 00:00:00 2001 From: Daniel Stenberg Date: Fri, 19 Jan 2001 09:38:48 +0000 Subject: version 7.6-pre3 --- include/curl/curl.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'include') diff --git a/include/curl/curl.h b/include/curl/curl.h index 4fc1614d9..2f780d490 100644 --- a/include/curl/curl.h +++ b/include/curl/curl.h @@ -456,7 +456,7 @@ char *curl_getenv(char *variable); char *curl_version(void); /* This is the version number */ -#define LIBCURL_VERSION "7.6-pre2" +#define LIBCURL_VERSION "7.6-pre3" #define LIBCURL_VERSION_NUM 0x070600 /* linked-list structure for the CURLOPT_QUOTE option (and other) */ -- cgit v1.2.1 From 3dd886955b550d005aeccd198bbcb19ae3d4c268 Mon Sep 17 00:00:00 2001 From: Daniel Stenberg Date: Fri, 19 Jan 2001 12:14:55 +0000 Subject: removed MAX_URL_LENGTH, there is no longer any length restrictions on URLs anywhere within libcurl --- include/curl/curl.h | 4 ---- 1 file changed, 4 deletions(-) (limited to 'include') diff --git a/include/curl/curl.h b/include/curl/curl.h index 2f780d490..2b1a3e624 100644 --- a/include/curl/curl.h +++ b/include/curl/curl.h @@ -166,10 +166,6 @@ typedef enum { #define CURL_ERROR_SIZE 256 -/* maximum URL length we deal with in headers */ -#define URL_MAX_LENGTH 4096 -#define URL_MAX_LENGTH_TXT "4095" - /* name is uppercase CURLOPT_, type is one of the defined CURLOPTTYPE_ number is unique identifier */ -- cgit v1.2.1 From 68d7b6f87116087bd00b1f1f0c899cea71adb5da Mon Sep 17 00:00:00 2001 From: Daniel Stenberg Date: Thu, 25 Jan 2001 13:48:28 +0000 Subject: 7.6-pre4 --- include/curl/curl.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'include') diff --git a/include/curl/curl.h b/include/curl/curl.h index 2b1a3e624..0984840bb 100644 --- a/include/curl/curl.h +++ b/include/curl/curl.h @@ -452,7 +452,7 @@ char *curl_getenv(char *variable); char *curl_version(void); /* This is the version number */ -#define LIBCURL_VERSION "7.6-pre3" +#define LIBCURL_VERSION "7.6-pre4" #define LIBCURL_VERSION_NUM 0x070600 /* linked-list structure for the CURLOPT_QUOTE option (and other) */ -- cgit v1.2.1 From ac98c73b04aec60683ec2094f3c311485f08d6ab Mon Sep 17 00:00:00 2001 From: Daniel Stenberg Date: Sat, 27 Jan 2001 16:16:54 +0000 Subject: 7.6 --- include/curl/curl.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'include') diff --git a/include/curl/curl.h b/include/curl/curl.h index 0984840bb..b23dae77d 100644 --- a/include/curl/curl.h +++ b/include/curl/curl.h @@ -452,7 +452,7 @@ char *curl_getenv(char *variable); char *curl_version(void); /* This is the version number */ -#define LIBCURL_VERSION "7.6-pre4" +#define LIBCURL_VERSION "7.6" #define LIBCURL_VERSION_NUM 0x070600 /* linked-list structure for the CURLOPT_QUOTE option (and other) */ -- cgit v1.2.1 From f585b66af788d211513016d08bd7f2c5aaee02e0 Mon Sep 17 00:00:00 2001 From: Daniel Stenberg Date: Mon, 29 Jan 2001 11:36:08 +0000 Subject: 7.6-pre1 --- include/curl/curl.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'include') diff --git a/include/curl/curl.h b/include/curl/curl.h index b23dae77d..cbfc3e1db 100644 --- a/include/curl/curl.h +++ b/include/curl/curl.h @@ -452,8 +452,8 @@ char *curl_getenv(char *variable); char *curl_version(void); /* This is the version number */ -#define LIBCURL_VERSION "7.6" -#define LIBCURL_VERSION_NUM 0x070600 +#define LIBCURL_VERSION "7.6.1-pre1" +#define LIBCURL_VERSION_NUM 0x070601 /* linked-list structure for the CURLOPT_QUOTE option (and other) */ struct curl_slist { -- cgit v1.2.1 From c41c5a0ef236f1eb1a973eeb25f47e848c9e68db Mon Sep 17 00:00:00 2001 From: Daniel Stenberg Date: Wed, 31 Jan 2001 13:54:12 +0000 Subject: curl_read() and Curl_read() now have ssize_t in the last argument --- include/curl/curl.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'include') diff --git a/include/curl/curl.h b/include/curl/curl.h index cbfc3e1db..9568e880c 100644 --- a/include/curl/curl.h +++ b/include/curl/curl.h @@ -554,7 +554,7 @@ CURLcode curl_setopt(CURL *handle, CURLoption option, ...); CURLcode curl_close(CURL *curl); /* the opposite of curl_open() */ CURLcode curl_read(CURLconnect *c_conn, char *buf, size_t buffersize, - size_t *n); + ssize_t *n); CURLcode curl_write(CURLconnect *c_conn, char *buf, size_t amount, size_t *n); -- cgit v1.2.1 From 3b44a3df765318b535ddff9234439b64152fa2fe Mon Sep 17 00:00:00 2001 From: Daniel Stenberg Date: Thu, 1 Feb 2001 07:59:46 +0000 Subject: 7.6.1-pre2 --- include/curl/curl.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'include') diff --git a/include/curl/curl.h b/include/curl/curl.h index 9568e880c..b038834da 100644 --- a/include/curl/curl.h +++ b/include/curl/curl.h @@ -452,7 +452,7 @@ char *curl_getenv(char *variable); char *curl_version(void); /* This is the version number */ -#define LIBCURL_VERSION "7.6.1-pre1" +#define LIBCURL_VERSION "7.6.1-pre2" #define LIBCURL_VERSION_NUM 0x070601 /* linked-list structure for the CURLOPT_QUOTE option (and other) */ -- cgit v1.2.1 From 6f7c70fbbc28fce5903a4d0dfb8bbddf04eae48f Mon Sep 17 00:00:00 2001 From: Daniel Stenberg Date: Sun, 4 Feb 2001 20:03:30 +0000 Subject: CURLINFO_CONTENT_LENGTH_DOWNLOAD and CURLINFO_CONTENT_LENGTH_UPLOAD were added as suggested by Bob Schader --- include/curl/curl.h | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'include') diff --git a/include/curl/curl.h b/include/curl/curl.h index b038834da..4e90bfe2c 100644 --- a/include/curl/curl.h +++ b/include/curl/curl.h @@ -676,7 +676,10 @@ typedef enum { CURLINFO_SSL_VERIFYRESULT = CURLINFO_LONG + 13, CURLINFO_FILETIME = CURLINFO_LONG + 14, - CURLINFO_LASTONE = 15 + CURLINFO_CONTENT_LENGTH_DOWNLOAD = CURLINFO_DOUBLE + 15, + CURLINFO_CONTENT_LENGTH_UPLOAD = CURLINFO_DOUBLE + 16, + + CURLINFO_LASTONE = 17 } CURLINFO; /* -- cgit v1.2.1 From 61e2a8108b604b55bc88e741ad6378827c926ade Mon Sep 17 00:00:00 2001 From: Daniel Stenberg Date: Wed, 7 Feb 2001 09:49:06 +0000 Subject: 7.6.1-pre3 --- include/curl/curl.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'include') diff --git a/include/curl/curl.h b/include/curl/curl.h index 4e90bfe2c..b69ea1e90 100644 --- a/include/curl/curl.h +++ b/include/curl/curl.h @@ -452,7 +452,7 @@ char *curl_getenv(char *variable); char *curl_version(void); /* This is the version number */ -#define LIBCURL_VERSION "7.6.1-pre2" +#define LIBCURL_VERSION "7.6.1-pre3" #define LIBCURL_VERSION_NUM 0x070601 /* linked-list structure for the CURLOPT_QUOTE option (and other) */ -- cgit v1.2.1 From 948c3b3aa9e9485f1720b04adb2c49b6a758483e Mon Sep 17 00:00:00 2001 From: Daniel Stenberg Date: Tue, 13 Feb 2001 13:37:14 +0000 Subject: 7.6.1 commit --- include/curl/curl.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'include') diff --git a/include/curl/curl.h b/include/curl/curl.h index b69ea1e90..5d10d0d15 100644 --- a/include/curl/curl.h +++ b/include/curl/curl.h @@ -452,7 +452,7 @@ char *curl_getenv(char *variable); char *curl_version(void); /* This is the version number */ -#define LIBCURL_VERSION "7.6.1-pre3" +#define LIBCURL_VERSION "7.6.1" #define LIBCURL_VERSION_NUM 0x070601 /* linked-list structure for the CURLOPT_QUOTE option (and other) */ -- cgit v1.2.1 From b887cf7521bdeb9fb4e5e7144e4cf197ea22a345 Mon Sep 17 00:00:00 2001 From: Daniel Stenberg Date: Mon, 19 Feb 2001 09:27:12 +0000 Subject: removed a bunch of "low level" functions that were never used and are about to never become reality either --- include/curl/curl.h | 176 ---------------------------------------------------- 1 file changed, 176 deletions(-) (limited to 'include') diff --git a/include/curl/curl.h b/include/curl/curl.h index 5d10d0d15..f47eae2ce 100644 --- a/include/curl/curl.h +++ b/include/curl/curl.h @@ -464,182 +464,6 @@ struct curl_slist { struct curl_slist *curl_slist_append(struct curl_slist *list, char *data); void curl_slist_free_all(struct curl_slist *list); -/* - * NAME curl_init() - * - * DESCRIPTION - * - * Inits libcurl globally. This must be used before any libcurl calls can - * be used. This may install global plug-ins or whatever. (This does not - * do winsock inits in Windows.) - * - * EXAMPLE - * - * curl_init(); - * - */ -CURLcode curl_init(void); - -/* - * NAME curl_init() - * - * DESCRIPTION - * - * Frees libcurl globally. This must be used after all libcurl calls have - * been used. This may remove global plug-ins or whatever. (This does not - * do winsock cleanups in Windows.) - * - * EXAMPLE - * - * curl_free(curl); - * - */ -void curl_free(void); - -/* - * NAME curl_open() - * - * DESCRIPTION - * - * Opens a general curl session. It does not try to connect or do anything - * on the network because of this call. The specified URL is only required - * to enable curl to figure out what protocol to "activate". - * - * A session should be looked upon as a series of requests to a single host. A - * session interacts with one host only, using one single protocol. - * - * The URL is not required. If set to "" or NULL, it can still be set later - * using the curl_setopt() function. If the curl_connect() function is called - * without the URL being known, it will return error. - * - * EXAMPLE - * - * CURLcode result; - * CURL *curl; - * result = curl_open(&curl, "http://curl.haxx.nu/libcurl/"); - * if(result != CURL_OK) { - * return result; - * } - * */ -CURLcode curl_open(CURL **curl, char *url); - -/* - * NAME curl_setopt() - * - * DESCRIPTION - * - * Sets a particular option to the specified value. - * - * EXAMPLE - * - * CURL curl; - * curl_setopt(curl, CURL_HTTP_FOLLOW_LOCATION, TRUE); - */ -CURLcode curl_setopt(CURL *handle, CURLoption option, ...); - -/* - * NAME curl_close() - * - * DESCRIPTION - * - * Closes a session previously opened with curl_open() - * - * EXAMPLE - * - * CURL *curl; - * CURLcode result; - * - * result = curl_close(curl); - */ -CURLcode curl_close(CURL *curl); /* the opposite of curl_open() */ - -CURLcode curl_read(CURLconnect *c_conn, char *buf, size_t buffersize, - ssize_t *n); -CURLcode curl_write(CURLconnect *c_conn, char *buf, size_t amount, - size_t *n); - -/* - * NAME curl_connect() - * - * DESCRIPTION - * - * Connects to the peer server and performs the initial setup. This function - * writes a connect handle to its second argument that is a unique handle for - * this connect. This allows multiple connects from the same handle returned - * by curl_open(). - * - * EXAMPLE - * - * CURLCode result; - * CURL curl; - * CURLconnect connect; - * result = curl_connect(curl, &connect); - */ - -CURLcode curl_connect(CURL *curl, CURLconnect **in_connect); - -/* - * NAME curl_do() - * - * DESCRIPTION - * - * (Note: May 3rd 2000: this function does not currently allow you to - * specify a document, it will use the one set previously) - * - * This function asks for the particular document, file or resource that - * resides on the server we have connected to. You may specify a full URL, - * just an absolute path or even a relative path. That means, if you're just - * getting one file from the remote site, you can use the same URL as input - * for both curl_open() as well as for this function. - * - * In the even there is a host name, port number, user name or password parts - * in the URL, you can use the 'flags' argument to ignore them completely, or - * at your choice, make the function fail if you're trying to get a URL from - * different host than you connected to with curl_connect(). - * - * You can only get one document at a time using the same connection. When one - * document has been received you can although request again. - * - * When the transfer is done, curl_done() MUST be called. - * - * EXAMPLE - * - * CURLCode result; - * char *url; - * CURLconnect *connect; - * result = curl_do(connect, url, CURL_DO_NONE); */ -CURLcode curl_do(CURLconnect *in_conn); - -/* - * NAME curl_done() - * - * DESCRIPTION - * - * When the transfer following a curl_do() call is done, this function should - * get called. - * - * EXAMPLE - * - * CURLCode result; - * char *url; - * CURLconnect *connect; - * result = curl_done(connect); */ -CURLcode curl_done(CURLconnect *connect); - -/* - * NAME curl_disconnect() - * - * DESCRIPTION - * - * Disconnects from the peer server and performs connection cleanup. - * - * EXAMPLE - * - * CURLcode result; - * CURLconnect *connect; - * result = curl_disconnect(connect); */ -CURLcode curl_disconnect(CURLconnect *connect); - /* * NAME curl_getdate() * -- cgit v1.2.1 From a1d6ad26100bc493c7b04f1301b1634b7f5aa8b4 Mon Sep 17 00:00:00 2001 From: Daniel Stenberg Date: Tue, 20 Feb 2001 17:35:51 +0000 Subject: multiple connection support initial commit --- include/curl/curl.h | 24 ++++++++++++++++++++++-- 1 file changed, 22 insertions(+), 2 deletions(-) (limited to 'include') diff --git a/include/curl/curl.h b/include/curl/curl.h index f47eae2ce..3c94af55f 100644 --- a/include/curl/curl.h +++ b/include/curl/curl.h @@ -158,6 +158,9 @@ typedef enum { CURLE_BAD_PASSWORD_ENTERED, /* when the my_getpass() returns fail */ CURLE_TOO_MANY_REDIRECTS , /* catch endless re-direct loops */ + CURLE_UNKNOWN_TELNET_OPTION , /* User specified an unknown option */ + CURLE_TELNET_OPTION_SYNTAX , /* Malformed telnet option */ + CURL_LAST } CURLcode; @@ -406,6 +409,9 @@ typedef enum { document! Pass a NULL to shut it off. */ CINIT(FILETIME, OBJECTPOINT, 69), + /* This points to a linked list of telnet options */ + CINIT(TELNETOPTIONS, OBJECTPOINT, 70), + CURLOPT_LASTENTRY /* the last unusued */ } CURLoption; @@ -452,8 +458,8 @@ char *curl_getenv(char *variable); char *curl_version(void); /* This is the version number */ -#define LIBCURL_VERSION "7.6.1" -#define LIBCURL_VERSION_NUM 0x070601 +#define LIBCURL_VERSION "7.7-alpha1" +#define LIBCURL_VERSION_NUM 0x070000 /* linked-list structure for the CURLOPT_QUOTE option (and other) */ struct curl_slist { @@ -520,6 +526,20 @@ typedef enum { */ CURLcode curl_getinfo(CURL *curl, CURLINFO info, ...); + +typedef enum { + CURLCLOSEPOLICY_NONE, /* first, never use this */ + + CURLCLOSEPOLICY_OLDEST, + CURLCLOSEPOLICY_LEAST_RECENTLY_USED, + CURLCLOSEPOLICY_LEAST_TRAFFIC, + CURLCLOSEPOLICY_SLOWEST, + CURLCLOSEPOLICY_CALLBACK, + + CURLCLOSEPOLICY_LAST /* last, never use this */ +} curl_closepolicy; + + #ifdef __cplusplus } #endif -- cgit v1.2.1 From 834f07991809b5cd931a78def57f8320e5524ab8 Mon Sep 17 00:00:00 2001 From: Daniel Stenberg Date: Sat, 3 Mar 2001 16:28:59 +0000 Subject: fixed for persistant stuff --- include/curl/curl.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'include') diff --git a/include/curl/curl.h b/include/curl/curl.h index 3c94af55f..6d89f28ec 100644 --- a/include/curl/curl.h +++ b/include/curl/curl.h @@ -467,8 +467,8 @@ struct curl_slist { struct curl_slist *next; }; -struct curl_slist *curl_slist_append(struct curl_slist *list, char *data); -void curl_slist_free_all(struct curl_slist *list); +struct curl_slist *curl_slist_append(struct curl_slist *, const char *); +void curl_slist_free_all(struct curl_slist *); /* * NAME curl_getdate() -- cgit v1.2.1 From 5543c2f11fe9ae27db2f367ac99422888a3e526d Mon Sep 17 00:00:00 2001 From: Daniel Stenberg Date: Sun, 4 Mar 2001 15:32:44 +0000 Subject: Added include of easy.h to enable libcurl-using programs to *only* have to include --- include/curl/curl.h | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'include') diff --git a/include/curl/curl.h b/include/curl/curl.h index 6d89f28ec..d36e654d3 100644 --- a/include/curl/curl.h +++ b/include/curl/curl.h @@ -512,6 +512,10 @@ typedef enum { CURLINFO_LASTONE = 17 } CURLINFO; +/* unfortunately, the easy.h include file needs the options and info stuff + before it can be included! */ +#include /* nothing in curl is fun without the easy stuff */ + /* * NAME curl_getinfo() * -- cgit v1.2.1 From cf8704ccdf60a34ba7862a0848724b9862158c86 Mon Sep 17 00:00:00 2001 From: Daniel Stenberg Date: Sun, 4 Mar 2001 16:34:20 +0000 Subject: 7.7 alpha 2 commit --- include/curl/curl.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'include') diff --git a/include/curl/curl.h b/include/curl/curl.h index d36e654d3..b88ef35fb 100644 --- a/include/curl/curl.h +++ b/include/curl/curl.h @@ -458,7 +458,7 @@ char *curl_getenv(char *variable); char *curl_version(void); /* This is the version number */ -#define LIBCURL_VERSION "7.7-alpha1" +#define LIBCURL_VERSION "7.7-alpha2" #define LIBCURL_VERSION_NUM 0x070000 /* linked-list structure for the CURLOPT_QUOTE option (and other) */ -- cgit v1.2.1 From 97f1c93674d5fd39f2bcc397c79f2e31773e1aa1 Mon Sep 17 00:00:00 2001 From: Daniel Stenberg Date: Thu, 8 Mar 2001 09:04:43 +0000 Subject: added lots of numbers for the error codes as they're often printed and used --- include/curl/curl.h | 116 +++++++++++++++++++++++----------------------------- 1 file changed, 51 insertions(+), 65 deletions(-) (limited to 'include') diff --git a/include/curl/curl.h b/include/curl/curl.h index b88ef35fb..9b437dce8 100644 --- a/include/curl/curl.h +++ b/include/curl/curl.h @@ -97,71 +97,57 @@ typedef int (*curl_passwd_callback)(void *clientp, typedef enum { CURLE_OK = 0, - CURLE_UNSUPPORTED_PROTOCOL, - CURLE_FAILED_INIT, - CURLE_URL_MALFORMAT, - CURLE_URL_MALFORMAT_USER, - CURLE_COULDNT_RESOLVE_PROXY, - CURLE_COULDNT_RESOLVE_HOST, - CURLE_COULDNT_CONNECT, - CURLE_FTP_WEIRD_SERVER_REPLY, - CURLE_FTP_ACCESS_DENIED, - CURLE_FTP_USER_PASSWORD_INCORRECT, - CURLE_FTP_WEIRD_PASS_REPLY, - CURLE_FTP_WEIRD_USER_REPLY, - CURLE_FTP_WEIRD_PASV_REPLY, - CURLE_FTP_WEIRD_227_FORMAT, - CURLE_FTP_CANT_GET_HOST, - CURLE_FTP_CANT_RECONNECT, - CURLE_FTP_COULDNT_SET_BINARY, - CURLE_PARTIAL_FILE, - CURLE_FTP_COULDNT_RETR_FILE, - CURLE_FTP_WRITE_ERROR, - CURLE_FTP_QUOTE_ERROR, - CURLE_HTTP_NOT_FOUND, - CURLE_WRITE_ERROR, - - CURLE_MALFORMAT_USER, /* the user name is illegally specified */ - CURLE_FTP_COULDNT_STOR_FILE, /* failed FTP upload */ - CURLE_READ_ERROR, /* could open/read from file */ - - CURLE_OUT_OF_MEMORY, - CURLE_OPERATION_TIMEOUTED, /* the timeout time was reached */ - CURLE_FTP_COULDNT_SET_ASCII, /* TYPE A failed */ - - CURLE_FTP_PORT_FAILED, /* FTP PORT operation failed */ - - CURLE_FTP_COULDNT_USE_REST, /* the REST command failed */ - CURLE_FTP_COULDNT_GET_SIZE, /* the SIZE command failed */ - - CURLE_HTTP_RANGE_ERROR, /* The RANGE "command" didn't seem to work */ - - CURLE_HTTP_POST_ERROR, - - CURLE_SSL_CONNECT_ERROR, /* something was wrong when connecting with SSL */ - - CURLE_FTP_BAD_DOWNLOAD_RESUME, /* couldn't resume download */ - - CURLE_FILE_COULDNT_READ_FILE, - - CURLE_LDAP_CANNOT_BIND, - CURLE_LDAP_SEARCH_FAILED, - CURLE_LIBRARY_NOT_FOUND, - CURLE_FUNCTION_NOT_FOUND, - - CURLE_ABORTED_BY_CALLBACK, - CURLE_BAD_FUNCTION_ARGUMENT, - CURLE_BAD_CALLING_ORDER, - - CURLE_HTTP_PORT_FAILED, /* HTTP Interface operation failed */ - - CURLE_BAD_PASSWORD_ENTERED, /* when the my_getpass() returns fail */ - CURLE_TOO_MANY_REDIRECTS , /* catch endless re-direct loops */ - - CURLE_UNKNOWN_TELNET_OPTION , /* User specified an unknown option */ - CURLE_TELNET_OPTION_SYNTAX , /* Malformed telnet option */ - - CURL_LAST + CURLE_UNSUPPORTED_PROTOCOL, /* 1 */ + CURLE_FAILED_INIT, /* 2 */ + CURLE_URL_MALFORMAT, /* 3 */ + CURLE_URL_MALFORMAT_USER, /* 4 */ + CURLE_COULDNT_RESOLVE_PROXY, /* 5 */ + CURLE_COULDNT_RESOLVE_HOST, /* 6 */ + CURLE_COULDNT_CONNECT, /* 7 */ + CURLE_FTP_WEIRD_SERVER_REPLY, /* 8 */ + CURLE_FTP_ACCESS_DENIED, /* 9 */ + CURLE_FTP_USER_PASSWORD_INCORRECT, /* 10 */ + CURLE_FTP_WEIRD_PASS_REPLY, /* 11 */ + CURLE_FTP_WEIRD_USER_REPLY, /* 12 */ + CURLE_FTP_WEIRD_PASV_REPLY, /* 13 */ + CURLE_FTP_WEIRD_227_FORMAT, /* 14 */ + CURLE_FTP_CANT_GET_HOST, /* 15 */ + CURLE_FTP_CANT_RECONNECT, /* 16 */ + CURLE_FTP_COULDNT_SET_BINARY, /* 17 */ + CURLE_PARTIAL_FILE, /* 18 */ + CURLE_FTP_COULDNT_RETR_FILE, /* 19 */ + CURLE_FTP_WRITE_ERROR, /* 20 */ + CURLE_FTP_QUOTE_ERROR, /* 21 */ + CURLE_HTTP_NOT_FOUND, /* 22 */ + CURLE_WRITE_ERROR, /* 23 */ + CURLE_MALFORMAT_USER, /* 24 - user name is illegally specified */ + CURLE_FTP_COULDNT_STOR_FILE, /* 25 - failed FTP upload */ + CURLE_READ_ERROR, /* 26 - could open/read from file */ + CURLE_OUT_OF_MEMORY, /* 27 */ + CURLE_OPERATION_TIMEOUTED, /* 28 - the timeout time was reached */ + CURLE_FTP_COULDNT_SET_ASCII, /* 29 - TYPE A failed */ + CURLE_FTP_PORT_FAILED, /* 30 - FTP PORT operation failed */ + CURLE_FTP_COULDNT_USE_REST, /* 31 - the REST command failed */ + CURLE_FTP_COULDNT_GET_SIZE, /* 32 - the SIZE command failed */ + CURLE_HTTP_RANGE_ERROR, /* 33 - RANGE "command" didn't work */ + CURLE_HTTP_POST_ERROR, /* 34 */ + CURLE_SSL_CONNECT_ERROR, /* 35 - wrong when connecting with SSL */ + CURLE_FTP_BAD_DOWNLOAD_RESUME, /* 36 - couldn't resume download */ + CURLE_FILE_COULDNT_READ_FILE, /* 37 */ + CURLE_LDAP_CANNOT_BIND, /* 38 */ + CURLE_LDAP_SEARCH_FAILED, /* 39 */ + CURLE_LIBRARY_NOT_FOUND, /* 40 */ + CURLE_FUNCTION_NOT_FOUND, /* 41 */ + CURLE_ABORTED_BY_CALLBACK, /* 42 */ + CURLE_BAD_FUNCTION_ARGUMENT, /* 43 */ + CURLE_BAD_CALLING_ORDER, /* 44 */ + CURLE_HTTP_PORT_FAILED, /* 45 - HTTP Interface operation failed */ + CURLE_BAD_PASSWORD_ENTERED, /* 46 - my_getpass() returns fail */ + CURLE_TOO_MANY_REDIRECTS , /* 47 - catch endless re-direct loops */ + CURLE_UNKNOWN_TELNET_OPTION, /* 48 - User specified an unknown option */ + CURLE_TELNET_OPTION_SYNTAX , /* 49 - Malformed telnet option */ + + CURL_LAST /* never use! */ } CURLcode; /* This is just to make older programs not break: */ -- cgit v1.2.1 From b4f70aa2c823886cfc56894a74ab06115744f4e6 Mon Sep 17 00:00:00 2001 From: Daniel Stenberg Date: Thu, 8 Mar 2001 12:35:51 +0000 Subject: version 7.7-beta1 --- include/curl/curl.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'include') diff --git a/include/curl/curl.h b/include/curl/curl.h index 9b437dce8..212372ffc 100644 --- a/include/curl/curl.h +++ b/include/curl/curl.h @@ -444,8 +444,8 @@ char *curl_getenv(char *variable); char *curl_version(void); /* This is the version number */ -#define LIBCURL_VERSION "7.7-alpha2" -#define LIBCURL_VERSION_NUM 0x070000 +#define LIBCURL_VERSION "7.7-beta1" +#define LIBCURL_VERSION_NUM 0x070700 /* linked-list structure for the CURLOPT_QUOTE option (and other) */ struct curl_slist { -- cgit v1.2.1 From 8495fac1c58f33c92230f88862557e137b10ee1a Mon Sep 17 00:00:00 2001 From: Daniel Stenberg Date: Mon, 12 Mar 2001 15:06:29 +0000 Subject: Added options for the persistant support, they're also documented in curl_easy_setopt.3 now --- include/curl/curl.h | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) (limited to 'include') diff --git a/include/curl/curl.h b/include/curl/curl.h index 212372ffc..4d5e4a0ec 100644 --- a/include/curl/curl.h +++ b/include/curl/curl.h @@ -398,6 +398,26 @@ typedef enum { /* This points to a linked list of telnet options */ CINIT(TELNETOPTIONS, OBJECTPOINT, 70), + /* Max amount of cached alive connections */ + CINIT(MAXCONNECTS, LONG, 71), + + /* What policy to use when closing connections when the cache is filled + up */ + CINIT(CLOSEPOLICY, LONG, 72), + + /* Callback to use when CURLCLOSEPOLICY_CALLBACK is set */ + CINIT(CLOSEFUNCTION, FUNCTIONPOINT, 73), + + /* Set to explicitly use a new connection for the upcoming transfer. + Do not use this unless you're absolutely sure of this, as it makes the + operation slower and is less friendly for the network. */ + CINIT(FRESH_CONNECT, LONG, 74), + + /* Set to explicitly forbid the upcoming transfer's connection to be re-used + when done. Do not use this unless you're absolutely sure of this, as it + makes the operation slower and is less friendly for the network. */ + CINIT(FORBID_REUSE, LONG, 75), + CURLOPT_LASTENTRY /* the last unusued */ } CURLoption; -- cgit v1.2.1 From f2fd1b8856559ef9a8dfb2d996fa452e4ee6f41a Mon Sep 17 00:00:00 2001 From: Daniel Stenberg Date: Mon, 12 Mar 2001 15:47:17 +0000 Subject: two new random seed options: CURLOPT_RANDOM_FILE and CURLOPT_EGDSOCKET --- include/curl/curl.h | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'include') diff --git a/include/curl/curl.h b/include/curl/curl.h index 4d5e4a0ec..27a889c64 100644 --- a/include/curl/curl.h +++ b/include/curl/curl.h @@ -418,6 +418,13 @@ typedef enum { makes the operation slower and is less friendly for the network. */ CINIT(FORBID_REUSE, LONG, 75), + /* Set to a file name that contains random data for libcurl to use to + seed the random engine when doing SSL connects. */ + CINIT(RANDOM_FILE, OBJECTPOINT, 76), + + /* Set to the Entropy Gathering Daemon socket pathname */ + CINIT(EGDSOCKET, OBJECTPOINT, 77), + CURLOPT_LASTENTRY /* the last unusued */ } CURLoption; -- cgit v1.2.1 From a9390665b811ac68c68e2447b7282359b98d13cc Mon Sep 17 00:00:00 2001 From: Daniel Stenberg Date: Tue, 13 Mar 2001 07:46:19 +0000 Subject: curl_getinfo is removed, not a public function --- include/curl/curl.h | 15 --------------- 1 file changed, 15 deletions(-) (limited to 'include') diff --git a/include/curl/curl.h b/include/curl/curl.h index 27a889c64..eaa245d42 100644 --- a/include/curl/curl.h +++ b/include/curl/curl.h @@ -529,21 +529,6 @@ typedef enum { before it can be included! */ #include /* nothing in curl is fun without the easy stuff */ -/* - * NAME curl_getinfo() - * - * DESCRIPTION - * - * Request internal information from the curl session with this function. - * The third argument MUST be a pointer to a long or a pointer to a char *. - * The data pointed to will be filled in accordingly and can be relied upon - * only if the function returns CURLE_OK. - * This function is intended to get used *AFTER* a performed transfer, all - * results are undefined before the transfer is completed. - */ -CURLcode curl_getinfo(CURL *curl, CURLINFO info, ...); - - typedef enum { CURLCLOSEPOLICY_NONE, /* first, never use this */ -- cgit v1.2.1 From ff681f7bfd39df83ebc1e84f468b2a42c243fbcf Mon Sep 17 00:00:00 2001 From: Daniel Stenberg Date: Tue, 13 Mar 2001 15:44:31 +0000 Subject: 7.7 beta 2 fixes --- include/curl/curl.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'include') diff --git a/include/curl/curl.h b/include/curl/curl.h index eaa245d42..95d479c92 100644 --- a/include/curl/curl.h +++ b/include/curl/curl.h @@ -471,7 +471,7 @@ char *curl_getenv(char *variable); char *curl_version(void); /* This is the version number */ -#define LIBCURL_VERSION "7.7-beta1" +#define LIBCURL_VERSION "7.7-beta2" #define LIBCURL_VERSION_NUM 0x070700 /* linked-list structure for the CURLOPT_QUOTE option (and other) */ -- cgit v1.2.1 From dbbd20646f7133114b1ef4cd92a1c857bb33aeb0 Mon Sep 17 00:00:00 2001 From: Daniel Stenberg Date: Wed, 14 Mar 2001 08:53:31 +0000 Subject: Curl_str(n)equal renamed to curl_str(n)equal --- include/curl/curl.h | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'include') diff --git a/include/curl/curl.h b/include/curl/curl.h index 95d479c92..7ce4ff87e 100644 --- a/include/curl/curl.h +++ b/include/curl/curl.h @@ -450,10 +450,10 @@ typedef enum { NOTE: they return TRUE if the strings match *case insensitively*. */ -extern int (Curl_strequal)(const char *s1, const char *s2); -extern int (Curl_strnequal)(const char *s1, const char *s2, size_t n); -#define strequal(a,b) Curl_strequal(a,b) -#define strnequal(a,b,c) Curl_strnequal(a,b,c) +extern int (curl_strequal)(const char *s1, const char *s2); +extern int (curl_strnequal)(const char *s1, const char *s2, size_t n); +#define strequal(a,b) curl_strequal(a,b) +#define strnequal(a,b,c) curl_strnequal(a,b,c) /* external form function */ int curl_formparse(char *string, -- cgit v1.2.1 From 1841c8ee6af2b408d1597f77e376291611b3b783 Mon Sep 17 00:00:00 2001 From: Daniel Stenberg Date: Wed, 14 Mar 2001 11:25:44 +0000 Subject: curl 7.7 beta 3 --- include/curl/curl.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'include') diff --git a/include/curl/curl.h b/include/curl/curl.h index 7ce4ff87e..69f30a399 100644 --- a/include/curl/curl.h +++ b/include/curl/curl.h @@ -471,7 +471,7 @@ char *curl_getenv(char *variable); char *curl_version(void); /* This is the version number */ -#define LIBCURL_VERSION "7.7-beta2" +#define LIBCURL_VERSION "7.7-beta3" #define LIBCURL_VERSION_NUM 0x070700 /* linked-list structure for the CURLOPT_QUOTE option (and other) */ -- cgit v1.2.1 From 2360e5ce126d4e7453f15f5d7a6f3527d01a3938 Mon Sep 17 00:00:00 2001 From: Daniel Stenberg Date: Thu, 15 Mar 2001 14:37:41 +0000 Subject: Added CURLOPT_CONNECTTIMEOUT --- include/curl/curl.h | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'include') diff --git a/include/curl/curl.h b/include/curl/curl.h index 69f30a399..175eaddf1 100644 --- a/include/curl/curl.h +++ b/include/curl/curl.h @@ -425,6 +425,11 @@ typedef enum { /* Set to the Entropy Gathering Daemon socket pathname */ CINIT(EGDSOCKET, OBJECTPOINT, 77), + /* Time-out connect operations after this amount of seconds, if connects + are OK within this time, then fine... This only aborts the connect + phase. [Only works on unix-style/SIGALRM operating systems] */ + CINIT(CONNECTTIMEOUT, LONG, 78), + CURLOPT_LASTENTRY /* the last unusued */ } CURLoption; -- cgit v1.2.1 From ea409d037423ce232d7a805cb9ee4da6fd414801 Mon Sep 17 00:00:00 2001 From: Daniel Stenberg Date: Mon, 19 Mar 2001 08:42:00 +0000 Subject: 7.7-beta5 commit --- include/curl/curl.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'include') diff --git a/include/curl/curl.h b/include/curl/curl.h index 175eaddf1..b98f3050f 100644 --- a/include/curl/curl.h +++ b/include/curl/curl.h @@ -476,7 +476,7 @@ char *curl_getenv(char *variable); char *curl_version(void); /* This is the version number */ -#define LIBCURL_VERSION "7.7-beta3" +#define LIBCURL_VERSION "7.7-beta5" #define LIBCURL_VERSION_NUM 0x070700 /* linked-list structure for the CURLOPT_QUOTE option (and other) */ -- cgit v1.2.1 From f8d883355d8a0965534ef8a6da99bd7195cf56d0 Mon Sep 17 00:00:00 2001 From: Daniel Stenberg Date: Thu, 22 Mar 2001 11:40:58 +0000 Subject: the new escape/unescape function setup --- include/curl/curl.h | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'include') diff --git a/include/curl/curl.h b/include/curl/curl.h index b98f3050f..29f77db5a 100644 --- a/include/curl/curl.h +++ b/include/curl/curl.h @@ -475,6 +475,11 @@ char *curl_getenv(char *variable); /* Returns a static ascii string of the libcurl version. */ char *curl_version(void); +/* Escape and unescape URL encoding in strings. The functions return a new + * allocated string or NULL if an error occurred. */ +char *curl_escape(char *string, int length); +char *curl_unescape(char *string, int length); + /* This is the version number */ #define LIBCURL_VERSION "7.7-beta5" #define LIBCURL_VERSION_NUM 0x070700 -- cgit v1.2.1 From 546572da0457f37c698c02d0a08d90fdfcbeedec Mon Sep 17 00:00:00 2001 From: Daniel Stenberg Date: Thu, 22 Mar 2001 17:21:07 +0000 Subject: 7.7 commit --- include/curl/curl.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'include') diff --git a/include/curl/curl.h b/include/curl/curl.h index 29f77db5a..9d9c7a7ff 100644 --- a/include/curl/curl.h +++ b/include/curl/curl.h @@ -481,7 +481,7 @@ char *curl_escape(char *string, int length); char *curl_unescape(char *string, int length); /* This is the version number */ -#define LIBCURL_VERSION "7.7-beta5" +#define LIBCURL_VERSION "7.7" #define LIBCURL_VERSION_NUM 0x070700 /* linked-list structure for the CURLOPT_QUOTE option (and other) */ -- cgit v1.2.1 From 6a26104724892ee31bc8f35e143259aacc2808a4 Mon Sep 17 00:00:00 2001 From: Daniel Stenberg Date: Mon, 26 Mar 2001 13:49:50 +0000 Subject: 7.7.1-beta1 --- include/curl/curl.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'include') diff --git a/include/curl/curl.h b/include/curl/curl.h index 9d9c7a7ff..8b4c75be3 100644 --- a/include/curl/curl.h +++ b/include/curl/curl.h @@ -481,8 +481,8 @@ char *curl_escape(char *string, int length); char *curl_unescape(char *string, int length); /* This is the version number */ -#define LIBCURL_VERSION "7.7" -#define LIBCURL_VERSION_NUM 0x070700 +#define LIBCURL_VERSION "7.7.1-beta1" +#define LIBCURL_VERSION_NUM 0x070701 /* linked-list structure for the CURLOPT_QUOTE option (and other) */ struct curl_slist { -- cgit v1.2.1 From 50a53d4eecec60d348100e8506bd01fefd2b5f7f Mon Sep 17 00:00:00 2001 From: Daniel Stenberg Date: Wed, 4 Apr 2001 06:23:43 +0000 Subject: 7.7.1 commit --- include/curl/curl.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'include') diff --git a/include/curl/curl.h b/include/curl/curl.h index 8b4c75be3..0a612c006 100644 --- a/include/curl/curl.h +++ b/include/curl/curl.h @@ -481,7 +481,7 @@ char *curl_escape(char *string, int length); char *curl_unescape(char *string, int length); /* This is the version number */ -#define LIBCURL_VERSION "7.7.1-beta1" +#define LIBCURL_VERSION "7.7.1" #define LIBCURL_VERSION_NUM 0x070701 /* linked-list structure for the CURLOPT_QUOTE option (and other) */ -- cgit v1.2.1 From 025fa762f644c9c1438c6669c4fe3e1800a112b5 Mon Sep 17 00:00:00 2001 From: Daniel Stenberg Date: Tue, 10 Apr 2001 06:49:32 +0000 Subject: Added new CURLOPT_HEADERFUNCTION callback for writing headers only --- include/curl/curl.h | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'include') diff --git a/include/curl/curl.h b/include/curl/curl.h index 0a612c006..5dbd7b447 100644 --- a/include/curl/curl.h +++ b/include/curl/curl.h @@ -430,6 +430,10 @@ typedef enum { phase. [Only works on unix-style/SIGALRM operating systems] */ CINIT(CONNECTTIMEOUT, LONG, 78), + /* Function that will be called to store headers (instead of fwrite). The + * parameters will use fwrite() syntax, make sure to follow them. */ + CINIT(HEADERFUNCTION, FUNCTIONPOINT, 79), + CURLOPT_LASTENTRY /* the last unusued */ } CURLoption; -- cgit v1.2.1 From 60aa975610b2e72a6625888bb530a032963b2e9c Mon Sep 17 00:00:00 2001 From: Daniel Stenberg Date: Tue, 17 Apr 2001 13:21:13 +0000 Subject: Frederic Lepied's ftp download resume fix --- include/curl/curl.h | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'include') diff --git a/include/curl/curl.h b/include/curl/curl.h index 5dbd7b447..95c6f9970 100644 --- a/include/curl/curl.h +++ b/include/curl/curl.h @@ -146,7 +146,8 @@ typedef enum { CURLE_TOO_MANY_REDIRECTS , /* 47 - catch endless re-direct loops */ CURLE_UNKNOWN_TELNET_OPTION, /* 48 - User specified an unknown option */ CURLE_TELNET_OPTION_SYNTAX , /* 49 - Malformed telnet option */ - + CURLE_ALREADY_COMPLETE, /* 50 - file to dowload is already complete */ + CURL_LAST /* never use! */ } CURLcode; -- cgit v1.2.1 From 16fe0c9be3d8d3b4e81870645eb8b8c98dbfe94a Mon Sep 17 00:00:00 2001 From: Daniel Stenberg Date: Mon, 23 Apr 2001 07:34:55 +0000 Subject: curl 7.7.2 --- include/curl/curl.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'include') diff --git a/include/curl/curl.h b/include/curl/curl.h index 95c6f9970..850c4fcd1 100644 --- a/include/curl/curl.h +++ b/include/curl/curl.h @@ -486,8 +486,8 @@ char *curl_escape(char *string, int length); char *curl_unescape(char *string, int length); /* This is the version number */ -#define LIBCURL_VERSION "7.7.1" -#define LIBCURL_VERSION_NUM 0x070701 +#define LIBCURL_VERSION "7.7.2" +#define LIBCURL_VERSION_NUM 0x070702 /* linked-list structure for the CURLOPT_QUOTE option (and other) */ struct curl_slist { -- cgit v1.2.1 From 9304055df518e5b9c85bd4559fcff12b09fed0f0 Mon Sep 17 00:00:00 2001 From: Daniel Stenberg Date: Fri, 4 May 2001 07:47:11 +0000 Subject: 'FILE *' changed to 'void *' in all callback functions --- include/curl/curl.h | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) (limited to 'include') diff --git a/include/curl/curl.h b/include/curl/curl.h index 850c4fcd1..cf846c338 100644 --- a/include/curl/curl.h +++ b/include/curl/curl.h @@ -76,12 +76,12 @@ typedef int (*curl_progress_callback)(void *clientp, typedef size_t (*curl_write_callback)(char *buffer, size_t size, size_t nitems, - FILE *outstream); + void *outstream); typedef size_t (*curl_read_callback)(char *buffer, size_t size, size_t nitems, - FILE *instream); + void *instream); typedef int (*curl_passwd_callback)(void *clientp, char *prompt, @@ -173,7 +173,7 @@ typedef enum { typedef enum { CINIT(NOTHING, LONG, 0), /********* the first one is unused ************/ - /* This is the FILE * the regular output should be written to. */ + /* This is the FILE * or void * the regular output should be written to. */ CINIT(FILE, OBJECTPOINT, 1), /* The full URL to get/put */ @@ -276,7 +276,8 @@ typedef enum { /* send linked-list of QUOTE commands */ CINIT(QUOTE, OBJECTPOINT, 28), - /* send FILE * to store headers to */ + /* send FILE * or void * to store headers to, if you use a callback it + is simply passed to the callback unmodified */ CINIT(WRITEHEADER, OBJECTPOINT, 29), #ifdef MULTIDOC -- cgit v1.2.1 From 3654bd1b56f99937c038854de7b7229ba75e2916 Mon Sep 17 00:00:00 2001 From: Daniel Stenberg Date: Mon, 7 May 2001 11:12:03 +0000 Subject: 7.7.3 --- include/curl/curl.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'include') diff --git a/include/curl/curl.h b/include/curl/curl.h index cf846c338..8dc8cd7ec 100644 --- a/include/curl/curl.h +++ b/include/curl/curl.h @@ -487,8 +487,8 @@ char *curl_escape(char *string, int length); char *curl_unescape(char *string, int length); /* This is the version number */ -#define LIBCURL_VERSION "7.7.2" -#define LIBCURL_VERSION_NUM 0x070702 +#define LIBCURL_VERSION "7.7.3" +#define LIBCURL_VERSION_NUM 0x070703 /* linked-list structure for the CURLOPT_QUOTE option (and other) */ struct curl_slist { -- cgit v1.2.1 From e0f56897d5ed89d089c0a08ed9b8a3e7c1ad5d08 Mon Sep 17 00:00:00 2001 From: Daniel Stenberg Date: Sat, 12 May 2001 09:37:51 +0000 Subject: CURLE_ALREADY_COMPLETE is removed CURLE_SSL_PEER_CERTIFICATE is added --- include/curl/curl.h | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'include') diff --git a/include/curl/curl.h b/include/curl/curl.h index 8dc8cd7ec..6a2a20c1f 100644 --- a/include/curl/curl.h +++ b/include/curl/curl.h @@ -146,7 +146,8 @@ typedef enum { CURLE_TOO_MANY_REDIRECTS , /* 47 - catch endless re-direct loops */ CURLE_UNKNOWN_TELNET_OPTION, /* 48 - User specified an unknown option */ CURLE_TELNET_OPTION_SYNTAX , /* 49 - Malformed telnet option */ - CURLE_ALREADY_COMPLETE, /* 50 - file to dowload is already complete */ + CURLE_OBSOLETE, /* 50 - removed after 7.7.3 */ + CURLE_SSL_PEER_CERTIFICATE, /* 51 - peer's certificate wasn't ok */ CURL_LAST /* never use! */ } CURLcode; -- cgit v1.2.1 From bb51c20c8b2262b6cc6ae332b83a3fcf52f302e0 Mon Sep 17 00:00:00 2001 From: Daniel Stenberg Date: Wed, 16 May 2001 14:45:50 +0000 Subject: Added #define CURLE_ALREADY_COMPLETE to not break compiles that use that symbol, but libcurl will not return this ever --- include/curl/curl.h | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) (limited to 'include') diff --git a/include/curl/curl.h b/include/curl/curl.h index 6a2a20c1f..7c916185e 100644 --- a/include/curl/curl.h +++ b/include/curl/curl.h @@ -152,6 +152,11 @@ typedef enum { CURL_LAST /* never use! */ } CURLcode; +/* this was the error code 50 in 7.7.3 and a few earlier versions, this + is no longer used by libcurl but is instead #defined here only to not + make programs break */ +#define CURLE_ALREADY_COMPLETE 99999 + /* This is just to make older programs not break: */ #define CURLE_FTP_PARTIAL_FILE CURLE_PARTIAL_FILE @@ -488,8 +493,8 @@ char *curl_escape(char *string, int length); char *curl_unescape(char *string, int length); /* This is the version number */ -#define LIBCURL_VERSION "7.7.3" -#define LIBCURL_VERSION_NUM 0x070703 +#define LIBCURL_VERSION "7.7.4-pre1" +#define LIBCURL_VERSION_NUM 0x070704 /* linked-list structure for the CURLOPT_QUOTE option (and other) */ struct curl_slist { -- cgit v1.2.1 From 93c53424c813e1c177b6b35057adeac0f71b86ac Mon Sep 17 00:00:00 2001 From: Daniel Stenberg Date: Tue, 22 May 2001 18:16:24 +0000 Subject: cleanup commit for new autoconf+automake+libtool versions --- include/curl/curl.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'include') diff --git a/include/curl/curl.h b/include/curl/curl.h index 7c916185e..42b2826e8 100644 --- a/include/curl/curl.h +++ b/include/curl/curl.h @@ -493,7 +493,7 @@ char *curl_escape(char *string, int length); char *curl_unescape(char *string, int length); /* This is the version number */ -#define LIBCURL_VERSION "7.7.4-pre1" +#define LIBCURL_VERSION "7.7.4-pre2" #define LIBCURL_VERSION_NUM 0x070704 /* linked-list structure for the CURLOPT_QUOTE option (and other) */ -- cgit v1.2.1 From f44f512f243e6f0d19aa0a1468b84b67db7cb2f4 Mon Sep 17 00:00:00 2001 From: Daniel Stenberg Date: Mon, 28 May 2001 15:30:38 +0000 Subject: global_init() takes a flag option now, to tell libcurl what _not_ to init. it will make it better when the application uses several libs that use openssl and it also enables us to do the win32 winsock initing in the future if we want to --- include/curl/curl.h | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) (limited to 'include') diff --git a/include/curl/curl.h b/include/curl/curl.h index 42b2826e8..54d6ae3da 100644 --- a/include/curl/curl.h +++ b/include/curl/curl.h @@ -492,8 +492,18 @@ char *curl_version(void); char *curl_escape(char *string, int length); char *curl_unescape(char *string, int length); +/* curl_global_init() should be invoked exactly once for each application that + uses libcurl */ +CURLcode curl_global_init(long flags); + +/* curl_global_cleanup() should be invoked exactly once for each application + that uses libcurl */ +void curl_global_cleanup(void); + + + /* This is the version number */ -#define LIBCURL_VERSION "7.7.4-pre2" +#define LIBCURL_VERSION "7.7.4-pre3" #define LIBCURL_VERSION_NUM 0x070704 /* linked-list structure for the CURLOPT_QUOTE option (and other) */ -- cgit v1.2.1 From 223c48e6b5389ea763305b87dd4486b47a88587e Mon Sep 17 00:00:00 2001 From: Daniel Stenberg Date: Mon, 28 May 2001 21:50:00 +0000 Subject: 7.8-pre1 commit --- include/curl/curl.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'include') diff --git a/include/curl/curl.h b/include/curl/curl.h index 54d6ae3da..f4cf0318c 100644 --- a/include/curl/curl.h +++ b/include/curl/curl.h @@ -503,8 +503,8 @@ void curl_global_cleanup(void); /* This is the version number */ -#define LIBCURL_VERSION "7.7.4-pre3" -#define LIBCURL_VERSION_NUM 0x070704 +#define LIBCURL_VERSION "7.8-pre1" +#define LIBCURL_VERSION_NUM 0x070800 /* linked-list structure for the CURLOPT_QUOTE option (and other) */ struct curl_slist { -- cgit v1.2.1 From b541537c66d19660635703b18bc344789121a409 Mon Sep 17 00:00:00 2001 From: Daniel Stenberg Date: Wed, 30 May 2001 08:00:29 +0000 Subject: curl_global_init() support for CURL_GLOBAL_NOT_SSL --- include/curl/curl.h | 3 +++ 1 file changed, 3 insertions(+) (limited to 'include') diff --git a/include/curl/curl.h b/include/curl/curl.h index f4cf0318c..a6b9d7c37 100644 --- a/include/curl/curl.h +++ b/include/curl/curl.h @@ -573,6 +573,9 @@ typedef enum { CURLCLOSEPOLICY_LAST /* last, never use this */ } curl_closepolicy; +#define CURL_GLOBAL_NOT_SSL (1<<0) +#define CURL_GLOBAL_NOTHING CURL_GLOBAL_NOT_SSL +#define CURL_GLOBAL_DEFAULT 0 #ifdef __cplusplus } -- cgit v1.2.1 From fbca7a83fc7e013ba532e8695c0a1418c0c5d4d9 Mon Sep 17 00:00:00 2001 From: Daniel Stenberg Date: Wed, 30 May 2001 11:24:26 +0000 Subject: 7.8-pre2 --- include/curl/curl.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'include') diff --git a/include/curl/curl.h b/include/curl/curl.h index a6b9d7c37..d21d08dfa 100644 --- a/include/curl/curl.h +++ b/include/curl/curl.h @@ -503,7 +503,7 @@ void curl_global_cleanup(void); /* This is the version number */ -#define LIBCURL_VERSION "7.8-pre1" +#define LIBCURL_VERSION "7.8-pre2" #define LIBCURL_VERSION_NUM 0x070800 /* linked-list structure for the CURLOPT_QUOTE option (and other) */ -- cgit v1.2.1 From 95c94bf658e00c15060d87b052a71b849d6666f3 Mon Sep 17 00:00:00 2001 From: Daniel Stenberg Date: Thu, 31 May 2001 06:10:25 +0000 Subject: the CURL_GLOBAL flags are now used to set what parts to init globally --- include/curl/curl.h | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) (limited to 'include') diff --git a/include/curl/curl.h b/include/curl/curl.h index d21d08dfa..1df686299 100644 --- a/include/curl/curl.h +++ b/include/curl/curl.h @@ -573,9 +573,10 @@ typedef enum { CURLCLOSEPOLICY_LAST /* last, never use this */ } curl_closepolicy; -#define CURL_GLOBAL_NOT_SSL (1<<0) -#define CURL_GLOBAL_NOTHING CURL_GLOBAL_NOT_SSL -#define CURL_GLOBAL_DEFAULT 0 +#define CURL_GLOBAL_SSL (1<<0) +#define CURL_GLOBAL_ALL (CURL_GLOBAL_SSL) +#define CURL_GLOBAL_NOTHING 0 +#define CURL_GLOBAL_DEFAULT CURL_GLOBAL_ALL #ifdef __cplusplus } -- cgit v1.2.1 From efb957039d93697b445638ea185f9281b19b3c88 Mon Sep 17 00:00:00 2001 From: Daniel Stenberg Date: Thu, 31 May 2001 13:52:59 +0000 Subject: MUTE is now considered obsolete --- include/curl/curl.h | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'include') diff --git a/include/curl/curl.h b/include/curl/curl.h index 1df686299..67cb29303 100644 --- a/include/curl/curl.h +++ b/include/curl/curl.h @@ -351,7 +351,8 @@ typedef enum { CINIT(TRANSFERTEXT, LONG, 53), /* transfer data in text/ASCII format */ CINIT(PUT, LONG, 54), /* PUT the input file */ - CINIT(MUTE, LONG, 55), /* force NOPROGRESS */ + + CINIT(MUTE, LONG, 55), /* OBSOLETE OPTION, removed in 7.8 */ /* Function that will be called instead of the internal progress display * function. This function should be defined as the curl_progress_callback @@ -503,7 +504,7 @@ void curl_global_cleanup(void); /* This is the version number */ -#define LIBCURL_VERSION "7.8-pre2" +#define LIBCURL_VERSION "7.8-pre3" #define LIBCURL_VERSION_NUM 0x070800 /* linked-list structure for the CURLOPT_QUOTE option (and other) */ -- cgit v1.2.1 From 259ac2dd77174efd3b33e20c400380bcfcd23913 Mon Sep 17 00:00:00 2001 From: Daniel Stenberg Date: Thu, 7 Jun 2001 09:39:29 +0000 Subject: 7.8 commit --- include/curl/curl.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'include') diff --git a/include/curl/curl.h b/include/curl/curl.h index 67cb29303..464388f57 100644 --- a/include/curl/curl.h +++ b/include/curl/curl.h @@ -504,7 +504,7 @@ void curl_global_cleanup(void); /* This is the version number */ -#define LIBCURL_VERSION "7.8-pre3" +#define LIBCURL_VERSION "7.8" #define LIBCURL_VERSION_NUM 0x070800 /* linked-list structure for the CURLOPT_QUOTE option (and other) */ -- cgit v1.2.1 From 45037a39aa7141510f6c6bcff65d102c65e6566e Mon Sep 17 00:00:00 2001 From: Sterling Hughes Date: Thu, 12 Jul 2001 01:57:28 +0000 Subject: Add win32 initialization support to curl_global_init() and curl_global_cleanup(). Update corresponding man pages... Improve the logic in curl_global_cleanup() and curl_global_init() so that they are not called twice if the application libraries have been initialized and make sure to reset the init flags in curl_global_cleanup(). --- include/curl/curl.h | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'include') diff --git a/include/curl/curl.h b/include/curl/curl.h index 464388f57..e50c73e8c 100644 --- a/include/curl/curl.h +++ b/include/curl/curl.h @@ -575,7 +575,8 @@ typedef enum { } curl_closepolicy; #define CURL_GLOBAL_SSL (1<<0) -#define CURL_GLOBAL_ALL (CURL_GLOBAL_SSL) +#define CURL_GLOBAL_WIN32 (1<<1) +#define CURL_GLOBAL_ALL (CURL_GLOBAL_SSL|CURL_GLOBAL_WIN32) #define CURL_GLOBAL_NOTHING 0 #define CURL_GLOBAL_DEFAULT CURL_GLOBAL_ALL -- cgit v1.2.1 From e791f6ec589681b60c097686777d0b038587e0f7 Mon Sep 17 00:00:00 2001 From: Daniel Stenberg Date: Fri, 3 Aug 2001 11:53:16 +0000 Subject: added CURLOPT_HTTPGET --- include/curl/curl.h | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) (limited to 'include') diff --git a/include/curl/curl.h b/include/curl/curl.h index e50c73e8c..8fcf65edf 100644 --- a/include/curl/curl.h +++ b/include/curl/curl.h @@ -443,6 +443,11 @@ typedef enum { * parameters will use fwrite() syntax, make sure to follow them. */ CINIT(HEADERFUNCTION, FUNCTIONPOINT, 79), + /* Set this to force the HTTP request to get back to GET. Only really usable + if POST, PUT or a custom request have been used first. + */ + CINIT(HTTPGET, LONG, 80), + CURLOPT_LASTENTRY /* the last unusued */ } CURLoption; @@ -504,8 +509,8 @@ void curl_global_cleanup(void); /* This is the version number */ -#define LIBCURL_VERSION "7.8" -#define LIBCURL_VERSION_NUM 0x070800 +#define LIBCURL_VERSION "7.8.1-pre2" +#define LIBCURL_VERSION_NUM 0x070801 /* linked-list structure for the CURLOPT_QUOTE option (and other) */ struct curl_slist { -- cgit v1.2.1 From a6a367380422fcfcd48886c403bfbdecf9c7d28d Mon Sep 17 00:00:00 2001 From: Daniel Stenberg Date: Mon, 6 Aug 2001 08:43:37 +0000 Subject: 7.8.1-pre3 commit --- include/curl/curl.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'include') diff --git a/include/curl/curl.h b/include/curl/curl.h index 8fcf65edf..39317312c 100644 --- a/include/curl/curl.h +++ b/include/curl/curl.h @@ -509,7 +509,7 @@ void curl_global_cleanup(void); /* This is the version number */ -#define LIBCURL_VERSION "7.8.1-pre2" +#define LIBCURL_VERSION "7.8.1-pre3" #define LIBCURL_VERSION_NUM 0x070801 /* linked-list structure for the CURLOPT_QUOTE option (and other) */ -- cgit v1.2.1 From dcfb10fb31ccc93a6affab36c1910201ea5275d9 Mon Sep 17 00:00:00 2001 From: Daniel Stenberg Date: Wed, 8 Aug 2001 07:15:00 +0000 Subject: Patrick Bihan-Faou's verifyhost addition --- include/curl/curl.h | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'include') diff --git a/include/curl/curl.h b/include/curl/curl.h index 39317312c..ae7573955 100644 --- a/include/curl/curl.h +++ b/include/curl/curl.h @@ -448,6 +448,11 @@ typedef enum { */ CINIT(HTTPGET, LONG, 80), + /* Set if we should verify the Common name from the peer certificate in ssl + * handshake, set 1 to check existence, 2 to ensure that it matches the + * provided hostname. */ + CINIT(SSL_VERIFYHOST, LONG, 81), + CURLOPT_LASTENTRY /* the last unusued */ } CURLoption; -- cgit v1.2.1 From 5a0a51a7accbc4c57f4172cc8ede5bd19ea64efd Mon Sep 17 00:00:00 2001 From: Daniel Stenberg Date: Wed, 15 Aug 2001 18:17:14 +0000 Subject: add include of stdio.h, so that base64.c compiles --- include/curl/mprintf.h | 1 + 1 file changed, 1 insertion(+) (limited to 'include') diff --git a/include/curl/mprintf.h b/include/curl/mprintf.h index 6bf24791c..30c4d447f 100644 --- a/include/curl/mprintf.h +++ b/include/curl/mprintf.h @@ -54,6 +54,7 @@ #define H_MPRINTF #include +#include /* needed for FILE */ int curl_mprintf(const char *format, ...); int curl_mfprintf(FILE *fd, const char *format, ...); -- cgit v1.2.1 From 97f3099ff60b5587fd2d81f0c91d41e283364565 Mon Sep 17 00:00:00 2001 From: Daniel Stenberg Date: Wed, 15 Aug 2001 18:33:52 +0000 Subject: curl_getenv() now takes a const char * as argument --- include/curl/curl.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'include') diff --git a/include/curl/curl.h b/include/curl/curl.h index ae7573955..ec8d182b5 100644 --- a/include/curl/curl.h +++ b/include/curl/curl.h @@ -493,7 +493,7 @@ void curl_formfree(struct HttpPost *form); /* Unix and Win32 getenv function call, this returns a malloc()'ed string that MUST be free()ed after usage is complete. */ -char *curl_getenv(char *variable); +char *curl_getenv(const char *variable); /* Returns a static ascii string of the libcurl version. */ char *curl_version(void); -- cgit v1.2.1 From 16215e80d22c8675e92406e94b1b140b1e10cf8c Mon Sep 17 00:00:00 2001 From: Daniel Stenberg Date: Wed, 15 Aug 2001 18:40:43 +0000 Subject: - --- include/curl/curl.h | 11 ++--------- 1 file changed, 2 insertions(+), 9 deletions(-) (limited to 'include') diff --git a/include/curl/curl.h b/include/curl/curl.h index ec8d182b5..ff1341a56 100644 --- a/include/curl/curl.h +++ b/include/curl/curl.h @@ -84,7 +84,7 @@ typedef size_t (*curl_read_callback)(char *buffer, void *instream); typedef int (*curl_passwd_callback)(void *clientp, - char *prompt, + const char *prompt, char *buffer, int buflen); @@ -286,11 +286,6 @@ typedef enum { is simply passed to the callback unmodified */ CINIT(WRITEHEADER, OBJECTPOINT, 29), -#ifdef MULTIDOC - /* send linked list of MoreDoc structs */ - CINIT(MOREDOCS, OBJECTPOINT, 30), -#endif - /* point to a file to read the initial cookies from, also enables "cookie awareness" */ CINIT(COOKIEFILE, OBJECTPOINT, 31), @@ -511,10 +506,8 @@ CURLcode curl_global_init(long flags); that uses libcurl */ void curl_global_cleanup(void); - - /* This is the version number */ -#define LIBCURL_VERSION "7.8.1-pre3" +#define LIBCURL_VERSION "7.8.1-pre5" #define LIBCURL_VERSION_NUM 0x070801 /* linked-list structure for the CURLOPT_QUOTE option (and other) */ -- cgit v1.2.1 From 7dbad3c382a2f346af2f5160aa88cd28c03fbc85 Mon Sep 17 00:00:00 2001 From: Daniel Stenberg Date: Mon, 20 Aug 2001 07:59:03 +0000 Subject: 7.8.1 --- include/curl/curl.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'include') diff --git a/include/curl/curl.h b/include/curl/curl.h index ff1341a56..2f64a79df 100644 --- a/include/curl/curl.h +++ b/include/curl/curl.h @@ -507,7 +507,7 @@ CURLcode curl_global_init(long flags); void curl_global_cleanup(void); /* This is the version number */ -#define LIBCURL_VERSION "7.8.1-pre5" +#define LIBCURL_VERSION "7.8.1" #define LIBCURL_VERSION_NUM 0x070801 /* linked-list structure for the CURLOPT_QUOTE option (and other) */ -- cgit v1.2.1 From 08655d8d5d0ea980227096366c231693198e61d6 Mon Sep 17 00:00:00 2001 From: Daniel Stenberg Date: Tue, 21 Aug 2001 13:18:07 +0000 Subject: Georg Huettenegger's patch curl-7.8.1-pre5-patch-20010819 --- include/curl/curl.h | 37 +++++++++++++++++++++++++++++++++---- 1 file changed, 33 insertions(+), 4 deletions(-) (limited to 'include') diff --git a/include/curl/curl.h b/include/curl/curl.h index 2f64a79df..0c92d7395 100644 --- a/include/curl/curl.h +++ b/include/curl/curl.h @@ -59,12 +59,15 @@ struct HttpPost { struct HttpPost *next; /* next entry in the list */ char *name; /* pointer to allocated name */ char *contents; /* pointer to allocated data contents */ + long contentslength; /* length of contents field */ char *contenttype; /* Content-Type */ struct HttpPost *more; /* if one field name has more than one file, this link should link to following files */ long flags; /* as defined below */ #define HTTPPOST_FILENAME (1<<0) /* specified content is a file name */ #define HTTPPOST_READFILE (1<<1) /* specified content is a file name */ +#define HTTPPOST_PTRCONTENTS (1<<2) /* contents is only stored pointer + do not free in formfree */ }; typedef int (*curl_progress_callback)(void *clientp, @@ -483,6 +486,32 @@ int curl_formparse(char *string, struct HttpPost **httppost, struct HttpPost **last_post); +/* name is uppercase CURLFORM_ */ +#ifdef CFINIT +#undef CFINIT +#endif +#define CFINIT(name) CURLFORM_ ## name + +typedef enum { + CFINIT(NOTHING), /********* the first one is unused ************/ + + /* */ + CFINIT(COPYNAME), + CFINIT(COPYCONTENTS), + CFINIT(PTRCONTENTS), + CFINIT(CONTENTSLENGTH), + CFINIT(FILE), + CFINIT(CONTENTTYPE), + CFINIT(END), + + CURLFORM_LASTENTRY /* the last unusued */ +} CURLformoption; + +/* new external form function */ +int curl_formadd(struct HttpPost **httppost, + struct HttpPost **last_post, + ...); + /* cleanup a form: */ void curl_formfree(struct HttpPost *form); @@ -495,8 +524,8 @@ char *curl_version(void); /* Escape and unescape URL encoding in strings. The functions return a new * allocated string or NULL if an error occurred. */ -char *curl_escape(char *string, int length); -char *curl_unescape(char *string, int length); +char *curl_escape(const char *string, int length); +char *curl_unescape(const char *string, int length); /* curl_global_init() should be invoked exactly once for each application that uses libcurl */ @@ -507,8 +536,8 @@ CURLcode curl_global_init(long flags); void curl_global_cleanup(void); /* This is the version number */ -#define LIBCURL_VERSION "7.8.1" -#define LIBCURL_VERSION_NUM 0x070801 +#define LIBCURL_VERSION "7.8.2-pre1" +#define LIBCURL_VERSION_NUM 0x070802 /* linked-list structure for the CURLOPT_QUOTE option (and other) */ struct curl_slist { -- cgit v1.2.1 From 233b3f718fb7d5dba34ad95b5946af958947e451 Mon Sep 17 00:00:00 2001 From: Daniel Stenberg Date: Tue, 28 Aug 2001 08:55:59 +0000 Subject: curl_formadd() adjustments by Georg Huettenegger --- include/curl/curl.h | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) (limited to 'include') diff --git a/include/curl/curl.h b/include/curl/curl.h index 0c92d7395..2b93f64f2 100644 --- a/include/curl/curl.h +++ b/include/curl/curl.h @@ -58,6 +58,7 @@ extern "C" { struct HttpPost { struct HttpPost *next; /* next entry in the list */ char *name; /* pointer to allocated name */ + long namelength; /* length of name length */ char *contents; /* pointer to allocated data contents */ long contentslength; /* length of contents field */ char *contenttype; /* Content-Type */ @@ -66,8 +67,10 @@ struct HttpPost { long flags; /* as defined below */ #define HTTPPOST_FILENAME (1<<0) /* specified content is a file name */ #define HTTPPOST_READFILE (1<<1) /* specified content is a file name */ -#define HTTPPOST_PTRCONTENTS (1<<2) /* contents is only stored pointer - do not free in formfree */ +#define HTTPPOST_PTRNAME (1<<2) /* name is only stored pointer + do not free in formfree */ +#define HTTPPOST_PTRCONTENTS (1<<3) /* contents is only stored pointer + do not free in formfree */ }; typedef int (*curl_progress_callback)(void *clientp, @@ -497,6 +500,8 @@ typedef enum { /* */ CFINIT(COPYNAME), + CFINIT(PTRNAME), + CFINIT(NAMELENGTH), CFINIT(COPYCONTENTS), CFINIT(PTRCONTENTS), CFINIT(CONTENTSLENGTH), -- cgit v1.2.1 From 8e0043165a05318f46c9ba1b98c6c3e88245a5f0 Mon Sep 17 00:00:00 2001 From: Daniel Stenberg Date: Wed, 29 Aug 2001 09:32:50 +0000 Subject: added COOKIEJAR --- include/curl/curl.h | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'include') diff --git a/include/curl/curl.h b/include/curl/curl.h index 2b93f64f2..ddf7d3870 100644 --- a/include/curl/curl.h +++ b/include/curl/curl.h @@ -453,6 +453,10 @@ typedef enum { * handshake, set 1 to check existence, 2 to ensure that it matches the * provided hostname. */ CINIT(SSL_VERIFYHOST, LONG, 81), + + /* Specify which file name to write all known cookies in after completed + operation. Set file name to "-" (dash) to make it go to stdout. */ + CINIT(COOKIEJAR, OBJECTPOINT, 82), CURLOPT_LASTENTRY /* the last unusued */ } CURLoption; -- cgit v1.2.1 From be47d835556ed56679b11b0cc74132759d07da05 Mon Sep 17 00:00:00 2001 From: Daniel Stenberg Date: Tue, 11 Sep 2001 22:36:43 +0000 Subject: added CURLOPT_SSL_CIPHER_LIST --- include/curl/curl.h | 3 +++ 1 file changed, 3 insertions(+) (limited to 'include') diff --git a/include/curl/curl.h b/include/curl/curl.h index ddf7d3870..698d84625 100644 --- a/include/curl/curl.h +++ b/include/curl/curl.h @@ -457,6 +457,9 @@ typedef enum { /* Specify which file name to write all known cookies in after completed operation. Set file name to "-" (dash) to make it go to stdout. */ CINIT(COOKIEJAR, OBJECTPOINT, 82), + + /* Specify which SSL ciphers to use */ + CINIT(SSL_CIPHER_LIST, OBJECTPOINT, 83), CURLOPT_LASTENTRY /* the last unusued */ } CURLoption; -- cgit v1.2.1 From db5c1c61e5ea6f107406a3701be90e925be94eed Mon Sep 17 00:00:00 2001 From: Daniel Stenberg Date: Thu, 13 Sep 2001 14:50:04 +0000 Subject: added curl_easy_duphandle --- include/curl/easy.h | 15 +++++++++++++++ 1 file changed, 15 insertions(+) (limited to 'include') diff --git a/include/curl/easy.h b/include/curl/easy.h index d0e102be9..d3545ffb0 100644 --- a/include/curl/easy.h +++ b/include/curl/easy.h @@ -46,6 +46,21 @@ void curl_easy_cleanup(CURL *curl); */ CURLcode curl_easy_getinfo(CURL *curl, CURLINFO info, ...); + +/* + * NAME curl_easy_duphandle() + * + * DESCRIPTION + * + * Creates a new curl session handle with the same options set for the handle + * passed in. Duplicating a handle could only be a matter of cloning data and + * options, internal state info and things like persistant connections cannot + * be transfered. It is useful in multithreaded applications when you can run + * curl_easy_duphandle() for each new thread to avoid a series of identical + * curl_easy_setopt() invokes in every thread. + */ +CURL* curl_easy_duphandle(CURL *curl); + #ifdef __cplusplus } #endif -- cgit v1.2.1 From e30dcd05017726859fb185090741b700996f26aa Mon Sep 17 00:00:00 2001 From: Daniel Stenberg Date: Mon, 17 Sep 2001 14:10:38 +0000 Subject: Linus Nielsen Feltzing's telnet-for-win32 fixes --- include/curl/curl.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'include') diff --git a/include/curl/curl.h b/include/curl/curl.h index 698d84625..036dc04aa 100644 --- a/include/curl/curl.h +++ b/include/curl/curl.h @@ -548,8 +548,8 @@ CURLcode curl_global_init(long flags); void curl_global_cleanup(void); /* This is the version number */ -#define LIBCURL_VERSION "7.8.2-pre1" -#define LIBCURL_VERSION_NUM 0x070802 +#define LIBCURL_VERSION "7.9-pre6" +#define LIBCURL_VERSION_NUM 0x070900 /* linked-list structure for the CURLOPT_QUOTE option (and other) */ struct curl_slist { -- cgit v1.2.1 From 4d2cb8b32aa7dbd2607a522ee63193c151665766 Mon Sep 17 00:00:00 2001 From: Daniel Stenberg Date: Tue, 25 Sep 2001 06:39:18 +0000 Subject: 7.9 commit --- include/curl/curl.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'include') diff --git a/include/curl/curl.h b/include/curl/curl.h index 036dc04aa..71f4a4775 100644 --- a/include/curl/curl.h +++ b/include/curl/curl.h @@ -548,7 +548,7 @@ CURLcode curl_global_init(long flags); void curl_global_cleanup(void); /* This is the version number */ -#define LIBCURL_VERSION "7.9-pre6" +#define LIBCURL_VERSION "7.9" #define LIBCURL_VERSION_NUM 0x070900 /* linked-list structure for the CURLOPT_QUOTE option (and other) */ -- cgit v1.2.1 From 3d4cd8c9aaedef535e42185ae6e6757d902b727d Mon Sep 17 00:00:00 2001 From: Daniel Stenberg Date: Wed, 3 Oct 2001 08:01:38 +0000 Subject: added new curl_formadd() stuff --- include/curl/curl.h | 14 ++++++++++++-- 1 file changed, 12 insertions(+), 2 deletions(-) (limited to 'include') diff --git a/include/curl/curl.h b/include/curl/curl.h index 71f4a4775..7f6b073cb 100644 --- a/include/curl/curl.h +++ b/include/curl/curl.h @@ -512,13 +512,23 @@ typedef enum { CFINIT(COPYCONTENTS), CFINIT(PTRCONTENTS), CFINIT(CONTENTSLENGTH), + CFINIT(FILECONTENT), + CFINIT(ARRAY), + CFINIT(ARRAY_START), /* below are the options allowed within a array */ CFINIT(FILE), CFINIT(CONTENTTYPE), CFINIT(END), + CFINIT(ARRAY_END), /* up are the options allowed within a array */ CURLFORM_LASTENTRY /* the last unusued */ } CURLformoption; +/* structure to be used as parameter for CURLFORM_ARRAY */ +struct curl_forms { + CURLformoption option; + const char *value; +}; + /* new external form function */ int curl_formadd(struct HttpPost **httppost, struct HttpPost **last_post, @@ -548,8 +558,8 @@ CURLcode curl_global_init(long flags); void curl_global_cleanup(void); /* This is the version number */ -#define LIBCURL_VERSION "7.9" -#define LIBCURL_VERSION_NUM 0x070900 +#define LIBCURL_VERSION "7.9.1-pre1" +#define LIBCURL_VERSION_NUM 0x070901 /* linked-list structure for the CURLOPT_QUOTE option (and other) */ struct curl_slist { -- cgit v1.2.1 From de79348a9011d95449826ee79f3340e4522e9d6d Mon Sep 17 00:00:00 2001 From: Daniel Stenberg Date: Tue, 9 Oct 2001 06:53:53 +0000 Subject: New: CURLOPT_HTTP_VERSION Renamed: the TimeCond type to curl_TimeCond --- include/curl/curl.h | 20 ++++++++++++++++++-- 1 file changed, 18 insertions(+), 2 deletions(-) (limited to 'include') diff --git a/include/curl/curl.h b/include/curl/curl.h index 7f6b073cb..11ffb0a2f 100644 --- a/include/curl/curl.h +++ b/include/curl/curl.h @@ -460,10 +460,26 @@ typedef enum { /* Specify which SSL ciphers to use */ CINIT(SSL_CIPHER_LIST, OBJECTPOINT, 83), + + /* Specify which HTTP version to use! This must be set to one of the + CURL_HTTP_VERSION* enums set below. */ + CINIT(HTTP_VERSION, LONG, 84), CURLOPT_LASTENTRY /* the last unusued */ } CURLoption; + /* These enums are for use with the CURLOPT_HTTP_VERSION option. */ +enum { + CURL_HTTP_VERSION_NONE, /* setting this means we don't care, and that we'd + like the library to choose the best possible + for us! */ + CURL_HTTP_VERSION_1_0, /* please use HTTP 1.0 in the request */ + CURL_HTTP_VERSION_1_1, /* please use HTTP 1.1 in the request */ + + CURL_HTTP_VERSION_LAST /* *ILLEGAL* http version */ +}; + + typedef enum { TIMECOND_NONE, @@ -472,7 +488,7 @@ typedef enum { TIMECOND_LASTMOD, TIMECOND_LAST -} TimeCond; +} curl_TimeCond; #ifdef __BEOS__ #include @@ -558,7 +574,7 @@ CURLcode curl_global_init(long flags); void curl_global_cleanup(void); /* This is the version number */ -#define LIBCURL_VERSION "7.9.1-pre1" +#define LIBCURL_VERSION "7.9.1-pre2" #define LIBCURL_VERSION_NUM 0x070901 /* linked-list structure for the CURLOPT_QUOTE option (and other) */ -- cgit v1.2.1 From aa9c01ad3ec3d7e9ac140f6f205aadaa098ef8e1 Mon Sep 17 00:00:00 2001 From: Daniel Stenberg Date: Fri, 19 Oct 2001 11:59:04 +0000 Subject: new return code: CURLE_GOT_NOTHING --- include/curl/curl.h | 1 + 1 file changed, 1 insertion(+) (limited to 'include') diff --git a/include/curl/curl.h b/include/curl/curl.h index 11ffb0a2f..3c0efc69a 100644 --- a/include/curl/curl.h +++ b/include/curl/curl.h @@ -154,6 +154,7 @@ typedef enum { CURLE_TELNET_OPTION_SYNTAX , /* 49 - Malformed telnet option */ CURLE_OBSOLETE, /* 50 - removed after 7.7.3 */ CURLE_SSL_PEER_CERTIFICATE, /* 51 - peer's certificate wasn't ok */ + CURLE_GOT_NOTHING, /* 52 - when this is a specific error */ CURL_LAST /* never use! */ } CURLcode; -- cgit v1.2.1 From 5ccd6bb8429b5ab2776409d3b18fe8d2860e2ea7 Mon Sep 17 00:00:00 2001 From: Daniel Stenberg Date: Mon, 22 Oct 2001 06:39:47 +0000 Subject: 2000 => 2001 --- include/curl/curl.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'include') diff --git a/include/curl/curl.h b/include/curl/curl.h index 3c0efc69a..85ace4729 100644 --- a/include/curl/curl.h +++ b/include/curl/curl.h @@ -7,7 +7,7 @@ * | (__| |_| | _ <| |___ * \___|\___/|_| \_\_____| * - * Copyright (C) 2000, Daniel Stenberg, , et al. + * Copyright (C) 2001, Daniel Stenberg, , et al. * * In order to be useful for every potential user, curl and libcurl are * dual-licensed under the MPL and the MIT/X-derivate licenses. @@ -575,7 +575,7 @@ CURLcode curl_global_init(long flags); void curl_global_cleanup(void); /* This is the version number */ -#define LIBCURL_VERSION "7.9.1-pre2" +#define LIBCURL_VERSION "7.9.1-pre4" #define LIBCURL_VERSION_NUM 0x070901 /* linked-list structure for the CURLOPT_QUOTE option (and other) */ -- cgit v1.2.1 From 329bcf3a7117c7e5c26d7c8f840af64fb7140753 Mon Sep 17 00:00:00 2001 From: Daniel Stenberg Date: Sun, 4 Nov 2001 11:35:12 +0000 Subject: 7.9.1 cleanup commit --- include/curl/curl.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'include') diff --git a/include/curl/curl.h b/include/curl/curl.h index 85ace4729..1075b6e4f 100644 --- a/include/curl/curl.h +++ b/include/curl/curl.h @@ -575,7 +575,7 @@ CURLcode curl_global_init(long flags); void curl_global_cleanup(void); /* This is the version number */ -#define LIBCURL_VERSION "7.9.1-pre4" +#define LIBCURL_VERSION "7.9.1" #define LIBCURL_VERSION_NUM 0x070901 /* linked-list structure for the CURLOPT_QUOTE option (and other) */ -- cgit v1.2.1 From af636c535c6b8bb6dfb5b8d2ddb1fb1023d7baf2 Mon Sep 17 00:00:00 2001 From: Daniel Stenberg Date: Mon, 5 Nov 2001 14:07:20 +0000 Subject: Added an CURL_SSLVERSION_* enum for SSL protocol versions --- include/curl/curl.h | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) (limited to 'include') diff --git a/include/curl/curl.h b/include/curl/curl.h index 1075b6e4f..3a815ad55 100644 --- a/include/curl/curl.h +++ b/include/curl/curl.h @@ -298,7 +298,7 @@ typedef enum { CINIT(COOKIEFILE, OBJECTPOINT, 31), /* What version to specifly try to use. - 3 = SSLv3, 2 = SSLv2, all else makes it try v3 first then v2 */ + See CURL_SSLVERSION defines below. */ CINIT(SSLVERSION, LONG, 32), /* What kind of HTTP time condition to use, see defines */ @@ -480,6 +480,15 @@ enum { CURL_HTTP_VERSION_LAST /* *ILLEGAL* http version */ }; +enum { + CURL_SSLVERSION_DEFAULT, + CURL_SSLVERSION_TLSv1, + CURL_SSLVERSION_SSLv2, + CURL_SSLVERSION_SSLv3, + + CURL_SSLVERSION_LAST /* never use, keep last */ +}; + typedef enum { TIMECOND_NONE, -- cgit v1.2.1 From ca0fd33d2d3ecca13bc78893e165a34682b4dcd2 Mon Sep 17 00:00:00 2001 From: Daniel Stenberg Date: Tue, 20 Nov 2001 15:00:50 +0000 Subject: Georg Horn's STARTTRANSFER_TIME patch --- include/curl/curl.h | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) (limited to 'include') diff --git a/include/curl/curl.h b/include/curl/curl.h index 3a815ad55..48b82d177 100644 --- a/include/curl/curl.h +++ b/include/curl/curl.h @@ -584,8 +584,8 @@ CURLcode curl_global_init(long flags); void curl_global_cleanup(void); /* This is the version number */ -#define LIBCURL_VERSION "7.9.1" -#define LIBCURL_VERSION_NUM 0x070901 +#define LIBCURL_VERSION "7.9.2-pre3" +#define LIBCURL_VERSION_NUM 0x070902 /* linked-list structure for the CURLOPT_QUOTE option (and other) */ struct curl_slist { @@ -635,7 +635,9 @@ typedef enum { CURLINFO_CONTENT_LENGTH_DOWNLOAD = CURLINFO_DOUBLE + 15, CURLINFO_CONTENT_LENGTH_UPLOAD = CURLINFO_DOUBLE + 16, - CURLINFO_LASTONE = 17 + CURLINFO_STARTTRANSFER_TIME = CURLINFO_DOUBLE + 17, + + CURLINFO_LASTONE = 18 } CURLINFO; /* unfortunately, the easy.h include file needs the options and info stuff -- cgit v1.2.1 From 01ed950bbe0b3321be77d79467e48af2cd42f8f6 Mon Sep 17 00:00:00 2001 From: Daniel Stenberg Date: Wed, 28 Nov 2001 23:21:55 +0000 Subject: added CURLOPT_FTP_USE_EPSV --- include/curl/curl.h | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) (limited to 'include') diff --git a/include/curl/curl.h b/include/curl/curl.h index 48b82d177..52b3ecf01 100644 --- a/include/curl/curl.h +++ b/include/curl/curl.h @@ -212,10 +212,8 @@ typedef enum { in the CURLOPT_FLAGS to activate this */ CINIT(RANGE, OBJECTPOINT, 7), -#if 0 - /* Configuration flags */ - CINIT(FLAGS, LONG, 8), -#endif + /* not used */ + /* Specified file stream to upload from (use as input): */ CINIT(INFILE, OBJECTPOINT, 9), @@ -321,11 +319,8 @@ typedef enum { /* HTTP request, for odd commands like DELETE, TRACE and others */ CINIT(STDERR, OBJECTPOINT, 37), -#if 0 - /* Progress mode set alternative progress mode displays. Alternative - ones should now be made by the client, not the lib! */ - CINIT(PROGRESSMODE, LONG, 38), -#endif + /* 38 is not used */ + /* send linked-list of post-transfer QUOTE commands */ CINIT(POSTQUOTE, OBJECTPOINT, 39), @@ -465,6 +460,11 @@ typedef enum { /* Specify which HTTP version to use! This must be set to one of the CURL_HTTP_VERSION* enums set below. */ CINIT(HTTP_VERSION, LONG, 84), + + /* Specificly switch on or off the FTP engine's use of the EPSV command. By + default, that one will always be attempted before the more traditional + PASV command. */ + CINIT(FTP_USE_EPSV, LONG, 85), CURLOPT_LASTENTRY /* the last unusued */ } CURLoption; -- cgit v1.2.1 From 533c24a4712d0565ae0de89cd64e0d3adce78966 Mon Sep 17 00:00:00 2001 From: Daniel Stenberg Date: Thu, 29 Nov 2001 12:49:10 +0000 Subject: disabling EPSV is now possible --- include/curl/curl.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'include') diff --git a/include/curl/curl.h b/include/curl/curl.h index 52b3ecf01..22440b433 100644 --- a/include/curl/curl.h +++ b/include/curl/curl.h @@ -584,7 +584,7 @@ CURLcode curl_global_init(long flags); void curl_global_cleanup(void); /* This is the version number */ -#define LIBCURL_VERSION "7.9.2-pre3" +#define LIBCURL_VERSION "7.9.2-pre6" #define LIBCURL_VERSION_NUM 0x070902 /* linked-list structure for the CURLOPT_QUOTE option (and other) */ -- cgit v1.2.1 From 139ab3740ae7cf5228bfb41a09d003da00d02756 Mon Sep 17 00:00:00 2001 From: Daniel Stenberg Date: Wed, 5 Dec 2001 08:36:48 +0000 Subject: 7.9.2 commit --- include/curl/curl.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'include') diff --git a/include/curl/curl.h b/include/curl/curl.h index 22440b433..4a89467d4 100644 --- a/include/curl/curl.h +++ b/include/curl/curl.h @@ -584,7 +584,7 @@ CURLcode curl_global_init(long flags); void curl_global_cleanup(void); /* This is the version number */ -#define LIBCURL_VERSION "7.9.2-pre6" +#define LIBCURL_VERSION "7.9.2" #define LIBCURL_VERSION_NUM 0x070902 /* linked-list structure for the CURLOPT_QUOTE option (and other) */ -- cgit v1.2.1 From 2eb355733ff3b9a6cde53f7c114f9ae77368a25f Mon Sep 17 00:00:00 2001 From: Daniel Stenberg Date: Fri, 14 Dec 2001 12:59:16 +0000 Subject: Marcus Webster's newly added CURLFORM_CONTENTHEADER --- include/curl/curl.h | 2 ++ 1 file changed, 2 insertions(+) (limited to 'include') diff --git a/include/curl/curl.h b/include/curl/curl.h index 4a89467d4..6ce918e53 100644 --- a/include/curl/curl.h +++ b/include/curl/curl.h @@ -62,6 +62,7 @@ struct HttpPost { char *contents; /* pointer to allocated data contents */ long contentslength; /* length of contents field */ char *contenttype; /* Content-Type */ + struct curl_slist* contentheader; /* list of extra headers for this form */ struct HttpPost *more; /* if one field name has more than one file, this link should link to following files */ long flags; /* as defined below */ @@ -543,6 +544,7 @@ typedef enum { CFINIT(ARRAY_START), /* below are the options allowed within a array */ CFINIT(FILE), CFINIT(CONTENTTYPE), + CFINIT(CONTENTHEADER), CFINIT(END), CFINIT(ARRAY_END), /* up are the options allowed within a array */ -- cgit v1.2.1 From af6c394785d9ca41ec34ab26a9308b8a4d2a1260 Mon Sep 17 00:00:00 2001 From: Daniel Stenberg Date: Mon, 17 Dec 2001 23:01:39 +0000 Subject: =?UTF-8?q?G=F6tz=20Babin-Ebell's=20OpenSSL=20ENGINE=20patch?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- include/curl/curl.h | 27 ++++++++++++++++++++++++--- 1 file changed, 24 insertions(+), 3 deletions(-) (limited to 'include') diff --git a/include/curl/curl.h b/include/curl/curl.h index 6ce918e53..11574175d 100644 --- a/include/curl/curl.h +++ b/include/curl/curl.h @@ -156,7 +156,9 @@ typedef enum { CURLE_OBSOLETE, /* 50 - removed after 7.7.3 */ CURLE_SSL_PEER_CERTIFICATE, /* 51 - peer's certificate wasn't ok */ CURLE_GOT_NOTHING, /* 52 - when this is a specific error */ - + CURLE_SSL_ENGINE_NOTFOUND, /* 53 - SSL crypto engine not found */ + CURLE_SSL_ENGINE_SETFAILED, /* 54 - can not set SSL crypto engine as default */ + CURL_LAST /* never use! */ } CURLcode; @@ -279,8 +281,10 @@ typedef enum { /* name of the file keeping your private SSL-certificate */ CINIT(SSLCERT, OBJECTPOINT, 25), - /* password for the SSL-certificate */ + /* password for the SSL-private key, keep this for compatibility */ CINIT(SSLCERTPASSWD, OBJECTPOINT, 26), + /* password for the SSL private key */ + CINIT(SSLKEYPASSWD, OBJECTPOINT, 26), /* send TYPE parameter? */ CINIT(CRLF, LONG, 27), @@ -466,7 +470,24 @@ typedef enum { default, that one will always be attempted before the more traditional PASV command. */ CINIT(FTP_USE_EPSV, LONG, 85), - + + /* type of the file keeping your SSL-certificate ("DER", "PEM", "ENG") */ + CINIT(SSLCERTTYPE, OBJECTPOINT, 86), + + /* name of the file keeping your private SSL-key */ + CINIT(SSLKEY, OBJECTPOINT, 87), + + /* type of the file keeping your private SSL-key ("DER", "PEM", "ENG") */ + CINIT(SSLKEYTYPE, OBJECTPOINT, 88), + + /* crypto engine for the SSL-sub system */ + CINIT(SSLENGINE, OBJECTPOINT, 89), + + /* set the crypto engine for the SSL-sub system as default + the param has no meaning... + */ + CINIT(SSLENGINE_DEFAULT, LONG, 90), + CURLOPT_LASTENTRY /* the last unusued */ } CURLoption; -- cgit v1.2.1 From 8d7f402efbcace85851c6bb8f6aa2452c15a9595 Mon Sep 17 00:00:00 2001 From: Sterling Hughes Date: Mon, 7 Jan 2002 20:52:32 +0000 Subject: Make cach'ing work with threads now, there are now three cases: - Use a global dns cache (via setting the tentatively named, CURLOPT_DNS_USE_GLOBAL_CACHE option to true) - Use a per-handle dns cache, by default - Use a pooled dns cache when in the "multi" interface --- include/curl/curl.h | 3 +++ 1 file changed, 3 insertions(+) (limited to 'include') diff --git a/include/curl/curl.h b/include/curl/curl.h index 11574175d..3d91c85ff 100644 --- a/include/curl/curl.h +++ b/include/curl/curl.h @@ -488,6 +488,9 @@ typedef enum { */ CINIT(SSLENGINE_DEFAULT, LONG, 90), + /* Non-zero value means to use the global dns cache */ + CINIT(DNS_USE_GLOBAL_CACHE, LONG, 91), + CURLOPT_LASTENTRY /* the last unusued */ } CURLoption; -- cgit v1.2.1 From 22ac08e06db32cb2a7872316a669eb81ec3ea204 Mon Sep 17 00:00:00 2001 From: Sterling Hughes Date: Tue, 8 Jan 2002 04:26:47 +0000 Subject: Add support for DNS cache timeouts via the CURLOPT_DNS_CACHE_TIMEOUT option. The default cache timeout for this is 60 seconds, which is arbitrary and completely subject to change :) --- include/curl/curl.h | 3 +++ 1 file changed, 3 insertions(+) (limited to 'include') diff --git a/include/curl/curl.h b/include/curl/curl.h index 3d91c85ff..9059d1492 100644 --- a/include/curl/curl.h +++ b/include/curl/curl.h @@ -491,6 +491,9 @@ typedef enum { /* Non-zero value means to use the global dns cache */ CINIT(DNS_USE_GLOBAL_CACHE, LONG, 91), + /* DNS cache timeout */ + CINIT(DNS_CACHE_TIMEOUT, LONG, 92), + CURLOPT_LASTENTRY /* the last unusued */ } CURLoption; -- cgit v1.2.1 From aec7358ca47d39d1967c528bc5f3b75f67f6d4be Mon Sep 17 00:00:00 2001 From: Daniel Stenberg Date: Tue, 8 Jan 2002 08:25:44 +0000 Subject: 7.9.3 pre-release commit --- include/curl/curl.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'include') diff --git a/include/curl/curl.h b/include/curl/curl.h index 9059d1492..264523e7f 100644 --- a/include/curl/curl.h +++ b/include/curl/curl.h @@ -613,8 +613,8 @@ CURLcode curl_global_init(long flags); void curl_global_cleanup(void); /* This is the version number */ -#define LIBCURL_VERSION "7.9.2" -#define LIBCURL_VERSION_NUM 0x070902 +#define LIBCURL_VERSION "7.9.3-pre1" +#define LIBCURL_VERSION_NUM 0x070903 /* linked-list structure for the CURLOPT_QUOTE option (and other) */ struct curl_slist { -- cgit v1.2.1 From fbe29075990218a02a0dab4dd65e3e0c93a38d86 Mon Sep 17 00:00:00 2001 From: Daniel Stenberg Date: Wed, 16 Jan 2002 15:12:12 +0000 Subject: 7.9.3-pre2 --- include/curl/curl.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'include') diff --git a/include/curl/curl.h b/include/curl/curl.h index 264523e7f..0c2bdfbe3 100644 --- a/include/curl/curl.h +++ b/include/curl/curl.h @@ -613,7 +613,7 @@ CURLcode curl_global_init(long flags); void curl_global_cleanup(void); /* This is the version number */ -#define LIBCURL_VERSION "7.9.3-pre1" +#define LIBCURL_VERSION "7.9.3-pre2" #define LIBCURL_VERSION_NUM 0x070903 /* linked-list structure for the CURLOPT_QUOTE option (and other) */ -- cgit v1.2.1 From cb5f6e18e64588c1d2c81489b18c1e7c991d8573 Mon Sep 17 00:00:00 2001 From: Daniel Stenberg Date: Thu, 17 Jan 2002 14:34:26 +0000 Subject: 7.9.3-pre3 --- include/curl/curl.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'include') diff --git a/include/curl/curl.h b/include/curl/curl.h index 0c2bdfbe3..e05db85c4 100644 --- a/include/curl/curl.h +++ b/include/curl/curl.h @@ -613,7 +613,7 @@ CURLcode curl_global_init(long flags); void curl_global_cleanup(void); /* This is the version number */ -#define LIBCURL_VERSION "7.9.3-pre2" +#define LIBCURL_VERSION "7.9.3-pre3" #define LIBCURL_VERSION_NUM 0x070903 /* linked-list structure for the CURLOPT_QUOTE option (and other) */ -- cgit v1.2.1 From 49f7fa82b95e5f6fe816f842d41af11359dd7342 Mon Sep 17 00:00:00 2001 From: Daniel Stenberg Date: Fri, 18 Jan 2002 13:04:48 +0000 Subject: #if [undefined] => #ifdef [undefined] --- include/curl/curl.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'include') diff --git a/include/curl/curl.h b/include/curl/curl.h index e05db85c4..2e948d8a8 100644 --- a/include/curl/curl.h +++ b/include/curl/curl.h @@ -30,11 +30,11 @@ # include #else # include -# if TIME_WITH_SYS_TIME +# ifdef TIME_WITH_SYS_TIME # include # include # else -# if HAVE_SYS_TIME_H +# ifdef HAVE_SYS_TIME_H # include # else # include -- cgit v1.2.1 From 39d4552dab1f8238a1e1cd2387fabafb2331e6cd Mon Sep 17 00:00:00 2001 From: Daniel Stenberg Date: Mon, 21 Jan 2002 12:11:45 +0000 Subject: pre4 --- include/curl/curl.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'include') diff --git a/include/curl/curl.h b/include/curl/curl.h index 2e948d8a8..f791ca70c 100644 --- a/include/curl/curl.h +++ b/include/curl/curl.h @@ -613,7 +613,7 @@ CURLcode curl_global_init(long flags); void curl_global_cleanup(void); /* This is the version number */ -#define LIBCURL_VERSION "7.9.3-pre3" +#define LIBCURL_VERSION "7.9.3-pre4" #define LIBCURL_VERSION_NUM 0x070903 /* linked-list structure for the CURLOPT_QUOTE option (and other) */ -- cgit v1.2.1 From 7e16ec872438e6df9172d3ad18b1117448cf6a93 Mon Sep 17 00:00:00 2001 From: Daniel Stenberg Date: Wed, 23 Jan 2002 18:10:00 +0000 Subject: 7.9.3 --- include/curl/curl.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'include') diff --git a/include/curl/curl.h b/include/curl/curl.h index f791ca70c..44b317410 100644 --- a/include/curl/curl.h +++ b/include/curl/curl.h @@ -613,7 +613,7 @@ CURLcode curl_global_init(long flags); void curl_global_cleanup(void); /* This is the version number */ -#define LIBCURL_VERSION "7.9.3-pre4" +#define LIBCURL_VERSION "7.9.3" #define LIBCURL_VERSION_NUM 0x070903 /* linked-list structure for the CURLOPT_QUOTE option (and other) */ -- cgit v1.2.1 From 76c53c690cefa62e09aa553d0f1f9a26122c0ff1 Mon Sep 17 00:00:00 2001 From: Daniel Stenberg Date: Tue, 29 Jan 2002 10:49:32 +0000 Subject: Giaslas Georgios introduced CURLINFO_CONTENT_TYPE --- include/curl/curl.h | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'include') diff --git a/include/curl/curl.h b/include/curl/curl.h index 44b317410..62ac0479d 100644 --- a/include/curl/curl.h +++ b/include/curl/curl.h @@ -666,7 +666,11 @@ typedef enum { CURLINFO_STARTTRANSFER_TIME = CURLINFO_DOUBLE + 17, - CURLINFO_LASTONE = 18 + CURLINFO_CONTENT_TYPE = CURLINFO_STRING + 18, + + /* Fill in new entries here! */ + + CURLINFO_LASTONE = 19 } CURLINFO; /* unfortunately, the easy.h include file needs the options and info stuff -- cgit v1.2.1 From a8dd13db4c1f1b4d44c403f33bde3d292b167628 Mon Sep 17 00:00:00 2001 From: Daniel Stenberg Date: Thu, 31 Jan 2002 14:24:55 +0000 Subject: struct HttpHeader died ages ago, corrected comments --- include/curl/curl.h | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'include') diff --git a/include/curl/curl.h b/include/curl/curl.h index 62ac0479d..25f08c2e9 100644 --- a/include/curl/curl.h +++ b/include/curl/curl.h @@ -7,7 +7,7 @@ * | (__| |_| | _ <| |___ * \___|\___/|_| \_\_____| * - * Copyright (C) 2001, Daniel Stenberg, , et al. + * Copyright (C) 2002, Daniel Stenberg, , et al. * * In order to be useful for every potential user, curl and libcurl are * dual-licensed under the MPL and the MIT/X-derivate licenses. @@ -272,7 +272,7 @@ typedef enum { /* Set cookie in request: */ CINIT(COOKIE, OBJECTPOINT, 22), - /* This points to a linked list of headers, struct HttpHeader kind */ + /* This points to a linked list of headers, struct curl_slist kind */ CINIT(HTTPHEADER, OBJECTPOINT, 23), /* This points to a linked list of post entries, struct HttpPost */ @@ -613,8 +613,8 @@ CURLcode curl_global_init(long flags); void curl_global_cleanup(void); /* This is the version number */ -#define LIBCURL_VERSION "7.9.3" -#define LIBCURL_VERSION_NUM 0x070903 +#define LIBCURL_VERSION "7.9.4-pre1" +#define LIBCURL_VERSION_NUM 0x070904 /* linked-list structure for the CURLOPT_QUOTE option (and other) */ struct curl_slist { -- cgit v1.2.1 From 685b180ab6cad415f18eb0c1cef694c3b7b1c704 Mon Sep 17 00:00:00 2001 From: Daniel Stenberg Date: Mon, 4 Feb 2002 09:51:41 +0000 Subject: 7.9.4-pre2 --- include/curl/curl.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'include') diff --git a/include/curl/curl.h b/include/curl/curl.h index 25f08c2e9..07dafd748 100644 --- a/include/curl/curl.h +++ b/include/curl/curl.h @@ -613,7 +613,7 @@ CURLcode curl_global_init(long flags); void curl_global_cleanup(void); /* This is the version number */ -#define LIBCURL_VERSION "7.9.4-pre1" +#define LIBCURL_VERSION "7.9.4-pre2" #define LIBCURL_VERSION_NUM 0x070904 /* linked-list structure for the CURLOPT_QUOTE option (and other) */ -- cgit v1.2.1 From 5370d7a6ebebecd8aff515d3b7528bf24d49b587 Mon Sep 17 00:00:00 2001 From: Daniel Stenberg Date: Tue, 5 Feb 2002 11:43:29 +0000 Subject: 7.9.4 --- include/curl/curl.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'include') diff --git a/include/curl/curl.h b/include/curl/curl.h index 07dafd748..420be3aa3 100644 --- a/include/curl/curl.h +++ b/include/curl/curl.h @@ -613,7 +613,7 @@ CURLcode curl_global_init(long flags); void curl_global_cleanup(void); /* This is the version number */ -#define LIBCURL_VERSION "7.9.4-pre2" +#define LIBCURL_VERSION "7.9.4" #define LIBCURL_VERSION_NUM 0x070904 /* linked-list structure for the CURLOPT_QUOTE option (and other) */ -- cgit v1.2.1 From d9c244278d142ec836fddd522fbe6417810d21b3 Mon Sep 17 00:00:00 2001 From: Daniel Stenberg Date: Tue, 26 Feb 2002 07:59:43 +0000 Subject: 7.9.5-pre4 commit --- include/curl/curl.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'include') diff --git a/include/curl/curl.h b/include/curl/curl.h index 420be3aa3..c4118b6c1 100644 --- a/include/curl/curl.h +++ b/include/curl/curl.h @@ -613,8 +613,8 @@ CURLcode curl_global_init(long flags); void curl_global_cleanup(void); /* This is the version number */ -#define LIBCURL_VERSION "7.9.4" -#define LIBCURL_VERSION_NUM 0x070904 +#define LIBCURL_VERSION "7.9.5-pre4" +#define LIBCURL_VERSION_NUM 0x070905 /* linked-list structure for the CURLOPT_QUOTE option (and other) */ struct curl_slist { -- cgit v1.2.1 From 80b004a57d6fe8ce2d2fceb29b6eb4a7101da958 Mon Sep 17 00:00:00 2001 From: Daniel Stenberg Date: Thu, 28 Feb 2002 23:31:23 +0000 Subject: Wesley Laxton's CURLOPT_PREQUOTE work --- include/curl/curl.h | 3 +++ 1 file changed, 3 insertions(+) (limited to 'include') diff --git a/include/curl/curl.h b/include/curl/curl.h index c4118b6c1..a12a24672 100644 --- a/include/curl/curl.h +++ b/include/curl/curl.h @@ -493,6 +493,9 @@ typedef enum { /* DNS cache timeout */ CINIT(DNS_CACHE_TIMEOUT, LONG, 92), + + /* send linked-list of pre-transfer QUOTE commands (Wesley Laxton)*/ + CINIT(PREQUOTE, OBJECTPOINT, 93), CURLOPT_LASTENTRY /* the last unusued */ } CURLoption; -- cgit v1.2.1 From 60b2e74fa3bb0feb684f29632f50990f18c7abbb Mon Sep 17 00:00:00 2001 From: Daniel Stenberg Date: Tue, 5 Mar 2002 10:15:38 +0000 Subject: corrected the progress callback prototype!!! --- include/curl/curl.h | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'include') diff --git a/include/curl/curl.h b/include/curl/curl.h index a12a24672..5598c82b8 100644 --- a/include/curl/curl.h +++ b/include/curl/curl.h @@ -75,10 +75,10 @@ struct HttpPost { }; typedef int (*curl_progress_callback)(void *clientp, - size_t dltotal, - size_t dlnow, - size_t ultotal, - size_t ulnow); + double dltotal, + double dlnow, + double ultotal, + double ulnow); typedef size_t (*curl_write_callback)(char *buffer, size_t size, @@ -616,7 +616,7 @@ CURLcode curl_global_init(long flags); void curl_global_cleanup(void); /* This is the version number */ -#define LIBCURL_VERSION "7.9.5-pre4" +#define LIBCURL_VERSION "7.9.5-pre6" #define LIBCURL_VERSION_NUM 0x070905 /* linked-list structure for the CURLOPT_QUOTE option (and other) */ -- cgit v1.2.1 From c2d4fd876c77132caf593e397db615eb12266c7d Mon Sep 17 00:00:00 2001 From: Daniel Stenberg Date: Thu, 7 Mar 2002 08:50:18 +0000 Subject: 7.9.5 commit --- include/curl/curl.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'include') diff --git a/include/curl/curl.h b/include/curl/curl.h index 5598c82b8..9b30508c3 100644 --- a/include/curl/curl.h +++ b/include/curl/curl.h @@ -616,7 +616,7 @@ CURLcode curl_global_init(long flags); void curl_global_cleanup(void); /* This is the version number */ -#define LIBCURL_VERSION "7.9.5-pre6" +#define LIBCURL_VERSION "7.9.5" #define LIBCURL_VERSION_NUM 0x070905 /* linked-list structure for the CURLOPT_QUOTE option (and other) */ -- cgit v1.2.1 From 579985242455741d34df17eea94174772bbe4e32 Mon Sep 17 00:00:00 2001 From: Daniel Stenberg Date: Mon, 11 Mar 2002 15:14:09 +0000 Subject: CURLFORM_FILENAME added and some cleanups, HttpPost is now curl_httppost with a #define to preserve backwards compatibiltiy --- include/curl/curl.h | 32 ++++++++++++++++++++------------ 1 file changed, 20 insertions(+), 12 deletions(-) (limited to 'include') diff --git a/include/curl/curl.h b/include/curl/curl.h index 9b30508c3..e275e898a 100644 --- a/include/curl/curl.h +++ b/include/curl/curl.h @@ -55,16 +55,20 @@ extern "C" { #endif -struct HttpPost { - struct HttpPost *next; /* next entry in the list */ +/* stupid #define trick to preserve functionality with older code, but + making it use our name space for the future */ +#define HttpPost curl_httppost + +struct curl_httppost { + struct curl_httppost *next; /* next entry in the list */ char *name; /* pointer to allocated name */ long namelength; /* length of name length */ char *contents; /* pointer to allocated data contents */ long contentslength; /* length of contents field */ char *contenttype; /* Content-Type */ struct curl_slist* contentheader; /* list of extra headers for this form */ - struct HttpPost *more; /* if one field name has more than one file, this - link should link to following files */ + struct curl_httppost *more; /* if one field name has more than one file, this + link should link to following files */ long flags; /* as defined below */ #define HTTPPOST_FILENAME (1<<0) /* specified content is a file name */ #define HTTPPOST_READFILE (1<<1) /* specified content is a file name */ @@ -72,6 +76,8 @@ struct HttpPost { do not free in formfree */ #define HTTPPOST_PTRCONTENTS (1<<3) /* contents is only stored pointer do not free in formfree */ + char *showfilename; /* The file name to show. If not set, the actual + file name will be used (if this is a file part) */ }; typedef int (*curl_progress_callback)(void *clientp, @@ -548,10 +554,9 @@ extern int (curl_strnequal)(const char *s1, const char *s2, size_t n); #define strequal(a,b) curl_strequal(a,b) #define strnequal(a,b,c) curl_strnequal(a,b,c) -/* external form function */ -int curl_formparse(char *string, - struct HttpPost **httppost, - struct HttpPost **last_post); +/* DEPRECATED function to build formdata */ +int curl_formparse(char *, struct curl_httppost **, + struct curl_httppost **_post); /* name is uppercase CURLFORM_ */ #ifdef CFINIT @@ -575,25 +580,28 @@ typedef enum { CFINIT(FILE), CFINIT(CONTENTTYPE), CFINIT(CONTENTHEADER), + CFINIT(FILENAME), CFINIT(END), CFINIT(ARRAY_END), /* up are the options allowed within a array */ CURLFORM_LASTENTRY /* the last unusued */ } CURLformoption; +#undef CFINIT /* done */ + /* structure to be used as parameter for CURLFORM_ARRAY */ struct curl_forms { CURLformoption option; const char *value; }; -/* new external form function */ -int curl_formadd(struct HttpPost **httppost, - struct HttpPost **last_post, +/* use this for multipart formpost building */ +int curl_formadd(struct curl_httppost **httppost, + struct curl_httppost **last_post, ...); /* cleanup a form: */ -void curl_formfree(struct HttpPost *form); +void curl_formfree(struct curl_httppost *form); /* Unix and Win32 getenv function call, this returns a malloc()'ed string that MUST be free()ed after usage is complete. */ -- cgit v1.2.1 From ce021b79a7d073e343e5904e0fbb6a64ba3f7bb6 Mon Sep 17 00:00:00 2001 From: Daniel Stenberg Date: Wed, 13 Mar 2002 12:09:52 +0000 Subject: CURLFORM_ARRAYSTART and ARRAYEND are now history --- include/curl/curl.h | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'include') diff --git a/include/curl/curl.h b/include/curl/curl.h index e275e898a..68095e502 100644 --- a/include/curl/curl.h +++ b/include/curl/curl.h @@ -576,13 +576,13 @@ typedef enum { CFINIT(CONTENTSLENGTH), CFINIT(FILECONTENT), CFINIT(ARRAY), - CFINIT(ARRAY_START), /* below are the options allowed within a array */ + CFINIT(OBSOLETE), CFINIT(FILE), CFINIT(CONTENTTYPE), CFINIT(CONTENTHEADER), CFINIT(FILENAME), CFINIT(END), - CFINIT(ARRAY_END), /* up are the options allowed within a array */ + CFINIT(OBSOLETE2), CURLFORM_LASTENTRY /* the last unusued */ } CURLformoption; @@ -624,7 +624,7 @@ CURLcode curl_global_init(long flags); void curl_global_cleanup(void); /* This is the version number */ -#define LIBCURL_VERSION "7.9.5" +#define LIBCURL_VERSION "7.9.5-cvs" #define LIBCURL_VERSION_NUM 0x070905 /* linked-list structure for the CURLOPT_QUOTE option (and other) */ -- cgit v1.2.1 From 974f314f5785156af6983675aeb28313cc8ba2ea Mon Sep 17 00:00:00 2001 From: Daniel Stenberg Date: Tue, 19 Mar 2002 07:54:55 +0000 Subject: copyright string (year) update --- include/curl/curl.h | 6 +++--- include/curl/easy.h | 2 +- include/curl/stdcheaders.h | 2 +- include/curl/types.h | 2 +- 4 files changed, 6 insertions(+), 6 deletions(-) (limited to 'include') diff --git a/include/curl/curl.h b/include/curl/curl.h index 68095e502..043e7bce1 100644 --- a/include/curl/curl.h +++ b/include/curl/curl.h @@ -7,7 +7,7 @@ * | (__| |_| | _ <| |___ * \___|\___/|_| \_\_____| * - * Copyright (C) 2002, Daniel Stenberg, , et al. + * Copyright (C) 1998 - 2002, Daniel Stenberg, , et al. * * In order to be useful for every potential user, curl and libcurl are * dual-licensed under the MPL and the MIT/X-derivate licenses. @@ -624,8 +624,8 @@ CURLcode curl_global_init(long flags); void curl_global_cleanup(void); /* This is the version number */ -#define LIBCURL_VERSION "7.9.5-cvs" -#define LIBCURL_VERSION_NUM 0x070905 +#define LIBCURL_VERSION "7.9.6-pre1" +#define LIBCURL_VERSION_NUM 0x070906 /* linked-list structure for the CURLOPT_QUOTE option (and other) */ struct curl_slist { diff --git a/include/curl/easy.h b/include/curl/easy.h index d3545ffb0..afdcff1dd 100644 --- a/include/curl/easy.h +++ b/include/curl/easy.h @@ -7,7 +7,7 @@ * | (__| |_| | _ <| |___ * \___|\___/|_| \_\_____| * - * Copyright (C) 2000, Daniel Stenberg, , et al. + * Copyright (C) 1998 - 2002, Daniel Stenberg, , et al. * * In order to be useful for every potential user, curl and libcurl are * dual-licensed under the MPL and the MIT/X-derivate licenses. diff --git a/include/curl/stdcheaders.h b/include/curl/stdcheaders.h index 3fbaaf7b5..ec401ea23 100644 --- a/include/curl/stdcheaders.h +++ b/include/curl/stdcheaders.h @@ -7,7 +7,7 @@ * | (__| |_| | _ <| |___ * \___|\___/|_| \_\_____| * - * Copyright (C) 2000, Daniel Stenberg, , et al. + * Copyright (C) 1998 - 2002, Daniel Stenberg, , et al. * * In order to be useful for every potential user, curl and libcurl are * dual-licensed under the MPL and the MIT/X-derivate licenses. diff --git a/include/curl/types.h b/include/curl/types.h index 05f73bf53..97e57cb40 100644 --- a/include/curl/types.h +++ b/include/curl/types.h @@ -7,7 +7,7 @@ * | (__| |_| | _ <| |___ * \___|\___/|_| \_\_____| * - * Copyright (C) 2000, Daniel Stenberg, , et al. + * Copyright (C) 1998 - 2002, Daniel Stenberg, , et al. * * In order to be useful for every potential user, curl and libcurl are * dual-licensed under the MPL and the MIT/X-derivate licenses. -- cgit v1.2.1 From 8d94688fd1d53841826e72fa87ac6ecd33dcd0cd Mon Sep 17 00:00:00 2001 From: Daniel Stenberg Date: Tue, 19 Mar 2002 10:34:34 +0000 Subject: moved here from ../../lib/ --- include/curl/multi.h | 189 +++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 189 insertions(+) create mode 100644 include/curl/multi.h (limited to 'include') diff --git a/include/curl/multi.h b/include/curl/multi.h new file mode 100644 index 000000000..42fa1dd4c --- /dev/null +++ b/include/curl/multi.h @@ -0,0 +1,189 @@ +#ifndef __CURL_MULTI_H +#define __CURL_MULTI_H +/***************************************************************************** + * _ _ ____ _ + * Project ___| | | | _ \| | + * / __| | | | |_) | | + * | (__| |_| | _ <| |___ + * \___|\___/|_| \_\_____| + * + * Copyright (C) 1998 - 2002, Daniel Stenberg, , et al. + * + * In order to be useful for every potential user, curl and libcurl are + * dual-licensed under the MPL and the MIT/X-derivate licenses. + * + * 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 + * furnished to do so, under the terms of the MPL or the MIT/X-derivate + * licenses. You may pick one of these licenses. + * + * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY + * KIND, either express or implied. + * + * $Id$ + *****************************************************************************/ +/* + This is meant to be the "external" header file. Don't give away any + internals here! + + This document presents a mixture of ideas from at least: + - Daniel Stenberg + - Steve Dekorte + - Sterling Hughes + - Ben Greear + + ------------------------------------------- + GOALS + + o Enable a "pull" interface. The application that uses libcurl decides where + and when to ask libcurl to get/send data. + + o Enable multiple simultaneous transfers in the same thread without making it + complicated for the application. + + o Enable the application to select() on its own file descriptors and curl's + file descriptors simultaneous easily. + + Example sources using this interface is here: ../multi/ + +*/ +#ifdef HAVE_SYS_SOCKET_H +#include +#endif +#if defined(WIN32) && !defined(__GNUC__) || defined(__MINGW32__) +#include +#endif + +#include + +typedef void CURLM; + +typedef enum { + CURLM_CALL_MULTI_PERFORM=-1, /* please call curl_multi_perform() soon */ + CURLM_OK, + CURLM_BAD_HANDLE, /* the passed-in handle is not a valid CURLM handle */ + CURLM_BAD_EASY_HANDLE, /* an easy handle was not good/valid */ + CURLM_OUT_OF_MEMORY, /* if you ever get this, you're in deep sh*t */ + CURLM_INTERNAL_ERROR, /* this is a libcurl bug */ + CURLM_LAST +} CURLMcode; + +typedef enum { + CURLMSG_NONE, /* first, not used */ + CURLMSG_DONE, /* This easy handle has completed. 'whatever' points to + the CURLcode of the transfer */ + CURLMSG_LAST /* last, not used */ +} CURLMSG; + +struct CURLMsg { + CURLMSG msg; /* what this message means */ + CURL *easy_handle; /* the handle it concerns */ + union { + void *whatever; /* message-specific data */ + CURLcode result; /* return code for transfer */ + } data; +}; +typedef struct CURLMsg CURLMsg; + +/* + * Name: curl_multi_init() + * + * Desc: inititalize multi-style curl usage + * Returns: a new CURLM handle to use in all 'curl_multi' functions. + */ +CURLM *curl_multi_init(void); + +/* + * Name: curl_multi_add_handle() + * + * Desc: add a standard curl handle to the multi stack + * Returns: CURLMcode type, general multi error code. + */ +CURLMcode curl_multi_add_handle(CURLM *multi_handle, + CURL *curl_handle); + + /* + * Name: curl_multi_remove_handle() + * + * Desc: removes a curl handle from the multi stack again + * Returns: CURLMcode type, general multi error code. + */ +CURLMcode curl_multi_remove_handle(CURLM *multi_handle, + CURL *curl_handle); + + /* + * Name: curl_multi_fdset() + * + * Desc: Ask curl for its fd_set sets. The app can use these to select() or + * poll() on. We want curl_multi_perform() called as soon as one of + * them are ready. + * Returns: CURLMcode type, general multi error code. + */ +CURLMcode curl_multi_fdset(CURLM *multi_handle, + fd_set *read_fd_set, + fd_set *write_fd_set, + fd_set *exc_fd_set, + int *max_fd); + + /* + * Name: curl_multi_perform() + * + * Desc: When the app thinks there's data available for curl it calls this + * function to read/write whatever there is right now. This returns + * as soon as the reads and writes are done. This function does not + * require that there actually is data available for reading or that + * data can be written, it can be called just in case. It returns + * the number of handles that still transfer data in the second + * argument's integer-pointer. + * + * Returns: CURLMcode type, general multi error code. *NOTE* that this only + * returns errors etc regarding the whole multi stack. There might + * still have occurred problems on invidual transfers even when this + * returns OK. + */ +CURLMcode curl_multi_perform(CURLM *multi_handle, + int *running_handles); + + /* + * Name: curl_multi_cleanup() + * + * Desc: Cleans up and removes a whole multi stack. It does not free or + * touch any individual easy handles in any way. We need to define + * in what state those handles will be if this function is called + * in the middle of a transfer. + * Returns: CURLMcode type, general multi error code. + */ +CURLMcode curl_multi_cleanup(CURLM *multi_handle); + +/* + * Name: curl_multi_info_read() + * + * Desc: Ask the multi handle if there's any messages/informationals from + * the individual transfers. Messages include informationals such as + * error code from the transfer or just the fact that a transfer is + * completed. More details on these should be written down as well. + * + * Repeated calls to this function will return a new struct each + * time, until a special "end of msgs" struct is returned as a signal + * that there is no more to get at this point. + * + * The data the returned pointer points to will not survive calling + * curl_multi_cleanup(). + * + * The 'CURLMsg' struct is meant to be very simple and only contain + * very basic informations. If more involved information is wanted, + * we will provide the particular "transfer handle" in that struct + * and that should/could/would be used in subsequent + * curl_easy_getinfo() calls (or similar). The point being that we + * must never expose complex structs to applications, as then we'll + * undoubtably get backwards compatibility problems in the future. + * + * Returns: A pointer to a filled-in struct, or NULL if it failed or ran out + * of structs. It also writes the number of messages left in the + * queue (after this read) in the integer the second argument points + * to. + */ +CURLMsg *curl_multi_info_read(CURLM *multi_handle, + int *msgs_in_queue); + +#endif -- cgit v1.2.1 From 6062a1bd68d5ed1af52315b4d4165869de0ec1aa Mon Sep 17 00:00:00 2001 From: Daniel Stenberg Date: Tue, 19 Mar 2002 10:35:02 +0000 Subject: include multi.h too --- include/curl/curl.h | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'include') diff --git a/include/curl/curl.h b/include/curl/curl.h index 043e7bce1..4df59cd31 100644 --- a/include/curl/curl.h +++ b/include/curl/curl.h @@ -684,9 +684,10 @@ typedef enum { CURLINFO_LASTONE = 19 } CURLINFO; -/* unfortunately, the easy.h include file needs the options and info stuff - before it can be included! */ +/* unfortunately, the easy.h and multi.h include files need options and info + stuff before they can be included! */ #include /* nothing in curl is fun without the easy stuff */ +#include typedef enum { CURLCLOSEPOLICY_NONE, /* first, never use this */ -- cgit v1.2.1 From 3853e3d6f35360c08cde82c7d5d51777c6fb4590 Mon Sep 17 00:00:00 2001 From: Daniel Stenberg Date: Tue, 19 Mar 2002 10:35:14 +0000 Subject: added multi.h --- include/curl/Makefile.am | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'include') diff --git a/include/curl/Makefile.am b/include/curl/Makefile.am index 34dfb7586..c45332b0d 100644 --- a/include/curl/Makefile.am +++ b/include/curl/Makefile.am @@ -3,5 +3,6 @@ pkginclude_HEADERS = \ easy.h \ mprintf.h \ stdcheaders.h \ - types.h + types.h \ + multi.h pkgincludedir= $(includedir)/curl -- cgit v1.2.1 From ea1f138c081416869e26c00712adfa7db9df6030 Mon Sep 17 00:00:00 2001 From: Daniel Stenberg Date: Thu, 4 Apr 2002 10:07:01 +0000 Subject: Jonatan Lander's fix to compile properly on pre-ISO compilers (without the ## operator) --- include/curl/curl.h | 27 ++++++++++++++++++++------- 1 file changed, 20 insertions(+), 7 deletions(-) (limited to 'include') diff --git a/include/curl/curl.h b/include/curl/curl.h index 4df59cd31..296f2e99b 100644 --- a/include/curl/curl.h +++ b/include/curl/curl.h @@ -178,19 +178,27 @@ typedef enum { #define CURL_ERROR_SIZE 256 +/* long may be 32 or 64 bits, but we should never depend on anything else + but 32 */ +#define CURLOPTTYPE_LONG 0 +#define CURLOPTTYPE_OBJECTPOINT 10000 +#define CURLOPTTYPE_FUNCTIONPOINT 20000 + /* name is uppercase CURLOPT_, type is one of the defined CURLOPTTYPE_ number is unique identifier */ #ifdef CINIT #undef CINIT #endif +#ifdef __STDC__ #define CINIT(name,type,number) CURLOPT_ ## name = CURLOPTTYPE_ ## type + number - -/* long may be 32 or 64 bits, but we should never depend on anything else - but 32 */ -#define CURLOPTTYPE_LONG 0 -#define CURLOPTTYPE_OBJECTPOINT 10000 -#define CURLOPTTYPE_FUNCTIONPOINT 20000 +#else +/* The macro "##" is ISO C, we assume pre-ISO C doesn't support it. */ +#define LONG CURLOPTTYPE_LONG +#define OBJECTPOINT CURLOPTTYPE_OBJECTPOINT +#define FUNCTIONPOINT CURLOPTTYPE_FUNCTIONPOINT +#define CINIT(name,type,number) CURLOPT_/**/name = type + number +#endif typedef enum { CINIT(NOTHING, LONG, 0), /********* the first one is unused ************/ @@ -562,7 +570,12 @@ int curl_formparse(char *, struct curl_httppost **, #ifdef CFINIT #undef CFINIT #endif +#ifdef __STDC__ #define CFINIT(name) CURLFORM_ ## name +#else +/* The macro "##" is ISO C, we assume pre-ISO C doesn't support it. */ +#define CFINIT(name) CURLFORM_/**/name +#endif typedef enum { CFINIT(NOTHING), /********* the first one is unused ************/ @@ -624,7 +637,7 @@ CURLcode curl_global_init(long flags); void curl_global_cleanup(void); /* This is the version number */ -#define LIBCURL_VERSION "7.9.6-pre1" +#define LIBCURL_VERSION "7.9.6-pre2" #define LIBCURL_VERSION_NUM 0x070906 /* linked-list structure for the CURLOPT_QUOTE option (and other) */ -- cgit v1.2.1 From 2a72641a0b54dd5db079fd6f797e47a5907d6b2a Mon Sep 17 00:00:00 2001 From: Daniel Stenberg Date: Mon, 8 Apr 2002 22:53:22 +0000 Subject: 7.9.6-pre4 commit --- include/curl/curl.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'include') diff --git a/include/curl/curl.h b/include/curl/curl.h index 296f2e99b..f803d8c6a 100644 --- a/include/curl/curl.h +++ b/include/curl/curl.h @@ -637,7 +637,7 @@ CURLcode curl_global_init(long flags); void curl_global_cleanup(void); /* This is the version number */ -#define LIBCURL_VERSION "7.9.6-pre2" +#define LIBCURL_VERSION "7.9.6-pre3" #define LIBCURL_VERSION_NUM 0x070906 /* linked-list structure for the CURLOPT_QUOTE option (and other) */ -- cgit v1.2.1 From 3390b6446c59ffafd58650e8d81957754004238f Mon Sep 17 00:00:00 2001 From: Daniel Stenberg Date: Wed, 10 Apr 2002 13:24:18 +0000 Subject: two new error codes to separate READ into READ/RECV and WRITE into WRITE/SEND --- include/curl/curl.h | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'include') diff --git a/include/curl/curl.h b/include/curl/curl.h index f803d8c6a..05e1bec0d 100644 --- a/include/curl/curl.h +++ b/include/curl/curl.h @@ -164,6 +164,8 @@ typedef enum { CURLE_GOT_NOTHING, /* 52 - when this is a specific error */ CURLE_SSL_ENGINE_NOTFOUND, /* 53 - SSL crypto engine not found */ CURLE_SSL_ENGINE_SETFAILED, /* 54 - can not set SSL crypto engine as default */ + CURLE_SEND_ERROR, /* 55 - failed sending network data */ + CURLE_RECV_ERROR, /* 56 - failure in receiving network data */ CURL_LAST /* never use! */ } CURLcode; @@ -637,7 +639,7 @@ CURLcode curl_global_init(long flags); void curl_global_cleanup(void); /* This is the version number */ -#define LIBCURL_VERSION "7.9.6-pre3" +#define LIBCURL_VERSION "7.9.6-pre4" #define LIBCURL_VERSION_NUM 0x070906 /* linked-list structure for the CURLOPT_QUOTE option (and other) */ -- cgit v1.2.1 From 3f6133be2735936631c4bfe5aedd28ae9b084f3f Mon Sep 17 00:00:00 2001 From: Daniel Stenberg Date: Fri, 12 Apr 2002 07:21:11 +0000 Subject: Jean-Philippe Barrette-LaPierre provided his patch that introduces CURLOPT_DEBUGFUNCTION and CURLOPT_DEBUGDATA. --- include/curl/curl.h | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) (limited to 'include') diff --git a/include/curl/curl.h b/include/curl/curl.h index 05e1bec0d..ff37d3a5b 100644 --- a/include/curl/curl.h +++ b/include/curl/curl.h @@ -101,6 +101,23 @@ typedef int (*curl_passwd_callback)(void *clientp, char *buffer, int buflen); +/* the kind of data that is passed to information_callback*/ +typedef enum { + CURLINFO_TEXT = 0, + CURLINFO_HEADER_IN, /* 1 */ + CURLINFO_HEADER_OUT, /* 2 */ + CURLINFO_DATA_IN, /* 3 */ + CURLINFO_DATA_OUT, /* 4 */ + CURLINFO_END +} curl_infotype; + +typedef int (*curl_debug_callback) + (CURL *handle, /* the handle/transfer this concerns */ + curl_infotype type, /* what kind of data */ + char *data, /* points to the data */ + size_t size, /* size of the data pointed to */ + void *userp); /* whatever the user please */ + /* All possible error codes from all sorts of curl functions. Future versions may return other values, stay prepared. @@ -512,6 +529,12 @@ typedef enum { /* send linked-list of pre-transfer QUOTE commands (Wesley Laxton)*/ CINIT(PREQUOTE, OBJECTPOINT, 93), + + /* set the debug function */ + CINIT(DEBUGFUNCTION, FUNCTIONPOINT, 94), + + /* set the data for the debug function */ + CINIT(DEBUGDATA, OBJECTPOINT, 95), CURLOPT_LASTENTRY /* the last unusued */ } CURLoption; -- cgit v1.2.1 From a00918116de72a88f8b29cae1f9ed075057dea9f Mon Sep 17 00:00:00 2001 From: Daniel Stenberg Date: Fri, 12 Apr 2002 11:39:27 +0000 Subject: 7.9.6-pre5 --- include/curl/curl.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'include') diff --git a/include/curl/curl.h b/include/curl/curl.h index ff37d3a5b..a5354758f 100644 --- a/include/curl/curl.h +++ b/include/curl/curl.h @@ -662,7 +662,7 @@ CURLcode curl_global_init(long flags); void curl_global_cleanup(void); /* This is the version number */ -#define LIBCURL_VERSION "7.9.6-pre4" +#define LIBCURL_VERSION "7.9.6-pre5" #define LIBCURL_VERSION_NUM 0x070906 /* linked-list structure for the CURLOPT_QUOTE option (and other) */ -- cgit v1.2.1 From e0cc8d2ce9b861d41b08d47f8574b710bcf95b53 Mon Sep 17 00:00:00 2001 From: Daniel Stenberg Date: Sun, 14 Apr 2002 17:29:35 +0000 Subject: check for _MSC_VER as well as __STDC__ when deciding to use the ## operator or not --- include/curl/curl.h | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'include') diff --git a/include/curl/curl.h b/include/curl/curl.h index a5354758f..a621775f9 100644 --- a/include/curl/curl.h +++ b/include/curl/curl.h @@ -209,7 +209,7 @@ typedef enum { #ifdef CINIT #undef CINIT #endif -#ifdef __STDC__ +#if defined(__STDC__) || defined(_MSC_VER) #define CINIT(name,type,number) CURLOPT_ ## name = CURLOPTTYPE_ ## type + number #else /* The macro "##" is ISO C, we assume pre-ISO C doesn't support it. */ @@ -595,7 +595,8 @@ int curl_formparse(char *, struct curl_httppost **, #ifdef CFINIT #undef CFINIT #endif -#ifdef __STDC__ + +#if defined(__STDC__) || defined(_MSC_VER) #define CFINIT(name) CURLFORM_ ## name #else /* The macro "##" is ISO C, we assume pre-ISO C doesn't support it. */ -- cgit v1.2.1 From 9549cfde02d72812c5cc1ce241955382b5bc371f Mon Sep 17 00:00:00 2001 From: Daniel Stenberg Date: Mon, 15 Apr 2002 06:58:04 +0000 Subject: 7.9.6 commit --- include/curl/curl.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'include') diff --git a/include/curl/curl.h b/include/curl/curl.h index a621775f9..08ee4cb9e 100644 --- a/include/curl/curl.h +++ b/include/curl/curl.h @@ -663,7 +663,7 @@ CURLcode curl_global_init(long flags); void curl_global_cleanup(void); /* This is the version number */ -#define LIBCURL_VERSION "7.9.6-pre5" +#define LIBCURL_VERSION "7.9.6" #define LIBCURL_VERSION_NUM 0x070906 /* linked-list structure for the CURLOPT_QUOTE option (and other) */ -- cgit v1.2.1 From 62d205a2ec38ed54e359625d69a7210dc274f093 Mon Sep 17 00:00:00 2001 From: Daniel Stenberg Date: Tue, 16 Apr 2002 07:59:20 +0000 Subject: Dirk Manske brought the patch that introduces two new CURLINFO_* values: CURLINFO_REDIRECT_TIME and CURLINFO_REDIRECT_COUNT. --- include/curl/curl.h | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'include') diff --git a/include/curl/curl.h b/include/curl/curl.h index 08ee4cb9e..abfe3e523 100644 --- a/include/curl/curl.h +++ b/include/curl/curl.h @@ -718,9 +718,12 @@ typedef enum { CURLINFO_CONTENT_TYPE = CURLINFO_STRING + 18, + CURLINFO_REDIRECT_TIME = CURLINFO_DOUBLE + 19, + CURLINFO_REDIRECT_COUNT = CURLINFO_LONG + 20, + /* Fill in new entries here! */ - CURLINFO_LASTONE = 19 + CURLINFO_LASTONE = 21 } CURLINFO; /* unfortunately, the easy.h and multi.h include files need options and info -- cgit v1.2.1 From 72d722b07b342a8fb985e98be6c4ffeaf947a890 Mon Sep 17 00:00:00 2001 From: Daniel Stenberg Date: Mon, 22 Apr 2002 13:33:56 +0000 Subject: The timecond stuff now have CURL_ prefixes --- include/curl/curl.h | 21 ++++++++++++++++----- 1 file changed, 16 insertions(+), 5 deletions(-) (limited to 'include') diff --git a/include/curl/curl.h b/include/curl/curl.h index abfe3e523..cf96c326d 100644 --- a/include/curl/curl.h +++ b/include/curl/curl.h @@ -561,15 +561,26 @@ enum { typedef enum { - TIMECOND_NONE, + CURL_TIMECOND_NONE, - TIMECOND_IFMODSINCE, - TIMECOND_IFUNMODSINCE, - TIMECOND_LASTMOD, + CURL_TIMECOND_IFMODSINCE, + CURL_TIMECOND_IFUNMODSINCE, + CURL_TIMECOND_LASTMOD, - TIMECOND_LAST + CURL_TIMECOND_LAST } curl_TimeCond; +/* for backwards compatibility */ +#ifndef TIMECOND_IFMODSINCE +#define TIMECOND_IFMODSINCE CURL_TIMECOND_IFMODSINCE +#endif +#ifndef TIMECOND_IFUNMODSINCE +#define TIMECOND_IFUNMODSINCE CURL_TIMECOND_IFUNMODSINCE +#endif +#ifndef TIMECOND_LASTMOD +#define TIMECOND_LASTMOD CURL_TIMECOND_LASTMOD +#endif + #ifdef __BEOS__ #include #endif -- cgit v1.2.1 From d9a1a59f2242711e287df3b93160e0a2494f23e1 Mon Sep 17 00:00:00 2001 From: Daniel Stenberg Date: Fri, 3 May 2002 14:50:29 +0000 Subject: CURL_MAX_WRITE_SIZE is a new exported define that informs about the biggest sized buffer that may be passed to a write callback --- include/curl/curl.h | 2 ++ 1 file changed, 2 insertions(+) (limited to 'include') diff --git a/include/curl/curl.h b/include/curl/curl.h index cf96c326d..2d52fb1eb 100644 --- a/include/curl/curl.h +++ b/include/curl/curl.h @@ -86,6 +86,8 @@ typedef int (*curl_progress_callback)(void *clientp, double ultotal, double ulnow); +#define CURL_MAX_WRITE_SIZE 20480 + typedef size_t (*curl_write_callback)(char *buffer, size_t size, size_t nitems, -- cgit v1.2.1 From 980a47b42b95d7b9ff3378dc7b0f2e1c453fb649 Mon Sep 17 00:00:00 2001 From: Daniel Stenberg Date: Tue, 7 May 2002 09:58:13 +0000 Subject: support for ingoring session cookies added --- include/curl/curl.h | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) (limited to 'include') diff --git a/include/curl/curl.h b/include/curl/curl.h index 2d52fb1eb..df4f093b1 100644 --- a/include/curl/curl.h +++ b/include/curl/curl.h @@ -537,10 +537,18 @@ typedef enum { /* set the data for the debug function */ CINIT(DEBUGDATA, OBJECTPOINT, 95), + + /* mark this as start of a cookie session */ + CINIT(COOKIESESSION, LONG, 96), CURLOPT_LASTENTRY /* the last unusued */ } CURLoption; + /* two convenient "aliases" that follow the name scheme better */ +#define CURLOPT_WRITEDATA CURLOPT_FILE +#define CURLOPT_READDATA CURLOPT_INFILE + + /* These enums are for use with the CURLOPT_HTTP_VERSION option. */ enum { CURL_HTTP_VERSION_NONE, /* setting this means we don't care, and that we'd @@ -676,8 +684,8 @@ CURLcode curl_global_init(long flags); void curl_global_cleanup(void); /* This is the version number */ -#define LIBCURL_VERSION "7.9.6" -#define LIBCURL_VERSION_NUM 0x070906 +#define LIBCURL_VERSION "7.9.7-pre1" +#define LIBCURL_VERSION_NUM 0x070907 /* linked-list structure for the CURLOPT_QUOTE option (and other) */ struct curl_slist { -- cgit v1.2.1 From bbe10cb0cb45eae6e737523b215ecdf43d385765 Mon Sep 17 00:00:00 2001 From: Daniel Stenberg Date: Tue, 7 May 2002 21:52:38 +0000 Subject: 7.9.7-pre2 --- include/curl/curl.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'include') diff --git a/include/curl/curl.h b/include/curl/curl.h index df4f093b1..5ca508722 100644 --- a/include/curl/curl.h +++ b/include/curl/curl.h @@ -684,7 +684,7 @@ CURLcode curl_global_init(long flags); void curl_global_cleanup(void); /* This is the version number */ -#define LIBCURL_VERSION "7.9.7-pre1" +#define LIBCURL_VERSION "7.9.7-pre2" #define LIBCURL_VERSION_NUM 0x070907 /* linked-list structure for the CURLOPT_QUOTE option (and other) */ -- cgit v1.2.1 From edb17560509831e8caa1fcf3fe70000196f44294 Mon Sep 17 00:00:00 2001 From: Daniel Stenberg Date: Mon, 13 May 2002 09:40:16 +0000 Subject: 7.9.7 commit --- include/curl/curl.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'include') diff --git a/include/curl/curl.h b/include/curl/curl.h index 5ca508722..237b24b24 100644 --- a/include/curl/curl.h +++ b/include/curl/curl.h @@ -684,7 +684,7 @@ CURLcode curl_global_init(long flags); void curl_global_cleanup(void); /* This is the version number */ -#define LIBCURL_VERSION "7.9.7-pre2" +#define LIBCURL_VERSION "7.9.7" #define LIBCURL_VERSION_NUM 0x070907 /* linked-list structure for the CURLOPT_QUOTE option (and other) */ -- cgit v1.2.1 From 5d2944c21185200ebc1ba194fd8214557bb62e66 Mon Sep 17 00:00:00 2001 From: Daniel Stenberg Date: Tue, 21 May 2002 07:44:27 +0000 Subject: curl_formadd() now returns 'CURLFORMcode' instead of int, to better enable checking for particular errors. curl/curl.h defines the errros --- include/curl/curl.h | 30 +++++++++++++++++++++++++++++- 1 file changed, 29 insertions(+), 1 deletion(-) (limited to 'include') diff --git a/include/curl/curl.h b/include/curl/curl.h index 237b24b24..8833ad7e8 100644 --- a/include/curl/curl.h +++ b/include/curl/curl.h @@ -656,7 +656,35 @@ struct curl_forms { }; /* use this for multipart formpost building */ -int curl_formadd(struct curl_httppost **httppost, +/* Returns code for curl_formadd() + * + * Returns: + * CURL_FORMADD_OK on success + * CURL_FORMADD_MEMORY if the FormInfo allocation fails + * CURL_FORMADD_OPTION_TWICE if one option is given twice for one Form + * CURL_FORMADD_NULL if a null pointer was given for a char + * CURL_FORMADD_MEMORY if the allocation of a FormInfo struct failed + * CURL_FORMADD_UNKNOWN_OPTION if an unknown option was used + * CURL_FORMADD_INCOMPLETE if the some FormInfo is not complete (or error) + * CURL_FORMADD_MEMORY if a HttpPost struct cannot be allocated + * CURL_FORMADD_MEMORY if some allocation for string copying failed. + * CURL_FORMADD_ILLEGAL_ARRAY if an illegal option is used in an array + * + ***************************************************************************/ +typedef enum { + CURL_FORMADD_OK, /* first, no error */ + + CURL_FORMADD_MEMORY, + CURL_FORMADD_OPTION_TWICE, + CURL_FORMADD_NULL, + CURL_FORMADD_UNKNOWN_OPTION, + CURL_FORMADD_INCOMPLETE, + CURL_FORMADD_ILLEGAL_ARRAY, + + CURL_FORMADD_LAST /* last */ +} CURLFORMcode; + +CURLFORMcode curl_formadd(struct curl_httppost **httppost, struct curl_httppost **last_post, ...); -- cgit v1.2.1 From 0aeb25ff3b7e23b12212fb3d18b70fb75917d87b Mon Sep 17 00:00:00 2001 From: Daniel Stenberg Date: Tue, 21 May 2002 22:22:28 +0000 Subject: James Cone added the new CURL_NETRC_OPTION enum --- include/curl/curl.h | 18 +++++++++++++++++- 1 file changed, 17 insertions(+), 1 deletion(-) (limited to 'include') diff --git a/include/curl/curl.h b/include/curl/curl.h index 8833ad7e8..ea975c68b 100644 --- a/include/curl/curl.h +++ b/include/curl/curl.h @@ -379,7 +379,11 @@ typedef enum { CINIT(FTPLISTONLY, LONG, 48), /* Use NLST when listing ftp dir */ CINIT(FTPAPPEND, LONG, 50), /* Append instead of overwrite on upload! */ - CINIT(NETRC, LONG, 51), /* read user+password from .netrc */ + + /* Specify whether to read the user+password from the .netrc or the URL. + * This must be one of the CURL_NETRC_* enums below. */ + CINIT(NETRC, LONG, 51), + CINIT(FOLLOWLOCATION, LONG, 52), /* use Location: Luke! */ /* This FTPASCII name is now obsolete, to be removed, use the TRANSFERTEXT @@ -560,6 +564,18 @@ enum { CURL_HTTP_VERSION_LAST /* *ILLEGAL* http version */ }; + /* These enums are for use with the CURLOPT_NETRC option. */ +enum CURL_NETRC_OPTION { + CURL_NETRC_IGNORED, /* The .netrc will never be read. + * This is the default. */ + CURL_NETRC_OPTIONAL, /* A user:password in the URL will be preferred + * to one in the .netrc. */ + CURL_NETRC_REQUIRED, /* A user:password in the URL will be ignored. + * Unless one is set programmatically, the .netrc + * will be queried. */ + CURL_NETRC_LAST +}; + enum { CURL_SSLVERSION_DEFAULT, CURL_SSLVERSION_TLSv1, -- cgit v1.2.1 From 59c11b82d55b6e8110f2232f0fd47068e4072495 Mon Sep 17 00:00:00 2001 From: Daniel Stenberg Date: Tue, 28 May 2002 09:21:29 +0000 Subject: Cris Bailiff's CAPATH support added --- include/curl/curl.h | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) (limited to 'include') diff --git a/include/curl/curl.h b/include/curl/curl.h index ea975c68b..23065c70f 100644 --- a/include/curl/curl.h +++ b/include/curl/curl.h @@ -544,6 +544,10 @@ typedef enum { /* mark this as start of a cookie session */ CINIT(COOKIESESSION, LONG, 96), + + /* The CApath directory used to validate the peer certificate + this option is used only if SSL_VERIFYPEER is true */ + CINIT(CAPATH, OBJECTPOINT, 97), CURLOPT_LASTENTRY /* the last unusued */ } CURLoption; @@ -728,8 +732,8 @@ CURLcode curl_global_init(long flags); void curl_global_cleanup(void); /* This is the version number */ -#define LIBCURL_VERSION "7.9.7" -#define LIBCURL_VERSION_NUM 0x070907 +#define LIBCURL_VERSION "7.9.8-pre1" +#define LIBCURL_VERSION_NUM 0x070908 /* linked-list structure for the CURLOPT_QUOTE option (and other) */ struct curl_slist { -- cgit v1.2.1 From be35b3ad03a9c6388ddeff9d55bfb6fbc770ed21 Mon Sep 17 00:00:00 2001 From: Daniel Stenberg Date: Tue, 11 Jun 2002 15:28:50 +0000 Subject: 7.9.8-pre3 commit --- include/curl/curl.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'include') diff --git a/include/curl/curl.h b/include/curl/curl.h index 23065c70f..7dc7b70b4 100644 --- a/include/curl/curl.h +++ b/include/curl/curl.h @@ -732,7 +732,7 @@ CURLcode curl_global_init(long flags); void curl_global_cleanup(void); /* This is the version number */ -#define LIBCURL_VERSION "7.9.8-pre1" +#define LIBCURL_VERSION "7.9.8-pre3" #define LIBCURL_VERSION_NUM 0x070908 /* linked-list structure for the CURLOPT_QUOTE option (and other) */ -- cgit v1.2.1 From 131645dc310a70d8d8ca1df00ec7329bc80c940e Mon Sep 17 00:00:00 2001 From: Daniel Stenberg Date: Wed, 12 Jun 2002 21:40:59 +0000 Subject: Chris Combes added CURLFORM_BUFFER, CURLFORM_BUFFERPTR, CURLFORM_BUFFERLENGTH --- include/curl/curl.h | 15 +++++++++++++++ 1 file changed, 15 insertions(+) (limited to 'include') diff --git a/include/curl/curl.h b/include/curl/curl.h index 7dc7b70b4..686204210 100644 --- a/include/curl/curl.h +++ b/include/curl/curl.h @@ -65,6 +65,11 @@ struct curl_httppost { long namelength; /* length of name length */ char *contents; /* pointer to allocated data contents */ long contentslength; /* length of contents field */ + + /* CMC: Added support for buffer uploads */ + char *buffer; /* pointer to allocated buffer contents */ + long bufferlength; /* length of buffer field */ + char *contenttype; /* Content-Type */ struct curl_slist* contentheader; /* list of extra headers for this form */ struct curl_httppost *more; /* if one field name has more than one file, this @@ -76,6 +81,11 @@ struct curl_httppost { do not free in formfree */ #define HTTPPOST_PTRCONTENTS (1<<3) /* contents is only stored pointer do not free in formfree */ + +/* CMC: Added support for buffer uploads */ +#define HTTPPOST_BUFFER (1<<4) /* upload file from buffer */ +#define HTTPPOST_PTRBUFFER (1<<5) /* upload file from pointer contents */ + char *showfilename; /* The file name to show. If not set, the actual file name will be used (if this is a file part) */ }; @@ -658,6 +668,11 @@ typedef enum { CFINIT(ARRAY), CFINIT(OBSOLETE), CFINIT(FILE), + + CFINIT(BUFFER), + CFINIT(BUFFERPTR), + CFINIT(BUFFERLENGTH), + CFINIT(CONTENTTYPE), CFINIT(CONTENTHEADER), CFINIT(FILENAME), -- cgit v1.2.1 From 67273eed9bc06b864bfb5882fc87ee6cd891be38 Mon Sep 17 00:00:00 2001 From: Daniel Stenberg Date: Thu, 13 Jun 2002 14:37:15 +0000 Subject: 7.9.8 commit --- include/curl/curl.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'include') diff --git a/include/curl/curl.h b/include/curl/curl.h index 686204210..c616466dc 100644 --- a/include/curl/curl.h +++ b/include/curl/curl.h @@ -747,7 +747,7 @@ CURLcode curl_global_init(long flags); void curl_global_cleanup(void); /* This is the version number */ -#define LIBCURL_VERSION "7.9.8-pre3" +#define LIBCURL_VERSION "7.9.8" #define LIBCURL_VERSION_NUM 0x070908 /* linked-list structure for the CURLOPT_QUOTE option (and other) */ -- cgit v1.2.1 From 23262e30bcb0558a8d61297e229de8161f103a22 Mon Sep 17 00:00:00 2001 From: Daniel Stenberg Date: Sat, 15 Jun 2002 21:06:17 +0000 Subject: Added CURLOPT_BUFFERSIZE --- include/curl/curl.h | 3 +++ 1 file changed, 3 insertions(+) (limited to 'include') diff --git a/include/curl/curl.h b/include/curl/curl.h index c616466dc..efbeefbce 100644 --- a/include/curl/curl.h +++ b/include/curl/curl.h @@ -558,6 +558,9 @@ typedef enum { /* The CApath directory used to validate the peer certificate this option is used only if SSL_VERIFYPEER is true */ CINIT(CAPATH, OBJECTPOINT, 97), + + /* Instruct libcurl to use a smaller receive buffer */ + CINIT(BUFFERSIZE, LONG, 98), CURLOPT_LASTENTRY /* the last unusued */ } CURLoption; -- cgit v1.2.1 From fcb1d3521adf69ad9a8a5b98dc1a77d14e3b6b49 Mon Sep 17 00:00:00 2001 From: Daniel Stenberg Date: Wed, 31 Jul 2002 23:18:27 +0000 Subject: sys/socket.h without #ifdef include sys/time.h as well --- include/curl/multi.h | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) (limited to 'include') diff --git a/include/curl/multi.h b/include/curl/multi.h index 42fa1dd4c..b1ca28b21 100644 --- a/include/curl/multi.h +++ b/include/curl/multi.h @@ -47,11 +47,12 @@ Example sources using this interface is here: ../multi/ */ -#ifdef HAVE_SYS_SOCKET_H -#include -#endif + #if defined(WIN32) && !defined(__GNUC__) || defined(__MINGW32__) #include +#else +#include +#include #endif #include -- cgit v1.2.1 From 9e4594be5319f0942e1ed9a40dda8b32df3b5cc3 Mon Sep 17 00:00:00 2001 From: Daniel Stenberg Date: Thu, 8 Aug 2002 22:44:09 +0000 Subject: fix the ansi/iso cpp check to work with c++ --- include/curl/curl.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'include') diff --git a/include/curl/curl.h b/include/curl/curl.h index efbeefbce..c1f2e272a 100644 --- a/include/curl/curl.h +++ b/include/curl/curl.h @@ -221,7 +221,7 @@ typedef enum { #ifdef CINIT #undef CINIT #endif -#if defined(__STDC__) || defined(_MSC_VER) +#if defined(__STDC__) || defined(_MSC_VER) || defined(__cplusplus) #define CINIT(name,type,number) CURLOPT_ ## name = CURLOPTTYPE_ ## type + number #else /* The macro "##" is ISO C, we assume pre-ISO C doesn't support it. */ @@ -650,7 +650,7 @@ int curl_formparse(char *, struct curl_httppost **, #undef CFINIT #endif -#if defined(__STDC__) || defined(_MSC_VER) +#if defined(__STDC__) || defined(_MSC_VER) || defined(__cplusplus) #define CFINIT(name) CURLFORM_ ## name #else /* The macro "##" is ISO C, we assume pre-ISO C doesn't support it. */ -- cgit v1.2.1 From 4cf953678d06346de07d3d64fe5bc650cbc01bf6 Mon Sep 17 00:00:00 2001 From: Daniel Stenberg Date: Thu, 8 Aug 2002 22:52:50 +0000 Subject: Markus F.X.J. Oberhumer's CURLOPT_NOSIGNAL patch --- include/curl/curl.h | 3 +++ 1 file changed, 3 insertions(+) (limited to 'include') diff --git a/include/curl/curl.h b/include/curl/curl.h index c1f2e272a..53be2f5b2 100644 --- a/include/curl/curl.h +++ b/include/curl/curl.h @@ -561,6 +561,9 @@ typedef enum { /* Instruct libcurl to use a smaller receive buffer */ CINIT(BUFFERSIZE, LONG, 98), + + /* Instruct libcurl to do not use any signal/alarm handlers, even with timeouts. */ + CINIT(NOSIGNAL, LONG, 99), CURLOPT_LASTENTRY /* the last unusued */ } CURLoption; -- cgit v1.2.1 From d1be3a4a1d72eff0a509d397eb9afb2df5e227bc Mon Sep 17 00:00:00 2001 From: Daniel Stenberg Date: Thu, 8 Aug 2002 23:07:24 +0000 Subject: cvsignore files --- include/.cvsignore | 2 ++ include/curl/.cvsignore | 2 ++ 2 files changed, 4 insertions(+) create mode 100644 include/.cvsignore create mode 100644 include/curl/.cvsignore (limited to 'include') diff --git a/include/.cvsignore b/include/.cvsignore new file mode 100644 index 000000000..282522db0 --- /dev/null +++ b/include/.cvsignore @@ -0,0 +1,2 @@ +Makefile +Makefile.in diff --git a/include/curl/.cvsignore b/include/curl/.cvsignore new file mode 100644 index 000000000..282522db0 --- /dev/null +++ b/include/curl/.cvsignore @@ -0,0 +1,2 @@ +Makefile +Makefile.in -- cgit v1.2.1 From 0009e4dfb91c6ea3789e65db26648ed9da6b8da2 Mon Sep 17 00:00:00 2001 From: Daniel Stenberg Date: Mon, 12 Aug 2002 22:36:37 +0000 Subject: 7.9.9-pre1 --- include/curl/curl.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'include') diff --git a/include/curl/curl.h b/include/curl/curl.h index 53be2f5b2..6c4722f60 100644 --- a/include/curl/curl.h +++ b/include/curl/curl.h @@ -753,8 +753,8 @@ CURLcode curl_global_init(long flags); void curl_global_cleanup(void); /* This is the version number */ -#define LIBCURL_VERSION "7.9.8" -#define LIBCURL_VERSION_NUM 0x070908 +#define LIBCURL_VERSION "7.9.9-pre1" +#define LIBCURL_VERSION_NUM 0x070909 /* linked-list structure for the CURLOPT_QUOTE option (and other) */ struct curl_slist { -- cgit v1.2.1 From 6dfe0ec31ed5ac5c9868b08bd8340a2101e8b667 Mon Sep 17 00:00:00 2001 From: Daniel Stenberg Date: Tue, 13 Aug 2002 14:20:47 +0000 Subject: Sterling Hughes brings the share interface --- include/curl/curl.h | 46 +++++++++++++++++++++++++++++++++++++++++++--- 1 file changed, 43 insertions(+), 3 deletions(-) (limited to 'include') diff --git a/include/curl/curl.h b/include/curl/curl.h index 6c4722f60..7c7a47f9c 100644 --- a/include/curl/curl.h +++ b/include/curl/curl.h @@ -192,10 +192,11 @@ typedef enum { CURLE_SSL_PEER_CERTIFICATE, /* 51 - peer's certificate wasn't ok */ CURLE_GOT_NOTHING, /* 52 - when this is a specific error */ CURLE_SSL_ENGINE_NOTFOUND, /* 53 - SSL crypto engine not found */ - CURLE_SSL_ENGINE_SETFAILED, /* 54 - can not set SSL crypto engine as default */ + CURLE_SSL_ENGINE_SETFAILED, /* 54 - can not set SSL crypto engine as + default */ CURLE_SEND_ERROR, /* 55 - failed sending network data */ CURLE_RECV_ERROR, /* 56 - failure in receiving network data */ - + CURLE_SHARE_IN_USE, /* 57 - share is in use */ CURL_LAST /* never use! */ } CURLcode; @@ -562,9 +563,13 @@ typedef enum { /* Instruct libcurl to use a smaller receive buffer */ CINIT(BUFFERSIZE, LONG, 98), - /* Instruct libcurl to do not use any signal/alarm handlers, even with timeouts. */ + /* Instruct libcurl to never use any signal/alarm handlers, even with + timeouts. */ CINIT(NOSIGNAL, LONG, 99), + /* Provide a CURLShare for mutexing non-ts data */ + CINIT(SHARE, OBJECTPOINT, 100), + CURLOPT_LASTENTRY /* the last unusued */ } CURLoption; @@ -839,6 +844,41 @@ typedef enum { #define CURL_GLOBAL_NOTHING 0 #define CURL_GLOBAL_DEFAULT CURL_GLOBAL_ALL + +/***************************************************************************** + * Setup defines, protos etc for the sharing stuff. + */ + +/* Different types of locks that a share can aquire */ +typedef enum { + CURL_LOCK_TYPE_NONE = 0, + CURL_LOCK_TYPE_COOKIE = 1<<0, + CURL_LOCK_TYPE_DNS = 1<<1, + CURL_LOCK_TYPE_SSL_SESSION = 2<<1, + CURL_LOCK_TYPE_CONNECT = 2<<2, + CURL_LOCK_TYPE_LAST +} curl_lock_type; + +typedef void (*curl_lock_function)(CURL *, curl_lock_type, void *); +typedef void (*curl_unlock_function)(CURL *, curl_lock_type, void *); + +typedef struct { + unsigned int specifier; + unsigned int locked; + unsigned int dirty; + + curl_lock_function lockfunc; + curl_unlock_function unlockfunc; + void *clientdata; +} curl_share; + +curl_share *curl_share_init (void); +CURLcode curl_share_setopt (curl_share *, curl_lock_type, int); +CURLcode curl_share_set_lock_function (curl_share *, curl_lock_function); +CURLcode curl_share_set_unlock_function (curl_share *, curl_unlock_function); +CURLcode curl_share_set_lock_data (curl_share *, void *); +CURLcode curl_share_destroy (curl_share *); + #ifdef __cplusplus } #endif -- cgit v1.2.1 From 183f1531d3104acf453ac710b6dfc69b8bfc99a2 Mon Sep 17 00:00:00 2001 From: Daniel Stenberg Date: Tue, 13 Aug 2002 15:03:57 +0000 Subject: include curl-includes "local" instead of --- include/curl/curl.h | 6 +++--- include/curl/multi.h | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) (limited to 'include') diff --git a/include/curl/curl.h b/include/curl/curl.h index 7c7a47f9c..d4ce4cd43 100644 --- a/include/curl/curl.h +++ b/include/curl/curl.h @@ -49,7 +49,7 @@ #define FALSE 0 #endif -#include +#include "types.h" #ifdef __cplusplus extern "C" { @@ -823,8 +823,8 @@ typedef enum { /* unfortunately, the easy.h and multi.h include files need options and info stuff before they can be included! */ -#include /* nothing in curl is fun without the easy stuff */ -#include +#include "easy.h" /* nothing in curl is fun without the easy stuff */ +#include "multi.h" typedef enum { CURLCLOSEPOLICY_NONE, /* first, never use this */ diff --git a/include/curl/multi.h b/include/curl/multi.h index b1ca28b21..d84bd36e5 100644 --- a/include/curl/multi.h +++ b/include/curl/multi.h @@ -55,7 +55,7 @@ #include #endif -#include +#include "curl.h" typedef void CURLM; -- cgit v1.2.1 From 904183262ab12d6a29bc53cc61aebaa4a7648138 Mon Sep 17 00:00:00 2001 From: Daniel Stenberg Date: Thu, 22 Aug 2002 19:46:16 +0000 Subject: Markus F.X.J. Oberhumer added better NOSIGNAL description and fixed spelling error --- include/curl/curl.h | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) (limited to 'include') diff --git a/include/curl/curl.h b/include/curl/curl.h index d4ce4cd43..c0299c6f3 100644 --- a/include/curl/curl.h +++ b/include/curl/curl.h @@ -563,14 +563,15 @@ typedef enum { /* Instruct libcurl to use a smaller receive buffer */ CINIT(BUFFERSIZE, LONG, 98), - /* Instruct libcurl to never use any signal/alarm handlers, even with - timeouts. */ + /* Instruct libcurl to not use any signal/alarm handlers, even when using + timeouts. This option is useful for multi-threaded applications. + See libcurl-the-guide for more background information. */ CINIT(NOSIGNAL, LONG, 99), /* Provide a CURLShare for mutexing non-ts data */ CINIT(SHARE, OBJECTPOINT, 100), - CURLOPT_LASTENTRY /* the last unusued */ + CURLOPT_LASTENTRY /* the last unused */ } CURLoption; /* two convenient "aliases" that follow the name scheme better */ -- cgit v1.2.1 From 27a2e590cd64cd6f31472681f0e61167b729e005 Mon Sep 17 00:00:00 2001 From: Daniel Stenberg Date: Mon, 26 Aug 2002 23:13:25 +0000 Subject: SSL_INSECURE support and usage added --- include/curl/curl.h | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'include') diff --git a/include/curl/curl.h b/include/curl/curl.h index c0299c6f3..46a52b1c5 100644 --- a/include/curl/curl.h +++ b/include/curl/curl.h @@ -197,6 +197,8 @@ typedef enum { CURLE_SEND_ERROR, /* 55 - failed sending network data */ CURLE_RECV_ERROR, /* 56 - failure in receiving network data */ CURLE_SHARE_IN_USE, /* 57 - share is in use */ + CURLE_SSL_INSECURE, /* 58 - connect attempt without certificate + but SSL_INSECURE not explicitly allowed */ CURL_LAST /* never use! */ } CURLcode; @@ -571,6 +573,9 @@ typedef enum { /* Provide a CURLShare for mutexing non-ts data */ CINIT(SHARE, OBJECTPOINT, 100), + /* Explicitly allow insecure SSL connects */ + CINIT(SSL_INSECURE, LONG, 101), + CURLOPT_LASTENTRY /* the last unused */ } CURLoption; -- cgit v1.2.1 From 8aa3f143035ad982acb6e596a8653ac41a7860cc Mon Sep 17 00:00:00 2001 From: Daniel Stenberg Date: Fri, 30 Aug 2002 09:20:11 +0000 Subject: SOCKS5 support added (contributed by a still unnamed person). Not properly working for "IPv6 enabled" libcurls yet, but should be pretty easy for someone to adjust. --- include/curl/curl.h | 10 ++++++++++ 1 file changed, 10 insertions(+) (limited to 'include') diff --git a/include/curl/curl.h b/include/curl/curl.h index 46a52b1c5..00a7fa88a 100644 --- a/include/curl/curl.h +++ b/include/curl/curl.h @@ -202,6 +202,12 @@ typedef enum { CURL_LAST /* never use! */ } CURLcode; +typedef enum { + CURLPROXY_HTTP = 0, + CURLPROXY_SOCKS4 = 4, + CURLPROXY_SOCKS5 = 5 +} curl_proxytype; + /* this was the error code 50 in 7.7.3 and a few earlier versions, this is no longer used by libcurl but is instead #defined here only to not make programs break */ @@ -576,6 +582,10 @@ typedef enum { /* Explicitly allow insecure SSL connects */ CINIT(SSL_INSECURE, LONG, 101), + /* indicates type of proxy. accepted values are CURLPROXY_HTTP (default), + CURLPROXY_SOCKS4 and CURLPROXY_SOCKS5. */ + CINIT(PROXYTYPE, LONG, 102), + CURLOPT_LASTENTRY /* the last unused */ } CURLoption; -- cgit v1.2.1 From 0e0caf7c063c282fb35b8ab87fde1d38fe32d489 Mon Sep 17 00:00:00 2001 From: Daniel Stenberg Date: Fri, 30 Aug 2002 11:09:49 +0000 Subject: CURLE_SSL_INSECURE is removed again and so is CURLOPT_SSL_INSECURE, we proceed fine with the already existing options, just having a different internal library default for capath. --- include/curl/curl.h | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) (limited to 'include') diff --git a/include/curl/curl.h b/include/curl/curl.h index 00a7fa88a..1b20a674e 100644 --- a/include/curl/curl.h +++ b/include/curl/curl.h @@ -197,8 +197,10 @@ typedef enum { CURLE_SEND_ERROR, /* 55 - failed sending network data */ CURLE_RECV_ERROR, /* 56 - failure in receiving network data */ CURLE_SHARE_IN_USE, /* 57 - share is in use */ - CURLE_SSL_INSECURE, /* 58 - connect attempt without certificate - but SSL_INSECURE not explicitly allowed */ + CURLE_SSL_CERTPROBLEM, /* 58 - problem with the local certificate */ + CURLE_SSL_CIPHER, /* 59 - couldn't use specified cipher */ + CURLE_SSL_CACERT, /* 60 - problem with the CA cert (path?) */ + CURL_LAST /* never use! */ } CURLcode; @@ -579,12 +581,9 @@ typedef enum { /* Provide a CURLShare for mutexing non-ts data */ CINIT(SHARE, OBJECTPOINT, 100), - /* Explicitly allow insecure SSL connects */ - CINIT(SSL_INSECURE, LONG, 101), - /* indicates type of proxy. accepted values are CURLPROXY_HTTP (default), CURLPROXY_SOCKS4 and CURLPROXY_SOCKS5. */ - CINIT(PROXYTYPE, LONG, 102), + CINIT(PROXYTYPE, LONG, 101), CURLOPT_LASTENTRY /* the last unused */ } CURLoption; -- cgit v1.2.1 From 64bbe9dfafc6693a96b742f3133c636385835a19 Mon Sep 17 00:00:00 2001 From: Daniel Stenberg Date: Mon, 2 Sep 2002 22:31:18 +0000 Subject: James Gallagher's Content-Encoding work --- include/curl/curl.h | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'include') diff --git a/include/curl/curl.h b/include/curl/curl.h index 1b20a674e..e547136ac 100644 --- a/include/curl/curl.h +++ b/include/curl/curl.h @@ -200,6 +200,7 @@ typedef enum { CURLE_SSL_CERTPROBLEM, /* 58 - problem with the local certificate */ CURLE_SSL_CIPHER, /* 59 - couldn't use specified cipher */ CURLE_SSL_CACERT, /* 60 - problem with the CA cert (path?) */ + CURLE_BAD_CONTENT_ENCODING, /* 61 - Unrecognized transfer encoding */ CURL_LAST /* never use! */ } CURLcode; @@ -585,6 +586,11 @@ typedef enum { CURLPROXY_SOCKS4 and CURLPROXY_SOCKS5. */ CINIT(PROXYTYPE, LONG, 101), + /* Set the Accept-Encoding string. Use this to tell a server you would like + the response to be compressed. */ + CINIT(ENCODING, OBJECTPOINT, 102), + + CURLOPT_LASTENTRY /* the last unused */ } CURLoption; -- cgit v1.2.1 From de5e9f100cfdf083661e78bf9f13d28b42ea34fe Mon Sep 17 00:00:00 2001 From: Daniel Stenberg Date: Tue, 3 Sep 2002 11:30:41 +0000 Subject: 7.10-pre2 --- include/curl/curl.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'include') diff --git a/include/curl/curl.h b/include/curl/curl.h index e547136ac..eb3c2a79a 100644 --- a/include/curl/curl.h +++ b/include/curl/curl.h @@ -779,8 +779,8 @@ CURLcode curl_global_init(long flags); void curl_global_cleanup(void); /* This is the version number */ -#define LIBCURL_VERSION "7.9.9-pre1" -#define LIBCURL_VERSION_NUM 0x070909 +#define LIBCURL_VERSION "7.10-pre2" +#define LIBCURL_VERSION_NUM 0x070a00 /* linked-list structure for the CURLOPT_QUOTE option (and other) */ struct curl_slist { -- cgit v1.2.1 From ba4e69bebc8f7f32f3bc7faa1e13e7580754075b Mon Sep 17 00:00:00 2001 From: Daniel Stenberg Date: Tue, 3 Sep 2002 11:52:59 +0000 Subject: updated source code boilerplate/header --- include/curl/curl.h | 14 +++++++------- include/curl/easy.h | 14 +++++++------- include/curl/multi.h | 14 +++++++------- include/curl/stdcheaders.h | 14 +++++++------- include/curl/types.h | 14 +++++++------- 5 files changed, 35 insertions(+), 35 deletions(-) (limited to 'include') diff --git a/include/curl/curl.h b/include/curl/curl.h index eb3c2a79a..031155aa4 100644 --- a/include/curl/curl.h +++ b/include/curl/curl.h @@ -1,6 +1,6 @@ #ifndef __CURL_CURL_H #define __CURL_CURL_H -/***************************************************************************** +/*************************************************************************** * _ _ ____ _ * Project ___| | | | _ \| | * / __| | | | |_) | | @@ -9,19 +9,19 @@ * * Copyright (C) 1998 - 2002, Daniel Stenberg, , et al. * - * In order to be useful for every potential user, curl and libcurl are - * dual-licensed under the MPL and the MIT/X-derivate licenses. - * + * 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. + * * 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 - * furnished to do so, under the terms of the MPL or the MIT/X-derivate - * licenses. You may pick one of these licenses. + * furnished to do so, under the terms of the COPYING file. * * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY * KIND, either express or implied. * * $Id$ - *****************************************************************************/ + ***************************************************************************/ #include /* The include stuff here is mainly for time_t! */ diff --git a/include/curl/easy.h b/include/curl/easy.h index afdcff1dd..47f4e9660 100644 --- a/include/curl/easy.h +++ b/include/curl/easy.h @@ -1,6 +1,6 @@ #ifndef __CURL_EASY_H #define __CURL_EASY_H -/***************************************************************************** +/*************************************************************************** * _ _ ____ _ * Project ___| | | | _ \| | * / __| | | | |_) | | @@ -9,19 +9,19 @@ * * Copyright (C) 1998 - 2002, Daniel Stenberg, , et al. * - * In order to be useful for every potential user, curl and libcurl are - * dual-licensed under the MPL and the MIT/X-derivate licenses. - * + * 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. + * * 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 - * furnished to do so, under the terms of the MPL or the MIT/X-derivate - * licenses. You may pick one of these licenses. + * furnished to do so, under the terms of the COPYING file. * * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY * KIND, either express or implied. * * $Id$ - *****************************************************************************/ + ***************************************************************************/ #ifdef __cplusplus extern "C" { #endif diff --git a/include/curl/multi.h b/include/curl/multi.h index d84bd36e5..40dd01efd 100644 --- a/include/curl/multi.h +++ b/include/curl/multi.h @@ -1,6 +1,6 @@ #ifndef __CURL_MULTI_H #define __CURL_MULTI_H -/***************************************************************************** +/*************************************************************************** * _ _ ____ _ * Project ___| | | | _ \| | * / __| | | | |_) | | @@ -9,19 +9,19 @@ * * Copyright (C) 1998 - 2002, Daniel Stenberg, , et al. * - * In order to be useful for every potential user, curl and libcurl are - * dual-licensed under the MPL and the MIT/X-derivate licenses. - * + * 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. + * * 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 - * furnished to do so, under the terms of the MPL or the MIT/X-derivate - * licenses. You may pick one of these licenses. + * furnished to do so, under the terms of the COPYING file. * * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY * KIND, either express or implied. * * $Id$ - *****************************************************************************/ + ***************************************************************************/ /* This is meant to be the "external" header file. Don't give away any internals here! diff --git a/include/curl/stdcheaders.h b/include/curl/stdcheaders.h index ec401ea23..35648b5ad 100644 --- a/include/curl/stdcheaders.h +++ b/include/curl/stdcheaders.h @@ -1,6 +1,6 @@ #ifndef __STDC_HEADERS_H #define __STDC_HEADERS_H -/***************************************************************************** +/*************************************************************************** * _ _ ____ _ * Project ___| | | | _ \| | * / __| | | | |_) | | @@ -9,19 +9,19 @@ * * Copyright (C) 1998 - 2002, Daniel Stenberg, , et al. * - * In order to be useful for every potential user, curl and libcurl are - * dual-licensed under the MPL and the MIT/X-derivate licenses. - * + * 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. + * * 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 - * furnished to do so, under the terms of the MPL or the MIT/X-derivate - * licenses. You may pick one of these licenses. + * furnished to do so, under the terms of the COPYING file. * * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY * KIND, either express or implied. * * $Id$ - *****************************************************************************/ + ***************************************************************************/ #ifdef HAVE_SYS_TYPES_H #include diff --git a/include/curl/types.h b/include/curl/types.h index 97e57cb40..5598880d7 100644 --- a/include/curl/types.h +++ b/include/curl/types.h @@ -1,6 +1,6 @@ #ifndef __CURL_TYPES_H #define __CURL_TYPES_H -/***************************************************************************** +/*************************************************************************** * _ _ ____ _ * Project ___| | | | _ \| | * / __| | | | |_) | | @@ -9,19 +9,19 @@ * * Copyright (C) 1998 - 2002, Daniel Stenberg, , et al. * - * In order to be useful for every potential user, curl and libcurl are - * dual-licensed under the MPL and the MIT/X-derivate licenses. - * + * 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. + * * 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 - * furnished to do so, under the terms of the MPL or the MIT/X-derivate - * licenses. You may pick one of these licenses. + * furnished to do so, under the terms of the COPYING file. * * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY * KIND, either express or implied. * * $Id$ - *****************************************************************************/ + ***************************************************************************/ typedef void CURL; typedef void CURLconnect; -- cgit v1.2.1 From b36c654a3d46d309e636918f1dfaa6c7794aad80 Mon Sep 17 00:00:00 2001 From: Daniel Stenberg Date: Mon, 9 Sep 2002 06:48:42 +0000 Subject: Ricardo Cadime helped us work out another check for the ## preprocessor directive. --- include/curl/curl.h | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) (limited to 'include') diff --git a/include/curl/curl.h b/include/curl/curl.h index 031155aa4..ded488ead 100644 --- a/include/curl/curl.h +++ b/include/curl/curl.h @@ -233,7 +233,15 @@ typedef enum { #ifdef CINIT #undef CINIT #endif -#if defined(__STDC__) || defined(_MSC_VER) || defined(__cplusplus) +/* + * Figure out if we can use the ## operator, which is supported by ISO/ANSI C + * and C++. Some compilers support it without setting __STDC__ or __cplusplus + * so we need to carefully check for them too. We don't use configure-checks + * for these since we want these headers to remain generic and working for all + * platforms. + */ +#if defined(__STDC__) || defined(_MSC_VER) || defined(__cplusplus) || \ + defined(__HP_aCC) #define CINIT(name,type,number) CURLOPT_ ## name = CURLOPTTYPE_ ## type + number #else /* The macro "##" is ISO C, we assume pre-ISO C doesn't support it. */ -- cgit v1.2.1 From 08620743b9b1b7a588ab444a9c1b8e1e79d584ca Mon Sep 17 00:00:00 2001 From: Daniel Stenberg Date: Mon, 23 Sep 2002 13:27:12 +0000 Subject: made the resume error more suitable for all protocols, but we provide a fallback to the old ftp-one to make old programs work the same --- include/curl/curl.h | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'include') diff --git a/include/curl/curl.h b/include/curl/curl.h index ded488ead..e4b63430a 100644 --- a/include/curl/curl.h +++ b/include/curl/curl.h @@ -174,7 +174,7 @@ typedef enum { CURLE_HTTP_RANGE_ERROR, /* 33 - RANGE "command" didn't work */ CURLE_HTTP_POST_ERROR, /* 34 */ CURLE_SSL_CONNECT_ERROR, /* 35 - wrong when connecting with SSL */ - CURLE_FTP_BAD_DOWNLOAD_RESUME, /* 36 - couldn't resume download */ + CURLE_BAD_DOWNLOAD_RESUME, /* 36 - couldn't resume download */ CURLE_FILE_COULDNT_READ_FILE, /* 37 */ CURLE_LDAP_CANNOT_BIND, /* 38 */ CURLE_LDAP_SEARCH_FAILED, /* 39 */ @@ -218,6 +218,7 @@ typedef enum { /* This is just to make older programs not break: */ #define CURLE_FTP_PARTIAL_FILE CURLE_PARTIAL_FILE +#define CURLE_FTP_BAD_DOWNLOAD_RESUME CURLE_BAD_DOWNLOAD_RESUME #define CURL_ERROR_SIZE 256 -- cgit v1.2.1 From c0460660d5a0c8f2be98adf79d2f27b5fa8f707a Mon Sep 17 00:00:00 2001 From: Daniel Stenberg Date: Wed, 25 Sep 2002 07:08:41 +0000 Subject: Wez Furlong's curl_version_info() function added, still needs some adjustments and possibly some improvments to feature all those things we could possibly want from this. --- include/curl/curl.h | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) (limited to 'include') diff --git a/include/curl/curl.h b/include/curl/curl.h index e4b63430a..65deb5247 100644 --- a/include/curl/curl.h +++ b/include/curl/curl.h @@ -909,6 +909,27 @@ CURLcode curl_share_set_unlock_function (curl_share *, curl_unlock_function); CURLcode curl_share_set_lock_data (curl_share *, void *); CURLcode curl_share_destroy (curl_share *); +/**************************************************************************** + * Structures for querying information about the curl library at runtime. + */ + +/* declared as a struct to allow future expansion while remaining backwards + * and binary compatible; any new fields in these two structs must be added + * after the existing fields */ +typedef struct { + const char *protoname; +} curl_runtime_protocol_info; + +typedef struct { + const char *version; /* LIBCURL_VERSION */ + unsigned int version_num; /* LIBCURL_VERSION_NUM */ + /* protocols is terminated by an entry with a NULL protoname */ + curl_runtime_protocol_info *protocols; +} curl_version_info_data; + +/* returns a pointer to a static copy of the version info struct */ +const curl_version_info_data *curl_version_info(void); + #ifdef __cplusplus } #endif -- cgit v1.2.1 From e399502c7adc958ff20bd68242a5cf867c0dee5f Mon Sep 17 00:00:00 2001 From: Daniel Stenberg Date: Wed, 25 Sep 2002 12:27:37 +0000 Subject: curl_free proto added --- include/curl/curl.h | 3 +++ 1 file changed, 3 insertions(+) (limited to 'include') diff --git a/include/curl/curl.h b/include/curl/curl.h index 65deb5247..e8f5793c4 100644 --- a/include/curl/curl.h +++ b/include/curl/curl.h @@ -778,6 +778,9 @@ char *curl_version(void); * allocated string or NULL if an error occurred. */ char *curl_escape(const char *string, int length); char *curl_unescape(const char *string, int length); +/* 20020912 WJM. Provide for a de-allocation in the same translation unit + that did the allocation. Added in libcurl 7.10 */ +void curl_free(void *p); /* curl_global_init() should be invoked exactly once for each application that uses libcurl */ -- cgit v1.2.1 From 1ee1f5f427bf39f07f11db812c0a62406a56bffa Mon Sep 17 00:00:00 2001 From: Daniel Stenberg Date: Wed, 25 Sep 2002 15:38:48 +0000 Subject: extended curl_version_info() with more info on related sub-libraries --- include/curl/curl.h | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) (limited to 'include') diff --git a/include/curl/curl.h b/include/curl/curl.h index e8f5793c4..de1e5aeb2 100644 --- a/include/curl/curl.h +++ b/include/curl/curl.h @@ -926,10 +926,17 @@ typedef struct { typedef struct { const char *version; /* LIBCURL_VERSION */ unsigned int version_num; /* LIBCURL_VERSION_NUM */ + int features; /* bitmask, see defines below */ + char *ssl_version; /* human readable string */ + long ssl_version_num; /* number */ + char *libz_version; /* human readable string */ /* protocols is terminated by an entry with a NULL protoname */ - curl_runtime_protocol_info *protocols; + const curl_runtime_protocol_info *protocols; } curl_version_info_data; +#define CURL_VERSION_IPV6 (1<<0) +#define CURL_VERSION_KERBEROS4 (1<<1) + /* returns a pointer to a static copy of the version info struct */ const curl_version_info_data *curl_version_info(void); -- cgit v1.2.1 From 9247daf953bb48d19948199feb12b0031f825fa0 Mon Sep 17 00:00:00 2001 From: Daniel Stenberg Date: Thu, 26 Sep 2002 13:03:22 +0000 Subject: enhanced curl_version_info --- include/curl/curl.h | 16 ++++++---------- 1 file changed, 6 insertions(+), 10 deletions(-) (limited to 'include') diff --git a/include/curl/curl.h b/include/curl/curl.h index de1e5aeb2..e5ba70379 100644 --- a/include/curl/curl.h +++ b/include/curl/curl.h @@ -916,29 +916,25 @@ CURLcode curl_share_destroy (curl_share *); * Structures for querying information about the curl library at runtime. */ -/* declared as a struct to allow future expansion while remaining backwards - * and binary compatible; any new fields in these two structs must be added - * after the existing fields */ -typedef struct { - const char *protoname; -} curl_runtime_protocol_info; - typedef struct { const char *version; /* LIBCURL_VERSION */ unsigned int version_num; /* LIBCURL_VERSION_NUM */ + const char *host; /* OS/host/cpu/machine when configured */ int features; /* bitmask, see defines below */ char *ssl_version; /* human readable string */ long ssl_version_num; /* number */ - char *libz_version; /* human readable string */ + const char *libz_version; /* human readable string */ /* protocols is terminated by an entry with a NULL protoname */ - const curl_runtime_protocol_info *protocols; + const char *protocols[1]; } curl_version_info_data; #define CURL_VERSION_IPV6 (1<<0) #define CURL_VERSION_KERBEROS4 (1<<1) +#define CURL_VERSION_SSL (1<<2) +#define CURL_VERSION_LIBZ (1<<3) /* returns a pointer to a static copy of the version info struct */ -const curl_version_info_data *curl_version_info(void); +curl_version_info_data *curl_version_info(void); #ifdef __cplusplus } -- cgit v1.2.1 From dc9e415602c32bb575b58422f52965c5d741fda3 Mon Sep 17 00:00:00 2001 From: Daniel Stenberg Date: Mon, 30 Sep 2002 19:51:05 +0000 Subject: get an argument and add a 'age' field to the struct --- include/curl/curl.h | 20 +++++++++++++++++--- 1 file changed, 17 insertions(+), 3 deletions(-) (limited to 'include') diff --git a/include/curl/curl.h b/include/curl/curl.h index e5ba70379..43534cea5 100644 --- a/include/curl/curl.h +++ b/include/curl/curl.h @@ -688,7 +688,8 @@ int curl_formparse(char *, struct curl_httppost **, #undef CFINIT #endif -#if defined(__STDC__) || defined(_MSC_VER) || defined(__cplusplus) +#if defined(__STDC__) || defined(_MSC_VER) || defined(__cplusplus) || \ + defined(__HP_aCC) #define CFINIT(name) CURLFORM_ ## name #else /* The macro "##" is ISO C, we assume pre-ISO C doesn't support it. */ @@ -916,7 +917,20 @@ CURLcode curl_share_destroy (curl_share *); * Structures for querying information about the curl library at runtime. */ +typedef enum { + CURLVERSION_FIRST, + CURLVERSION_LAST /* never actually use this */ +} CURLversion; + +/* The 'CURLVERSION_NOW' is the symbolic name meant to be used by + basicly all programs ever, that want to get version information. It is + meant to be a built-in version number for what kind of struct the caller + expects. If the struct ever changes, we redfine the NOW to another enum + from above. */ +#define CURLVERSION_NOW CURLVERSION_FIRST + typedef struct { + CURLversion age; /* age of the returned struct */ const char *version; /* LIBCURL_VERSION */ unsigned int version_num; /* LIBCURL_VERSION_NUM */ const char *host; /* OS/host/cpu/machine when configured */ @@ -925,7 +939,7 @@ typedef struct { long ssl_version_num; /* number */ const char *libz_version; /* human readable string */ /* protocols is terminated by an entry with a NULL protoname */ - const char *protocols[1]; + const char **protocols; } curl_version_info_data; #define CURL_VERSION_IPV6 (1<<0) @@ -934,7 +948,7 @@ typedef struct { #define CURL_VERSION_LIBZ (1<<3) /* returns a pointer to a static copy of the version info struct */ -curl_version_info_data *curl_version_info(void); +curl_version_info_data *curl_version_info(CURLversion); #ifdef __cplusplus } -- cgit v1.2.1 From e2e64798b5d3f1d1c75386448a6a56480828c0e5 Mon Sep 17 00:00:00 2001 From: Daniel Stenberg Date: Tue, 1 Oct 2002 08:57:49 +0000 Subject: 7.10 --- include/curl/curl.h | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'include') diff --git a/include/curl/curl.h b/include/curl/curl.h index 43534cea5..e22855e87 100644 --- a/include/curl/curl.h +++ b/include/curl/curl.h @@ -606,6 +606,7 @@ typedef enum { /* two convenient "aliases" that follow the name scheme better */ #define CURLOPT_WRITEDATA CURLOPT_FILE #define CURLOPT_READDATA CURLOPT_INFILE +#define CURLOPT_HEADERDATA CURLOPT_WRITEHEADER /* These enums are for use with the CURLOPT_HTTP_VERSION option. */ @@ -792,7 +793,7 @@ CURLcode curl_global_init(long flags); void curl_global_cleanup(void); /* This is the version number */ -#define LIBCURL_VERSION "7.10-pre2" +#define LIBCURL_VERSION "7.10" #define LIBCURL_VERSION_NUM 0x070a00 /* linked-list structure for the CURLOPT_QUOTE option (and other) */ -- cgit v1.2.1 From 123c7b32db965eeae2601fa8c2939a890668f5c5 Mon Sep 17 00:00:00 2001 From: Daniel Stenberg Date: Fri, 11 Oct 2002 13:25:08 +0000 Subject: 7.10.1 commit --- include/curl/curl.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'include') diff --git a/include/curl/curl.h b/include/curl/curl.h index e22855e87..ace8497c0 100644 --- a/include/curl/curl.h +++ b/include/curl/curl.h @@ -793,8 +793,8 @@ CURLcode curl_global_init(long flags); void curl_global_cleanup(void); /* This is the version number */ -#define LIBCURL_VERSION "7.10" -#define LIBCURL_VERSION_NUM 0x070a00 +#define LIBCURL_VERSION "7.10.1" +#define LIBCURL_VERSION_NUM 0x070a01 /* linked-list structure for the CURLOPT_QUOTE option (and other) */ struct curl_slist { -- cgit v1.2.1 From 3fa353a2d34cdf815a5dce49eb89aaa5ff717132 Mon Sep 17 00:00:00 2001 From: Daniel Stenberg Date: Wed, 23 Oct 2002 14:15:29 +0000 Subject: improved the check for an ISO cpp by checking specificly for __BORLANDC__ too, as Emiliano Ida has confirmed it to work --- include/curl/curl.h | 17 ++++++++++++----- 1 file changed, 12 insertions(+), 5 deletions(-) (limited to 'include') diff --git a/include/curl/curl.h b/include/curl/curl.h index ace8497c0..eef89cc4c 100644 --- a/include/curl/curl.h +++ b/include/curl/curl.h @@ -242,7 +242,15 @@ typedef enum { * platforms. */ #if defined(__STDC__) || defined(_MSC_VER) || defined(__cplusplus) || \ - defined(__HP_aCC) + defined(__HP_aCC) || defined(__BORLANDC__) + /* This compiler is believed to have an ISO compatible preprocessor */ +#define CURL_ISOCPP +#else + /* This compiler is believed NOT to have an ISO compatible preprocessor */ +#undef CURL_ISOCPP +#endif + +#ifdef CURL_ISOCPP #define CINIT(name,type,number) CURLOPT_ ## name = CURLOPTTYPE_ ## type + number #else /* The macro "##" is ISO C, we assume pre-ISO C doesn't support it. */ @@ -689,8 +697,7 @@ int curl_formparse(char *, struct curl_httppost **, #undef CFINIT #endif -#if defined(__STDC__) || defined(_MSC_VER) || defined(__cplusplus) || \ - defined(__HP_aCC) +#ifdef CURL_ISOCPP #define CFINIT(name) CURLFORM_ ## name #else /* The macro "##" is ISO C, we assume pre-ISO C doesn't support it. */ @@ -793,8 +800,8 @@ CURLcode curl_global_init(long flags); void curl_global_cleanup(void); /* This is the version number */ -#define LIBCURL_VERSION "7.10.1" -#define LIBCURL_VERSION_NUM 0x070a01 +#define LIBCURL_VERSION "7.10.2-test" +#define LIBCURL_VERSION_NUM 0x070a02 /* linked-list structure for the CURLOPT_QUOTE option (and other) */ struct curl_slist { -- cgit v1.2.1 From 255b1e68d07355e08210ef57c511bbd9d7d9739e Mon Sep 17 00:00:00 2001 From: Daniel Stenberg Date: Mon, 18 Nov 2002 21:58:46 +0000 Subject: as requested, CURLE_OPERATION_TIMEDOUT is now the same as CURLE_OPERATION_TIMEOUTED --- include/curl/curl.h | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'include') diff --git a/include/curl/curl.h b/include/curl/curl.h index eef89cc4c..5c042ae5b 100644 --- a/include/curl/curl.h +++ b/include/curl/curl.h @@ -205,6 +205,9 @@ typedef enum { CURL_LAST /* never use! */ } CURLcode; +/* Make a spelling correction for the operation timed-out define */ +#define CURLE_OPERATION_TIMEDOUT CURLE_OPERATION_TIMEOUTED + typedef enum { CURLPROXY_HTTP = 0, CURLPROXY_SOCKS4 = 4, @@ -800,7 +803,7 @@ CURLcode curl_global_init(long flags); void curl_global_cleanup(void); /* This is the version number */ -#define LIBCURL_VERSION "7.10.2-test" +#define LIBCURL_VERSION "7.10.2-pre4" #define LIBCURL_VERSION_NUM 0x070a02 /* linked-list structure for the CURLOPT_QUOTE option (and other) */ -- cgit v1.2.1 From d2174da6416b9042e38ac3be12ec287b755a77dc Mon Sep 17 00:00:00 2001 From: Daniel Stenberg Date: Mon, 18 Nov 2002 22:10:06 +0000 Subject: 7.10.2 --- include/curl/curl.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'include') diff --git a/include/curl/curl.h b/include/curl/curl.h index 5c042ae5b..94c2cd048 100644 --- a/include/curl/curl.h +++ b/include/curl/curl.h @@ -803,7 +803,7 @@ CURLcode curl_global_init(long flags); void curl_global_cleanup(void); /* This is the version number */ -#define LIBCURL_VERSION "7.10.2-pre4" +#define LIBCURL_VERSION "7.10.2" #define LIBCURL_VERSION_NUM 0x070a02 /* linked-list structure for the CURLOPT_QUOTE option (and other) */ -- cgit v1.2.1 From 8bca5e05b8e96bbfaaef9cc8dcecc33ce7ef6a15 Mon Sep 17 00:00:00 2001 From: Daniel Stenberg Date: Wed, 20 Nov 2002 19:11:22 +0000 Subject: Kjetil Jacobsen's patch that introduces CURLOPT_PRIVATE and CURLINFO_PRIVATE for storage and retrieval of private data in the curl handle. --- include/curl/curl.h | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'include') diff --git a/include/curl/curl.h b/include/curl/curl.h index 94c2cd048..bf7b4852d 100644 --- a/include/curl/curl.h +++ b/include/curl/curl.h @@ -610,6 +610,8 @@ typedef enum { the response to be compressed. */ CINIT(ENCODING, OBJECTPOINT, 102), + /* Set pointer to private data */ + CINIT(PRIVATE, OBJECTPOINT, 103), CURLOPT_LASTENTRY /* the last unused */ } CURLoption; @@ -861,9 +863,11 @@ typedef enum { CURLINFO_REDIRECT_TIME = CURLINFO_DOUBLE + 19, CURLINFO_REDIRECT_COUNT = CURLINFO_LONG + 20, + CURLINFO_PRIVATE = CURLINFO_STRING + 21, + /* Fill in new entries here! */ - CURLINFO_LASTONE = 21 + CURLINFO_LASTONE = 22 } CURLINFO; /* unfortunately, the easy.h and multi.h include files need options and info -- cgit v1.2.1 From 7ef749497d5abbee926200d744dfc27cb4e030f8 Mon Sep 17 00:00:00 2001 From: Daniel Stenberg Date: Wed, 4 Dec 2002 09:09:26 +0000 Subject: 7.10.3-pre2 --- include/curl/curl.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'include') diff --git a/include/curl/curl.h b/include/curl/curl.h index bf7b4852d..ddf941a76 100644 --- a/include/curl/curl.h +++ b/include/curl/curl.h @@ -805,8 +805,8 @@ CURLcode curl_global_init(long flags); void curl_global_cleanup(void); /* This is the version number */ -#define LIBCURL_VERSION "7.10.2" -#define LIBCURL_VERSION_NUM 0x070a02 +#define LIBCURL_VERSION "7.10.3-pre2" +#define LIBCURL_VERSION_NUM 0x070a03 /* linked-list structure for the CURLOPT_QUOTE option (and other) */ struct curl_slist { -- cgit v1.2.1 From b5f493c55a6bc955e30392037341978d3605d40c Mon Sep 17 00:00:00 2001 From: Daniel Stenberg Date: Wed, 11 Dec 2002 11:42:40 +0000 Subject: moved the includes to outside the extern "C" stuff decreased the write buffer size to 16KB to perform a lot better on Windows(!) --- include/curl/curl.h | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) (limited to 'include') diff --git a/include/curl/curl.h b/include/curl/curl.h index ddf941a76..9c04733e2 100644 --- a/include/curl/curl.h +++ b/include/curl/curl.h @@ -96,7 +96,9 @@ typedef int (*curl_progress_callback)(void *clientp, double ultotal, double ulnow); -#define CURL_MAX_WRITE_SIZE 20480 + /* Tests have proven that 20K is a very bad buffer size for uploads on + Windows, while 16K for some odd reason performed a lot better. */ +#define CURL_MAX_WRITE_SIZE 16384 typedef size_t (*curl_write_callback)(char *buffer, size_t size, @@ -870,11 +872,6 @@ typedef enum { CURLINFO_LASTONE = 22 } CURLINFO; -/* unfortunately, the easy.h and multi.h include files need options and info - stuff before they can be included! */ -#include "easy.h" /* nothing in curl is fun without the easy stuff */ -#include "multi.h" - typedef enum { CURLCLOSEPOLICY_NONE, /* first, never use this */ @@ -969,4 +966,9 @@ curl_version_info_data *curl_version_info(CURLversion); } #endif +/* unfortunately, the easy.h and multi.h include files need options and info + stuff before they can be included! */ +#include "easy.h" /* nothing in curl is fun without the easy stuff */ +#include "multi.h" + #endif /* __CURL_CURL_H */ -- cgit v1.2.1 From efbe930a69b83b88b16b9935301a76b6368dda03 Mon Sep 17 00:00:00 2001 From: Daniel Stenberg Date: Wed, 18 Dec 2002 16:51:02 +0000 Subject: CURLE_HTTP_NOT_FOUND => CURLE_HTTP_RETURNED_ERROR --- include/curl/curl.h | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'include') diff --git a/include/curl/curl.h b/include/curl/curl.h index 9c04733e2..b60a9f0da 100644 --- a/include/curl/curl.h +++ b/include/curl/curl.h @@ -162,7 +162,7 @@ typedef enum { CURLE_FTP_COULDNT_RETR_FILE, /* 19 */ CURLE_FTP_WRITE_ERROR, /* 20 */ CURLE_FTP_QUOTE_ERROR, /* 21 */ - CURLE_HTTP_NOT_FOUND, /* 22 */ + CURLE_HTTP_RETURNED_ERROR, /* 22 */ CURLE_WRITE_ERROR, /* 23 */ CURLE_MALFORMAT_USER, /* 24 - user name is illegally specified */ CURLE_FTP_COULDNT_STOR_FILE, /* 25 - failed FTP upload */ @@ -209,6 +209,7 @@ typedef enum { /* Make a spelling correction for the operation timed-out define */ #define CURLE_OPERATION_TIMEDOUT CURLE_OPERATION_TIMEOUTED +#define CURLE_HTTP_NOT_FOUND CURLE_HTTP_RETURNED_ERROR typedef enum { CURLPROXY_HTTP = 0, @@ -807,7 +808,7 @@ CURLcode curl_global_init(long flags); void curl_global_cleanup(void); /* This is the version number */ -#define LIBCURL_VERSION "7.10.3-pre2" +#define LIBCURL_VERSION "7.10.3-test" #define LIBCURL_VERSION_NUM 0x070a03 /* linked-list structure for the CURLOPT_QUOTE option (and other) */ -- cgit v1.2.1 From a2ada3cf9691b1e14e8137cd016423c63e075022 Mon Sep 17 00:00:00 2001 From: Daniel Stenberg Date: Fri, 20 Dec 2002 09:03:38 +0000 Subject: 7.10.3-commit --- include/curl/curl.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'include') diff --git a/include/curl/curl.h b/include/curl/curl.h index b60a9f0da..fdca815c4 100644 --- a/include/curl/curl.h +++ b/include/curl/curl.h @@ -808,7 +808,7 @@ CURLcode curl_global_init(long flags); void curl_global_cleanup(void); /* This is the version number */ -#define LIBCURL_VERSION "7.10.3-test" +#define LIBCURL_VERSION "7.10.3-pre3" #define LIBCURL_VERSION_NUM 0x070a03 /* linked-list structure for the CURLOPT_QUOTE option (and other) */ -- cgit v1.2.1 From ec24efda749df7513aaf994a9ef0d2b3c72eaed7 Mon Sep 17 00:00:00 2001 From: Daniel Stenberg Date: Tue, 7 Jan 2003 16:15:53 +0000 Subject: Simon Liu's HTTP200ALIASES-patch! --- include/curl/curl.h | 3 +++ 1 file changed, 3 insertions(+) (limited to 'include') diff --git a/include/curl/curl.h b/include/curl/curl.h index fdca815c4..0e0c1b100 100644 --- a/include/curl/curl.h +++ b/include/curl/curl.h @@ -616,6 +616,9 @@ typedef enum { /* Set pointer to private data */ CINIT(PRIVATE, OBJECTPOINT, 103), + /* Set aliases for HTTP 200 in the HTTP Response header */ + CINIT(HTTP200ALIASES, OBJECTPOINT, 104), + CURLOPT_LASTENTRY /* the last unused */ } CURLoption; -- cgit v1.2.1 From abcc5c5a82d5930f06eeb75f4a150b7b3cab6a74 Mon Sep 17 00:00:00 2001 From: Daniel Stenberg Date: Wed, 8 Jan 2003 15:50:06 +0000 Subject: cleaned up the share data types and prototypes to be more in line what the design draft mentioned and what I think is fit --- include/curl/curl.h | 77 +++++++++++++++++++++++++++++++++-------------------- 1 file changed, 48 insertions(+), 29 deletions(-) (limited to 'include') diff --git a/include/curl/curl.h b/include/curl/curl.h index 0e0c1b100..65f34f4de 100644 --- a/include/curl/curl.h +++ b/include/curl/curl.h @@ -66,9 +66,9 @@ struct curl_httppost { char *contents; /* pointer to allocated data contents */ long contentslength; /* length of contents field */ - /* CMC: Added support for buffer uploads */ - char *buffer; /* pointer to allocated buffer contents */ - long bufferlength; /* length of buffer field */ + /* CMC: Added support for buffer uploads */ + char *buffer; /* pointer to allocated buffer contents */ + long bufferlength; /* length of buffer field */ char *contenttype; /* Content-Type */ struct curl_slist* contentheader; /* list of extra headers for this form */ @@ -899,35 +899,54 @@ typedef enum { * Setup defines, protos etc for the sharing stuff. */ -/* Different types of locks that a share can aquire */ +/* Different data locks for a single share */ typedef enum { - CURL_LOCK_TYPE_NONE = 0, - CURL_LOCK_TYPE_COOKIE = 1<<0, - CURL_LOCK_TYPE_DNS = 1<<1, - CURL_LOCK_TYPE_SSL_SESSION = 2<<1, - CURL_LOCK_TYPE_CONNECT = 2<<2, - CURL_LOCK_TYPE_LAST -} curl_lock_type; + CURL_LOCK_DATA_NONE = 0, + CURL_LOCK_DATA_COOKIE = 1, + CURL_LOCK_DATA_DNS = 2, + CURL_LOCK_DATA_SSL_SESSION = 3, + CURL_LOCK_DATA_CONNECT = 4, + CURL_LOCK_DATA_LAST +} curl_lock_data; + +/* Different lock access types */ +typedef enum { + CURL_LOCK_ACCESS_NONE = 0, /* unspecified action */ + CURL_LOCK_ACCESS_SHARED = 1, /* for read perhaps */ + CURL_LOCK_ACCESS_SINGLE = 2, /* for write perhaps */ + CURL_LOCK_ACCESS_LAST /* never use */ +} curl_lock_access; + +typedef void (*curl_lock_function)(CURL *handle, + curl_lock_data data, + curl_lock_access access, + void *userptr); +typedef void (*curl_unlock_function)(CURL *handle, + curl_lock_data data, + void *userptr); + +typedef void CURLSH; -typedef void (*curl_lock_function)(CURL *, curl_lock_type, void *); -typedef void (*curl_unlock_function)(CURL *, curl_lock_type, void *); +typedef enum { + CURLSH_OK, /* all is fine */ + CURLSH_BAD_OPTION, /* 1 */ + CURLSH_LAST /* never use */ +} CURLSHcode; -typedef struct { - unsigned int specifier; - unsigned int locked; - unsigned int dirty; - - curl_lock_function lockfunc; - curl_unlock_function unlockfunc; - void *clientdata; -} curl_share; - -curl_share *curl_share_init (void); -CURLcode curl_share_setopt (curl_share *, curl_lock_type, int); -CURLcode curl_share_set_lock_function (curl_share *, curl_lock_function); -CURLcode curl_share_set_unlock_function (curl_share *, curl_unlock_function); -CURLcode curl_share_set_lock_data (curl_share *, void *); -CURLcode curl_share_destroy (curl_share *); +typedef enum { + CURLSHOPT_NONE, /* don't use */ + CURLSHOPT_SHARE, /* specify a data type to share */ + CURLSHOPT_UNSHARE, /* specify shich data type to stop sharing */ + CURLSHOPT_LOCKFUNC, /* pass in a 'curl_lock_function' pointer */ + CURLSHOPT_UNLOCKFUNC, /* pass in a 'curl_unlock_function' pointer */ + CURLSHOPT_USERDATA, /* pass in a user data pointer used in the lock/unlock + callback functions */ + CURLSHOPT_LAST /* never use */ +} CURLSHoption; + +CURLSH *curl_share_init(void); +CURLSHcode curl_share_setopt(CURLSH *, CURLSHoption option, ...); +CURLSHcode curl_share_cleanup(CURLSH *); /**************************************************************************** * Structures for querying information about the curl library at runtime. -- cgit v1.2.1 From 5fab55383d74a4698f8c482e78ce12c533df893d Mon Sep 17 00:00:00 2001 From: Daniel Stenberg Date: Thu, 9 Jan 2003 10:26:29 +0000 Subject: rename the curl share error enum prefix --- include/curl/curl.h | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) (limited to 'include') diff --git a/include/curl/curl.h b/include/curl/curl.h index 65f34f4de..50a483c36 100644 --- a/include/curl/curl.h +++ b/include/curl/curl.h @@ -928,9 +928,11 @@ typedef void (*curl_unlock_function)(CURL *handle, typedef void CURLSH; typedef enum { - CURLSH_OK, /* all is fine */ - CURLSH_BAD_OPTION, /* 1 */ - CURLSH_LAST /* never use */ + CURLSHE_OK, /* all is fine */ + CURLSHE_BAD_OPTION, /* 1 */ + CURLSHE_IN_USE, /* 2 */ + CURLSHE_INVALID, /* 3 */ + CURLSHE_LAST /* never use */ } CURLSHcode; typedef enum { -- cgit v1.2.1 From 4a2ac166fa2761bf693424e0b2d66340af48c950 Mon Sep 17 00:00:00 2001 From: Daniel Stenberg Date: Thu, 9 Jan 2003 10:36:24 +0000 Subject: 7.10.3-pre4 --- include/curl/curl.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'include') diff --git a/include/curl/curl.h b/include/curl/curl.h index 50a483c36..34f585e71 100644 --- a/include/curl/curl.h +++ b/include/curl/curl.h @@ -811,7 +811,7 @@ CURLcode curl_global_init(long flags); void curl_global_cleanup(void); /* This is the version number */ -#define LIBCURL_VERSION "7.10.3-pre3" +#define LIBCURL_VERSION "7.10.3-pre4" #define LIBCURL_VERSION_NUM 0x070a03 /* linked-list structure for the CURLOPT_QUOTE option (and other) */ -- cgit v1.2.1 From bf9b9ca29d7bd7c81db6d0e4a85356831572f28d Mon Sep 17 00:00:00 2001 From: Daniel Stenberg Date: Tue, 14 Jan 2003 12:42:26 +0000 Subject: 7.10.3 commit --- include/curl/curl.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'include') diff --git a/include/curl/curl.h b/include/curl/curl.h index 34f585e71..d08a077c5 100644 --- a/include/curl/curl.h +++ b/include/curl/curl.h @@ -811,7 +811,7 @@ CURLcode curl_global_init(long flags); void curl_global_cleanup(void); /* This is the version number */ -#define LIBCURL_VERSION "7.10.3-pre4" +#define LIBCURL_VERSION "7.10.3" #define LIBCURL_VERSION_NUM 0x070a03 /* linked-list structure for the CURLOPT_QUOTE option (and other) */ -- cgit v1.2.1 From f26a338a54e04d0a6907f5d2479d8b0fa9daf297 Mon Sep 17 00:00:00 2001 From: Daniel Stenberg Date: Thu, 16 Jan 2003 21:08:12 +0000 Subject: copyright year update in the source header --- include/curl/curl.h | 2 +- include/curl/easy.h | 2 +- include/curl/mprintf.h | 69 ++++++++++++++-------------------------------- include/curl/multi.h | 2 +- include/curl/stdcheaders.h | 2 +- include/curl/types.h | 2 +- 6 files changed, 25 insertions(+), 54 deletions(-) (limited to 'include') diff --git a/include/curl/curl.h b/include/curl/curl.h index d08a077c5..08630b54a 100644 --- a/include/curl/curl.h +++ b/include/curl/curl.h @@ -7,7 +7,7 @@ * | (__| |_| | _ <| |___ * \___|\___/|_| \_\_____| * - * Copyright (C) 1998 - 2002, Daniel Stenberg, , et al. + * Copyright (C) 1998 - 2003, 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 diff --git a/include/curl/easy.h b/include/curl/easy.h index 47f4e9660..a57839181 100644 --- a/include/curl/easy.h +++ b/include/curl/easy.h @@ -7,7 +7,7 @@ * | (__| |_| | _ <| |___ * \___|\___/|_| \_\_____| * - * Copyright (C) 1998 - 2002, Daniel Stenberg, , et al. + * Copyright (C) 1998 - 2003, 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 diff --git a/include/curl/mprintf.h b/include/curl/mprintf.h index 30c4d447f..875d20038 100644 --- a/include/curl/mprintf.h +++ b/include/curl/mprintf.h @@ -1,54 +1,25 @@ -/************************************************************************* +/*************************************************************************** + * _ _ ____ _ + * Project ___| | | | _ \| | + * / __| | | | |_) | | + * | (__| |_| | _ <| |___ + * \___|\___/|_| \_\_____| + * + * Copyright (C) 1998 - 2003, 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 + * are also available at http://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 + * furnished to do so, under the terms of the COPYING file. + * + * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY + * KIND, either express or implied. * * $Id$ - * - * Permission to use, copy, modify, and distribute this software for any - * purpose with or without fee is hereby granted, provided that the above - * copyright notice and this permission notice appear in all copies. - * - * THIS SOFTWARE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR IMPLIED - * WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED WARRANTIES OF - * MERCHANTIBILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE AUTHORS AND - * CONTRIBUTORS ACCEPT NO RESPONSIBILITY IN ANY CONCEIVABLE MANNER. - * - ************************************************************************* - * - * Preliminary documentation - * - * printf conversions: - * - * conversion ::= '%%' | '%' [position] ( number | float | string ) - * position ::= digits '$' - * number ::= [number-flags] ( 'd' | 'i' | 'o' | 'x' | 'X' | 'u') - * number-flags ::= 'h' | 'l' | 'L' ... - * float ::= [float-flags] ( 'f' | 'e' | 'E' | 'g' | 'G' ) - * string ::= [string-flags] 's' - * string-flags ::= padding | '#' - * digits ::= (digit)+ - * digit ::= 0-9 - * - * c - * p - * n - * - * qualifiers - * - * - : left adjustment - * + : show sign - * SPACE : padding - * # : alterative - * . : precision - * * : width - * 0 : padding / size - * 1-9 : size - * h : short - * l : long - * ll : longlong - * L : long double - * Z : long / longlong - * q : longlong - * - ************************************************************************/ + ***************************************************************************/ #ifndef H_MPRINTF #define H_MPRINTF diff --git a/include/curl/multi.h b/include/curl/multi.h index 40dd01efd..cf418bd5e 100644 --- a/include/curl/multi.h +++ b/include/curl/multi.h @@ -7,7 +7,7 @@ * | (__| |_| | _ <| |___ * \___|\___/|_| \_\_____| * - * Copyright (C) 1998 - 2002, Daniel Stenberg, , et al. + * Copyright (C) 1998 - 2003, 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 diff --git a/include/curl/stdcheaders.h b/include/curl/stdcheaders.h index 35648b5ad..62be040ca 100644 --- a/include/curl/stdcheaders.h +++ b/include/curl/stdcheaders.h @@ -7,7 +7,7 @@ * | (__| |_| | _ <| |___ * \___|\___/|_| \_\_____| * - * Copyright (C) 1998 - 2002, Daniel Stenberg, , et al. + * Copyright (C) 1998 - 2003, 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 diff --git a/include/curl/types.h b/include/curl/types.h index 5598880d7..42e98e371 100644 --- a/include/curl/types.h +++ b/include/curl/types.h @@ -7,7 +7,7 @@ * | (__| |_| | _ <| |___ * \___|\___/|_| \_\_____| * - * Copyright (C) 1998 - 2002, Daniel Stenberg, , et al. + * Copyright (C) 1998 - 2003, 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 -- cgit v1.2.1 From 64b0ff875f51b7ba852a6297d74ebba1d66e49d2 Mon Sep 17 00:00:00 2001 From: Daniel Stenberg Date: Wed, 22 Jan 2003 18:30:58 +0000 Subject: extern C this to work in C++ conditions --- include/curl/multi.h | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) (limited to 'include') diff --git a/include/curl/multi.h b/include/curl/multi.h index cf418bd5e..19c6553e4 100644 --- a/include/curl/multi.h +++ b/include/curl/multi.h @@ -44,8 +44,6 @@ o Enable the application to select() on its own file descriptors and curl's file descriptors simultaneous easily. - Example sources using this interface is here: ../multi/ - */ #if defined(WIN32) && !defined(__GNUC__) || defined(__MINGW32__) @@ -57,6 +55,10 @@ #include "curl.h" +#ifdef __cplusplus +extern "C" { +#endif + typedef void CURLM; typedef enum { @@ -187,4 +189,8 @@ CURLMcode curl_multi_cleanup(CURLM *multi_handle); CURLMsg *curl_multi_info_read(CURLM *multi_handle, int *msgs_in_queue); +#ifdef __cplusplus +} /* end of extern "C" +#endif + #endif -- cgit v1.2.1 From 543e0b1e0f3a9ff856009514279ca7c4bcd2c2e4 Mon Sep 17 00:00:00 2001 From: Daniel Stenberg Date: Wed, 22 Jan 2003 18:50:51 +0000 Subject: oops, broken comment fixed --- include/curl/multi.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'include') diff --git a/include/curl/multi.h b/include/curl/multi.h index 19c6553e4..365cd40b5 100644 --- a/include/curl/multi.h +++ b/include/curl/multi.h @@ -190,7 +190,7 @@ CURLMsg *curl_multi_info_read(CURLM *multi_handle, int *msgs_in_queue); #ifdef __cplusplus -} /* end of extern "C" +} /* end of extern "C" */ #endif #endif -- cgit v1.2.1 From de6008e01ab4658b1b6bd276353ad82590c01d86 Mon Sep 17 00:00:00 2001 From: Daniel Stenberg Date: Tue, 4 Feb 2003 18:12:41 +0000 Subject: James Bursa corrected a bad comment --- include/curl/multi.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'include') diff --git a/include/curl/multi.h b/include/curl/multi.h index 365cd40b5..1d3b123a2 100644 --- a/include/curl/multi.h +++ b/include/curl/multi.h @@ -73,7 +73,7 @@ typedef enum { typedef enum { CURLMSG_NONE, /* first, not used */ - CURLMSG_DONE, /* This easy handle has completed. 'whatever' points to + CURLMSG_DONE, /* This easy handle has completed. 'result' contains the CURLcode of the transfer */ CURLMSG_LAST /* last, not used */ } CURLMSG; -- cgit v1.2.1 From beb13a1d3e832ae97221ba1d9ad7f9bc262de798 Mon Sep 17 00:00:00 2001 From: Jean-Philippe Barette-LaPierre Date: Tue, 4 Feb 2003 23:48:46 +0000 Subject: added the sharing of DNS cache --- include/curl/curl.h | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) (limited to 'include') diff --git a/include/curl/curl.h b/include/curl/curl.h index 08630b54a..04171ba9a 100644 --- a/include/curl/curl.h +++ b/include/curl/curl.h @@ -902,10 +902,15 @@ typedef enum { /* Different data locks for a single share */ typedef enum { CURL_LOCK_DATA_NONE = 0, - CURL_LOCK_DATA_COOKIE = 1, - CURL_LOCK_DATA_DNS = 2, - CURL_LOCK_DATA_SSL_SESSION = 3, - CURL_LOCK_DATA_CONNECT = 4, + /* CURL_LOCK_DATA_SHARE is used internaly to say that + * the locking is just made to change the internal state of the share + * itself. + */ + CURL_LOCK_DATA_SHARE, + CURL_LOCK_DATA_COOKIE, + CURL_LOCK_DATA_DNS, + CURL_LOCK_DATA_SSL_SESSION, + CURL_LOCK_DATA_CONNECT, CURL_LOCK_DATA_LAST } curl_lock_data; -- cgit v1.2.1 From 065b87e949a4d4d67a4dace2429da45e2a8bc6af Mon Sep 17 00:00:00 2001 From: Daniel Stenberg Date: Mon, 24 Feb 2003 18:14:48 +0000 Subject: 7.10.4-pre2 commit --- include/curl/curl.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'include') diff --git a/include/curl/curl.h b/include/curl/curl.h index 04171ba9a..dd05134bb 100644 --- a/include/curl/curl.h +++ b/include/curl/curl.h @@ -811,8 +811,8 @@ CURLcode curl_global_init(long flags); void curl_global_cleanup(void); /* This is the version number */ -#define LIBCURL_VERSION "7.10.3" -#define LIBCURL_VERSION_NUM 0x070a03 +#define LIBCURL_VERSION "7.10.4-pre2" +#define LIBCURL_VERSION_NUM 0x070a04 /* linked-list structure for the CURLOPT_QUOTE option (and other) */ struct curl_slist { -- cgit v1.2.1 From 60e015d0c191b51e5766ebeb98c420ca0111e098 Mon Sep 17 00:00:00 2001 From: Daniel Stenberg Date: Fri, 28 Feb 2003 12:17:56 +0000 Subject: Removed the defines for strequal() and strnequal(). --- include/curl/curl.h | 2 -- 1 file changed, 2 deletions(-) (limited to 'include') diff --git a/include/curl/curl.h b/include/curl/curl.h index dd05134bb..e9c8c1dbd 100644 --- a/include/curl/curl.h +++ b/include/curl/curl.h @@ -696,8 +696,6 @@ typedef enum { */ extern int (curl_strequal)(const char *s1, const char *s2); extern int (curl_strnequal)(const char *s1, const char *s2, size_t n); -#define strequal(a,b) curl_strequal(a,b) -#define strnequal(a,b,c) curl_strnequal(a,b,c) /* DEPRECATED function to build formdata */ int curl_formparse(char *, struct curl_httppost **, -- cgit v1.2.1 From 8c3a10392e39c81c8d1dc561e40182bbea54e6ba Mon Sep 17 00:00:00 2001 From: Daniel Stenberg Date: Mon, 10 Mar 2003 12:25:32 +0000 Subject: Include sys/types.h as well. Ray DeGennaro reports successful compiling on AIX when this fix is applied and I cannot see how this will break any systems. --- include/curl/multi.h | 1 + 1 file changed, 1 insertion(+) (limited to 'include') diff --git a/include/curl/multi.h b/include/curl/multi.h index 1d3b123a2..ac114be4d 100644 --- a/include/curl/multi.h +++ b/include/curl/multi.h @@ -51,6 +51,7 @@ #else #include #include +#include #endif #include "curl.h" -- cgit v1.2.1 From 25f611ca4279927d38327b3c8b4a9f81702cd127 Mon Sep 17 00:00:00 2001 From: Daniel Stenberg Date: Mon, 31 Mar 2003 04:41:05 +0000 Subject: Guillaume Cottenceau's patch that adds CURLOPT_UNRESTRICTED_AUTH that disables the host name check in the FOLLOWLOCATION code. With that option set, libcurl will send user+password to all hosts. --- include/curl/curl.h | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) (limited to 'include') diff --git a/include/curl/curl.h b/include/curl/curl.h index e9c8c1dbd..e7f5d5fd9 100644 --- a/include/curl/curl.h +++ b/include/curl/curl.h @@ -619,6 +619,11 @@ typedef enum { /* Set aliases for HTTP 200 in the HTTP Response header */ CINIT(HTTP200ALIASES, OBJECTPOINT, 104), + /* Continue to send authentication (user+password) when following locations, + even when hostname changed. This can potentionally send off the name + and password to whatever host the server decides. */ + CINIT(UNRESTRICTED_AUTH, LONG, 105), + CURLOPT_LASTENTRY /* the last unused */ } CURLoption; @@ -809,7 +814,7 @@ CURLcode curl_global_init(long flags); void curl_global_cleanup(void); /* This is the version number */ -#define LIBCURL_VERSION "7.10.4-pre2" +#define LIBCURL_VERSION "7.10.4-pre5" #define LIBCURL_VERSION_NUM 0x070a04 /* linked-list structure for the CURLOPT_QUOTE option (and other) */ -- cgit v1.2.1 From fd33923496e8c04757acfcc8131806703d86bfac Mon Sep 17 00:00:00 2001 From: Daniel Stenberg Date: Mon, 31 Mar 2003 14:02:43 +0000 Subject: 7.10.4-pre6 commit --- include/curl/curl.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'include') diff --git a/include/curl/curl.h b/include/curl/curl.h index e7f5d5fd9..15004c4a8 100644 --- a/include/curl/curl.h +++ b/include/curl/curl.h @@ -814,7 +814,7 @@ CURLcode curl_global_init(long flags); void curl_global_cleanup(void); /* This is the version number */ -#define LIBCURL_VERSION "7.10.4-pre5" +#define LIBCURL_VERSION "7.10.4-pre6" #define LIBCURL_VERSION_NUM 0x070a04 /* linked-list structure for the CURLOPT_QUOTE option (and other) */ -- cgit v1.2.1 From bfd00ac2ed315d8a309483eafb022e3cbe424326 Mon Sep 17 00:00:00 2001 From: Daniel Stenberg Date: Wed, 2 Apr 2003 07:48:56 +0000 Subject: 7.10.4 commit --- include/curl/curl.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'include') diff --git a/include/curl/curl.h b/include/curl/curl.h index 15004c4a8..5ae43db3a 100644 --- a/include/curl/curl.h +++ b/include/curl/curl.h @@ -814,7 +814,7 @@ CURLcode curl_global_init(long flags); void curl_global_cleanup(void); /* This is the version number */ -#define LIBCURL_VERSION "7.10.4-pre6" +#define LIBCURL_VERSION "7.10.4" #define LIBCURL_VERSION_NUM 0x070a04 /* linked-list structure for the CURLOPT_QUOTE option (and other) */ -- cgit v1.2.1 From ca04620253b162fedc672695274817d6b3cb3610 Mon Sep 17 00:00:00 2001 From: Daniel Stenberg Date: Fri, 9 May 2003 07:37:27 +0000 Subject: AIX wants sys/select.h --- include/curl/multi.h | 1 + 1 file changed, 1 insertion(+) (limited to 'include') diff --git a/include/curl/multi.h b/include/curl/multi.h index ac114be4d..60291a6f0 100644 --- a/include/curl/multi.h +++ b/include/curl/multi.h @@ -49,6 +49,7 @@ #if defined(WIN32) && !defined(__GNUC__) || defined(__MINGW32__) #include #else +#include #include #include #include -- cgit v1.2.1 From 3c7e33388e22e01cf90918e8c452f605584ce1ca Mon Sep 17 00:00:00 2001 From: Daniel Stenberg Date: Fri, 9 May 2003 07:42:47 +0000 Subject: CURLOPT_FTP_USE_EPRT added --- include/curl/curl.h | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) (limited to 'include') diff --git a/include/curl/curl.h b/include/curl/curl.h index 5ae43db3a..882956ece 100644 --- a/include/curl/curl.h +++ b/include/curl/curl.h @@ -624,6 +624,11 @@ typedef enum { and password to whatever host the server decides. */ CINIT(UNRESTRICTED_AUTH, LONG, 105), + /* Specificly switch on or off the FTP engine's use of the EPRT command ( it + also disables the LPRT attempt). By default, those ones will always be + attempted before the good old traditional PORT command. */ + CINIT(FTP_USE_EPRT, LONG, 106), + CURLOPT_LASTENTRY /* the last unused */ } CURLoption; @@ -814,8 +819,8 @@ CURLcode curl_global_init(long flags); void curl_global_cleanup(void); /* This is the version number */ -#define LIBCURL_VERSION "7.10.4" -#define LIBCURL_VERSION_NUM 0x070a04 +#define LIBCURL_VERSION "7.10.5-pre2" +#define LIBCURL_VERSION_NUM 0x070a05 /* linked-list structure for the CURLOPT_QUOTE option (and other) */ struct curl_slist { -- cgit v1.2.1 From 95a4b8db680beeca879f39c161296d29e22138f1 Mon Sep 17 00:00:00 2001 From: Daniel Stenberg Date: Mon, 19 May 2003 11:45:10 +0000 Subject: 7.10.5 commit --- include/curl/curl.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'include') diff --git a/include/curl/curl.h b/include/curl/curl.h index 882956ece..b8b4a63db 100644 --- a/include/curl/curl.h +++ b/include/curl/curl.h @@ -819,7 +819,7 @@ CURLcode curl_global_init(long flags); void curl_global_cleanup(void); /* This is the version number */ -#define LIBCURL_VERSION "7.10.5-pre2" +#define LIBCURL_VERSION "7.10.5" #define LIBCURL_VERSION_NUM 0x070a05 /* linked-list structure for the CURLOPT_QUOTE option (and other) */ -- cgit v1.2.1 From 35a84ad5767689bc6f89ebac87cf862054060391 Mon Sep 17 00:00:00 2001 From: Daniel Stenberg Date: Mon, 26 May 2003 07:57:53 +0000 Subject: Chris Lewis mentioned that he doesn't get WIN32 defined, only _WIN32 so we make an adjustment to catch this. --- include/curl/multi.h | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'include') diff --git a/include/curl/multi.h b/include/curl/multi.h index 60291a6f0..6e5c933b9 100644 --- a/include/curl/multi.h +++ b/include/curl/multi.h @@ -45,6 +45,11 @@ file descriptors simultaneous easily. */ +#if defined(_WIN32) && !defined(WIN32) +/* Chris Lewis mentioned that he doesn't get WIN32 defined, only _WIN32 + so we make this like adjustment to catch this. */ +#define WIN32 1 +#endif #if defined(WIN32) && !defined(__GNUC__) || defined(__MINGW32__) #include -- cgit v1.2.1 From e97fd44151803392da3e5783c2c31c05a06821b9 Mon Sep 17 00:00:00 2001 From: Daniel Stenberg Date: Mon, 26 May 2003 12:32:22 +0000 Subject: language --- include/curl/multi.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'include') diff --git a/include/curl/multi.h b/include/curl/multi.h index 6e5c933b9..9209912f2 100644 --- a/include/curl/multi.h +++ b/include/curl/multi.h @@ -46,8 +46,8 @@ */ #if defined(_WIN32) && !defined(WIN32) -/* Chris Lewis mentioned that he doesn't get WIN32 defined, only _WIN32 - so we make this like adjustment to catch this. */ +/* Chris Lewis mentioned that he doesn't get WIN32 defined, only _WIN32 so we + make this adjustment to catch this. */ #define WIN32 1 #endif -- cgit v1.2.1 From 18f630ab21066e14983bae69b357b6b6f8b5c5b1 Mon Sep 17 00:00:00 2001 From: Daniel Stenberg Date: Tue, 27 May 2003 06:25:56 +0000 Subject: CURLOPT_HTTPDIGEST is added --- include/curl/curl.h | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) (limited to 'include') diff --git a/include/curl/curl.h b/include/curl/curl.h index b8b4a63db..9de5d84ff 100644 --- a/include/curl/curl.h +++ b/include/curl/curl.h @@ -629,6 +629,10 @@ typedef enum { attempted before the good old traditional PORT command. */ CINIT(FTP_USE_EPRT, LONG, 106), + /* Set this to a non-zero value to enable HTTP Digest Authentication. + You should use this in combination with CURLOPT_USERPWD. */ + CINIT(HTTPDIGEST, LONG, 107), + CURLOPT_LASTENTRY /* the last unused */ } CURLoption; @@ -819,8 +823,8 @@ CURLcode curl_global_init(long flags); void curl_global_cleanup(void); /* This is the version number */ -#define LIBCURL_VERSION "7.10.5" -#define LIBCURL_VERSION_NUM 0x070a05 +#define LIBCURL_VERSION "7.10.6-pre1" +#define LIBCURL_VERSION_NUM 0x070a06 /* linked-list structure for the CURLOPT_QUOTE option (and other) */ struct curl_slist { -- cgit v1.2.1 From 18234cbdaced6adb7c4dadd9afbed7476f0f50b1 Mon Sep 17 00:00:00 2001 From: Daniel Stenberg Date: Tue, 27 May 2003 12:34:48 +0000 Subject: sys/select.h is not present on HPUX, avoid including it --- include/curl/multi.h | 3 +++ 1 file changed, 3 insertions(+) (limited to 'include') diff --git a/include/curl/multi.h b/include/curl/multi.h index 9209912f2..4d7e0d900 100644 --- a/include/curl/multi.h +++ b/include/curl/multi.h @@ -54,7 +54,10 @@ #if defined(WIN32) && !defined(__GNUC__) || defined(__MINGW32__) #include #else +#ifndef __hpux +/* HP-UX systems version 9, 10 and 11 lack this header */ #include +#endif #include #include #include -- cgit v1.2.1 From dcb6d1c01d38b9f9e3200c3986abdc37c72b93b6 Mon Sep 17 00:00:00 2001 From: Daniel Stenberg Date: Tue, 27 May 2003 12:45:51 +0000 Subject: remove usage of HAVE_* defines, we cannot and shall not depend on any such defines in the public external header files --- include/curl/curl.h | 6 +----- include/curl/stdcheaders.h | 2 -- 2 files changed, 1 insertion(+), 7 deletions(-) (limited to 'include') diff --git a/include/curl/curl.h b/include/curl/curl.h index 9de5d84ff..c53e29f13 100644 --- a/include/curl/curl.h +++ b/include/curl/curl.h @@ -34,11 +34,7 @@ # include # include # else -# ifdef HAVE_SYS_TIME_H -# include -# else -# include -# endif + include # endif #endif /* defined (vms) */ diff --git a/include/curl/stdcheaders.h b/include/curl/stdcheaders.h index 62be040ca..b6a1d27d9 100644 --- a/include/curl/stdcheaders.h +++ b/include/curl/stdcheaders.h @@ -23,9 +23,7 @@ * $Id$ ***************************************************************************/ -#ifdef HAVE_SYS_TYPES_H #include -#endif size_t fread (void *, size_t, size_t, FILE *); size_t fwrite (const void *, size_t, size_t, FILE *); -- cgit v1.2.1 From c12af7aed1eda985cb70521fe4e6d35a3d7946c6 Mon Sep 17 00:00:00 2001 From: Daniel Stenberg Date: Tue, 27 May 2003 12:51:15 +0000 Subject: oops, removed a # too many --- include/curl/curl.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'include') diff --git a/include/curl/curl.h b/include/curl/curl.h index c53e29f13..a81afba2c 100644 --- a/include/curl/curl.h +++ b/include/curl/curl.h @@ -34,7 +34,7 @@ # include # include # else - include +# include # endif #endif /* defined (vms) */ -- cgit v1.2.1 From 6caa656d019ef048d283e1e6cbc820e1f6d2ab9f Mon Sep 17 00:00:00 2001 From: Daniel Stenberg Date: Tue, 27 May 2003 12:51:46 +0000 Subject: Documented which rules the public headers must follow when we write preprocessor checks for condititions. --- include/README | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) (limited to 'include') diff --git a/include/README b/include/README index ed2a7e54d..0118b7c37 100644 --- a/include/README +++ b/include/README @@ -13,3 +13,26 @@ of environment. You should include files from here using... ... style and point the compiler's include path to the directory holding the curl subdirectory. It makes it more likely to survive future modifications. + +NOTE FOR LIBCURL HACKERS + +All the include files in this tree are written and intended to be installed on +a system that may serve multiple platforms and multiple applications, all +using libcurl (possibly even different libcurl installations using different +versions). Therefore, all header files in here must obey these rules: + +* They cannot depend on or use configure-generated results from libcurl's or + curl's directories. Other applications may not run configure as (lib)curl + does, and using platform dependent info here may break other platforms. + +* We cannot assume anything else but very basic compiler features being + present. While libcurl requires an ANSI C compiler to build, some of the + earler ANSI compilers clearly can't deal with some operators. + +* Newlines must remain unix-style for older compilers' sake. + +* Comments must be written in the old-style /* unnested C-fashion */ + +To figure out how to do good and portable checks for features, operating +systems or specific hardwarare, a very good resource is Bjorn Reese's +collection at http://predef.sf.net/ -- cgit v1.2.1 From c32390d84c08f2c8e2975994e64babdaacb34de4 Mon Sep 17 00:00:00 2001 From: Daniel Stenberg Date: Thu, 5 Jun 2003 14:04:44 +0000 Subject: Reversed the logic to only include the header on systems known to really NEED it as another system that doesn't have it came up: very old Linux libc5-based systems (as addition to all HPUX versions). The only known system at this point is AIX. --- include/curl/multi.h | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) (limited to 'include') diff --git a/include/curl/multi.h b/include/curl/multi.h index 4d7e0d900..c5a74815b 100644 --- a/include/curl/multi.h +++ b/include/curl/multi.h @@ -54,10 +54,14 @@ #if defined(WIN32) && !defined(__GNUC__) || defined(__MINGW32__) #include #else -#ifndef __hpux -/* HP-UX systems version 9, 10 and 11 lack this header */ + +#ifdef _AIX +/* 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! */ #include #endif + #include #include #include -- cgit v1.2.1 From 89352d92c5cde9671938976fd137ac5053ccc66d Mon Sep 17 00:00:00 2001 From: Daniel Stenberg Date: Fri, 6 Jun 2003 06:44:05 +0000 Subject: spellfix --- include/README | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'include') diff --git a/include/README b/include/README index 0118b7c37..f8482ba69 100644 --- a/include/README +++ b/include/README @@ -27,7 +27,7 @@ versions). Therefore, all header files in here must obey these rules: * We cannot assume anything else but very basic compiler features being present. While libcurl requires an ANSI C compiler to build, some of the - earler ANSI compilers clearly can't deal with some operators. + earlier ANSI compilers clearly can't deal with some preprocessor operators. * Newlines must remain unix-style for older compilers' sake. -- cgit v1.2.1 From e56ae1426cb7a0a4a427cf8d6099a821fdaae428 Mon Sep 17 00:00:00 2001 From: Daniel Stenberg Date: Tue, 10 Jun 2003 12:22:19 +0000 Subject: Daniel Kouril's patch that adds HTTP negotiation support to libcurl was added. --- include/curl/curl.h | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'include') diff --git a/include/curl/curl.h b/include/curl/curl.h index a81afba2c..46e09f429 100644 --- a/include/curl/curl.h +++ b/include/curl/curl.h @@ -629,6 +629,10 @@ typedef enum { You should use this in combination with CURLOPT_USERPWD. */ CINIT(HTTPDIGEST, LONG, 107), + /* Set this to a non-zero value to enable HTTP Negotiate Authentication. + You should use this in combination with CURLOPT_USERPWD. */ + CINIT(HTTPNEGOTIATE, LONG, 108), + CURLOPT_LASTENTRY /* the last unused */ } CURLoption; -- cgit v1.2.1 From d0cc92a01a5b373c6730acd84009294da9c29e44 Mon Sep 17 00:00:00 2001 From: Daniel Stenberg Date: Tue, 10 Jun 2003 12:49:16 +0000 Subject: Set auth type differently, we use one CURLOPT_HTTPAUTH instead as we plan to add more method in the future. --- include/curl/curl.h | 18 +++++++++++------- 1 file changed, 11 insertions(+), 7 deletions(-) (limited to 'include') diff --git a/include/curl/curl.h b/include/curl/curl.h index 46e09f429..0d590d6ab 100644 --- a/include/curl/curl.h +++ b/include/curl/curl.h @@ -213,6 +213,14 @@ typedef enum { CURLPROXY_SOCKS5 = 5 } curl_proxytype; +typedef enum { + CURLHTTP_BASIC = 0, /* default */ + CURLHTTP_DIGEST = 1, /* Digest */ + CURLHTTP_NEGOTIATE = 2, /* Negotiate */ + CURLHTTP_NTLM = 3, /* NTLM */ + CURLHTTP_LAST /* never to be used */ +} curl_httpauth; + /* this was the error code 50 in 7.7.3 and a few earlier versions, this is no longer used by libcurl but is instead #defined here only to not make programs break */ @@ -625,13 +633,9 @@ typedef enum { attempted before the good old traditional PORT command. */ CINIT(FTP_USE_EPRT, LONG, 106), - /* Set this to a non-zero value to enable HTTP Digest Authentication. - You should use this in combination with CURLOPT_USERPWD. */ - CINIT(HTTPDIGEST, LONG, 107), - - /* Set this to a non-zero value to enable HTTP Negotiate Authentication. - You should use this in combination with CURLOPT_USERPWD. */ - CINIT(HTTPNEGOTIATE, LONG, 108), + /* Set this to a curl_httpauth value to enable that particular authentication + method. Use this in combination with CURLOPT_USERPWD. */ + CINIT(HTTPAUTH, LONG, 107), CURLOPT_LASTENTRY /* the last unused */ } CURLoption; -- cgit v1.2.1 From ecf32c964aa1f45285d26c91f2cad5513075aa45 Mon Sep 17 00:00:00 2001 From: Daniel Stenberg Date: Thu, 12 Jun 2003 17:34:27 +0000 Subject: CURLHTTP* renamed to CURLAUTH* and NEGOTIATE is now GSSNEGOTIATE as there's a "plain" Negotiate as well. --- include/curl/curl.h | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'include') diff --git a/include/curl/curl.h b/include/curl/curl.h index 0d590d6ab..7ae5560c2 100644 --- a/include/curl/curl.h +++ b/include/curl/curl.h @@ -214,11 +214,11 @@ typedef enum { } curl_proxytype; typedef enum { - CURLHTTP_BASIC = 0, /* default */ - CURLHTTP_DIGEST = 1, /* Digest */ - CURLHTTP_NEGOTIATE = 2, /* Negotiate */ - CURLHTTP_NTLM = 3, /* NTLM */ - CURLHTTP_LAST /* never to be used */ + CURLAUTH_BASIC = 0, /* default */ + CURLAUTH_DIGEST = 1, /* Digest */ + CURLAUTH_GSSNEGOTIATE = 2, /* GSS-Negotiate */ + CURLAUTH_NTLM = 3, /* NTLM */ + CURLAUTH_LASTKNOWN /* never to be used */ } curl_httpauth; /* this was the error code 50 in 7.7.3 and a few earlier versions, this -- cgit v1.2.1 From 4322c1106f654cd576a820cbe8c998a48de6d6a3 Mon Sep 17 00:00:00 2001 From: Daniel Stenberg Date: Thu, 26 Jun 2003 11:42:54 +0000 Subject: beautified and added comments all over --- include/curl/curl.h | 252 +++++++++++++++++++++++++++++++++++++--------------- 1 file changed, 181 insertions(+), 71 deletions(-) (limited to 'include') diff --git a/include/curl/curl.h b/include/curl/curl.h index 7ae5560c2..00074d561 100644 --- a/include/curl/curl.h +++ b/include/curl/curl.h @@ -23,6 +23,30 @@ * $Id$ ***************************************************************************/ +/* If you have problems, all libcurl docs and details are found here: + http://curl.haxx.se/libcurl/ +*/ + +/* This is the version number of the libcurl package from which this header + file origins: */ +#define LIBCURL_VERSION "7.10.6-pre3" + +/* This is the numeric version of the libcurl version number, meant for easier + parsing and comparions by programs. The LIBCURL_VERSION_NUM define will + always follow this syntax: + + 0xXXYYZZ + + Where XX, YY and ZZ are the main version, release and patch numbers in + hexadecimal. All three numbers are always represented using two digits. 1.2 + would appear as "0x010200" while version 9.11.7 appears as "0x090b07". + + This 6-digit hexadecimal number does not show pre-release number, 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 0x070a06 + #include /* The include stuff here is mainly for time_t! */ #ifdef vms @@ -51,39 +75,36 @@ extern "C" { #endif -/* stupid #define trick to preserve functionality with older code, but - making it use our name space for the future */ +/* silly trick to preserve functionality with older code, but making it use + our name space for the future */ #define HttpPost curl_httppost struct curl_httppost { - struct curl_httppost *next; /* next entry in the list */ - char *name; /* pointer to allocated name */ - long namelength; /* length of name length */ - char *contents; /* pointer to allocated data contents */ - long contentslength; /* length of contents field */ - - /* CMC: Added support for buffer uploads */ - char *buffer; /* pointer to allocated buffer contents */ - long bufferlength; /* length of buffer field */ - - char *contenttype; /* Content-Type */ + struct curl_httppost *next; /* next entry in the list */ + char *name; /* pointer to allocated name */ + long namelength; /* length of name length */ + char *contents; /* pointer to allocated data contents */ + long contentslength; /* length of contents field */ + char *buffer; /* pointer to allocated buffer contents */ + long bufferlength; /* length of buffer field */ + char *contenttype; /* Content-Type */ struct curl_slist* contentheader; /* list of extra headers for this form */ - struct curl_httppost *more; /* if one field name has more than one file, this - link should link to following files */ - long flags; /* as defined below */ -#define HTTPPOST_FILENAME (1<<0) /* specified content is a file name */ -#define HTTPPOST_READFILE (1<<1) /* specified content is a file name */ -#define HTTPPOST_PTRNAME (1<<2) /* name is only stored pointer - do not free in formfree */ + struct curl_httppost *more; /* if one field name has more than one + file, this link should link to following + files */ + long flags; /* as defined below */ +#define HTTPPOST_FILENAME (1<<0) /* specified content is a file name */ +#define HTTPPOST_READFILE (1<<1) /* specified content is a file name */ +#define HTTPPOST_PTRNAME (1<<2) /* name is only stored pointer + do not free in formfree */ #define HTTPPOST_PTRCONTENTS (1<<3) /* contents is only stored pointer do not free in formfree */ +#define HTTPPOST_BUFFER (1<<4) /* upload file from buffer */ +#define HTTPPOST_PTRBUFFER (1<<5) /* upload file from pointer contents */ -/* CMC: Added support for buffer uploads */ -#define HTTPPOST_BUFFER (1<<4) /* upload file from buffer */ -#define HTTPPOST_PTRBUFFER (1<<5) /* upload file from pointer contents */ - - char *showfilename; /* The file name to show. If not set, the actual - file name will be used (if this is a file part) */ + char *showfilename; /* The file name to show. If not set, the + actual file name will be used (if this + is a file part) */ }; typedef int (*curl_progress_callback)(void *clientp, @@ -213,13 +234,13 @@ typedef enum { CURLPROXY_SOCKS5 = 5 } curl_proxytype; -typedef enum { - CURLAUTH_BASIC = 0, /* default */ - CURLAUTH_DIGEST = 1, /* Digest */ - CURLAUTH_GSSNEGOTIATE = 2, /* GSS-Negotiate */ - CURLAUTH_NTLM = 3, /* NTLM */ - CURLAUTH_LASTKNOWN /* never to be used */ -} curl_httpauth; +#define CURLAUTH_NONE 0 /* nothing */ +#define CURLAUTH_BASIC (1<<0) /* Basic (default) */ +#define CURLAUTH_DIGEST (1<<1) /* Digest */ +#define CURLAUTH_GSSNEGOTIATE (1<<2) /* GSS-Negotiate */ +#define CURLAUTH_NTLM (1<<3) /* NTLM */ +#define CURLAUTH_ANY ~0 /* all types set */ +#define CURLAUTH_ANYSAFE (~CURLAUTH_BASIC) /* this was the error code 50 in 7.7.3 and a few earlier versions, this is no longer used by libcurl but is instead #defined here only to not @@ -270,6 +291,12 @@ typedef enum { #define CINIT(name,type,number) CURLOPT_/**/name = type + number #endif +/* + * This macro-mania below setups the CURLOPT_[what] enum, to be used with + * curl_easy_setopt(). The first argument in the CINIT() macro is the [what] + * word. + */ + typedef enum { CINIT(NOTHING, LONG, 0), /********* the first one is unused ************/ @@ -279,24 +306,19 @@ typedef enum { /* The full URL to get/put */ CINIT(URL, OBJECTPOINT, 2), - /* Port number to connect to, if other than default. Specify the CONF_PORT - flag in the CURLOPT_FLAGS to activate this */ + /* Port number to connect to, if other than default. */ CINIT(PORT, LONG, 3), - /* Name of proxy to use. Specify the CONF_PROXY flag in the CURLOPT_FLAGS to - activate this */ + /* Name of proxy to use. */ CINIT(PROXY, OBJECTPOINT, 4), - /* Name and password to use when fetching. Specify the CONF_USERPWD flag in - the CURLOPT_FLAGS to activate this */ + /* "name:password" to use when fetching. */ CINIT(USERPWD, OBJECTPOINT, 5), - /* Name and password to use with Proxy. Specify the CONF_PROXYUSERPWD - flag in the CURLOPT_FLAGS to activate this */ + /* "name:password" to use with proxy. */ CINIT(PROXYUSERPWD, OBJECTPOINT, 6), - /* Range to get, specified as an ASCII string. Specify the CONF_RANGE flag - in the CURLOPT_FLAGS to activate this */ + /* Range to get, specified as an ASCII string. */ CINIT(RANGE, OBJECTPOINT, 7), /* not used */ @@ -417,7 +439,6 @@ typedef enum { as described elsewhere. */ CINIT(WRITEINFO, OBJECTPOINT, 40), - /* Previous FLAG bits */ CINIT(VERBOSE, LONG, 41), /* talk a lot */ CINIT(HEADER, LONG, 42), /* throw the header out too */ CINIT(NOPROGRESS, LONG, 43), /* shut off the progress meter */ @@ -633,8 +654,9 @@ typedef enum { attempted before the good old traditional PORT command. */ CINIT(FTP_USE_EPRT, LONG, 106), - /* Set this to a curl_httpauth value to enable that particular authentication - method. Use this in combination with CURLOPT_USERPWD. */ + /* Set this to a bitmask value to enable the particular authentications + methods you like. Use this in combination with CURLOPT_USERPWD. + Note that setting multiple bits may cause extra network round-trips. */ CINIT(HTTPAUTH, LONG, 107), CURLOPT_LASTENTRY /* the last unused */ @@ -705,9 +727,9 @@ typedef enum { #endif -/* These functions are in the libcurl, they're here for portable reasons and - they are used by the 'curl' client. They really should be moved to some kind - of "portability library" since it has nothing to do with file transfers and +/* These functions are in libcurl, they're here for portable reasons and they + are used by the 'curl' client. They really should be moved to some kind of + "portability library" since it has nothing to do with file transfers and might be usable to other programs... NOTE: they return TRUE if the strings match *case insensitively*. @@ -715,9 +737,12 @@ typedef enum { extern int (curl_strequal)(const char *s1, const char *s2); extern int (curl_strnequal)(const char *s1, const char *s2, size_t n); -/* DEPRECATED function to build formdata */ +#ifdef CURL_OLDSTYLE +/* DEPRECATED function to build formdata. Stop using this, it will cease + to exist. */ int curl_formparse(char *, struct curl_httppost **, struct curl_httppost **_post); +#endif /* name is uppercase CURLFORM_ */ #ifdef CFINIT @@ -796,47 +821,122 @@ typedef enum { CURL_FORMADD_LAST /* last */ } CURLFORMcode; +/* + * NAME curl_formadd() + * + * DESCRIPTION + * + * Pretty advanved function for building multi-part formposts. Each invoke + * adds one part that together construct a full post. Then use + * CURLOPT_HTTPPOST to send it off to libcurl. + */ CURLFORMcode curl_formadd(struct curl_httppost **httppost, - struct curl_httppost **last_post, - ...); + struct curl_httppost **last_post, + ...); -/* cleanup a form: */ +/* + * NAME curl_formfree() + * + * DESCRIPTION + * + * Free a multipart formpost previously built with curl_formadd(). + */ void curl_formfree(struct curl_httppost *form); -/* Unix and Win32 getenv function call, this returns a malloc()'ed string that - MUST be free()ed after usage is complete. */ +/* + * NAME curl_getenv() + * + * DESCRIPTION + * + * Returns a malloc()'ed string that MUST be curl_free()ed after usage is + * complete. + */ char *curl_getenv(const char *variable); -/* Returns a static ascii string of the libcurl version. */ +/* + * NAME curl_version() + * + * DESCRIPTION + * + * Returns a static ascii string of the libcurl version. + */ char *curl_version(void); -/* Escape and unescape URL encoding in strings. The functions return a new - * allocated string or NULL if an error occurred. */ +/* + * NAME curl_escape() + * + * DESCRIPTION + * + * Escapes URL strings (converts all letters consider illegal in URLs to their + * %XX versions). This function returns a new allocated string or NULL if an + * error occurred. + */ char *curl_escape(const char *string, int length); + +/* + * NAME curl_unescape() + * + * DESCRIPTION + * + * Unescapes URL encoding in strings (converts all %XX codes to their 8bit + * versions). This function returns a new allocated string or NULL if an error + * occurred. + */ char *curl_unescape(const char *string, int length); -/* 20020912 WJM. Provide for a de-allocation in the same translation unit - that did the allocation. Added in libcurl 7.10 */ + +/* + * NAME curl_free() + * + * DESCRIPTION + * + * Provided for de-allocation in the same translation unit that did the + * allocation. Added in libcurl 7.10 + */ void curl_free(void *p); -/* curl_global_init() should be invoked exactly once for each application that - uses libcurl */ +/* + * NAME curl_global_init() + * + * DESCRIPTION + * + * curl_global_init() should be invoked exactly once for each application that + * uses libcurl + */ CURLcode curl_global_init(long flags); -/* curl_global_cleanup() should be invoked exactly once for each application - that uses libcurl */ +/* + * NAME curl_global_cleanup() + * + * DESCRIPTION + * + * curl_global_cleanup() should be invoked exactly once for each application + * that uses libcurl + */ void curl_global_cleanup(void); -/* This is the version number */ -#define LIBCURL_VERSION "7.10.6-pre1" -#define LIBCURL_VERSION_NUM 0x070a06 - /* linked-list structure for the CURLOPT_QUOTE option (and other) */ struct curl_slist { - char *data; - struct curl_slist *next; + char *data; + struct curl_slist *next; }; +/* + * NAME curl_slist_append() + * + * DESCRIPTION + * + * Appends a string to a linked list. If no list exists, it will be created + * first. Returns the new list, after appending. + */ struct curl_slist *curl_slist_append(struct curl_slist *, const char *); + +/* + * NAME curl_slist_free_all() + * + * DESCRIPTION + * + * free a previously built curl_slist. + */ void curl_slist_free_all(struct curl_slist *); /* @@ -1004,8 +1104,18 @@ typedef struct { #define CURL_VERSION_KERBEROS4 (1<<1) #define CURL_VERSION_SSL (1<<2) #define CURL_VERSION_LIBZ (1<<3) +#define CURL_VERSION_NTLM (1<<4) +#define CURL_VERSION_GSSNEGOTIATE (1<<5) +#define CURL_VERSION_DEBUG (1<<6) /* built with debug capabilities */ -/* returns a pointer to a static copy of the version info struct */ +/* + * NAME curl_version_info() + * + * DESCRIPTION + * + * This function returns a pointer to a static copy of the version info + * struct. See above. + */ curl_version_info_data *curl_version_info(CURLversion); #ifdef __cplusplus -- cgit v1.2.1 From 45fc760985fa11ef98149418cbad02dadf748f31 Mon Sep 17 00:00:00 2001 From: Daniel Stenberg Date: Fri, 4 Jul 2003 16:29:23 +0000 Subject: Peter Sylvester's patch was applied that introduces the following: CURLOPT_SSL_CTX_FUNCTION to set a callback that gets called with the OpenSSL's ssl_ctx pointer passed in and allow a callback to act on it. If anything but CURLE_OK is returned, that will also be returned by libcurl all the way back. If this function changes the CURLOPT_URL, libcurl will detect this and instead go use the new URL. CURLOPT_SSL_CTX_DATA is a pointer you set to get passed to the callback set with CURLOPT_SSL_CTX_FUNCTION. --- include/curl/curl.h | 16 +++++++++++++++- 1 file changed, 15 insertions(+), 1 deletion(-) (limited to 'include') diff --git a/include/curl/curl.h b/include/curl/curl.h index 00074d561..ae73c1dde 100644 --- a/include/curl/curl.h +++ b/include/curl/curl.h @@ -147,7 +147,7 @@ typedef int (*curl_debug_callback) curl_infotype type, /* what kind of data */ char *data, /* points to the data */ size_t size, /* size of the data pointed to */ - void *userp); /* whatever the user please */ + void *userptr); /* whatever the user please */ /* All possible error codes from all sorts of curl functions. Future versions may return other values, stay prepared. @@ -224,6 +224,11 @@ typedef enum { CURL_LAST /* never use! */ } CURLcode; +typedef CURLcode (*curl_ssl_ctx_callback)(CURL *curl, /* easy handle */ + void *ssl_ctx, /* actually an + OpenSSL SSL_CTX */ + void *userptr); + /* Make a spelling correction for the operation timed-out define */ #define CURLE_OPERATION_TIMEDOUT CURLE_OPERATION_TIMEOUTED #define CURLE_HTTP_NOT_FOUND CURLE_HTTP_RETURNED_ERROR @@ -659,6 +664,15 @@ typedef enum { Note that setting multiple bits may cause extra network round-trips. */ CINIT(HTTPAUTH, LONG, 107), + /* Set the ssl context callback function, currently only for OpenSSL ssl_ctx + in second argument. The function must be matching the + curl_ssl_ctx_callback proto. */ + CINIT(SSL_CTX_FUNCTION, FUNCTIONPOINT, 108), + + /* Set the userdata for the ssl context callback function's third + argument */ + CINIT(SSL_CTX_DATA, OBJECTPOINT, 109), + CURLOPT_LASTENTRY /* the last unused */ } CURLoption; -- cgit v1.2.1 From 172271498dcbfbb8897f285d9c9c54af6d06bb5a Mon Sep 17 00:00:00 2001 From: Daniel Stenberg Date: Mon, 21 Jul 2003 08:25:31 +0000 Subject: pre4-commit --- include/curl/curl.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'include') diff --git a/include/curl/curl.h b/include/curl/curl.h index ae73c1dde..ee6a2d70d 100644 --- a/include/curl/curl.h +++ b/include/curl/curl.h @@ -29,7 +29,7 @@ /* This is the version number of the libcurl package from which this header file origins: */ -#define LIBCURL_VERSION "7.10.6-pre3" +#define LIBCURL_VERSION "7.10.6-pre4" /* This is the numeric version of the libcurl version number, meant for easier parsing and comparions by programs. The LIBCURL_VERSION_NUM define will -- cgit v1.2.1 From d0bd644eef396066a9ea0a9594176df9049028b1 Mon Sep 17 00:00:00 2001 From: Daniel Stenberg Date: Tue, 22 Jul 2003 08:23:16 +0000 Subject: Don't depend on the TIME_WITH_SYS_TIME define. win32 doesn't have sys/time.h and I don't think we need it. --- include/curl/curl.h | 10 +++------- 1 file changed, 3 insertions(+), 7 deletions(-) (limited to 'include') diff --git a/include/curl/curl.h b/include/curl/curl.h index ee6a2d70d..4cde1aed5 100644 --- a/include/curl/curl.h +++ b/include/curl/curl.h @@ -48,18 +48,14 @@ #define LIBCURL_VERSION_NUM 0x070a06 #include -/* The include stuff here is mainly for time_t! */ + +/* The include stuff here below is mainly for time_t! */ #ifdef vms # include # include #else # include -# ifdef TIME_WITH_SYS_TIME -# include -# include -# else -# include -# endif +# include #endif /* defined (vms) */ #ifndef TRUE -- cgit v1.2.1 From bdb5e5a25037a585e0ec6b83d29b25961c6823f8 Mon Sep 17 00:00:00 2001 From: Daniel Stenberg Date: Mon, 28 Jul 2003 12:13:48 +0000 Subject: 7.10.6 --- include/curl/curl.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'include') diff --git a/include/curl/curl.h b/include/curl/curl.h index 4cde1aed5..71c490c5a 100644 --- a/include/curl/curl.h +++ b/include/curl/curl.h @@ -29,7 +29,7 @@ /* This is the version number of the libcurl package from which this header file origins: */ -#define LIBCURL_VERSION "7.10.6-pre4" +#define LIBCURL_VERSION "7.10.6" /* This is the numeric version of the libcurl version number, meant for easier parsing and comparions by programs. The LIBCURL_VERSION_NUM define will -- cgit v1.2.1 From f9f1f0e31635a551f51d2b9e4a7afde4ad4027ca Mon Sep 17 00:00:00 2001 From: Daniel Stenberg Date: Fri, 8 Aug 2003 09:13:19 +0000 Subject: Early Ehlinger's CURLOPT_FTP_CREATE_MISSING_DIRS patch was applied --- include/curl/curl.h | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) (limited to 'include') diff --git a/include/curl/curl.h b/include/curl/curl.h index 71c490c5a..b646d0e58 100644 --- a/include/curl/curl.h +++ b/include/curl/curl.h @@ -29,7 +29,7 @@ /* This is the version number of the libcurl package from which this header file origins: */ -#define LIBCURL_VERSION "7.10.6" +#define LIBCURL_VERSION "7.10.7-pre2" /* This is the numeric version of the libcurl version number, meant for easier parsing and comparions by programs. The LIBCURL_VERSION_NUM define will @@ -45,7 +45,7 @@ always a greater number in a more recent release. It makes comparisons with greater than and less than work. */ -#define LIBCURL_VERSION_NUM 0x070a06 +#define LIBCURL_VERSION_NUM 0x070a07 #include @@ -669,6 +669,9 @@ typedef enum { argument */ CINIT(SSL_CTX_DATA, OBJECTPOINT, 109), + /* FTP Option that causes missing dirs to be created on the remote server */ + CINIT(FTP_CREATE_MISSING_DIRS, LONG, 110), + CURLOPT_LASTENTRY /* the last unused */ } CURLoption; -- cgit v1.2.1 From 4c831f8b682af6001dc6cdb2815151d54a50cb6e Mon Sep 17 00:00:00 2001 From: Daniel Stenberg Date: Mon, 11 Aug 2003 11:48:01 +0000 Subject: CURLOPT_PROXYAUTH added by Serge Semashko --- include/curl/curl.h | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) (limited to 'include') diff --git a/include/curl/curl.h b/include/curl/curl.h index b646d0e58..182e62177 100644 --- a/include/curl/curl.h +++ b/include/curl/curl.h @@ -29,7 +29,7 @@ /* This is the version number of the libcurl package from which this header file origins: */ -#define LIBCURL_VERSION "7.10.7-pre2" +#define LIBCURL_VERSION "7.10.7-pre3" /* This is the numeric version of the libcurl version number, meant for easier parsing and comparions by programs. The LIBCURL_VERSION_NUM define will @@ -672,6 +672,11 @@ typedef enum { /* FTP Option that causes missing dirs to be created on the remote server */ CINIT(FTP_CREATE_MISSING_DIRS, LONG, 110), + /* Set this to a bitmask value to enable the particular authentications + methods you like. Use this in combination with CURLOPT_PROXYUSERPWD. + Note that setting multiple bits may cause extra network round-trips. */ + CINIT(PROXYAUTH, LONG, 111), + CURLOPT_LASTENTRY /* the last unused */ } CURLoption; -- cgit v1.2.1 From 6a4ec3be81f9a06f316ba1474b0efb9fca089820 Mon Sep 17 00:00:00 2001 From: Daniel Stenberg Date: Mon, 11 Aug 2003 23:12:46 +0000 Subject: Added CURLINFO_HTTP_CONNECTCODE Added CURL_VERSION_ASYNCHDNS --- include/curl/curl.h | 22 +++++++++------------- 1 file changed, 9 insertions(+), 13 deletions(-) (limited to 'include') diff --git a/include/curl/curl.h b/include/curl/curl.h index 182e62177..4c4f41f13 100644 --- a/include/curl/curl.h +++ b/include/curl/curl.h @@ -992,22 +992,17 @@ typedef enum { CURLINFO_REQUEST_SIZE = CURLINFO_LONG + 12, CURLINFO_SSL_VERIFYRESULT = CURLINFO_LONG + 13, CURLINFO_FILETIME = CURLINFO_LONG + 14, - CURLINFO_CONTENT_LENGTH_DOWNLOAD = CURLINFO_DOUBLE + 15, CURLINFO_CONTENT_LENGTH_UPLOAD = CURLINFO_DOUBLE + 16, - CURLINFO_STARTTRANSFER_TIME = CURLINFO_DOUBLE + 17, - - CURLINFO_CONTENT_TYPE = CURLINFO_STRING + 18, - - CURLINFO_REDIRECT_TIME = CURLINFO_DOUBLE + 19, - CURLINFO_REDIRECT_COUNT = CURLINFO_LONG + 20, - - CURLINFO_PRIVATE = CURLINFO_STRING + 21, - - /* Fill in new entries here! */ - - CURLINFO_LASTONE = 22 + CURLINFO_CONTENT_TYPE = CURLINFO_STRING + 18, + CURLINFO_REDIRECT_TIME = CURLINFO_DOUBLE + 19, + CURLINFO_REDIRECT_COUNT = CURLINFO_LONG + 20, + CURLINFO_PRIVATE = CURLINFO_STRING + 21, + CURLINFO_HTTP_CONNECTCODE = CURLINFO_LONG + 22, + /* Fill in new entries below here! */ + + CURLINFO_LASTONE = 23 } CURLINFO; typedef enum { @@ -1125,6 +1120,7 @@ typedef struct { #define CURL_VERSION_NTLM (1<<4) #define CURL_VERSION_GSSNEGOTIATE (1<<5) #define CURL_VERSION_DEBUG (1<<6) /* built with debug capabilities */ +#define CURL_VERSION_ASYNCHDNS (1<<7) /* * NAME curl_version_info() -- cgit v1.2.1 From 6550d271f0e83267e124c6a972f39f65d87a0593 Mon Sep 17 00:00:00 2001 From: Daniel Stenberg Date: Tue, 12 Aug 2003 12:48:40 +0000 Subject: 7.10.7-pre4 commit --- include/curl/curl.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'include') diff --git a/include/curl/curl.h b/include/curl/curl.h index 4c4f41f13..8b6f31437 100644 --- a/include/curl/curl.h +++ b/include/curl/curl.h @@ -29,7 +29,7 @@ /* This is the version number of the libcurl package from which this header file origins: */ -#define LIBCURL_VERSION "7.10.7-pre3" +#define LIBCURL_VERSION "7.10.7-pre4" /* This is the numeric version of the libcurl version number, meant for easier parsing and comparions by programs. The LIBCURL_VERSION_NUM define will -- cgit v1.2.1 From 5c2df3e1a4da7b17ae053ee8c4ecef5eb2d30464 Mon Sep 17 00:00:00 2001 From: Daniel Stenberg Date: Fri, 15 Aug 2003 07:08:02 +0000 Subject: 7.10.7 --- include/curl/curl.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'include') diff --git a/include/curl/curl.h b/include/curl/curl.h index 8b6f31437..f3593f424 100644 --- a/include/curl/curl.h +++ b/include/curl/curl.h @@ -29,7 +29,7 @@ /* This is the version number of the libcurl package from which this header file origins: */ -#define LIBCURL_VERSION "7.10.7-pre4" +#define LIBCURL_VERSION "7.10.7" /* This is the numeric version of the libcurl version number, meant for easier parsing and comparions by programs. The LIBCURL_VERSION_NUM define will -- cgit v1.2.1 From 5974309d10e2db1bddc49ed6cca2f372bfc739ce Mon Sep 17 00:00:00 2001 From: Daniel Stenberg Date: Wed, 20 Aug 2003 15:42:24 +0000 Subject: CURLINFO_RESPONSE_CODE replaces CURLINFO_HTTP_CODE --- include/curl/curl.h | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'include') diff --git a/include/curl/curl.h b/include/curl/curl.h index f3593f424..b856fa956 100644 --- a/include/curl/curl.h +++ b/include/curl/curl.h @@ -979,7 +979,7 @@ time_t curl_getdate(const char *p, const time_t *now); typedef enum { CURLINFO_NONE, /* first, never use this */ CURLINFO_EFFECTIVE_URL = CURLINFO_STRING + 1, - CURLINFO_HTTP_CODE = CURLINFO_LONG + 2, + CURLINFO_RESPONSE_CODE = CURLINFO_LONG + 2, CURLINFO_TOTAL_TIME = CURLINFO_DOUBLE + 3, CURLINFO_NAMELOOKUP_TIME = CURLINFO_DOUBLE + 4, CURLINFO_CONNECT_TIME = CURLINFO_DOUBLE + 5, @@ -1005,6 +1005,10 @@ typedef enum { CURLINFO_LASTONE = 23 } CURLINFO; +/* CURLINFO_RESPONSE_CODE is the new name for the option previously known as + CURLINFO_HTTP_CODE */ +#define CURLINFO_HTTP_CODE CURLINFO_RESPONSE_CODE + typedef enum { CURLCLOSEPOLICY_NONE, /* first, never use this */ -- cgit v1.2.1 From 96d9ddee38f35b31b707d2893a7274e5885ec567 Mon Sep 17 00:00:00 2001 From: Daniel Stenberg Date: Mon, 1 Sep 2003 08:22:21 +0000 Subject: CURLE_LDAP_INVALID_URL added (by Henrik Storner) --- include/curl/curl.h | 1 + 1 file changed, 1 insertion(+) (limited to 'include') diff --git a/include/curl/curl.h b/include/curl/curl.h index b856fa956..96a8b4b11 100644 --- a/include/curl/curl.h +++ b/include/curl/curl.h @@ -216,6 +216,7 @@ typedef enum { CURLE_SSL_CIPHER, /* 59 - couldn't use specified cipher */ CURLE_SSL_CACERT, /* 60 - problem with the CA cert (path?) */ CURLE_BAD_CONTENT_ENCODING, /* 61 - Unrecognized transfer encoding */ + CURLE_LDAP_INVALID_URL, /* 62 - Invalid LDAP URL */ CURL_LAST /* never use! */ } CURLcode; -- cgit v1.2.1 From f2d422235b0bf7dc6e7179143296a5e4abf8b9ed Mon Sep 17 00:00:00 2001 From: Daniel Stenberg Date: Wed, 3 Sep 2003 22:02:40 +0000 Subject: Early Ehlinger's CURLOPT_FTP_RESPONSE_TIMEOUT patch applied. --- include/curl/curl.h | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) (limited to 'include') diff --git a/include/curl/curl.h b/include/curl/curl.h index 96a8b4b11..10ef77ccb 100644 --- a/include/curl/curl.h +++ b/include/curl/curl.h @@ -29,7 +29,7 @@ /* This is the version number of the libcurl package from which this header file origins: */ -#define LIBCURL_VERSION "7.10.7" +#define LIBCURL_VERSION "7.10.8-test2" /* This is the numeric version of the libcurl version number, meant for easier parsing and comparions by programs. The LIBCURL_VERSION_NUM define will @@ -45,7 +45,7 @@ always a greater number in a more recent release. It makes comparisons with greater than and less than work. */ -#define LIBCURL_VERSION_NUM 0x070a07 +#define LIBCURL_VERSION_NUM 0x070a08 #include @@ -678,6 +678,12 @@ typedef enum { Note that setting multiple bits may cause extra network round-trips. */ CINIT(PROXYAUTH, LONG, 111), + /* FPT Option that changes the timeout, in seconds, associated with + getting a response. This is different from transfer timeout time and + essentially places a demand on the FTP server to acknowledge commands + in a timely manner. */ + CINIT(FTP_RESPONSE_TIMEOUT, LONG , 112), + CURLOPT_LASTENTRY /* the last unused */ } CURLoption; -- cgit v1.2.1 From 29b7fb628e5852c367c87869e5b1301ac744ade4 Mon Sep 17 00:00:00 2001 From: Daniel Stenberg Date: Thu, 4 Sep 2003 13:32:55 +0000 Subject: CURLINFO_HTTPAUTH_AVAIL and CURLINFO_PROXYAUTH_AVAIL --- include/curl/curl.h | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'include') diff --git a/include/curl/curl.h b/include/curl/curl.h index 10ef77ccb..101bba034 100644 --- a/include/curl/curl.h +++ b/include/curl/curl.h @@ -1004,9 +1004,11 @@ typedef enum { CURLINFO_STARTTRANSFER_TIME = CURLINFO_DOUBLE + 17, CURLINFO_CONTENT_TYPE = CURLINFO_STRING + 18, CURLINFO_REDIRECT_TIME = CURLINFO_DOUBLE + 19, - CURLINFO_REDIRECT_COUNT = CURLINFO_LONG + 20, + CURLINFO_REDIRECT_COUNT = CURLINFO_LONG + 20, CURLINFO_PRIVATE = CURLINFO_STRING + 21, CURLINFO_HTTP_CONNECTCODE = CURLINFO_LONG + 22, + CURLINFO_HTTPAUTH_AVAIL = CURLINFO_LONG + 23, + CURLINFO_PROXYAUTH_AVAIL = CURLINFO_LONG + 24, /* Fill in new entries below here! */ CURLINFO_LASTONE = 23 -- cgit v1.2.1 From d4ab68cd51318b1f0d29bd30a8020aebef967d0a Mon Sep 17 00:00:00 2001 From: Daniel Stenberg Date: Sun, 7 Sep 2003 23:31:59 +0000 Subject: 7.10.8-pre1 commit --- include/curl/curl.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'include') diff --git a/include/curl/curl.h b/include/curl/curl.h index 101bba034..117fb6720 100644 --- a/include/curl/curl.h +++ b/include/curl/curl.h @@ -29,7 +29,7 @@ /* This is the version number of the libcurl package from which this header file origins: */ -#define LIBCURL_VERSION "7.10.8-test2" +#define LIBCURL_VERSION "7.10.8-pre1" /* This is the numeric version of the libcurl version number, meant for easier parsing and comparions by programs. The LIBCURL_VERSION_NUM define will -- cgit v1.2.1 From 09ccfcdcd422fc0b0421562bbdcf53f78a3f3e4b Mon Sep 17 00:00:00 2001 From: Daniel Stenberg Date: Fri, 19 Sep 2003 12:56:22 +0000 Subject: Markus Moeller's SPNEGO patch applied, with my edits, additions and minor cleanups. --- include/curl/curl.h | 1 + 1 file changed, 1 insertion(+) (limited to 'include') diff --git a/include/curl/curl.h b/include/curl/curl.h index 117fb6720..f78d8a84d 100644 --- a/include/curl/curl.h +++ b/include/curl/curl.h @@ -1134,6 +1134,7 @@ typedef struct { #define CURL_VERSION_GSSNEGOTIATE (1<<5) #define CURL_VERSION_DEBUG (1<<6) /* built with debug capabilities */ #define CURL_VERSION_ASYNCHDNS (1<<7) +#define CURL_VERSION_SPNEGO (1<<8) /* * NAME curl_version_info() -- cgit v1.2.1 From 2297eca103307e077837951f33d06d08a19559d3 Mon Sep 17 00:00:00 2001 From: Daniel Stenberg Date: Fri, 19 Sep 2003 15:16:47 +0000 Subject: Added CURLOPT_IPRESOLVE support --- include/curl/curl.h | 15 ++++++++++++++- 1 file changed, 14 insertions(+), 1 deletion(-) (limited to 'include') diff --git a/include/curl/curl.h b/include/curl/curl.h index f78d8a84d..76ca1f8a8 100644 --- a/include/curl/curl.h +++ b/include/curl/curl.h @@ -678,15 +678,28 @@ typedef enum { Note that setting multiple bits may cause extra network round-trips. */ CINIT(PROXYAUTH, LONG, 111), - /* FPT Option that changes the timeout, in seconds, associated with + /* FTP option that changes the timeout, in seconds, associated with getting a response. This is different from transfer timeout time and essentially places a demand on the FTP server to acknowledge commands in a timely manner. */ CINIT(FTP_RESPONSE_TIMEOUT, LONG , 112), + /* Set this option to one of the CURL_IPRESOLVE_* defines (see below) to + tell libcurl to resolve names to those IP versions only. This only has + affect on systems with support for more than one, i.e IPv4 _and_ IPv6. */ + CINIT(IPRESOLVE, LONG, 113), + CURLOPT_LASTENTRY /* the last unused */ } CURLoption; + /* Below here follows defines for the CURLOPT_IPRESOLVE option. If a host + name resolves addresses using more than one IP protocol version, this + option might be handy to force libcurl to use a specific IP version. */ +#define CURL_IPRESOLVE_WHATEVER 0 /* default, resolves addresses to all IP + versions that your system allows */ +#define CURL_IPRESOLVE_V4 1 /* resolve to ipv4 addresses */ +#define CURL_IPRESOLVE_V6 2 /* resolve to ipv6 addresses */ + /* two convenient "aliases" that follow the name scheme better */ #define CURLOPT_WRITEDATA CURLOPT_FILE #define CURLOPT_READDATA CURLOPT_INFILE -- cgit v1.2.1 From 48c1943824274ba22d47a8959a9543d315898b39 Mon Sep 17 00:00:00 2001 From: Daniel Stenberg Date: Sun, 21 Sep 2003 23:22:39 +0000 Subject: 7.10.8-pre2 --- include/curl/curl.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'include') diff --git a/include/curl/curl.h b/include/curl/curl.h index 76ca1f8a8..2516ebaac 100644 --- a/include/curl/curl.h +++ b/include/curl/curl.h @@ -29,7 +29,7 @@ /* This is the version number of the libcurl package from which this header file origins: */ -#define LIBCURL_VERSION "7.10.8-pre1" +#define LIBCURL_VERSION "7.10.8-pre2" /* This is the numeric version of the libcurl version number, meant for easier parsing and comparions by programs. The LIBCURL_VERSION_NUM define will -- cgit v1.2.1 From 09d593ade0ed8f9f68c724e8a79f77a6e0e60adb Mon Sep 17 00:00:00 2001 From: Daniel Stenberg Date: Fri, 3 Oct 2003 13:13:53 +0000 Subject: Renamed the function argument named 'access', as noted by Neil Spring in the debian bug report #213180. --- include/curl/curl.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'include') diff --git a/include/curl/curl.h b/include/curl/curl.h index 2516ebaac..fd507fda8 100644 --- a/include/curl/curl.h +++ b/include/curl/curl.h @@ -1079,7 +1079,7 @@ typedef enum { typedef void (*curl_lock_function)(CURL *handle, curl_lock_data data, - curl_lock_access access, + curl_lock_access locktype, void *userptr); typedef void (*curl_unlock_function)(CURL *handle, curl_lock_data data, -- cgit v1.2.1 From 33525ac165b95bd261d2d92a82e3d8249153f2c9 Mon Sep 17 00:00:00 2001 From: Daniel Stenberg Date: Wed, 8 Oct 2003 13:54:36 +0000 Subject: 7.10.8-pre3 commit --- include/curl/curl.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'include') diff --git a/include/curl/curl.h b/include/curl/curl.h index fd507fda8..5aa4cc923 100644 --- a/include/curl/curl.h +++ b/include/curl/curl.h @@ -29,7 +29,7 @@ /* This is the version number of the libcurl package from which this header file origins: */ -#define LIBCURL_VERSION "7.10.8-pre2" +#define LIBCURL_VERSION "7.10.8-pre3" /* This is the numeric version of the libcurl version number, meant for easier parsing and comparions by programs. The LIBCURL_VERSION_NUM define will -- cgit v1.2.1 From 22adcb9cd1d99858f10e55dc140ceb19d382eee5 Mon Sep 17 00:00:00 2001 From: Daniel Stenberg Date: Thu, 16 Oct 2003 14:08:59 +0000 Subject: password promting support removed from libcurl --- include/curl/curl.h | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'include') diff --git a/include/curl/curl.h b/include/curl/curl.h index 5aa4cc923..0f9e38b5b 100644 --- a/include/curl/curl.h +++ b/include/curl/curl.h @@ -123,6 +123,7 @@ typedef size_t (*curl_read_callback)(char *buffer, size_t nitems, void *instream); + /* not used since 7.10.8, will be removed in a future release */ typedef int (*curl_passwd_callback)(void *clientp, const char *prompt, char *buffer, @@ -503,11 +504,10 @@ typedef enum { this option is used only if SSL_VERIFYPEER is true */ CINIT(CAINFO, OBJECTPOINT, 65), - /* Function pointer to replace the internal password prompt */ + /* OBSOLETE since 7.10.8 */ CINIT(PASSWDFUNCTION, FUNCTIONPOINT, 66), - /* Custom pointer that gets passed as first argument to the password - function */ + /* OBSOLETE since 7.10.8 */ CINIT(PASSWDDATA, OBJECTPOINT, 67), /* Maximum number of http redirects to follow */ -- cgit v1.2.1 From ce5db9a86ea1508b0caaeec38adc5397e390dc3e Mon Sep 17 00:00:00 2001 From: Daniel Stenberg Date: Fri, 17 Oct 2003 13:11:00 +0000 Subject: Dominick Meglio implemented CURLOPT_MAXFILESIZE and --max-filesize. --- include/curl/curl.h | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'include') diff --git a/include/curl/curl.h b/include/curl/curl.h index 0f9e38b5b..557c942a5 100644 --- a/include/curl/curl.h +++ b/include/curl/curl.h @@ -218,6 +218,7 @@ typedef enum { CURLE_SSL_CACERT, /* 60 - problem with the CA cert (path?) */ CURLE_BAD_CONTENT_ENCODING, /* 61 - Unrecognized transfer encoding */ CURLE_LDAP_INVALID_URL, /* 62 - Invalid LDAP URL */ + CURLE_FILESIZE_EXCEEDED, /* 63 - Maximum file size exceeded */ CURL_LAST /* never use! */ } CURLcode; @@ -689,6 +690,10 @@ typedef enum { affect on systems with support for more than one, i.e IPv4 _and_ IPv6. */ CINIT(IPRESOLVE, LONG, 113), + /* Set this option to limit the size of a file that will be downloaded from + an HTTP or FTP server. */ + CINIT(MAXFILESIZE, LONG, 114), + CURLOPT_LASTENTRY /* the last unused */ } CURLoption; -- cgit v1.2.1 From f7f7cd6ccefa9fdda9716fe312cf063614d41d8b Mon Sep 17 00:00:00 2001 From: Daniel Stenberg Date: Sat, 18 Oct 2003 12:04:38 +0000 Subject: 7.10.8-pre4 --- include/curl/curl.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'include') diff --git a/include/curl/curl.h b/include/curl/curl.h index 557c942a5..0bc64805e 100644 --- a/include/curl/curl.h +++ b/include/curl/curl.h @@ -29,7 +29,7 @@ /* This is the version number of the libcurl package from which this header file origins: */ -#define LIBCURL_VERSION "7.10.8-pre3" +#define LIBCURL_VERSION "7.10.8-pre4" /* This is the numeric version of the libcurl version number, meant for easier parsing and comparions by programs. The LIBCURL_VERSION_NUM define will -- cgit v1.2.1 From 2e9d100d0355e076b16ee141b16ab5d5e21cd0bd Mon Sep 17 00:00:00 2001 From: Daniel Stenberg Date: Tue, 21 Oct 2003 14:11:25 +0000 Subject: pre5 --- include/curl/curl.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'include') diff --git a/include/curl/curl.h b/include/curl/curl.h index 0bc64805e..2ed174018 100644 --- a/include/curl/curl.h +++ b/include/curl/curl.h @@ -29,7 +29,7 @@ /* This is the version number of the libcurl package from which this header file origins: */ -#define LIBCURL_VERSION "7.10.8-pre4" +#define LIBCURL_VERSION "7.10.8-pre5" /* This is the numeric version of the libcurl version number, meant for easier parsing and comparions by programs. The LIBCURL_VERSION_NUM define will -- cgit v1.2.1 From 4606dc4158c478f249683ca6a3acebdea32db947 Mon Sep 17 00:00:00 2001 From: Daniel Stenberg Date: Thu, 30 Oct 2003 13:07:36 +0000 Subject: ignore .dist files here --- include/curl/.cvsignore | 1 + 1 file changed, 1 insertion(+) (limited to 'include') diff --git a/include/curl/.cvsignore b/include/curl/.cvsignore index 282522db0..37c8aa7e2 100644 --- a/include/curl/.cvsignore +++ b/include/curl/.cvsignore @@ -1,2 +1,3 @@ Makefile Makefile.in +*.dist -- cgit v1.2.1 From 39f673874f3c9fffa2261d316cd74b0605bbca0b Mon Sep 17 00:00:00 2001 From: Daniel Stenberg Date: Thu, 30 Oct 2003 13:30:21 +0000 Subject: Set version string to -CVS. This string is generated by maketgz at release- time. --- include/curl/curl.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'include') diff --git a/include/curl/curl.h b/include/curl/curl.h index 2ed174018..884bcc726 100644 --- a/include/curl/curl.h +++ b/include/curl/curl.h @@ -29,7 +29,7 @@ /* This is the version number of the libcurl package from which this header file origins: */ -#define LIBCURL_VERSION "7.10.8-pre5" +#define LIBCURL_VERSION "7.10.8-CVS" /* This is the numeric version of the libcurl version number, meant for easier parsing and comparions by programs. The LIBCURL_VERSION_NUM define will -- cgit v1.2.1 From 79cb1400abd7929c157c9a02cd1f9c00d55624d7 Mon Sep 17 00:00:00 2001 From: Daniel Stenberg Date: Sat, 1 Nov 2003 11:33:51 +0000 Subject: starting on 7.10.9 in CVS --- include/curl/curl.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'include') diff --git a/include/curl/curl.h b/include/curl/curl.h index 884bcc726..4c87a33ce 100644 --- a/include/curl/curl.h +++ b/include/curl/curl.h @@ -29,7 +29,7 @@ /* This is the version number of the libcurl package from which this header file origins: */ -#define LIBCURL_VERSION "7.10.8-CVS" +#define LIBCURL_VERSION "7.10.9-CVS" /* This is the numeric version of the libcurl version number, meant for easier parsing and comparions by programs. The LIBCURL_VERSION_NUM define will -- cgit v1.2.1 From aeb5edbf07748ab3a12730301530b035f51ae1b6 Mon Sep 17 00:00:00 2001 From: Daniel Stenberg Date: Thu, 6 Nov 2003 07:21:32 +0000 Subject: Moved the TRUE and FALSE #defines to lib/setup.h instead, as they don't belong in the public header file. They are not in our name space so we should not set them globally. --- include/curl/curl.h | 7 ------- 1 file changed, 7 deletions(-) (limited to 'include') diff --git a/include/curl/curl.h b/include/curl/curl.h index 4c87a33ce..42d685826 100644 --- a/include/curl/curl.h +++ b/include/curl/curl.h @@ -58,13 +58,6 @@ # include #endif /* defined (vms) */ -#ifndef TRUE -#define TRUE 1 -#endif -#ifndef FALSE -#define FALSE 0 -#endif - #include "types.h" #ifdef __cplusplus -- cgit v1.2.1 From 45abf75e1ee8f94be0bc42eb2db8118f545dd2d7 Mon Sep 17 00:00:00 2001 From: Daniel Stenberg Date: Thu, 6 Nov 2003 11:33:08 +0000 Subject: We offer the version number "in parts" as well by introducing three new defines. --- include/curl/curl.h | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) (limited to 'include') diff --git a/include/curl/curl.h b/include/curl/curl.h index 42d685826..5884c292e 100644 --- a/include/curl/curl.h +++ b/include/curl/curl.h @@ -45,7 +45,13 @@ always a greater number in a more recent release. It makes comparisons with greater than and less than work. */ -#define LIBCURL_VERSION_NUM 0x070a08 +#define LIBCURL_VERSION_NUM 0x070a09 + +/* The numeric version number is also available "in parts" by using these + defines: */ +#define LIBCURL_VERSION_MAJOR 7 +#define LIBCURL_VERSION_MINOR 10 +#define LIBCURL_VERSION_PATCH 9 #include -- cgit v1.2.1 From ad77f760cf8223548cd214b361591dfde5443dea Mon Sep 17 00:00:00 2001 From: Daniel Stenberg Date: Tue, 11 Nov 2003 14:30:43 +0000 Subject: Added CURLOPT_NETRC_FILE. --- include/curl/curl.h | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'include') diff --git a/include/curl/curl.h b/include/curl/curl.h index 5884c292e..c3c41b4d2 100644 --- a/include/curl/curl.h +++ b/include/curl/curl.h @@ -693,6 +693,12 @@ typedef enum { an HTTP or FTP server. */ CINIT(MAXFILESIZE, LONG, 114), + /* Set this option to the file name of your .netrc file you want libcurl + to parse (using the CURLOPT_NETRC option). If not set, libcurl will do + a poor attempt to find the user's home directory and check for a .netrc + file in there. */ + CINIT(NETRC_FILE, OBJECTPOINT, 115), + CURLOPT_LASTENTRY /* the last unused */ } CURLoption; -- cgit v1.2.1 From 78fb47667780ab7a793d6f4cbe5c6e8db42b1369 Mon Sep 17 00:00:00 2001 From: Daniel Stenberg Date: Sun, 23 Nov 2003 15:36:24 +0000 Subject: FTPSSL support options and defines added --- include/curl/curl.h | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) (limited to 'include') diff --git a/include/curl/curl.h b/include/curl/curl.h index c3c41b4d2..23c89b721 100644 --- a/include/curl/curl.h +++ b/include/curl/curl.h @@ -218,6 +218,7 @@ typedef enum { CURLE_BAD_CONTENT_ENCODING, /* 61 - Unrecognized transfer encoding */ CURLE_LDAP_INVALID_URL, /* 62 - Invalid LDAP URL */ CURLE_FILESIZE_EXCEEDED, /* 63 - Maximum file size exceeded */ + CURLE_FTP_SSL_FAILED, /* 64 - Requested FTP SSL level failed */ CURL_LAST /* never use! */ } CURLcode; @@ -256,6 +257,14 @@ typedef enum { #define CURL_ERROR_SIZE 256 +typedef enum { + CURLFTPSSL_NONE, /* do not attempt to use SSL */ + CURLFTPSSL_TRY, /* try using SSL, proceed anyway otherwise */ + CURLFTPSSL_CONTROL, /* SSL for the control connection or fail */ + CURLFTPSSL_ALL, /* SSL for all communication or fail */ + CURLFTPSSL_LAST /* not an option, never use */ +} curl_ftpssl; + /* long may be 32 or 64 bits, but we should never depend on anything else but 32 */ #define CURLOPTTYPE_LONG 0 @@ -699,6 +708,13 @@ typedef enum { file in there. */ CINIT(NETRC_FILE, OBJECTPOINT, 115), + /* Enable SSL/TLS for FTP, pick one of: + CURLFTPSSL_TRY - try using SSL, proceed anyway otherwise + CURLFTPSSL_CONTROL - SSL for the control connection or fail + CURLFTPSSL_ALL - SSL for all communication or fail + */ + CINIT(FTP_SSL, LONG, 116), + CURLOPT_LASTENTRY /* the last unused */ } CURLoption; -- cgit v1.2.1 From 1e98727c552ced5f8c7587f64ab69c6eaab743dd Mon Sep 17 00:00:00 2001 From: Daniel Stenberg Date: Mon, 24 Nov 2003 07:15:37 +0000 Subject: FTPS support added as RFC2228 and the murray-ftp-auth-ssl draft describe it --- include/curl/curl.h | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'include') diff --git a/include/curl/curl.h b/include/curl/curl.h index 23c89b721..36fff4441 100644 --- a/include/curl/curl.h +++ b/include/curl/curl.h @@ -29,7 +29,7 @@ /* This is the version number of the libcurl package from which this header file origins: */ -#define LIBCURL_VERSION "7.10.9-CVS" +#define LIBCURL_VERSION "7.11.0-CVS" /* This is the numeric version of the libcurl version number, meant for easier parsing and comparions by programs. The LIBCURL_VERSION_NUM define will @@ -45,13 +45,13 @@ always a greater number in a more recent release. It makes comparisons with greater than and less than work. */ -#define LIBCURL_VERSION_NUM 0x070a09 +#define LIBCURL_VERSION_NUM 0x070b00 /* The numeric version number is also available "in parts" by using these defines: */ #define LIBCURL_VERSION_MAJOR 7 -#define LIBCURL_VERSION_MINOR 10 -#define LIBCURL_VERSION_PATCH 9 +#define LIBCURL_VERSION_MINOR 11 +#define LIBCURL_VERSION_PATCH 0 #include -- cgit v1.2.1 From b60e0fa97ed7ddc66d0ad6d00dfd78319bb6ad36 Mon Sep 17 00:00:00 2001 From: Daniel Stenberg Date: Mon, 5 Jan 2004 22:29:29 +0000 Subject: David J Meyer's large file support. --- include/curl/curl.h | 36 +++++++++++++++++++++++++++++++++--- 1 file changed, 33 insertions(+), 3 deletions(-) (limited to 'include') diff --git a/include/curl/curl.h b/include/curl/curl.h index 36fff4441..d0a03e170 100644 --- a/include/curl/curl.h +++ b/include/curl/curl.h @@ -270,6 +270,7 @@ typedef enum { #define CURLOPTTYPE_LONG 0 #define CURLOPTTYPE_OBJECTPOINT 10000 #define CURLOPTTYPE_FUNCTIONPOINT 20000 +#define CURLOPTTYPE_OFF_T 30000 /* name is uppercase CURLOPT_, type is one of the defined CURLOPTTYPE_ @@ -300,6 +301,7 @@ typedef enum { #define LONG CURLOPTTYPE_LONG #define OBJECTPOINT CURLOPTTYPE_OBJECTPOINT #define FUNCTIONPOINT CURLOPTTYPE_FUNCTIONPOINT +#define OFF_T CURLOPTTYPE_OFF_T #define CINIT(name,type,number) CURLOPT_/**/name = type + number #endif @@ -356,7 +358,12 @@ typedef enum { /* If the CURLOPT_INFILE is used, this can be used to inform libcurl about * how large the file being sent really is. That allows better error * checking and better verifies that the upload was succcessful. -1 means - * unknown size. */ + * unknown size. + * + * For large file support, there is also a _LARGE version of the key + * which takes an off_t type, allowing platforms with larger off_t + * sizes to handle larger files. See below for INFILESIZE_LARGE. + */ CINIT(INFILESIZE, LONG, 14), /* POST input fields. */ @@ -384,7 +391,12 @@ typedef enum { /* Set the "low speed time" */ CINIT(LOW_SPEED_TIME, LONG, 20), - /* Set the continuation offset */ + /* Set the continuation offset. + * + * Note there is also a _LARGE version of this key which uses + * off_t types, allowing for large file offsets on platforms which + * use larger-than-32-bit off_t's. Look below for RESUME_FROM_LARGE. + */ CINIT(RESUME_FROM, LONG, 21), /* Set cookie in request: */ @@ -699,9 +711,27 @@ typedef enum { CINIT(IPRESOLVE, LONG, 113), /* Set this option to limit the size of a file that will be downloaded from - an HTTP or FTP server. */ + an HTTP or FTP server. + + Note there is also _LARGE version which adds large file support for + platforms which have larger off_t sizes. See MAXFILESIZE_LARGE below. */ CINIT(MAXFILESIZE, LONG, 114), + /* See the comment for INFILESIZE above, but in short, specifies + * the size of the file being uploaded. -1 means unknown. + */ + CINIT(INFILESIZE_LARGE, OFF_T, 115), + + /* Sets the continuation offset. There is also a LONG version of this; + * look above for RESUME_FROM. + */ + CINIT(RESUME_FROM_LARGE, OFF_T, 116), + + /* Sets the maximum size of data that will be downloaded from + * an HTTP or FTP server. See MAXFILESIZE above for the LONG version. + */ + CINIT(MAXFILESIZE_LARGE, OFF_T, 117), + /* Set this option to the file name of your .netrc file you want libcurl to parse (using the CURLOPT_NETRC option). If not set, libcurl will do a poor attempt to find the user's home directory and check for a .netrc -- cgit v1.2.1 From 979a1e62370d0703600c6b77e13e5a7302a1d121 Mon Sep 17 00:00:00 2001 From: Daniel Stenberg Date: Mon, 5 Jan 2004 22:34:37 +0000 Subject: fix duplicates --- include/curl/curl.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'include') diff --git a/include/curl/curl.h b/include/curl/curl.h index d0a03e170..fa393715d 100644 --- a/include/curl/curl.h +++ b/include/curl/curl.h @@ -736,14 +736,14 @@ typedef enum { to parse (using the CURLOPT_NETRC option). If not set, libcurl will do a poor attempt to find the user's home directory and check for a .netrc file in there. */ - CINIT(NETRC_FILE, OBJECTPOINT, 115), + CINIT(NETRC_FILE, OBJECTPOINT, 118), /* Enable SSL/TLS for FTP, pick one of: CURLFTPSSL_TRY - try using SSL, proceed anyway otherwise CURLFTPSSL_CONTROL - SSL for the control connection or fail CURLFTPSSL_ALL - SSL for all communication or fail */ - CINIT(FTP_SSL, LONG, 116), + CINIT(FTP_SSL, LONG, 119), CURLOPT_LASTENTRY /* the last unused */ } CURLoption; -- cgit v1.2.1 From 053f6c85efd0bf698f73343989474d672d0563a8 Mon Sep 17 00:00:00 2001 From: Daniel Stenberg Date: Wed, 7 Jan 2004 09:19:33 +0000 Subject: updated year in the copyright string --- include/curl/curl.h | 2 +- include/curl/easy.h | 2 +- include/curl/mprintf.h | 2 +- include/curl/multi.h | 2 +- include/curl/stdcheaders.h | 2 +- include/curl/types.h | 2 +- 6 files changed, 6 insertions(+), 6 deletions(-) (limited to 'include') diff --git a/include/curl/curl.h b/include/curl/curl.h index fa393715d..1937d15ae 100644 --- a/include/curl/curl.h +++ b/include/curl/curl.h @@ -7,7 +7,7 @@ * | (__| |_| | _ <| |___ * \___|\___/|_| \_\_____| * - * Copyright (C) 1998 - 2003, Daniel Stenberg, , et al. + * Copyright (C) 1998 - 2004, 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 diff --git a/include/curl/easy.h b/include/curl/easy.h index a57839181..ba51fc3bc 100644 --- a/include/curl/easy.h +++ b/include/curl/easy.h @@ -7,7 +7,7 @@ * | (__| |_| | _ <| |___ * \___|\___/|_| \_\_____| * - * Copyright (C) 1998 - 2003, Daniel Stenberg, , et al. + * Copyright (C) 1998 - 2004, 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 diff --git a/include/curl/mprintf.h b/include/curl/mprintf.h index 875d20038..65dc11442 100644 --- a/include/curl/mprintf.h +++ b/include/curl/mprintf.h @@ -5,7 +5,7 @@ * | (__| |_| | _ <| |___ * \___|\___/|_| \_\_____| * - * Copyright (C) 1998 - 2003, Daniel Stenberg, , et al. + * Copyright (C) 1998 - 2004, 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 diff --git a/include/curl/multi.h b/include/curl/multi.h index c5a74815b..04a7dcc33 100644 --- a/include/curl/multi.h +++ b/include/curl/multi.h @@ -7,7 +7,7 @@ * | (__| |_| | _ <| |___ * \___|\___/|_| \_\_____| * - * Copyright (C) 1998 - 2003, Daniel Stenberg, , et al. + * Copyright (C) 1998 - 2004, 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 diff --git a/include/curl/stdcheaders.h b/include/curl/stdcheaders.h index b6a1d27d9..11c1e2f6e 100644 --- a/include/curl/stdcheaders.h +++ b/include/curl/stdcheaders.h @@ -7,7 +7,7 @@ * | (__| |_| | _ <| |___ * \___|\___/|_| \_\_____| * - * Copyright (C) 1998 - 2003, Daniel Stenberg, , et al. + * Copyright (C) 1998 - 2004, 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 diff --git a/include/curl/types.h b/include/curl/types.h index 42e98e371..aaf9e9498 100644 --- a/include/curl/types.h +++ b/include/curl/types.h @@ -7,7 +7,7 @@ * | (__| |_| | _ <| |___ * \___|\___/|_| \_\_____| * - * Copyright (C) 1998 - 2003, Daniel Stenberg, , et al. + * Copyright (C) 1998 - 2004, 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 -- cgit v1.2.1 From 9beae7693a3d7ada9c3b0108147adadae05b0179 Mon Sep 17 00:00:00 2001 From: Daniel Stenberg Date: Wed, 21 Jan 2004 08:39:54 +0000 Subject: Removed defines with TIMECOND_ prefixes. They have been obsolte since April 22 2002, and if this causes anyone any problems now it is very easy to just add CURL_ to the names. This corrects this name space pollution. --- include/curl/curl.h | 11 ----------- 1 file changed, 11 deletions(-) (limited to 'include') diff --git a/include/curl/curl.h b/include/curl/curl.h index 1937d15ae..dd70a3cd2 100644 --- a/include/curl/curl.h +++ b/include/curl/curl.h @@ -805,17 +805,6 @@ typedef enum { CURL_TIMECOND_LAST } curl_TimeCond; -/* for backwards compatibility */ -#ifndef TIMECOND_IFMODSINCE -#define TIMECOND_IFMODSINCE CURL_TIMECOND_IFMODSINCE -#endif -#ifndef TIMECOND_IFUNMODSINCE -#define TIMECOND_IFUNMODSINCE CURL_TIMECOND_IFUNMODSINCE -#endif -#ifndef TIMECOND_LASTMOD -#define TIMECOND_LASTMOD CURL_TIMECOND_LASTMOD -#endif - #ifdef __BEOS__ #include #endif -- cgit v1.2.1 From 0c4907afccdce7bbf7236e46b9df697975e42d44 Mon Sep 17 00:00:00 2001 From: Daniel Stenberg Date: Thu, 22 Jan 2004 11:54:39 +0000 Subject: curl_off_t is the new type for large file support HttpPost is not defined anymore --- include/curl/curl.h | 20 +++++++++++++++++--- 1 file changed, 17 insertions(+), 3 deletions(-) (limited to 'include') diff --git a/include/curl/curl.h b/include/curl/curl.h index dd70a3cd2..f34a3effe 100644 --- a/include/curl/curl.h +++ b/include/curl/curl.h @@ -70,9 +70,23 @@ extern "C" { #endif -/* silly trick to preserve functionality with older code, but making it use - our name space for the future */ -#define HttpPost curl_httppost +/* + * We want the typedef curl_off_t setup for large file support on all + * platforms. + */ +#if defined(_MSC_VER) +/* MSVC */ + typedef signed __int64 curl_off_t; +#else +#if (defined(__GNUC__) && defined(WIN32)) || defined(__WATCOMC__) +/* gcc on windows or Watcom */ + typedef long long curl_off_t; +#else +/* "normal" approach, do not that this does not necessarily mean that + the type is >32 bits, see the SIZEOF_CURL_OFF_T define for that! */ + typedef off_t curl_off_t; +#endif +#endif struct curl_httppost { struct curl_httppost *next; /* next entry in the list */ -- cgit v1.2.1 From d5bb877fba1a212968fad74cf74a9dfda5401500 Mon Sep 17 00:00:00 2001 From: Daniel Stenberg Date: Thu, 22 Jan 2004 11:56:39 +0000 Subject: s/not/note --- include/curl/curl.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'include') diff --git a/include/curl/curl.h b/include/curl/curl.h index f34a3effe..100e72872 100644 --- a/include/curl/curl.h +++ b/include/curl/curl.h @@ -82,7 +82,7 @@ extern "C" { /* gcc on windows or Watcom */ typedef long long curl_off_t; #else -/* "normal" approach, do not that this does not necessarily mean that +/* "normal" approach, do note that this does not necessarily mean that the type is >32 bits, see the SIZEOF_CURL_OFF_T define for that! */ typedef off_t curl_off_t; #endif -- cgit v1.2.1 From 70d7a9e6a5cea1f51c5d8a71eec4fa08192fc0c2 Mon Sep 17 00:00:00 2001 From: Daniel Stenberg Date: Mon, 2 Feb 2004 16:24:18 +0000 Subject: Introducing the SECOND version of the version_info struct. This should be backwards compatible with older libcurls just fine. --- include/curl/curl.h | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) (limited to 'include') diff --git a/include/curl/curl.h b/include/curl/curl.h index 100e72872..279df2ec0 100644 --- a/include/curl/curl.h +++ b/include/curl/curl.h @@ -1175,6 +1175,7 @@ CURLSHcode curl_share_cleanup(CURLSH *); typedef enum { CURLVERSION_FIRST, + CURLVERSION_SECOND, CURLVERSION_LAST /* never actually use this */ } CURLversion; @@ -1183,7 +1184,7 @@ typedef enum { meant to be a built-in version number for what kind of struct the caller expects. If the struct ever changes, we redfine the NOW to another enum from above. */ -#define CURLVERSION_NOW CURLVERSION_FIRST +#define CURLVERSION_NOW CURLVERSION_SECOND typedef struct { CURLversion age; /* age of the returned struct */ @@ -1196,6 +1197,10 @@ typedef struct { const char *libz_version; /* human readable string */ /* protocols is terminated by an entry with a NULL protoname */ const char **protocols; + + /* The fields below this were added in CURLVERSION_SECOND */ + const char *ares; + int ares_num; } curl_version_info_data; #define CURL_VERSION_IPV6 (1<<0) -- cgit v1.2.1 From 4515d06465da15340c56d5b4f14ab4950fd59baa Mon Sep 17 00:00:00 2001 From: Daniel Stenberg Date: Thu, 26 Feb 2004 16:23:28 +0000 Subject: David Byron's fixes to make the latest curl build fine under MSVC 6. --- include/curl/multi.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'include') diff --git a/include/curl/multi.h b/include/curl/multi.h index 04a7dcc33..0ed48bf2b 100644 --- a/include/curl/multi.h +++ b/include/curl/multi.h @@ -52,7 +52,7 @@ #endif #if defined(WIN32) && !defined(__GNUC__) || defined(__MINGW32__) -#include +#include #else #ifdef _AIX -- cgit v1.2.1 From 2b634be4670a1bc4d1b9c1a634299c9c99a50656 Mon Sep 17 00:00:00 2001 From: Daniel Stenberg Date: Fri, 27 Feb 2004 12:41:03 +0000 Subject: Mark obsolete options with OSBOLETE in a comment on the same line, to make it easier to exclude them with grep, when grepping for options. --- include/curl/curl.h | 23 +++++++---------------- 1 file changed, 7 insertions(+), 16 deletions(-) (limited to 'include') diff --git a/include/curl/curl.h b/include/curl/curl.h index 279df2ec0..fefbe9de9 100644 --- a/include/curl/curl.h +++ b/include/curl/curl.h @@ -326,8 +326,6 @@ typedef enum { */ typedef enum { - CINIT(NOTHING, LONG, 0), /********* the first one is unused ************/ - /* This is the FILE * or void * the regular output should be written to. */ CINIT(FILE, OBJECTPOINT, 1), @@ -455,9 +453,7 @@ typedef enum { since 1 Jan 1970 */ CINIT(TIMEVALUE, LONG, 34), - /* HTTP request, for odd commands like DELETE, TRACE and others */ - /* OBSOLETE DEFINE, left for tradition only */ - CINIT(HTTPREQUEST, OBJECTPOINT, 35), + CINIT(HTTPREQUEST, OBJECTPOINT, 35), /* OBSOLETE */ /* Custom request, for customizing the get command like HTTP: DELETE, TRACE and others @@ -494,14 +490,12 @@ typedef enum { CINIT(FOLLOWLOCATION, LONG, 52), /* use Location: Luke! */ - /* This FTPASCII name is now obsolete, to be removed, use the TRANSFERTEXT - instead. It goes for more protocols than just ftp... */ - CINIT(FTPASCII, LONG, 53), /* use TYPE A for transfer */ + CINIT(FTPASCII, LONG, 53), /* OBSOLETE */ CINIT(TRANSFERTEXT, LONG, 53), /* transfer data in text/ASCII format */ CINIT(PUT, LONG, 54), /* PUT the input file */ - CINIT(MUTE, LONG, 55), /* OBSOLETE OPTION, removed in 7.8 */ + CINIT(MUTE, LONG, 55), /* OBSOLETE */ /* Function that will be called instead of the internal progress display * function. This function should be defined as the curl_progress_callback @@ -539,11 +533,8 @@ typedef enum { this option is used only if SSL_VERIFYPEER is true */ CINIT(CAINFO, OBJECTPOINT, 65), - /* OBSOLETE since 7.10.8 */ - CINIT(PASSWDFUNCTION, FUNCTIONPOINT, 66), - - /* OBSOLETE since 7.10.8 */ - CINIT(PASSWDDATA, OBJECTPOINT, 67), + CINIT(PASSWDFUNCTION, FUNCTIONPOINT, 66), /* OBSOLETE */ + CINIT(PASSWDDATA, OBJECTPOINT, 67), /* OBSOLETE */ /* Maximum number of http redirects to follow */ CINIT(MAXREDIRS, LONG, 68), @@ -562,8 +553,8 @@ typedef enum { up */ CINIT(CLOSEPOLICY, LONG, 72), - /* Callback to use when CURLCLOSEPOLICY_CALLBACK is set */ - CINIT(CLOSEFUNCTION, FUNCTIONPOINT, 73), + /* Callback to use when CURLCLOSEPOLICY_CALLBACK is set. NOT USED. */ + CINIT(CLOSEFUNCTION, FUNCTIONPOINT, 73), /* OBSOLETE */ /* Set to explicitly use a new connection for the upcoming transfer. Do not use this unless you're absolutely sure of this, as it makes the -- cgit v1.2.1 From 5c4dba1418525e2706950f515236db9b49e7526f Mon Sep 17 00:00:00 2001 From: Daniel Stenberg Date: Mon, 1 Mar 2004 16:20:20 +0000 Subject: * Added CURL_VERSION_LARGEFILE * If CURL_NO_OLDIES is defined, we hide all obsolete functions/options. * CURL_FORMAT_OFF_T is defined for portable printf()ing of curl_off_t types (although not with curl_mprintf()!) --- include/curl/curl.h | 60 +++++++++++++++++++++++++++++++++++++++-------------- 1 file changed, 45 insertions(+), 15 deletions(-) (limited to 'include') diff --git a/include/curl/curl.h b/include/curl/curl.h index fefbe9de9..60f46787e 100644 --- a/include/curl/curl.h +++ b/include/curl/curl.h @@ -54,6 +54,7 @@ #define LIBCURL_VERSION_PATCH 0 #include +#include /* The include stuff here below is mainly for time_t! */ #ifdef vms @@ -72,21 +73,37 @@ extern "C" { /* * We want the typedef curl_off_t setup for large file support on all - * platforms. + * platforms. We also provide a CURL_FORMAT_OFF_T define to use in *printf + * format strings when outputting a variable of type curl_off_t. */ #if defined(_MSC_VER) /* MSVC */ typedef signed __int64 curl_off_t; -#else +#define CURL_FORMAT_OFF_T "%I64d" +#else /* MSC_VER */ #if (defined(__GNUC__) && defined(WIN32)) || defined(__WATCOMC__) /* gcc on windows or Watcom */ typedef long long curl_off_t; -#else -/* "normal" approach, do note that this does not necessarily mean that +#define CURL_FORMAT_OFF_T "%I64d" +#else /* GCC or Watcom on Windows */ + +/* "normal" POSIX approach, do note that this does not necessarily mean that the type is >32 bits, see the SIZEOF_CURL_OFF_T define for that! */ typedef off_t curl_off_t; + +/* Check a range of defines to detect large file support. On Linux it seems + none of these are set by default, so if you don't explicitly switches on + large file support, this define will be made for "small file" support. */ +#if defined(_LARGE_FILES) || (_FILE_OFFSET_BITS > 32) || (FILESIZEBITS > 32) \ + || defined(_LARGEFILE_SOURCE) || defined(_LARGEFILE64_SOURCE) + /* For now, we assume at least one of these to be set for large files to + work! */ +#define CURL_FORMAT_OFF_T "%lld" +#else /* LARGE_FILE support */ +#define CURL_FORMAT_OFF_T "%ld" #endif -#endif +#endif /* GCC or Watcom on Windows */ +#endif /* MSC_VER */ struct curl_httppost { struct curl_httppost *next; /* next entry in the list */ @@ -453,7 +470,7 @@ typedef enum { since 1 Jan 1970 */ CINIT(TIMEVALUE, LONG, 34), - CINIT(HTTPREQUEST, OBJECTPOINT, 35), /* OBSOLETE */ + /* 35 = OBSOLETE */ /* Custom request, for customizing the get command like HTTP: DELETE, TRACE and others @@ -490,12 +507,10 @@ typedef enum { CINIT(FOLLOWLOCATION, LONG, 52), /* use Location: Luke! */ - CINIT(FTPASCII, LONG, 53), /* OBSOLETE */ - CINIT(TRANSFERTEXT, LONG, 53), /* transfer data in text/ASCII format */ CINIT(PUT, LONG, 54), /* PUT the input file */ - CINIT(MUTE, LONG, 55), /* OBSOLETE */ + /* 55 = OBSOLETE */ /* Function that will be called instead of the internal progress display * function. This function should be defined as the curl_progress_callback @@ -533,8 +548,8 @@ typedef enum { this option is used only if SSL_VERIFYPEER is true */ CINIT(CAINFO, OBJECTPOINT, 65), - CINIT(PASSWDFUNCTION, FUNCTIONPOINT, 66), /* OBSOLETE */ - CINIT(PASSWDDATA, OBJECTPOINT, 67), /* OBSOLETE */ + /* 66 = OBSOLETE */ + /* 67 = OBSOLETE */ /* Maximum number of http redirects to follow */ CINIT(MAXREDIRS, LONG, 68), @@ -553,8 +568,7 @@ typedef enum { up */ CINIT(CLOSEPOLICY, LONG, 72), - /* Callback to use when CURLCLOSEPOLICY_CALLBACK is set. NOT USED. */ - CINIT(CLOSEFUNCTION, FUNCTIONPOINT, 73), /* OBSOLETE */ + /* 73 = OBSOLETE */ /* Set to explicitly use a new connection for the upcoming transfer. Do not use this unless you're absolutely sure of this, as it makes the @@ -626,7 +640,7 @@ typedef enum { CINIT(SSLENGINE_DEFAULT, LONG, 90), /* Non-zero value means to use the global dns cache */ - CINIT(DNS_USE_GLOBAL_CACHE, LONG, 91), + CINIT(DNS_USE_GLOBAL_CACHE, LONG, 91), /* To become OBSOLETE soon */ /* DNS cache timeout */ CINIT(DNS_CACHE_TIMEOUT, LONG, 92), @@ -761,11 +775,26 @@ typedef enum { #define CURL_IPRESOLVE_V4 1 /* resolve to ipv4 addresses */ #define CURL_IPRESOLVE_V6 2 /* resolve to ipv6 addresses */ - /* two convenient "aliases" that follow the name scheme better */ + /* three convenient "aliases" that follow the name scheme better */ #define CURLOPT_WRITEDATA CURLOPT_FILE #define CURLOPT_READDATA CURLOPT_INFILE #define CURLOPT_HEADERDATA CURLOPT_WRITEHEADER +#ifndef CURL_NO_OLDIES /* define this to test if your app builds with all + the obsolete stuff removed! */ +#define CURLOPT_HTTPREQUEST 0 +#define CURLOPT_FTPASCII CURLOPT_TRANSFERTEXT +#define CURLOPT_MUTE 0 +#define CURLOPT_PASSWDFUNCTION 0 +#define CURLOPT_PASSWDDATA 0 +#define CURLOPT_CLOSEFUNCTION 0 + +#else +/* This is set if CURL_NO_OLDIES is defined at compile-time */ +#define curl_formparse "curl_formparse is obsolete" +#undef CURLOPT_DNS_USE_GLOBAL_CACHE /* soon obsolete */ +#endif + /* These enums are for use with the CURLOPT_HTTP_VERSION option. */ enum { @@ -1203,6 +1232,7 @@ typedef struct { #define CURL_VERSION_DEBUG (1<<6) /* built with debug capabilities */ #define CURL_VERSION_ASYNCHDNS (1<<7) #define CURL_VERSION_SPNEGO (1<<8) +#define CURL_VERSION_LARGEFILE (1<<9) /* supports files bigger than 2GB */ /* * NAME curl_version_info() -- cgit v1.2.1 From a8419d68b6590365c5cb324372789bb5f68e56d5 Mon Sep 17 00:00:00 2001 From: Daniel Stenberg Date: Wed, 3 Mar 2004 12:37:15 +0000 Subject: #ifdef #define #undef circus to prevent compiler warnings on #if operations with undefined variables. --- include/curl/curl.h | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) (limited to 'include') diff --git a/include/curl/curl.h b/include/curl/curl.h index 60f46787e..5ba819213 100644 --- a/include/curl/curl.h +++ b/include/curl/curl.h @@ -94,6 +94,15 @@ extern "C" { /* Check a range of defines to detect large file support. On Linux it seems none of these are set by default, so if you don't explicitly switches on large file support, this define will be made for "small file" support. */ +#ifndef _FILE_OFFSET_BITS +#define _FILE_OFFSET_BITS 0 /* to prevent warnings in the check below */ +#define UNDEF_FILE_OFFSET_BITS +#endif +#ifndef FILESIZEBITS +#define FILESIZEBITS 0 /* to prevent warnings in the check below */ +#define UNDEF_FILESIZEBITS +#endif + #if defined(_LARGE_FILES) || (_FILE_OFFSET_BITS > 32) || (FILESIZEBITS > 32) \ || defined(_LARGEFILE_SOURCE) || defined(_LARGEFILE64_SOURCE) /* For now, we assume at least one of these to be set for large files to @@ -105,6 +114,16 @@ extern "C" { #endif /* GCC or Watcom on Windows */ #endif /* MSC_VER */ +#ifdef UNDEF_FILE_OFFSET_BITS +/* this was defined above for our checks, undefine it again */ +#undef _FILE_OFFSET_BITS +#endif + +#ifdef UNDEF_FILESIZEBITS +/* this was defined above for our checks, undefine it again */ +#undef FILESIZEBITS +#endif + struct curl_httppost { struct curl_httppost *next; /* next entry in the list */ char *name; /* pointer to allocated name */ -- cgit v1.2.1 From 1ebda8fa0eedf04a9759bd08b904199b2c02a0bf Mon Sep 17 00:00:00 2001 From: Daniel Stenberg Date: Fri, 12 Mar 2004 08:55:47 +0000 Subject: Added CURLOPT_POSTFIELDSIZE_LARGE to offer a large file version of the CURLOPT_POSTFIELDSIZE option to allow really big HTTP POSTs. --- include/curl/curl.h | 3 +++ 1 file changed, 3 insertions(+) (limited to 'include') diff --git a/include/curl/curl.h b/include/curl/curl.h index 5ba819213..0a3b32717 100644 --- a/include/curl/curl.h +++ b/include/curl/curl.h @@ -783,6 +783,9 @@ typedef enum { */ CINIT(FTP_SSL, LONG, 119), + /* The _LARGE version of the standard POSTFIELDSIZE option */ + CINIT(POSTFIELDSIZE_LARGE, OFF_T, 120), + CURLOPT_LASTENTRY /* the last unused */ } CURLoption; -- cgit v1.2.1 From 5b55f9ecb34a00af236b2275ffa9adab492a93b6 Mon Sep 17 00:00:00 2001 From: Daniel Stenberg Date: Wed, 17 Mar 2004 12:46:42 +0000 Subject: =?UTF-8?q?G=FCnter=20Knauf's=20NetWare=20changes.?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- include/curl/multi.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'include') diff --git a/include/curl/multi.h b/include/curl/multi.h index 0ed48bf2b..b2d821826 100644 --- a/include/curl/multi.h +++ b/include/curl/multi.h @@ -55,10 +55,10 @@ #include #else -#ifdef _AIX /* 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(NETWARE) #include #endif -- cgit v1.2.1 From c5f02c19862f9fa1ca5b0cb271b9a9be88abdf80 Mon Sep 17 00:00:00 2001 From: Daniel Stenberg Date: Mon, 22 Mar 2004 08:37:38 +0000 Subject: Introducing curl/curlver.h for keeping the curl version info only. --- include/curl/Makefile.am | 7 +----- include/curl/curl.h | 26 +---------------------- include/curl/curlver.h | 55 ++++++++++++++++++++++++++++++++++++++++++++++++ 3 files changed, 57 insertions(+), 31 deletions(-) create mode 100644 include/curl/curlver.h (limited to 'include') diff --git a/include/curl/Makefile.am b/include/curl/Makefile.am index c45332b0d..71a60916c 100644 --- a/include/curl/Makefile.am +++ b/include/curl/Makefile.am @@ -1,8 +1,3 @@ pkginclude_HEADERS = \ - curl.h \ - easy.h \ - mprintf.h \ - stdcheaders.h \ - types.h \ - multi.h + curl.h curlver.h easy.h mprintf.h stdcheaders.h types.h multi.h pkgincludedir= $(includedir)/curl diff --git a/include/curl/curl.h b/include/curl/curl.h index 0a3b32717..a81c915d6 100644 --- a/include/curl/curl.h +++ b/include/curl/curl.h @@ -27,31 +27,7 @@ http://curl.haxx.se/libcurl/ */ -/* This is the version number of the libcurl package from which this header - file origins: */ -#define LIBCURL_VERSION "7.11.0-CVS" - -/* This is the numeric version of the libcurl version number, meant for easier - parsing and comparions by programs. The LIBCURL_VERSION_NUM define will - always follow this syntax: - - 0xXXYYZZ - - Where XX, YY and ZZ are the main version, release and patch numbers in - hexadecimal. All three numbers are always represented using two digits. 1.2 - would appear as "0x010200" while version 9.11.7 appears as "0x090b07". - - This 6-digit hexadecimal number does not show pre-release number, 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 0x070b00 - -/* The numeric version number is also available "in parts" by using these - defines: */ -#define LIBCURL_VERSION_MAJOR 7 -#define LIBCURL_VERSION_MINOR 11 -#define LIBCURL_VERSION_PATCH 0 +#include "curlver.h" /* the libcurl version defines */ #include #include diff --git a/include/curl/curlver.h b/include/curl/curlver.h new file mode 100644 index 000000000..5bda9d703 --- /dev/null +++ b/include/curl/curlver.h @@ -0,0 +1,55 @@ +#ifndef __CURL_CURLVER_H +#define __CURL_CURLVER_H +/*************************************************************************** + * _ _ ____ _ + * Project ___| | | | _ \| | + * / __| | | | |_) | | + * | (__| |_| | _ <| |___ + * \___|\___/|_| \_\_____| + * + * Copyright (C) 1998 - 2004, 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 + * are also available at http://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 + * furnished to do so, under the terms of the COPYING file. + * + * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY + * KIND, either express or implied. + * + * $Id$ + ***************************************************************************/ + +/* 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 version number of the libcurl package from which this header + file origins: */ +#define LIBCURL_VERSION "7.11.0-CVS" + +/* This is the numeric version of the libcurl version number, meant for easier + parsing and comparions by programs. The LIBCURL_VERSION_NUM define will + always follow this syntax: + + 0xXXYYZZ + + Where XX, YY and ZZ are the main version, release and patch numbers in + hexadecimal. All three numbers are always represented using two digits. 1.2 + would appear as "0x010200" while version 9.11.7 appears as "0x090b07". + + This 6-digit hexadecimal number does not show pre-release number, 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 0x070b00 + +/* The numeric version number is also available "in parts" by using these + defines: */ +#define LIBCURL_VERSION_MAJOR 7 +#define LIBCURL_VERSION_MINOR 11 +#define LIBCURL_VERSION_PATCH 0 + +#endif /* __CURL_CURLVER_H */ -- cgit v1.2.1 From eab8cdc640a1c3b78c5626e197d0c45d093a39b2 Mon Sep 17 00:00:00 2001 From: Daniel Stenberg Date: Wed, 24 Mar 2004 22:53:42 +0000 Subject: Added protos for the upcoming curl_*_strerror() functions --- include/curl/curl.h | 23 ++++++++++++++++++++++- include/curl/multi.h | 11 +++++++++++ 2 files changed, 33 insertions(+), 1 deletion(-) (limited to 'include') diff --git a/include/curl/curl.h b/include/curl/curl.h index a81c915d6..abe384445 100644 --- a/include/curl/curl.h +++ b/include/curl/curl.h @@ -1066,7 +1066,6 @@ void curl_slist_free_all(struct curl_slist *); */ time_t curl_getdate(const char *p, const time_t *now); - #define CURLINFO_STRING 0x100000 #define CURLINFO_LONG 0x200000 #define CURLINFO_DOUBLE 0x300000 @@ -1242,6 +1241,28 @@ typedef struct { */ curl_version_info_data *curl_version_info(CURLversion); +/* + * NAME curl_easy_strerror() + * + * DESCRIPTION + * + * The curl_easy_strerror function may be used to turn a CURLcode value + * into the equivalent human readable error string. This is useful + * for printing meaningful error messages. + */ +const char *curl_easy_strerror(CURLcode); + +/* + * NAME curl_share_strerror() + * + * DESCRIPTION + * + * The curl_share_strerror function may be used to turn a CURLSHcode value + * into the equivalent human readable error string. This is useful + * for printing meaningful error messages. + */ +const char *curl_share_strerror(CURLSHcode); + #ifdef __cplusplus } #endif diff --git a/include/curl/multi.h b/include/curl/multi.h index b2d821826..3a867ab68 100644 --- a/include/curl/multi.h +++ b/include/curl/multi.h @@ -203,6 +203,17 @@ CURLMcode curl_multi_cleanup(CURLM *multi_handle); CURLMsg *curl_multi_info_read(CURLM *multi_handle, int *msgs_in_queue); +/* + * NAME curl_multi_strerror() + * + * DESCRIPTION + * + * The curl_multi_strerror function may be used to turn a CURLMcode value + * into the equivalent human readable error string. This is useful + * for printing meaningful error messages. + */ +const char *curl_multi_strerror(CURLMcode); + #ifdef __cplusplus } /* end of extern "C" */ #endif -- cgit v1.2.1 From 76e73cfec816e2c637ae0690ab9ca35e3191cfae Mon Sep 17 00:00:00 2001 From: Daniel Stenberg Date: Thu, 25 Mar 2004 11:34:35 +0000 Subject: make clean now removes *dist files too that might be leftovers from 'maketgz' --- include/curl/Makefile.am | 2 ++ 1 file changed, 2 insertions(+) (limited to 'include') diff --git a/include/curl/Makefile.am b/include/curl/Makefile.am index 71a60916c..347cf7ef9 100644 --- a/include/curl/Makefile.am +++ b/include/curl/Makefile.am @@ -1,3 +1,5 @@ pkginclude_HEADERS = \ curl.h curlver.h easy.h mprintf.h stdcheaders.h types.h multi.h pkgincludedir= $(includedir)/curl + +CLEANFILES = *dist -- cgit v1.2.1 From bb3d6e8552f428bd0c2624854403d36ab3cf163d Mon Sep 17 00:00:00 2001 From: Daniel Stenberg Date: Thu, 25 Mar 2004 13:37:18 +0000 Subject: tcp-nodelay patch by Joe Halpin --- include/curl/curl.h | 3 +++ 1 file changed, 3 insertions(+) (limited to 'include') diff --git a/include/curl/curl.h b/include/curl/curl.h index abe384445..766d4efc4 100644 --- a/include/curl/curl.h +++ b/include/curl/curl.h @@ -762,6 +762,9 @@ typedef enum { /* The _LARGE version of the standard POSTFIELDSIZE option */ CINIT(POSTFIELDSIZE_LARGE, OFF_T, 120), + /* Enable/disable the TCP Nagle algorithm */ + CINIT(TCP_NODELAY, LONG, 121), + CURLOPT_LASTENTRY /* the last unused */ } CURLoption; -- cgit v1.2.1 From 310086deed04a2a4151f422e10112397c7051a60 Mon Sep 17 00:00:00 2001 From: Daniel Stenberg Date: Wed, 31 Mar 2004 20:22:28 +0000 Subject: we're working on 7.11.2-CVS right now --- include/curl/curlver.h | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'include') diff --git a/include/curl/curlver.h b/include/curl/curlver.h index 5bda9d703..a8b10adc4 100644 --- a/include/curl/curlver.h +++ b/include/curl/curlver.h @@ -28,7 +28,7 @@ /* This is the version number of the libcurl package from which this header file origins: */ -#define LIBCURL_VERSION "7.11.0-CVS" +#define LIBCURL_VERSION "7.11.2-CVS" /* This is the numeric version of the libcurl version number, meant for easier parsing and comparions by programs. The LIBCURL_VERSION_NUM define will @@ -44,12 +44,12 @@ always a greater number in a more recent release. It makes comparisons with greater than and less than work. */ -#define LIBCURL_VERSION_NUM 0x070b00 +#define LIBCURL_VERSION_NUM 0x070b02 /* The numeric version number is also available "in parts" by using these defines: */ #define LIBCURL_VERSION_MAJOR 7 #define LIBCURL_VERSION_MINOR 11 -#define LIBCURL_VERSION_PATCH 0 +#define LIBCURL_VERSION_PATCH 2 #endif /* __CURL_CURLVER_H */ -- cgit v1.2.1 From b053ae6a65d2abf236c61d1ce831ff717f7c6602 Mon Sep 17 00:00:00 2001 From: Daniel Stenberg Date: Fri, 23 Apr 2004 06:29:41 +0000 Subject: define the obsolete options to different values to prevent "duplicate case" situtations in bindings that still have switch() cases for them --- include/curl/curl.h | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'include') diff --git a/include/curl/curl.h b/include/curl/curl.h index 766d4efc4..27030fc86 100644 --- a/include/curl/curl.h +++ b/include/curl/curl.h @@ -783,12 +783,12 @@ typedef enum { #ifndef CURL_NO_OLDIES /* define this to test if your app builds with all the obsolete stuff removed! */ -#define CURLOPT_HTTPREQUEST 0 +#define CURLOPT_HTTPREQUEST -1 #define CURLOPT_FTPASCII CURLOPT_TRANSFERTEXT -#define CURLOPT_MUTE 0 -#define CURLOPT_PASSWDFUNCTION 0 -#define CURLOPT_PASSWDDATA 0 -#define CURLOPT_CLOSEFUNCTION 0 +#define CURLOPT_MUTE -2 +#define CURLOPT_PASSWDFUNCTION -3 +#define CURLOPT_PASSWDDATA -4 +#define CURLOPT_CLOSEFUNCTION -5 #else /* This is set if CURL_NO_OLDIES is defined at compile-time */ -- cgit v1.2.1 From 496e81a25a27d71d97f66dde065be6ec597192f0 Mon Sep 17 00:00:00 2001 From: Daniel Stenberg Date: Mon, 26 Apr 2004 07:04:40 +0000 Subject: the next release is planned to become 7.12.0 --- include/curl/curl.h | 42 +++++++++++++++++++++++++----------------- include/curl/curlver.h | 8 ++++---- 2 files changed, 29 insertions(+), 21 deletions(-) (limited to 'include') diff --git a/include/curl/curl.h b/include/curl/curl.h index 27030fc86..123dfeefa 100644 --- a/include/curl/curl.h +++ b/include/curl/curl.h @@ -183,7 +183,7 @@ typedef enum { CURLE_UNSUPPORTED_PROTOCOL, /* 1 */ CURLE_FAILED_INIT, /* 2 */ CURLE_URL_MALFORMAT, /* 3 */ - CURLE_URL_MALFORMAT_USER, /* 4 */ + CURLE_URL_MALFORMAT_USER, /* 4 (NOT USED) */ CURLE_COULDNT_RESOLVE_PROXY, /* 5 */ CURLE_COULDNT_RESOLVE_HOST, /* 6 */ CURLE_COULDNT_CONNECT, /* 7 */ @@ -203,7 +203,7 @@ typedef enum { CURLE_FTP_QUOTE_ERROR, /* 21 */ CURLE_HTTP_RETURNED_ERROR, /* 22 */ CURLE_WRITE_ERROR, /* 23 */ - CURLE_MALFORMAT_USER, /* 24 - user name is illegally specified */ + CURLE_MALFORMAT_USER, /* 24 - NOT USED */ CURLE_FTP_COULDNT_STOR_FILE, /* 25 - failed FTP upload */ CURLE_READ_ERROR, /* 26 - could open/read from file */ CURLE_OUT_OF_MEMORY, /* 27 */ @@ -223,13 +223,13 @@ typedef enum { CURLE_FUNCTION_NOT_FOUND, /* 41 */ CURLE_ABORTED_BY_CALLBACK, /* 42 */ CURLE_BAD_FUNCTION_ARGUMENT, /* 43 */ - CURLE_BAD_CALLING_ORDER, /* 44 */ - CURLE_HTTP_PORT_FAILED, /* 45 - HTTP Interface operation failed */ - CURLE_BAD_PASSWORD_ENTERED, /* 46 - my_getpass() returns fail */ + CURLE_BAD_CALLING_ORDER, /* 44 - NOT USED */ + CURLE_INTERFACE_FAILED, /* 45 - CURLOPT_INTERFACE failed */ + CURLE_BAD_PASSWORD_ENTERED, /* 46 - NOT USED */ CURLE_TOO_MANY_REDIRECTS , /* 47 - catch endless re-direct loops */ CURLE_UNKNOWN_TELNET_OPTION, /* 48 - User specified an unknown option */ CURLE_TELNET_OPTION_SYNTAX , /* 49 - Malformed telnet option */ - CURLE_OBSOLETE, /* 50 - removed after 7.7.3 */ + CURLE_OBSOLETE, /* 50 - NOT USED */ CURLE_SSL_PEER_CERTIFICATE, /* 51 - peer's certificate wasn't ok */ CURLE_GOT_NOTHING, /* 52 - when this is a specific error */ CURLE_SSL_ENGINE_NOTFOUND, /* 53 - SSL crypto engine not found */ @@ -256,7 +256,10 @@ typedef CURLcode (*curl_ssl_ctx_callback)(CURL *curl, /* easy handle */ /* Make a spelling correction for the operation timed-out define */ #define CURLE_OPERATION_TIMEDOUT CURLE_OPERATION_TIMEOUTED + +/* backwards compatibility with older names */ #define CURLE_HTTP_NOT_FOUND CURLE_HTTP_RETURNED_ERROR +#define CURLE_HTTP_PORT_FAILED CURLE_INTERFACE_FAILED typedef enum { CURLPROXY_HTTP = 0, @@ -1196,6 +1199,7 @@ CURLSHcode curl_share_cleanup(CURLSH *); typedef enum { CURLVERSION_FIRST, CURLVERSION_SECOND, + CURLVERSION_THIRD, CURLVERSION_LAST /* never actually use this */ } CURLversion; @@ -1204,7 +1208,7 @@ typedef enum { meant to be a built-in version number for what kind of struct the caller expects. If the struct ever changes, we redfine the NOW to another enum from above. */ -#define CURLVERSION_NOW CURLVERSION_SECOND +#define CURLVERSION_NOW CURLVERSION_THIRD typedef struct { CURLversion age; /* age of the returned struct */ @@ -1221,18 +1225,22 @@ typedef struct { /* The fields below this were added in CURLVERSION_SECOND */ const char *ares; int ares_num; + + /* This field was aded in CURLVERSION_THIRD */ + char *libidn; } curl_version_info_data; -#define CURL_VERSION_IPV6 (1<<0) -#define CURL_VERSION_KERBEROS4 (1<<1) -#define CURL_VERSION_SSL (1<<2) -#define CURL_VERSION_LIBZ (1<<3) -#define CURL_VERSION_NTLM (1<<4) -#define CURL_VERSION_GSSNEGOTIATE (1<<5) -#define CURL_VERSION_DEBUG (1<<6) /* built with debug capabilities */ -#define CURL_VERSION_ASYNCHDNS (1<<7) -#define CURL_VERSION_SPNEGO (1<<8) -#define CURL_VERSION_LARGEFILE (1<<9) /* supports files bigger than 2GB */ +#define CURL_VERSION_IPV6 (1<<0) /* IPv6-enabled */ +#define CURL_VERSION_KERBEROS4 (1<<1) /* kerberos auth is supported */ +#define CURL_VERSION_SSL (1<<2) /* SSL options are present */ +#define CURL_VERSION_LIBZ (1<<3) /* libz features are present */ +#define CURL_VERSION_NTLM (1<<4) /* NTLM auth is supported */ +#define CURL_VERSION_GSSNEGOTIATE (1<<5) /* Negotiate auth support */ +#define CURL_VERSION_DEBUG (1<<6) /* built with debug capabilities */ +#define CURL_VERSION_ASYNCHDNS (1<<7) /* asynchronous dns resolves */ +#define CURL_VERSION_SPNEGO (1<<8) /* SPNEGO auth */ +#define CURL_VERSION_LARGEFILE (1<<9) /* supports files bigger than 2GB */ +#define CURL_VERSION_IDN (1<<10) /* International Domain Names support */ /* * NAME curl_version_info() diff --git a/include/curl/curlver.h b/include/curl/curlver.h index a8b10adc4..49a6a282a 100644 --- a/include/curl/curlver.h +++ b/include/curl/curlver.h @@ -28,7 +28,7 @@ /* This is the version number of the libcurl package from which this header file origins: */ -#define LIBCURL_VERSION "7.11.2-CVS" +#define LIBCURL_VERSION "7.12.0-CVS" /* This is the numeric version of the libcurl version number, meant for easier parsing and comparions by programs. The LIBCURL_VERSION_NUM define will @@ -44,12 +44,12 @@ always a greater number in a more recent release. It makes comparisons with greater than and less than work. */ -#define LIBCURL_VERSION_NUM 0x070b02 +#define LIBCURL_VERSION_NUM 0x070c00 /* The numeric version number is also available "in parts" by using these defines: */ #define LIBCURL_VERSION_MAJOR 7 -#define LIBCURL_VERSION_MINOR 11 -#define LIBCURL_VERSION_PATCH 2 +#define LIBCURL_VERSION_MINOR 12 +#define LIBCURL_VERSION_PATCH 0 #endif /* __CURL_CURLVER_H */ -- cgit v1.2.1 From ffc5fa3a2be787c8198eb68836a45c440876c1bd Mon Sep 17 00:00:00 2001 From: Daniel Stenberg Date: Mon, 26 Apr 2004 14:06:51 +0000 Subject: typedef CURL in the curl.h file instead of only having a single useful typedef in the separate types.h --- include/curl/curl.h | 2 +- include/curl/types.h | 29 +---------------------------- 2 files changed, 2 insertions(+), 29 deletions(-) (limited to 'include') diff --git a/include/curl/curl.h b/include/curl/curl.h index 123dfeefa..67d28c470 100644 --- a/include/curl/curl.h +++ b/include/curl/curl.h @@ -41,7 +41,7 @@ # include #endif /* defined (vms) */ -#include "types.h" +typedef void CURL; #ifdef __cplusplus extern "C" { diff --git a/include/curl/types.h b/include/curl/types.h index aaf9e9498..d37d6ae9e 100644 --- a/include/curl/types.h +++ b/include/curl/types.h @@ -1,28 +1 @@ -#ifndef __CURL_TYPES_H -#define __CURL_TYPES_H -/*************************************************************************** - * _ _ ____ _ - * Project ___| | | | _ \| | - * / __| | | | |_) | | - * | (__| |_| | _ <| |___ - * \___|\___/|_| \_\_____| - * - * Copyright (C) 1998 - 2004, 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 - * are also available at http://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 - * furnished to do so, under the terms of the COPYING file. - * - * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY - * KIND, either express or implied. - * - * $Id$ - ***************************************************************************/ -typedef void CURL; -typedef void CURLconnect; - -#endif /* __CURL_TYPES_H */ +/* not used */ -- cgit v1.2.1 From 34be9df773066bc0fe2bfa973bc6bc1984956a97 Mon Sep 17 00:00:00 2001 From: Daniel Stenberg Date: Fri, 30 Apr 2004 10:34:54 +0000 Subject: deprecated functions --- include/curl/curl.h | 11 +++-------- 1 file changed, 3 insertions(+), 8 deletions(-) (limited to 'include') diff --git a/include/curl/curl.h b/include/curl/curl.h index 67d28c470..cd9f6454a 100644 --- a/include/curl/curl.h +++ b/include/curl/curl.h @@ -848,13 +848,8 @@ typedef enum { #endif -/* These functions are in libcurl, they're here for portable reasons and they - are used by the 'curl' client. They really should be moved to some kind of - "portability library" since it has nothing to do with file transfers and - might be usable to other programs... - - NOTE: they return TRUE if the strings match *case insensitively*. - */ +/* curl_strequal() and curl_strnequal() are subject for removal in a future + libcurl, see lib/README.curlx for details */ extern int (curl_strequal)(const char *s1, const char *s2); extern int (curl_strnequal)(const char *s1, const char *s2, size_t n); @@ -970,7 +965,7 @@ void curl_formfree(struct curl_httppost *form); * DESCRIPTION * * Returns a malloc()'ed string that MUST be curl_free()ed after usage is - * complete. + * complete. DEPRECATED - see lib/README.curlx */ char *curl_getenv(const char *variable); -- cgit v1.2.1 From 2960d37d7172976dff3eb8953fb4ca5f17b4bc47 Mon Sep 17 00:00:00 2001 From: Daniel Stenberg Date: Tue, 4 May 2004 08:24:13 +0000 Subject: removed curl_formparse() from the library --- include/curl/curl.h | 8 -------- 1 file changed, 8 deletions(-) (limited to 'include') diff --git a/include/curl/curl.h b/include/curl/curl.h index cd9f6454a..a0ef1a3c6 100644 --- a/include/curl/curl.h +++ b/include/curl/curl.h @@ -795,7 +795,6 @@ typedef enum { #else /* This is set if CURL_NO_OLDIES is defined at compile-time */ -#define curl_formparse "curl_formparse is obsolete" #undef CURLOPT_DNS_USE_GLOBAL_CACHE /* soon obsolete */ #endif @@ -853,13 +852,6 @@ typedef enum { extern int (curl_strequal)(const char *s1, const char *s2); extern int (curl_strnequal)(const char *s1, const char *s2, size_t n); -#ifdef CURL_OLDSTYLE -/* DEPRECATED function to build formdata. Stop using this, it will cease - to exist. */ -int curl_formparse(char *, struct curl_httppost **, - struct curl_httppost **_post); -#endif - /* name is uppercase CURLFORM_ */ #ifdef CFINIT #undef CFINIT -- cgit v1.2.1 From bbafb2eb27954c34967f91c705e74cc0c186970d Mon Sep 17 00:00:00 2001 From: Daniel Stenberg Date: Tue, 11 May 2004 11:30:23 +0000 Subject: curl_global_init_mem() allows the memory functions to be replaced. memory.h is included everywhere for this. --- include/curl/curl.h | 32 ++++++++++++++++++++++++++++++++ 1 file changed, 32 insertions(+) (limited to 'include') diff --git a/include/curl/curl.h b/include/curl/curl.h index a0ef1a3c6..5f85ffff6 100644 --- a/include/curl/curl.h +++ b/include/curl/curl.h @@ -154,6 +154,18 @@ typedef int (*curl_passwd_callback)(void *clientp, char *buffer, int buflen); +/* + * The following typedef's are signatures of malloc, free, realloc, strdup and + * calloc respectively. Function pointers of these types can be passed to the + * curl_global_init_mem() function to set user defined memory management + * callback routines. + */ +typedef void *(*curl_malloc_callback)(size_t size); +typedef void (*curl_free_callback)(void *ptr); +typedef void *(*curl_realloc_callback)(void *ptr, size_t size); +typedef char *(*curl_strdup_callback)(const char *str); +typedef void *(*curl_calloc_callback)(size_t nmemb, size_t size); + /* the kind of data that is passed to information_callback*/ typedef enum { CURLINFO_TEXT = 0, @@ -1012,6 +1024,26 @@ void curl_free(void *p); */ CURLcode curl_global_init(long flags); +/* + * NAME curl_global_init_mem() + * + * DESCRIPTION + * + * curl_global_init() or curl_global_init_mem() should be invoked exactly once + * for each application that uses libcurl. This function can be used to + * initialize libcurl and set user defined memory management callback + * functions. Users can implement memory management routines to check for + * memory leaks, check for mis-use of the curl library etc. User registered + * callback routines with be invoked by this library instead of the system + * memory management routines like malloc, free etc. + */ +CURLcode curl_global_init_mem(long flags, + curl_malloc_callback m, + curl_free_callback f, + curl_realloc_callback r, + curl_strdup_callback s, + curl_calloc_callback c); + /* * NAME curl_global_cleanup() * -- cgit v1.2.1 From 0b0b37cffe7ce976970da34d517c55d10595ee59 Mon Sep 17 00:00:00 2001 From: Daniel Stenberg Date: Tue, 11 May 2004 14:22:51 +0000 Subject: make the libidn pointer in the version struct a const --- include/curl/curl.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'include') diff --git a/include/curl/curl.h b/include/curl/curl.h index 5f85ffff6..af0560f98 100644 --- a/include/curl/curl.h +++ b/include/curl/curl.h @@ -1246,7 +1246,7 @@ typedef struct { int ares_num; /* This field was aded in CURLVERSION_THIRD */ - char *libidn; + const char *libidn; } curl_version_info_data; #define CURL_VERSION_IPV6 (1<<0) /* IPv6-enabled */ -- cgit v1.2.1 From a5aa569fe3b70beff90dad38a472d23b377cfadf Mon Sep 17 00:00:00 2001 From: Daniel Stenberg Date: Fri, 14 May 2004 09:30:31 +0000 Subject: Added CURLSHE_NOMEM --- include/curl/curl.h | 1 + 1 file changed, 1 insertion(+) (limited to 'include') diff --git a/include/curl/curl.h b/include/curl/curl.h index af0560f98..a655bcdae 100644 --- a/include/curl/curl.h +++ b/include/curl/curl.h @@ -1193,6 +1193,7 @@ typedef enum { CURLSHE_BAD_OPTION, /* 1 */ CURLSHE_IN_USE, /* 2 */ CURLSHE_INVALID, /* 3 */ + CURLSHE_NOMEM, /* out of memory */ CURLSHE_LAST /* never use */ } CURLSHcode; -- cgit v1.2.1 From 83dcc3e06184d6d0a6fbe0ed363c323135c6c99d Mon Sep 17 00:00:00 2001 From: Daniel Stenberg Date: Mon, 24 May 2004 10:46:22 +0000 Subject: delete trailing whitespace --- include/curl/curl.h | 46 +++++++++++++++++++++++----------------------- 1 file changed, 23 insertions(+), 23 deletions(-) (limited to 'include') diff --git a/include/curl/curl.h b/include/curl/curl.h index a655bcdae..61dc14cff 100644 --- a/include/curl/curl.h +++ b/include/curl/curl.h @@ -1,10 +1,10 @@ #ifndef __CURL_CURL_H #define __CURL_CURL_H /*************************************************************************** - * _ _ ____ _ - * Project ___| | | | _ \| | - * / __| | | | |_) | | - * | (__| |_| | _ <| |___ + * _ _ ____ _ + * Project ___| | | | _ \| | + * / __| | | | |_) | | + * | (__| |_| | _ <| |___ * \___|\___/|_| \_\_____| * * Copyright (C) 1998 - 2004, Daniel Stenberg, , et al. @@ -12,7 +12,7 @@ * 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. - * + * * 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 * furnished to do so, under the terms of the COPYING file. @@ -182,7 +182,7 @@ typedef int (*curl_debug_callback) char *data, /* points to the data */ size_t size, /* size of the data pointed to */ void *userptr); /* whatever the user please */ - + /* All possible error codes from all sorts of curl functions. Future versions may return other values, stay prepared. @@ -256,7 +256,7 @@ typedef enum { CURLE_BAD_CONTENT_ENCODING, /* 61 - Unrecognized transfer encoding */ CURLE_LDAP_INVALID_URL, /* 62 - Invalid LDAP URL */ CURLE_FILESIZE_EXCEEDED, /* 63 - Maximum file size exceeded */ - CURLE_FTP_SSL_FAILED, /* 64 - Requested FTP SSL level failed */ + CURLE_FTP_SSL_FAILED, /* 64 - Requested FTP SSL level failed */ CURL_LAST /* never use! */ } CURLcode; @@ -364,7 +364,7 @@ typedef enum { /* Name of proxy to use. */ CINIT(PROXY, OBJECTPOINT, 4), - + /* "name:password" to use when fetching. */ CINIT(USERPWD, OBJECTPOINT, 5), @@ -421,7 +421,7 @@ typedef enum { /* If the download receives less than "low speed limit" bytes/second * during "low speed time" seconds, the operations is aborted. * You could i.e if you have a pretty high speed connection, abort if - * it is less than 2000 bytes/sec during 20 seconds. + * it is less than 2000 bytes/sec during 20 seconds. */ /* Set the "low speed limit" */ @@ -454,7 +454,7 @@ typedef enum { CINIT(SSLCERTPASSWD, OBJECTPOINT, 26), /* password for the SSL private key */ CINIT(SSLKEYPASSWD, OBJECTPOINT, 26), - + /* send TYPE parameter? */ CINIT(CRLF, LONG, 27), @@ -553,14 +553,14 @@ typedef enum { /* Set if we should verify the peer in ssl handshake, set 1 to verify. */ CINIT(SSL_VERIFYPEER, LONG, 64), - + /* The CApath or CAfile used to validate the peer certificate this option is used only if SSL_VERIFYPEER is true */ CINIT(CAINFO, OBJECTPOINT, 65), /* 66 = OBSOLETE */ /* 67 = OBSOLETE */ - + /* Maximum number of http redirects to follow */ CINIT(MAXREDIRS, LONG, 68), @@ -629,7 +629,7 @@ typedef enum { /* Specificly switch on or off the FTP engine's use of the EPSV command. By default, that one will always be attempted before the more traditional - PASV command. */ + PASV command. */ CINIT(FTP_USE_EPSV, LONG, 85), /* type of the file keeping your SSL-certificate ("DER", "PEM", "ENG") */ @@ -678,7 +678,7 @@ typedef enum { timeouts. This option is useful for multi-threaded applications. See libcurl-the-guide for more background information. */ CINIT(NOSIGNAL, LONG, 99), - + /* Provide a CURLShare for mutexing non-ts data */ CINIT(SHARE, OBJECTPOINT, 100), @@ -689,7 +689,7 @@ typedef enum { /* Set the Accept-Encoding string. Use this to tell a server you would like the response to be compressed. */ CINIT(ENCODING, OBJECTPOINT, 102), - + /* Set pointer to private data */ CINIT(PRIVATE, OBJECTPOINT, 103), @@ -703,7 +703,7 @@ typedef enum { /* Specificly switch on or off the FTP engine's use of the EPRT command ( it also disables the LPRT attempt). By default, those ones will always be - attempted before the good old traditional PORT command. */ + attempted before the good old traditional PORT command. */ CINIT(FTP_USE_EPRT, LONG, 106), /* Set this to a bitmask value to enable the particular authentications @@ -728,7 +728,7 @@ typedef enum { Note that setting multiple bits may cause extra network round-trips. */ CINIT(PROXYAUTH, LONG, 111), - /* FTP option that changes the timeout, in seconds, associated with + /* FTP option that changes the timeout, in seconds, associated with getting a response. This is different from transfer timeout time and essentially places a demand on the FTP server to acknowledge commands in a timely manner. */ @@ -793,7 +793,7 @@ typedef enum { /* three convenient "aliases" that follow the name scheme better */ #define CURLOPT_WRITEDATA CURLOPT_FILE -#define CURLOPT_READDATA CURLOPT_INFILE +#define CURLOPT_READDATA CURLOPT_INFILE #define CURLOPT_HEADERDATA CURLOPT_WRITEHEADER #ifndef CURL_NO_OLDIES /* define this to test if your app builds with all @@ -818,7 +818,7 @@ enum { for us! */ CURL_HTTP_VERSION_1_0, /* please use HTTP 1.0 in the request */ CURL_HTTP_VERSION_1_1, /* please use HTTP 1.1 in the request */ - + CURL_HTTP_VERSION_LAST /* *ILLEGAL* http version */ }; @@ -878,7 +878,7 @@ extern int (curl_strnequal)(const char *s1, const char *s2, size_t n); typedef enum { CFINIT(NOTHING), /********* the first one is unused ************/ - + /* */ CFINIT(COPYNAME), CFINIT(PTRNAME), @@ -914,7 +914,7 @@ struct curl_forms { /* use this for multipart formpost building */ /* Returns code for curl_formadd() - * + * * Returns: * CURL_FORMADD_OK on success * CURL_FORMADD_MEMORY if the FormInfo allocation fails @@ -1140,7 +1140,7 @@ typedef enum { CURLCLOSEPOLICY_LEAST_TRAFFIC, CURLCLOSEPOLICY_SLOWEST, CURLCLOSEPOLICY_CALLBACK, - + CURLCLOSEPOLICY_LAST /* last, never use this */ } curl_closepolicy; @@ -1162,7 +1162,7 @@ typedef enum { * the locking is just made to change the internal state of the share * itself. */ - CURL_LOCK_DATA_SHARE, + CURL_LOCK_DATA_SHARE, CURL_LOCK_DATA_COOKIE, CURL_LOCK_DATA_DNS, CURL_LOCK_DATA_SSL_SESSION, -- cgit v1.2.1 From 938a72b2dba019eb81d942fbe85cf401a7014d21 Mon Sep 17 00:00:00 2001 From: Daniel Stenberg Date: Wed, 2 Jun 2004 11:36:07 +0000 Subject: Gisle's adjustments to allow building with lcc-win32 --- include/curl/curl.h | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'include') diff --git a/include/curl/curl.h b/include/curl/curl.h index 61dc14cff..bf6a8f6c5 100644 --- a/include/curl/curl.h +++ b/include/curl/curl.h @@ -52,11 +52,11 @@ extern "C" { * platforms. We also provide a CURL_FORMAT_OFF_T define to use in *printf * format strings when outputting a variable of type curl_off_t. */ -#if defined(_MSC_VER) +#if defined(_MSC_VER) || defined(__LCC__) /* MSVC */ typedef signed __int64 curl_off_t; #define CURL_FORMAT_OFF_T "%I64d" -#else /* MSC_VER */ +#else /* _MSC_VER || __LCC__ */ #if (defined(__GNUC__) && defined(WIN32)) || defined(__WATCOMC__) /* gcc on windows or Watcom */ typedef long long curl_off_t; @@ -88,7 +88,7 @@ extern "C" { #define CURL_FORMAT_OFF_T "%ld" #endif #endif /* GCC or Watcom on Windows */ -#endif /* MSC_VER */ +#endif /* _MSC_VER || __LCC__ */ #ifdef UNDEF_FILE_OFFSET_BITS /* this was defined above for our checks, undefine it again */ @@ -327,7 +327,7 @@ typedef enum { * platforms. */ #if defined(__STDC__) || defined(_MSC_VER) || defined(__cplusplus) || \ - defined(__HP_aCC) || defined(__BORLANDC__) + defined(__HP_aCC) || defined(__BORLANDC__) || defined(__LCC__) /* This compiler is believed to have an ISO compatible preprocessor */ #define CURL_ISOCPP #else -- cgit v1.2.1 From fe07962f9c60fbb711ffd1cdafee8b6c326ddfda Mon Sep 17 00:00:00 2001 From: Daniel Stenberg Date: Wed, 2 Jun 2004 11:39:06 +0000 Subject: 7.12.1-CVS in progress --- include/curl/curlver.h | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) (limited to 'include') diff --git a/include/curl/curlver.h b/include/curl/curlver.h index 49a6a282a..fa2121280 100644 --- a/include/curl/curlver.h +++ b/include/curl/curlver.h @@ -1,10 +1,10 @@ #ifndef __CURL_CURLVER_H #define __CURL_CURLVER_H /*************************************************************************** - * _ _ ____ _ - * Project ___| | | | _ \| | - * / __| | | | |_) | | - * | (__| |_| | _ <| |___ + * _ _ ____ _ + * Project ___| | | | _ \| | + * / __| | | | |_) | | + * | (__| |_| | _ <| |___ * \___|\___/|_| \_\_____| * * Copyright (C) 1998 - 2004, Daniel Stenberg, , et al. @@ -12,7 +12,7 @@ * 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. - * + * * 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 * furnished to do so, under the terms of the COPYING file. @@ -28,7 +28,7 @@ /* This is the version number of the libcurl package from which this header file origins: */ -#define LIBCURL_VERSION "7.12.0-CVS" +#define LIBCURL_VERSION "7.12.1-CVS" /* This is the numeric version of the libcurl version number, meant for easier parsing and comparions by programs. The LIBCURL_VERSION_NUM define will @@ -44,12 +44,12 @@ always a greater number in a more recent release. It makes comparisons with greater than and less than work. */ -#define LIBCURL_VERSION_NUM 0x070c00 +#define LIBCURL_VERSION_NUM 0x070c01 /* The numeric version number is also available "in parts" by using these defines: */ #define LIBCURL_VERSION_MAJOR 7 #define LIBCURL_VERSION_MINOR 12 -#define LIBCURL_VERSION_PATCH 0 +#define LIBCURL_VERSION_PATCH 1 #endif /* __CURL_CURLVER_H */ -- cgit v1.2.1 From 3d38080d5458a4efe746d3920310e05c53a64842 Mon Sep 17 00:00:00 2001 From: Daniel Stenberg Date: Wed, 2 Jun 2004 13:51:36 +0000 Subject: *seven* new options to support 3rd party FTP transfers --- include/curl/curl.h | 30 +++++++++++++++++++++++++++++- 1 file changed, 29 insertions(+), 1 deletion(-) (limited to 'include') diff --git a/include/curl/curl.h b/include/curl/curl.h index bf6a8f6c5..ee10ce4a4 100644 --- a/include/curl/curl.h +++ b/include/curl/curl.h @@ -518,7 +518,7 @@ typedef enum { CINIT(FOLLOWLOCATION, LONG, 52), /* use Location: Luke! */ CINIT(TRANSFERTEXT, LONG, 53), /* transfer data in text/ASCII format */ - CINIT(PUT, LONG, 54), /* PUT the input file */ + CINIT(PUT, LONG, 54), /* HTTP PUT */ /* 55 = OBSOLETE */ @@ -780,6 +780,34 @@ typedef enum { /* Enable/disable the TCP Nagle algorithm */ CINIT(TCP_NODELAY, LONG, 121), + /* When doing 3rd party transfer, set the source host name with this */ + CINIT(SOURCE_HOST, OBJECTPOINT, 122), + + /* When doing 3rd party transfer, set the source user and password with + this */ + CINIT(SOURCE_USERPWD, OBJECTPOINT, 123), + + /* When doing 3rd party transfer, set the source file path with this */ + CINIT(SOURCE_PATH, OBJECTPOINT, 124), + + /* When doing 3rd party transfer, set the source server's port number + with this */ + CINIT(SOURCE_PORT, LONG, 125), + + /* When doing 3rd party transfer, decide which server that should get the + PASV command (and the other gets the PORT). + 0 (default) - The target host issues PASV. + 1 - The source host issues PASV */ + CINIT(PASV_HOST, LONG, 126), + + /* When doing 3rd party transfer, set the source pre-quote linked list + of commands with this */ + CINIT(SOURCE_PREQUOTE, OBJECTPOINT, 127), + + /* When doing 3rd party transfer, set the source post-quote linked list + of commands with this */ + CINIT(SOURCE_POSTQUOTE, OBJECTPOINT, 128), + CURLOPT_LASTENTRY /* the last unused */ } CURLoption; -- cgit v1.2.1 From d3454ceb94506010dcc4a069b67ff8e6bbc272cb Mon Sep 17 00:00:00 2001 From: Daniel Stenberg Date: Tue, 8 Jun 2004 14:13:50 +0000 Subject: Kjetil Jacobsen pointed out that the CURLOPT_FILETIME option was wrongly marked as accepting an objectpoint argument while it actually assumes a long. The comment was also grossly misleading. The man page was and is correct though. --- include/curl/curl.h | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'include') diff --git a/include/curl/curl.h b/include/curl/curl.h index ee10ce4a4..928e6aaec 100644 --- a/include/curl/curl.h +++ b/include/curl/curl.h @@ -564,9 +564,9 @@ typedef enum { /* Maximum number of http redirects to follow */ CINIT(MAXREDIRS, LONG, 68), - /* Pass a pointer to a time_t to get a possible date of the requested - document! Pass a NULL to shut it off. */ - CINIT(FILETIME, OBJECTPOINT, 69), + /* Pass a long set to 1 to get the date of the requested document (if + possible)! Pass a zero to shut it off. */ + CINIT(FILETIME, LONG, 69), /* This points to a linked list of telnet options */ CINIT(TELNETOPTIONS, OBJECTPOINT, 70), -- cgit v1.2.1 From 40a58c392ff7b70ed882d238b494ee43f5fe6577 Mon Sep 17 00:00:00 2001 From: Daniel Stenberg Date: Wed, 9 Jun 2004 08:21:11 +0000 Subject: Added CURL_FORMADD_DISABLED when libcurl is built with HTTP disabled --- include/curl/curl.h | 1 + 1 file changed, 1 insertion(+) (limited to 'include') diff --git a/include/curl/curl.h b/include/curl/curl.h index 928e6aaec..409256246 100644 --- a/include/curl/curl.h +++ b/include/curl/curl.h @@ -965,6 +965,7 @@ typedef enum { CURL_FORMADD_UNKNOWN_OPTION, CURL_FORMADD_INCOMPLETE, CURL_FORMADD_ILLEGAL_ARRAY, + CURL_FORMADD_DISABLED, /* libcurl was built with this disabled */ CURL_FORMADD_LAST /* last */ } CURLFORMcode; -- cgit v1.2.1 From bd3d5a17b49dfdb9029376961f429a21dd045af4 Mon Sep 17 00:00:00 2001 From: Daniel Stenberg Date: Fri, 18 Jun 2004 06:20:43 +0000 Subject: Gisle's "SSL patch" from June 16th 2004, modified by me as discussed on the mailing list. --- include/curl/curl.h | 2 ++ 1 file changed, 2 insertions(+) (limited to 'include') diff --git a/include/curl/curl.h b/include/curl/curl.h index 409256246..ef7129856 100644 --- a/include/curl/curl.h +++ b/include/curl/curl.h @@ -173,6 +173,8 @@ typedef enum { CURLINFO_HEADER_OUT, /* 2 */ CURLINFO_DATA_IN, /* 3 */ CURLINFO_DATA_OUT, /* 4 */ + CURLINFO_SSL_DATA_IN, /* 5 */ + CURLINFO_SSL_DATA_OUT, /* 6 */ CURLINFO_END } curl_infotype; -- cgit v1.2.1 From 8d2120566ec88eb01f1eb5b4e50115cff1e0b2e5 Mon Sep 17 00:00:00 2001 From: Daniel Stenberg Date: Mon, 21 Jun 2004 14:04:36 +0000 Subject: added CURL_READFUNC_ABORT --- include/curl/curl.h | 3 +++ 1 file changed, 3 insertions(+) (limited to 'include') diff --git a/include/curl/curl.h b/include/curl/curl.h index ef7129856..1407e889d 100644 --- a/include/curl/curl.h +++ b/include/curl/curl.h @@ -143,6 +143,9 @@ typedef size_t (*curl_write_callback)(char *buffer, size_t nitems, void *outstream); +/* This is a brand new return code for the read callback that will signal + the caller to immediately abort the current transfer. */ +#define CURL_READFUNC_ABORT 0x10000000 typedef size_t (*curl_read_callback)(char *buffer, size_t size, size_t nitems, -- cgit v1.2.1 From f508f30fb6c0d8b6f4e2058256e80c97bfda3a7b Mon Sep 17 00:00:00 2001 From: Daniel Stenberg Date: Sat, 24 Jul 2004 21:31:01 +0000 Subject: curl_easy_reset() added. Need testing and docs. I also think we should make the initial setting up the struct should use this single function to avoid having the initialisation code at two places. --- include/curl/easy.h | 23 ++++++++++++++++++----- 1 file changed, 18 insertions(+), 5 deletions(-) (limited to 'include') diff --git a/include/curl/easy.h b/include/curl/easy.h index ba51fc3bc..f09080768 100644 --- a/include/curl/easy.h +++ b/include/curl/easy.h @@ -1,10 +1,10 @@ #ifndef __CURL_EASY_H #define __CURL_EASY_H /*************************************************************************** - * _ _ ____ _ - * Project ___| | | | _ \| | - * / __| | | | |_) | | - * | (__| |_| | _ <| |___ + * _ _ ____ _ + * Project ___| | | | _ \| | + * / __| | | | |_) | | + * | (__| |_| | _ <| |___ * \___|\___/|_| \_\_____| * * Copyright (C) 1998 - 2004, Daniel Stenberg, , et al. @@ -12,7 +12,7 @@ * 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. - * + * * 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 * furnished to do so, under the terms of the COPYING file. @@ -61,6 +61,19 @@ CURLcode curl_easy_getinfo(CURL *curl, CURLINFO info, ...); */ CURL* curl_easy_duphandle(CURL *curl); +/* + * NAME curl_easy_reset() + * + * DESCRIPTION + * + * Re-initializes a CURL handle to the default values. This puts back the + * handle to the same state as it was in when it was just created. + * + * It does keep: live connections, the Session ID cache, the DNS cache and the + * cookies. + */ +CURL* curl_easy_duphandle(CURL *curl); + #ifdef __cplusplus } #endif -- cgit v1.2.1 From ca5e6160b791137b9f97b25fd0eac8c12e7f4b58 Mon Sep 17 00:00:00 2001 From: Daniel Stenberg Date: Thu, 29 Jul 2004 07:20:19 +0000 Subject: provide a curl_easy_reset() proto --- include/curl/easy.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'include') diff --git a/include/curl/easy.h b/include/curl/easy.h index f09080768..0ddf08dcb 100644 --- a/include/curl/easy.h +++ b/include/curl/easy.h @@ -72,7 +72,7 @@ CURL* curl_easy_duphandle(CURL *curl); * It does keep: live connections, the Session ID cache, the DNS cache and the * cookies. */ -CURL* curl_easy_duphandle(CURL *curl); +CURL* curl_easy_reset(CURL *curl); #ifdef __cplusplus } -- cgit v1.2.1 From 1d23affbc5bf0e38b7e11469f6f0378d0410d730 Mon Sep 17 00:00:00 2001 From: Daniel Stenberg Date: Thu, 29 Jul 2004 07:29:56 +0000 Subject: oops, curl_easy_reset is a void --- include/curl/easy.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'include') diff --git a/include/curl/easy.h b/include/curl/easy.h index 0ddf08dcb..336e542f8 100644 --- a/include/curl/easy.h +++ b/include/curl/easy.h @@ -72,7 +72,7 @@ CURL* curl_easy_duphandle(CURL *curl); * It does keep: live connections, the Session ID cache, the DNS cache and the * cookies. */ -CURL* curl_easy_reset(CURL *curl); +void curl_easy_reset(CURL *curl); #ifdef __cplusplus } -- cgit v1.2.1 From 99db7fb222f59d864a89ff8ce4f378ceb6a68c5d Mon Sep 17 00:00:00 2001 From: Daniel Stenberg Date: Tue, 10 Aug 2004 10:40:56 +0000 Subject: 7.12.2 work in progress --- include/curl/curlver.h | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'include') diff --git a/include/curl/curlver.h b/include/curl/curlver.h index fa2121280..7dd363fb8 100644 --- a/include/curl/curlver.h +++ b/include/curl/curlver.h @@ -28,7 +28,7 @@ /* This is the version number of the libcurl package from which this header file origins: */ -#define LIBCURL_VERSION "7.12.1-CVS" +#define LIBCURL_VERSION "7.12.2-CVS" /* This is the numeric version of the libcurl version number, meant for easier parsing and comparions by programs. The LIBCURL_VERSION_NUM define will @@ -44,12 +44,12 @@ always a greater number in a more recent release. It makes comparisons with greater than and less than work. */ -#define LIBCURL_VERSION_NUM 0x070c01 +#define LIBCURL_VERSION_NUM 0x070c02 /* The numeric version number is also available "in parts" by using these defines: */ #define LIBCURL_VERSION_MAJOR 7 #define LIBCURL_VERSION_MINOR 12 -#define LIBCURL_VERSION_PATCH 1 +#define LIBCURL_VERSION_PATCH 2 #endif /* __CURL_CURLVER_H */ -- cgit v1.2.1 From d0dcb3b554c0adef44b8677e0dc257d7ef05c44c Mon Sep 17 00:00:00 2001 From: Daniel Stenberg Date: Tue, 17 Aug 2004 19:46:34 +0000 Subject: removed trailing whitespace --- include/curl/multi.h | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) (limited to 'include') diff --git a/include/curl/multi.h b/include/curl/multi.h index 3a867ab68..37cf6b25a 100644 --- a/include/curl/multi.h +++ b/include/curl/multi.h @@ -1,10 +1,10 @@ #ifndef __CURL_MULTI_H #define __CURL_MULTI_H /*************************************************************************** - * _ _ ____ _ - * Project ___| | | | _ \| | - * / __| | | | |_) | | - * | (__| |_| | _ <| |___ + * _ _ ____ _ + * Project ___| | | | _ \| | + * / __| | | | |_) | | + * | (__| |_| | _ <| |___ * \___|\___/|_| \_\_____| * * Copyright (C) 1998 - 2004, Daniel Stenberg, , et al. @@ -12,7 +12,7 @@ * 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. - * + * * 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 * furnished to do so, under the terms of the COPYING file. @@ -43,7 +43,7 @@ o Enable the application to select() on its own file descriptors and curl's file descriptors simultaneous easily. - + */ #if defined(_WIN32) && !defined(WIN32) /* Chris Lewis mentioned that he doesn't get WIN32 defined, only _WIN32 so we @@ -217,5 +217,5 @@ const char *curl_multi_strerror(CURLMcode); #ifdef __cplusplus } /* end of extern "C" */ #endif - + #endif -- cgit v1.2.1 From 1faa9d6fd5a1d18f7181402959054f548389d91f Mon Sep 17 00:00:00 2001 From: Daniel Stenberg Date: Fri, 10 Sep 2004 21:46:58 +0000 Subject: minor indent change --- include/curl/curl.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'include') diff --git a/include/curl/curl.h b/include/curl/curl.h index 1407e889d..4da5f1aa1 100644 --- a/include/curl/curl.h +++ b/include/curl/curl.h @@ -941,8 +941,8 @@ typedef enum { /* structure to be used as parameter for CURLFORM_ARRAY */ struct curl_forms { - CURLformoption option; - const char *value; + CURLformoption option; + const char *value; }; /* use this for multipart formpost building */ -- cgit v1.2.1 From 6a06667cc0a6915510a7f3d789a0bcf470a9b7d8 Mon Sep 17 00:00:00 2001 From: Daniel Stenberg Date: Thu, 16 Sep 2004 21:45:16 +0000 Subject: Added CURLOPT_FTPSSLAUTH --- include/curl/curl.h | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) (limited to 'include') diff --git a/include/curl/curl.h b/include/curl/curl.h index 4da5f1aa1..767a833c8 100644 --- a/include/curl/curl.h +++ b/include/curl/curl.h @@ -303,6 +303,7 @@ typedef enum { #define CURL_ERROR_SIZE 256 +/* parameter for the CURLOPT_FTP_SSL option */ typedef enum { CURLFTPSSL_NONE, /* do not attempt to use SSL */ CURLFTPSSL_TRY, /* try using SSL, proceed anyway otherwise */ @@ -311,6 +312,14 @@ typedef enum { CURLFTPSSL_LAST /* not an option, never use */ } curl_ftpssl; +/* parameter for the CURLOPT_FTPSSLAUTH option */ +typedef enum { + CURLFTPAUTH_DEFAULT, /* let libcurl decide */ + CURLFTPAUTH_SSL, /* use "AUTH SSL" */ + CURLFTPAUTH_TLS, /* use "AUTH TLS" */ + CURLFTPAUTH_LAST /* not an option, never use */ +} curl_ftpauth; + /* long may be 32 or 64 bits, but we should never depend on anything else but 32 */ #define CURLOPTTYPE_LONG 0 @@ -813,6 +822,18 @@ typedef enum { of commands with this */ CINIT(SOURCE_POSTQUOTE, OBJECTPOINT, 128), + /* When FTP over SSL/TLS is selected (with CURLOPT_FTP_SSL), this option + can be used to change libcurl's default action which is to first try + "AUTH SSL" and then "AUTH TLS" in this order, and proceed when a OK + response has been received. + + Available parameters are: + CURLFTPAUTH_DEFAULT - let libcurl decide + CURLFTPAUTH_SSL - try "AUTH SSL" first, then TLS + CURLFTPAUTH_TLS - try "AUTH TLS" first, then SSL + */ + CINIT(FTPSSLAUTH, LONG, 129), + CURLOPT_LASTENTRY /* the last unused */ } CURLoption; -- cgit v1.2.1 From d4db35c1252a4986247c5ac6c1dbcffa38f8d356 Mon Sep 17 00:00:00 2001 From: Daniel Stenberg Date: Thu, 30 Sep 2004 19:50:36 +0000 Subject: =?UTF-8?q?G=FCnter=20Knauf=20and=20Casey=20O'Donnell=20worked=20o?= =?UTF-8?q?ut=20an=20extra=20#if=20condition=20for=20the=20curl/multi.h=20?= =?UTF-8?q?header=20to=20work=20better=20in=20winsock-using=20apps.?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- include/curl/multi.h | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'include') diff --git a/include/curl/multi.h b/include/curl/multi.h index 37cf6b25a..da9df2e15 100644 --- a/include/curl/multi.h +++ b/include/curl/multi.h @@ -52,7 +52,11 @@ #endif #if defined(WIN32) && !defined(__GNUC__) || 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 +#endif #else /* HP-UX systems version 9, 10 and 11 lack sys/select.h and so does oldish -- cgit v1.2.1 From be1cece69b2bc7b73c07166ec5e164fabdac1c95 Mon Sep 17 00:00:00 2001 From: Daniel Stenberg Date: Thu, 30 Sep 2004 21:01:23 +0000 Subject: - Larry Campbell added CURLINFO_OS_ERRNO to curl_easy_getinfo() that allows an app to retrieve the errno variable after a (connect) failure. It will make sense to provide this for more failures in a more generic way, but let's start like this. --- include/curl/curl.h | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'include') diff --git a/include/curl/curl.h b/include/curl/curl.h index 767a833c8..f6df95394 100644 --- a/include/curl/curl.h +++ b/include/curl/curl.h @@ -1178,9 +1178,10 @@ typedef enum { CURLINFO_HTTP_CONNECTCODE = CURLINFO_LONG + 22, CURLINFO_HTTPAUTH_AVAIL = CURLINFO_LONG + 23, CURLINFO_PROXYAUTH_AVAIL = CURLINFO_LONG + 24, + CURLINFO_OS_ERRNO = CURLINFO_LONG + 25, /* Fill in new entries below here! */ - CURLINFO_LASTONE = 23 + CURLINFO_LASTONE = 26 } CURLINFO; /* CURLINFO_RESPONSE_CODE is the new name for the option previously known as -- cgit v1.2.1 From 39af394a1c3ae1d8ac71ad263a7c524988702c2e Mon Sep 17 00:00:00 2001 From: Daniel Stenberg Date: Wed, 6 Oct 2004 07:50:18 +0000 Subject: removed tabs and trailing whitespace from source --- include/curl/curl.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'include') diff --git a/include/curl/curl.h b/include/curl/curl.h index f6df95394..210d0631c 100644 --- a/include/curl/curl.h +++ b/include/curl/curl.h @@ -246,7 +246,7 @@ typedef enum { CURLE_TOO_MANY_REDIRECTS , /* 47 - catch endless re-direct loops */ CURLE_UNKNOWN_TELNET_OPTION, /* 48 - User specified an unknown option */ CURLE_TELNET_OPTION_SYNTAX , /* 49 - Malformed telnet option */ - CURLE_OBSOLETE, /* 50 - NOT USED */ + CURLE_OBSOLETE, /* 50 - NOT USED */ CURLE_SSL_PEER_CERTIFICATE, /* 51 - peer's certificate wasn't ok */ CURLE_GOT_NOTHING, /* 52 - when this is a specific error */ CURLE_SSL_ENGINE_NOTFOUND, /* 53 - SSL crypto engine not found */ @@ -1178,7 +1178,7 @@ typedef enum { CURLINFO_HTTP_CONNECTCODE = CURLINFO_LONG + 22, CURLINFO_HTTPAUTH_AVAIL = CURLINFO_LONG + 23, CURLINFO_PROXYAUTH_AVAIL = CURLINFO_LONG + 24, - CURLINFO_OS_ERRNO = CURLINFO_LONG + 25, + CURLINFO_OS_ERRNO = CURLINFO_LONG + 25, /* Fill in new entries below here! */ CURLINFO_LASTONE = 26 -- cgit v1.2.1 From 48750d5fc7c718da690749e19e745f307feed599 Mon Sep 17 00:00:00 2001 From: Daniel Stenberg Date: Mon, 18 Oct 2004 08:42:44 +0000 Subject: start over on 7.12.3 --- include/curl/curlver.h | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'include') diff --git a/include/curl/curlver.h b/include/curl/curlver.h index 7dd363fb8..c95bd1123 100644 --- a/include/curl/curlver.h +++ b/include/curl/curlver.h @@ -28,7 +28,7 @@ /* This is the version number of the libcurl package from which this header file origins: */ -#define LIBCURL_VERSION "7.12.2-CVS" +#define LIBCURL_VERSION "7.12.3-CVS" /* This is the numeric version of the libcurl version number, meant for easier parsing and comparions by programs. The LIBCURL_VERSION_NUM define will @@ -44,12 +44,12 @@ always a greater number in a more recent release. It makes comparisons with greater than and less than work. */ -#define LIBCURL_VERSION_NUM 0x070c02 +#define LIBCURL_VERSION_NUM 0x070c03 /* The numeric version number is also available "in parts" by using these defines: */ #define LIBCURL_VERSION_MAJOR 7 #define LIBCURL_VERSION_MINOR 12 -#define LIBCURL_VERSION_PATCH 2 +#define LIBCURL_VERSION_PATCH 3 #endif /* __CURL_CURLVER_H */ -- cgit v1.2.1 From f4bef25b5eede9ea17f237ebae52c2f89cc211cd Mon Sep 17 00:00:00 2001 From: Daniel Stenberg Date: Tue, 19 Oct 2004 15:30:08 +0000 Subject: CURLINFO_NUM_CONNECTS and more --- include/curl/curl.h | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'include') diff --git a/include/curl/curl.h b/include/curl/curl.h index 210d0631c..c631fc119 100644 --- a/include/curl/curl.h +++ b/include/curl/curl.h @@ -1179,9 +1179,10 @@ typedef enum { CURLINFO_HTTPAUTH_AVAIL = CURLINFO_LONG + 23, CURLINFO_PROXYAUTH_AVAIL = CURLINFO_LONG + 24, CURLINFO_OS_ERRNO = CURLINFO_LONG + 25, + CURLINFO_NUM_CONNECTS = CURLINFO_LONG + 26, /* Fill in new entries below here! */ - CURLINFO_LASTONE = 26 + CURLINFO_LASTONE = 27 } CURLINFO; /* CURLINFO_RESPONSE_CODE is the new name for the option previously known as -- cgit v1.2.1 From 24d47a6e07304cf0921f2d30734b3c64360773c3 Mon Sep 17 00:00:00 2001 From: Daniel Stenberg Date: Tue, 2 Nov 2004 10:12:22 +0000 Subject: Paul Nolan fix to make libcurl build nicely on Windows CE --- include/curl/curl.h | 6 ++++++ include/curl/multi.h | 3 ++- 2 files changed, 8 insertions(+), 1 deletion(-) (limited to 'include') diff --git a/include/curl/curl.h b/include/curl/curl.h index c631fc119..ca2c78eb3 100644 --- a/include/curl/curl.h +++ b/include/curl/curl.h @@ -52,10 +52,16 @@ extern "C" { * platforms. We also provide a CURL_FORMAT_OFF_T define to use in *printf * format strings when outputting a variable of type curl_off_t. */ + #if defined(_MSC_VER) || defined(__LCC__) /* MSVC */ +#ifdef _WIN32_WCE + typedef long curl_off_t; +#define CURL_FORMAT_OFF_T "%ld" +#else typedef signed __int64 curl_off_t; #define CURL_FORMAT_OFF_T "%I64d" +#endif #else /* _MSC_VER || __LCC__ */ #if (defined(__GNUC__) && defined(WIN32)) || defined(__WATCOMC__) /* gcc on windows or Watcom */ diff --git a/include/curl/multi.h b/include/curl/multi.h index da9df2e15..65b672d2c 100644 --- a/include/curl/multi.h +++ b/include/curl/multi.h @@ -51,7 +51,8 @@ #define WIN32 1 #endif -#if defined(WIN32) && !defined(__GNUC__) || defined(__MINGW32__) +#if defined(WIN32) && !defined(_WIN32_WCE) && !defined(__GNUC__) || \ + 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 */ -- cgit v1.2.1 From 3ccbed1022b8f0fb00e80564870e7f5aa0120a2a Mon Sep 17 00:00:00 2001 From: Gisle Vanem Date: Tue, 9 Nov 2004 14:02:58 +0000 Subject: Changes for removing libcurl.def file on Win32. Mark public functions with "CURL_EXTERN". --- include/curl/curl.h | 72 ++++++++++++++++++++++++++++++-------------------- include/curl/easy.h | 14 +++++----- include/curl/mprintf.h | 31 +++++++++++----------- include/curl/multi.h | 32 +++++++++++----------- 4 files changed, 83 insertions(+), 66 deletions(-) (limited to 'include') diff --git a/include/curl/curl.h b/include/curl/curl.h index ca2c78eb3..3015ad795 100644 --- a/include/curl/curl.h +++ b/include/curl/curl.h @@ -47,6 +47,21 @@ typedef void CURL; extern "C" { #endif +/* + * Decorate exportable functions for Win32 and Netware DLL linking. + * This avoids using a .def file for building libcurl.dll. + */ +#if (defined(WIN32) || defined(_WIN32) || defined(NETWARE)) && \ + !defined(CURL_STATICLIB) +#if defined(BUILDING_LIBCURL) +#define CURL_EXTERN __declspec(dllexport) +#else +#define CURL_EXTERN __declspec(dllimport) +#endif +#else +#define CURL_EXTERN +#endif + /* * We want the typedef curl_off_t setup for large file support on all * platforms. We also provide a CURL_FORMAT_OFF_T define to use in *printf @@ -921,8 +936,8 @@ typedef enum { /* curl_strequal() and curl_strnequal() are subject for removal in a future libcurl, see lib/README.curlx for details */ -extern int (curl_strequal)(const char *s1, const char *s2); -extern int (curl_strnequal)(const char *s1, const char *s2, size_t n); +CURL_EXTERN int (curl_strequal)(const char *s1, const char *s2); +CURL_EXTERN int (curl_strnequal)(const char *s1, const char *s2, size_t n); /* name is uppercase CURLFORM_ */ #ifdef CFINIT @@ -1011,9 +1026,9 @@ typedef enum { * adds one part that together construct a full post. Then use * CURLOPT_HTTPPOST to send it off to libcurl. */ -CURLFORMcode curl_formadd(struct curl_httppost **httppost, - struct curl_httppost **last_post, - ...); +CURL_EXTERN CURLFORMcode curl_formadd(struct curl_httppost **httppost, + struct curl_httppost **last_post, + ...); /* * NAME curl_formfree() @@ -1022,7 +1037,7 @@ CURLFORMcode curl_formadd(struct curl_httppost **httppost, * * Free a multipart formpost previously built with curl_formadd(). */ -void curl_formfree(struct curl_httppost *form); +CURL_EXTERN void curl_formfree(struct curl_httppost *form); /* * NAME curl_getenv() @@ -1032,7 +1047,7 @@ void curl_formfree(struct curl_httppost *form); * Returns a malloc()'ed string that MUST be curl_free()ed after usage is * complete. DEPRECATED - see lib/README.curlx */ -char *curl_getenv(const char *variable); +CURL_EXTERN char *curl_getenv(const char *variable); /* * NAME curl_version() @@ -1041,7 +1056,7 @@ char *curl_getenv(const char *variable); * * Returns a static ascii string of the libcurl version. */ -char *curl_version(void); +CURL_EXTERN char *curl_version(void); /* * NAME curl_escape() @@ -1052,7 +1067,7 @@ char *curl_version(void); * %XX versions). This function returns a new allocated string or NULL if an * error occurred. */ -char *curl_escape(const char *string, int length); +CURL_EXTERN char *curl_escape(const char *string, int length); /* * NAME curl_unescape() @@ -1063,7 +1078,7 @@ char *curl_escape(const char *string, int length); * versions). This function returns a new allocated string or NULL if an error * occurred. */ -char *curl_unescape(const char *string, int length); +CURL_EXTERN char *curl_unescape(const char *string, int length); /* * NAME curl_free() @@ -1073,7 +1088,7 @@ char *curl_unescape(const char *string, int length); * Provided for de-allocation in the same translation unit that did the * allocation. Added in libcurl 7.10 */ -void curl_free(void *p); +CURL_EXTERN void curl_free(void *p); /* * NAME curl_global_init() @@ -1083,7 +1098,7 @@ void curl_free(void *p); * curl_global_init() should be invoked exactly once for each application that * uses libcurl */ -CURLcode curl_global_init(long flags); +CURL_EXTERN CURLcode curl_global_init(long flags); /* * NAME curl_global_init_mem() @@ -1098,12 +1113,12 @@ CURLcode curl_global_init(long flags); * callback routines with be invoked by this library instead of the system * memory management routines like malloc, free etc. */ -CURLcode curl_global_init_mem(long flags, - curl_malloc_callback m, - curl_free_callback f, - curl_realloc_callback r, - curl_strdup_callback s, - curl_calloc_callback c); +CURL_EXTERN CURLcode curl_global_init_mem(long flags, + curl_malloc_callback m, + curl_free_callback f, + curl_realloc_callback r, + curl_strdup_callback s, + curl_calloc_callback c); /* * NAME curl_global_cleanup() @@ -1113,7 +1128,7 @@ CURLcode curl_global_init_mem(long flags, * curl_global_cleanup() should be invoked exactly once for each application * that uses libcurl */ -void curl_global_cleanup(void); +CURL_EXTERN void curl_global_cleanup(void); /* linked-list structure for the CURLOPT_QUOTE option (and other) */ struct curl_slist { @@ -1129,7 +1144,8 @@ struct curl_slist { * Appends a string to a linked list. If no list exists, it will be created * first. Returns the new list, after appending. */ -struct curl_slist *curl_slist_append(struct curl_slist *, const char *); +CURL_EXTERN struct curl_slist *curl_slist_append(struct curl_slist *, + const char *); /* * NAME curl_slist_free_all() @@ -1138,7 +1154,7 @@ struct curl_slist *curl_slist_append(struct curl_slist *, const char *); * * free a previously built curl_slist. */ -void curl_slist_free_all(struct curl_slist *); +CURL_EXTERN void curl_slist_free_all(struct curl_slist *); /* * NAME curl_getdate() @@ -1150,7 +1166,7 @@ void curl_slist_free_all(struct curl_slist *); * where the specified time is relative now, like 'two weeks' or 'tomorrow' * etc. */ -time_t curl_getdate(const char *p, const time_t *now); +CURL_EXTERN time_t curl_getdate(const char *p, const time_t *now); #define CURLINFO_STRING 0x100000 #define CURLINFO_LONG 0x200000 @@ -1271,9 +1287,9 @@ typedef enum { CURLSHOPT_LAST /* never use */ } CURLSHoption; -CURLSH *curl_share_init(void); -CURLSHcode curl_share_setopt(CURLSH *, CURLSHoption option, ...); -CURLSHcode curl_share_cleanup(CURLSH *); +CURL_EXTERN CURLSH *curl_share_init(void); +CURL_EXTERN CURLSHcode curl_share_setopt(CURLSH *, CURLSHoption option, ...); +CURL_EXTERN CURLSHcode curl_share_cleanup(CURLSH *); /**************************************************************************** * Structures for querying information about the curl library at runtime. @@ -1333,7 +1349,7 @@ typedef struct { * This function returns a pointer to a static copy of the version info * struct. See above. */ -curl_version_info_data *curl_version_info(CURLversion); +CURL_EXTERN curl_version_info_data *curl_version_info(CURLversion); /* * NAME curl_easy_strerror() @@ -1344,7 +1360,7 @@ curl_version_info_data *curl_version_info(CURLversion); * into the equivalent human readable error string. This is useful * for printing meaningful error messages. */ -const char *curl_easy_strerror(CURLcode); +CURL_EXTERN const char *curl_easy_strerror(CURLcode); /* * NAME curl_share_strerror() @@ -1355,7 +1371,7 @@ const char *curl_easy_strerror(CURLcode); * into the equivalent human readable error string. This is useful * for printing meaningful error messages. */ -const char *curl_share_strerror(CURLSHcode); +CURL_EXTERN const char *curl_share_strerror(CURLSHcode); #ifdef __cplusplus } diff --git a/include/curl/easy.h b/include/curl/easy.h index 336e542f8..17de21070 100644 --- a/include/curl/easy.h +++ b/include/curl/easy.h @@ -26,10 +26,10 @@ extern "C" { #endif -CURL *curl_easy_init(void); -CURLcode curl_easy_setopt(CURL *curl, CURLoption option, ...); -CURLcode curl_easy_perform(CURL *curl); -void curl_easy_cleanup(CURL *curl); +CURL_EXTERN CURL *curl_easy_init(void); +CURL_EXTERN CURLcode curl_easy_setopt(CURL *curl, CURLoption option, ...); +CURL_EXTERN CURLcode curl_easy_perform(CURL *curl); +CURL_EXTERN void curl_easy_cleanup(CURL *curl); /* * NAME curl_easy_getinfo() @@ -44,7 +44,7 @@ void curl_easy_cleanup(CURL *curl); * performed transfer, all results from this function are undefined until the * transfer is completed. */ -CURLcode curl_easy_getinfo(CURL *curl, CURLINFO info, ...); +CURL_EXTERN CURLcode curl_easy_getinfo(CURL *curl, CURLINFO info, ...); /* @@ -59,7 +59,7 @@ CURLcode curl_easy_getinfo(CURL *curl, CURLINFO info, ...); * curl_easy_duphandle() for each new thread to avoid a series of identical * curl_easy_setopt() invokes in every thread. */ -CURL* curl_easy_duphandle(CURL *curl); +CURL_EXTERN CURL* curl_easy_duphandle(CURL *curl); /* * NAME curl_easy_reset() @@ -72,7 +72,7 @@ CURL* curl_easy_duphandle(CURL *curl); * It does keep: live connections, the Session ID cache, the DNS cache and the * cookies. */ -void curl_easy_reset(CURL *curl); +CURL_EXTERN void curl_easy_reset(CURL *curl); #ifdef __cplusplus } diff --git a/include/curl/mprintf.h b/include/curl/mprintf.h index 65dc11442..b85a4789c 100644 --- a/include/curl/mprintf.h +++ b/include/curl/mprintf.h @@ -1,8 +1,8 @@ /*************************************************************************** - * _ _ ____ _ - * Project ___| | | | _ \| | - * / __| | | | |_) | | - * | (__| |_| | _ <| |___ + * _ _ ____ _ + * Project ___| | | | _ \| | + * / __| | | | |_) | | + * | (__| |_| | _ <| |___ * \___|\___/|_| \_\_____| * * Copyright (C) 1998 - 2004, Daniel Stenberg, , et al. @@ -10,7 +10,7 @@ * 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. - * + * * 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 * furnished to do so, under the terms of the COPYING file. @@ -26,17 +26,18 @@ #include #include /* needed for FILE */ +#include -int curl_mprintf(const char *format, ...); -int curl_mfprintf(FILE *fd, const char *format, ...); -int curl_msprintf(char *buffer, const char *format, ...); -int curl_msnprintf(char *buffer, size_t maxlength, const char *format, ...); -int curl_mvprintf(const char *format, va_list args); -int curl_mvfprintf(FILE *fd, const char *format, va_list args); -int curl_mvsprintf(char *buffer, const char *format, va_list args); -int curl_mvsnprintf(char *buffer, size_t maxlength, const char *format, va_list args); -char *curl_maprintf(const char *format, ...); -char *curl_mvaprintf(const char *format, va_list args); +CURL_EXTERN int curl_mprintf(const char *format, ...); +CURL_EXTERN int curl_mfprintf(FILE *fd, const char *format, ...); +CURL_EXTERN int curl_msprintf(char *buffer, const char *format, ...); +CURL_EXTERN int curl_msnprintf(char *buffer, size_t maxlength, const char *format, ...); +CURL_EXTERN int curl_mvprintf(const char *format, va_list args); +CURL_EXTERN int curl_mvfprintf(FILE *fd, const char *format, va_list args); +CURL_EXTERN int curl_mvsprintf(char *buffer, const char *format, va_list args); +CURL_EXTERN int curl_mvsnprintf(char *buffer, size_t maxlength, const char *format, va_list args); +CURL_EXTERN char *curl_maprintf(const char *format, ...); +CURL_EXTERN char *curl_mvaprintf(const char *format, va_list args); #ifdef _MPRINTF_REPLACE # define printf curl_mprintf diff --git a/include/curl/multi.h b/include/curl/multi.h index 65b672d2c..1e6fc3cc5 100644 --- a/include/curl/multi.h +++ b/include/curl/multi.h @@ -113,7 +113,7 @@ typedef struct CURLMsg CURLMsg; * Desc: inititalize multi-style curl usage * Returns: a new CURLM handle to use in all 'curl_multi' functions. */ -CURLM *curl_multi_init(void); +CURL_EXTERN CURLM *curl_multi_init(void); /* * Name: curl_multi_add_handle() @@ -121,8 +121,8 @@ CURLM *curl_multi_init(void); * Desc: add a standard curl handle to the multi stack * Returns: CURLMcode type, general multi error code. */ -CURLMcode curl_multi_add_handle(CURLM *multi_handle, - CURL *curl_handle); +CURL_EXTERN CURLMcode curl_multi_add_handle(CURLM *multi_handle, + CURL *curl_handle); /* * Name: curl_multi_remove_handle() @@ -130,8 +130,8 @@ CURLMcode curl_multi_add_handle(CURLM *multi_handle, * Desc: removes a curl handle from the multi stack again * Returns: CURLMcode type, general multi error code. */ -CURLMcode curl_multi_remove_handle(CURLM *multi_handle, - CURL *curl_handle); +CURL_EXTERN CURLMcode curl_multi_remove_handle(CURLM *multi_handle, + CURL *curl_handle); /* * Name: curl_multi_fdset() @@ -141,11 +141,11 @@ CURLMcode curl_multi_remove_handle(CURLM *multi_handle, * them are ready. * Returns: CURLMcode type, general multi error code. */ -CURLMcode curl_multi_fdset(CURLM *multi_handle, - fd_set *read_fd_set, - fd_set *write_fd_set, - fd_set *exc_fd_set, - int *max_fd); +CURL_EXTERN CURLMcode curl_multi_fdset(CURLM *multi_handle, + fd_set *read_fd_set, + fd_set *write_fd_set, + fd_set *exc_fd_set, + int *max_fd); /* * Name: curl_multi_perform() @@ -163,8 +163,8 @@ CURLMcode curl_multi_fdset(CURLM *multi_handle, * still have occurred problems on invidual transfers even when this * returns OK. */ -CURLMcode curl_multi_perform(CURLM *multi_handle, - int *running_handles); +CURL_EXTERN CURLMcode curl_multi_perform(CURLM *multi_handle, + int *running_handles); /* * Name: curl_multi_cleanup() @@ -175,7 +175,7 @@ CURLMcode curl_multi_perform(CURLM *multi_handle, * in the middle of a transfer. * Returns: CURLMcode type, general multi error code. */ -CURLMcode curl_multi_cleanup(CURLM *multi_handle); +CURL_EXTERN CURLMcode curl_multi_cleanup(CURLM *multi_handle); /* * Name: curl_multi_info_read() @@ -205,8 +205,8 @@ CURLMcode curl_multi_cleanup(CURLM *multi_handle); * queue (after this read) in the integer the second argument points * to. */ -CURLMsg *curl_multi_info_read(CURLM *multi_handle, - int *msgs_in_queue); +CURL_EXTERN CURLMsg *curl_multi_info_read(CURLM *multi_handle, + int *msgs_in_queue); /* * NAME curl_multi_strerror() @@ -217,7 +217,7 @@ CURLMsg *curl_multi_info_read(CURLM *multi_handle, * into the equivalent human readable error string. This is useful * for printing meaningful error messages. */ -const char *curl_multi_strerror(CURLMcode); +CURL_EXTERN const char *curl_multi_strerror(CURLMcode); #ifdef __cplusplus } /* end of extern "C" */ -- cgit v1.2.1 From 8ef8e949bd07a72918565f4482f8250a55a2f2dc Mon Sep 17 00:00:00 2001 From: Daniel Stenberg Date: Thu, 11 Nov 2004 08:03:43 +0000 Subject: fix curl.h include --- include/curl/mprintf.h | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'include') diff --git a/include/curl/mprintf.h b/include/curl/mprintf.h index b85a4789c..8559b1867 100644 --- a/include/curl/mprintf.h +++ b/include/curl/mprintf.h @@ -26,7 +26,8 @@ #include #include /* needed for FILE */ -#include + +#include "curl.h" CURL_EXTERN int curl_mprintf(const char *format, ...); CURL_EXTERN int curl_mfprintf(FILE *fd, const char *format, ...); -- cgit v1.2.1 From 98a8103a3b1e58d1493249805ffa4fa1cc1abc81 Mon Sep 17 00:00:00 2001 From: Gisle Vanem Date: Fri, 12 Nov 2004 11:45:05 +0000 Subject: Netware target (hosted on Linux gcc) doesn't support or need __declspec. --- include/curl/curl.h | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'include') diff --git a/include/curl/curl.h b/include/curl/curl.h index 3015ad795..772fb6087 100644 --- a/include/curl/curl.h +++ b/include/curl/curl.h @@ -51,8 +51,7 @@ extern "C" { * Decorate exportable functions for Win32 and Netware DLL linking. * This avoids using a .def file for building libcurl.dll. */ -#if (defined(WIN32) || defined(_WIN32) || defined(NETWARE)) && \ - !defined(CURL_STATICLIB) +#if (defined(WIN32) || defined(_WIN32)) && !defined(CURL_STATICLIB) #if defined(BUILDING_LIBCURL) #define CURL_EXTERN __declspec(dllexport) #else -- cgit v1.2.1 From 7ec200f4d1f8c3816c0eaa489b45eeec3f56ccbf Mon Sep 17 00:00:00 2001 From: Gisle Vanem Date: Sat, 13 Nov 2004 16:54:26 +0000 Subject: Update comment. --- include/curl/curl.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'include') diff --git a/include/curl/curl.h b/include/curl/curl.h index 772fb6087..393916020 100644 --- a/include/curl/curl.h +++ b/include/curl/curl.h @@ -48,7 +48,7 @@ extern "C" { #endif /* - * Decorate exportable functions for Win32 and Netware DLL linking. + * Decorate exportable functions for Win32 DLL linking. * This avoids using a .def file for building libcurl.dll. */ #if (defined(WIN32) || defined(_WIN32)) && !defined(CURL_STATICLIB) -- cgit v1.2.1 From 3e1caa61859a6057a65eb7c1585d47e05026c4f2 Mon Sep 17 00:00:00 2001 From: Daniel Stenberg Date: Wed, 24 Nov 2004 16:11:35 +0000 Subject: HTTP "auth done right". See lib/README.httpauth --- include/curl/curl.h | 36 ++++++++++++++++++++++++++++++------ 1 file changed, 30 insertions(+), 6 deletions(-) (limited to 'include') diff --git a/include/curl/curl.h b/include/curl/curl.h index 393916020..820d2a7a0 100644 --- a/include/curl/curl.h +++ b/include/curl/curl.h @@ -163,19 +163,39 @@ typedef size_t (*curl_write_callback)(char *buffer, size_t nitems, void *outstream); -/* This is a brand new return code for the read callback that will signal - the caller to immediately abort the current transfer. */ +/* 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 typedef size_t (*curl_read_callback)(char *buffer, - size_t size, - size_t nitems, - void *instream); + size_t size, + size_t nitems, + void *instream); + +#ifndef CURL_NO_OLDIES /* not used since 7.10.8, will be removed in a future release */ typedef int (*curl_passwd_callback)(void *clientp, const char *prompt, char *buffer, int buflen); +#endif + +typedef enum { + CURLIOE_OK, /* I/O operation successful */ + CURLIOE_UNKNOWNCMD, /* command was unknown to callback */ + CURLIOE_FAILRESTART, /* failed to restart the read */ + CURLIOE_LAST /* never use */ +} curlioerr; + +typedef enum { + CURLIOCMD_NOP, /* no operation */ + CURLIOCMD_RESTARTREAD, /* restart the read stream from start */ + CURLIOCMD_LAST /* never use */ +} curliocmd; + +typedef curlioerr (*curl_ioctl_callback)(CURL *handle, + int cmd, + void *clientp); /* * The following typedef's are signatures of malloc, free, realloc, strdup and @@ -282,7 +302,8 @@ typedef enum { CURLE_LDAP_INVALID_URL, /* 62 - Invalid LDAP URL */ CURLE_FILESIZE_EXCEEDED, /* 63 - Maximum file size exceeded */ CURLE_FTP_SSL_FAILED, /* 64 - Requested FTP SSL level failed */ - + CURLE_SEND_FAIL_REWIND, /* 65 - Sending the data requires a rewind + that failed */ CURL_LAST /* never use! */ } CURLcode; @@ -854,6 +875,9 @@ typedef enum { */ CINIT(FTPSSLAUTH, LONG, 129), + CINIT(IOCTLFUNCTION, FUNCTIONPOINT, 130), + CINIT(IOCTLDATA, OBJECTPOINT, 131), + CURLOPT_LASTENTRY /* the last unused */ } CURLoption; -- cgit v1.2.1 From 976285ccbcf956c3314e30e35724276b1ccc8e47 Mon Sep 17 00:00:00 2001 From: Daniel Stenberg Date: Sat, 11 Dec 2004 22:17:47 +0000 Subject: undef more obsolete defines if CURL_NO_OLDIES is defined --- include/curl/curl.h | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) (limited to 'include') diff --git a/include/curl/curl.h b/include/curl/curl.h index 820d2a7a0..09e113d77 100644 --- a/include/curl/curl.h +++ b/include/curl/curl.h @@ -315,9 +315,12 @@ typedef CURLcode (*curl_ssl_ctx_callback)(CURL *curl, /* easy handle */ /* Make a spelling correction for the operation timed-out define */ #define CURLE_OPERATION_TIMEDOUT CURLE_OPERATION_TIMEOUTED +#ifndef CURL_NO_OLDIES /* define this to test if your app builds with all + the obsolete stuff removed! */ /* backwards compatibility with older names */ #define CURLE_HTTP_NOT_FOUND CURLE_HTTP_RETURNED_ERROR #define CURLE_HTTP_PORT_FAILED CURLE_INTERFACE_FAILED +#endif typedef enum { CURLPROXY_HTTP = 0, @@ -333,14 +336,17 @@ typedef enum { #define CURLAUTH_ANY ~0 /* all types set */ #define CURLAUTH_ANYSAFE (~CURLAUTH_BASIC) +#ifndef CURL_NO_OLDIES /* define this to test if your app builds with all + the obsolete stuff removed! */ /* this was the error code 50 in 7.7.3 and a few earlier versions, this is no longer used by libcurl but is instead #defined here only to not make programs break */ #define CURLE_ALREADY_COMPLETE 99999 -/* This is just to make older programs not break: */ +/* These are just to make older programs not break: */ #define CURLE_FTP_PARTIAL_FILE CURLE_PARTIAL_FILE #define CURLE_FTP_BAD_DOWNLOAD_RESUME CURLE_BAD_DOWNLOAD_RESUME +#endif #define CURL_ERROR_SIZE 256 -- cgit v1.2.1 From 4cf14e9f853c415b435c13ec9d693d93715675ef Mon Sep 17 00:00:00 2001 From: Gisle Vanem Date: Mon, 13 Dec 2004 16:35:56 +0000 Subject: Added CURLcode CURLE_SSL_ENGINE_INITFAILED, Added CURLINFO_SLIST type for returing a 'struct slist' in curl_easy_getinfo(). Added CURLINFO_SSL_ENGINES. --- include/curl/curl.h | 27 +++++++++++++++------------ 1 file changed, 15 insertions(+), 12 deletions(-) (limited to 'include') diff --git a/include/curl/curl.h b/include/curl/curl.h index 09e113d77..589e5230e 100644 --- a/include/curl/curl.h +++ b/include/curl/curl.h @@ -292,17 +292,18 @@ typedef enum { CURLE_SSL_ENGINE_NOTFOUND, /* 53 - SSL crypto engine not found */ CURLE_SSL_ENGINE_SETFAILED, /* 54 - can not set SSL crypto engine as default */ - CURLE_SEND_ERROR, /* 55 - failed sending network data */ - CURLE_RECV_ERROR, /* 56 - failure in receiving network data */ - CURLE_SHARE_IN_USE, /* 57 - share is in use */ - CURLE_SSL_CERTPROBLEM, /* 58 - problem with the local certificate */ - CURLE_SSL_CIPHER, /* 59 - couldn't use specified cipher */ - CURLE_SSL_CACERT, /* 60 - problem with the CA cert (path?) */ - CURLE_BAD_CONTENT_ENCODING, /* 61 - Unrecognized transfer encoding */ - CURLE_LDAP_INVALID_URL, /* 62 - Invalid LDAP URL */ - CURLE_FILESIZE_EXCEEDED, /* 63 - Maximum file size exceeded */ - CURLE_FTP_SSL_FAILED, /* 64 - Requested FTP SSL level failed */ - CURLE_SEND_FAIL_REWIND, /* 65 - Sending the data requires a rewind + CURLE_SSL_ENGINE_INITFAILED, /* 55 - failed to initialise ENGINE */ + CURLE_SEND_ERROR, /* 56 - failed sending network data */ + CURLE_RECV_ERROR, /* 57 - failure in receiving network data */ + CURLE_SHARE_IN_USE, /* 58 - share is in use */ + CURLE_SSL_CERTPROBLEM, /* 59 - problem with the local certificate */ + CURLE_SSL_CIPHER, /* 60 - couldn't use specified cipher */ + CURLE_SSL_CACERT, /* 61 - problem with the CA cert (path?) */ + CURLE_BAD_CONTENT_ENCODING, /* 62 - Unrecognized transfer encoding */ + CURLE_LDAP_INVALID_URL, /* 63 - Invalid LDAP URL */ + CURLE_FILESIZE_EXCEEDED, /* 64 - Maximum file size exceeded */ + CURLE_FTP_SSL_FAILED, /* 65 - Requested FTP SSL level failed */ + CURLE_SEND_FAIL_REWIND, /* 66 - Sending the data requires a rewind that failed */ CURL_LAST /* never use! */ } CURLcode; @@ -1200,6 +1201,7 @@ CURL_EXTERN time_t curl_getdate(const char *p, const time_t *now); #define CURLINFO_STRING 0x100000 #define CURLINFO_LONG 0x200000 #define CURLINFO_DOUBLE 0x300000 +#define CURLINFO_SLIST 0x400000 #define CURLINFO_MASK 0x0fffff #define CURLINFO_TYPEMASK 0xf00000 @@ -1231,9 +1233,10 @@ typedef enum { CURLINFO_PROXYAUTH_AVAIL = CURLINFO_LONG + 24, CURLINFO_OS_ERRNO = CURLINFO_LONG + 25, CURLINFO_NUM_CONNECTS = CURLINFO_LONG + 26, + CURLINFO_SSL_ENGINES = CURLINFO_SLIST + 27, /* Fill in new entries below here! */ - CURLINFO_LASTONE = 27 + CURLINFO_LASTONE = 28 } CURLINFO; /* CURLINFO_RESPONSE_CODE is the new name for the option previously known as -- cgit v1.2.1 From 37c7a695a204f4c59c99cac7eaf86a66514663bc Mon Sep 17 00:00:00 2001 From: Daniel Stenberg Date: Tue, 14 Dec 2004 09:58:45 +0000 Subject: Moved the CURLE_SSL_ENGINE_INITFAILED error code last in the list so that the others remain at previous values. --- include/curl/curl.h | 24 ++++++++++++------------ 1 file changed, 12 insertions(+), 12 deletions(-) (limited to 'include') diff --git a/include/curl/curl.h b/include/curl/curl.h index 589e5230e..5e86543e9 100644 --- a/include/curl/curl.h +++ b/include/curl/curl.h @@ -292,19 +292,19 @@ typedef enum { CURLE_SSL_ENGINE_NOTFOUND, /* 53 - SSL crypto engine not found */ CURLE_SSL_ENGINE_SETFAILED, /* 54 - can not set SSL crypto engine as default */ - CURLE_SSL_ENGINE_INITFAILED, /* 55 - failed to initialise ENGINE */ - CURLE_SEND_ERROR, /* 56 - failed sending network data */ - CURLE_RECV_ERROR, /* 57 - failure in receiving network data */ - CURLE_SHARE_IN_USE, /* 58 - share is in use */ - CURLE_SSL_CERTPROBLEM, /* 59 - problem with the local certificate */ - CURLE_SSL_CIPHER, /* 60 - couldn't use specified cipher */ - CURLE_SSL_CACERT, /* 61 - problem with the CA cert (path?) */ - CURLE_BAD_CONTENT_ENCODING, /* 62 - Unrecognized transfer encoding */ - CURLE_LDAP_INVALID_URL, /* 63 - Invalid LDAP URL */ - CURLE_FILESIZE_EXCEEDED, /* 64 - Maximum file size exceeded */ - CURLE_FTP_SSL_FAILED, /* 65 - Requested FTP SSL level failed */ - CURLE_SEND_FAIL_REWIND, /* 66 - Sending the data requires a rewind + CURLE_SEND_ERROR, /* 55 - failed sending network data */ + CURLE_RECV_ERROR, /* 56 - failure in receiving network data */ + CURLE_SHARE_IN_USE, /* 57 - share is in use */ + CURLE_SSL_CERTPROBLEM, /* 58 - problem with the local certificate */ + CURLE_SSL_CIPHER, /* 59 - couldn't use specified cipher */ + CURLE_SSL_CACERT, /* 60 - problem with the CA cert (path?) */ + CURLE_BAD_CONTENT_ENCODING, /* 61 - Unrecognized transfer encoding */ + CURLE_LDAP_INVALID_URL, /* 62 - Invalid LDAP URL */ + CURLE_FILESIZE_EXCEEDED, /* 63 - Maximum file size exceeded */ + CURLE_FTP_SSL_FAILED, /* 64 - Requested FTP SSL level failed */ + CURLE_SEND_FAIL_REWIND, /* 65 - Sending the data requires a rewind that failed */ + CURLE_SSL_ENGINE_INITFAILED, /* 66 - failed to initialise ENGINE */ CURL_LAST /* never use! */ } CURLcode; -- cgit v1.2.1 From 7270d5ce262d0d4b85031a2cc205f8ab9ee81879 Mon Sep 17 00:00:00 2001 From: Daniel Stenberg Date: Mon, 20 Dec 2004 13:09:38 +0000 Subject: start working on 7.12.4 --- include/curl/curlver.h | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'include') diff --git a/include/curl/curlver.h b/include/curl/curlver.h index c95bd1123..ce7fe8e45 100644 --- a/include/curl/curlver.h +++ b/include/curl/curlver.h @@ -28,7 +28,7 @@ /* This is the version number of the libcurl package from which this header file origins: */ -#define LIBCURL_VERSION "7.12.3-CVS" +#define LIBCURL_VERSION "7.12.4-CVS" /* This is the numeric version of the libcurl version number, meant for easier parsing and comparions by programs. The LIBCURL_VERSION_NUM define will @@ -44,12 +44,12 @@ always a greater number in a more recent release. It makes comparisons with greater than and less than work. */ -#define LIBCURL_VERSION_NUM 0x070c03 +#define LIBCURL_VERSION_NUM 0x070c04 /* The numeric version number is also available "in parts" by using these defines: */ #define LIBCURL_VERSION_MAJOR 7 #define LIBCURL_VERSION_MINOR 12 -#define LIBCURL_VERSION_PATCH 3 +#define LIBCURL_VERSION_PATCH 4 #endif /* __CURL_CURLVER_H */ -- cgit v1.2.1 From 327b46ccede3e6c35a3866a24a2676e4355803e0 Mon Sep 17 00:00:00 2001 From: Dan Fandrich Date: Mon, 20 Dec 2004 21:14:45 +0000 Subject: Fixed a compile warning introduced by making the protocol table const. This involves a binary-compatible change to the API struct curl_version_info_data --- include/curl/curl.h | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'include') diff --git a/include/curl/curl.h b/include/curl/curl.h index 5e86543e9..2acf76f02 100644 --- a/include/curl/curl.h +++ b/include/curl/curl.h @@ -1337,7 +1337,7 @@ typedef enum { /* The 'CURLVERSION_NOW' is the symbolic name meant to be used by basicly all programs ever, that want to get version information. It is meant to be a built-in version number for what kind of struct the caller - expects. If the struct ever changes, we redfine the NOW to another enum + expects. If the struct ever changes, we redefine the NOW to another enum from above. */ #define CURLVERSION_NOW CURLVERSION_THIRD @@ -1347,11 +1347,11 @@ typedef struct { unsigned int version_num; /* LIBCURL_VERSION_NUM */ const char *host; /* OS/host/cpu/machine when configured */ int features; /* bitmask, see defines below */ - char *ssl_version; /* human readable string */ + const char *ssl_version; /* human readable string */ long ssl_version_num; /* number */ const char *libz_version; /* human readable string */ /* protocols is terminated by an entry with a NULL protoname */ - const char **protocols; + const char * const *protocols; /* The fields below this were added in CURLVERSION_SECOND */ const char *ares; -- cgit v1.2.1 From 0406b1facf8fa0190806d76bddc0578793f01c39 Mon Sep 17 00:00:00 2001 From: Daniel Stenberg Date: Tue, 18 Jan 2005 15:13:23 +0000 Subject: skip sys/socket.h on windows CE --- include/curl/multi.h | 2 ++ 1 file changed, 2 insertions(+) (limited to 'include') diff --git a/include/curl/multi.h b/include/curl/multi.h index 1e6fc3cc5..a9b1c0ea8 100644 --- a/include/curl/multi.h +++ b/include/curl/multi.h @@ -67,7 +67,9 @@ #include #endif +#ifndef _WIN32_WCE #include +#endif #include #include #endif -- cgit v1.2.1 From 7e42cb61f75890832792c082510ec610f4c32cbe Mon Sep 17 00:00:00 2001 From: Daniel Stenberg Date: Fri, 21 Jan 2005 09:32:32 +0000 Subject: FTP third transfer support overhaul. See CHANGES for details. --- include/curl/curl.h | 32 +++++++++++++++++--------------- 1 file changed, 17 insertions(+), 15 deletions(-) (limited to 'include') diff --git a/include/curl/curl.h b/include/curl/curl.h index 2acf76f02..07c028b3b 100644 --- a/include/curl/curl.h +++ b/include/curl/curl.h @@ -712,7 +712,7 @@ typedef enum { CINIT(SSLENGINE_DEFAULT, LONG, 90), /* Non-zero value means to use the global dns cache */ - CINIT(DNS_USE_GLOBAL_CACHE, LONG, 91), /* To become OBSOLETE soon */ + CINIT(DNS_USE_GLOBAL_CACHE, LONG, 91), /* To becomeO BSOLETE soon */ /* DNS cache timeout */ CINIT(DNS_CACHE_TIMEOUT, LONG, 92), @@ -842,25 +842,15 @@ typedef enum { /* Enable/disable the TCP Nagle algorithm */ CINIT(TCP_NODELAY, LONG, 121), - /* When doing 3rd party transfer, set the source host name with this */ - CINIT(SOURCE_HOST, OBJECTPOINT, 122), + /* 122 OBSOLETE, used in 7.12.3. Gone in 7.13.0 */ /* When doing 3rd party transfer, set the source user and password with this */ CINIT(SOURCE_USERPWD, OBJECTPOINT, 123), - /* When doing 3rd party transfer, set the source file path with this */ - CINIT(SOURCE_PATH, OBJECTPOINT, 124), - - /* When doing 3rd party transfer, set the source server's port number - with this */ - CINIT(SOURCE_PORT, LONG, 125), - - /* When doing 3rd party transfer, decide which server that should get the - PASV command (and the other gets the PORT). - 0 (default) - The target host issues PASV. - 1 - The source host issues PASV */ - CINIT(PASV_HOST, LONG, 126), + /* 124 OBSOLETE, used in 7.12.3. Gone in 7.13.0 */ + /* 125 OBSOLETE, used in 7.12.3. Gone in 7.13.0 */ + /* 126 OBSOLETE, used in 7.12.3. Gone in 7.13.0 */ /* When doing 3rd party transfer, set the source pre-quote linked list of commands with this */ @@ -885,6 +875,13 @@ typedef enum { CINIT(IOCTLFUNCTION, FUNCTIONPOINT, 130), CINIT(IOCTLDATA, OBJECTPOINT, 131), + /* To make a 3rd party transfer, set the source URL with this */ + CINIT(SOURCE_URL, OBJECTPOINT, 132), + + /* When doing 3rd party transfer, set the source quote linked list of + commands with this */ + CINIT(SOURCE_QUOTE, OBJECTPOINT, 133), + CURLOPT_LASTENTRY /* the last unused */ } CURLoption; @@ -910,6 +907,11 @@ typedef enum { #define CURLOPT_PASSWDDATA -4 #define CURLOPT_CLOSEFUNCTION -5 +#define CURLOPT_SOURCE_HOST -6 +#define CURLOPT_SOURCE_PATH -7 +#define CURLOPT_SOURCE_PORT -8 +#define CURLOPT_PASV_HOST -9 + #else /* This is set if CURL_NO_OLDIES is defined at compile-time */ #undef CURLOPT_DNS_USE_GLOBAL_CACHE /* soon obsolete */ -- cgit v1.2.1 From d8f79b263de2f4b2a41b6778e0b3d61a03e930ff Mon Sep 17 00:00:00 2001 From: Daniel Stenberg Date: Sat, 22 Jan 2005 19:26:37 +0000 Subject: next release will be 7.13.0 --- include/curl/curlver.h | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'include') diff --git a/include/curl/curlver.h b/include/curl/curlver.h index ce7fe8e45..0d505b803 100644 --- a/include/curl/curlver.h +++ b/include/curl/curlver.h @@ -7,7 +7,7 @@ * | (__| |_| | _ <| |___ * \___|\___/|_| \_\_____| * - * Copyright (C) 1998 - 2004, Daniel Stenberg, , et al. + * Copyright (C) 1998 - 2005, 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 @@ -28,7 +28,7 @@ /* This is the version number of the libcurl package from which this header file origins: */ -#define LIBCURL_VERSION "7.12.4-CVS" +#define LIBCURL_VERSION "7.13.0-CVS" /* This is the numeric version of the libcurl version number, meant for easier parsing and comparions by programs. The LIBCURL_VERSION_NUM define will @@ -44,12 +44,12 @@ always a greater number in a more recent release. It makes comparisons with greater than and less than work. */ -#define LIBCURL_VERSION_NUM 0x070c04 +#define LIBCURL_VERSION_NUM 0x070d00 /* The numeric version number is also available "in parts" by using these defines: */ #define LIBCURL_VERSION_MAJOR 7 -#define LIBCURL_VERSION_MINOR 12 -#define LIBCURL_VERSION_PATCH 4 +#define LIBCURL_VERSION_MINOR 13 +#define LIBCURL_VERSION_PATCH 0 #endif /* __CURL_CURLVER_H */ -- cgit v1.2.1 From 177dbc7be07125582ddb7416dba7140b88ab9f62 Mon Sep 17 00:00:00 2001 From: Daniel Stenberg Date: Tue, 25 Jan 2005 22:13:12 +0000 Subject: Ian Ford asked about support for the FTP command ACCT, and I discovered it is present in RFC959... so now (lib)curl supports it as well. --ftp-account and CURLOPT_FTP_ACCOUNT set the account string. (The server may ask for an account string after PASS have been sent away. The client responds with "ACCT [account string]".) Added test case 228 and 229 to verify the functionality. Updated the test FTP server to support ACCT somewhat. --- include/curl/curl.h | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'include') diff --git a/include/curl/curl.h b/include/curl/curl.h index 07c028b3b..019ef08a0 100644 --- a/include/curl/curl.h +++ b/include/curl/curl.h @@ -882,6 +882,10 @@ typedef enum { commands with this */ CINIT(SOURCE_QUOTE, OBJECTPOINT, 133), + /* zero terminated string for pass on to the FTP server when asked for + "account" info */ + CINIT(FTP_ACCOUNT, OBJECTPOINT, 134), + CURLOPT_LASTENTRY /* the last unused */ } CURLoption; -- cgit v1.2.1 From 0d9301539e5ec58371c93f8e5f5346a5a4f5f43c Mon Sep 17 00:00:00 2001 From: Daniel Stenberg Date: Tue, 1 Feb 2005 08:46:06 +0000 Subject: and we start over again --- include/curl/curlver.h | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'include') diff --git a/include/curl/curlver.h b/include/curl/curlver.h index 0d505b803..b12559e0f 100644 --- a/include/curl/curlver.h +++ b/include/curl/curlver.h @@ -28,7 +28,7 @@ /* This is the version number of the libcurl package from which this header file origins: */ -#define LIBCURL_VERSION "7.13.0-CVS" +#define LIBCURL_VERSION "7.13.1-CVS" /* This is the numeric version of the libcurl version number, meant for easier parsing and comparions by programs. The LIBCURL_VERSION_NUM define will @@ -44,12 +44,12 @@ always a greater number in a more recent release. It makes comparisons with greater than and less than work. */ -#define LIBCURL_VERSION_NUM 0x070d00 +#define LIBCURL_VERSION_NUM 0x070d01 /* The numeric version number is also available "in parts" by using these defines: */ #define LIBCURL_VERSION_MAJOR 7 #define LIBCURL_VERSION_MINOR 13 -#define LIBCURL_VERSION_PATCH 0 +#define LIBCURL_VERSION_PATCH 1 #endif /* __CURL_CURLVER_H */ -- cgit v1.2.1 From 6a2e21ec8cbaf7c719902e06953d9dbec629ad4f Mon Sep 17 00:00:00 2001 From: Daniel Stenberg Date: Wed, 9 Feb 2005 13:06:40 +0000 Subject: FTP code turned into state machine. Not completely yet, but a good start. The tag 'before_ftp_statemachine' was set just before this commit in case of future need. --- include/curl/curl.h | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'include') diff --git a/include/curl/curl.h b/include/curl/curl.h index 019ef08a0..a8fb925b5 100644 --- a/include/curl/curl.h +++ b/include/curl/curl.h @@ -245,7 +245,9 @@ typedef enum { CURLE_COULDNT_RESOLVE_HOST, /* 6 */ CURLE_COULDNT_CONNECT, /* 7 */ CURLE_FTP_WEIRD_SERVER_REPLY, /* 8 */ - CURLE_FTP_ACCESS_DENIED, /* 9 */ + CURLE_FTP_ACCESS_DENIED, /* 9 a service was denied by the FTP server + due to lack of access - when login fails + this is not returned. */ CURLE_FTP_USER_PASSWORD_INCORRECT, /* 10 */ CURLE_FTP_WEIRD_PASS_REPLY, /* 11 */ CURLE_FTP_WEIRD_USER_REPLY, /* 12 */ @@ -305,6 +307,8 @@ typedef enum { CURLE_SEND_FAIL_REWIND, /* 65 - Sending the data requires a rewind that failed */ CURLE_SSL_ENGINE_INITFAILED, /* 66 - failed to initialise ENGINE */ + CURLE_LOGIN_DENIED, /* 67 - user, password or similar was not + accepted and we failed to login */ CURL_LAST /* never use! */ } CURLcode; -- cgit v1.2.1 From 4869fa285b582efc110ecfc30aeeabb9e1d04c8c Mon Sep 17 00:00:00 2001 From: Daniel Stenberg Date: Fri, 4 Mar 2005 15:42:33 +0000 Subject: 7.13.2-CVS --- include/curl/curlver.h | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'include') diff --git a/include/curl/curlver.h b/include/curl/curlver.h index b12559e0f..e6d09272b 100644 --- a/include/curl/curlver.h +++ b/include/curl/curlver.h @@ -28,7 +28,7 @@ /* This is the version number of the libcurl package from which this header file origins: */ -#define LIBCURL_VERSION "7.13.1-CVS" +#define LIBCURL_VERSION "7.13.2-CVS" /* This is the numeric version of the libcurl version number, meant for easier parsing and comparions by programs. The LIBCURL_VERSION_NUM define will @@ -44,12 +44,12 @@ always a greater number in a more recent release. It makes comparisons with greater than and less than work. */ -#define LIBCURL_VERSION_NUM 0x070d01 +#define LIBCURL_VERSION_NUM 0x070d02 /* The numeric version number is also available "in parts" by using these defines: */ #define LIBCURL_VERSION_MAJOR 7 #define LIBCURL_VERSION_MINOR 13 -#define LIBCURL_VERSION_PATCH 1 +#define LIBCURL_VERSION_PATCH 2 #endif /* __CURL_CURLVER_H */ -- cgit v1.2.1 From 84bc23b92f3e22722b965ae460ca8d3413293d3b Mon Sep 17 00:00:00 2001 From: Daniel Stenberg Date: Fri, 11 Mar 2005 15:10:36 +0000 Subject: curl_version_info() returns the feature bit CURL_VERSION_SSPI --- include/curl/curl.h | 1 + 1 file changed, 1 insertion(+) (limited to 'include') diff --git a/include/curl/curl.h b/include/curl/curl.h index a8fb925b5..20f061145 100644 --- a/include/curl/curl.h +++ b/include/curl/curl.h @@ -1382,6 +1382,7 @@ typedef struct { #define CURL_VERSION_SPNEGO (1<<8) /* SPNEGO auth */ #define CURL_VERSION_LARGEFILE (1<<9) /* supports files bigger than 2GB */ #define CURL_VERSION_IDN (1<<10) /* International Domain Names support */ +#define CURL_VERSION_SSPI (1<<11) /* SSPI is supported */ /* * NAME curl_version_info() -- cgit v1.2.1 From ab4086bc244bf3267976e9f0193e5ed4430190d8 Mon Sep 17 00:00:00 2001 From: Daniel Stenberg Date: Thu, 31 Mar 2005 07:02:02 +0000 Subject: Updated the copyright year since changes have been this year. --- include/curl/curl.h | 2 +- include/curl/multi.h | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) (limited to 'include') diff --git a/include/curl/curl.h b/include/curl/curl.h index 20f061145..b12ebd7f7 100644 --- a/include/curl/curl.h +++ b/include/curl/curl.h @@ -7,7 +7,7 @@ * | (__| |_| | _ <| |___ * \___|\___/|_| \_\_____| * - * Copyright (C) 1998 - 2004, Daniel Stenberg, , et al. + * Copyright (C) 1998 - 2005, 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 diff --git a/include/curl/multi.h b/include/curl/multi.h index a9b1c0ea8..64ab406aa 100644 --- a/include/curl/multi.h +++ b/include/curl/multi.h @@ -7,7 +7,7 @@ * | (__| |_| | _ <| |___ * \___|\___/|_| \_\_____| * - * Copyright (C) 1998 - 2004, Daniel Stenberg, , et al. + * Copyright (C) 1998 - 2005, 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 -- cgit v1.2.1 From c53e9ccf4a33254af7768613d604698449116a39 Mon Sep 17 00:00:00 2001 From: Daniel Stenberg Date: Tue, 5 Apr 2005 15:11:51 +0000 Subject: 7.13.3 in progress --- include/curl/curlver.h | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'include') diff --git a/include/curl/curlver.h b/include/curl/curlver.h index e6d09272b..46167dac9 100644 --- a/include/curl/curlver.h +++ b/include/curl/curlver.h @@ -28,7 +28,7 @@ /* This is the version number of the libcurl package from which this header file origins: */ -#define LIBCURL_VERSION "7.13.2-CVS" +#define LIBCURL_VERSION "7.13.3-CVS" /* This is the numeric version of the libcurl version number, meant for easier parsing and comparions by programs. The LIBCURL_VERSION_NUM define will @@ -44,12 +44,12 @@ always a greater number in a more recent release. It makes comparisons with greater than and less than work. */ -#define LIBCURL_VERSION_NUM 0x070d02 +#define LIBCURL_VERSION_NUM 0x070d03 /* The numeric version number is also available "in parts" by using these defines: */ #define LIBCURL_VERSION_MAJOR 7 #define LIBCURL_VERSION_MINOR 13 -#define LIBCURL_VERSION_PATCH 2 +#define LIBCURL_VERSION_PATCH 3 #endif /* __CURL_CURLVER_H */ -- cgit v1.2.1 From 2a8b91cdb9e2f2605f39594c20117cca2d39ee2d Mon Sep 17 00:00:00 2001 From: Daniel Stenberg Date: Thu, 7 Apr 2005 15:18:51 +0000 Subject: ssl_version_num won't be used anymore since we will soon offer multiple SSL layers and it won't make sense to provide a numerical version for it. I also doubt that many people have used this for anything critical. --- include/curl/curl.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'include') diff --git a/include/curl/curl.h b/include/curl/curl.h index b12ebd7f7..ca12b5948 100644 --- a/include/curl/curl.h +++ b/include/curl/curl.h @@ -1358,8 +1358,8 @@ typedef struct { const char *host; /* OS/host/cpu/machine when configured */ int features; /* bitmask, see defines below */ const char *ssl_version; /* human readable string */ - long ssl_version_num; /* number */ - const char *libz_version; /* human readable string */ + long ssl_version_num; /* not used anymore, always 0 */ + const char *libz_version; /* human readable string */ /* protocols is terminated by an entry with a NULL protoname */ const char * const *protocols; -- cgit v1.2.1 From e01e364c3712aa299751f289876d42cbc14fdd41 Mon Sep 17 00:00:00 2001 From: Daniel Stenberg Date: Tue, 12 Apr 2005 14:17:07 +0000 Subject: next release will be version 7.14.0 thanks to the added GnuTLS support --- include/curl/curlver.h | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'include') diff --git a/include/curl/curlver.h b/include/curl/curlver.h index 46167dac9..3ae63fb77 100644 --- a/include/curl/curlver.h +++ b/include/curl/curlver.h @@ -28,7 +28,7 @@ /* This is the version number of the libcurl package from which this header file origins: */ -#define LIBCURL_VERSION "7.13.3-CVS" +#define LIBCURL_VERSION "7.14.0-CVS" /* This is the numeric version of the libcurl version number, meant for easier parsing and comparions by programs. The LIBCURL_VERSION_NUM define will @@ -44,12 +44,12 @@ always a greater number in a more recent release. It makes comparisons with greater than and less than work. */ -#define LIBCURL_VERSION_NUM 0x070d03 +#define LIBCURL_VERSION_NUM 0x070e00 /* The numeric version number is also available "in parts" by using these defines: */ #define LIBCURL_VERSION_MAJOR 7 -#define LIBCURL_VERSION_MINOR 13 -#define LIBCURL_VERSION_PATCH 3 +#define LIBCURL_VERSION_MINOR 14 +#define LIBCURL_VERSION_PATCH 0 #endif /* __CURL_CURLVER_H */ -- cgit v1.2.1 From 9a9c07f5716a02b7c6e6ad16f4c84f75e8804f44 Mon Sep 17 00:00:00 2001 From: Daniel Stenberg Date: Mon, 18 Apr 2005 11:40:50 +0000 Subject: Initial curl_multi_socket() stuff, #ifdef'ed out for now but committed for documentational purposes. --- include/curl/multi.h | 132 +++++++++++++++++++++++++++++++++++++++++++++------ 1 file changed, 118 insertions(+), 14 deletions(-) (limited to 'include') diff --git a/include/curl/multi.h b/include/curl/multi.h index 64ab406aa..fe34a423d 100644 --- a/include/curl/multi.h +++ b/include/curl/multi.h @@ -23,16 +23,8 @@ * $Id$ ***************************************************************************/ /* - This is meant to be the "external" header file. Don't give away any - internals here! + This is an "external" header file. Don't give away any internals here! - This document presents a mixture of ideas from at least: - - Daniel Stenberg - - Steve Dekorte - - Sterling Hughes - - Ben Greear - - ------------------------------------------- GOALS o Enable a "pull" interface. The application that uses libcurl decides where @@ -82,6 +74,22 @@ extern "C" { typedef void CURLM; +#ifdef HAVE_CURL_MULTI_SOCKET /* this is not set by anything yet */ + +#ifndef curl_socket_typedef +/* Public socket typedef */ +#ifdef WIN32 +typedef SOCKET curl_socket_t; +#define CURL_SOCKET_BAD INVALID_SOCKET +#else +typedef int curl_socket_t; +#define CURL_SOCKET_BAD -1 +#endif +#define curl_socket_typedef +#endif /* curl_socket_typedef */ + +#endif /* HAVE_CURL_MULTI_SOCKET */ + typedef enum { CURLM_CALL_MULTI_PERFORM=-1, /* please call curl_multi_perform() soon */ CURLM_OK, @@ -113,6 +121,7 @@ typedef struct CURLMsg CURLMsg; * Name: curl_multi_init() * * Desc: inititalize multi-style curl usage + * * Returns: a new CURLM handle to use in all 'curl_multi' functions. */ CURL_EXTERN CURLM *curl_multi_init(void); @@ -121,6 +130,7 @@ CURL_EXTERN CURLM *curl_multi_init(void); * Name: curl_multi_add_handle() * * Desc: add a standard curl handle to the multi stack + * * Returns: CURLMcode type, general multi error code. */ CURL_EXTERN CURLMcode curl_multi_add_handle(CURLM *multi_handle, @@ -130,6 +140,7 @@ CURL_EXTERN CURLMcode curl_multi_add_handle(CURLM *multi_handle, * Name: curl_multi_remove_handle() * * Desc: removes a curl handle from the multi stack again + * * Returns: CURLMcode type, general multi error code. */ CURL_EXTERN CURLMcode curl_multi_remove_handle(CURLM *multi_handle, @@ -141,6 +152,7 @@ CURL_EXTERN CURLMcode curl_multi_remove_handle(CURLM *multi_handle, * Desc: Ask curl for its fd_set sets. The app can use these to select() or * poll() on. We want curl_multi_perform() called as soon as one of * them are ready. + * * Returns: CURLMcode type, general multi error code. */ CURL_EXTERN CURLMcode curl_multi_fdset(CURLM *multi_handle, @@ -175,6 +187,7 @@ CURL_EXTERN CURLMcode curl_multi_perform(CURLM *multi_handle, * touch any individual easy handles in any way. We need to define * in what state those handles will be if this function is called * in the middle of a transfer. + * * Returns: CURLMcode type, general multi error code. */ CURL_EXTERN CURLMcode curl_multi_cleanup(CURLM *multi_handle); @@ -211,16 +224,107 @@ CURL_EXTERN CURLMsg *curl_multi_info_read(CURLM *multi_handle, int *msgs_in_queue); /* - * NAME curl_multi_strerror() + * Name: curl_multi_strerror() * - * DESCRIPTION + * Desc: The curl_multi_strerror function may be used to turn a CURLMcode + * value into the equivalent human readable error string. This is + * useful for printing meaningful error messages. * - * The curl_multi_strerror function may be used to turn a CURLMcode value - * into the equivalent human readable error string. This is useful - * for printing meaningful error messages. + * Returns: A pointer to a zero-terminated error message. */ CURL_EXTERN const char *curl_multi_strerror(CURLMcode); +#ifdef HAVE_CURL_MULTI_SOCKET +/* + * Name: curl_multi_socket() and + * curl_multi_socket_all() + * + * Desc: An alternative version of curl_multi_perform() that allows the + * application to pass in one of the file descriptors that have been + * detected to have "action" on them and let libcurl perform. This + * allows libcurl to not have to scan through all possible file + * descriptors to check for this. The app is recommended to pass in + * the 'easy' argument (or set it to CURL_EASY_NONE) to make libcurl + * figure out the internal structure even faster and easier. If the + * easy argument is set to something else than CURL_EASY_NONE, the + * 's' (socket) argument will be ignored by libcurl. + * + * It also informs the application about updates in the socket (file + * descriptor) status by doing none, one or multiple calls to the + * curl_socket_callback. It thus updates the status with changes + * since the previous time this function was used. If 'callback' is + * NULL, no callback will be called. A status change may also be a + * new timeout only, having the same IN/OUT status as before. + * + * If a previous wait for socket action(s) timed out, you should call + * this function with the socket argument set to + * CURL_SOCKET_TIMEOUT. If you want to force libcurl to (re-)check + * all its internal sockets, and call the callback with status for + * all sockets no matter what the previous state is, you call + * curl_multi_socket_all() instead. + * + * curl_multi_perform() is thus the equivalent of calling + * curl_multi_socket_all(handle, NULL, NULL); + * + * IMPLEMENTATION: libcurl will need an internal hash table to map + * socket numbers to internal easy handles for the cases when 'easy' + * is set to CURL_EASY_NONE. + * + * Regarding the timeout argument in the callback: it is the timeout + * (in milliseconds) for waiting on action on this socket (and the + * given time period starts when the callback is called) until you + * should call curl_multi_socket() with the timeout stuff mentioned + * above. If "actions" happens on the socket before the timeout + * happens, remember that the timout timer keeps ticking until told + * otherwise. + * + * The "what" argument has one of five values: + * + * 0 CURL_POLL_NONE (0) - register, not interested in readiness + * 1 CURL_POLL_IN - register, interested in read readiness + * 2 CURL_POLL_OUT - register, interested in write readiness + * 3 CURL_POLL_INOUT - register, interested in both + * 4 CURL_POLL_REMOVE - deregister + */ +#define CURL_POLL_NONE 0 +#define CURL_POLL_IN 1 +#define CURL_POLL_OUT 2 +#define CURL_POLL_INOUT 3 +#define CURL_POLL_REMOVE 4 + +#define CURL_EASY_NONE (CURL *)0 +#define CURL_EASY_TIMEOUT (CURL *)0 +#define CURL_SOCKET_TIMEOUT CURL_SOCKET_BAD + +typedef int (*curl_socket_callback)(CURL *easy, /* easy handle */ + curl_socket_t s, /* socket */ + int what, /* see above */ + long ms, /* timeout for wait */ + void *userp); /* "private" pointer */ + +CURLMcode curl_multi_socket(CURLM *multi_handle, + curl_socket_t s, + CURL *easy, + curl_socket_callback callback, + void *userp); /* passed to callback */ + +CURLMcode curl_multi_socket_all(CURLM *multi_handle, + curl_socket_callback callback, + void *userp); /* passed to callback */ + +/* + * Name: curl_multi_timeout() + * + * Desc: Returns the maximum number of milliseconds the app is allowed to + * wait before curl_multi_socket() or curl_multi_perform() must be + * called (to allow libcurl's timed events to take place). + * + * Returns: CURLM error code. + */ +CURLMcode curl_multi_timeout(CURLM *multi_handle, long *milliseconds); + +#endif /* HAVE_CURL_MULTI_SOCKET */ + #ifdef __cplusplus } /* end of extern "C" */ #endif -- cgit v1.2.1 From 3afc57bab8088c1cc4bf4754980159f94dc28f72 Mon Sep 17 00:00:00 2001 From: Daniel Stenberg Date: Mon, 16 May 2005 13:27:41 +0000 Subject: start working on 7.14.1 --- include/curl/curlver.h | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'include') diff --git a/include/curl/curlver.h b/include/curl/curlver.h index 3ae63fb77..d1f0b8e7e 100644 --- a/include/curl/curlver.h +++ b/include/curl/curlver.h @@ -28,7 +28,7 @@ /* This is the version number of the libcurl package from which this header file origins: */ -#define LIBCURL_VERSION "7.14.0-CVS" +#define LIBCURL_VERSION "7.14.1-CVS" /* This is the numeric version of the libcurl version number, meant for easier parsing and comparions by programs. The LIBCURL_VERSION_NUM define will @@ -44,12 +44,12 @@ always a greater number in a more recent release. It makes comparisons with greater than and less than work. */ -#define LIBCURL_VERSION_NUM 0x070e00 +#define LIBCURL_VERSION_NUM 0x070e01 /* The numeric version number is also available "in parts" by using these defines: */ #define LIBCURL_VERSION_MAJOR 7 #define LIBCURL_VERSION_MINOR 14 -#define LIBCURL_VERSION_PATCH 0 +#define LIBCURL_VERSION_PATCH 1 #endif /* __CURL_CURLVER_H */ -- cgit v1.2.1 From 2236ba0d206fe9fef5d93889ee652feaa03fe089 Mon Sep 17 00:00:00 2001 From: Daniel Stenberg Date: Wed, 27 Jul 2005 22:17:14 +0000 Subject: Peteris Krumins added CURLOPT_COOKIELIST and CURLINFO_COOKIELIST, which is a simple interface to extracting and setting cookies in libcurl's internal "cookie jar". See the new cookie_interface.c example code. --- include/curl/curl.h | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'include') diff --git a/include/curl/curl.h b/include/curl/curl.h index ca12b5948..46f36f921 100644 --- a/include/curl/curl.h +++ b/include/curl/curl.h @@ -890,6 +890,9 @@ typedef enum { "account" info */ CINIT(FTP_ACCOUNT, OBJECTPOINT, 134), + /* feed cookies into cookie engine */ + CINIT(COOKIELIST, OBJECTPOINT, 135), + CURLOPT_LASTENTRY /* the last unused */ } CURLoption; @@ -1244,6 +1247,7 @@ typedef enum { CURLINFO_OS_ERRNO = CURLINFO_LONG + 25, CURLINFO_NUM_CONNECTS = CURLINFO_LONG + 26, CURLINFO_SSL_ENGINES = CURLINFO_SLIST + 27, + CURLINFO_COOKIELIST = CURLINFO_SLIST + 28, /* Fill in new entries below here! */ CURLINFO_LASTONE = 28 -- cgit v1.2.1 From 2b7a38d0324c3aa2a5579e7b5d2e5a4465bc565a Mon Sep 17 00:00:00 2001 From: Daniel Stenberg Date: Wed, 17 Aug 2005 09:12:08 +0000 Subject: removed old info about curl_getdate() just simply isn't true and hasn't been true since the getdate() parser code rewrite --- include/curl/curl.h | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) (limited to 'include') diff --git a/include/curl/curl.h b/include/curl/curl.h index 46f36f921..cd9f37f69 100644 --- a/include/curl/curl.h +++ b/include/curl/curl.h @@ -1205,11 +1205,10 @@ CURL_EXTERN void curl_slist_free_all(struct curl_slist *); * DESCRIPTION * * Returns the time, in seconds since 1 Jan 1970 of the time string given in - * the first argument. The time argument in the second parameter is for cases - * where the specified time is relative now, like 'two weeks' or 'tomorrow' - * etc. + * the first argument. The time argument in the second parameter is unused + * and should be set to NULL. */ -CURL_EXTERN time_t curl_getdate(const char *p, const time_t *now); +CURL_EXTERN time_t curl_getdate(const char *p, const time_t *unused); #define CURLINFO_STRING 0x100000 #define CURLINFO_LONG 0x200000 -- cgit v1.2.1 From a4773fcbbbf42a25c1037573fbab58aa275b9ed1 Mon Sep 17 00:00:00 2001 From: Daniel Stenberg Date: Wed, 24 Aug 2005 10:57:28 +0000 Subject: Toby Peterson added CURLOPT_IGNORE_CONTENT_LENGTH to the library, accessible from the command line tool with --ignore-content-length. This will make it easier to download files from Apache 1.x (and similar) servers that are still having problems serving files larger than 2 or 4 GB. When this option is enabled, curl will simply have to wait for the server to close the connection to signal end of transfer. I wrote test case 269 that runs a simple test that this works. --- include/curl/curl.h | 3 +++ 1 file changed, 3 insertions(+) (limited to 'include') diff --git a/include/curl/curl.h b/include/curl/curl.h index cd9f37f69..e882bd4c6 100644 --- a/include/curl/curl.h +++ b/include/curl/curl.h @@ -893,6 +893,9 @@ typedef enum { /* feed cookies into cookie engine */ CINIT(COOKIELIST, OBJECTPOINT, 135), + /* ignore Content-Length */ + CINIT(IGNORE_CONTENT_LENGTH, LONG, 136), + CURLOPT_LASTENTRY /* the last unused */ } CURLoption; -- cgit v1.2.1 From 7722452b980fa4c1c6bb0319d9ee92cb07cd9195 Mon Sep 17 00:00:00 2001 From: Daniel Stenberg Date: Thu, 1 Sep 2005 21:08:56 +0000 Subject: work on 7.14.2 starts now --- include/curl/curlver.h | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'include') diff --git a/include/curl/curlver.h b/include/curl/curlver.h index d1f0b8e7e..9da18b1b6 100644 --- a/include/curl/curlver.h +++ b/include/curl/curlver.h @@ -28,7 +28,7 @@ /* This is the version number of the libcurl package from which this header file origins: */ -#define LIBCURL_VERSION "7.14.1-CVS" +#define LIBCURL_VERSION "7.14.2-CVS" /* This is the numeric version of the libcurl version number, meant for easier parsing and comparions by programs. The LIBCURL_VERSION_NUM define will @@ -44,12 +44,12 @@ always a greater number in a more recent release. It makes comparisons with greater than and less than work. */ -#define LIBCURL_VERSION_NUM 0x070e01 +#define LIBCURL_VERSION_NUM 0x070e02 /* The numeric version number is also available "in parts" by using these defines: */ #define LIBCURL_VERSION_MAJOR 7 #define LIBCURL_VERSION_MINOR 14 -#define LIBCURL_VERSION_PATCH 1 +#define LIBCURL_VERSION_PATCH 2 #endif /* __CURL_CURLVER_H */ -- cgit v1.2.1 From 56d9624b566ac15ffb4b4b6eef220a5000b767e0 Mon Sep 17 00:00:00 2001 From: Daniel Stenberg Date: Fri, 2 Sep 2005 15:11:08 +0000 Subject: John Kelly added TFTP support to libcurl. A bunch of new error codes was added. TODO: add them to docs. add TFTP server to test suite. add TFTP to list of protocols whereever those are mentioned. --- include/curl/curl.h | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'include') diff --git a/include/curl/curl.h b/include/curl/curl.h index e882bd4c6..daacf781a 100644 --- a/include/curl/curl.h +++ b/include/curl/curl.h @@ -309,6 +309,13 @@ typedef enum { CURLE_SSL_ENGINE_INITFAILED, /* 66 - failed to initialise ENGINE */ CURLE_LOGIN_DENIED, /* 67 - user, password or similar was not accepted and we failed to login */ + CURLE_TFTP_NOTFOUND, /* 68 - file not found on server */ + CURLE_TFTP_PERM, /* 69 - permission problem on server */ + CURLE_TFTP_DISKFULL, /* 70 - out of disk space on server */ + CURLE_TFTP_ILLEGAL, /* 71 - Illegal TFTP operation */ + CURLE_TFTP_UNKNOWNID, /* 72 - Unknown transfer ID */ + CURLE_TFTP_EXISTS, /* 73 - File already exists */ + CURLE_TFTP_NOSUCHUSER, /* 74 - No such user */ CURL_LAST /* never use! */ } CURLcode; -- cgit v1.2.1 From 7e845e7cfdd658caccc60f687d5d5d68d7e88937 Mon Sep 17 00:00:00 2001 From: Daniel Stenberg Date: Sun, 4 Sep 2005 05:16:06 +0000 Subject: Added FTP_SKIP_PASV_IP and --ftp-skip-pasv-ip --- include/curl/curl.h | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'include') diff --git a/include/curl/curl.h b/include/curl/curl.h index daacf781a..48c896119 100644 --- a/include/curl/curl.h +++ b/include/curl/curl.h @@ -903,6 +903,12 @@ typedef enum { /* ignore Content-Length */ CINIT(IGNORE_CONTENT_LENGTH, LONG, 136), + /* Set to non-zero to skip the IP address received in a 227 PASV FTP server + response. Typically used for FTP-SSL purposes but is not restricted to + that. libcurl will then instead use the same IP address it used for the + control connection. */ + CINIT(FTP_SKIP_PASV_IP, LONG, 137), + CURLOPT_LASTENTRY /* the last unused */ } CURLoption; -- cgit v1.2.1 From 62fdf8eaed7883c63e28b60c1a4cb8adee5e534d Mon Sep 17 00:00:00 2001 From: Daniel Stenberg Date: Thu, 6 Oct 2005 12:56:13 +0000 Subject: we all the next version 7.15.0 due to the new TFTP support --- include/curl/curlver.h | 29 ++++++++++++++++------------- 1 file changed, 16 insertions(+), 13 deletions(-) (limited to 'include') diff --git a/include/curl/curlver.h b/include/curl/curlver.h index 9da18b1b6..d543cb9af 100644 --- a/include/curl/curlver.h +++ b/include/curl/curlver.h @@ -28,7 +28,13 @@ /* This is the version number of the libcurl package from which this header file origins: */ -#define LIBCURL_VERSION "7.14.2-CVS" +#define LIBCURL_VERSION "7.15.0-CVS" + +/* The numeric version number is also available "in parts" by using these + defines: */ +#define LIBCURL_VERSION_MAJOR 7 +#define LIBCURL_VERSION_MINOR 15 +#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 @@ -37,19 +43,16 @@ 0xXXYYZZ Where XX, YY and ZZ are the main version, release and patch numbers in - hexadecimal. All three numbers are always represented using two digits. 1.2 - would appear as "0x010200" while version 9.11.7 appears as "0x090b07". + hexadecimal (using 8 bits each). All three numbers are always represented + using two digits. 1.2 would appear as "0x010200" while version 9.11.7 + appears as "0x090b07". - This 6-digit hexadecimal number does not show pre-release number, and it is - always a greater number in a more recent release. It makes comparisons with - greater than and less than work. + This 6-digit (24 bits) hexadecimal number does not show pre-release number, + 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 0x070e02 - -/* The numeric version number is also available "in parts" by using these - defines: */ -#define LIBCURL_VERSION_MAJOR 7 -#define LIBCURL_VERSION_MINOR 14 -#define LIBCURL_VERSION_PATCH 2 +#define LIBCURL_VERSION_NUM ((LIBCURL_VERSION_MAJOR << 16) | \ + (LIBCURL_VERSION_MINOR << 8) | \ + LIBCURL_VERSION_PATCH) #endif /* __CURL_CURLVER_H */ -- cgit v1.2.1 From e73c6e039e4c7f249b825370cb391a608ff4b43a Mon Sep 17 00:00:00 2001 From: Daniel Stenberg Date: Thu, 13 Oct 2005 09:23:51 +0000 Subject: start working on 7.15.1 --- include/curl/curlver.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'include') diff --git a/include/curl/curlver.h b/include/curl/curlver.h index d543cb9af..0cb6c2337 100644 --- a/include/curl/curlver.h +++ b/include/curl/curlver.h @@ -28,13 +28,13 @@ /* This is the version number of the libcurl package from which this header file origins: */ -#define LIBCURL_VERSION "7.15.0-CVS" +#define LIBCURL_VERSION "7.15.1-CVS" /* The numeric version number is also available "in parts" by using these defines: */ #define LIBCURL_VERSION_MAJOR 7 #define LIBCURL_VERSION_MINOR 15 -#define LIBCURL_VERSION_PATCH 0 +#define LIBCURL_VERSION_PATCH 1 /* This is the numeric version of the libcurl version number, meant for easier parsing and comparions by programs. The LIBCURL_VERSION_NUM define will -- cgit v1.2.1 From f335bac8a38e816c4243474d7c7d186638d3aab4 Mon Sep 17 00:00:00 2001 From: Daniel Stenberg Date: Fri, 14 Oct 2005 21:21:51 +0000 Subject: Reverted the LIBCURL_VERSION_NUM change from October 6. As Dave Dribin reported, the define is used by the configure script and is assumed to use the 0xYYXXZZ format. This made "curl-config --vernum" fail in the 7.15.0 release version. --- include/curl/curlver.h | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) (limited to 'include') diff --git a/include/curl/curlver.h b/include/curl/curlver.h index 0cb6c2337..7f94670f4 100644 --- a/include/curl/curlver.h +++ b/include/curl/curlver.h @@ -51,8 +51,6 @@ 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 ((LIBCURL_VERSION_MAJOR << 16) | \ - (LIBCURL_VERSION_MINOR << 8) | \ - LIBCURL_VERSION_PATCH) +#define LIBCURL_VERSION_NUM 0x070f01 #endif /* __CURL_CURLVER_H */ -- cgit v1.2.1 From fdef58468100d1a9b6b7f6769f8dbab5d6ff3b23 Mon Sep 17 00:00:00 2001 From: Daniel Stenberg Date: Tue, 18 Oct 2005 07:26:43 +0000 Subject: Mohun Biswas' suggested change to prevent GNU indent to warn on the =-1 line. --- include/curl/multi.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'include') diff --git a/include/curl/multi.h b/include/curl/multi.h index fe34a423d..d940571a2 100644 --- a/include/curl/multi.h +++ b/include/curl/multi.h @@ -91,7 +91,7 @@ typedef int curl_socket_t; #endif /* HAVE_CURL_MULTI_SOCKET */ typedef enum { - CURLM_CALL_MULTI_PERFORM=-1, /* please call curl_multi_perform() soon */ + CURLM_CALL_MULTI_PERFORM = -1, /* please call curl_multi_perform() soon */ CURLM_OK, CURLM_BAD_HANDLE, /* the passed-in handle is not a valid CURLM handle */ CURLM_BAD_EASY_HANDLE, /* an easy handle was not good/valid */ -- cgit v1.2.1 From fdf9900114a534c6f133b7c496f85cb33d042582 Mon Sep 17 00:00:00 2001 From: Daniel Stenberg Date: Mon, 28 Nov 2005 07:43:53 +0000 Subject: added note about the inclusion of curl.h from within this file --- include/curl/multi.h | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to 'include') diff --git a/include/curl/multi.h b/include/curl/multi.h index d940571a2..96c2763ef 100644 --- a/include/curl/multi.h +++ b/include/curl/multi.h @@ -66,6 +66,15 @@ #include #endif +/* + * This header file should not really need to include "curl.h" since curl.h + * itself includes this file and we expect user applications to do #include + * without the need for especially including multi.h. + * + * For some reason we added this include here at one point, and rather than to + * break existing (wrongly written) libcurl applications, we leave it as-is + * but with this warning attached. + */ #include "curl.h" #ifdef __cplusplus -- cgit v1.2.1 From 0fd282b078ace39aa03bc4be280129130b537d0c Mon Sep 17 00:00:00 2001 From: Daniel Stenberg Date: Mon, 28 Nov 2005 23:06:00 +0000 Subject: new experimental "ftp method" code --- include/curl/curl.h | 3 +++ 1 file changed, 3 insertions(+) (limited to 'include') diff --git a/include/curl/curl.h b/include/curl/curl.h index 48c896119..1034ffb95 100644 --- a/include/curl/curl.h +++ b/include/curl/curl.h @@ -909,6 +909,9 @@ typedef enum { control connection. */ CINIT(FTP_SKIP_PASV_IP, LONG, 137), + /* Select "file method" to use when doing FTP */ + CINIT(FTP_FILEMETHOD, LONG, 138), + CURLOPT_LASTENTRY /* the last unused */ } CURLoption; -- cgit v1.2.1 From 21709e15575e9afa4e6435bb279d90854cf9f163 Mon Sep 17 00:00:00 2001 From: Daniel Stenberg Date: Fri, 2 Dec 2005 23:23:49 +0000 Subject: Yang Tse adjusted the multiple header inclusion prevention definition H_MPRINTF to our more used style __CURL_MPRINTF_H --- include/curl/mprintf.h | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) (limited to 'include') diff --git a/include/curl/mprintf.h b/include/curl/mprintf.h index 8559b1867..e16961ec6 100644 --- a/include/curl/mprintf.h +++ b/include/curl/mprintf.h @@ -1,3 +1,5 @@ +#ifndef __CURL_MPRINTF_H +#define __CURL_MPRINTF_H /*************************************************************************** * _ _ ____ _ * Project ___| | | | _ \| | @@ -21,9 +23,6 @@ * $Id$ ***************************************************************************/ -#ifndef H_MPRINTF -#define H_MPRINTF - #include #include /* needed for FILE */ @@ -53,4 +52,4 @@ CURL_EXTERN char *curl_mvaprintf(const char *format, va_list args); # define vaprintf curl_mvaprintf #endif -#endif /* H_MPRINTF */ +#endif /* __CURL_MPRINTF_H */ -- cgit v1.2.1 From e1269e3156d25765dd85ff0abf2a5741ea6dc6d0 Mon Sep 17 00:00:00 2001 From: Daniel Stenberg Date: Tue, 6 Dec 2005 23:36:36 +0000 Subject: start working on 7.15.2 --- include/curl/curlver.h | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'include') diff --git a/include/curl/curlver.h b/include/curl/curlver.h index 7f94670f4..e39e97324 100644 --- a/include/curl/curlver.h +++ b/include/curl/curlver.h @@ -28,13 +28,13 @@ /* This is the version number of the libcurl package from which this header file origins: */ -#define LIBCURL_VERSION "7.15.1-CVS" +#define LIBCURL_VERSION "7.15.2-CVS" /* The numeric version number is also available "in parts" by using these defines: */ #define LIBCURL_VERSION_MAJOR 7 #define LIBCURL_VERSION_MINOR 15 -#define LIBCURL_VERSION_PATCH 1 +#define LIBCURL_VERSION_PATCH 2 /* 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,6 +51,6 @@ 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 0x070f01 +#define LIBCURL_VERSION_NUM 0x070f02 #endif /* __CURL_CURLVER_H */ -- cgit v1.2.1 From ce95eee903ae275bd7330ced83a7f28f50b9dce3 Mon Sep 17 00:00:00 2001 From: Dan Fandrich Date: Mon, 12 Dec 2005 17:11:23 +0000 Subject: lcc isn't Windows-only, so check for it in conjunction with WIN32 --- include/curl/curl.h | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'include') diff --git a/include/curl/curl.h b/include/curl/curl.h index 1034ffb95..2d4201f17 100644 --- a/include/curl/curl.h +++ b/include/curl/curl.h @@ -67,7 +67,7 @@ extern "C" { * format strings when outputting a variable of type curl_off_t. */ -#if defined(_MSC_VER) || defined(__LCC__) +#if defined(_MSC_VER) || (defined(__LCC__) && defined(WIN32)) /* MSVC */ #ifdef _WIN32_WCE typedef long curl_off_t; @@ -76,7 +76,7 @@ extern "C" { typedef signed __int64 curl_off_t; #define CURL_FORMAT_OFF_T "%I64d" #endif -#else /* _MSC_VER || __LCC__ */ +#else /* _MSC_VER || (defined(__LCC__) && defined(WIN32)) */ #if (defined(__GNUC__) && defined(WIN32)) || defined(__WATCOMC__) /* gcc on windows or Watcom */ typedef long long curl_off_t; @@ -108,7 +108,7 @@ extern "C" { #define CURL_FORMAT_OFF_T "%ld" #endif #endif /* GCC or Watcom on Windows */ -#endif /* _MSC_VER || __LCC__ */ +#endif /* _MSC_VER || (defined(__LCC__) && defined(WIN32)) */ #ifdef UNDEF_FILE_OFFSET_BITS /* this was defined above for our checks, undefine it again */ -- cgit v1.2.1 From d6c5d24af3627ec12721e7d286d426ed12901b55 Mon Sep 17 00:00:00 2001 From: Yang Tse Date: Sun, 18 Dec 2005 15:36:14 +0000 Subject: Cleanup windows header includes. Where aplicable, inclusion of windows.h winsock.h winsock2.h ws2tcpip.h is done in setup.h --- include/curl/multi.h | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) (limited to 'include') diff --git a/include/curl/multi.h b/include/curl/multi.h index 96c2763ef..35cf34885 100644 --- a/include/curl/multi.h +++ b/include/curl/multi.h @@ -45,11 +45,7 @@ #if defined(WIN32) && !defined(_WIN32_WCE) && !defined(__GNUC__) || \ 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 -#endif + #else /* HP-UX systems version 9, 10 and 11 lack sys/select.h and so does oldish -- cgit v1.2.1 From e6b98d315254788e8fabceba840da3f6dfd6fbd5 Mon Sep 17 00:00:00 2001 From: Yang Tse Date: Mon, 19 Dec 2005 00:15:04 +0000 Subject: Undo previous change. This header file belongs to the public interface and the change could break the compilation of thrid party apps which link against this library. --- include/curl/multi.h | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'include') diff --git a/include/curl/multi.h b/include/curl/multi.h index 35cf34885..96c2763ef 100644 --- a/include/curl/multi.h +++ b/include/curl/multi.h @@ -45,7 +45,11 @@ #if defined(WIN32) && !defined(_WIN32_WCE) && !defined(__GNUC__) || \ 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 +#endif #else /* HP-UX systems version 9, 10 and 11 lack sys/select.h and so does oldish -- cgit v1.2.1 From 9e61dfe85e618c701b19cf5b83034578924b235c Mon Sep 17 00:00:00 2001 From: Gisle Vanem Date: Tue, 20 Dec 2005 22:20:42 +0000 Subject: Changes for PellesC compiler under Win32. --- include/curl/curl.h | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) (limited to 'include') diff --git a/include/curl/curl.h b/include/curl/curl.h index 2d4201f17..0ac3f28ea 100644 --- a/include/curl/curl.h +++ b/include/curl/curl.h @@ -65,9 +65,11 @@ extern "C" { * We want the typedef curl_off_t setup for large file support on all * platforms. We also provide a CURL_FORMAT_OFF_T define to use in *printf * format strings when outputting a variable of type curl_off_t. + * + * Note: "pocc -Ze" is MSVC compatibily mode and this sets _MSC_VER! */ -#if defined(_MSC_VER) || (defined(__LCC__) && defined(WIN32)) +#if (defined(_MSC_VER) && !defined(__POCC__)) || (defined(__LCC__) && defined(WIN32)) /* MSVC */ #ifdef _WIN32_WCE typedef long curl_off_t; @@ -76,7 +78,7 @@ extern "C" { typedef signed __int64 curl_off_t; #define CURL_FORMAT_OFF_T "%I64d" #endif -#else /* _MSC_VER || (defined(__LCC__) && defined(WIN32)) */ +#else /* (_MSC_VER && !__POCC__) || (__LCC__ && WIN32) */ #if (defined(__GNUC__) && defined(WIN32)) || defined(__WATCOMC__) /* gcc on windows or Watcom */ typedef long long curl_off_t; @@ -108,7 +110,7 @@ extern "C" { #define CURL_FORMAT_OFF_T "%ld" #endif #endif /* GCC or Watcom on Windows */ -#endif /* _MSC_VER || (defined(__LCC__) && defined(WIN32)) */ +#endif /* (_MSC_VER && !__POCC__) || (__LCC__ && WIN32) */ #ifdef UNDEF_FILE_OFFSET_BITS /* this was defined above for our checks, undefine it again */ @@ -400,7 +402,8 @@ typedef enum { * platforms. */ #if defined(__STDC__) || defined(_MSC_VER) || defined(__cplusplus) || \ - defined(__HP_aCC) || defined(__BORLANDC__) || defined(__LCC__) + defined(__HP_aCC) || defined(__BORLANDC__) || defined(__LCC__) || \ + defined(__POCC__) /* This compiler is believed to have an ISO compatible preprocessor */ #define CURL_ISOCPP #else -- cgit v1.2.1 From b6e9229cf0df378185afaced7f63bee0fed21c1a Mon Sep 17 00:00:00 2001 From: Daniel Stenberg Date: Mon, 2 Jan 2006 23:37:48 +0000 Subject: Removed inaccurate comment for upcoming curl_multi_socket() and family. Modified the callback proto used for it. --- include/curl/multi.h | 47 ++--------------------------------------------- 1 file changed, 2 insertions(+), 45 deletions(-) (limited to 'include') diff --git a/include/curl/multi.h b/include/curl/multi.h index 96c2763ef..db3a70ae3 100644 --- a/include/curl/multi.h +++ b/include/curl/multi.h @@ -250,50 +250,8 @@ CURL_EXTERN const char *curl_multi_strerror(CURLMcode); * * Desc: An alternative version of curl_multi_perform() that allows the * application to pass in one of the file descriptors that have been - * detected to have "action" on them and let libcurl perform. This - * allows libcurl to not have to scan through all possible file - * descriptors to check for this. The app is recommended to pass in - * the 'easy' argument (or set it to CURL_EASY_NONE) to make libcurl - * figure out the internal structure even faster and easier. If the - * easy argument is set to something else than CURL_EASY_NONE, the - * 's' (socket) argument will be ignored by libcurl. - * - * It also informs the application about updates in the socket (file - * descriptor) status by doing none, one or multiple calls to the - * curl_socket_callback. It thus updates the status with changes - * since the previous time this function was used. If 'callback' is - * NULL, no callback will be called. A status change may also be a - * new timeout only, having the same IN/OUT status as before. - * - * If a previous wait for socket action(s) timed out, you should call - * this function with the socket argument set to - * CURL_SOCKET_TIMEOUT. If you want to force libcurl to (re-)check - * all its internal sockets, and call the callback with status for - * all sockets no matter what the previous state is, you call - * curl_multi_socket_all() instead. - * - * curl_multi_perform() is thus the equivalent of calling - * curl_multi_socket_all(handle, NULL, NULL); - * - * IMPLEMENTATION: libcurl will need an internal hash table to map - * socket numbers to internal easy handles for the cases when 'easy' - * is set to CURL_EASY_NONE. - * - * Regarding the timeout argument in the callback: it is the timeout - * (in milliseconds) for waiting on action on this socket (and the - * given time period starts when the callback is called) until you - * should call curl_multi_socket() with the timeout stuff mentioned - * above. If "actions" happens on the socket before the timeout - * happens, remember that the timout timer keeps ticking until told - * otherwise. - * - * The "what" argument has one of five values: - * - * 0 CURL_POLL_NONE (0) - register, not interested in readiness - * 1 CURL_POLL_IN - register, interested in read readiness - * 2 CURL_POLL_OUT - register, interested in write readiness - * 3 CURL_POLL_INOUT - register, interested in both - * 4 CURL_POLL_REMOVE - deregister + * detected to have "action" on them and let libcurl perform. + * See man page for details. */ #define CURL_POLL_NONE 0 #define CURL_POLL_IN 1 @@ -308,7 +266,6 @@ CURL_EXTERN const char *curl_multi_strerror(CURLMcode); typedef int (*curl_socket_callback)(CURL *easy, /* easy handle */ curl_socket_t s, /* socket */ int what, /* see above */ - long ms, /* timeout for wait */ void *userp); /* "private" pointer */ CURLMcode curl_multi_socket(CURLM *multi_handle, -- cgit v1.2.1 From bda1e9aeab019d003036a3ec24193605bc191b3a Mon Sep 17 00:00:00 2001 From: Daniel Stenberg Date: Mon, 9 Jan 2006 13:17:14 +0000 Subject: Made the copyright year match the latest modification's year. --- include/curl/mprintf.h | 2 +- include/curl/multi.h | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) (limited to 'include') diff --git a/include/curl/mprintf.h b/include/curl/mprintf.h index e16961ec6..0067971b7 100644 --- a/include/curl/mprintf.h +++ b/include/curl/mprintf.h @@ -7,7 +7,7 @@ * | (__| |_| | _ <| |___ * \___|\___/|_| \_\_____| * - * Copyright (C) 1998 - 2004, Daniel Stenberg, , et al. + * Copyright (C) 1998 - 2005, 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 diff --git a/include/curl/multi.h b/include/curl/multi.h index db3a70ae3..27d44dca9 100644 --- a/include/curl/multi.h +++ b/include/curl/multi.h @@ -7,7 +7,7 @@ * | (__| |_| | _ <| |___ * \___|\___/|_| \_\_____| * - * Copyright (C) 1998 - 2005, Daniel Stenberg, , et al. + * Copyright (C) 1998 - 2006, 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 -- cgit v1.2.1 From c44d2498e3aa97740e53920d429e6413b13772d0 Mon Sep 17 00:00:00 2001 From: Daniel Stenberg Date: Sat, 28 Jan 2006 13:13:58 +0000 Subject: include sys/select.h on NetBSD as well --- include/curl/multi.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'include') diff --git a/include/curl/multi.h b/include/curl/multi.h index 27d44dca9..f79dbabb9 100644 --- a/include/curl/multi.h +++ b/include/curl/multi.h @@ -55,7 +55,7 @@ /* 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(NETWARE) +#if defined(_AIX) || defined(NETWARE) || defined(__NetBSD__) #include #endif -- cgit v1.2.1 From 2fbf94b0f309de9bd9153274bb475abc744afb0a Mon Sep 17 00:00:00 2001 From: Daniel Stenberg Date: Mon, 30 Jan 2006 08:24:07 +0000 Subject: Added CURLOPT_LOCALPORT and CURLOPT_LOCALPORTRANGE to libcurl. Set with the curl tool with --local-port. Plain and simply set the range of ports to bind the local end of connections to. Implemented on to popular demand. Not extensively tested. Please let me know how it works. --- include/curl/curl.h | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) (limited to 'include') diff --git a/include/curl/curl.h b/include/curl/curl.h index 0ac3f28ea..95c478a07 100644 --- a/include/curl/curl.h +++ b/include/curl/curl.h @@ -7,7 +7,7 @@ * | (__| |_| | _ <| |___ * \___|\___/|_| \_\_____| * - * Copyright (C) 1998 - 2005, Daniel Stenberg, , et al. + * Copyright (C) 1998 - 2006, 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 @@ -915,6 +915,14 @@ typedef enum { /* Select "file method" to use when doing FTP */ CINIT(FTP_FILEMETHOD, LONG, 138), + /* Local port number to bind the socket to */ + CINIT(LOCALPORT, LONG, 139), + + /* Number of ports to try, including the first one set with LOCALPORT. + Thus, setting it to 1 will make no additional attempts but the first. + */ + CINIT(LOCALPORTRANGE, LONG, 140), + CURLOPT_LASTENTRY /* the last unused */ } CURLoption; -- cgit v1.2.1 From 87bcb6f3775a437579c7526d0972c714c2e5d31d Mon Sep 17 00:00:00 2001 From: Daniel Stenberg Date: Sat, 11 Feb 2006 22:35:16 +0000 Subject: Karl M added the CURLOPT_CONNECT_ONLY and CURLINFO_LASTSOCKET options that an app can use to let libcurl only connect to a remote host and then extract the socket from libcurl. libcurl will then not attempt to do any transfer at all after the connect is done. --- include/curl/curl.h | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) (limited to 'include') diff --git a/include/curl/curl.h b/include/curl/curl.h index 95c478a07..1ad282df8 100644 --- a/include/curl/curl.h +++ b/include/curl/curl.h @@ -923,6 +923,10 @@ typedef enum { */ CINIT(LOCALPORTRANGE, LONG, 140), + /* no transfer, set up connection and let application use the socket by + extracting it with CURLINFO_LASTSOCKET */ + CINIT(CONNECT_ONLY, LONG, 141), + CURLOPT_LASTENTRY /* the last unused */ } CURLoption; @@ -1277,9 +1281,10 @@ typedef enum { CURLINFO_NUM_CONNECTS = CURLINFO_LONG + 26, CURLINFO_SSL_ENGINES = CURLINFO_SLIST + 27, CURLINFO_COOKIELIST = CURLINFO_SLIST + 28, + CURLINFO_LASTSOCKET = CURLINFO_LONG + 29, /* Fill in new entries below here! */ - CURLINFO_LASTONE = 28 + CURLINFO_LASTONE = 29 } CURLINFO; /* CURLINFO_RESPONSE_CODE is the new name for the option previously known as -- cgit v1.2.1 From b10aa95d2835ff8745a9495f2c9687ee5aa6221a Mon Sep 17 00:00:00 2001 From: Daniel Stenberg Date: Mon, 27 Feb 2006 18:14:14 +0000 Subject: start over on what might become 7.15.3 --- include/curl/curlver.h | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'include') diff --git a/include/curl/curlver.h b/include/curl/curlver.h index e39e97324..7ecdd5475 100644 --- a/include/curl/curlver.h +++ b/include/curl/curlver.h @@ -7,7 +7,7 @@ * | (__| |_| | _ <| |___ * \___|\___/|_| \_\_____| * - * Copyright (C) 1998 - 2005, Daniel Stenberg, , et al. + * Copyright (C) 1998 - 2006, 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 @@ -28,13 +28,13 @@ /* This is the version number of the libcurl package from which this header file origins: */ -#define LIBCURL_VERSION "7.15.2-CVS" +#define LIBCURL_VERSION "7.15.3-CVS" /* The numeric version number is also available "in parts" by using these defines: */ #define LIBCURL_VERSION_MAJOR 7 #define LIBCURL_VERSION_MINOR 15 -#define LIBCURL_VERSION_PATCH 2 +#define LIBCURL_VERSION_PATCH 3 /* 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,6 +51,6 @@ 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 0x070f02 +#define LIBCURL_VERSION_NUM 0x070f03 #endif /* __CURL_CURLVER_H */ -- cgit v1.2.1 From bac52f3969738c81c90a8cb09805d38509ca3297 Mon Sep 17 00:00:00 2001 From: Daniel Stenberg Date: Tue, 14 Mar 2006 00:05:15 +0000 Subject: --ftp-method and CURLOPT_FTP_FILEMETHOD are now documented and usable --- include/curl/curl.h | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) (limited to 'include') diff --git a/include/curl/curl.h b/include/curl/curl.h index 1ad282df8..d531ba637 100644 --- a/include/curl/curl.h +++ b/include/curl/curl.h @@ -381,6 +381,15 @@ typedef enum { CURLFTPAUTH_LAST /* not an option, never use */ } curl_ftpauth; +/* parameter for the CURLOPT_FTP_FILEMETHOD option */ +typedef enum { + CURLFTPMETHOD_DEFAULT, /* let libcurl pick */ + CURLFTPMETHOD_MULTICWD, /* single CWD operation for each path part */ + CURLFTPMETHOD_NOCWD, /* no CWD at all */ + CURLFTPMETHOD_SINGLECWD, /* one CWD to full dir, then work on file */ + CURLFTPMETHOD_LAST /* not an option, never use */ +} curl_ftpmethod; + /* long may be 32 or 64 bits, but we should never depend on anything else but 32 */ #define CURLOPTTYPE_LONG 0 @@ -912,7 +921,8 @@ typedef enum { control connection. */ CINIT(FTP_SKIP_PASV_IP, LONG, 137), - /* Select "file method" to use when doing FTP */ + /* Select "file method" to use when doing FTP, see the curl_ftpmethod + above. */ CINIT(FTP_FILEMETHOD, LONG, 138), /* Local port number to bind the socket to */ -- cgit v1.2.1 From b8fad99f09a1543ce74ed06265053e986584a79e Mon Sep 17 00:00:00 2001 From: Daniel Stenberg Date: Mon, 20 Mar 2006 09:03:09 +0000 Subject: start working towards 7.15.4 --- include/curl/curlver.h | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'include') diff --git a/include/curl/curlver.h b/include/curl/curlver.h index 7ecdd5475..e61a2a739 100644 --- a/include/curl/curlver.h +++ b/include/curl/curlver.h @@ -28,13 +28,13 @@ /* This is the version number of the libcurl package from which this header file origins: */ -#define LIBCURL_VERSION "7.15.3-CVS" +#define LIBCURL_VERSION "7.15.4-CVS" /* The numeric version number is also available "in parts" by using these defines: */ #define LIBCURL_VERSION_MAJOR 7 #define LIBCURL_VERSION_MINOR 15 -#define LIBCURL_VERSION_PATCH 3 +#define LIBCURL_VERSION_PATCH 4 /* 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,6 +51,6 @@ 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 0x070f03 +#define LIBCURL_VERSION_NUM 0x070f04 #endif /* __CURL_CURLVER_H */ -- cgit v1.2.1 From 598ffeea891c4cdd644b48477d54ae714cce0291 Mon Sep 17 00:00:00 2001 From: Daniel Stenberg Date: Tue, 21 Mar 2006 22:30:03 +0000 Subject: David McCreedy added CURLINFO_FTP_ENTRY_PATH to export the FTP entry path --- include/curl/curl.h | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'include') diff --git a/include/curl/curl.h b/include/curl/curl.h index d531ba637..b4043a2c4 100644 --- a/include/curl/curl.h +++ b/include/curl/curl.h @@ -1292,9 +1292,10 @@ typedef enum { CURLINFO_SSL_ENGINES = CURLINFO_SLIST + 27, CURLINFO_COOKIELIST = CURLINFO_SLIST + 28, CURLINFO_LASTSOCKET = CURLINFO_LONG + 29, + CURLINFO_FTP_ENTRY_PATH = CURLINFO_STRING + 30, /* Fill in new entries below here! */ - CURLINFO_LASTONE = 29 + CURLINFO_LASTONE = 30 } CURLINFO; /* CURLINFO_RESPONSE_CODE is the new name for the option previously known as -- cgit v1.2.1 From 0ff1faf7f289134c833b91c252cc0138248c5b26 Mon Sep 17 00:00:00 2001 From: Daniel Stenberg Date: Tue, 28 Mar 2006 10:08:54 +0000 Subject: for the CURLDEBUG case, we redefine sprintf and vsprintf to make us notice if any use of such a function slip through --- include/curl/mprintf.h | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) (limited to 'include') diff --git a/include/curl/mprintf.h b/include/curl/mprintf.h index 0067971b7..6ba9ea8bf 100644 --- a/include/curl/mprintf.h +++ b/include/curl/mprintf.h @@ -7,7 +7,7 @@ * | (__| |_| | _ <| |___ * \___|\___/|_| \_\_____| * - * Copyright (C) 1998 - 2005, Daniel Stenberg, , et al. + * Copyright (C) 1998 - 2006, 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 @@ -42,11 +42,18 @@ CURL_EXTERN char *curl_mvaprintf(const char *format, va_list args); #ifdef _MPRINTF_REPLACE # define printf curl_mprintf # define fprintf curl_mfprintf +#ifdef CURLDEBUG +/* When built with CURLDEBUG we define away the sprintf() functions since we + don't want internal code to be using them */ +# define sprintf sprintf_was_used +# define vsprintf vsprintf_was_used +#else # define sprintf curl_msprintf +# define vsprintf curl_mvsprintf +#endif # define snprintf curl_msnprintf # define vprintf curl_mvprintf # define vfprintf curl_mvfprintf -# define vsprintf curl_mvsprintf # define vsnprintf curl_mvsnprintf # define aprintf curl_maprintf # define vaprintf curl_mvaprintf -- cgit v1.2.1 From 5a4b43848ac21b3d831f00ce11136e20f820f0a0 Mon Sep 17 00:00:00 2001 From: Daniel Stenberg Date: Fri, 7 Apr 2006 21:50:47 +0000 Subject: First commit of David McCreedy's EBCDIC and TPF changes. --- include/curl/curl.h | 50 ++++++++++++++++++++++++++++++++++++++++++++++---- 1 file changed, 46 insertions(+), 4 deletions(-) (limited to 'include') diff --git a/include/curl/curl.h b/include/curl/curl.h index b4043a2c4..14999c49e 100644 --- a/include/curl/curl.h +++ b/include/curl/curl.h @@ -268,6 +268,10 @@ typedef enum { CURLE_FTP_COULDNT_STOR_FILE, /* 25 - failed FTP upload */ CURLE_READ_ERROR, /* 26 - could open/read from file */ CURLE_OUT_OF_MEMORY, /* 27 */ + /* Note: CURLE_OUT_OF_MEMORY may sometimes indicate a conversion error + instead of a memory allocation error if CURL_DOES_CONVERSIONS + is defined + */ CURLE_OPERATION_TIMEOUTED, /* 28 - the timeout time was reached */ CURLE_FTP_COULDNT_SET_ASCII, /* 29 - TYPE A failed */ CURLE_FTP_PORT_FAILED, /* 30 - FTP PORT operation failed */ @@ -318,9 +322,18 @@ typedef enum { CURLE_TFTP_UNKNOWNID, /* 72 - Unknown transfer ID */ CURLE_TFTP_EXISTS, /* 73 - File already exists */ CURLE_TFTP_NOSUCHUSER, /* 74 - No such user */ + CURLE_CONV_FAILED, /* 75 - conversion failed */ + CURLE_CONV_REQD, /* 76 - caller must register conversion + callbacks using curl_easy_setopt options + CURLOPT_CONV_FROM_NETWORK_FUNCTION, + CURLOPT_CONV_TO_NETWORK_FUNCTION, and + CURLOPT_CONV_FROM_UTF8_FUNCTION */ CURL_LAST /* never use! */ } CURLcode; +/* This prototype applies to all conversion callbacks */ +typedef CURLcode (*curl_conv_callback)(char *buffer, size_t length); + typedef CURLcode (*curl_ssl_ctx_callback)(CURL *curl, /* easy handle */ void *ssl_ctx, /* actually an OpenSSL SSL_CTX */ @@ -937,6 +950,19 @@ typedef enum { extracting it with CURLINFO_LASTSOCKET */ CINIT(CONNECT_ONLY, LONG, 141), + /* Function that will be called to convert from the + network encoding (instead of using the iconv calls in libcurl) */ + CINIT(CONV_FROM_NETWORK_FUNCTION, FUNCTIONPOINT, 142), + + /* Function that will be called to convert to the + network encoding (instead of using the iconv calls in libcurl) */ + CINIT(CONV_TO_NETWORK_FUNCTION, FUNCTIONPOINT, 143), + + /* Function that will be called to convert from UTF8 + (instead of using the iconv calls in libcurl) + Note that this is used only for SSL certificate processing */ + CINIT(CONV_FROM_UTF8_FUNCTION, FUNCTIONPOINT, 144), + CURLOPT_LASTENTRY /* the last unused */ } CURLoption; @@ -1146,7 +1172,7 @@ CURL_EXTERN char *curl_getenv(const char *variable); CURL_EXTERN char *curl_version(void); /* - * NAME curl_escape() + * NAME curl_easy_escape() * * DESCRIPTION * @@ -1154,18 +1180,34 @@ CURL_EXTERN char *curl_version(void); * %XX versions). This function returns a new allocated string or NULL if an * error occurred. */ -CURL_EXTERN char *curl_escape(const char *string, int length); +CURL_EXTERN char *curl_easy_escape(CURL *handle, + const char *string, + int length); + +/* the previous version: */ +CURL_EXTERN char *curl_escape(const char *string, + int length); + /* - * NAME curl_unescape() + * NAME curl_easy_unescape() * * DESCRIPTION * * Unescapes URL encoding in strings (converts all %XX codes to their 8bit * versions). This function returns a new allocated string or NULL if an error * occurred. + * Conversion Note: On non-ASCII platforms the ASCII %XX codes are + * converted into the host encoding. */ -CURL_EXTERN char *curl_unescape(const char *string, int length); +CURL_EXTERN char *curl_easy_unescape(CURL *handle, + const char *string, + int length, + int *outlength); + +/* the previous version */ +CURL_EXTERN char *curl_unescape(const char *string, + int length); /* * NAME curl_free() -- cgit v1.2.1 From a21a77d2308157dc6058f4356b2d29008e5bc155 Mon Sep 17 00:00:00 2001 From: Daniel Stenberg Date: Sun, 9 Apr 2006 22:41:22 +0000 Subject: CURLE_FTP_USER_PASSWORD_INCORRECT is not returned by libcurl anymore! --- include/curl/curl.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'include') diff --git a/include/curl/curl.h b/include/curl/curl.h index 14999c49e..87639fec4 100644 --- a/include/curl/curl.h +++ b/include/curl/curl.h @@ -242,7 +242,7 @@ typedef enum { CURLE_UNSUPPORTED_PROTOCOL, /* 1 */ CURLE_FAILED_INIT, /* 2 */ CURLE_URL_MALFORMAT, /* 3 */ - CURLE_URL_MALFORMAT_USER, /* 4 (NOT USED) */ + CURLE_URL_MALFORMAT_USER, /* 4 - NOT USED */ CURLE_COULDNT_RESOLVE_PROXY, /* 5 */ CURLE_COULDNT_RESOLVE_HOST, /* 6 */ CURLE_COULDNT_CONNECT, /* 7 */ @@ -250,7 +250,7 @@ typedef enum { CURLE_FTP_ACCESS_DENIED, /* 9 a service was denied by the FTP server due to lack of access - when login fails this is not returned. */ - CURLE_FTP_USER_PASSWORD_INCORRECT, /* 10 */ + CURLE_FTP_USER_PASSWORD_INCORRECT, /* 10 - NOT USED */ CURLE_FTP_WEIRD_PASS_REPLY, /* 11 */ CURLE_FTP_WEIRD_USER_REPLY, /* 12 */ CURLE_FTP_WEIRD_PASV_REPLY, /* 13 */ -- cgit v1.2.1 From 778b6a86c0f25e6e0862f4b8afae3fdd67ae839b Mon Sep 17 00:00:00 2001 From: Daniel Stenberg Date: Mon, 10 Apr 2006 13:12:52 +0000 Subject: curl_multi_socket() updates --- include/curl/multi.h | 53 ++++++++++++++++++++++++++++++++++++---------------- 1 file changed, 37 insertions(+), 16 deletions(-) (limited to 'include') diff --git a/include/curl/multi.h b/include/curl/multi.h index f79dbabb9..6ce682690 100644 --- a/include/curl/multi.h +++ b/include/curl/multi.h @@ -83,8 +83,6 @@ extern "C" { typedef void CURLM; -#ifdef HAVE_CURL_MULTI_SOCKET /* this is not set by anything yet */ - #ifndef curl_socket_typedef /* Public socket typedef */ #ifdef WIN32 @@ -97,8 +95,6 @@ typedef int curl_socket_t; #define curl_socket_typedef #endif /* curl_socket_typedef */ -#endif /* HAVE_CURL_MULTI_SOCKET */ - typedef enum { CURLM_CALL_MULTI_PERFORM = -1, /* please call curl_multi_perform() soon */ CURLM_OK, @@ -106,6 +102,8 @@ typedef enum { CURLM_BAD_EASY_HANDLE, /* an easy handle was not good/valid */ CURLM_OUT_OF_MEMORY, /* if you ever get this, you're in deep sh*t */ CURLM_INTERNAL_ERROR, /* this is a libcurl bug */ + CURLM_BAD_SOCKET, /* the passed in socket argument did not match */ + CURLM_UNKNOWN_OPTION, /* curl_multi_setopt() with unsupported option */ CURLM_LAST } CURLMcode; @@ -243,7 +241,6 @@ CURL_EXTERN CURLMsg *curl_multi_info_read(CURLM *multi_handle, */ CURL_EXTERN const char *curl_multi_strerror(CURLMcode); -#ifdef HAVE_CURL_MULTI_SOCKET /* * Name: curl_multi_socket() and * curl_multi_socket_all() @@ -259,8 +256,6 @@ CURL_EXTERN const char *curl_multi_strerror(CURLMcode); #define CURL_POLL_INOUT 3 #define CURL_POLL_REMOVE 4 -#define CURL_EASY_NONE (CURL *)0 -#define CURL_EASY_TIMEOUT (CURL *)0 #define CURL_SOCKET_TIMEOUT CURL_SOCKET_BAD typedef int (*curl_socket_callback)(CURL *easy, /* easy handle */ @@ -268,15 +263,9 @@ typedef int (*curl_socket_callback)(CURL *easy, /* easy handle */ int what, /* see above */ void *userp); /* "private" pointer */ -CURLMcode curl_multi_socket(CURLM *multi_handle, - curl_socket_t s, - CURL *easy, - curl_socket_callback callback, - void *userp); /* passed to callback */ +CURLMcode curl_multi_socket(CURLM *multi_handle, curl_socket_t s); -CURLMcode curl_multi_socket_all(CURLM *multi_handle, - curl_socket_callback callback, - void *userp); /* passed to callback */ +CURLMcode curl_multi_socket_all(CURLM *multi_handle); /* * Name: curl_multi_timeout() @@ -289,7 +278,39 @@ CURLMcode curl_multi_socket_all(CURLM *multi_handle, */ CURLMcode curl_multi_timeout(CURLM *multi_handle, long *milliseconds); -#endif /* HAVE_CURL_MULTI_SOCKET */ +#undef CINIT /* re-using the same name as in curl.h */ + +#ifdef CURL_ISOCPP +#define CINIT(name,type,number) CURLMOPT_ ## name = CURLOPTTYPE_ ## type + number +#else +/* The macro "##" is ISO C, we assume pre-ISO C doesn't support it. */ +#define LONG CURLOPTTYPE_LONG +#define OBJECTPOINT CURLOPTTYPE_OBJECTPOINT +#define FUNCTIONPOINT CURLOPTTYPE_FUNCTIONPOINT +#define OFF_T CURLOPTTYPE_OFF_T +#define CINIT(name,type,number) CURLMOPT_/**/name = type + number +#endif + +typedef enum { + /* This is the socket callback function pointer */ + CINIT(SOCKETFUNCTION, FUNCTIONPOINT, 1), + + /* This is the argument passed to the socket callback */ + CINIT(SOCKETDATA, OBJECTPOINT, 2), + + CURLMOPT_LASTENTRY /* the last unused */ +} CURLMoption; + + +/* + * Name: curl_multi_setopt() + * + * Desc: Sets options for the multi handle. + * + * Returns: CURLM error code. + */ +CURLMcode curl_multi_setopt(CURLM *multi_handle, + CURLMoption option, ...); #ifdef __cplusplus } /* end of extern "C" */ -- cgit v1.2.1 From f191b143e99d26a1d68537a30fd3e8723060f674 Mon Sep 17 00:00:00 2001 From: Daniel Stenberg Date: Wed, 19 Apr 2006 09:03:21 +0000 Subject: CURL_VERSION_CONV is returned by curl_version_info if libcurl has been built to allow/support character conversions --- include/curl/curl.h | 2 ++ 1 file changed, 2 insertions(+) (limited to 'include') diff --git a/include/curl/curl.h b/include/curl/curl.h index 87639fec4..9c392cce6 100644 --- a/include/curl/curl.h +++ b/include/curl/curl.h @@ -1474,6 +1474,8 @@ typedef struct { #define CURL_VERSION_LARGEFILE (1<<9) /* supports files bigger than 2GB */ #define CURL_VERSION_IDN (1<<10) /* International Domain Names support */ #define CURL_VERSION_SSPI (1<<11) /* SSPI is supported */ +#define CURL_VERSION_CONV (1<<12) /* character conversions are + supported */ /* * NAME curl_version_info() -- cgit v1.2.1 From c14a84e6f29efe248e59b6910924a35bcbc74384 Mon Sep 17 00:00:00 2001 From: Gisle Vanem Date: Wed, 26 Apr 2006 17:04:47 +0000 Subject: Added SalfordC support. --- include/curl/curl.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'include') diff --git a/include/curl/curl.h b/include/curl/curl.h index 9c392cce6..94c4551e0 100644 --- a/include/curl/curl.h +++ b/include/curl/curl.h @@ -425,7 +425,7 @@ typedef enum { */ #if defined(__STDC__) || defined(_MSC_VER) || defined(__cplusplus) || \ defined(__HP_aCC) || defined(__BORLANDC__) || defined(__LCC__) || \ - defined(__POCC__) + defined(__POCC__) || defined(__SALFORDC__) /* This compiler is believed to have an ISO compatible preprocessor */ #define CURL_ISOCPP #else -- cgit v1.2.1 From 4c6c76842269a4c386440070dd438f738b99b3cc Mon Sep 17 00:00:00 2001 From: Daniel Stenberg Date: Mon, 12 Jun 2006 07:24:14 +0000 Subject: starting the journey towards the next release --- include/curl/curlver.h | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'include') diff --git a/include/curl/curlver.h b/include/curl/curlver.h index e61a2a739..ecf2bd66a 100644 --- a/include/curl/curlver.h +++ b/include/curl/curlver.h @@ -28,13 +28,13 @@ /* This is the version number of the libcurl package from which this header file origins: */ -#define LIBCURL_VERSION "7.15.4-CVS" +#define LIBCURL_VERSION "7.15.5-CVS" /* The numeric version number is also available "in parts" by using these defines: */ #define LIBCURL_VERSION_MAJOR 7 #define LIBCURL_VERSION_MINOR 15 -#define LIBCURL_VERSION_PATCH 4 +#define LIBCURL_VERSION_PATCH 5 /* 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,6 +51,6 @@ 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 0x070f04 +#define LIBCURL_VERSION_NUM 0x070f05 #endif /* __CURL_CURLVER_H */ -- cgit v1.2.1 From 59582a9d9dccada1cdc492168e089dc91f17b4fe Mon Sep 17 00:00:00 2001 From: Dan Fandrich Date: Mon, 12 Jun 2006 20:33:04 +0000 Subject: Implemented --enable-hidden-symbols configure option to enable -fvisibility=hidden on gcc >= 4.0. This reduces the size of the libcurl binary and speeds up dynamic linking by hiding all the internal symbols from the symbol table. --- include/curl/curl.h | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) (limited to 'include') diff --git a/include/curl/curl.h b/include/curl/curl.h index 94c4551e0..bd9236ed3 100644 --- a/include/curl/curl.h +++ b/include/curl/curl.h @@ -58,7 +58,17 @@ extern "C" { #define CURL_EXTERN __declspec(dllimport) #endif #else -#define CURL_EXTERN + +#ifdef CURL_HIDDEN_SYMBOLS +/* + * On gcc >= 4 if -fvisibility=hidden is given then this is used to cause + * external definitions to be put into the shared library. It makes no + * difference to applications whether this is set or not, only the library. + */ +#define CURL_EXTERN __attribute__ ((visibility ("default"))) +#else +#define CURL_EXTERN +#endif #endif /* -- cgit v1.2.1 From dfe1884c2529d728750d0824f73055627673cd72 Mon Sep 17 00:00:00 2001 From: Daniel Stenberg Date: Thu, 22 Jun 2006 21:36:53 +0000 Subject: Peter Silva introduced CURLOPT_MAX_SEND_SPEED_LARGE and CURLOPT_MAX_RECV_SPEED_LARGE that limit tha maximum rate libcurl is allowed to send or receive data. This kind of adds the the command line tool's option --limit-rate to the library. The rate limiting logic in the curl app is now removed and is instead provided by libcurl itself. Transfer rate limiting will now also work for -d and -F, which it didn't before. --- include/curl/curl.h | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'include') diff --git a/include/curl/curl.h b/include/curl/curl.h index bd9236ed3..79e71ca0a 100644 --- a/include/curl/curl.h +++ b/include/curl/curl.h @@ -973,6 +973,11 @@ typedef enum { Note that this is used only for SSL certificate processing */ CINIT(CONV_FROM_UTF8_FUNCTION, FUNCTIONPOINT, 144), + /* if the connection proceeds too quickly then need to slow it down */ + /* limit-rate: maximum number of bytes per second to send or receive */ + CINIT(MAX_SEND_SPEED_LARGE, OFF_T, 145), + CINIT(MAX_RECV_SPEED_LARGE, OFF_T, 146), + CURLOPT_LASTENTRY /* the last unused */ } CURLoption; -- cgit v1.2.1 From 37f4877e569cdd0d1afa6bb0d7cd3a463ee75ac9 Mon Sep 17 00:00:00 2001 From: Daniel Stenberg Date: Sat, 24 Jun 2006 21:46:41 +0000 Subject: Michael Wallner added curl_formget(), which allows an application to extract (serialise) a previously built formpost (as with curl_formadd()). --- include/curl/curl.h | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) (limited to 'include') diff --git a/include/curl/curl.h b/include/curl/curl.h index 79e71ca0a..1a118a36c 100644 --- a/include/curl/curl.h +++ b/include/curl/curl.h @@ -1158,6 +1158,26 @@ CURL_EXTERN CURLFORMcode curl_formadd(struct curl_httppost **httppost, struct curl_httppost **last_post, ...); +/* + * callback function for curl_formget() + * The void *arg pointer will be the one passed as second argument to curl_formget(). + * The character buffer passed to it must not be freed. + * Should return the buffer length passed to it as the argument "len" on success. + */ +typedef size_t (*curl_formget_callback)(void *arg, const char *buf, size_t len); + +/* + * NAME curl_formget() + * + * DESCRIPTION + * + * Serialize a curl_httppost struct built with curl_formadd(). + * Accepts a void pointer as second argument which will be passed to + * the curl_formget_callback function. + * Returns 0 on success. + */ +CURL_EXTERN int curl_formget(struct curl_httppost *form, void *arg, + curl_formget_callback append); /* * NAME curl_formfree() * -- cgit v1.2.1 From bc2f0c7dcbd22ab52971df4a419933e70f263a3f Mon Sep 17 00:00:00 2001 From: Yang Tse Date: Wed, 5 Jul 2006 23:10:37 +0000 Subject: Prevent definition of HAVE_WINxxx_H symbols and avoid inclusion of Windows headers when compiled with Cygwin in POSIX emulation mode. --- include/curl/multi.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'include') diff --git a/include/curl/multi.h b/include/curl/multi.h index 6ce682690..4fc70640a 100644 --- a/include/curl/multi.h +++ b/include/curl/multi.h @@ -43,8 +43,8 @@ #define WIN32 1 #endif -#if defined(WIN32) && !defined(_WIN32_WCE) && !defined(__GNUC__) || \ - defined(__MINGW32__) +#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 */ -- cgit v1.2.1 From 10489879f731465f3d2105870e7533c2b355af5d Mon Sep 17 00:00:00 2001 From: Dan Fandrich Date: Tue, 11 Jul 2006 21:35:35 +0000 Subject: Enable --enable-hidden-symbols for SunPro C --- include/curl/curl.h | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) (limited to 'include') diff --git a/include/curl/curl.h b/include/curl/curl.h index 1a118a36c..b9b341dee 100644 --- a/include/curl/curl.h +++ b/include/curl/curl.h @@ -61,11 +61,12 @@ extern "C" { #ifdef CURL_HIDDEN_SYMBOLS /* - * On gcc >= 4 if -fvisibility=hidden is given then this is used to cause - * external definitions to be put into the shared library. It makes no - * difference to applications whether this is set or not, only the library. + * This definition is used to make external definitions visibile in the + * shared library when symbols are hidden by default. It makes no + * difference when compiling applications whether this is set or not, + * only when compiling the library. */ -#define CURL_EXTERN __attribute__ ((visibility ("default"))) +#define CURL_EXTERN CURL_EXTERN_SYMBOL #else #define CURL_EXTERN #endif -- cgit v1.2.1 From 2527b5301946539363754a390974cdd3a3d34485 Mon Sep 17 00:00:00 2001 From: Daniel Stenberg Date: Tue, 25 Jul 2006 22:45:21 +0000 Subject: Dan Nelson added the CURLOPT_FTP_ALTERNATIVE_TO_USER libcurl option and curl tool option named --ftp-alternative-to-user. It provides a mean to send a particular command if the normal USER/PASS approach fails. --- include/curl/curl.h | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) (limited to 'include') diff --git a/include/curl/curl.h b/include/curl/curl.h index b9b341dee..db14fe1f5 100644 --- a/include/curl/curl.h +++ b/include/curl/curl.h @@ -61,14 +61,14 @@ extern "C" { #ifdef CURL_HIDDEN_SYMBOLS /* - * This definition is used to make external definitions visibile in the + * This definition is used to make external definitions visibile in the * shared library when symbols are hidden by default. It makes no * difference when compiling applications whether this is set or not, * only when compiling the library. */ #define CURL_EXTERN CURL_EXTERN_SYMBOL #else -#define CURL_EXTERN +#define CURL_EXTERN #endif #endif @@ -979,6 +979,9 @@ typedef enum { CINIT(MAX_SEND_SPEED_LARGE, OFF_T, 145), CINIT(MAX_RECV_SPEED_LARGE, OFF_T, 146), + /* Pointer to command string to send if USER/PASS fails. */ + CINIT(FTP_ALTERNATIVE_TO_USER, OBJECTPOINT, 147), + CURLOPT_LASTENTRY /* the last unused */ } CURLoption; -- cgit v1.2.1 From 6f6b93da02019141812b81bfdbb6bcda430c3b4d Mon Sep 17 00:00:00 2001 From: Daniel Stenberg Date: Wed, 26 Jul 2006 22:19:42 +0000 Subject: [Hiper-related work] Added a function called curl_multi_assign() that will set a private pointer added to the internal libcurl hash table for the particular socket passed in to this function. --- include/curl/multi.h | 29 +++++++++++++++++++++++------ 1 file changed, 23 insertions(+), 6 deletions(-) (limited to 'include') diff --git a/include/curl/multi.h b/include/curl/multi.h index 4fc70640a..eb62446df 100644 --- a/include/curl/multi.h +++ b/include/curl/multi.h @@ -261,11 +261,14 @@ CURL_EXTERN const char *curl_multi_strerror(CURLMcode); typedef int (*curl_socket_callback)(CURL *easy, /* easy handle */ curl_socket_t s, /* socket */ int what, /* see above */ - void *userp); /* "private" pointer */ + void *userp, /* private callback + pointer */ + void *socketp); /* private socket + pointer */ -CURLMcode curl_multi_socket(CURLM *multi_handle, curl_socket_t s); +CURL_EXTERN CURLMcode curl_multi_socket(CURLM *multi_handle, curl_socket_t s); -CURLMcode curl_multi_socket_all(CURLM *multi_handle); +CURL_EXTERN CURLMcode curl_multi_socket_all(CURLM *multi_handle); /* * Name: curl_multi_timeout() @@ -276,7 +279,8 @@ CURLMcode curl_multi_socket_all(CURLM *multi_handle); * * Returns: CURLM error code. */ -CURLMcode curl_multi_timeout(CURLM *multi_handle, long *milliseconds); +CURL_EXTERN CURLMcode curl_multi_timeout(CURLM *multi_handle, + long *milliseconds); #undef CINIT /* re-using the same name as in curl.h */ @@ -309,8 +313,21 @@ typedef enum { * * Returns: CURLM error code. */ -CURLMcode curl_multi_setopt(CURLM *multi_handle, - CURLMoption option, ...); +CURL_EXTERN CURLMcode curl_multi_setopt(CURLM *multi_handle, + CURLMoption option, ...); + + +/* + * Name: curl_multi_assign() + * + * Desc: This function sets an association in the multi handle between the + * given socket and a private pointer of the application. This is + * (only) useful for curl_multi_socket uses. + * + * Returns: CURLM error code. + */ +CURL_EXTERN CURLMcode curl_multi_assign(CURLM *multi_handle, + curl_socket_t sockfd, void *sockp); #ifdef __cplusplus } /* end of extern "C" */ -- cgit v1.2.1 From 01b2cf82ec9495f36976710af0015d4cf7f529cd Mon Sep 17 00:00:00 2001 From: Daniel Stenberg Date: Sun, 30 Jul 2006 22:44:07 +0000 Subject: curl_multi_socket() and curl_multi_socket_all() got modified prototypes: they both now provide the number of running handles back to the calling function. --- include/curl/multi.h | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'include') diff --git a/include/curl/multi.h b/include/curl/multi.h index eb62446df..3c8bb9e53 100644 --- a/include/curl/multi.h +++ b/include/curl/multi.h @@ -266,9 +266,11 @@ typedef int (*curl_socket_callback)(CURL *easy, /* easy handle */ void *socketp); /* private socket pointer */ -CURL_EXTERN CURLMcode curl_multi_socket(CURLM *multi_handle, curl_socket_t s); +CURL_EXTERN CURLMcode curl_multi_socket(CURLM *multi_handle, curl_socket_t s, + int *running_handles); -CURL_EXTERN CURLMcode curl_multi_socket_all(CURLM *multi_handle); +CURL_EXTERN CURLMcode curl_multi_socket_all(CURLM *multi_handle, + int *running_handles); /* * Name: curl_multi_timeout() -- cgit v1.2.1 From 51f258d1034171173771a4705afee323560dcca3 Mon Sep 17 00:00:00 2001 From: Daniel Stenberg Date: Thu, 3 Aug 2006 21:31:23 +0000 Subject: adding CURLM_CALL_MULTI_SOCKET that's just the same as CURLM_CALL_MULTI_PERFORM --- include/curl/multi.h | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) (limited to 'include') diff --git a/include/curl/multi.h b/include/curl/multi.h index 3c8bb9e53..61842039d 100644 --- a/include/curl/multi.h +++ b/include/curl/multi.h @@ -96,7 +96,8 @@ typedef int curl_socket_t; #endif /* curl_socket_typedef */ typedef enum { - CURLM_CALL_MULTI_PERFORM = -1, /* please call curl_multi_perform() soon */ + CURLM_CALL_MULTI_PERFORM = -1, /* please call curl_multi_perform() or + curl_multi_socket*() soon */ CURLM_OK, CURLM_BAD_HANDLE, /* the passed-in handle is not a valid CURLM handle */ CURLM_BAD_EASY_HANDLE, /* an easy handle was not good/valid */ @@ -107,6 +108,11 @@ typedef enum { CURLM_LAST } CURLMcode; +/* just to make code nicer when using curl_multi_socket() you can now check + for CURLM_CALL_MULTI_SOCKET too in the same style it works for + curl_multi_perform() and CURLM_CALL_MULTI_PERFORM */ +#define CURLM_CALL_MULTI_SOCKET CURLM_CALL_MULTI_PERFORM + typedef enum { CURLMSG_NONE, /* first, not used */ CURLMSG_DONE, /* This easy handle has completed. 'result' contains -- cgit v1.2.1 From 43e4544d51ae03e6dc5bc23fe3a8d6de3aef7483 Mon Sep 17 00:00:00 2001 From: Gisle Vanem Date: Fri, 4 Aug 2006 16:05:09 +0000 Subject: Fixed typo. --- include/curl/curl.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'include') diff --git a/include/curl/curl.h b/include/curl/curl.h index db14fe1f5..0b406cfb9 100644 --- a/include/curl/curl.h +++ b/include/curl/curl.h @@ -1497,7 +1497,7 @@ typedef struct { const char *ares; int ares_num; - /* This field was aded in CURLVERSION_THIRD */ + /* This field was added in CURLVERSION_THIRD */ const char *libidn; } curl_version_info_data; -- cgit v1.2.1 From 10b7fc7e51413628d242e991396ac41bf4669777 Mon Sep 17 00:00:00 2001 From: Gisle Vanem Date: Fri, 4 Aug 2006 16:08:41 +0000 Subject: Added 'curl_version_info_data::iconv_ver_num' for iconv version. --- include/curl/curl.h | 3 +++ 1 file changed, 3 insertions(+) (limited to 'include') diff --git a/include/curl/curl.h b/include/curl/curl.h index 0b406cfb9..f4166cb58 100644 --- a/include/curl/curl.h +++ b/include/curl/curl.h @@ -1499,6 +1499,9 @@ typedef struct { /* This field was added in CURLVERSION_THIRD */ const char *libidn; + + /* Same as '_libiconv_version' if built with HAVE_ICONV */ + int iconv_ver_num; } curl_version_info_data; #define CURL_VERSION_IPV6 (1<<0) /* IPv6-enabled */ -- cgit v1.2.1 From c012e2b408db31daf8b581255724d9fde9c37135 Mon Sep 17 00:00:00 2001 From: Dan Fandrich Date: Fri, 4 Aug 2006 18:53:47 +0000 Subject: Initial stab at making libcurl compile under Minix 3. --- include/curl/multi.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'include') diff --git a/include/curl/multi.h b/include/curl/multi.h index 61842039d..925d5c007 100644 --- a/include/curl/multi.h +++ b/include/curl/multi.h @@ -55,7 +55,7 @@ /* 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(NETWARE) || defined(__NetBSD__) +#if defined(_AIX) || defined(NETWARE) || defined(__NetBSD__) || defined(_MINIX) #include #endif -- cgit v1.2.1 From eb26a581f95d208d3abcb1413bcd856a6e85a0e9 Mon Sep 17 00:00:00 2001 From: Dan Fandrich Date: Fri, 11 Aug 2006 18:11:42 +0000 Subject: Use __minix to detect Minix, which works on both ACK and GCC. --- include/curl/multi.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'include') diff --git a/include/curl/multi.h b/include/curl/multi.h index 925d5c007..6811ce798 100644 --- a/include/curl/multi.h +++ b/include/curl/multi.h @@ -55,7 +55,7 @@ /* 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(NETWARE) || defined(__NetBSD__) || defined(_MINIX) +#if defined(_AIX) || defined(NETWARE) || defined(__NetBSD__) || defined(__minix) #include #endif -- cgit v1.2.1 From 5acadc9cd7a1ff40ffa8d57214c90d8c788b2b03 Mon Sep 17 00:00:00 2001 From: Daniel Stenberg Date: Tue, 29 Aug 2006 14:39:33 +0000 Subject: David McCreedy added CURLOPT_SOCKOPTFUNCTION and CURLOPT_SOCKOPTDATA to allow applications to set their own socket options. --- include/curl/curl.h | 53 ++++++++++++++++++++++++++++++++++++++++++++++++++++ include/curl/multi.h | 40 --------------------------------------- 2 files changed, 53 insertions(+), 40 deletions(-) (limited to 'include') diff --git a/include/curl/curl.h b/include/curl/curl.h index f4166cb58..6f0be2c9f 100644 --- a/include/curl/curl.h +++ b/include/curl/curl.h @@ -133,6 +133,47 @@ 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 +#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(NETWARE) || defined(__NetBSD__) || defined(__minix) +#include +#endif + +#ifndef _WIN32_WCE +#include +#endif +#include +#include +#endif + +#ifndef curl_socket_typedef +/* socket typedef */ +#ifdef WIN32 +typedef SOCKET curl_socket_t; +#define CURL_SOCKET_BAD INVALID_SOCKET +#else +typedef int curl_socket_t; +#define CURL_SOCKET_BAD -1 +#endif +#define curl_socket_typedef +#endif /* curl_socket_typedef */ + struct curl_httppost { struct curl_httppost *next; /* next entry in the list */ char *name; /* pointer to allocated name */ @@ -184,6 +225,14 @@ typedef size_t (*curl_read_callback)(char *buffer, size_t nitems, void *instream); +typedef enum { + CURLSOCKTYPE_IPCXN, /* socket created for a specific IP connection */ + CURLSOCKTYPE_LAST /* never use */ +} curlsocktype; + +typedef int (*curl_sockopt_callback)(void *clientp, + curl_socket_t curlfd, + curlsocktype purpose); #ifndef CURL_NO_OLDIES /* not used since 7.10.8, will be removed in a future release */ @@ -982,6 +1031,10 @@ typedef enum { /* Pointer to command string to send if USER/PASS fails. */ CINIT(FTP_ALTERNATIVE_TO_USER, OBJECTPOINT, 147), + /* callback function for setting socket options */ + CINIT(SOCKOPTFUNCTION, FUNCTIONPOINT, 148), + CINIT(SOCKOPTDATA, OBJECTPOINT, 149), + CURLOPT_LASTENTRY /* the last unused */ } CURLoption; diff --git a/include/curl/multi.h b/include/curl/multi.h index 6811ce798..1beda8a92 100644 --- a/include/curl/multi.h +++ b/include/curl/multi.h @@ -37,34 +37,6 @@ file descriptors simultaneous easily. */ -#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 -#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(NETWARE) || defined(__NetBSD__) || defined(__minix) -#include -#endif - -#ifndef _WIN32_WCE -#include -#endif -#include -#include -#endif /* * This header file should not really need to include "curl.h" since curl.h @@ -83,18 +55,6 @@ extern "C" { typedef void CURLM; -#ifndef curl_socket_typedef -/* Public socket typedef */ -#ifdef WIN32 -typedef SOCKET curl_socket_t; -#define CURL_SOCKET_BAD INVALID_SOCKET -#else -typedef int curl_socket_t; -#define CURL_SOCKET_BAD -1 -#endif -#define curl_socket_typedef -#endif /* curl_socket_typedef */ - typedef enum { CURLM_CALL_MULTI_PERFORM = -1, /* please call curl_multi_perform() or curl_multi_socket*() soon */ -- cgit v1.2.1 From 7ff6b6fafdf3d8179b475a58f7b8757422ae69d8 Mon Sep 17 00:00:00 2001 From: Gisle Vanem Date: Tue, 29 Aug 2006 16:16:13 +0000 Subject: Metaware's High-C has an ISO cpp. --- include/curl/curl.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'include') diff --git a/include/curl/curl.h b/include/curl/curl.h index 6f0be2c9f..670c45f02 100644 --- a/include/curl/curl.h +++ b/include/curl/curl.h @@ -485,7 +485,7 @@ typedef enum { */ #if defined(__STDC__) || defined(_MSC_VER) || defined(__cplusplus) || \ defined(__HP_aCC) || defined(__BORLANDC__) || defined(__LCC__) || \ - defined(__POCC__) || defined(__SALFORDC__) + defined(__POCC__) || defined(__SALFORDC__) || defined(__HIGHC__) /* This compiler is believed to have an ISO compatible preprocessor */ #define CURL_ISOCPP #else -- cgit v1.2.1 From 6728bda5c5b68e3ba62ac68706376ab63e45e8b4 Mon Sep 17 00:00:00 2001 From: Gisle Vanem Date: Sun, 3 Sep 2006 13:45:42 +0000 Subject: Watcom lacks . --- include/curl/curl.h | 2 ++ 1 file changed, 2 insertions(+) (limited to 'include') diff --git a/include/curl/curl.h b/include/curl/curl.h index 670c45f02..af56f7aec 100644 --- a/include/curl/curl.h +++ b/include/curl/curl.h @@ -158,7 +158,9 @@ extern "C" { #ifndef _WIN32_WCE #include #endif +#ifndef __WATCOMC__ #include +#endif #include #endif -- cgit v1.2.1 From c41dfc2501455d7185e1fd56f483ae62b0d7c7c5 Mon Sep 17 00:00:00 2001 From: Daniel Stenberg Date: Mon, 4 Sep 2006 08:43:44 +0000 Subject: oops, we're on the .6 track now --- include/curl/curlver.h | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'include') diff --git a/include/curl/curlver.h b/include/curl/curlver.h index ecf2bd66a..d8521ca24 100644 --- a/include/curl/curlver.h +++ b/include/curl/curlver.h @@ -28,13 +28,13 @@ /* This is the version number of the libcurl package from which this header file origins: */ -#define LIBCURL_VERSION "7.15.5-CVS" +#define LIBCURL_VERSION "7.15.6-CVS" /* The numeric version number is also available "in parts" by using these defines: */ #define LIBCURL_VERSION_MAJOR 7 #define LIBCURL_VERSION_MINOR 15 -#define LIBCURL_VERSION_PATCH 5 +#define LIBCURL_VERSION_PATCH 6 /* 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,6 +51,6 @@ 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 0x070f05 +#define LIBCURL_VERSION_NUM 0x070f06 #endif /* __CURL_CURLVER_H */ -- cgit v1.2.1 From b7eeb6e67fca686f840eacd6b8394edb58b07482 Mon Sep 17 00:00:00 2001 From: Daniel Stenberg Date: Thu, 7 Sep 2006 21:49:20 +0000 Subject: Major overhaul introducing http pipelining support and shared connection cache within the multi handle. --- include/curl/curlver.h | 8 ++++---- include/curl/multi.h | 3 +++ 2 files changed, 7 insertions(+), 4 deletions(-) (limited to 'include') diff --git a/include/curl/curlver.h b/include/curl/curlver.h index d8521ca24..1fa94f24e 100644 --- a/include/curl/curlver.h +++ b/include/curl/curlver.h @@ -28,13 +28,13 @@ /* This is the version number of the libcurl package from which this header file origins: */ -#define LIBCURL_VERSION "7.15.6-CVS" +#define LIBCURL_VERSION "7.16.0-CVS" /* The numeric version number is also available "in parts" by using these defines: */ #define LIBCURL_VERSION_MAJOR 7 -#define LIBCURL_VERSION_MINOR 15 -#define LIBCURL_VERSION_PATCH 6 +#define LIBCURL_VERSION_MINOR 16 +#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,6 +51,6 @@ 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 0x070f06 +#define LIBCURL_VERSION_NUM 0x071000 #endif /* __CURL_CURLVER_H */ diff --git a/include/curl/multi.h b/include/curl/multi.h index 1beda8a92..23fe180d3 100644 --- a/include/curl/multi.h +++ b/include/curl/multi.h @@ -270,6 +270,9 @@ typedef enum { /* This is the argument passed to the socket callback */ CINIT(SOCKETDATA, OBJECTPOINT, 2), + /* set to 1 to enable pipelining for this multi handle */ + CINIT(PIPELINING, LONG, 3), + CURLMOPT_LASTENTRY /* the last unused */ } CURLMoption; -- cgit v1.2.1 From 29dc39fce1126265d8526be15beec3e3fdc1c11d Mon Sep 17 00:00:00 2001 From: Daniel Stenberg Date: Mon, 11 Sep 2006 17:18:18 +0000 Subject: - Fixed my breakage from earlier today so that doing curl_easy_cleanup() on a handle that is part of a multi handle first removes the handle from the stack. - Added CURLOPT_SSL_SESSIONID_CACHE and --no-sessionid to disable SSL session-ID re-use on demand since there obviously are broken servers out there that misbehave with session-IDs used. --- include/curl/curl.h | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'include') diff --git a/include/curl/curl.h b/include/curl/curl.h index af56f7aec..fbb9d32c1 100644 --- a/include/curl/curl.h +++ b/include/curl/curl.h @@ -1037,6 +1037,10 @@ typedef enum { CINIT(SOCKOPTFUNCTION, FUNCTIONPOINT, 148), CINIT(SOCKOPTDATA, OBJECTPOINT, 149), + /* set to 0 to disable session ID re-use for this transfer, default is + enabled (== 1) */ + CINIT(SSL_SESSIONID_CACHE, LONG, 150), + CURLOPT_LASTENTRY /* the last unused */ } CURLoption; -- cgit v1.2.1 From 5e0d9aea322ba3abfc05c937f91b5751768f2310 Mon Sep 17 00:00:00 2001 From: Daniel Stenberg Date: Sat, 30 Sep 2006 20:31:11 +0000 Subject: Support for FTP third party transfers is now dropped --- include/curl/curl.h | 36 +++++------------------------------- 1 file changed, 5 insertions(+), 31 deletions(-) (limited to 'include') diff --git a/include/curl/curl.h b/include/curl/curl.h index fbb9d32c1..548c7f848 100644 --- a/include/curl/curl.h +++ b/include/curl/curl.h @@ -941,22 +941,12 @@ typedef enum { CINIT(TCP_NODELAY, LONG, 121), /* 122 OBSOLETE, used in 7.12.3. Gone in 7.13.0 */ - - /* When doing 3rd party transfer, set the source user and password with - this */ - CINIT(SOURCE_USERPWD, OBJECTPOINT, 123), - + /* 123 OBSOLETE. Gone in 7.16.0 */ /* 124 OBSOLETE, used in 7.12.3. Gone in 7.13.0 */ /* 125 OBSOLETE, used in 7.12.3. Gone in 7.13.0 */ /* 126 OBSOLETE, used in 7.12.3. Gone in 7.13.0 */ - - /* When doing 3rd party transfer, set the source pre-quote linked list - of commands with this */ - CINIT(SOURCE_PREQUOTE, OBJECTPOINT, 127), - - /* When doing 3rd party transfer, set the source post-quote linked list - of commands with this */ - CINIT(SOURCE_POSTQUOTE, OBJECTPOINT, 128), + /* 127 OBSOLETE. Gone in 7.16.0 */ + /* 128 OBSOLETE. Gone in 7.16.0 */ /* When FTP over SSL/TLS is selected (with CURLOPT_FTP_SSL), this option can be used to change libcurl's default action which is to first try @@ -973,12 +963,8 @@ typedef enum { CINIT(IOCTLFUNCTION, FUNCTIONPOINT, 130), CINIT(IOCTLDATA, OBJECTPOINT, 131), - /* To make a 3rd party transfer, set the source URL with this */ - CINIT(SOURCE_URL, OBJECTPOINT, 132), - - /* When doing 3rd party transfer, set the source quote linked list of - commands with this */ - CINIT(SOURCE_QUOTE, OBJECTPOINT, 133), + /* 132 OBSOLETE. Gone in 7.16.0 */ + /* 133 OBSOLETE. Gone in 7.16.0 */ /* zero terminated string for pass on to the FTP server when asked for "account" info */ @@ -1059,18 +1045,6 @@ typedef enum { #ifndef CURL_NO_OLDIES /* define this to test if your app builds with all the obsolete stuff removed! */ -#define CURLOPT_HTTPREQUEST -1 -#define CURLOPT_FTPASCII CURLOPT_TRANSFERTEXT -#define CURLOPT_MUTE -2 -#define CURLOPT_PASSWDFUNCTION -3 -#define CURLOPT_PASSWDDATA -4 -#define CURLOPT_CLOSEFUNCTION -5 - -#define CURLOPT_SOURCE_HOST -6 -#define CURLOPT_SOURCE_PATH -7 -#define CURLOPT_SOURCE_PORT -8 -#define CURLOPT_PASV_HOST -9 - #else /* This is set if CURL_NO_OLDIES is defined at compile-time */ #undef CURLOPT_DNS_USE_GLOBAL_CACHE /* soon obsolete */ -- cgit v1.2.1 From b61c06384ab88baf4b3231e84386c4a70126d888 Mon Sep 17 00:00:00 2001 From: Daniel Stenberg Date: Thu, 12 Oct 2006 08:36:47 +0000 Subject: Jeff Pohlmeyer has been working with the hiperfifo.c example source code, and while doing so it became apparent that the current timeout system for the socket API really was a bit awkward since it become quite some work to be sure we have the correct timeout set. Jeff then provided the new CURLMOPT_TIMERFUNCTION that is yet another callback the app can set to get to know when the general timeout time changes and thus for an application like hiperfifo.c it makes everything a lot easier and nicer. There's a CURLMOPT_TIMERDATA option too of course in good old libcurl tradition. --- include/curl/multi.h | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) (limited to 'include') diff --git a/include/curl/multi.h b/include/curl/multi.h index 23fe180d3..d2533728d 100644 --- a/include/curl/multi.h +++ b/include/curl/multi.h @@ -231,6 +231,20 @@ typedef int (*curl_socket_callback)(CURL *easy, /* easy handle */ pointer */ void *socketp); /* private socket pointer */ +/* + * Name: curl_multi_timer_callback + * + * Desc: Called by libcurl whenever the library detects a change in the + * maximum number of milliseconds the app is allowed to wait before + * curl_multi_socket() or curl_multi_perform() must be called + * (to allow libcurl's timed events to take place). + * + * Returns: The callback should return zero. + */ +typedef int (*curl_multi_timer_callback)(CURLM *multi, /* multi handle */ + long timeout_ms, /* see above */ + void *userp); /* private callback + pointer */ CURL_EXTERN CURLMcode curl_multi_socket(CURLM *multi_handle, curl_socket_t s, int *running_handles); @@ -273,6 +287,12 @@ typedef enum { /* set to 1 to enable pipelining for this multi handle */ CINIT(PIPELINING, LONG, 3), + /* This is the timer callback function pointer */ + CINIT(TIMERFUNCTION, FUNCTIONPOINT, 4), + + /* This is the argument passed to the timer callback */ + CINIT(TIMERDATA, OBJECTPOINT, 5), + CURLMOPT_LASTENTRY /* the last unused */ } CURLMoption; -- cgit v1.2.1 From 4e717cdb300adeff3b259b3619b29a944c2960a8 Mon Sep 17 00:00:00 2001 From: Daniel Stenberg Date: Sat, 21 Oct 2006 11:32:05 +0000 Subject: Armel Asselin separated CA cert verification problems from problems with reading the (local) CA cert file to let users easier pinpoint the actual problem. CURLE_SSL_CACERT_BADFILE (77) is the new libcurl error code. --- include/curl/curl.h | 2 ++ 1 file changed, 2 insertions(+) (limited to 'include') diff --git a/include/curl/curl.h b/include/curl/curl.h index 548c7f848..36b52bb05 100644 --- a/include/curl/curl.h +++ b/include/curl/curl.h @@ -390,6 +390,8 @@ typedef enum { CURLOPT_CONV_FROM_NETWORK_FUNCTION, CURLOPT_CONV_TO_NETWORK_FUNCTION, and CURLOPT_CONV_FROM_UTF8_FUNCTION */ + CURLE_SSL_CACERT_BADFILE, /* 77 - could not load CACERT file, missing + or wrong format */ CURL_LAST /* never use! */ } CURLcode; -- cgit v1.2.1 From ee085ad6bdef5d09737e4e6f4a6e10e1132fb59d Mon Sep 17 00:00:00 2001 From: Daniel Stenberg Date: Mon, 30 Oct 2006 08:52:12 +0000 Subject: start working on 7.16.1 --- include/curl/curlver.h | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'include') diff --git a/include/curl/curlver.h b/include/curl/curlver.h index 1fa94f24e..7c82714bb 100644 --- a/include/curl/curlver.h +++ b/include/curl/curlver.h @@ -28,13 +28,13 @@ /* This is the version number of the libcurl package from which this header file origins: */ -#define LIBCURL_VERSION "7.16.0-CVS" +#define LIBCURL_VERSION "7.16.1-CVS" /* The numeric version number is also available "in parts" by using these defines: */ #define LIBCURL_VERSION_MAJOR 7 #define LIBCURL_VERSION_MINOR 16 -#define LIBCURL_VERSION_PATCH 0 +#define LIBCURL_VERSION_PATCH 1 /* 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,6 +51,6 @@ 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 0x071000 +#define LIBCURL_VERSION_NUM 0x071001 #endif /* __CURL_CURLVER_H */ -- cgit v1.2.1 From 755ccbc468a8ebe99ac108d32e3dfb7fa8e0fad7 Mon Sep 17 00:00:00 2001 From: Gisle Vanem Date: Mon, 30 Oct 2006 16:26:24 +0000 Subject: Allow 'curl_*printf()' to be used in C++ programs. --- include/curl/mprintf.h | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'include') diff --git a/include/curl/mprintf.h b/include/curl/mprintf.h index 6ba9ea8bf..b087d9a80 100644 --- a/include/curl/mprintf.h +++ b/include/curl/mprintf.h @@ -28,6 +28,10 @@ #include "curl.h" +#ifdef __cplusplus +extern "C" { +#endif + CURL_EXTERN int curl_mprintf(const char *format, ...); CURL_EXTERN int curl_mfprintf(FILE *fd, const char *format, ...); CURL_EXTERN int curl_msprintf(char *buffer, const char *format, ...); @@ -59,4 +63,8 @@ CURL_EXTERN char *curl_mvaprintf(const char *format, va_list args); # define vaprintf curl_mvaprintf #endif +#ifdef __cplusplus +} +#endif + #endif /* __CURL_MPRINTF_H */ -- cgit v1.2.1 From 2147284cad624325f5b0034c2f394db62086d9e6 Mon Sep 17 00:00:00 2001 From: Daniel Stenberg Date: Thu, 2 Nov 2006 21:56:40 +0000 Subject: James Housley brought support for SCP transfers --- include/curl/curl.h | 28 +++++++++++++++++++++++++++- 1 file changed, 27 insertions(+), 1 deletion(-) (limited to 'include') diff --git a/include/curl/curl.h b/include/curl/curl.h index 36b52bb05..ea5b46201 100644 --- a/include/curl/curl.h +++ b/include/curl/curl.h @@ -392,6 +392,11 @@ typedef enum { CURLOPT_CONV_FROM_UTF8_FUNCTION */ CURLE_SSL_CACERT_BADFILE, /* 77 - could not load CACERT file, missing or wrong format */ + CURLE_REMOTE_FILE_NOT_FOUND, /* 78 - remote file not found */ + CURLE_SSH, /* 79 - error from the SSH layer, somewhat + generic so the error message will be of + interest when this has happened */ + CURL_LAST /* never use! */ } CURLcode; @@ -427,6 +432,14 @@ typedef enum { #define CURLAUTH_ANY ~0 /* all types set */ #define CURLAUTH_ANYSAFE (~CURLAUTH_BASIC) +#define CURLSSH_AUTH_ANY ~0 /* all types supported by the server */ +#define CURLSSH_AUTH_NONE 0 /* none allowed, silly but complete */ +#define CURLSSH_AUTH_PUBLICKEY (1<<0) /* public/private key files */ +#define CURLSSH_AUTH_PASSWORD (1<<1) /* password */ +#define CURLSSH_AUTH_HOST (1<<2) /* host key files */ +#define CURLSSH_AUTH_KEYBOARD (1<<3) /* keyboard interactive */ +#define CURLSSH_AUTH_DEFAULT CURLSSH_AUTH_ANY + #ifndef CURL_NO_OLDIES /* define this to test if your app builds with all the obsolete stuff removed! */ /* this was the error code 50 in 7.7.3 and a few earlier versions, this @@ -1029,6 +1042,13 @@ typedef enum { enabled (== 1) */ CINIT(SSL_SESSIONID_CACHE, LONG, 150), + /* allowed SSH authentication methods */ + CINIT(SSH_AUTH_TYPES, LONG, 151), + + /* Used by scp/sftp to do public/private key authentication */ + CINIT(SSH_PUBLIC_KEYFILE, OBJECTPOINT, 152), + CINIT(SSH_PRIVATE_KEYFILE, OBJECTPOINT, 153), + CURLOPT_LASTENTRY /* the last unused */ } CURLoption; @@ -1506,6 +1526,7 @@ typedef enum { CURLVERSION_FIRST, CURLVERSION_SECOND, CURLVERSION_THIRD, + CURLVERSION_FOURTH, CURLVERSION_LAST /* never actually use this */ } CURLversion; @@ -1514,7 +1535,7 @@ typedef enum { meant to be a built-in version number for what kind of struct the caller expects. If the struct ever changes, we redefine the NOW to another enum from above. */ -#define CURLVERSION_NOW CURLVERSION_THIRD +#define CURLVERSION_NOW CURLVERSION_FOURTH typedef struct { CURLversion age; /* age of the returned struct */ @@ -1535,8 +1556,13 @@ typedef struct { /* This field was added in CURLVERSION_THIRD */ const char *libidn; + /* These field were added in CURLVERSION_FOURTH */ + /* Same as '_libiconv_version' if built with HAVE_ICONV */ int iconv_ver_num; + + const char *libssh_version; /* human readable string */ + } curl_version_info_data; #define CURL_VERSION_IPV6 (1<<0) /* IPv6-enabled */ -- cgit v1.2.1 From 4750e6f3c5fd42e19998242ddb63d7d5506b9fd9 Mon Sep 17 00:00:00 2001 From: Daniel Stenberg Date: Fri, 5 Jan 2007 23:11:14 +0000 Subject: - Linus Nielsen Feltzing introduced the --ftp-ssl-ccc command line option to curl that uses the new CURLOPT_FTP_SSL_CCC option in libcurl. If enabled, it will make libcurl shutdown SSL/TLS after the authentication is done on a FTP-SSL operation. --- include/curl/curl.h | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) (limited to 'include') diff --git a/include/curl/curl.h b/include/curl/curl.h index ea5b46201..8bbdd1b24 100644 --- a/include/curl/curl.h +++ b/include/curl/curl.h @@ -7,7 +7,7 @@ * | (__| |_| | _ <| |___ * \___|\___/|_| \_\_____| * - * Copyright (C) 1998 - 2006, Daniel Stenberg, , et al. + * Copyright (C) 1998 - 2007, 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 @@ -397,6 +397,8 @@ typedef enum { generic so the error message will be of interest when this has happened */ + CURLE_FTP_SSL_CCC_FAILED, /* 80 - Failed to clear the FTP command + channel */ CURL_LAST /* never use! */ } CURLcode; @@ -1049,6 +1051,9 @@ typedef enum { CINIT(SSH_PUBLIC_KEYFILE, OBJECTPOINT, 152), CINIT(SSH_PRIVATE_KEYFILE, OBJECTPOINT, 153), + /* Send CCC (Clear Command Channel) after authentication */ + CINIT(FTP_SSL_CCC, LONG, 154), + CURLOPT_LASTENTRY /* the last unused */ } CURLoption; -- cgit v1.2.1 From d4651994110612c476a2b65dfa0f9b4f138fca68 Mon Sep 17 00:00:00 2001 From: Linus Nielsen Feltzing Date: Mon, 8 Jan 2007 11:24:11 +0000 Subject: Correct error code for CCC/SSL shutdown failure --- include/curl/curl.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'include') diff --git a/include/curl/curl.h b/include/curl/curl.h index 8bbdd1b24..f41067614 100644 --- a/include/curl/curl.h +++ b/include/curl/curl.h @@ -397,8 +397,8 @@ typedef enum { generic so the error message will be of interest when this has happened */ - CURLE_FTP_SSL_CCC_FAILED, /* 80 - Failed to clear the FTP command - channel */ + CURLE_SSL_SHUTDOWN_FAILED, /* 80 - Failed to shut down the SSL + connection */ CURL_LAST /* never use! */ } CURLcode; -- cgit v1.2.1 From 1eb530d8dce0229da034b46e1e919c7ef7fa78ec Mon Sep 17 00:00:00 2001 From: Daniel Stenberg Date: Tue, 30 Jan 2007 12:25:55 +0000 Subject: start working on 7.16.2 --- include/curl/curlver.h | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'include') diff --git a/include/curl/curlver.h b/include/curl/curlver.h index 7c82714bb..c2595d0e3 100644 --- a/include/curl/curlver.h +++ b/include/curl/curlver.h @@ -7,7 +7,7 @@ * | (__| |_| | _ <| |___ * \___|\___/|_| \_\_____| * - * Copyright (C) 1998 - 2006, Daniel Stenberg, , et al. + * Copyright (C) 1998 - 2007, 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 @@ -28,13 +28,13 @@ /* This is the version number of the libcurl package from which this header file origins: */ -#define LIBCURL_VERSION "7.16.1-CVS" +#define LIBCURL_VERSION "7.16.2-CVS" /* The numeric version number is also available "in parts" by using these defines: */ #define LIBCURL_VERSION_MAJOR 7 #define LIBCURL_VERSION_MINOR 16 -#define LIBCURL_VERSION_PATCH 1 +#define LIBCURL_VERSION_PATCH 2 /* 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,6 +51,6 @@ 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 0x071001 +#define LIBCURL_VERSION_NUM 0x071002 #endif /* __CURL_CURLVER_H */ -- cgit v1.2.1 From 91386937ff120d11f7bf24dc487f00751362a61c Mon Sep 17 00:00:00 2001 From: Daniel Stenberg Date: Mon, 5 Feb 2007 22:51:32 +0000 Subject: - Michael Wallner provided a patch that adds support for CURLOPT_TIMEOUT_MS and CURLOPT_CONNECTTIMEOUT_MS that, as their names should hint, do the timeouts with millisecond resolution instead. The only restriction to that is the alarm() (sometimes) used to abort name resolves as that uses full seconds. I fixed the FTP response timeout part of the patch. Internally we now count and keep the timeouts in milliseconds but it also means we multiply set timeouts with 1000. The effect of this is that no timeout can be set to more than 2^31 milliseconds (on 32 bit systems), which equals 24.86 days. We probably couldn't before either since the code did *1000 on the timeout values on several places already. --- include/curl/curl.h | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'include') diff --git a/include/curl/curl.h b/include/curl/curl.h index f41067614..2c79f7dac 100644 --- a/include/curl/curl.h +++ b/include/curl/curl.h @@ -1054,6 +1054,10 @@ typedef enum { /* Send CCC (Clear Command Channel) after authentication */ CINIT(FTP_SSL_CCC, LONG, 154), + /* Same as TIMEOUT and CONNECTTIMEOUT, but with ms resolution */ + CINIT(TIMEOUT_MS, LONG, 155), + CINIT(CONNECTTIMEOUT_MS, LONG, 156), + CURLOPT_LASTENTRY /* the last unused */ } CURLoption; -- cgit v1.2.1 From cf491357b650d6520a71df5892ba4c32220af242 Mon Sep 17 00:00:00 2001 From: Daniel Stenberg Date: Mon, 12 Feb 2007 11:53:35 +0000 Subject: When building tarballs, we also set the timestamp of the generated package. This is meant to primarily be used for the autobuilds to know from what point in time a particular tarball is, and thus what changes it contains (or not). --- include/curl/curlver.h | 11 +++++++++++ 1 file changed, 11 insertions(+) (limited to 'include') diff --git a/include/curl/curlver.h b/include/curl/curlver.h index c2595d0e3..db48ae5ed 100644 --- a/include/curl/curlver.h +++ b/include/curl/curlver.h @@ -53,4 +53,15 @@ */ #define LIBCURL_VERSION_NUM 0x071002 +/* + * This is the date and time when the full source package was created. The + * timestamp is not stored in CVS, as the timestamp is properly set in the + * tarballs by the maketgz script. + * + * The format of the date should follow this template: + * + * "Mon Feb 12 11:35:33 UTC 2007" + */ +#define LIBCURL_TIMESTAMP "CVS" + #endif /* __CURL_CURLVER_H */ -- cgit v1.2.1 From 28b932fb4ef14b8b9ebda6823c98fbedad6be4b2 Mon Sep 17 00:00:00 2001 From: Daniel Stenberg Date: Mon, 12 Feb 2007 21:13:47 +0000 Subject: - Shmulik Regev fixed so that the final CRLF of HTTP response headers are sent to the debug callback. - Shmulik Regev added CURLOPT_HTTP_CONTENT_DECODING and CURLOPT_HTTP_TRANSFER_DECODING that if set to zero will disable libcurl's internal decoding of content or transfer encoded content. This may be preferable in cases where you use libcurl for proxy purposes or similar. The command line tool got a --raw option to disable both at once. --- include/curl/curl.h | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'include') diff --git a/include/curl/curl.h b/include/curl/curl.h index 2c79f7dac..e911fca5a 100644 --- a/include/curl/curl.h +++ b/include/curl/curl.h @@ -1058,6 +1058,11 @@ typedef enum { CINIT(TIMEOUT_MS, LONG, 155), CINIT(CONNECTTIMEOUT_MS, LONG, 156), + /* set to zero to disable the libcurl's decoding and thus pass the raw body + data to the appliction even when it is encoded/compressed */ + CINIT(HTTP_TRANSFER_DECODING, LONG, 157), + CINIT(HTTP_CONTENT_DECODING, LONG, 158), + CURLOPT_LASTENTRY /* the last unused */ } CURLoption; -- cgit v1.2.1 From 2f5e99ca02b6716fdac59c299ab7738a2077743d Mon Sep 17 00:00:00 2001 From: Linus Nielsen Feltzing Date: Tue, 20 Feb 2007 22:02:11 +0000 Subject: New FTP CCC functionality - adds passive and active mode to accomodate for different server behaviour --- include/curl/curl.h | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'include') diff --git a/include/curl/curl.h b/include/curl/curl.h index e911fca5a..d7f36645c 100644 --- a/include/curl/curl.h +++ b/include/curl/curl.h @@ -465,6 +465,14 @@ typedef enum { CURLFTPSSL_LAST /* not an option, never use */ } curl_ftpssl; +/* parameter for the CURLOPT_FTP_SSL_CCC option */ +typedef enum { + CURLFTPSSL_CCC_NONE, /* do not send CCC */ + CURLFTPSSL_CCC_PASSIVE, /* Let the server initiate the shutdown */ + CURLFTPSSL_CCC_ACTIVE, /* Initiate the shutdown */ + CURLFTPSSL_CCC_LAST /* not an option, never use */ +} curl_ftpccc; + /* parameter for the CURLOPT_FTPSSLAUTH option */ typedef enum { CURLFTPAUTH_DEFAULT, /* let libcurl decide */ -- cgit v1.2.1 From 42c0ac200880a785222a8b3f403e3e6238c16707 Mon Sep 17 00:00:00 2001 From: Daniel Stenberg Date: Wed, 11 Apr 2007 13:32:59 +0000 Subject: start working on 7.16.3 --- include/curl/curlver.h | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'include') diff --git a/include/curl/curlver.h b/include/curl/curlver.h index db48ae5ed..382b8d420 100644 --- a/include/curl/curlver.h +++ b/include/curl/curlver.h @@ -28,13 +28,13 @@ /* This is the version number of the libcurl package from which this header file origins: */ -#define LIBCURL_VERSION "7.16.2-CVS" +#define LIBCURL_VERSION "7.16.3-CVS" /* The numeric version number is also available "in parts" by using these defines: */ #define LIBCURL_VERSION_MAJOR 7 #define LIBCURL_VERSION_MINOR 16 -#define LIBCURL_VERSION_PATCH 2 +#define LIBCURL_VERSION_PATCH 3 /* 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 +51,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 0x071002 +#define LIBCURL_VERSION_NUM 0x071003 /* * This is the date and time when the full source package was created. The -- cgit v1.2.1 From 76627b322e369c209c60863b9e1f05e3ce02953d Mon Sep 17 00:00:00 2001 From: Daniel Stenberg Date: Mon, 16 Apr 2007 16:34:08 +0000 Subject: - Robert Iakobashvil added curl_multi_socket_action() to libcurl, which is a function that deprecates the curl_multi_socket() function. Using the new function the application tell libcurl what action that was found in the socket that it passes in. This gives a significant performance boost as it allows libcurl to avoid a call to poll()/select() for every call to curl_multi_socket*(). --- include/curl/multi.h | 18 +++++++++++++++++- 1 file changed, 17 insertions(+), 1 deletion(-) (limited to 'include') diff --git a/include/curl/multi.h b/include/curl/multi.h index d2533728d..5eab527ae 100644 --- a/include/curl/multi.h +++ b/include/curl/multi.h @@ -7,7 +7,7 @@ * | (__| |_| | _ <| |___ * \___|\___/|_| \_\_____| * - * Copyright (C) 1998 - 2006, Daniel Stenberg, , et al. + * Copyright (C) 1998 - 2007, 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 @@ -224,6 +224,10 @@ CURL_EXTERN const char *curl_multi_strerror(CURLMcode); #define CURL_SOCKET_TIMEOUT CURL_SOCKET_BAD +#define CURL_CSELECT_IN 0x01 +#define CURL_CSELECT_OUT 0x02 +#define CURL_CSELECT_ERR 0x04 + typedef int (*curl_socket_callback)(CURL *easy, /* easy handle */ curl_socket_t s, /* socket */ int what, /* see above */ @@ -249,9 +253,21 @@ typedef int (*curl_multi_timer_callback)(CURLM *multi, /* multi handle */ CURL_EXTERN CURLMcode curl_multi_socket(CURLM *multi_handle, curl_socket_t s, int *running_handles); +CURL_EXTERN CURLMcode curl_multi_socket_action(CURLM *multi_handle, + curl_socket_t s, + int ev_bitmask, + int *running_handles); + CURL_EXTERN CURLMcode curl_multi_socket_all(CURLM *multi_handle, int *running_handles); +#ifndef CURL_ALLOW_OLD_MULTI_SOCKET +/* This macro below was added in 7.16.3 to push users who recompile to use + the new curl_multi_socket_action() instead of the old curl_multi_socket() +*/ +#define curl_multi_socket(x,y,z) curl_multi_socket_action(x,y,0,z) +#endif + /* * Name: curl_multi_timeout() * -- cgit v1.2.1 From 36626c4b6e6b10b6d4b7211680711e08096a0cde Mon Sep 17 00:00:00 2001 From: Daniel Stenberg Date: Fri, 20 Apr 2007 07:19:36 +0000 Subject: ifndef check the CURL_MAX_WRITE_SIZE define to allow this value to easier be changed at build time (from command line or similar) --- include/curl/curl.h | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'include') diff --git a/include/curl/curl.h b/include/curl/curl.h index d7f36645c..32a9a14cf 100644 --- a/include/curl/curl.h +++ b/include/curl/curl.h @@ -210,9 +210,13 @@ typedef int (*curl_progress_callback)(void *clientp, double ultotal, double ulnow); +#ifndef CURL_MAX_WRITE_SIZE /* Tests have proven that 20K is a very bad buffer size for uploads on - Windows, while 16K for some odd reason performed a lot better. */ + Windows, while 16K for some odd reason performed a lot better. + We do the ifndef check to allow this value to easier be changed at build + time for those who feel adventurous. */ #define CURL_MAX_WRITE_SIZE 16384 +#endif typedef size_t (*curl_write_callback)(char *buffer, size_t size, -- cgit v1.2.1 From 1b7f00b2a68b59249181dac6557630e20f394ea6 Mon Sep 17 00:00:00 2001 From: Daniel Stenberg Date: Tue, 8 May 2007 11:34:31 +0000 Subject: CURLE_FTP_COULDNT_STOR_FILE is now known as CURLE_UPLOAD_FAILED. This is because I just made SCP uploads return this value if the file size of the upload file isn't given with CURLOPT_INFILESIZE*. Docs updated to reflect this news, and a define for the old name was added to the public header file. --- include/curl/curl.h | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'include') diff --git a/include/curl/curl.h b/include/curl/curl.h index 32a9a14cf..000335b74 100644 --- a/include/curl/curl.h +++ b/include/curl/curl.h @@ -331,7 +331,7 @@ typedef enum { CURLE_HTTP_RETURNED_ERROR, /* 22 */ CURLE_WRITE_ERROR, /* 23 */ CURLE_MALFORMAT_USER, /* 24 - NOT USED */ - CURLE_FTP_COULDNT_STOR_FILE, /* 25 - failed FTP upload */ + CURLE_UPLOAD_FAILED, /* 25 - failed upload "command" */ CURLE_READ_ERROR, /* 26 - could open/read from file */ CURLE_OUT_OF_MEMORY, /* 27 */ /* Note: CURLE_OUT_OF_MEMORY may sometimes indicate a conversion error @@ -422,6 +422,7 @@ typedef CURLcode (*curl_ssl_ctx_callback)(CURL *curl, /* easy handle */ /* backwards compatibility with older names */ #define CURLE_HTTP_NOT_FOUND CURLE_HTTP_RETURNED_ERROR #define CURLE_HTTP_PORT_FAILED CURLE_INTERFACE_FAILED +#define CURLE_FTP_COULDNT_STOR_FILE CURLE_UPLOAD_FAILED #endif typedef enum { -- cgit v1.2.1 From a49e78d9b758cad12d886df2d5c8459a34477bbb Mon Sep 17 00:00:00 2001 From: Daniel Stenberg Date: Wed, 30 May 2007 20:04:44 +0000 Subject: Added CURLMOPT_MAXCONNECTS which is a curl_multi_setopt() option for setting the maximum size of the connection cache maximum size of the multi handle. --- include/curl/multi.h | 3 +++ 1 file changed, 3 insertions(+) (limited to 'include') diff --git a/include/curl/multi.h b/include/curl/multi.h index 5eab527ae..094c64849 100644 --- a/include/curl/multi.h +++ b/include/curl/multi.h @@ -309,6 +309,9 @@ typedef enum { /* This is the argument passed to the timer callback */ CINIT(TIMERDATA, OBJECTPOINT, 5), + /* maximum number of entries in the connection cache */ + CINIT(MAXCONNECTS, LONG, 6), + CURLMOPT_LASTENTRY /* the last unused */ } CURLMoption; -- cgit v1.2.1 From abf8589f0d9b0c0a89e92ebfb50beab5fc94ebbd Mon Sep 17 00:00:00 2001 From: Daniel Stenberg Date: Mon, 25 Jun 2007 09:34:44 +0000 Subject: start working towards 7.16.4 --- include/curl/curlver.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'include') diff --git a/include/curl/curlver.h b/include/curl/curlver.h index 382b8d420..318628bd2 100644 --- a/include/curl/curlver.h +++ b/include/curl/curlver.h @@ -34,7 +34,7 @@ defines: */ #define LIBCURL_VERSION_MAJOR 7 #define LIBCURL_VERSION_MINOR 16 -#define LIBCURL_VERSION_PATCH 3 +#define LIBCURL_VERSION_PATCH 4 /* 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 +51,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 0x071003 +#define LIBCURL_VERSION_NUM 0x071004 /* * This is the date and time when the full source package was created. The -- cgit v1.2.1 From 3dff58b3aa14e2a6c0c3a0e35eb27da654288553 Mon Sep 17 00:00:00 2001 From: Daniel Stenberg Date: Mon, 25 Jun 2007 13:52:16 +0000 Subject: fix the version string as well --- include/curl/curlver.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'include') diff --git a/include/curl/curlver.h b/include/curl/curlver.h index 318628bd2..9b3790c20 100644 --- a/include/curl/curlver.h +++ b/include/curl/curlver.h @@ -28,7 +28,7 @@ /* This is the version number of the libcurl package from which this header file origins: */ -#define LIBCURL_VERSION "7.16.3-CVS" +#define LIBCURL_VERSION "7.16.4-CVS" /* The numeric version number is also available "in parts" by using these defines: */ -- cgit v1.2.1 From 4cd7f85410ae9590fa4dd274a9c77604b3b8d4fc Mon Sep 17 00:00:00 2001 From: James Housley Date: Wed, 27 Jun 2007 20:15:48 +0000 Subject: Add two new options for the SFTP/SCP/FILE protocols: CURLOPT_NEW_FILE_PERMS and CURLOPT_NEW_DIRECTORY_PERMS. These control the premissions for files and directories created on the remote server. CURLOPT_NEW_FILE_PERMS defaults to 0644 and CURLOPT_NEW_DIRECTORY_PERMS defaults to 0755 --- include/curl/curl.h | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'include') diff --git a/include/curl/curl.h b/include/curl/curl.h index 000335b74..2dbcfd737 100644 --- a/include/curl/curl.h +++ b/include/curl/curl.h @@ -1076,6 +1076,11 @@ typedef enum { CINIT(HTTP_TRANSFER_DECODING, LONG, 157), CINIT(HTTP_CONTENT_DECODING, LONG, 158), + /* Permission used when creating new files and directories on the remote + server for protocols that support it, SFTP/SCP/FILE */ + CINIT(NEW_FILE_PERMS, LONG, 159), + CINIT(NEW_DIRECTORY_PERMS, LONG, 160), + CURLOPT_LASTENTRY /* the last unused */ } CURLoption; -- cgit v1.2.1 From 857492ac9e405a7e2af513ddfdebfa4f79ad18b4 Mon Sep 17 00:00:00 2001 From: Gunter Knauf Date: Sat, 30 Jun 2007 20:16:03 +0000 Subject: minor patches to enable building for NetWare CLIB. sent by Dmitry Mityugov. --- include/curl/curl.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'include') diff --git a/include/curl/curl.h b/include/curl/curl.h index 2dbcfd737..ca229cb96 100644 --- a/include/curl/curl.h +++ b/include/curl/curl.h @@ -151,7 +151,7 @@ extern "C" { /* 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(NETWARE) || defined(__NetBSD__) || defined(__minix) +#if defined(_AIX) || defined(__NOVELL_LIBC__) || defined(__NetBSD__) || defined(__minix) #include #endif -- cgit v1.2.1 From 54967d2a3ab5559631407f7b7f67ef48c2dda6dd Mon Sep 17 00:00:00 2001 From: Daniel Stenberg Date: Sun, 1 Jul 2007 22:01:18 +0000 Subject: Thomas J. Moore provided a patch that introduces Kerberos5 support in libcurl. This also makes the options change name to --krb (from --krb4) and CURLOPT_KRBLEVEL (from CURLOPT_KRB4LEVEL) but the old names are still --- include/curl/curl.h | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) (limited to 'include') diff --git a/include/curl/curl.h b/include/curl/curl.h index ca229cb96..fe413d0a7 100644 --- a/include/curl/curl.h +++ b/include/curl/curl.h @@ -736,10 +736,12 @@ typedef enum { /* Set the interface string to use as outgoing network interface */ CINIT(INTERFACE, OBJECTPOINT, 62), - /* Set the krb4 security level, this also enables krb4 awareness. This is a - * string, 'clear', 'safe', 'confidential' or 'private'. If the string is - * set but doesn't match one of these, 'private' will be used. */ - CINIT(KRB4LEVEL, OBJECTPOINT, 63), + /* Set the krb4/5 security level, this also enables krb4/5 awareness. This + * is a string, 'clear', 'safe', 'confidential' or 'private'. If the string + * is set but doesn't match one of these, 'private' will be used. */ + CINIT(KRBLEVEL, OBJECTPOINT, 63), + /* This is for compatibility with older curl releases */ +#define CURLOPT_KRB4LEVEL CURLOPT_KRBLEVEL /* Set if we should verify the peer in ssl handshake, set 1 to verify. */ CINIT(SSL_VERIFYPEER, LONG, 64), -- cgit v1.2.1 From 04d3a8c7144128de2886443f66c80263713b3d9e Mon Sep 17 00:00:00 2001 From: Daniel Stenberg Date: Tue, 10 Jul 2007 22:07:33 +0000 Subject: start working on 7.16.5... --- include/curl/curlver.h | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'include') diff --git a/include/curl/curlver.h b/include/curl/curlver.h index 9b3790c20..11b34dcaf 100644 --- a/include/curl/curlver.h +++ b/include/curl/curlver.h @@ -28,13 +28,13 @@ /* This is the version number of the libcurl package from which this header file origins: */ -#define LIBCURL_VERSION "7.16.4-CVS" +#define LIBCURL_VERSION "7.16.5-CVS" /* The numeric version number is also available "in parts" by using these defines: */ #define LIBCURL_VERSION_MAJOR 7 #define LIBCURL_VERSION_MINOR 16 -#define LIBCURL_VERSION_PATCH 4 +#define LIBCURL_VERSION_PATCH 5 /* 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 +51,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 0x071004 +#define LIBCURL_VERSION_NUM 0x071005 /* * This is the date and time when the full source package was created. The -- cgit v1.2.1 From 50c10aa5bf545eedfdbe561116656b6ec12654cd Mon Sep 17 00:00:00 2001 From: Daniel Stenberg Date: Wed, 1 Aug 2007 21:20:01 +0000 Subject: Patrick Monnerat and I modified libcurl so that now it *copies* all strings passed to it with curl_easy_setopt()! Previously it has always just refered to the data, forcing the user to keep the data around until libcurl is done with it. That is now history and libcurl will instead clone the given strings and keep private copies. --- include/curl/curlver.h | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'include') diff --git a/include/curl/curlver.h b/include/curl/curlver.h index 11b34dcaf..4657398bc 100644 --- a/include/curl/curlver.h +++ b/include/curl/curlver.h @@ -28,13 +28,13 @@ /* This is the version number of the libcurl package from which this header file origins: */ -#define LIBCURL_VERSION "7.16.5-CVS" +#define LIBCURL_VERSION "7.17.0-CVS" /* The numeric version number is also available "in parts" by using these defines: */ #define LIBCURL_VERSION_MAJOR 7 -#define LIBCURL_VERSION_MINOR 16 -#define LIBCURL_VERSION_PATCH 5 +#define LIBCURL_VERSION_MINOR 17 +#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 +51,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 0x071005 +#define LIBCURL_VERSION_NUM 0x071100 /* * This is the date and time when the full source package was created. The -- cgit v1.2.1 From ad9cb40b6f0fc79a1fddd9fa6aa12bf1dd31092b Mon Sep 17 00:00:00 2001 From: Patrick Monnerat Date: Tue, 7 Aug 2007 12:44:38 +0000 Subject: Some #if --> #ifdef undef standard *printf before (re)defining them --- include/curl/mprintf.h | 10 ++++++++++ 1 file changed, 10 insertions(+) (limited to 'include') diff --git a/include/curl/mprintf.h b/include/curl/mprintf.h index b087d9a80..5c526882f 100644 --- a/include/curl/mprintf.h +++ b/include/curl/mprintf.h @@ -44,6 +44,16 @@ CURL_EXTERN char *curl_maprintf(const char *format, ...); CURL_EXTERN char *curl_mvaprintf(const char *format, va_list args); #ifdef _MPRINTF_REPLACE +# undef printf +# undef fprintf +# undef sprintf +# undef vsprintf +# undef snprintf +# undef vprintf +# undef vfprintf +# undef vsnprintf +# undef aprintf +# undef vaprintf # define printf curl_mprintf # define fprintf curl_mfprintf #ifdef CURLDEBUG -- cgit v1.2.1 From 557cc55f6f398c0cd02571c077d5c73156820513 Mon Sep 17 00:00:00 2001 From: Patrick Monnerat Date: Thu, 23 Aug 2007 14:30:24 +0000 Subject: Porting library to OS/400 --- include/curl/curl.h | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) (limited to 'include') diff --git a/include/curl/curl.h b/include/curl/curl.h index fe413d0a7..0eebbb319 100644 --- a/include/curl/curl.h +++ b/include/curl/curl.h @@ -95,6 +95,11 @@ extern "C" { typedef long long curl_off_t; #define CURL_FORMAT_OFF_T "%I64d" #else /* GCC or Watcom on Windows */ +#if defined(__ILEC400__) +/* OS400 C compiler. */ + typedef long long curl_off_t; +#define CURL_FORMAT_OFF_T "%lld" +#else /* OS400 C compiler. */ /* "normal" POSIX approach, do note that this does not necessarily mean that the type is >32 bits, see the SIZEOF_CURL_OFF_T define for that! */ @@ -120,6 +125,7 @@ extern "C" { #else /* LARGE_FILE support */ #define CURL_FORMAT_OFF_T "%ld" #endif +#endif /* OS400 C compiler. */ #endif /* GCC or Watcom on Windows */ #endif /* (_MSC_VER && !__POCC__) || (__LCC__ && WIN32) */ @@ -517,7 +523,8 @@ typedef enum { */ #if defined(__STDC__) || defined(_MSC_VER) || defined(__cplusplus) || \ defined(__HP_aCC) || defined(__BORLANDC__) || defined(__LCC__) || \ - defined(__POCC__) || defined(__SALFORDC__) || defined(__HIGHC__) + defined(__POCC__) || defined(__SALFORDC__) || defined(__HIGHC__) || \ + defined(__ILEC400__) /* This compiler is believed to have an ISO compatible preprocessor */ #define CURL_ISOCPP #else -- cgit v1.2.1 From 9f44a95522162c0f4a61093efe1bf1f58b087358 Mon Sep 17 00:00:00 2001 From: Dan Fandrich Date: Thu, 30 Aug 2007 20:34:57 +0000 Subject: Renamed several libcurl error codes and options to make them more general and allow reuse by multiple protocols. Several unused error codes were removed. In all cases, macros were added to preserve source (and binary) compatibility with the old names. These macros are subject to removal at a future date, but probably not before 2009. An application can be tested to see if it is using any obsolete code by compiling it with the CURL_NO_OLDIES macro defined. Documented some newer error codes in libcurl-error(3) --- include/curl/curl.h | 164 +++++++++++++++++++++++++++++++--------------------- 1 file changed, 99 insertions(+), 65 deletions(-) (limited to 'include') diff --git a/include/curl/curl.h b/include/curl/curl.h index 0eebbb319..6bd37c73f 100644 --- a/include/curl/curl.h +++ b/include/curl/curl.h @@ -314,29 +314,29 @@ typedef enum { CURLE_UNSUPPORTED_PROTOCOL, /* 1 */ CURLE_FAILED_INIT, /* 2 */ CURLE_URL_MALFORMAT, /* 3 */ - CURLE_URL_MALFORMAT_USER, /* 4 - NOT USED */ + CURLE_OBSOLETE4, /* 4 - NOT USED */ CURLE_COULDNT_RESOLVE_PROXY, /* 5 */ CURLE_COULDNT_RESOLVE_HOST, /* 6 */ CURLE_COULDNT_CONNECT, /* 7 */ CURLE_FTP_WEIRD_SERVER_REPLY, /* 8 */ - CURLE_FTP_ACCESS_DENIED, /* 9 a service was denied by the FTP server + CURLE_REMOTE_ACCESS_DENIED, /* 9 a service was denied by the server due to lack of access - when login fails this is not returned. */ - CURLE_FTP_USER_PASSWORD_INCORRECT, /* 10 - NOT USED */ + CURLE_OBSOLETE10, /* 10 - NOT USED */ CURLE_FTP_WEIRD_PASS_REPLY, /* 11 */ - CURLE_FTP_WEIRD_USER_REPLY, /* 12 */ + CURLE_OBSOLETE12, /* 12 - NOT USED */ CURLE_FTP_WEIRD_PASV_REPLY, /* 13 */ CURLE_FTP_WEIRD_227_FORMAT, /* 14 */ CURLE_FTP_CANT_GET_HOST, /* 15 */ - CURLE_FTP_CANT_RECONNECT, /* 16 */ - CURLE_FTP_COULDNT_SET_BINARY, /* 17 */ + CURLE_OBSOLETE16, /* 16 - NOT USED */ + CURLE_FTP_COULDNT_SET_TYPE, /* 17 */ CURLE_PARTIAL_FILE, /* 18 */ CURLE_FTP_COULDNT_RETR_FILE, /* 19 */ - CURLE_FTP_WRITE_ERROR, /* 20 */ - CURLE_FTP_QUOTE_ERROR, /* 21 */ + CURLE_OBSOLETE20, /* 20 - NOT USED */ + CURLE_QUOTE_ERROR, /* 21 - quote command failure */ CURLE_HTTP_RETURNED_ERROR, /* 22 */ CURLE_WRITE_ERROR, /* 23 */ - CURLE_MALFORMAT_USER, /* 24 - NOT USED */ + CURLE_OBSOLETE24, /* 24 - NOT USED */ CURLE_UPLOAD_FAILED, /* 25 - failed upload "command" */ CURLE_READ_ERROR, /* 26 - could open/read from file */ CURLE_OUT_OF_MEMORY, /* 27 */ @@ -344,29 +344,29 @@ typedef enum { instead of a memory allocation error if CURL_DOES_CONVERSIONS is defined */ - CURLE_OPERATION_TIMEOUTED, /* 28 - the timeout time was reached */ - CURLE_FTP_COULDNT_SET_ASCII, /* 29 - TYPE A failed */ + CURLE_OPERATION_TIMEDOUT, /* 28 - the timeout time was reached */ + CURLE_OBSOLETE29, /* 29 - NOT USED */ CURLE_FTP_PORT_FAILED, /* 30 - FTP PORT operation failed */ CURLE_FTP_COULDNT_USE_REST, /* 31 - the REST command failed */ - CURLE_FTP_COULDNT_GET_SIZE, /* 32 - the SIZE command failed */ - CURLE_HTTP_RANGE_ERROR, /* 33 - RANGE "command" didn't work */ + CURLE_OBSOLETE32, /* 32 - NOT USED */ + CURLE_RANGE_ERROR, /* 33 - RANGE "command" didn't work */ CURLE_HTTP_POST_ERROR, /* 34 */ CURLE_SSL_CONNECT_ERROR, /* 35 - wrong when connecting with SSL */ CURLE_BAD_DOWNLOAD_RESUME, /* 36 - couldn't resume download */ CURLE_FILE_COULDNT_READ_FILE, /* 37 */ CURLE_LDAP_CANNOT_BIND, /* 38 */ CURLE_LDAP_SEARCH_FAILED, /* 39 */ - CURLE_LIBRARY_NOT_FOUND, /* 40 */ + CURLE_OBSOLETE40, /* 40 - NOT USED */ CURLE_FUNCTION_NOT_FOUND, /* 41 */ CURLE_ABORTED_BY_CALLBACK, /* 42 */ CURLE_BAD_FUNCTION_ARGUMENT, /* 43 */ - CURLE_BAD_CALLING_ORDER, /* 44 - NOT USED */ + CURLE_OBSOLETE44, /* 44 - NOT USED */ CURLE_INTERFACE_FAILED, /* 45 - CURLOPT_INTERFACE failed */ - CURLE_BAD_PASSWORD_ENTERED, /* 46 - NOT USED */ + CURLE_OBSOLETE46, /* 46 - NOT USED */ CURLE_TOO_MANY_REDIRECTS , /* 47 - catch endless re-direct loops */ CURLE_UNKNOWN_TELNET_OPTION, /* 48 - User specified an unknown option */ CURLE_TELNET_OPTION_SYNTAX , /* 49 - Malformed telnet option */ - CURLE_OBSOLETE, /* 50 - NOT USED */ + CURLE_OBSOLETE50, /* 50 - NOT USED */ CURLE_SSL_PEER_CERTIFICATE, /* 51 - peer's certificate wasn't ok */ CURLE_GOT_NOTHING, /* 52 - when this is a specific error */ CURLE_SSL_ENGINE_NOTFOUND, /* 53 - SSL crypto engine not found */ @@ -374,7 +374,7 @@ typedef enum { default */ CURLE_SEND_ERROR, /* 55 - failed sending network data */ CURLE_RECV_ERROR, /* 56 - failure in receiving network data */ - CURLE_SHARE_IN_USE, /* 57 - share is in use */ + CURLE_OBSOLETE57, /* 57 - NOT IN USE */ CURLE_SSL_CERTPROBLEM, /* 58 - problem with the local certificate */ CURLE_SSL_CIPHER, /* 59 - couldn't use specified cipher */ CURLE_SSL_CACERT, /* 60 - problem with the CA cert (path?) */ @@ -389,10 +389,10 @@ typedef enum { accepted and we failed to login */ CURLE_TFTP_NOTFOUND, /* 68 - file not found on server */ CURLE_TFTP_PERM, /* 69 - permission problem on server */ - CURLE_TFTP_DISKFULL, /* 70 - out of disk space on server */ + CURLE_REMOTE_DISK_FULL, /* 70 - out of disk space on server */ CURLE_TFTP_ILLEGAL, /* 71 - Illegal TFTP operation */ CURLE_TFTP_UNKNOWNID, /* 72 - Unknown transfer ID */ - CURLE_TFTP_EXISTS, /* 73 - File already exists */ + CURLE_REMOTE_FILE_EXISTS, /* 73 - File already exists */ CURLE_TFTP_NOSUCHUSER, /* 74 - No such user */ CURLE_CONV_FAILED, /* 75 - conversion failed */ CURLE_CONV_REQD, /* 76 - caller must register conversion @@ -412,6 +412,52 @@ typedef enum { CURL_LAST /* never use! */ } CURLcode; +#ifndef CURL_NO_OLDIES /* define this to test if your app builds with all + the obsolete stuff removed! */ + +/* Backwards compatibility with older names */ +/* These are scheduled to disappear by 2009 */ + +/* The following were added in 7.17.0 */ +#define CURLE_OBSOLETE CURLE_OBSOLETE50 /* noone should be using this! */ +#define CURLE_BAD_PASSWORD_ENTERED CURLE_OBSOLETE46 +#define CURLE_BAD_CALLING_ORDER CURLE_OBSOLETE44 +#define CURLE_FTP_USER_PASSWORD_INCORRECT CURLE_OBSOLETE10 +#define CURLE_FTP_CANT_RECONNECT CURLE_OBSOLETE16 +#define CURLE_FTP_COULDNT_GET_SIZE CURLE_OBSOLETE32 +#define CURLE_FTP_COULDNT_SET_ASCII CURLE_OBSOLETE29 +#define CURLE_FTP_WEIRD_USER_REPLY CURLE_OBSOLETE12 +#define CURLE_FTP_WRITE_ERROR CURLE_OBSOLETE20 +#define CURLE_LIBRARY_NOT_FOUND CURLE_OBSOLETE40 +#define CURLE_MALFORMAT_USER CURLE_OBSOLETE24 +#define CURLE_SHARE_IN_USE CURLE_OBSOLETE57 +#define CURLE_URL_MALFORMAT_USER CURLE_OBSOLETE4 + +#define CURLE_FTP_ACCESS_DENIED CURLE_REMOTE_ACCESS_DENIED +#define CURLE_FTP_COULDNT_SET_BINARY CURLE_FTP_COULDNT_SET_TYPE +#define CURLE_FTP_QUOTE_ERROR CURLE_QUOTE_ERROR +#define CURLE_TFTP_DISKFULL CURLE_REMOTE_DISK_FULL +#define CURLE_TFTP_EXISTS CURLE_REMOTE_FILE_EXISTS +#define CURLE_HTTP_RANGE_ERROR CURLE_RANGE_ERROR + +/* The following were added earlier */ + +#define CURLE_OPERATION_TIMEOUTED CURLE_OPERATION_TIMEDOUT + +#define CURLE_HTTP_NOT_FOUND CURLE_HTTP_RETURNED_ERROR +#define CURLE_HTTP_PORT_FAILED CURLE_INTERFACE_FAILED +#define CURLE_FTP_COULDNT_STOR_FILE CURLE_UPLOAD_FAILED + +#define CURLE_FTP_PARTIAL_FILE CURLE_PARTIAL_FILE +#define CURLE_FTP_BAD_DOWNLOAD_RESUME CURLE_BAD_DOWNLOAD_RESUME + +/* This was the error code 50 in 7.7.3 and a few earlier versions, this + is no longer used by libcurl but is instead #defined here only to not + make programs break */ +#define CURLE_ALREADY_COMPLETE 99999 + +#endif /*!CURL_NO_OLDIES*/ + /* This prototype applies to all conversion callbacks */ typedef CURLcode (*curl_conv_callback)(char *buffer, size_t length); @@ -420,17 +466,6 @@ typedef CURLcode (*curl_ssl_ctx_callback)(CURL *curl, /* easy handle */ OpenSSL SSL_CTX */ void *userptr); -/* Make a spelling correction for the operation timed-out define */ -#define CURLE_OPERATION_TIMEDOUT CURLE_OPERATION_TIMEOUTED - -#ifndef CURL_NO_OLDIES /* define this to test if your app builds with all - the obsolete stuff removed! */ -/* backwards compatibility with older names */ -#define CURLE_HTTP_NOT_FOUND CURLE_HTTP_RETURNED_ERROR -#define CURLE_HTTP_PORT_FAILED CURLE_INTERFACE_FAILED -#define CURLE_FTP_COULDNT_STOR_FILE CURLE_UPLOAD_FAILED -#endif - typedef enum { CURLPROXY_HTTP = 0, CURLPROXY_SOCKS4 = 4, @@ -453,21 +488,9 @@ typedef enum { #define CURLSSH_AUTH_KEYBOARD (1<<3) /* keyboard interactive */ #define CURLSSH_AUTH_DEFAULT CURLSSH_AUTH_ANY -#ifndef CURL_NO_OLDIES /* define this to test if your app builds with all - the obsolete stuff removed! */ -/* this was the error code 50 in 7.7.3 and a few earlier versions, this - is no longer used by libcurl but is instead #defined here only to not - make programs break */ -#define CURLE_ALREADY_COMPLETE 99999 - -/* These are just to make older programs not break: */ -#define CURLE_FTP_PARTIAL_FILE CURLE_PARTIAL_FILE -#define CURLE_FTP_BAD_DOWNLOAD_RESUME CURLE_BAD_DOWNLOAD_RESUME -#endif - #define CURL_ERROR_SIZE 256 -/* parameter for the CURLOPT_FTP_SSL option */ +/* parameter for the CURLOPT_USE_SSL option */ typedef enum { CURLFTPSSL_NONE, /* do not attempt to use SSL */ CURLFTPSSL_TRY, /* try using SSL, proceed anyway otherwise */ @@ -622,7 +645,7 @@ typedef enum { */ /* Set the "low speed limit" */ - CINIT(LOW_SPEED_LIMIT, LONG , 19), + CINIT(LOW_SPEED_LIMIT, LONG, 19), /* Set the "low speed time" */ CINIT(LOW_SPEED_TIME, LONG, 20), @@ -647,10 +670,8 @@ typedef enum { /* name of the file keeping your private SSL-certificate */ CINIT(SSLCERT, OBJECTPOINT, 25), - /* password for the SSL-private key, keep this for compatibility */ - CINIT(SSLCERTPASSWD, OBJECTPOINT, 26), - /* password for the SSL private key */ - CINIT(SSLKEYPASSWD, OBJECTPOINT, 26), + /* password for the SSL or SSH private key */ + CINIT(KEYPASSWD, OBJECTPOINT, 26), /* send TYPE parameter? */ CINIT(CRLF, LONG, 27), @@ -704,9 +725,9 @@ typedef enum { CINIT(FAILONERROR, LONG, 45), /* no output on http error codes >= 300 */ CINIT(UPLOAD, LONG, 46), /* this is an upload */ CINIT(POST, LONG, 47), /* HTTP POST method */ - CINIT(FTPLISTONLY, LONG, 48), /* Use NLST when listing ftp dir */ + CINIT(DIRLISTONLY, LONG, 48), /* return bare names when listing directories */ - CINIT(FTPAPPEND, LONG, 50), /* Append instead of overwrite on upload! */ + CINIT(APPEND, LONG, 50), /* Append instead of overwrite on upload! */ /* Specify whether to read the user+password from the .netrc or the URL. * This must be one of the CURL_NETRC_* enums below. */ @@ -747,8 +768,6 @@ typedef enum { * is a string, 'clear', 'safe', 'confidential' or 'private'. If the string * is set but doesn't match one of these, 'private' will be used. */ CINIT(KRBLEVEL, OBJECTPOINT, 63), - /* This is for compatibility with older curl releases */ -#define CURLOPT_KRB4LEVEL CURLOPT_KRBLEVEL /* Set if we should verify the peer in ssl handshake, set 1 to verify. */ CINIT(SSL_VERIFYPEER, LONG, 64), @@ -849,7 +868,7 @@ typedef enum { CINIT(SSLENGINE_DEFAULT, LONG, 90), /* Non-zero value means to use the global dns cache */ - CINIT(DNS_USE_GLOBAL_CACHE, LONG, 91), /* To becomeO BSOLETE soon */ + CINIT(DNS_USE_GLOBAL_CACHE, LONG, 91), /* To become OBSOLETE soon */ /* DNS cache timeout */ CINIT(DNS_CACHE_TIMEOUT, LONG, 92), @@ -931,7 +950,7 @@ typedef enum { getting a response. This is different from transfer timeout time and essentially places a demand on the FTP server to acknowledge commands in a timely manner. */ - CINIT(FTP_RESPONSE_TIMEOUT, LONG , 112), + CINIT(FTP_RESPONSE_TIMEOUT, LONG, 112), /* Set this option to one of the CURL_IPRESOLVE_* defines (see below) to tell libcurl to resolve names to those IP versions only. This only has @@ -971,7 +990,7 @@ typedef enum { CURLFTPSSL_CONTROL - SSL for the control connection or fail CURLFTPSSL_ALL - SSL for all communication or fail */ - CINIT(FTP_SSL, LONG, 119), + CINIT(USE_SSL, LONG, 119), /* The _LARGE version of the standard POSTFIELDSIZE option */ CINIT(POSTFIELDSIZE_LARGE, OFF_T, 120), @@ -987,7 +1006,7 @@ typedef enum { /* 127 OBSOLETE. Gone in 7.16.0 */ /* 128 OBSOLETE. Gone in 7.16.0 */ - /* When FTP over SSL/TLS is selected (with CURLOPT_FTP_SSL), this option + /* When FTP over SSL/TLS is selected (with CURLOPT_USE_SSL), this option can be used to change libcurl's default action which is to first try "AUTH SSL" and then "AUTH TLS" in this order, and proceed when a OK response has been received. @@ -1093,6 +1112,29 @@ typedef enum { CURLOPT_LASTENTRY /* the last unused */ } CURLoption; +#ifndef CURL_NO_OLDIES /* define this to test if your app builds with all + the obsolete stuff removed! */ + +/* Backwards compatibility with older names */ +/* These are scheduled to disappear by 2009 */ + +/* The following were added in 7.17.0 */ +#define CURLOPT_SSLKEYPASSWD CURLOPT_KEYPASSWD +#define CURLOPT_FTPAPPEND CURLOPT_APPEND +#define CURLOPT_FTPLISTONLY CURLOPT_DIRLISTONLY +#define CURLOPT_FTP_SSL CURLOPT_USE_SSL + +/* The following were added earlier */ + +#define CURLOPT_SSLCERTPASSWD CURLOPT_KEYPASSWD +#define CURLOPT_KRB4LEVEL CURLOPT_KRBLEVEL + +#else +/* This is set if CURL_NO_OLDIES is defined at compile-time */ +#undef CURLOPT_DNS_USE_GLOBAL_CACHE /* soon obsolete */ +#endif + + /* Below here follows defines for the CURLOPT_IPRESOLVE option. If a host name resolves addresses using more than one IP protocol version, this option might be handy to force libcurl to use a specific IP version. */ @@ -1106,14 +1148,6 @@ typedef enum { #define CURLOPT_READDATA CURLOPT_INFILE #define CURLOPT_HEADERDATA CURLOPT_WRITEHEADER -#ifndef CURL_NO_OLDIES /* define this to test if your app builds with all - the obsolete stuff removed! */ -#else -/* This is set if CURL_NO_OLDIES is defined at compile-time */ -#undef CURLOPT_DNS_USE_GLOBAL_CACHE /* soon obsolete */ -#endif - - /* These enums are for use with the CURLOPT_HTTP_VERSION option. */ enum { CURL_HTTP_VERSION_NONE, /* setting this means we don't care, and that we'd -- cgit v1.2.1 From 3fa60164af98720696cf157158e78ad4e0540aba Mon Sep 17 00:00:00 2001 From: Dan Fandrich Date: Fri, 31 Aug 2007 19:36:32 +0000 Subject: Renamed the CURLE_FTP_SSL_FAILED error code to CURLE_USE_SSL_FAILED. Renamed the curl_ftpssl enum to curl_usessl and its enumerated constants, creating macros for backward compatibility. --- include/curl/curl.h | 29 ++++++++++++++++++++++------- 1 file changed, 22 insertions(+), 7 deletions(-) (limited to 'include') diff --git a/include/curl/curl.h b/include/curl/curl.h index 6bd37c73f..e7f5ec59c 100644 --- a/include/curl/curl.h +++ b/include/curl/curl.h @@ -381,7 +381,7 @@ typedef enum { CURLE_BAD_CONTENT_ENCODING, /* 61 - Unrecognized transfer encoding */ CURLE_LDAP_INVALID_URL, /* 62 - Invalid LDAP URL */ CURLE_FILESIZE_EXCEEDED, /* 63 - Maximum file size exceeded */ - CURLE_FTP_SSL_FAILED, /* 64 - Requested FTP SSL level failed */ + CURLE_USE_SSL_FAILED, /* 64 - Requested FTP SSL level failed */ CURLE_SEND_FAIL_REWIND, /* 65 - Sending the data requires a rewind that failed */ CURLE_SSL_ENGINE_INITFAILED, /* 66 - failed to initialise ENGINE */ @@ -439,6 +439,7 @@ typedef enum { #define CURLE_TFTP_DISKFULL CURLE_REMOTE_DISK_FULL #define CURLE_TFTP_EXISTS CURLE_REMOTE_FILE_EXISTS #define CURLE_HTTP_RANGE_ERROR CURLE_RANGE_ERROR +#define CURLE_FTP_SSL_FAILED CURLE_USE_SSL_FAILED /* The following were added earlier */ @@ -492,12 +493,26 @@ typedef enum { /* parameter for the CURLOPT_USE_SSL option */ typedef enum { - CURLFTPSSL_NONE, /* do not attempt to use SSL */ - CURLFTPSSL_TRY, /* try using SSL, proceed anyway otherwise */ - CURLFTPSSL_CONTROL, /* SSL for the control connection or fail */ - CURLFTPSSL_ALL, /* SSL for all communication or fail */ - CURLFTPSSL_LAST /* not an option, never use */ -} curl_ftpssl; + CURLUSESSL_NONE, /* do not attempt to use SSL */ + CURLUSESSL_TRY, /* try using SSL, proceed anyway otherwise */ + CURLUSESSL_CONTROL, /* SSL for the control connection or fail */ + CURLUSESSL_ALL, /* SSL for all communication or fail */ + CURLUSESSL_LAST /* not an option, never use */ +} curl_usessl; + +#ifndef CURL_NO_OLDIES /* define this to test if your app builds with all + the obsolete stuff removed! */ + +/* Backwards compatibility with older names */ +/* These are scheduled to disappear by 2009 */ + +#define CURLFTPSSL_NONE CURLUSESSL_NONE +#define CURLFTPSSL_TRY CURLUSESSL_TRY +#define CURLFTPSSL_CONTROL CURLUSESSL_CONTROL +#define CURLFTPSSL_ALL CURLUSESSL_ALL +#define CURLFTPSSL_LAST CURLUSESSL_LAST +#define curl_ftpssl curl_usessl +#endif /*!CURL_NO_OLDIES*/ /* parameter for the CURLOPT_FTP_SSL_CCC option */ typedef enum { -- cgit v1.2.1 From 2ee41a5ffcf4b9736f56e0f69b08d51e2c8ab876 Mon Sep 17 00:00:00 2001 From: Daniel Stenberg Date: Thu, 13 Sep 2007 21:06:19 +0000 Subject: 7.17.1-CVS is now the dev version --- include/curl/curlver.h | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'include') diff --git a/include/curl/curlver.h b/include/curl/curlver.h index 4657398bc..b5593c6db 100644 --- a/include/curl/curlver.h +++ b/include/curl/curlver.h @@ -28,13 +28,13 @@ /* This is the version number of the libcurl package from which this header file origins: */ -#define LIBCURL_VERSION "7.17.0-CVS" +#define LIBCURL_VERSION "7.17.1-CVS" /* 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 0 +#define LIBCURL_VERSION_PATCH 1 /* 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 +51,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 0x071100 +#define LIBCURL_VERSION_NUM 0x071101 /* * This is the date and time when the full source package was created. The -- cgit v1.2.1 From fd4cf78f36e89b8a0913e4fb34fd7a89f5c0cfd4 Mon Sep 17 00:00:00 2001 From: Daniel Stenberg Date: Wed, 26 Sep 2007 12:44:59 +0000 Subject: Philip Langdale provided the new CURLOPT_POST301 option for curl_easy_setopt() that alters how libcurl functions when following redirects. It makes libcurl obey the RFC2616 when a 301 response is received after a non-GET request is made. Default libcurl behaviour is to change method to GET in the subsequent request (like it does for response code 302 - because that's what many/most browsers do), but with this CURLOPT_POST301 option enabled it will do what the spec says and do the next request using the same method again. I.e keep POST after 301. The curl tool got this option as --post301 Test case 1011 and 1012 were added to verify. --- include/curl/curl.h | 3 +++ 1 file changed, 3 insertions(+) (limited to 'include') diff --git a/include/curl/curl.h b/include/curl/curl.h index e7f5ec59c..0df943344 100644 --- a/include/curl/curl.h +++ b/include/curl/curl.h @@ -1124,6 +1124,9 @@ typedef enum { CINIT(NEW_FILE_PERMS, LONG, 159), CINIT(NEW_DIRECTORY_PERMS, LONG, 160), + /* Obey RFC 2616/10.3.2 and keep POSTs as POSTs after a 301 */ + CINIT(POST301, LONG, 161), + CURLOPT_LASTENTRY /* the last unused */ } CURLoption; -- cgit v1.2.1 From 51c6a5d43b09835289a469165aa7a2bfb79dbdc6 Mon Sep 17 00:00:00 2001 From: Daniel Stenberg Date: Wed, 3 Oct 2007 08:00:42 +0000 Subject: Based on a patch brought by Johnny Luong, libcurl now offers CURLOPT_SSH_HOST_PUBLIC_KEY_MD5 and the curl tool --hostpubmd5. They both make the SCP or SFTP connection verify the remote host's md5 checksum of the public key before doing a connect, to reduce the risk of a man-in-the-middle attack. --- include/curl/curl.h | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) (limited to 'include') diff --git a/include/curl/curl.h b/include/curl/curl.h index 0df943344..88d495fc9 100644 --- a/include/curl/curl.h +++ b/include/curl/curl.h @@ -419,7 +419,7 @@ typedef enum { /* These are scheduled to disappear by 2009 */ /* The following were added in 7.17.0 */ -#define CURLE_OBSOLETE CURLE_OBSOLETE50 /* noone should be using this! */ +#define CURLE_OBSOLETE CURLE_OBSOLETE50 /* noone should be using this! */ #define CURLE_BAD_PASSWORD_ENTERED CURLE_OBSOLETE46 #define CURLE_BAD_CALLING_ORDER CURLE_OBSOLETE44 #define CURLE_FTP_USER_PASSWORD_INCORRECT CURLE_OBSOLETE10 @@ -438,7 +438,7 @@ typedef enum { #define CURLE_FTP_QUOTE_ERROR CURLE_QUOTE_ERROR #define CURLE_TFTP_DISKFULL CURLE_REMOTE_DISK_FULL #define CURLE_TFTP_EXISTS CURLE_REMOTE_FILE_EXISTS -#define CURLE_HTTP_RANGE_ERROR CURLE_RANGE_ERROR +#define CURLE_HTTP_RANGE_ERROR CURLE_RANGE_ERROR #define CURLE_FTP_SSL_FAILED CURLE_USE_SSL_FAILED /* The following were added earlier */ @@ -1127,6 +1127,9 @@ typedef enum { /* Obey RFC 2616/10.3.2 and keep POSTs as POSTs after a 301 */ CINIT(POST301, LONG, 161), + /* used by scp/sftp to verify the host's public key */ + CINIT(SSH_HOST_PUBLIC_KEY_MD5, OBJECTPOINT, 162), + CURLOPT_LASTENTRY /* the last unused */ } CURLoption; @@ -1137,7 +1140,7 @@ typedef enum { /* These are scheduled to disappear by 2009 */ /* The following were added in 7.17.0 */ -#define CURLOPT_SSLKEYPASSWD CURLOPT_KEYPASSWD +#define CURLOPT_SSLKEYPASSWD CURLOPT_KEYPASSWD #define CURLOPT_FTPAPPEND CURLOPT_APPEND #define CURLOPT_FTPLISTONLY CURLOPT_DIRLISTONLY #define CURLOPT_FTP_SSL CURLOPT_USE_SSL -- cgit v1.2.1 From ce81cd21d3865270867d68935c9700dbaf5b5fcc Mon Sep 17 00:00:00 2001 From: Daniel Stenberg Date: Wed, 3 Oct 2007 08:07:50 +0000 Subject: I renamed the CURLE_SSL_PEER_CERTIFICATE error code to CURLE_PEER_FAILED_VERIFICATION (standard CURL_NO_OLDIES style), and made this return code get used by the previous SSH MD5 fingerprint check in case it fails. --- include/curl/curl.h | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) (limited to 'include') diff --git a/include/curl/curl.h b/include/curl/curl.h index 88d495fc9..52acc564a 100644 --- a/include/curl/curl.h +++ b/include/curl/curl.h @@ -367,7 +367,8 @@ typedef enum { CURLE_UNKNOWN_TELNET_OPTION, /* 48 - User specified an unknown option */ CURLE_TELNET_OPTION_SYNTAX , /* 49 - Malformed telnet option */ CURLE_OBSOLETE50, /* 50 - NOT USED */ - CURLE_SSL_PEER_CERTIFICATE, /* 51 - peer's certificate wasn't ok */ + CURLE_PEER_FAILED_VERIFICATION, /* 51 - peer's certificate or fingerprint + wasn't verified fine */ CURLE_GOT_NOTHING, /* 52 - when this is a specific error */ CURLE_SSL_ENGINE_NOTFOUND, /* 53 - SSL crypto engine not found */ CURLE_SSL_ENGINE_SETFAILED, /* 54 - can not set SSL crypto engine as @@ -416,9 +417,13 @@ typedef enum { the obsolete stuff removed! */ /* Backwards compatibility with older names */ + +/* The following were added in 7.17.1 */ /* These are scheduled to disappear by 2009 */ +#define CURLE_SSL_PEER_CERTIFICATE CURLE_PEER_FAILED_VERIFICATION /* The following were added in 7.17.0 */ +/* These are scheduled to disappear by 2009 */ #define CURLE_OBSOLETE CURLE_OBSOLETE50 /* noone should be using this! */ #define CURLE_BAD_PASSWORD_ENTERED CURLE_OBSOLETE46 #define CURLE_BAD_CALLING_ORDER CURLE_OBSOLETE44 -- cgit v1.2.1 From ce1cfcb7a6a0956c3101f5a6eb20961024e55d84 Mon Sep 17 00:00:00 2001 From: Daniel Stenberg Date: Wed, 3 Oct 2007 08:45:00 +0000 Subject: Alexey Pesternikov introduced CURLOPT_OPENSOCKETFUNCTION and CURLOPT_OPENSOCKETDATA to set a callback that allows an application to replace the socket() call used by libcurl. It basically allows the app to change address, protocol or whatever of the socket. (I also did some whitespace indent/cleanups in lib/url.c which kind of hides some of these changes, sorry for mixing those in.) --- include/curl/curl.h | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) (limited to 'include') diff --git a/include/curl/curl.h b/include/curl/curl.h index 52acc564a..37058254d 100644 --- a/include/curl/curl.h +++ b/include/curl/curl.h @@ -246,6 +246,19 @@ typedef int (*curl_sockopt_callback)(void *clientp, curl_socket_t curlfd, curlsocktype purpose); +struct Curl_sockaddr { + int family; + int socktype; + int protocol; + socklen_t addrlen; + struct sockaddr addr; +}; + +typedef curl_socket_t +(*curl_opensocket_callback)(void* clentp, + curlsocktype purpose, + struct Curl_sockaddr* address); + #ifndef CURL_NO_OLDIES /* not used since 7.10.8, will be removed in a future release */ typedef int (*curl_passwd_callback)(void *clientp, @@ -1135,6 +1148,13 @@ typedef enum { /* used by scp/sftp to verify the host's public key */ CINIT(SSH_HOST_PUBLIC_KEY_MD5, OBJECTPOINT, 162), + /* Callback function for opening socket (instead of socket(2)). Optionally, + callback is able change the address or refuse to connect returning + CURL_SOCKET_BAD. The callback should have type + curl_opensocket_callback */ + CINIT(OPENSOCKETFUNCTION, FUNCTIONPOINT, 163), + CINIT(OPENSOCKETDATA, OBJECTPOINT, 164), + CURLOPT_LASTENTRY /* the last unused */ } CURLoption; -- cgit v1.2.1 From 4bf28cb904212e37a31403a21c3d9db1f921367d Mon Sep 17 00:00:00 2001 From: Daniel Stenberg Date: Wed, 3 Oct 2007 08:58:40 +0000 Subject: exported symbols must use lowercase "curl_", and I also fixed two compiler warnings, one C99 thing and the bad pointer sent to the callback --- include/curl/curl.h | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'include') diff --git a/include/curl/curl.h b/include/curl/curl.h index 37058254d..10a287887 100644 --- a/include/curl/curl.h +++ b/include/curl/curl.h @@ -246,7 +246,7 @@ typedef int (*curl_sockopt_callback)(void *clientp, curl_socket_t curlfd, curlsocktype purpose); -struct Curl_sockaddr { +struct curl_sockaddr { int family; int socktype; int protocol; @@ -255,9 +255,9 @@ struct Curl_sockaddr { }; typedef curl_socket_t -(*curl_opensocket_callback)(void* clentp, +(*curl_opensocket_callback)(void *clientp, curlsocktype purpose, - struct Curl_sockaddr* address); + struct curl_sockaddr *address); #ifndef CURL_NO_OLDIES /* not used since 7.10.8, will be removed in a future release */ -- cgit v1.2.1 From 43a46046396afa9fa00513eed1a2539d9e849476 Mon Sep 17 00:00:00 2001 From: Gisle Vanem Date: Sat, 6 Oct 2007 17:20:06 +0000 Subject: needed for 'socklen_t' typedef. --- include/curl/curl.h | 1 + 1 file changed, 1 insertion(+) (limited to 'include') diff --git a/include/curl/curl.h b/include/curl/curl.h index 10a287887..5bd6b3feb 100644 --- a/include/curl/curl.h +++ b/include/curl/curl.h @@ -151,6 +151,7 @@ extern "C" { /* 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 -- cgit v1.2.1 From a005243908803662d4a05427bc1061db42f4d057 Mon Sep 17 00:00:00 2001 From: Patrick Monnerat Date: Mon, 15 Oct 2007 18:32:01 +0000 Subject: Fix dynamic CURLOPT_POSTFIELDS bug: back to static. CURLOPT_COPYPOSTFIELDS option added for dynamic. Fix some OS400 features. --- include/curl/curl.h | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'include') diff --git a/include/curl/curl.h b/include/curl/curl.h index 5bd6b3feb..6a7a71963 100644 --- a/include/curl/curl.h +++ b/include/curl/curl.h @@ -659,7 +659,7 @@ typedef enum { */ CINIT(INFILESIZE, LONG, 14), - /* POST input fields. */ + /* POST static input fields. */ CINIT(POSTFIELDS, OBJECTPOINT, 15), /* Set the referer page (needed by some CGIs) */ @@ -1156,6 +1156,9 @@ typedef enum { CINIT(OPENSOCKETFUNCTION, FUNCTIONPOINT, 163), CINIT(OPENSOCKETDATA, OBJECTPOINT, 164), + /* POST volatile input fields. */ + CINIT(COPYPOSTFIELDS, OBJECTPOINT, 165), + CURLOPT_LASTENTRY /* the last unused */ } CURLoption; -- cgit v1.2.1 From 1fc3b185923ebd299fd54b3057ffd060a583ef44 Mon Sep 17 00:00:00 2001 From: Daniel Stenberg Date: Mon, 29 Oct 2007 15:06:04 +0000 Subject: 7.17.2 --- include/curl/curlver.h | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'include') diff --git a/include/curl/curlver.h b/include/curl/curlver.h index b5593c6db..ec67f4cbc 100644 --- a/include/curl/curlver.h +++ b/include/curl/curlver.h @@ -28,13 +28,13 @@ /* This is the version number of the libcurl package from which this header file origins: */ -#define LIBCURL_VERSION "7.17.1-CVS" +#define LIBCURL_VERSION "7.17.2-CVS" /* 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_PATCH 2 /* 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 +51,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 0x071102 /* * This is the date and time when the full source package was created. The -- cgit v1.2.1 From 775b60fa09c335451e01fef9d7e327afbb0dff8f Mon Sep 17 00:00:00 2001 From: Yang Tse Date: Tue, 6 Nov 2007 17:18:27 +0000 Subject: Bug report #1824894 (http://curl.haxx.se/bug/view.cgi?id=1824894) pointed out a problem in curl.h when building C++ apps with MSVC. To fix it, the inclusion of header files in curl.h is moved outside of the C++ extern "C" linkage block. --- include/curl/curl.h | 74 ++++++++++++++++++++++++++--------------------------- 1 file changed, 37 insertions(+), 37 deletions(-) (limited to 'include') diff --git a/include/curl/curl.h b/include/curl/curl.h index 6a7a71963..a29476017 100644 --- a/include/curl/curl.h +++ b/include/curl/curl.h @@ -41,12 +41,48 @@ # include #endif /* defined (vms) */ -typedef void CURL; +#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 + +#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 +175,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 @@ -1241,10 +1245,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 */ -- cgit v1.2.1 From 32195c673de46a48457709bd4efa5c63525e1d68 Mon Sep 17 00:00:00 2001 From: Yang Tse Date: Thu, 8 Nov 2007 18:13:54 +0000 Subject: Define WIN32 when build target is Win32 API. This also defines it for WinCE even though it is a subset of WIN32. --- include/curl/curl.h | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) (limited to 'include') diff --git a/include/curl/curl.h b/include/curl/curl.h index a29476017..79ea49752 100644 --- a/include/curl/curl.h +++ b/include/curl/curl.h @@ -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,6 @@ # include #endif /* defined (vms) */ -#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)) -- cgit v1.2.1 From d789097af0e1f9801ad3eaca5ff6445ce888859f Mon Sep 17 00:00:00 2001 From: Yang Tse Date: Thu, 22 Nov 2007 16:35:07 +0000 Subject: Provide a socklen_t definition in curl.h for Win32 API build targets which don't have one. --- include/curl/curl.h | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) (limited to 'include') diff --git a/include/curl/curl.h b/include/curl/curl.h index 79ea49752..83028928a 100644 --- a/include/curl/curl.h +++ b/include/curl/curl.h @@ -85,6 +85,23 @@ extern "C" { typedef void CURL; +/* + * Windows build targets have socklen_t definition in + * ws2tcpip.h but some versions of ws2tcpip.h do not + * have the definition. It seems that when the socklen_t + * definition is missing from ws2tcpip.h the definition + * for INET_ADDRSTRLEN is also missing, and that when one + * definition is present the other one also is available. + */ + +#if defined(WIN32) && !defined(HAVE_SOCKLEN_T) +# if ( defined(_MSC_VER) && !defined(INET_ADDRSTRLEN) ) || \ + (!defined(_MSC_VER) && !defined(_WS2TCPIP_H_) && !defined(_WS2TCPIP_H) ) +# define socklen_t int +# define HAVE_SOCKLEN_T +# endif +#endif + /* * Decorate exportable functions for Win32 DLL linking. * This avoids using a .def file for building libcurl.dll. -- cgit v1.2.1 From 1c93e75375882ed309c7d93a1ce59d27a53f23d3 Mon Sep 17 00:00:00 2001 From: Daniel Stenberg Date: Sun, 2 Dec 2007 23:38:23 +0000 Subject: Michal Marek introduced CURLOPT_PROXY_TRANSFER_MODE which is used to control the appending of the "type=" thing on FTP URLs when they are passed to a HTTP proxy. Some proxies just don't like that appending (which is done unconditionally in 7.17.1), and some proxies treat binary/ascii transfers better with the appending done! --- include/curl/curl.h | 3 +++ 1 file changed, 3 insertions(+) (limited to 'include') diff --git a/include/curl/curl.h b/include/curl/curl.h index 83028928a..ad2bb70b3 100644 --- a/include/curl/curl.h +++ b/include/curl/curl.h @@ -1182,6 +1182,9 @@ 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), + CURLOPT_LASTENTRY /* the last unused */ } CURLoption; -- cgit v1.2.1 From a46b40b7fdf567250451b984b977f5e03c716d5e Mon Sep 17 00:00:00 2001 From: Daniel Stenberg Date: Wed, 2 Jan 2008 21:40:11 +0000 Subject: Richard Atterer brought a patch that added support for SOCKS4a proxies, which is an inofficial PROXY4 variant that sends the hostname to the proxy instead of the resolved address (which is already supported by SOCKS5). --socks4a is the curl command line option for it and CURLOPT_PROXYTYPE can now be set to CURLPROXY_SOCKS4A as well. --- include/curl/curl.h | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) (limited to 'include') diff --git a/include/curl/curl.h b/include/curl/curl.h index ad2bb70b3..a4140af76 100644 --- a/include/curl/curl.h +++ b/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 @@ -510,10 +510,12 @@ 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.17.2 */ +} curl_proxytype; /* this enum was added in 7.10 */ #define CURLAUTH_NONE 0 /* nothing */ #define CURLAUTH_BASIC (1<<0) /* Basic (default) */ @@ -958,7 +960,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 -- cgit v1.2.1 From 193d33fd4a4267c327e95cddc7d92103f187e2a3 Mon Sep 17 00:00:00 2001 From: Daniel Stenberg Date: Wed, 2 Jan 2008 22:23:27 +0000 Subject: I removed the socklen_t use from the public curl/curl.h header and instead made it an unsigned int. The type was only used in the curl_sockaddr struct definition (only used by the curl_opensocket_callback). On all platforms I could find information about, socklen_t is 32 unsigned bits large so I don't think this will break the API or ABI. The main reason for this change is of course for all the platforms that don't have a socklen_t definition in their headers to build fine again. Providing our own configure magic and custom definition of socklen_t on those systems proved to work but was a lot of cruft, code and extra magic needed - when this very small change of type seems harmless and still solves the missing socklen_t problem. --- include/curl/curl.h | 21 +++------------------ 1 file changed, 3 insertions(+), 18 deletions(-) (limited to 'include') diff --git a/include/curl/curl.h b/include/curl/curl.h index a4140af76..396a0e0f2 100644 --- a/include/curl/curl.h +++ b/include/curl/curl.h @@ -85,23 +85,6 @@ extern "C" { typedef void CURL; -/* - * Windows build targets have socklen_t definition in - * ws2tcpip.h but some versions of ws2tcpip.h do not - * have the definition. It seems that when the socklen_t - * definition is missing from ws2tcpip.h the definition - * for INET_ADDRSTRLEN is also missing, and that when one - * definition is present the other one also is available. - */ - -#if defined(WIN32) && !defined(HAVE_SOCKLEN_T) -# if ( defined(_MSC_VER) && !defined(INET_ADDRSTRLEN) ) || \ - (!defined(_MSC_VER) && !defined(_WS2TCPIP_H_) && !defined(_WS2TCPIP_H) ) -# define socklen_t int -# define HAVE_SOCKLEN_T -# endif -#endif - /* * Decorate exportable functions for Win32 DLL linking. * This avoids using a .def file for building libcurl.dll. @@ -274,7 +257,9 @@ struct curl_sockaddr { int family; int socktype; int protocol; - socklen_t addrlen; + unsigned int addrlen; /* addrlen was a socklen_t type before 7.17.2 but it + turned really ugly and painful on the systems that + lack this type */ struct sockaddr addr; }; -- cgit v1.2.1 From 2e42b0a252416803a90ea232dc94a0a21d5a97e5 Mon Sep 17 00:00:00 2001 From: Daniel Stenberg Date: Fri, 4 Jan 2008 23:01:00 +0000 Subject: Based on Maxim Perenesenko's patch, we now do SOCKS5 operations and let the proxy do the host name resolving and only if --socks5ip (or CURLOPT_SOCKS5_RESOLVE_LOCAL) is used we resolve the host name locally and pass on the IP address only to the proxy. --- include/curl/curl.h | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'include') diff --git a/include/curl/curl.h b/include/curl/curl.h index 396a0e0f2..c1288a7e9 100644 --- a/include/curl/curl.h +++ b/include/curl/curl.h @@ -1172,6 +1172,11 @@ typedef enum { /* set transfer mode (;type=) when doing FTP via an HTTP proxy */ CINIT(PROXY_TRANSFER_MODE, LONG, 166), + /* Set using of SOCKS5 to resolve host names locally instead of sending them + to the proxy to let it resolve them. Valid only if CURLOPT_PROXYTYPE == + CURLPROXY_SOCKS5, otherwise ignored. */ + CINIT(SOCKS5_RESOLVE_LOCAL, LONG, 167), + CURLOPT_LASTENTRY /* the last unused */ } CURLoption; -- cgit v1.2.1 From b4305764367f24f06ce7dedc557d90772a00eec1 Mon Sep 17 00:00:00 2001 From: Daniel Stenberg Date: Sat, 5 Jan 2008 22:04:18 +0000 Subject: Based on further discussion on curl-library, I reverted yesterday's SOCKS5 code to instead introduce support for a new proxy type called CURLPROXY_SOCKS5_HOSTNAME that is used to send the host name to the proxy instead of IP address and there's thus no longer any need for a new curl_easy_setopt() option. The default SOCKS5 proxy is again back to sending the IP address to the proxy. The new curl command line option for enabling sending host name to a SOCKS5 proxy is now --socks5-hostname. --- include/curl/curl.h | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) (limited to 'include') diff --git a/include/curl/curl.h b/include/curl/curl.h index c1288a7e9..189693137 100644 --- a/include/curl/curl.h +++ b/include/curl/curl.h @@ -499,7 +499,10 @@ typedef enum { 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.17.2 */ + CURLPROXY_SOCKS4A = 6, /* added in 7.17.2 */ + CURLPROXY_SOCKS5_HOSTNAME = 7 /* Use the SOCKS5 protocol but pass along the + host name rather than the IP address. added + in 7.17.2 */ } curl_proxytype; /* this enum was added in 7.10 */ #define CURLAUTH_NONE 0 /* nothing */ @@ -1172,11 +1175,6 @@ typedef enum { /* set transfer mode (;type=) when doing FTP via an HTTP proxy */ CINIT(PROXY_TRANSFER_MODE, LONG, 166), - /* Set using of SOCKS5 to resolve host names locally instead of sending them - to the proxy to let it resolve them. Valid only if CURLOPT_PROXYTYPE == - CURLPROXY_SOCKS5, otherwise ignored. */ - CINIT(SOCKS5_RESOLVE_LOCAL, LONG, 167), - CURLOPT_LASTENTRY /* the last unused */ } CURLoption; -- cgit v1.2.1 From de23b98522991dbc1f2c184216d9f73bead83895 Mon Sep 17 00:00:00 2001 From: Daniel Stenberg Date: Tue, 8 Jan 2008 14:52:05 +0000 Subject: Introducing curl_easy_pause() and new magic return codes for both the read and the write callbacks that now can make a connection's reading and/or writing get paused. --- include/curl/curl.h | 33 +++++++++++++++++++++++++++++---- include/curl/curlver.h | 10 +++++----- 2 files changed, 34 insertions(+), 9 deletions(-) (limited to 'include') diff --git a/include/curl/curl.h b/include/curl/curl.h index 189693137..b6dcc4a85 100644 --- a/include/curl/curl.h +++ b/include/curl/curl.h @@ -230,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, @@ -239,6 +241,9 @@ 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 size_t (*curl_read_callback)(char *buffer, size_t size, size_t nitems, @@ -257,7 +262,7 @@ struct curl_sockaddr { int family; int socktype; int protocol; - unsigned int addrlen; /* addrlen was a socklen_t type before 7.17.2 but it + 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; @@ -499,10 +504,10 @@ typedef enum { 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.17.2 */ + 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.17.2 */ + in 7.18.0 */ } curl_proxytype; /* this enum was added in 7.10 */ #define CURLAUTH_NONE 0 /* nothing */ @@ -1749,6 +1754,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/include/curl/curlver.h b/include/curl/curlver.h index ec67f4cbc..e201fd6fa 100644 --- a/include/curl/curlver.h +++ b/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 @@ -28,13 +28,13 @@ /* This is the version number of the libcurl package from which this header file origins: */ -#define LIBCURL_VERSION "7.17.2-CVS" +#define LIBCURL_VERSION "7.18.0-CVS" /* 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 2 +#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 +51,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 0x071102 +#define LIBCURL_VERSION_NUM 0x071200 /* * This is the date and time when the full source package was created. The -- cgit v1.2.1 From 18faa509403c39b4914114cfe2966241b62b2959 Mon Sep 17 00:00:00 2001 From: Daniel Stenberg Date: Thu, 10 Jan 2008 10:30:19 +0000 Subject: Georg Lippitsch brought CURLOPT_SEEKFUNCTION and CURLOPT_SEEKDATA to allow libcurl to seek in a given input stream. This is particularly important when doing upload resumes when there's already a huge part of the file present remotely. Before, and still if this callback isn't used, libcurl will read and through away the entire file up to the point to where the resuming begins (which of course can be a slow opereration depending on file size, I/O bandwidth and more). This new function will also be preferred to get used instead of the CURLOPT_IOCTLFUNCTION for seeking back in a stream when doing multi-stage HTTP auth with POST/PUT. --- include/curl/curl.h | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'include') diff --git a/include/curl/curl.h b/include/curl/curl.h index b6dcc4a85..f303d426c 100644 --- a/include/curl/curl.h +++ b/include/curl/curl.h @@ -244,6 +244,10 @@ typedef size_t (*curl_write_callback)(char *buffer, /* 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, @@ -1180,6 +1184,10 @@ typedef enum { /* 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; -- cgit v1.2.1 From 6fa72e6417005b33c4754c0afdb52f43d22813bf Mon Sep 17 00:00:00 2001 From: Gunter Knauf Date: Thu, 24 Jan 2008 14:05:56 +0000 Subject: added copyright define to curlver.h. --- include/curl/curlver.h | 3 +++ 1 file changed, 3 insertions(+) (limited to 'include') diff --git a/include/curl/curlver.h b/include/curl/curlver.h index e201fd6fa..c419143a2 100644 --- a/include/curl/curlver.h +++ b/include/curl/curlver.h @@ -26,6 +26,9 @@ /* 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.18.0-CVS" -- cgit v1.2.1 From ddc98c6fc9157fa666d6535a10e8f1a2411e9dae Mon Sep 17 00:00:00 2001 From: Daniel Stenberg Date: Mon, 28 Jan 2008 21:19:15 +0000 Subject: start over on 7.18.1 --- include/curl/curlver.h | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'include') diff --git a/include/curl/curlver.h b/include/curl/curlver.h index c419143a2..64ccc07e7 100644 --- a/include/curl/curlver.h +++ b/include/curl/curlver.h @@ -31,13 +31,13 @@ /* This is the version number of the libcurl package from which this header file origins: */ -#define LIBCURL_VERSION "7.18.0-CVS" +#define LIBCURL_VERSION "7.18.1-CVS" /* The numeric version number is also available "in parts" by using these defines: */ #define LIBCURL_VERSION_MAJOR 7 #define LIBCURL_VERSION_MINOR 18 -#define LIBCURL_VERSION_PATCH 0 +#define LIBCURL_VERSION_PATCH 1 /* This is the numeric version of the libcurl version number, meant for easier parsing and comparions by programs. The LIBCURL_VERSION_NUM define will @@ -54,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 0x071200 +#define LIBCURL_VERSION_NUM 0x071201 /* * This is the date and time when the full source package was created. The -- cgit v1.2.1 From 7a8a20416fd7648686f05d14947ccdab44c6780c Mon Sep 17 00:00:00 2001 From: Michal Marek Date: Tue, 11 Mar 2008 07:37:40 +0000 Subject: - Added a type checking macro for curl_easy_setopt(), needs gcc-4.3 and only works in C mode atm (http://curl.haxx.se/mail/lib-2008-02/0267.html , http://curl.haxx.se/mail/lib-2008-02/0292.html ) --- include/curl/Makefile.am | 3 +- include/curl/curl.h | 5 + include/curl/typecheck-gcc.h | 482 +++++++++++++++++++++++++++++++++++++++++++ 3 files changed, 489 insertions(+), 1 deletion(-) create mode 100644 include/curl/typecheck-gcc.h (limited to 'include') diff --git a/include/curl/Makefile.am b/include/curl/Makefile.am index 347cf7ef9..707d1359f 100644 --- a/include/curl/Makefile.am +++ b/include/curl/Makefile.am @@ -1,5 +1,6 @@ pkginclude_HEADERS = \ - curl.h curlver.h easy.h mprintf.h stdcheaders.h types.h multi.h + curl.h curlver.h easy.h mprintf.h stdcheaders.h types.h multi.h \ + typecheck-gcc.h pkgincludedir= $(includedir)/curl CLEANFILES = *dist diff --git a/include/curl/curl.h b/include/curl/curl.h index f303d426c..3027ca06d 100644 --- a/include/curl/curl.h +++ b/include/curl/curl.h @@ -1791,4 +1791,9 @@ CURL_EXTERN CURLcode curl_easy_pause(CURL *handle, int bitmask); #include "easy.h" /* nothing in curl is fun without the easy stuff */ #include "multi.h" +/* the typechecker doesn't work in C++ (yet) */ +#if (__GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 3)) && !defined(__cplusplus) +#include "typecheck-gcc.h" +#endif /* gcc >= 4.3 && !__cplusplus */ + #endif /* __CURL_CURL_H */ diff --git a/include/curl/typecheck-gcc.h b/include/curl/typecheck-gcc.h new file mode 100644 index 000000000..2051f4e39 --- /dev/null +++ b/include/curl/typecheck-gcc.h @@ -0,0 +1,482 @@ +#ifndef __CURL_TYPECHECK_GCC_H +#define __CURL_TYPECHECK_GCC_H +/*************************************************************************** + * _ _ ____ _ + * Project ___| | | | _ \| | + * / __| | | | |_) | | + * | (__| |_| | _ <| |___ + * \___|\___/|_| \_\_____| + * + * 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 + * are also available at http://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 + * furnished to do so, under the terms of the COPYING file. + * + * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY + * KIND, either express or implied. + * + * $Id$ + ***************************************************************************/ + +/* wraps curl_easy_setopt() with typechecking */ + +/* To add a new kind of warning, add an + * if(_curl_is_sometype_option(_curl_opt) && ! _curl_is_sometype(value)) + * _curl_easy_setopt_err_sometype(); + * block and define _curl_is_sometype_option, _curl_is_sometype and + * _curl_easy_setopt_err_sometype below + * + * To add an option that uses the same type as an existing option, you'll just + * need to extend the appropriate _curl_*_option macro + */ +#define curl_easy_setopt(handle, option, value) \ +({ \ + __typeof__ (option) _curl_opt = option; \ + if (__builtin_constant_p(_curl_opt)) { \ + if (_curl_is_long_option(_curl_opt) && !_curl_is_long(value)) \ + _curl_easy_setopt_err_long(); \ + if (_curl_is_off_t_option(_curl_opt) && !_curl_is_off_t(value)) \ + _curl_easy_setopt_err_curl_off_t(); \ + if (_curl_is_string_option(_curl_opt) && !_curl_is_string(value)) \ + _curl_easy_setopt_err_string(); \ + if (_curl_is_write_cb_option(_curl_opt) && !_curl_is_write_cb(value)) \ + _curl_easy_setopt_err_write_callback(); \ + if ((_curl_opt) == CURLOPT_READFUNCTION && !_curl_is_read_cb(value)) \ + _curl_easy_setopt_err_read_cb(); \ + if ((_curl_opt) == CURLOPT_IOCTLFUNCTION && !_curl_is_ioctl_cb(value)) \ + _curl_easy_setopt_err_ioctl_cb(); \ + if ((_curl_opt) == CURLOPT_SOCKOPTFUNCTION && !_curl_is_sockopt_cb(value))\ + _curl_easy_setopt_err_sockopt_cb(); \ + if ((_curl_opt) == CURLOPT_OPENSOCKETFUNCTION && \ + !_curl_is_opensocket_cb(value)) \ + _curl_easy_setopt_err_opensocket_cb(); \ + if ((_curl_opt) == CURLOPT_PROGRESSFUNCTION && \ + !_curl_is_progress_cb(value)) \ + _curl_easy_setopt_err_progress_cb(); \ + if ((_curl_opt) == CURLOPT_DEBUGFUNCTION && !_curl_is_debug_cb(value)) \ + _curl_easy_setopt_err_debug_cb(); \ + if ((_curl_opt) == CURLOPT_SSL_CTX_FUNCTION && \ + !_curl_is_ssl_ctx_cb(value)) \ + _curl_easy_setopt_err_ssl_ctx_cb(); \ + if (_curl_is_conv_cb_option(_curl_opt) && !_curl_is_conv_cb(value)) \ + _curl_easy_setopt_err_conv_cb(); \ + if ((_curl_opt) == CURLOPT_SEEKFUNCTION && !_curl_is_seek_cb(value)) \ + _curl_easy_setopt_err_seek_cb(); \ + if (_curl_is_cb_data_option(_curl_opt) && !_curl_is_cb_data(value)) \ + _curl_easy_setopt_err_cb_data(); \ + if ((_curl_opt) == CURLOPT_ERRORBUFFER && !_curl_is_error_buffer(value)) \ + _curl_easy_setopt_err_error_buffer(); \ + if ((_curl_opt) == CURLOPT_STDERR && !_curl_is_FILE(value)) \ + _curl_easy_setopt_err_FILE(); \ + if (_curl_is_postfields_option(_curl_opt) && !_curl_is_postfields(value)) \ + _curl_easy_setopt_err_postfields(); \ + if ((_curl_opt) == CURLOPT_HTTPPOST && \ + !_curl_is_ptr((value), struct curl_httppost)) \ + _curl_easy_setopt_err_curl_httpost(); \ + if (_curl_is_slist_option(_curl_opt) && \ + !_curl_is_ptr((value), struct curl_slist)) \ + _curl_easy_setopt_err_curl_slist(); \ + if ((_curl_opt) == CURLOPT_SHARE && !_curl_is_ptr((value), CURLSH)) \ + _curl_easy_setopt_err_CURLSH(); \ + } \ + curl_easy_setopt(handle, _curl_opt, value); \ +}) + +/* the actual warnings, triggered by calling the _curl_easy_setopt_err* + * functions */ + +/* To define a new warning, use _CURL_WARNING(identifier, "message"); */ +#define _CURL_WARNING(id, message) \ + static void __attribute__((warning(message))) __attribute__((unused)) \ + __attribute__((noinline)) id(void) { __asm__(""); } + +_CURL_WARNING(_curl_easy_setopt_err_long, + "curl_easy_setopt expects a long argument for this option"); +_CURL_WARNING(_curl_easy_setopt_err_curl_off_t, + "curl_easy_setopt expects a curl_off_t argument for this option"); +_CURL_WARNING(_curl_easy_setopt_err_string, + "curl_easy_setopt expects a string (char* or char[]) argument for this option"); +_CURL_WARNING(_curl_easy_setopt_err_write_callback, + "curl_easy_setopt expects a curl_write_callback argument for this option"); +_CURL_WARNING(_curl_easy_setopt_err_read_cb, + "curl_easy_setopt expects a curl_read_callback argument for this option"); +_CURL_WARNING(_curl_easy_setopt_err_ioctl_cb, + "curl_easy_setopt expects a curl_ioctl_callback argument for this option"); +_CURL_WARNING(_curl_easy_setopt_err_sockopt_cb, + "curl_easy_setopt expects a curl_sockopt_callback argument for this option"); +_CURL_WARNING(_curl_easy_setopt_err_opensocket_cb, + "curl_easy_setopt expects a curl_opensocket_callback argument for this option"); +_CURL_WARNING(_curl_easy_setopt_err_progress_cb, + "curl_easy_setopt expects a curl_progress_callback argument for this option"); +_CURL_WARNING(_curl_easy_setopt_err_debug_cb, + "curl_easy_setopt expects a curl_debug_callback argument for this option"); +_CURL_WARNING(_curl_easy_setopt_err_ssl_ctx_cb, + "curl_easy_setopt expects a curl_ssl_ctx_callback argument for this option"); +_CURL_WARNING(_curl_easy_setopt_err_conv_cb, + "curl_easy_setopt expects a curl_conv_callback argument for this option"); +_CURL_WARNING(_curl_easy_setopt_err_seek_cb, + "curl_easy_setopt expects a curl_seek_callback argument for this option"); +_CURL_WARNING(_curl_easy_setopt_err_cb_data, + "curl_easy_setopt expects a private data pointer as argument for this option"); +_CURL_WARNING(_curl_easy_setopt_err_error_buffer, + "curl_easy_setopt expects a char buffer of CURL_ERROR_SIZE as argument for this option"); +_CURL_WARNING(_curl_easy_setopt_err_FILE, + "curl_easy_setopt expects a FILE* argument for this option"); +_CURL_WARNING(_curl_easy_setopt_err_postfields, + "curl_easy_setopt expects a void* or char* argument for this option"); +_CURL_WARNING(_curl_easy_setopt_err_curl_httpost, + "curl_easy_setopt expects a struct curl_httppost* argument for this option"); +_CURL_WARNING(_curl_easy_setopt_err_curl_slist, + "curl_easy_setopt expects a struct curl_slist* argument for this option"); +_CURL_WARNING(_curl_easy_setopt_err_CURLSH, + "curl_easy_setopt expects a CURLSH* argument for this option"); + +/* groups of options that take the same type of argument */ + +/* To add a new option to one of the groups, just add + * (option) == CURLOPT_SOMETHING + * to the or-expression. If the option takes a long or curl_off_t, you don't + * have to do anything + */ + +/* evaluates to true if option takes a long argument */ +#define _curl_is_long_option(option) \ + (0 < (option) && (option) < CURLOPTTYPE_OBJECTPOINT) + +#define _curl_is_off_t_option(option) \ + ((option) > CURLOPTTYPE_OFF_T) + +/* evaluates to true if option takes a char* argument */ +#define _curl_is_string_option(option) \ + ((option) == CURLOPT_URL || \ + (option) == CURLOPT_PROXY || \ + (option) == CURLOPT_INTERFACE || \ + (option) == CURLOPT_NETRC_FILE || \ + (option) == CURLOPT_USERPWD || \ + (option) == CURLOPT_PROXYUSERPWD || \ + (option) == CURLOPT_ENCODING || \ + (option) == CURLOPT_REFERER || \ + (option) == CURLOPT_USERAGENT || \ + (option) == CURLOPT_COOKIE || \ + (option) == CURLOPT_COOKIEFILE || \ + (option) == CURLOPT_COOKIEJAR || \ + (option) == CURLOPT_COOKIELIST || \ + (option) == CURLOPT_FTPPORT || \ + (option) == CURLOPT_FTP_ALTERNATIVE_TO_USER || \ + (option) == CURLOPT_FTP_ACCOUNT || \ + (option) == CURLOPT_RANGE || \ + (option) == CURLOPT_CUSTOMREQUEST || \ + (option) == CURLOPT_SSLCERT || \ + (option) == CURLOPT_SSLCERTTYPE || \ + (option) == CURLOPT_SSLKEY || \ + (option) == CURLOPT_SSLKEYTYPE || \ + (option) == CURLOPT_KEYPASSWD || \ + (option) == CURLOPT_SSLENGINE || \ + (option) == CURLOPT_CAINFO || \ + (option) == CURLOPT_CAPATH || \ + (option) == CURLOPT_RANDOM_FILE || \ + (option) == CURLOPT_EGDSOCKET || \ + (option) == CURLOPT_SSL_CIPHER_LIST || \ + (option) == CURLOPT_KRBLEVEL || \ + (option) == CURLOPT_SSH_HOST_PUBLIC_KEY_MD5 || \ + (option) == CURLOPT_SSH_PUBLIC_KEYFILE || \ + (option) == CURLOPT_SSH_PRIVATE_KEYFILE || \ + 0) + +/* evaluates to true if option takes a curl_write_callback argument */ +#define _curl_is_write_cb_option(option) \ + ((option) == CURLOPT_HEADERFUNCTION || \ + (option) == CURLOPT_WRITEFUNCTION) + +/* evaluates to true if option takes a curl_conv_callback argument */ +#define _curl_is_conv_cb_option(option) \ + ((option) == CURLOPT_CONV_TO_NETWORK_FUNCTION || \ + (option) == CURLOPT_CONV_FROM_NETWORK_FUNCTION || \ + (option) == CURLOPT_CONV_FROM_UTF8_FUNCTION) + +/* evaluates to true if option takes a data argument to pass to a callback */ +#define _curl_is_cb_data_option(option) \ + ((option) == CURLOPT_WRITEDATA || \ + (option) == CURLOPT_READDATA || \ + (option) == CURLOPT_IOCTLDATA || \ + (option) == CURLOPT_SOCKOPTDATA || \ + (option) == CURLOPT_OPENSOCKETDATA || \ + (option) == CURLOPT_PROGRESSDATA || \ + (option) == CURLOPT_WRITEHEADER || \ + (option) == CURLOPT_DEBUGDATA || \ + (option) == CURLOPT_SSL_CTX_DATA || \ + (option) == CURLOPT_SEEKDATA || \ + (option) == CURLOPT_PRIVATE || \ + 0) + +/* evaluates to true if option takes a POST data argument (void* or char*) */ +#define _curl_is_postfields_option(option) \ + ((option) == CURLOPT_POSTFIELDS || \ + (option) == CURLOPT_COPYPOSTFIELDS || \ + 0) + +/* evaluates to true if option takes a struct curl_slist * argument */ +#define _curl_is_slist_option(option) \ + ((option) == CURLOPT_HTTPHEADER || \ + (option) == CURLOPT_HTTP200ALIASES || \ + (option) == CURLOPT_QUOTE || \ + (option) == CURLOPT_POSTQUOTE || \ + (option) == CURLOPT_PREQUOTE || \ + (option) == CURLOPT_TELNETOPTIONS || \ + 0) + +/* typecheck helpers -- check whether given expression has requested type*/ + +/* For pointers, you can use the _curl_is_ptr macro, otherwise define a new + * macro. Search for __builtin_types_compatible_p in the GCC manual. NOTE: + * these macros MUST NOT EVALUATE their arguments! The argument is the actual + * expression passed to the curl_easy_setopt macro. This means that you can + * only apply the sizeof and __typeof__ operators, no == or whatsoever. + */ + +/* XXX: should evaluate to true iff expr is a pointer */ +#define _curl_is_any_ptr(expr) \ + (sizeof(expr) == sizeof(void*)) + +/* evaluates to true if expr is NULL */ +/* XXX: must not evaluate expr, so this check is not accurate */ +#define _curl_is_NULL(expr) \ + (__builtin_types_compatible_p(__typeof__(expr), __typeof__(NULL))) + +/* evaluates to true if expr is type*, const type* or NULL */ +#define _curl_is_ptr(expr, type) \ + (_curl_is_NULL(expr) || \ + __builtin_types_compatible_p(__typeof__(expr), type *) || \ + __builtin_types_compatible_p(__typeof__(expr), const type *)) + +/* evaluates to true if expr is one of type[], type*, NULL or const type* */ +#define _curl_is_arr(expr, type) \ + (_curl_is_ptr((expr), type) || \ + __builtin_types_compatible_p(__typeof__(expr), type [])) + +/* evaluates to true if expr is a string */ +#define _curl_is_string(expr) \ + (_curl_is_arr((expr), char) || \ + _curl_is_arr((expr), signed char) || \ + _curl_is_arr((expr), unsigned char)) + +/* evaluates to true if expr is a long (no matter the signedness) + * XXX: for now, int is also accepted (and therefore short and char, which + * are promoted to int when passed to a variadic function) */ +#define _curl_is_long(expr) \ + (__builtin_types_compatible_p(__typeof__(expr), long) || \ + __builtin_types_compatible_p(__typeof__(expr), signed long) || \ + __builtin_types_compatible_p(__typeof__(expr), unsigned long) || \ + __builtin_types_compatible_p(__typeof__(expr), int) || \ + __builtin_types_compatible_p(__typeof__(expr), signed int) || \ + __builtin_types_compatible_p(__typeof__(expr), unsigned int) || \ + __builtin_types_compatible_p(__typeof__(expr), short) || \ + __builtin_types_compatible_p(__typeof__(expr), signed short) || \ + __builtin_types_compatible_p(__typeof__(expr), unsigned short) || \ + __builtin_types_compatible_p(__typeof__(expr), char) || \ + __builtin_types_compatible_p(__typeof__(expr), signed char) || \ + __builtin_types_compatible_p(__typeof__(expr), unsigned char)) + +/* evaluates to true if expr is of type curl_off_t */ +#define _curl_is_off_t(expr) \ + (__builtin_types_compatible_p(__typeof__(expr), curl_off_t)) + +/* evaluates to true if expr is abuffer suitable for CURLOPT_ERRORBUFFER */ +/* XXX: also check size of an char[] array? */ +#define _curl_is_error_buffer(expr) \ + (__builtin_types_compatible_p(__typeof__(expr), char *) || \ + __builtin_types_compatible_p(__typeof__(expr), char[])) + +/* evaluates to true if expr is of type (const) void* or (const) FILE* */ +#if 0 +#define _curl_is_cb_data(expr) \ + (_curl_is_ptr((expr), void) || \ + _curl_is_ptr((expr), FILE)) +#else /* be less strict */ +#define _curl_is_cb_data(expr) \ + _curl_is_any_ptr(expr) +#endif + +/* evaluates to true if expr is of type FILE* */ +#define _curl_is_FILE(expr) \ + (__builtin_types_compatible_p(__typeof__(expr), FILE *)) + +/* evaluates to true if expr can be passed as POST data (void* or char*) */ +#define _curl_is_postfields(expr) \ + (_curl_is_ptr((expr), void) || \ + _curl_is_arr((expr), char)) + +/* FIXME: the whole callback checking is messy... + * The idea is to tolerate char vs. void and const vs. not const + * pointers in arguments at least + */ +/* helper: __builtin_types_compatible_p distinguishes between functions and + * function pointers, hide it */ +#define _curl_callback_compatible(func, type) \ + (__builtin_types_compatible_p(__typeof__(func), type) || \ + __builtin_types_compatible_p(__typeof__(func), type*)) + +/* evaluates to true if expr is of type curl_read_callback or "similar" */ +#define _curl_is_read_cb(expr) \ + (_curl_is_NULL(expr) || \ + __builtin_types_compatible_p(__typeof__(expr), __typeof__(fread)) || \ + __builtin_types_compatible_p(__typeof__(expr), curl_read_callback) || \ + _curl_callback_compatible((expr), _curl_read_callback1) || \ + _curl_callback_compatible((expr), _curl_read_callback2) || \ + _curl_callback_compatible((expr), _curl_read_callback3) || \ + _curl_callback_compatible((expr), _curl_read_callback4) || \ + _curl_callback_compatible((expr), _curl_read_callback5) || \ + _curl_callback_compatible((expr), _curl_read_callback6)) +typedef size_t (_curl_read_callback1)(char *, size_t, size_t, void*); +typedef size_t (_curl_read_callback2)(char *, size_t, size_t, const void*); +typedef size_t (_curl_read_callback3)(char *, size_t, size_t, FILE*); +typedef size_t (_curl_read_callback4)(void *, size_t, size_t, void*); +typedef size_t (_curl_read_callback5)(void *, size_t, size_t, const void*); +typedef size_t (_curl_read_callback6)(void *, size_t, size_t, FILE*); + +/* evaluates to true if expr is of type curl_write_callback or "similar" */ +#define _curl_is_write_cb(expr) \ + (_curl_is_read_cb(expr) || \ + __builtin_types_compatible_p(__typeof__(expr), __typeof__(fwrite)) || \ + __builtin_types_compatible_p(__typeof__(expr), curl_write_callback) || \ + _curl_callback_compatible((expr), _curl_write_callback1) || \ + _curl_callback_compatible((expr), _curl_write_callback2) || \ + _curl_callback_compatible((expr), _curl_write_callback3) || \ + _curl_callback_compatible((expr), _curl_write_callback4) || \ + _curl_callback_compatible((expr), _curl_write_callback5) || \ + _curl_callback_compatible((expr), _curl_write_callback6)) +typedef size_t (_curl_write_callback1)(const char *, size_t, size_t, void*); +typedef size_t (_curl_write_callback2)(const char *, size_t, size_t, const void*); +typedef size_t (_curl_write_callback3)(const char *, size_t, size_t, FILE*); +typedef size_t (_curl_write_callback4)(const void *, size_t, size_t, void*); +typedef size_t (_curl_write_callback5)(const void *, size_t, size_t, const void*); +typedef size_t (_curl_write_callback6)(const void *, size_t, size_t, FILE*); + +/* evaluates to true if expr is of type curl_ioctl_callback or "similar" */ +#define _curl_is_ioctl_cb(expr) \ + (_curl_is_NULL(expr) || \ + __builtin_types_compatible_p(__typeof__(expr), curl_ioctl_callback) || \ + _curl_callback_compatible((expr), _curl_ioctl_callback1) || \ + _curl_callback_compatible((expr), _curl_ioctl_callback2) || \ + _curl_callback_compatible((expr), _curl_ioctl_callback3) || \ + _curl_callback_compatible((expr), _curl_ioctl_callback4)) +typedef curlioerr (_curl_ioctl_callback1)(CURL *, int, void*); +typedef curlioerr (_curl_ioctl_callback2)(CURL *, int, const void*); +typedef curlioerr (_curl_ioctl_callback3)(CURL *, curliocmd, void*); +typedef curlioerr (_curl_ioctl_callback4)(CURL *, curliocmd, const void*); + +/* evaluates to true if expr is of type curl_sockopt_callback or "similar" */ +#define _curl_is_sockopt_cb(expr) \ + (_curl_is_NULL(expr) || \ + __builtin_types_compatible_p(__typeof__(expr), curl_sockopt_callback) || \ + _curl_callback_compatible((expr), _curl_sockopt_callback1) || \ + _curl_callback_compatible((expr), _curl_sockopt_callback2)) +typedef int (_curl_sockopt_callback1)(void *, curl_socket_t, curlsocktype); +typedef int (_curl_sockopt_callback2)(const void *, curl_socket_t, curlsocktype); + +/* evaluates to true if expr is of type curl_opensocket_callback or "similar" */ +#define _curl_is_opensocket_cb(expr) \ + (_curl_is_NULL(expr) || \ + __builtin_types_compatible_p(__typeof__(expr), curl_opensocket_callback) ||\ + _curl_callback_compatible((expr), _curl_opensocket_callback1) || \ + _curl_callback_compatible((expr), _curl_opensocket_callback2) || \ + _curl_callback_compatible((expr), _curl_opensocket_callback3) || \ + _curl_callback_compatible((expr), _curl_opensocket_callback4)) +typedef curl_socket_t (_curl_opensocket_callback1) + (void *, curlsocktype, struct curl_sockaddr *); +typedef curl_socket_t (_curl_opensocket_callback2) + (void *, curlsocktype, const struct curl_sockaddr *); +typedef curl_socket_t (_curl_opensocket_callback3) + (const void *, curlsocktype, struct curl_sockaddr *); +typedef curl_socket_t (_curl_opensocket_callback4) + (const void *, curlsocktype, const struct curl_sockaddr *); + +/* evaluates to true if expr is of type curl_progress_callback or "similar" */ +#define _curl_is_progress_cb(expr) \ + (_curl_is_NULL(expr) || \ + __builtin_types_compatible_p(__typeof__(expr), curl_progress_callback) || \ + _curl_callback_compatible((expr), _curl_progress_callback1) || \ + _curl_callback_compatible((expr), _curl_progress_callback2)) +typedef int (_curl_progress_callback1)(void *, + double, double, double, double); +typedef int (_curl_progress_callback2)(const void *, + double, double, double, double); + +/* evaluates to true if expr is of type curl_debug_callback or "similar" */ +#define _curl_is_debug_cb(expr) \ + (_curl_is_NULL(expr) || \ + __builtin_types_compatible_p(__typeof__(expr), curl_debug_callback) || \ + _curl_callback_compatible((expr), _curl_debug_callback1) || \ + _curl_callback_compatible((expr), _curl_debug_callback2) || \ + _curl_callback_compatible((expr), _curl_debug_callback3) || \ + _curl_callback_compatible((expr), _curl_debug_callback4)) +typedef int (_curl_debug_callback1) (CURL *, + curl_infotype, char *, size_t, void *); +typedef int (_curl_debug_callback2) (CURL *, + curl_infotype, char *, size_t, const void *); +typedef int (_curl_debug_callback3) (CURL *, + curl_infotype, const char *, size_t, void *); +typedef int (_curl_debug_callback4) (CURL *, + curl_infotype, const char *, size_t, const void *); + +/* evaluates to true if expr is of type curl_ssl_ctx_callback or "similar" */ +/* this is getting even messier... */ +#define _curl_is_ssl_ctx_cb(expr) \ + (_curl_is_NULL(expr) || \ + __builtin_types_compatible_p(__typeof__(expr), curl_ssl_ctx_callback) || \ + _curl_callback_compatible((expr), _curl_ssl_ctx_callback1) || \ + _curl_callback_compatible((expr), _curl_ssl_ctx_callback2) || \ + _curl_callback_compatible((expr), _curl_ssl_ctx_callback3) || \ + _curl_callback_compatible((expr), _curl_ssl_ctx_callback4) || \ + _curl_callback_compatible((expr), _curl_ssl_ctx_callback5) || \ + _curl_callback_compatible((expr), _curl_ssl_ctx_callback6) || \ + _curl_callback_compatible((expr), _curl_ssl_ctx_callback7) || \ + _curl_callback_compatible((expr), _curl_ssl_ctx_callback8)) +typedef CURLcode (_curl_ssl_ctx_callback1)(CURL *, void *, void *); +typedef CURLcode (_curl_ssl_ctx_callback2)(CURL *, void *, const void *); +typedef CURLcode (_curl_ssl_ctx_callback3)(CURL *, const void *, void *); +typedef CURLcode (_curl_ssl_ctx_callback4)(CURL *, const void *, const void *); +#ifdef HEADER_SSL_H +/* hack: if we included OpenSSL's ssl.h, we know about SSL_CTX + * this will of course break if we're included before OpenSSL headers... + */ +typedef CURLcode (_curl_ssl_ctx_callback5)(CURL *, SSL_CTX, void *); +typedef CURLcode (_curl_ssl_ctx_callback6)(CURL *, SSL_CTX, const void *); +typedef CURLcode (_curl_ssl_ctx_callback7)(CURL *, const SSL_CTX, void *); +typedef CURLcode (_curl_ssl_ctx_callback8)(CURL *, const SSL_CTX, const void *); +#else +typedef _curl_ssl_ctx_callback1 _curl_ssl_ctx_callback5; +typedef _curl_ssl_ctx_callback1 _curl_ssl_ctx_callback6; +typedef _curl_ssl_ctx_callback1 _curl_ssl_ctx_callback7; +typedef _curl_ssl_ctx_callback1 _curl_ssl_ctx_callback8; +#endif + +/* evaluates to true if expr is of type curl_conv_callback or "similar" */ +#define _curl_is_conv_cb(expr) \ + (_curl_is_NULL(expr) || \ + __builtin_types_compatible_p(__typeof__(expr), curl_conv_callback) || \ + _curl_callback_compatible((expr), _curl_conv_callback1) || \ + _curl_callback_compatible((expr), _curl_conv_callback2) || \ + _curl_callback_compatible((expr), _curl_conv_callback3) || \ + _curl_callback_compatible((expr), _curl_conv_callback4)) +typedef CURLcode (*_curl_conv_callback1)(char *, size_t length); +typedef CURLcode (*_curl_conv_callback2)(const char *, size_t length); +typedef CURLcode (*_curl_conv_callback3)(void *, size_t length); +typedef CURLcode (*_curl_conv_callback4)(const void *, size_t length); + +/* evaluates to true if expr is of type curl_seek_callback or "similar" */ +#define _curl_is_seek_cb(expr) \ + (_curl_is_NULL(expr) || \ + __builtin_types_compatible_p(__typeof__(expr), curl_seek_callback) || \ + _curl_callback_compatible((expr), _curl_seek_callback1) || \ + _curl_callback_compatible((expr), _curl_seek_callback2)) +typedef CURLcode (*_curl_seek_callback1)(void *, curl_off_t, int); +typedef CURLcode (*_curl_seek_callback2)(const void *, curl_off_t, int); + + +#endif /* __CURL_TYPECHECK_GCC_H */ -- cgit v1.2.1 From ecf1c6ca5daf0bb8bb5a77167dff8f56cc89417f Mon Sep 17 00:00:00 2001 From: Daniel Stenberg Date: Tue, 11 Mar 2008 13:14:16 +0000 Subject: - Added a macro for curl_easy_setopt() that accepts three arguments and simply does nothing with them, just to make sure libcurl users always use three arguments to this function. Due to its use of ... for the third argument, it is otherwise hard to detect abuse. --- include/curl/curl.h | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) (limited to 'include') diff --git a/include/curl/curl.h b/include/curl/curl.h index 3027ca06d..4af714291 100644 --- a/include/curl/curl.h +++ b/include/curl/curl.h @@ -1792,8 +1792,16 @@ CURL_EXTERN CURLcode curl_easy_pause(CURL *handle, int bitmask); #include "multi.h" /* the typechecker doesn't work in C++ (yet) */ -#if (__GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 3)) && !defined(__cplusplus) +#if (__GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 3)) && \ + !defined(__cplusplus) #include "typecheck-gcc.h" +#else +#if defined(__STDC__) && (__STDC__ >= 1) +/* This preprocessor magic that replaces a call with the exact same call is + only done to make sure application authors use exactly three arguments + to this function. */ +#define curl_easy_setopt(handle,opt,param) curl_easy_setopt(handle,opt,param) +#endif /* __STDC__ >= 1 */ #endif /* gcc >= 4.3 && !__cplusplus */ #endif /* __CURL_CURL_H */ -- cgit v1.2.1 From 1380c9af9fdcd915625dad2fbe3f5676c9bc105f Mon Sep 17 00:00:00 2001 From: Michal Marek Date: Mon, 17 Mar 2008 14:22:10 +0000 Subject: Mark the statement expr with __extension__ so that gcc -pedantic doesn't emit any hard-to-grasp warnings in curl_easy_setopt() calls in applications. Also delete superfluous semicolons. --- include/curl/typecheck-gcc.h | 42 +++++++++++++++++++++--------------------- 1 file changed, 21 insertions(+), 21 deletions(-) (limited to 'include') diff --git a/include/curl/typecheck-gcc.h b/include/curl/typecheck-gcc.h index 2051f4e39..c6475b735 100644 --- a/include/curl/typecheck-gcc.h +++ b/include/curl/typecheck-gcc.h @@ -35,7 +35,7 @@ * need to extend the appropriate _curl_*_option macro */ #define curl_easy_setopt(handle, option, value) \ -({ \ +__extension__ ({ \ __typeof__ (option) _curl_opt = option; \ if (__builtin_constant_p(_curl_opt)) { \ if (_curl_is_long_option(_curl_opt) && !_curl_is_long(value)) \ @@ -96,45 +96,45 @@ __attribute__((noinline)) id(void) { __asm__(""); } _CURL_WARNING(_curl_easy_setopt_err_long, - "curl_easy_setopt expects a long argument for this option"); + "curl_easy_setopt expects a long argument for this option") _CURL_WARNING(_curl_easy_setopt_err_curl_off_t, - "curl_easy_setopt expects a curl_off_t argument for this option"); + "curl_easy_setopt expects a curl_off_t argument for this option") _CURL_WARNING(_curl_easy_setopt_err_string, - "curl_easy_setopt expects a string (char* or char[]) argument for this option"); + "curl_easy_setopt expects a string (char* or char[]) argument for this option") _CURL_WARNING(_curl_easy_setopt_err_write_callback, - "curl_easy_setopt expects a curl_write_callback argument for this option"); + "curl_easy_setopt expects a curl_write_callback argument for this option") _CURL_WARNING(_curl_easy_setopt_err_read_cb, - "curl_easy_setopt expects a curl_read_callback argument for this option"); + "curl_easy_setopt expects a curl_read_callback argument for this option") _CURL_WARNING(_curl_easy_setopt_err_ioctl_cb, - "curl_easy_setopt expects a curl_ioctl_callback argument for this option"); + "curl_easy_setopt expects a curl_ioctl_callback argument for this option") _CURL_WARNING(_curl_easy_setopt_err_sockopt_cb, - "curl_easy_setopt expects a curl_sockopt_callback argument for this option"); + "curl_easy_setopt expects a curl_sockopt_callback argument for this option") _CURL_WARNING(_curl_easy_setopt_err_opensocket_cb, - "curl_easy_setopt expects a curl_opensocket_callback argument for this option"); + "curl_easy_setopt expects a curl_opensocket_callback argument for this option") _CURL_WARNING(_curl_easy_setopt_err_progress_cb, - "curl_easy_setopt expects a curl_progress_callback argument for this option"); + "curl_easy_setopt expects a curl_progress_callback argument for this option") _CURL_WARNING(_curl_easy_setopt_err_debug_cb, - "curl_easy_setopt expects a curl_debug_callback argument for this option"); + "curl_easy_setopt expects a curl_debug_callback argument for this option") _CURL_WARNING(_curl_easy_setopt_err_ssl_ctx_cb, - "curl_easy_setopt expects a curl_ssl_ctx_callback argument for this option"); + "curl_easy_setopt expects a curl_ssl_ctx_callback argument for this option") _CURL_WARNING(_curl_easy_setopt_err_conv_cb, - "curl_easy_setopt expects a curl_conv_callback argument for this option"); + "curl_easy_setopt expects a curl_conv_callback argument for this option") _CURL_WARNING(_curl_easy_setopt_err_seek_cb, - "curl_easy_setopt expects a curl_seek_callback argument for this option"); + "curl_easy_setopt expects a curl_seek_callback argument for this option") _CURL_WARNING(_curl_easy_setopt_err_cb_data, - "curl_easy_setopt expects a private data pointer as argument for this option"); + "curl_easy_setopt expects a private data pointer as argument for this option") _CURL_WARNING(_curl_easy_setopt_err_error_buffer, - "curl_easy_setopt expects a char buffer of CURL_ERROR_SIZE as argument for this option"); + "curl_easy_setopt expects a char buffer of CURL_ERROR_SIZE as argument for this option") _CURL_WARNING(_curl_easy_setopt_err_FILE, - "curl_easy_setopt expects a FILE* argument for this option"); + "curl_easy_setopt expects a FILE* argument for this option") _CURL_WARNING(_curl_easy_setopt_err_postfields, - "curl_easy_setopt expects a void* or char* argument for this option"); + "curl_easy_setopt expects a void* or char* argument for this option") _CURL_WARNING(_curl_easy_setopt_err_curl_httpost, - "curl_easy_setopt expects a struct curl_httppost* argument for this option"); + "curl_easy_setopt expects a struct curl_httppost* argument for this option") _CURL_WARNING(_curl_easy_setopt_err_curl_slist, - "curl_easy_setopt expects a struct curl_slist* argument for this option"); + "curl_easy_setopt expects a struct curl_slist* argument for this option") _CURL_WARNING(_curl_easy_setopt_err_CURLSH, - "curl_easy_setopt expects a CURLSH* argument for this option"); + "curl_easy_setopt expects a CURLSH* argument for this option") /* groups of options that take the same type of argument */ -- cgit v1.2.1 From 6f3166c15b7fc951b10ba7cb2607527065264f0e Mon Sep 17 00:00:00 2001 From: Michal Marek Date: Tue, 18 Mar 2008 08:14:37 +0000 Subject: - Added curl_easy_getinfo typechecker. - Added macros for curl_share_setopt and curl_multi_setopt to check at least the correct number of arguments. --- include/curl/curl.h | 7 +++-- include/curl/typecheck-gcc.h | 75 ++++++++++++++++++++++++++++++++++++++------ 2 files changed, 71 insertions(+), 11 deletions(-) (limited to 'include') diff --git a/include/curl/curl.h b/include/curl/curl.h index 4af714291..b4ed5d0f0 100644 --- a/include/curl/curl.h +++ b/include/curl/curl.h @@ -1798,9 +1798,12 @@ CURL_EXTERN CURLcode curl_easy_pause(CURL *handle, int bitmask); #else #if defined(__STDC__) && (__STDC__ >= 1) /* This preprocessor magic that replaces a call with the exact same call is - only done to make sure application authors use exactly three arguments - to this function. */ + only done to make sure application authors pass exactly three arguments + to these functions. */ #define curl_easy_setopt(handle,opt,param) curl_easy_setopt(handle,opt,param) +#define curl_easy_getinfo(handle,info,arg) curl_easy_getinfo(handle,info,arg) +#define curl_share_setopt(share,opt,param) curl_share_setopt(share,opt,param) +#define curl_multi_setopt(handle,opt,param) curl_multi_setopt(handle,opt,param) #endif /* __STDC__ >= 1 */ #endif /* gcc >= 4.3 && !__cplusplus */ diff --git a/include/curl/typecheck-gcc.h b/include/curl/typecheck-gcc.h index c6475b735..969e2bbe4 100644 --- a/include/curl/typecheck-gcc.h +++ b/include/curl/typecheck-gcc.h @@ -76,10 +76,10 @@ __extension__ ({ \ if (_curl_is_postfields_option(_curl_opt) && !_curl_is_postfields(value)) \ _curl_easy_setopt_err_postfields(); \ if ((_curl_opt) == CURLOPT_HTTPPOST && \ - !_curl_is_ptr((value), struct curl_httppost)) \ + !_curl_is_arr((value), struct curl_httppost)) \ _curl_easy_setopt_err_curl_httpost(); \ if (_curl_is_slist_option(_curl_opt) && \ - !_curl_is_ptr((value), struct curl_slist)) \ + !_curl_is_arr((value), struct curl_slist)) \ _curl_easy_setopt_err_curl_slist(); \ if ((_curl_opt) == CURLOPT_SHARE && !_curl_is_ptr((value), CURLSH)) \ _curl_easy_setopt_err_CURLSH(); \ @@ -87,10 +87,37 @@ __extension__ ({ \ curl_easy_setopt(handle, _curl_opt, value); \ }) +/* wraps curl_easy_getinfo() with typechecking */ +/* FIXME: don't allow const pointers */ +#define curl_easy_getinfo(handle, info, arg) \ +__extension__ ({ \ + __typeof__ (info) _curl_info = info; \ + if (__builtin_constant_p(_curl_info)) { \ + if (_curl_is_string_info(_curl_info) && !_curl_is_arr((arg), char *)) \ + _curl_easy_getinfo_err_string(); \ + if (_curl_is_long_info(_curl_info) && !_curl_is_arr((arg), long)) \ + _curl_easy_getinfo_err_long(); \ + if (_curl_is_double_info(_curl_info) && !_curl_is_arr((arg), double)) \ + _curl_easy_getinfo_err_double(); \ + if (_curl_is_slist_info(_curl_info) && \ + !_curl_is_arr((arg), struct curl_slist *)) \ + _curl_easy_getinfo_err_curl_slist(); \ + } \ + curl_easy_getinfo(handle, _curl_info, arg); \ +}) + +/* TODO: typechecking for curl_share_setopt() and curl_multi_setopt(), + * for now just make sure that the functions are called with three + * arguments + */ +#define curl_share_setopt(share,opt,param) curl_share_setopt(share,opt,param) +#define curl_multi_setopt(handle,opt,param) curl_multi_setopt(handle,opt,param) + + /* the actual warnings, triggered by calling the _curl_easy_setopt_err* * functions */ -/* To define a new warning, use _CURL_WARNING(identifier, "message"); */ +/* To define a new warning, use _CURL_WARNING(identifier, "message") */ #define _CURL_WARNING(id, message) \ static void __attribute__((warning(message))) __attribute__((unused)) \ __attribute__((noinline)) id(void) { __asm__(""); } @@ -136,7 +163,16 @@ _CURL_WARNING(_curl_easy_setopt_err_curl_slist, _CURL_WARNING(_curl_easy_setopt_err_CURLSH, "curl_easy_setopt expects a CURLSH* argument for this option") -/* groups of options that take the same type of argument */ +_CURL_WARNING(_curl_easy_getinfo_err_string, + "curl_easy_getinfo expects a pointer to char * for this info") +_CURL_WARNING(_curl_easy_getinfo_err_long, + "curl_easy_getinfo expects a pointer to long for this info") +_CURL_WARNING(_curl_easy_getinfo_err_double, + "curl_easy_getinfo expects a pointer to double for this info") +_CURL_WARNING(_curl_easy_getinfo_err_curl_slist, + "curl_easy_getinfo expects a pointer to struct curl_slist * for this info") + +/* groups of curl_easy_setops options that take the same type of argument */ /* To add a new option to one of the groups, just add * (option) == CURLOPT_SOMETHING @@ -230,13 +266,34 @@ _CURL_WARNING(_curl_easy_setopt_err_CURLSH, (option) == CURLOPT_TELNETOPTIONS || \ 0) +/* groups of curl_easy_getinfo infos that take the same type of argument */ + +/* evaluates to true if info expects a pointer to char * argument */ +#define _curl_is_string_info(info) \ + (CURLINFO_STRING < (info) && (info) < CURLINFO_LONG) + +/* evaluates to true if info expects a pointer to long argument */ +#define _curl_is_long_info(info) \ + (CURLINFO_LONG < (info) && (info) < CURLINFO_DOUBLE) + +/* evaluates to true if info expects a pointer to double argument */ +#define _curl_is_double_info(info) \ + (CURLINFO_DOUBLE < (info) && (info) < CURLINFO_SLIST) + +/* evaluates to true if info expects a pointer to struct curl_slist * argument */ +#define _curl_is_slist_info(info) \ + (CURLINFO_SLIST < (info)) + + /* typecheck helpers -- check whether given expression has requested type*/ -/* For pointers, you can use the _curl_is_ptr macro, otherwise define a new - * macro. Search for __builtin_types_compatible_p in the GCC manual. NOTE: - * these macros MUST NOT EVALUATE their arguments! The argument is the actual - * expression passed to the curl_easy_setopt macro. This means that you can - * only apply the sizeof and __typeof__ operators, no == or whatsoever. +/* For pointers, you can use the _curl_is_ptr/_curl_is_arr macros, + * otherwise define a new macro. Search for __builtin_types_compatible_p + * in the GCC manual. + * NOTE: these macros MUST NOT EVALUATE their arguments! The argument is + * the actual expression passed to the curl_easy_setopt macro. This + * means that you can only apply the sizeof and __typeof__ operators, no + * == or whatsoever. */ /* XXX: should evaluate to true iff expr is a pointer */ -- cgit v1.2.1 From 0ff0512aff7e4a2cf0138ee5f6656d183bdbe96b Mon Sep 17 00:00:00 2001 From: Daniel Stenberg Date: Sun, 30 Mar 2008 09:22:22 +0000 Subject: start working on 7.18.2 --- include/curl/curlver.h | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'include') diff --git a/include/curl/curlver.h b/include/curl/curlver.h index 64ccc07e7..3eb625134 100644 --- a/include/curl/curlver.h +++ b/include/curl/curlver.h @@ -31,13 +31,13 @@ /* This is the version number of the libcurl package from which this header file origins: */ -#define LIBCURL_VERSION "7.18.1-CVS" +#define LIBCURL_VERSION "7.18.2-CVS" /* The numeric version number is also available "in parts" by using these defines: */ #define LIBCURL_VERSION_MAJOR 7 #define LIBCURL_VERSION_MINOR 18 -#define LIBCURL_VERSION_PATCH 1 +#define LIBCURL_VERSION_PATCH 2 /* This is the numeric version of the libcurl version number, meant for easier parsing and comparions by programs. The LIBCURL_VERSION_NUM define will @@ -54,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 0x071201 +#define LIBCURL_VERSION_NUM 0x071202 /* * This is the date and time when the full source package was created. The -- cgit v1.2.1 From a2314225e02ea2f3bd49dc8557f2452846e49b19 Mon Sep 17 00:00:00 2001 From: Daniel Stenberg Date: Mon, 31 Mar 2008 10:02:23 +0000 Subject: - Added CURLFORM_STREAM as a supported option to curl_formadd() to allow an application to provide data for a multipart with the read callback. Note that the size needs to be provided with CURLFORM_CONTENTSLENGTH when the stream option is used. This feature is verified by the new test case 554. This feature was sponsored by Xponaut. --- include/curl/curl.h | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) (limited to 'include') diff --git a/include/curl/curl.h b/include/curl/curl.h index b4ed5d0f0..bd188cdd1 100644 --- a/include/curl/curl.h +++ b/include/curl/curl.h @@ -211,10 +211,16 @@ struct curl_httppost { do not free in formfree */ #define HTTPPOST_BUFFER (1<<4) /* upload file from buffer */ #define HTTPPOST_PTRBUFFER (1<<5) /* upload file from pointer contents */ +#define HTTPPOST_CALLBACK (1<<6) /* upload fiel contents by using the + regular read callback to get the data + and pass the given pointer as custom + pointer */ char *showfilename; /* The file name to show. If not set, the actual file name will be used (if this is a file part) */ + void *userp; /* custom pointer used for + HTTPPOST_CALLBACK posts */ }; typedef int (*curl_progress_callback)(void *clientp, @@ -246,7 +252,7 @@ typedef size_t (*curl_write_callback)(char *buffer, #define CURL_READFUNC_PAUSE 0x10000001 typedef int (*curl_seek_callback)(void *instream, curl_off_t offset, - int origin); /* 'whence' */ + int origin); /* 'whence' */ typedef size_t (*curl_read_callback)(char *buffer, size_t size, @@ -1313,6 +1319,8 @@ typedef enum { CFINIT(END), CFINIT(OBSOLETE2), + CFINIT(STREAM), + CURLFORM_LASTENTRY /* the last unusued */ } CURLformoption; @@ -1796,7 +1804,7 @@ CURL_EXTERN CURLcode curl_easy_pause(CURL *handle, int bitmask); !defined(__cplusplus) #include "typecheck-gcc.h" #else -#if defined(__STDC__) && (__STDC__ >= 1) +#if defined(__STDC__) && (__STDC__ >= 1) /* This preprocessor magic that replaces a call with the exact same call is only done to make sure application authors pass exactly three arguments to these functions. */ -- cgit v1.2.1 From af41ada7aa5ee4db20107c8bd4a06fec3e422fb8 Mon Sep 17 00:00:00 2001 From: Michal Marek Date: Mon, 14 Apr 2008 19:01:41 +0000 Subject: allow disabling the typechecker by defining CURL_DISABLE_TYPECHECK, as discussed in http://curl.haxx.se/mail/lib-2008-04/0291.html --- include/curl/curl.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'include') diff --git a/include/curl/curl.h b/include/curl/curl.h index bd188cdd1..ab6c863c4 100644 --- a/include/curl/curl.h +++ b/include/curl/curl.h @@ -1801,7 +1801,7 @@ CURL_EXTERN CURLcode curl_easy_pause(CURL *handle, int bitmask); /* the typechecker doesn't work in C++ (yet) */ #if (__GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 3)) && \ - !defined(__cplusplus) + !defined(__cplusplus) && !defined(CURL_DISABLE_TYPECHECK) #include "typecheck-gcc.h" #else #if defined(__STDC__) && (__STDC__ >= 1) -- cgit v1.2.1 From 09777a4fc2ed0f2b09447eb89fb8cd4b99278944 Mon Sep 17 00:00:00 2001 From: Dan Fandrich Date: Thu, 17 Apr 2008 00:45:33 +0000 Subject: Some trivial changes --- include/curl/curl.h | 34 +++++++++++++++++----------------- 1 file changed, 17 insertions(+), 17 deletions(-) (limited to 'include') diff --git a/include/curl/curl.h b/include/curl/curl.h index ab6c863c4..aa1dfb7e2 100644 --- a/include/curl/curl.h +++ b/include/curl/curl.h @@ -99,7 +99,7 @@ typedef void CURL; #ifdef CURL_HIDDEN_SYMBOLS /* - * This definition is used to make external definitions visibile in the + * This definition is used to make external definitions visible in the * shared library when symbols are hidden by default. It makes no * difference when compiling applications whether this is set or not, * only when compiling the library. @@ -115,7 +115,7 @@ typedef void CURL; * platforms. We also provide a CURL_FORMAT_OFF_T define to use in *printf * format strings when outputting a variable of type curl_off_t. * - * Note: "pocc -Ze" is MSVC compatibily mode and this sets _MSC_VER! + * Note: "pocc -Ze" is MSVC compatibility mode and this sets _MSC_VER! */ #if (defined(_MSC_VER) && !defined(__POCC__)) || (defined(__LCC__) && defined(WIN32)) @@ -211,7 +211,7 @@ struct curl_httppost { do not free in formfree */ #define HTTPPOST_BUFFER (1<<4) /* upload file from buffer */ #define HTTPPOST_PTRBUFFER (1<<5) /* upload file from pointer contents */ -#define HTTPPOST_CALLBACK (1<<6) /* upload fiel contents by using the +#define HTTPPOST_CALLBACK (1<<6) /* upload file contents by using the regular read callback to get the data and pass the given pointer as custom pointer */ @@ -237,7 +237,7 @@ typedef int (*curl_progress_callback)(void *clientp, #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. */ + will signal libcurl to pause receiving on the current transfer. */ #define CURL_WRITEFUNC_PAUSE 0x10000001 typedef size_t (*curl_write_callback)(char *buffer, size_t size, @@ -678,7 +678,7 @@ typedef enum { /* If the CURLOPT_INFILE is used, this can be used to inform libcurl about * how large the file being sent really is. That allows better error - * checking and better verifies that the upload was succcessful. -1 means + * checking and better verifies that the upload was successful. -1 means * unknown size. * * For large file support, there is also a _LARGE version of the key @@ -690,7 +690,7 @@ typedef enum { /* POST static input fields. */ CINIT(POSTFIELDS, OBJECTPOINT, 15), - /* Set the referer page (needed by some CGIs) */ + /* Set the referrer page (needed by some CGIs) */ CINIT(REFERER, OBJECTPOINT, 16), /* Set the FTP PORT string (interface name, named or numerical IP address) @@ -749,7 +749,7 @@ typedef enum { "cookie awareness" */ CINIT(COOKIEFILE, OBJECTPOINT, 31), - /* What version to specifly try to use. + /* What version to specifically try to use. See CURL_SSLVERSION defines below. */ CINIT(SSLVERSION, LONG, 32), @@ -810,7 +810,7 @@ typedef enum { /* Data passed to the progress callback */ CINIT(PROGRESSDATA, OBJECTPOINT, 57), - /* We want the referer field set automatically when following locations */ + /* We want the referrer field set automatically when following locations */ CINIT(AUTOREFERER, LONG, 58), /* Port of the proxy, can be set in the proxy string as well with: @@ -907,7 +907,7 @@ typedef enum { CURL_HTTP_VERSION* enums set below. */ CINIT(HTTP_VERSION, LONG, 84), - /* Specificly switch on or off the FTP engine's use of the EPSV command. By + /* Specifically switch on or off the FTP engine's use of the EPSV command. By default, that one will always be attempted before the more traditional PASV command. */ CINIT(FTP_USE_EPSV, LONG, 85), @@ -977,11 +977,11 @@ typedef enum { CINIT(HTTP200ALIASES, OBJECTPOINT, 104), /* Continue to send authentication (user+password) when following locations, - even when hostname changed. This can potentionally send off the name + even when hostname changed. This can potentially send off the name and password to whatever host the server decides. */ CINIT(UNRESTRICTED_AUTH, LONG, 105), - /* Specificly switch on or off the FTP engine's use of the EPRT command ( it + /* Specifically switch on or off the FTP engine's use of the EPRT command ( it also disables the LPRT attempt). By default, those ones will always be attempted before the good old traditional PORT command. */ CINIT(FTP_USE_EPRT, LONG, 106), @@ -1162,7 +1162,7 @@ typedef enum { CINIT(CONNECTTIMEOUT_MS, LONG, 156), /* set to zero to disable the libcurl's decoding and thus pass the raw body - data to the appliction even when it is encoded/compressed */ + data to the application even when it is encoded/compressed */ CINIT(HTTP_TRANSFER_DECODING, LONG, 157), CINIT(HTTP_CONTENT_DECODING, LONG, 158), @@ -1321,7 +1321,7 @@ typedef enum { CFINIT(STREAM), - CURLFORM_LASTENTRY /* the last unusued */ + CURLFORM_LASTENTRY /* the last unused */ } CURLformoption; #undef CFINIT /* done */ @@ -1367,7 +1367,7 @@ typedef enum { * * DESCRIPTION * - * Pretty advanved function for building multi-part formposts. Each invoke + * Pretty advanced function for building multi-part formposts. Each invoke * adds one part that together construct a full post. Then use * CURLOPT_HTTPPOST to send it off to libcurl. */ @@ -1622,7 +1622,7 @@ typedef enum { /* Different data locks for a single share */ typedef enum { CURL_LOCK_DATA_NONE = 0, - /* CURL_LOCK_DATA_SHARE is used internaly to say that + /* CURL_LOCK_DATA_SHARE is used internally to say that * the locking is just made to change the internal state of the share * itself. */ @@ -1664,7 +1664,7 @@ typedef enum { typedef enum { CURLSHOPT_NONE, /* don't use */ CURLSHOPT_SHARE, /* specify a data type to share */ - CURLSHOPT_UNSHARE, /* specify shich data type to stop sharing */ + CURLSHOPT_UNSHARE, /* specify which data type to stop sharing */ CURLSHOPT_LOCKFUNC, /* pass in a 'curl_lock_function' pointer */ CURLSHOPT_UNLOCKFUNC, /* pass in a 'curl_unlock_function' pointer */ CURLSHOPT_USERDATA, /* pass in a user data pointer used in the lock/unlock @@ -1689,7 +1689,7 @@ typedef enum { } CURLversion; /* The 'CURLVERSION_NOW' is the symbolic name meant to be used by - basicly all programs ever, that want to get version information. It is + basically all programs ever that want to get version information. It is meant to be a built-in version number for what kind of struct the caller expects. If the struct ever changes, we redefine the NOW to another enum from above. */ -- cgit v1.2.1 From 1960eebc2d021ecf5ffc3f6d4e935d54aa592c72 Mon Sep 17 00:00:00 2001 From: Dan Fandrich Date: Tue, 22 Apr 2008 22:53:53 +0000 Subject: Added support for running on Symbian OS. --- include/curl/curl.h | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'include') diff --git a/include/curl/curl.h b/include/curl/curl.h index aa1dfb7e2..8b7268188 100644 --- a/include/curl/curl.h +++ b/include/curl/curl.h @@ -33,7 +33,7 @@ * Define WIN32 when build target is Win32 API */ -#if (defined(_WIN32) || defined(__WIN32__)) && !defined(WIN32) +#if (defined(_WIN32) || defined(__WIN32__)) && !defined(WIN32) && !defined(__SYMBIAN32__) #define WIN32 #endif @@ -62,7 +62,7 @@ /* 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) +#if defined(_AIX) || defined(__NOVELL_LIBC__) || defined(__NetBSD__) || defined(__minix) || defined(__SYMBIAN32__) #include #endif @@ -86,10 +86,10 @@ extern "C" { typedef void CURL; /* - * Decorate exportable functions for Win32 DLL linking. + * Decorate exportable functions for Win32 and Symbian OS DLL linking. * This avoids using a .def file for building libcurl.dll. */ -#if (defined(WIN32) || defined(_WIN32)) && !defined(CURL_STATICLIB) +#if (defined(WIN32) || defined(_WIN32) || defined(__SYMBIAN32__)) && !defined(CURL_STATICLIB) #if defined(BUILDING_LIBCURL) #define CURL_EXTERN __declspec(dllexport) #else -- cgit v1.2.1 From 852989856d3802a9e7bd2f1e368302d92ddf66e2 Mon Sep 17 00:00:00 2001 From: Daniel Stenberg Date: Wed, 30 Apr 2008 21:20:08 +0000 Subject: - To make it easier for applications that want lots of magic stuff done on redirections and thus cannot use CURLOPT_FOLLOWLOCATION easily, we now introduce the new CURLINFO_REDIRECT_URL option that lets applications extract the URL libcurl would've redirected to if it had been told to. This then enables the application to continue to that URL as it thinks is suitable, without having to re-implement the magic of creating the new URL from the Location: header etc. Test 1029 verifies it. --- include/curl/curl.h | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'include') diff --git a/include/curl/curl.h b/include/curl/curl.h index 8b7268188..6fcc34faf 100644 --- a/include/curl/curl.h +++ b/include/curl/curl.h @@ -1587,9 +1587,10 @@ typedef enum { CURLINFO_COOKIELIST = CURLINFO_SLIST + 28, CURLINFO_LASTSOCKET = CURLINFO_LONG + 29, CURLINFO_FTP_ENTRY_PATH = CURLINFO_STRING + 30, + CURLINFO_REDIRECT_URL = CURLINFO_STRING + 31, /* Fill in new entries below here! */ - CURLINFO_LASTONE = 30 + CURLINFO_LASTONE = 31 } CURLINFO; /* CURLINFO_RESPONSE_CODE is the new name for the option previously known as -- cgit v1.2.1 From 514592b89207e83d13b5a4e79bc247aa6f74c4b7 Mon Sep 17 00:00:00 2001 From: Daniel Stenberg Date: Mon, 12 May 2008 21:43:24 +0000 Subject: - Introducing curl_easy_send() and curl_easy_recv(). They can be used to send and receive data over a connection previously setup with curl_easy_perform() and its CURLOPT_CONNECT_ONLY option. The sendrecv.c example was added to show how they can be used. --- include/curl/curl.h | 2 ++ include/curl/easy.h | 24 +++++++++++++++++++++++- 2 files changed, 25 insertions(+), 1 deletion(-) (limited to 'include') diff --git a/include/curl/curl.h b/include/curl/curl.h index 6fcc34faf..042367466 100644 --- a/include/curl/curl.h +++ b/include/curl/curl.h @@ -447,6 +447,8 @@ typedef enum { CURLE_SSL_SHUTDOWN_FAILED, /* 80 - Failed to shut down the SSL connection */ + CURLE_AGAIN, /* 81 - socket is not ready for send/recv, + wait till it's ready and try again */ CURL_LAST /* never use! */ } CURLcode; diff --git a/include/curl/easy.h b/include/curl/easy.h index 17de21070..88aa0e655 100644 --- a/include/curl/easy.h +++ b/include/curl/easy.h @@ -7,7 +7,7 @@ * | (__| |_| | _ <| |___ * \___|\___/|_| \_\_____| * - * Copyright (C) 1998 - 2004, 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 @@ -74,6 +74,28 @@ CURL_EXTERN CURL* curl_easy_duphandle(CURL *curl); */ CURL_EXTERN void curl_easy_reset(CURL *curl); +/* + * NAME curl_easy_recv() + * + * DESCRIPTION + * + * Receives data from the connected socket. Use after successful + * curl_easy_perform() with CURLOPT_CONNECT_ONLY option. + */ +CURL_EXTERN CURLcode curl_easy_recv(CURL *curl, void *buffer, size_t buflen, + size_t *n); + +/* + * NAME curl_easy_send() + * + * DESCRIPTION + * + * Sends data over the connected socket. Use after successful + * curl_easy_perform() with CURLOPT_CONNECT_ONLY option. + */ +CURL_EXTERN CURLcode curl_easy_send(CURL *curl, const void *buffer, + size_t buflen, size_t *n); + #ifdef __cplusplus } #endif -- cgit v1.2.1 From 24bf52bc691cca9f8b3a668e26b4dd695ec4991c Mon Sep 17 00:00:00 2001 From: Patrick Monnerat Date: Tue, 20 May 2008 10:21:50 +0000 Subject: Adapting last changes to OS400: _ Updated packages/OS400/curl.inc.in with new definitions. _ New connect/bind/sendto/recvfrom wrappers to support AF_UNIX sockets. _ Include files line length shortened below 100 chars. _ Const parameter in lib/qssl.[ch]. _ Typos in packages/OS400/initscript.sh. --- include/curl/curl.h | 18 ++++++++++++------ include/curl/mprintf.h | 6 ++++-- include/curl/multi.h | 2 +- include/curl/typecheck-gcc.h | 17 +++++++++++------ 4 files changed, 28 insertions(+), 15 deletions(-) (limited to 'include') diff --git a/include/curl/curl.h b/include/curl/curl.h index 042367466..1e7f3b3fb 100644 --- a/include/curl/curl.h +++ b/include/curl/curl.h @@ -33,7 +33,8 @@ * Define WIN32 when build target is Win32 API */ -#if (defined(_WIN32) || defined(__WIN32__)) && !defined(WIN32) && !defined(__SYMBIAN32__) +#if (defined(_WIN32) || defined(__WIN32__)) && \ + !defined(WIN32) && !defined(__SYMBIAN32__) #define WIN32 #endif @@ -62,7 +63,8 @@ /* 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) || defined(__SYMBIAN32__) +#if defined(_AIX) || defined(__NOVELL_LIBC__) || defined(__NetBSD__) || \ + defined(__minix) || defined(__SYMBIAN32__) #include #endif @@ -89,7 +91,8 @@ typedef void CURL; * Decorate exportable functions for Win32 and Symbian OS DLL linking. * This avoids using a .def file for building libcurl.dll. */ -#if (defined(WIN32) || defined(_WIN32) || defined(__SYMBIAN32__)) && !defined(CURL_STATICLIB) +#if (defined(WIN32) || defined(_WIN32) || defined(__SYMBIAN32__)) && \ + !defined(CURL_STATICLIB) #if defined(BUILDING_LIBCURL) #define CURL_EXTERN __declspec(dllexport) #else @@ -118,7 +121,8 @@ typedef void CURL; * Note: "pocc -Ze" is MSVC compatibility mode and this sets _MSC_VER! */ -#if (defined(_MSC_VER) && !defined(__POCC__)) || (defined(__LCC__) && defined(WIN32)) +#if (defined(_MSC_VER) && !defined(__POCC__)) || (defined(__LCC__) && \ + defined(WIN32)) /* MSVC */ #ifdef _WIN32_WCE typedef long curl_off_t; @@ -1379,9 +1383,11 @@ CURL_EXTERN CURLFORMcode curl_formadd(struct curl_httppost **httppost, /* * callback function for curl_formget() - * The void *arg pointer will be the one passed as second argument to curl_formget(). + * The void *arg pointer will be the one passed as second argument to + * curl_formget(). * The character buffer passed to it must not be freed. - * Should return the buffer length passed to it as the argument "len" on success. + * Should return the buffer length passed to it as the argument "len" on + * success. */ typedef size_t (*curl_formget_callback)(void *arg, const char *buf, size_t len); diff --git a/include/curl/mprintf.h b/include/curl/mprintf.h index 5c526882f..d6d7f4455 100644 --- a/include/curl/mprintf.h +++ b/include/curl/mprintf.h @@ -35,11 +35,13 @@ extern "C" { CURL_EXTERN int curl_mprintf(const char *format, ...); CURL_EXTERN int curl_mfprintf(FILE *fd, const char *format, ...); CURL_EXTERN int curl_msprintf(char *buffer, const char *format, ...); -CURL_EXTERN int curl_msnprintf(char *buffer, size_t maxlength, const char *format, ...); +CURL_EXTERN int curl_msnprintf(char *buffer, size_t maxlength, + const char *format, ...); CURL_EXTERN int curl_mvprintf(const char *format, va_list args); CURL_EXTERN int curl_mvfprintf(FILE *fd, const char *format, va_list args); CURL_EXTERN int curl_mvsprintf(char *buffer, const char *format, va_list args); -CURL_EXTERN int curl_mvsnprintf(char *buffer, size_t maxlength, const char *format, va_list args); +CURL_EXTERN int curl_mvsnprintf(char *buffer, size_t maxlength, + const char *format, va_list args); CURL_EXTERN char *curl_maprintf(const char *format, ...); CURL_EXTERN char *curl_mvaprintf(const char *format, va_list args); diff --git a/include/curl/multi.h b/include/curl/multi.h index 094c64849..92621aa99 100644 --- a/include/curl/multi.h +++ b/include/curl/multi.h @@ -283,7 +283,7 @@ CURL_EXTERN CURLMcode curl_multi_timeout(CURLM *multi_handle, #undef CINIT /* re-using the same name as in curl.h */ #ifdef CURL_ISOCPP -#define CINIT(name,type,number) CURLMOPT_ ## name = CURLOPTTYPE_ ## type + number +#define CINIT(name,type,num) CURLMOPT_ ## name = CURLOPTTYPE_ ## type + num #else /* The macro "##" is ISO C, we assume pre-ISO C doesn't support it. */ #define LONG CURLOPTTYPE_LONG diff --git a/include/curl/typecheck-gcc.h b/include/curl/typecheck-gcc.h index 969e2bbe4..4c7569698 100644 --- a/include/curl/typecheck-gcc.h +++ b/include/curl/typecheck-gcc.h @@ -127,7 +127,8 @@ _CURL_WARNING(_curl_easy_setopt_err_long, _CURL_WARNING(_curl_easy_setopt_err_curl_off_t, "curl_easy_setopt expects a curl_off_t argument for this option") _CURL_WARNING(_curl_easy_setopt_err_string, - "curl_easy_setopt expects a string (char* or char[]) argument for this option") + "curl_easy_setopt expects a string (char* or char[]) argument for this option" + ) _CURL_WARNING(_curl_easy_setopt_err_write_callback, "curl_easy_setopt expects a curl_write_callback argument for this option") _CURL_WARNING(_curl_easy_setopt_err_read_cb, @@ -137,7 +138,8 @@ _CURL_WARNING(_curl_easy_setopt_err_ioctl_cb, _CURL_WARNING(_curl_easy_setopt_err_sockopt_cb, "curl_easy_setopt expects a curl_sockopt_callback argument for this option") _CURL_WARNING(_curl_easy_setopt_err_opensocket_cb, - "curl_easy_setopt expects a curl_opensocket_callback argument for this option") + "curl_easy_setopt expects a curl_opensocket_callback argument for this option" + ) _CURL_WARNING(_curl_easy_setopt_err_progress_cb, "curl_easy_setopt expects a curl_progress_callback argument for this option") _CURL_WARNING(_curl_easy_setopt_err_debug_cb, @@ -280,7 +282,7 @@ _CURL_WARNING(_curl_easy_getinfo_err_curl_slist, #define _curl_is_double_info(info) \ (CURLINFO_DOUBLE < (info) && (info) < CURLINFO_SLIST) -/* evaluates to true if info expects a pointer to struct curl_slist * argument */ +/* true if info expects a pointer to struct curl_slist * argument */ #define _curl_is_slist_info(info) \ (CURLINFO_SLIST < (info)) @@ -408,10 +410,12 @@ typedef size_t (_curl_read_callback6)(void *, size_t, size_t, FILE*); _curl_callback_compatible((expr), _curl_write_callback5) || \ _curl_callback_compatible((expr), _curl_write_callback6)) typedef size_t (_curl_write_callback1)(const char *, size_t, size_t, void*); -typedef size_t (_curl_write_callback2)(const char *, size_t, size_t, const void*); +typedef size_t (_curl_write_callback2)(const char *, size_t, size_t, + const void*); typedef size_t (_curl_write_callback3)(const char *, size_t, size_t, FILE*); typedef size_t (_curl_write_callback4)(const void *, size_t, size_t, void*); -typedef size_t (_curl_write_callback5)(const void *, size_t, size_t, const void*); +typedef size_t (_curl_write_callback5)(const void *, size_t, size_t, + const void*); typedef size_t (_curl_write_callback6)(const void *, size_t, size_t, FILE*); /* evaluates to true if expr is of type curl_ioctl_callback or "similar" */ @@ -434,7 +438,8 @@ typedef curlioerr (_curl_ioctl_callback4)(CURL *, curliocmd, const void*); _curl_callback_compatible((expr), _curl_sockopt_callback1) || \ _curl_callback_compatible((expr), _curl_sockopt_callback2)) typedef int (_curl_sockopt_callback1)(void *, curl_socket_t, curlsocktype); -typedef int (_curl_sockopt_callback2)(const void *, curl_socket_t, curlsocktype); +typedef int (_curl_sockopt_callback2)(const void *, curl_socket_t, + curlsocktype); /* evaluates to true if expr is of type curl_opensocket_callback or "similar" */ #define _curl_is_opensocket_cb(expr) \ -- cgit v1.2.1 From ea86edbd821fc448a4188598d18aa8ce12bb435a Mon Sep 17 00:00:00 2001 From: Dan Fandrich Date: Tue, 3 Jun 2008 18:00:48 +0000 Subject: Fixed typo in comment --- include/curl/curl.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'include') diff --git a/include/curl/curl.h b/include/curl/curl.h index 1e7f3b3fb..d87942376 100644 --- a/include/curl/curl.h +++ b/include/curl/curl.h @@ -379,7 +379,7 @@ typedef enum { CURLE_WRITE_ERROR, /* 23 */ CURLE_OBSOLETE24, /* 24 - NOT USED */ CURLE_UPLOAD_FAILED, /* 25 - failed upload "command" */ - CURLE_READ_ERROR, /* 26 - could open/read from file */ + CURLE_READ_ERROR, /* 26 - couldn't open/read from file */ CURLE_OUT_OF_MEMORY, /* 27 */ /* Note: CURLE_OUT_OF_MEMORY may sometimes indicate a conversion error instead of a memory allocation error if CURL_DOES_CONVERSIONS -- cgit v1.2.1 From 230e4547e84af72ecc4781863a170a33513a0060 Mon Sep 17 00:00:00 2001 From: Daniel Stenberg Date: Wed, 4 Jun 2008 16:05:48 +0000 Subject: start working on 7.18.3! --- include/curl/curlver.h | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'include') diff --git a/include/curl/curlver.h b/include/curl/curlver.h index 3eb625134..54652bfb0 100644 --- a/include/curl/curlver.h +++ b/include/curl/curlver.h @@ -31,13 +31,13 @@ /* This is the version number of the libcurl package from which this header file origins: */ -#define LIBCURL_VERSION "7.18.2-CVS" +#define LIBCURL_VERSION "7.18.3-CVS" /* The numeric version number is also available "in parts" by using these defines: */ #define LIBCURL_VERSION_MAJOR 7 #define LIBCURL_VERSION_MINOR 18 -#define LIBCURL_VERSION_PATCH 2 +#define LIBCURL_VERSION_PATCH 3 /* This is the numeric version of the libcurl version number, meant for easier parsing and comparions by programs. The LIBCURL_VERSION_NUM define will @@ -54,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 0x071202 +#define LIBCURL_VERSION_NUM 0x071203 /* * This is the date and time when the full source package was created. The -- cgit v1.2.1 From 930a45e7a93c964ec224bdddb59f97479b7e4a5d Mon Sep 17 00:00:00 2001 From: Daniel Stenberg Date: Fri, 6 Jun 2008 17:33:35 +0000 Subject: - Added CURLINFO_PRIMARY_IP as a new information retrievable with curl_easy_getinfo. It returns a pointer to a string with the most recently used IP address. Modified test case 500 to also verify this feature. The implementing of this feature was sponsored by Lenny Rachitsky at NeuStar. --- include/curl/curl.h | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'include') diff --git a/include/curl/curl.h b/include/curl/curl.h index d87942376..b42f0b31b 100644 --- a/include/curl/curl.h +++ b/include/curl/curl.h @@ -1596,9 +1596,10 @@ typedef enum { CURLINFO_LASTSOCKET = CURLINFO_LONG + 29, CURLINFO_FTP_ENTRY_PATH = CURLINFO_STRING + 30, CURLINFO_REDIRECT_URL = CURLINFO_STRING + 31, + CURLINFO_PRIMARY_IP = CURLINFO_STRING + 32, /* Fill in new entries below here! */ - CURLINFO_LASTONE = 31 + CURLINFO_LASTONE = 32 } CURLINFO; /* CURLINFO_RESPONSE_CODE is the new name for the option previously known as -- cgit v1.2.1 From 3fe8251dfbb533803e25cc38365114b28c5a1c85 Mon Sep 17 00:00:00 2001 From: Daniel Stenberg Date: Fri, 6 Jun 2008 18:40:21 +0000 Subject: - Axel Tillequin and Arnaud Ebalard added support for CURLOPT_CRLFILE, for OpenSSL, NSS and GnuTLS-built libcurls. --- include/curl/curl.h | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) (limited to 'include') diff --git a/include/curl/curl.h b/include/curl/curl.h index b42f0b31b..a67fd2210 100644 --- a/include/curl/curl.h +++ b/include/curl/curl.h @@ -452,7 +452,10 @@ typedef enum { CURLE_SSL_SHUTDOWN_FAILED, /* 80 - Failed to shut down the SSL connection */ CURLE_AGAIN, /* 81 - socket is not ready for send/recv, - wait till it's ready and try again */ + wait till it's ready and try again (Added + in 7.18.2) */ + CURLE_SSL_CRL_BADFILE, /* 82 - could not load CRL file, missing or + wrong format (Added in 7.18.3) */ CURL_LAST /* never use! */ } CURLcode; @@ -1200,6 +1203,9 @@ typedef enum { CINIT(SEEKFUNCTION, FUNCTIONPOINT, 167), CINIT(SEEKDATA, OBJECTPOINT, 168), + /* CRL file */ + CINIT(CRLFILE, OBJECTPOINT, 169), + CURLOPT_LASTENTRY /* the last unused */ } CURLoption; -- cgit v1.2.1 From 621c2b901527248b4822895bc0305373a7d2dd63 Mon Sep 17 00:00:00 2001 From: Daniel Stenberg Date: Fri, 6 Jun 2008 20:52:32 +0000 Subject: - Axel Tillequin and Arnaud Ebalard added support for CURLOPT_ISSUERCERT, for OpenSSL, NSS and GnuTLS-built libcurls. --- include/curl/curl.h | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'include') diff --git a/include/curl/curl.h b/include/curl/curl.h index a67fd2210..556c2226a 100644 --- a/include/curl/curl.h +++ b/include/curl/curl.h @@ -456,6 +456,8 @@ typedef enum { in 7.18.2) */ CURLE_SSL_CRL_BADFILE, /* 82 - could not load CRL file, missing or wrong format (Added in 7.18.3) */ + CURLE_SSL_ISSUER_ERROR, /* 83 - Issuer check failed. (Added in + 7.18.3) */ CURL_LAST /* never use! */ } CURLcode; @@ -1206,6 +1208,9 @@ typedef enum { /* CRL file */ CINIT(CRLFILE, OBJECTPOINT, 169), + /* Issuer certificate */ + CINIT(ISSUERCERT, OBJECTPOINT, 170), + CURLOPT_LASTENTRY /* the last unused */ } CURLoption; -- cgit v1.2.1 From c6efb8252632e8a344c0839e80f4aa830e8a0db2 Mon Sep 17 00:00:00 2001 From: Daniel Stenberg Date: Sun, 8 Jun 2008 21:04:46 +0000 Subject: the next release is now called 7.19.0 --- include/curl/curl.h | 4 ++-- include/curl/curlver.h | 8 ++++---- 2 files changed, 6 insertions(+), 6 deletions(-) (limited to 'include') diff --git a/include/curl/curl.h b/include/curl/curl.h index 556c2226a..7b9bff3e1 100644 --- a/include/curl/curl.h +++ b/include/curl/curl.h @@ -455,9 +455,9 @@ typedef enum { wait till it's ready and try again (Added in 7.18.2) */ CURLE_SSL_CRL_BADFILE, /* 82 - could not load CRL file, missing or - wrong format (Added in 7.18.3) */ + wrong format (Added in 7.19.0) */ CURLE_SSL_ISSUER_ERROR, /* 83 - Issuer check failed. (Added in - 7.18.3) */ + 7.19.0) */ CURL_LAST /* never use! */ } CURLcode; diff --git a/include/curl/curlver.h b/include/curl/curlver.h index 54652bfb0..6c4def01f 100644 --- a/include/curl/curlver.h +++ b/include/curl/curlver.h @@ -31,13 +31,13 @@ /* This is the version number of the libcurl package from which this header file origins: */ -#define LIBCURL_VERSION "7.18.3-CVS" +#define LIBCURL_VERSION "7.19.0-CVS" /* The numeric version number is also available "in parts" by using these defines: */ #define LIBCURL_VERSION_MAJOR 7 -#define LIBCURL_VERSION_MINOR 18 -#define LIBCURL_VERSION_PATCH 3 +#define LIBCURL_VERSION_MINOR 19 +#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 @@ -54,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 0x071203 +#define LIBCURL_VERSION_NUM 0x071300 /* * This is the date and time when the full source package was created. The -- cgit v1.2.1 From b8a9f195158644186c8c95bcb443a1cf6169857f Mon Sep 17 00:00:00 2001 From: Michal Marek Date: Mon, 9 Jun 2008 11:13:19 +0000 Subject: CURLOPT_CRLFILE and CURLOPT_ISSUERCERT are new string options --- include/curl/typecheck-gcc.h | 2 ++ 1 file changed, 2 insertions(+) (limited to 'include') diff --git a/include/curl/typecheck-gcc.h b/include/curl/typecheck-gcc.h index 4c7569698..bd0b0b7bb 100644 --- a/include/curl/typecheck-gcc.h +++ b/include/curl/typecheck-gcc.h @@ -224,6 +224,8 @@ _CURL_WARNING(_curl_easy_getinfo_err_curl_slist, (option) == CURLOPT_SSH_HOST_PUBLIC_KEY_MD5 || \ (option) == CURLOPT_SSH_PUBLIC_KEYFILE || \ (option) == CURLOPT_SSH_PRIVATE_KEYFILE || \ + (option) == CURLOPT_CRLFILE || \ + (option) == CURLOPT_ISSUERCERT || \ 0) /* evaluates to true if option takes a curl_write_callback argument */ -- cgit v1.2.1 From 400d9d420517a81d5f55153b0dda90aced1cbfb3 Mon Sep 17 00:00:00 2001 From: Daniel Stenberg Date: Tue, 1 Jul 2008 21:53:47 +0000 Subject: - Rolland Dudemaine provided fixes to get libcurl to build for the INTEGRITY operating system. --- include/curl/curl.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'include') diff --git a/include/curl/curl.h b/include/curl/curl.h index 7b9bff3e1..349a37714 100644 --- a/include/curl/curl.h +++ b/include/curl/curl.h @@ -64,7 +64,7 @@ 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) || defined(__SYMBIAN32__) + defined(__minix) || defined(__SYMBIAN32__) || defined(__INTEGRITY) #include #endif -- cgit v1.2.1 From ee64d14733266ce533eeb3cbc86bd80212527b81 Mon Sep 17 00:00:00 2001 From: Dan Fandrich Date: Wed, 2 Jul 2008 18:34:00 +0000 Subject: Support Open Watcom C on Linux (as well as Windows). --- include/curl/curl.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'include') diff --git a/include/curl/curl.h b/include/curl/curl.h index 349a37714..8182e9c28 100644 --- a/include/curl/curl.h +++ b/include/curl/curl.h @@ -71,7 +71,7 @@ #ifndef _WIN32_WCE #include #endif -#ifndef __WATCOMC__ +#if !defined(WIN32) || !defined(__WATCOMC__) #include #endif #include -- cgit v1.2.1 From 7c648782bc7c97be81c619acd8598c38b59c5832 Mon Sep 17 00:00:00 2001 From: Daniel Stenberg Date: Thu, 3 Jul 2008 06:56:03 +0000 Subject: Introcuding a new timestamp for curl_easy_getinfo(): CURLINFO_APPCONNECT_TIME. This is set with the "application layer" handshake/connection is completed (typically SSL, TLS or SSH). By using this you can figure out the application layer's own connect time. You can extract the time stamp using curl's -w option and the new variable named 'time_appconnect'. This feature was sponsored by Lenny Rachitsky at NeuStar. --- include/curl/curl.h | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'include') diff --git a/include/curl/curl.h b/include/curl/curl.h index 8182e9c28..af3a0d8a9 100644 --- a/include/curl/curl.h +++ b/include/curl/curl.h @@ -1608,9 +1608,10 @@ typedef enum { CURLINFO_FTP_ENTRY_PATH = CURLINFO_STRING + 30, CURLINFO_REDIRECT_URL = CURLINFO_STRING + 31, CURLINFO_PRIMARY_IP = CURLINFO_STRING + 32, + CURLINFO_APPCONNECT_TIME = CURLINFO_DOUBLE + 33, /* Fill in new entries below here! */ - CURLINFO_LASTONE = 32 + CURLINFO_LASTONE = 33 } CURLINFO; /* CURLINFO_RESPONSE_CODE is the new name for the option previously known as -- cgit v1.2.1 From 5aed78e183e843a6935679d3ebdafd0c10b41114 Mon Sep 17 00:00:00 2001 From: Daniel Stenberg Date: Wed, 30 Jul 2008 21:55:26 +0000 Subject: - Phil Blundell added the CURLOPT_SCOPE option, as well as adjusted the URL parser to allow numerical IPv6-addresses to be specified with the scope given, as per RFC4007 - with a percent letter that itself needs to be URL escaped. For example, for an address of fe80::1234%1 the HTTP URL is: "http://[fe80::1234%251]/" --- include/curl/curl.h | 3 +++ 1 file changed, 3 insertions(+) (limited to 'include') diff --git a/include/curl/curl.h b/include/curl/curl.h index af3a0d8a9..da7cc0793 100644 --- a/include/curl/curl.h +++ b/include/curl/curl.h @@ -1211,6 +1211,9 @@ typedef enum { /* Issuer certificate */ CINIT(ISSUERCERT, OBJECTPOINT, 170), + /* (IPv6) Address scope */ + CINIT(ADDRESS_SCOPE, LONG, 171), + CURLOPT_LASTENTRY /* the last unused */ } CURLoption; -- cgit v1.2.1 From 14240e9e109fe6af19438c6531d573f85dbb0b1e Mon Sep 17 00:00:00 2001 From: Yang Tse Date: Thu, 7 Aug 2008 00:29:08 +0000 Subject: Initial support of curlbuild.h and curlrules.h which allows to have a curl_off_t data type no longer gated to off_t. --- include/README | 33 +++- include/curl/.cvsignore | 3 +- include/curl/Makefile.am | 23 ++- include/curl/curl.h | 82 ++-------- include/curl/curlbuild.h.dist | 352 ++++++++++++++++++++++++++++++++++++++++++ include/curl/curlbuild.h.in | 129 ++++++++++++++++ include/curl/curlrules.h | 149 ++++++++++++++++++ 7 files changed, 688 insertions(+), 83 deletions(-) create mode 100644 include/curl/curlbuild.h.dist create mode 100644 include/curl/curlbuild.h.in create mode 100644 include/curl/curlrules.h (limited to 'include') diff --git a/include/README b/include/README index f8482ba69..485722e30 100644 --- a/include/README +++ b/include/README @@ -7,7 +7,7 @@ Include files for libcurl, external users. They're all placed in the curl subdirectory here for better fit in any kind -of environment. You should include files from here using... +of environment. You must include files from here using... #include @@ -16,14 +16,31 @@ curl subdirectory. It makes it more likely to survive future modifications. NOTE FOR LIBCURL HACKERS -All the include files in this tree are written and intended to be installed on -a system that may serve multiple platforms and multiple applications, all -using libcurl (possibly even different libcurl installations using different -versions). Therefore, all header files in here must obey these rules: +The following notes apply to libcurl version 7.19.0 and later. -* They cannot depend on or use configure-generated results from libcurl's or - curl's directories. Other applications may not run configure as (lib)curl - does, and using platform dependent info here may break other platforms. +* The distributed curl/curlbuild.h file is only intended to be used on systems + which can not run the also distributed configure script. + +* The distributed curlbuild.h file is generated as a copy of curlbuild.h.dist + when the libcurl source code distribution archive file is originally created. + +* If you check out from CVS on a non-configure platform, you must run the + appropriate buildconf* script to set up curlbuild.h and other local files + before being able of compiling the library. + +* On systems capable of running the configure script, the configure process + will overwrite the distributed include/curl/curlbuild.h file with one that + is suitable and specific to the library being configured and built, which + is generated from the include/curl/curlbuild.h.in template file. + +* If you intend to distribute an already compiled libcurl library you _MUST_ + also distribute along with it the generated curl/curlbuild.h which has been + used to compile it. Otherwise the library will be of no use for the users of + the library that you have built. It is _your_ responsability to provide this + file. No one at the cURL project can know how you have built the library. + +* File curl/curlbuild.h includes platform and configuration dependant info, + and must not be modified by anyone. Configure script generates it for you. * We cannot assume anything else but very basic compiler features being present. While libcurl requires an ANSI C compiler to build, some of the diff --git a/include/curl/.cvsignore b/include/curl/.cvsignore index 37c8aa7e2..67b973ae3 100644 --- a/include/curl/.cvsignore +++ b/include/curl/.cvsignore @@ -1,3 +1,4 @@ Makefile Makefile.in -*.dist +curlbuild.h +stamp-* diff --git a/include/curl/Makefile.am b/include/curl/Makefile.am index 707d1359f..bee5c25af 100644 --- a/include/curl/Makefile.am +++ b/include/curl/Makefile.am @@ -1,6 +1,25 @@ pkginclude_HEADERS = \ curl.h curlver.h easy.h mprintf.h stdcheaders.h types.h multi.h \ - typecheck-gcc.h + typecheck-gcc.h curlbuild.h curlrules.h + pkgincludedir= $(includedir)/curl -CLEANFILES = *dist +# curlbuild.h does not exist in the CVS tree. When the original libcurl +# source code distribution archive file is created, curlbuild.h.dist is +# renamed to curlbuild.h and included in the tarball so that it can be +# used directly on non-configure systems. +# +# The distributed curlbuild.h will be overwritten on configure systems +# when the configure script runs, with one that is suitable and specific +# to the library being configured and built. +# +# curlbuild.h.in is the distributed template file from which the configure +# script creates curlbuild.h at library configuration time, overwiting the +# one included in the distribution archive. +# +# curlbuild.h.dist is not included in the source code distribution archive. + +EXTRA_DIST = curlbuild.h.in + +DISTCLEANFILES = curlbuild.h + diff --git a/include/curl/curl.h b/include/curl/curl.h index da7cc0793..9dd54ff69 100644 --- a/include/curl/curl.h +++ b/include/curl/curl.h @@ -23,11 +23,17 @@ * $Id$ ***************************************************************************/ -/* If you have problems, all libcurl docs and details are found here: - http://curl.haxx.se/libcurl/ -*/ +/* + * If you have libcurl problems, all docs and details are found here: + * http://curl.haxx.se/libcurl/ + * + * curl-library mailing list subscription and unsubscription web interface: + * http://cool.haxx.se/mailman/listinfo/curl-library/ + */ -#include "curlver.h" /* the libcurl version defines */ +#include "curlver.h" /* libcurl version defines */ +#include "curl/curlbuild.h" /* libcurl build definitions */ +#include "curlrules.h" /* libcurl rules enforcement */ /* * Define WIN32 when build target is Win32 API @@ -113,74 +119,6 @@ typedef void CURL; #endif #endif -/* - * We want the typedef curl_off_t setup for large file support on all - * platforms. We also provide a CURL_FORMAT_OFF_T define to use in *printf - * format strings when outputting a variable of type curl_off_t. - * - * Note: "pocc -Ze" is MSVC compatibility mode and this sets _MSC_VER! - */ - -#if (defined(_MSC_VER) && !defined(__POCC__)) || (defined(__LCC__) && \ - defined(WIN32)) -/* MSVC */ -#ifdef _WIN32_WCE - typedef long curl_off_t; -#define CURL_FORMAT_OFF_T "%ld" -#else - typedef signed __int64 curl_off_t; -#define CURL_FORMAT_OFF_T "%I64d" -#endif -#else /* (_MSC_VER && !__POCC__) || (__LCC__ && WIN32) */ -#if (defined(__GNUC__) && defined(WIN32)) || defined(__WATCOMC__) -/* gcc on windows or Watcom */ - typedef long long curl_off_t; -#define CURL_FORMAT_OFF_T "%I64d" -#else /* GCC or Watcom on Windows */ -#if defined(__ILEC400__) -/* OS400 C compiler. */ - typedef long long curl_off_t; -#define CURL_FORMAT_OFF_T "%lld" -#else /* OS400 C compiler. */ - -/* "normal" POSIX approach, do note that this does not necessarily mean that - the type is >32 bits, see the SIZEOF_CURL_OFF_T define for that! */ - typedef off_t curl_off_t; - -/* Check a range of defines to detect large file support. On Linux it seems - none of these are set by default, so if you don't explicitly switches on - large file support, this define will be made for "small file" support. */ -#ifndef _FILE_OFFSET_BITS -#define _FILE_OFFSET_BITS 0 /* to prevent warnings in the check below */ -#define UNDEF_FILE_OFFSET_BITS -#endif -#ifndef FILESIZEBITS -#define FILESIZEBITS 0 /* to prevent warnings in the check below */ -#define UNDEF_FILESIZEBITS -#endif - -#if defined(_LARGE_FILES) || (_FILE_OFFSET_BITS > 32) || (FILESIZEBITS > 32) \ - || defined(_LARGEFILE_SOURCE) || defined(_LARGEFILE64_SOURCE) - /* For now, we assume at least one of these to be set for large files to - work! */ -#define CURL_FORMAT_OFF_T "%lld" -#else /* LARGE_FILE support */ -#define CURL_FORMAT_OFF_T "%ld" -#endif -#endif /* OS400 C compiler. */ -#endif /* GCC or Watcom on Windows */ -#endif /* (_MSC_VER && !__POCC__) || (__LCC__ && WIN32) */ - -#ifdef UNDEF_FILE_OFFSET_BITS -/* this was defined above for our checks, undefine it again */ -#undef _FILE_OFFSET_BITS -#endif - -#ifdef UNDEF_FILESIZEBITS -/* this was defined above for our checks, undefine it again */ -#undef FILESIZEBITS -#endif - #ifndef curl_socket_typedef /* socket typedef */ #ifdef WIN32 diff --git a/include/curl/curlbuild.h.dist b/include/curl/curlbuild.h.dist new file mode 100644 index 000000000..7dbafbce8 --- /dev/null +++ b/include/curl/curlbuild.h.dist @@ -0,0 +1,352 @@ +#ifndef __CURL_CURLBUILD_H +#define __CURL_CURLBUILD_H +/*************************************************************************** + * _ _ ____ _ + * Project ___| | | | _ \| | + * / __| | | | |_) | | + * | (__| |_| | _ <| |___ + * \___|\___/|_| \_\_____| + * + * 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 + * are also available at http://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 + * furnished to do so, under the terms of the COPYING file. + * + * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY + * KIND, either express or implied. + * + * $Id$ + ***************************************************************************/ + +/* ================================================================ */ +/* NOTES FOR CONFIGURE CAPABLE SYSTEMS */ +/* ================================================================ */ + +/* + * NOTE 1: + * ------- + * + * See file include/curl/curlbuild.h.in, run configure, and forget + * that this file exists it is only used for non-configure systems. + * But you can keep reading if you want ;-) + * + */ + +/* ================================================================ */ +/* NOTES FOR NON-CONFIGURE SYSTEMS */ +/* ================================================================ */ + +/* + * NOTE 1: + * ------- + * + * Nothing in this file is intended to be modified or adjusted by the + * curl library user nor by the curl library builder. + * + * If you think that something actually needs to be changed, adjusted + * or fixed in this file, then, report it on the libcurl development + * mailing list: http://cool.haxx.se/mailman/listinfo/curl-library/ + * + * Try to keep one section per platform, compiler and architecture, + * otherwise, if an existing section is reused for a different one and + * later on the original is adjusted, probably the piggybacking one can + * be adversely changed. + * + * In order to differentiate between platforms/compilers/architectures + * use only compiler built in predefined preprocessor symbols. + * + * This header file shall only export symbols which are 'curl' or 'CURL' + * prefixed, otherwise public name space would be polluted. + * + * NOTE 2: + * ------- + * + * For any given platform/compiler curl_off_t must be typedef'ed to a + * 64-bit wide signed integral data type. The width of this data type + * must remain constant and independant of any possible large file + * support settings. + * + * As an exception to the above, curl_off_t shall be typedef'ed to a + * 32-bit wide signed integral data type if there is no 64-bit type. + * + * As a general rule, curl_off_t shall not be mapped to off_t. This + * rule shall only be violated if off_t is the only 64-bit data type + * available and the size of off_t is independant of large file support + * settings. Keep your build on the safe side avoiding an off_t gating. + * If you have a 64-bit off_t then take for sure that another 64-bit + * data type exists, dig deeper and you will find it. + * + * NOTE 3: + * ------- + * + * Right now you might be staring at file include/curl/curlbuild.h.dist or + * at file include/curl/curlbuild.h, this is due to the following reason: + * file include/curl/curlbuild.h.dist is renamed to include/curl/curlbuild.h + * when the libcurl source code distribution archive file is created. + * + * File include/curl/curlbuild.h.dist is not included in the distribution + * archive. File include/curl/curlbuild.h is not present in the CVS tree. + * + * The distributed include/curl/curlbuild.h file is only intended to be used + * on systems which can not run the also distributed configure script. + * + * On systems capable of running the configure script, the configure process + * will overwrite the distributed include/curl/curlbuild.h file with one that + * is suitable and specific to the library being configured and built, which + * is generated from the include/curl/curlbuild.h.in template file. + * + * If you check out from CVS on a non-configure platform, you must run the + * appropriate buildconf* script to set up curlbuild.h and other local files. + * + */ + +/* ================================================================ */ +/* DEFINITION OF THESE SYMBOLS SHALL NOT TAKE PLACE ANYWHERE ELSE */ +/* ================================================================ */ + +#ifdef CURL_OFF_T +# error "CURL_OFF_T shall not be defined except in curlbuild.h" + Error Compilation_aborted_CURL_OFF_T_already_defined +#endif + +#ifdef CURL_FMT_OFF_T +# error "CURL_FMT_OFF_T shall not be defined except in curlbuild.h" + Error Compilation_aborted_CURL_FMT_OFF_T_already_defined +#endif + +#ifdef CURL_FMT_OFF_TU +# error "CURL_FMT_OFF_TU shall not be defined except in curlbuild.h" + Error Compilation_aborted_CURL_FMT_OFF_TU_already_defined +#endif + +#ifdef CURL_FORMAT_OFF_T +# error "CURL_FORMAT_OFF_T shall not be defined except in curlbuild.h" + Error Compilation_aborted_CURL_FORMAT_OFF_T_already_defined +#endif + +#ifdef CURL_SIZEOF_CURL_OFF_T +# error "CURL_SIZEOF_CURL_OFF_T shall not be defined except in curlbuild.h" + Error Compilation_aborted_CURL_SIZEOF_CURL_OFF_T_already_defined +#endif + +/* ================================================================ */ +/* EXTERNAL INTERFACE SETTINGS FOR NON-CONFIGURE SYSTEMS ONLY */ +/* ================================================================ */ + +#if defined(__DJGPP__) +# define CURL_OFF_T long +# define CURL_FMT_OFF_T "ld" +# define CURL_FMT_OFF_TU "lu" +# define CURL_FORMAT_OFF_T "%ld" +# define CURL_SIZEOF_CURL_OFF_T 4 + +#elif defined(__SALFORDC__) +# define CURL_OFF_T long +# define CURL_FMT_OFF_T "ld" +# define CURL_FMT_OFF_TU "lu" +# define CURL_FORMAT_OFF_T "%ld" +# define CURL_SIZEOF_CURL_OFF_T 4 + +#elif defined(__BORLANDC__) +# if (__BORLANDC__ < 0x520) +# define CURL_OFF_T long +# define CURL_FMT_OFF_T "ld" +# define CURL_FMT_OFF_TU "lu" +# define CURL_FORMAT_OFF_T "%ld" +# define CURL_SIZEOF_CURL_OFF_T 4 +# else +# define CURL_OFF_T signed __int64 +# define CURL_FMT_OFF_T "I64d" +# define CURL_FMT_OFF_TU "I64u" +# define CURL_FORMAT_OFF_T "%I64d" +# define CURL_SIZEOF_CURL_OFF_T 8 +# endif + +#elif defined(__TURBOC__) +# define CURL_OFF_T long +# define CURL_FMT_OFF_T "ld" +# define CURL_FMT_OFF_TU "lu" +# define CURL_FORMAT_OFF_T "%ld" +# define CURL_SIZEOF_CURL_OFF_T 4 + +#elif defined(__WATCOMC__) +# if defined(__386__) +# define CURL_OFF_T signed __int64 +# define CURL_FMT_OFF_T "I64d" +# define CURL_FMT_OFF_TU "I64u" +# define CURL_FORMAT_OFF_T "%I64d" +# define CURL_SIZEOF_CURL_OFF_T 8 +# else +# define CURL_OFF_T long +# define CURL_FMT_OFF_T "ld" +# define CURL_FMT_OFF_TU "lu" +# define CURL_FORMAT_OFF_T "%ld" +# define CURL_SIZEOF_CURL_OFF_T 4 +# endif + +#elif defined(__POCC__) +# if (__POCC__ < 280) +# define CURL_OFF_T long +# define CURL_FMT_OFF_T "ld" +# define CURL_FMT_OFF_TU "lu" +# define CURL_FORMAT_OFF_T "%ld" +# define CURL_SIZEOF_CURL_OFF_T 4 +# elif defined(_MSC_VER) +# define CURL_OFF_T signed __int64 +# define CURL_FMT_OFF_T "I64d" +# define CURL_FMT_OFF_TU "I64u" +# define CURL_FORMAT_OFF_T "%I64d" +# define CURL_SIZEOF_CURL_OFF_T 8 +# else +# define CURL_OFF_T long long +# define CURL_FMT_OFF_T "lld" +# define CURL_FMT_OFF_TU "llu" +# define CURL_FORMAT_OFF_T "%lld" +# define CURL_SIZEOF_CURL_OFF_T 8 +# endif + +#elif defined(__LCC__) +# define CURL_OFF_T long +# define CURL_FMT_OFF_T "ld" +# define CURL_FMT_OFF_TU "lu" +# define CURL_FORMAT_OFF_T "%ld" +# define CURL_SIZEOF_CURL_OFF_T 4 + +#elif defined(__SYMBIAN32__) +# if defined(__GCC32__) +# define CURL_OFF_T long long +# define CURL_FMT_OFF_T "lld" +# define CURL_FMT_OFF_TU "llu" +# define CURL_FORMAT_OFF_T "%lld" +# define CURL_SIZEOF_CURL_OFF_T 8 +# elif defined(__CW32__) +# pragma longlong on +# define CURL_OFF_T long long +# define CURL_FMT_OFF_T "lld" +# define CURL_FMT_OFF_TU "llu" +# define CURL_FORMAT_OFF_T "%lld" +# define CURL_SIZEOF_CURL_OFF_T 8 +# elif defined(__VC32__) +# define CURL_OFF_T signed __int64 +# define CURL_FMT_OFF_T "lld" +# define CURL_FMT_OFF_TU "llu" +# define CURL_FORMAT_OFF_T "%lld" +# define CURL_SIZEOF_CURL_OFF_T 8 +# endif + +#elif defined(_WIN32_WCE) +# define CURL_OFF_T signed __int64 +# define CURL_FMT_OFF_T "I64d" +# define CURL_FMT_OFF_TU "I64u" +# define CURL_FORMAT_OFF_T "%I64d" +# define CURL_SIZEOF_CURL_OFF_T 8 + +#elif defined(__MINGW32__) +# define CURL_OFF_T long long +# define CURL_FMT_OFF_T "I64d" +# define CURL_FMT_OFF_TU "I64u" +# define CURL_FORMAT_OFF_T "%I64d" +# define CURL_SIZEOF_CURL_OFF_T 8 + +#elif defined(_MSC_VER) +# if (_MSC_VER >= 900) +# define CURL_OFF_T signed __int64 +# define CURL_FMT_OFF_T "I64d" +# define CURL_FMT_OFF_TU "I64u" +# define CURL_FORMAT_OFF_T "%I64d" +# define CURL_SIZEOF_CURL_OFF_T 8 +# else +# define CURL_OFF_T long +# define CURL_FMT_OFF_T "ld" +# define CURL_FMT_OFF_TU "lu" +# define CURL_FORMAT_OFF_T "%ld" +# define CURL_SIZEOF_CURL_OFF_T 4 +# endif + +#elif defined(__VMS) +# if defined(__alpha) || defined(__ia64) +# define CURL_OFF_T long long +# define CURL_FMT_OFF_T "lld" +# define CURL_FMT_OFF_TU "llu" +# define CURL_FORMAT_OFF_T "%lld" +# define CURL_SIZEOF_CURL_OFF_T 8 +# else +# define CURL_OFF_T long +# define CURL_FMT_OFF_T "ld" +# define CURL_FMT_OFF_TU "lu" +# define CURL_FORMAT_OFF_T "%ld" +# define CURL_SIZEOF_CURL_OFF_T 4 +# endif + +#elif defined(__OS400__) +# if defined(__ILEC400__) +# define CURL_OFF_T long long +# define CURL_FMT_OFF_T "lld" +# define CURL_FMT_OFF_TU "llu" +# define CURL_FORMAT_OFF_T "%lld" +# define CURL_SIZEOF_CURL_OFF_T 8 +# endif + +#elif defined(__MVS__) +# if defined(__IBMC__) || defined(__IBMCPP__) +# if defined(_LONG_LONG) +# define CURL_OFF_T long long +# define CURL_FMT_OFF_T "lld" +# define CURL_FMT_OFF_TU "llu" +# define CURL_FORMAT_OFF_T "%lld" +# define CURL_SIZEOF_CURL_OFF_T 8 +# elif defined(_LP64) +# define CURL_OFF_T long +# define CURL_FMT_OFF_T "ld" +# define CURL_FMT_OFF_TU "lu" +# define CURL_FORMAT_OFF_T "%ld" +# define CURL_SIZEOF_CURL_OFF_T 8 +# else +# define CURL_OFF_T long +# define CURL_FMT_OFF_T "ld" +# define CURL_FMT_OFF_TU "lu" +# define CURL_FORMAT_OFF_T "%ld" +# define CURL_SIZEOF_CURL_OFF_T 4 +# endif +# endif + +#elif defined(__370__) +# if defined(__IBMC__) || defined(__IBMCPP__) +# if defined(_LONG_LONG) +# define CURL_OFF_T long long +# define CURL_FMT_OFF_T "lld" +# define CURL_FMT_OFF_TU "llu" +# define CURL_FORMAT_OFF_T "%lld" +# define CURL_SIZEOF_CURL_OFF_T 8 +# elif defined(_LP64) +# define CURL_OFF_T long +# define CURL_FMT_OFF_T "ld" +# define CURL_FMT_OFF_TU "lu" +# define CURL_FORMAT_OFF_T "%ld" +# define CURL_SIZEOF_CURL_OFF_T 8 +# else +# define CURL_OFF_T long +# define CURL_FMT_OFF_T "ld" +# define CURL_FMT_OFF_TU "lu" +# define CURL_FORMAT_OFF_T "%ld" +# define CURL_SIZEOF_CURL_OFF_T 4 +# endif +# endif + +#else +# error "Unknown non-configure build target!" + Error Compilation_aborted_Unknown_non_configure_build_target +#endif + +/* Data type definition of curl_off_t. */ + +#ifdef CURL_OFF_T + typedef CURL_OFF_T curl_off_t; +#endif + +#endif /* __CURL_CURLBUILD_H */ diff --git a/include/curl/curlbuild.h.in b/include/curl/curlbuild.h.in new file mode 100644 index 000000000..cc4d77eb8 --- /dev/null +++ b/include/curl/curlbuild.h.in @@ -0,0 +1,129 @@ +#ifndef __CURL_CURLBUILD_H +#define __CURL_CURLBUILD_H +/*************************************************************************** + * _ _ ____ _ + * Project ___| | | | _ \| | + * / __| | | | |_) | | + * | (__| |_| | _ <| |___ + * \___|\___/|_| \_\_____| + * + * 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 + * are also available at http://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 + * furnished to do so, under the terms of the COPYING file. + * + * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY + * KIND, either express or implied. + * + * $Id$ + ***************************************************************************/ + +/* ================================================================ */ +/* NOTES FOR CONFIGURE CAPABLE SYSTEMS */ +/* ================================================================ */ + +/* + * NOTE 1: + * ------- + * + * Nothing in this file is intended to be modified or adjusted by the + * curl library user nor by the curl library builder. + * + * If you think that something actually needs to be changed, adjusted + * or fixed in this file, then, report it on the libcurl development + * mailing list: http://cool.haxx.se/mailman/listinfo/curl-library/ + * + * This header file shall only export symbols which are 'curl' or 'CURL' + * prefixed, otherwise public name space would be polluted. + * + * NOTE 2: + * ------- + * + * Right now you might be staring at file include/curl/curlbuild.h.in or + * at file include/curl/curlbuild.h, this is due to the following reason: + * + * On systems capable of running the configure script, the configure process + * will overwrite the distributed include/curl/curlbuild.h file with one that + * is suitable and specific to the library being configured and built, which + * is generated from the include/curl/curlbuild.h.in template file. + * + */ + +/* ================================================================ */ +/* DEFINITION OF THESE SYMBOLS SHALL NOT TAKE PLACE ANYWHERE ELSE */ +/* ================================================================ */ + +#ifdef CURL_OFF_T +# error "CURL_OFF_T shall not be defined except in curlbuild.h" + Error Compilation_aborted_CURL_OFF_T_already_defined +#endif + +#ifdef CURL_FMT_OFF_T +# error "CURL_FMT_OFF_T shall not be defined except in curlbuild.h" + Error Compilation_aborted_CURL_FMT_OFF_T_already_defined +#endif + +#ifdef CURL_FMT_OFF_TU +# error "CURL_FMT_OFF_TU shall not be defined except in curlbuild.h" + Error Compilation_aborted_CURL_FMT_OFF_TU_already_defined +#endif + +#ifdef CURL_FORMAT_OFF_T +# error "CURL_FORMAT_OFF_T shall not be defined except in curlbuild.h" + Error Compilation_aborted_CURL_FORMAT_OFF_T_already_defined +#endif + +#ifdef CURL_SIZEOF_CURL_OFF_T +# error "CURL_SIZEOF_CURL_OFF_T shall not be defined except in curlbuild.h" + Error Compilation_aborted_CURL_SIZEOF_CURL_OFF_T_already_defined +#endif + +/* ================================================================ */ +/* EXTERNAL INTERFACE SETTINGS FOR CONFIGURE CAPABLE SYSTEMS ONLY */ +/* ================================================================ */ + +/* Configure process defines this to 1 when it finds out that system */ +/* header file sys/types.h must be included by the external interface. */ +#undef CURL_PULL_SYS_TYPES_H +#ifdef CURL_PULL_SYS_TYPES_H +# include +#endif + +/* Configure process defines this to 1 when it finds out that system */ +/* header file stdint.h must be included by the external interface. */ +#undef CURL_PULL_STDINT_H +#ifdef CURL_PULL_STDINT_H +# include +#endif + +/* Configure process defines this to 1 when it finds out that system */ +/* header file inttypes.h must be included by the external interface. */ +#undef CURL_PULL_INTTYPES_H +#ifdef CURL_PULL_INTTYPES_H +# include +#endif + +/* Signed integral data type used for curl_off_t. */ +#undef CURL_OFF_T + +/* Data type definition of curl_off_t. */ +typedef CURL_OFF_T curl_off_t; + +/* curl_off_t formatting string directive without "%" conversion specifier. */ +#undef CURL_FMT_OFF_T + +/* unsigned curl_off_t formatting string without "%" conversion specifier. */ +#undef CURL_FMT_OFF_TU + +/* curl_off_t formatting string directive with "%" conversion specifier. */ +#undef CURL_FORMAT_OFF_T + +/* The expected size of curl_off_t, as to be computed by sizeof. */ +#undef CURL_SIZEOF_CURL_OFF_T + +#endif /* __CURL_CURLBUILD_H */ diff --git a/include/curl/curlrules.h b/include/curl/curlrules.h new file mode 100644 index 000000000..56499f9a2 --- /dev/null +++ b/include/curl/curlrules.h @@ -0,0 +1,149 @@ +#ifndef __CURL_CURLRULES_H +#define __CURL_CURLRULES_H +/*************************************************************************** + * _ _ ____ _ + * Project ___| | | | _ \| | + * / __| | | | |_) | | + * | (__| |_| | _ <| |___ + * \___|\___/|_| \_\_____| + * + * 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 + * are also available at http://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 + * furnished to do so, under the terms of the COPYING file. + * + * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY + * KIND, either express or implied. + * + * $Id$ + ***************************************************************************/ + +/* ================================================================ */ +/* COMPILE TIME SANITY CHECKS */ +/* ================================================================ */ + +/* + * NOTE 1: + * ------- + * + * All checks done in this file are intentionally placed in a public + * header file which is pulled by curl/curl.h when an application is + * being built using an already built libcurl library. Additionally + * this file is also included and used when building the library. + * + * If compilation fails on this file it is certainly sure that the + * problem is elsewhere. It could be a problem in the curlbuild.h + * header file, or simply that you are using different compilation + * settings than those used to build the library. + * + * Nothing in this file is intended to be modified or adjusted by the + * curl library user nor by the curl library builder. + * + * Do not deactivate any check, these are done to make sure that the + * library is properly built and used. + * + * You can find further help on the libcurl development mailing list: + * http://cool.haxx.se/mailman/listinfo/curl-library/ + * + * NOTE 2 + * ------ + * + * Some of the following compile time checks are based on the fact + * that the dimension of a constant array can not be a negative one. + * In this way if the compile time verification fails, the compilation + * will fail issuing an error. The error description wording is compiler + * dependant but it will be quite similar to one of the following: + * + * "negative subscript or subscript is too large" + * "array must have at least one element" + * "-1 is an illegal array size" + * "size of array is negative" + * + * If you are building an application which tries to use an already + * built libcurl library and you are getting this kind of errors on + * this file, it is a clear indication that there is a mismatch between + * how the library was built and how you are trying to use it for your + * application. Your already compiled or binary library provider is the + * only one who can give you the details you need to properly use it. + */ + +/* + * Verify that some macros are actually defined. + */ + +#ifndef CURL_OFF_T +# error "CURL_OFF_T definition is missing!" + Error Compilation_aborted_CURL_OFF_T_is_missing +#endif + +#ifndef CURL_FMT_OFF_T +# error "CURL_FMT_OFF_T definition is missing!" + Error Compilation_aborted_CURL_FMT_OFF_T_is_missing +#endif + +#ifndef CURL_FMT_OFF_TU +# error "CURL_FMT_OFF_TU definition is missing!" + Error Compilation_aborted_CURL_FMT_OFF_TU_is_missing +#endif + +#ifndef CURL_FORMAT_OFF_T +# error "CURL_FORMAT_OFF_T definition is missing!" + Error Compilation_aborted_CURL_FORMAT_OFF_T_is_missing +#endif + +#ifndef CURL_SIZEOF_CURL_OFF_T +# error "CURL_SIZEOF_CURL_OFF_T definition is missing!" + Error Compilation_aborted_CURL_SIZEOF_CURL_OFF_T_is_missing +#endif + +/* + * Macros private to this header file. + */ + +#define CurlchkszEQ(t, s) sizeof(t) == s ? 1 : -1 + +#define CurlchkszGE(t1, t2) sizeof(t1) >= sizeof(t2) ? 1 : -1 + +/* + * Verify that the size previously defined and expected for + * curl_off_t is actually the the same as the one reported + * by sizeof() at compile time. + */ + +typedef char + __curl_rule_01__ + [CurlchkszEQ(curl_off_t, CURL_SIZEOF_CURL_OFF_T)]; + +/* + * Verify at compile time that the size of curl_off_t as reported + * by sizeof() is greater or equal than the one reported for long + * for the current compilation. + */ + +typedef char + __curl_rule_02__ + [CurlchkszGE(curl_off_t, long)]; + +/* + * Get rid of macros private to this header file. + */ + +#undef CurlchkszEQ +#undef CurlchkszGE + +/* + * Get rid of macros not intended to exist beyond this point. + */ + +#undef CURL_PULL_SYS_TYPES_H +#undef CURL_PULL_STDINT_H +#undef CURL_PULL_INTTYPES_H + +#undef CURL_OFF_T + +#endif /* __CURL_CURLRULES_H */ -- cgit v1.2.1 From 3ac692991912e596959aaedb49ff2798537e7af5 Mon Sep 17 00:00:00 2001 From: Yang Tse Date: Fri, 8 Aug 2008 05:53:01 +0000 Subject: Add metroworks and generic gcc --- include/curl/curlbuild.h.dist | 26 ++++++++++++++++++++++++++ 1 file changed, 26 insertions(+) (limited to 'include') diff --git a/include/curl/curlbuild.h.dist b/include/curl/curlbuild.h.dist index 7dbafbce8..74754deee 100644 --- a/include/curl/curlbuild.h.dist +++ b/include/curl/curlbuild.h.dist @@ -239,6 +239,13 @@ # define CURL_SIZEOF_CURL_OFF_T 8 # endif +#elif defined(__MWERKS__) +# define CURL_OFF_T long long +# define CURL_FMT_OFF_T "lld" +# define CURL_FMT_OFF_TU "llu" +# define CURL_FORMAT_OFF_T "%lld" +# define CURL_SIZEOF_CURL_OFF_T 8 + #elif defined(_WIN32_WCE) # define CURL_OFF_T signed __int64 # define CURL_FMT_OFF_T "I64d" @@ -338,6 +345,25 @@ # endif # endif +/* ===================================== */ +/* KEEP GENERIC GCC THE LAST ENTRY */ +/* ===================================== */ + +#elif defined(__GNUC__) +# if defined(__i386__) +# define CURL_OFF_T long long +# define CURL_FMT_OFF_T "lld" +# define CURL_FMT_OFF_TU "llu" +# define CURL_FORMAT_OFF_T "%lld" +# define CURL_SIZEOF_CURL_OFF_T 8 +# elif defined(__x86_64__) +# define CURL_OFF_T long +# define CURL_FMT_OFF_T "ld" +# define CURL_FMT_OFF_TU "lu" +# define CURL_FORMAT_OFF_T "%ld" +# define CURL_SIZEOF_CURL_OFF_T 8 +# endif + #else # error "Unknown non-configure build target!" Error Compilation_aborted_Unknown_non_configure_build_target -- cgit v1.2.1 From 8af61cdb669a791d64675701c830affb06b975cd Mon Sep 17 00:00:00 2001 From: Yang Tse Date: Sat, 9 Aug 2008 15:28:13 +0000 Subject: Remove some redundancy --- include/curl/curlbuild.h.dist | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) (limited to 'include') diff --git a/include/curl/curlbuild.h.dist b/include/curl/curlbuild.h.dist index 74754deee..07b8abea7 100644 --- a/include/curl/curlbuild.h.dist +++ b/include/curl/curlbuild.h.dist @@ -160,7 +160,7 @@ # define CURL_FORMAT_OFF_T "%ld" # define CURL_SIZEOF_CURL_OFF_T 4 # else -# define CURL_OFF_T signed __int64 +# define CURL_OFF_T __int64 # define CURL_FMT_OFF_T "I64d" # define CURL_FMT_OFF_TU "I64u" # define CURL_FORMAT_OFF_T "%I64d" @@ -176,7 +176,7 @@ #elif defined(__WATCOMC__) # if defined(__386__) -# define CURL_OFF_T signed __int64 +# define CURL_OFF_T __int64 # define CURL_FMT_OFF_T "I64d" # define CURL_FMT_OFF_TU "I64u" # define CURL_FORMAT_OFF_T "%I64d" @@ -197,7 +197,7 @@ # define CURL_FORMAT_OFF_T "%ld" # define CURL_SIZEOF_CURL_OFF_T 4 # elif defined(_MSC_VER) -# define CURL_OFF_T signed __int64 +# define CURL_OFF_T __int64 # define CURL_FMT_OFF_T "I64d" # define CURL_FMT_OFF_TU "I64u" # define CURL_FORMAT_OFF_T "%I64d" @@ -232,7 +232,7 @@ # define CURL_FORMAT_OFF_T "%lld" # define CURL_SIZEOF_CURL_OFF_T 8 # elif defined(__VC32__) -# define CURL_OFF_T signed __int64 +# define CURL_OFF_T __int64 # define CURL_FMT_OFF_T "lld" # define CURL_FMT_OFF_TU "llu" # define CURL_FORMAT_OFF_T "%lld" @@ -247,7 +247,7 @@ # define CURL_SIZEOF_CURL_OFF_T 8 #elif defined(_WIN32_WCE) -# define CURL_OFF_T signed __int64 +# define CURL_OFF_T __int64 # define CURL_FMT_OFF_T "I64d" # define CURL_FMT_OFF_TU "I64u" # define CURL_FORMAT_OFF_T "%I64d" @@ -262,7 +262,7 @@ #elif defined(_MSC_VER) # if (_MSC_VER >= 900) -# define CURL_OFF_T signed __int64 +# define CURL_OFF_T __int64 # define CURL_FMT_OFF_T "I64d" # define CURL_FMT_OFF_TU "I64u" # define CURL_FORMAT_OFF_T "%I64d" -- cgit v1.2.1 From b5b25b39e9fab3ee7b24526f21f5bb63428becc5 Mon Sep 17 00:00:00 2001 From: Yang Tse Date: Mon, 11 Aug 2008 18:27:21 +0000 Subject: Added missing signed and unsigned curl_off_t integer constant suffixes for internal and external use. CURL_SUFFIX_CURL_OFF_T, CURL_SUFFIX_CURL_OFF_TU. --- include/curl/curlbuild.h.dist | 360 ++++++++++++++++++++++++------------------ include/curl/curlbuild.h.in | 6 + 2 files changed, 216 insertions(+), 150 deletions(-) (limited to 'include') diff --git a/include/curl/curlbuild.h.dist b/include/curl/curlbuild.h.dist index 07b8abea7..e622e5bac 100644 --- a/include/curl/curlbuild.h.dist +++ b/include/curl/curlbuild.h.dist @@ -139,209 +139,265 @@ /* ================================================================ */ #if defined(__DJGPP__) -# define CURL_OFF_T long -# define CURL_FMT_OFF_T "ld" -# define CURL_FMT_OFF_TU "lu" -# define CURL_FORMAT_OFF_T "%ld" -# define CURL_SIZEOF_CURL_OFF_T 4 +# define CURL_OFF_T long +# define CURL_FMT_OFF_T "ld" +# define CURL_FMT_OFF_TU "lu" +# define CURL_FORMAT_OFF_T "%ld" +# define CURL_SIZEOF_CURL_OFF_T 4 +# define CURL_SUFFIX_CURL_OFF_T L +# define CURL_SUFFIX_CURL_OFF_TU uL #elif defined(__SALFORDC__) -# define CURL_OFF_T long -# define CURL_FMT_OFF_T "ld" -# define CURL_FMT_OFF_TU "lu" -# define CURL_FORMAT_OFF_T "%ld" -# define CURL_SIZEOF_CURL_OFF_T 4 +# define CURL_OFF_T long +# define CURL_FMT_OFF_T "ld" +# define CURL_FMT_OFF_TU "lu" +# define CURL_FORMAT_OFF_T "%ld" +# define CURL_SIZEOF_CURL_OFF_T 4 +# define CURL_SUFFIX_CURL_OFF_T L +# define CURL_SUFFIX_CURL_OFF_TU uL #elif defined(__BORLANDC__) # if (__BORLANDC__ < 0x520) -# define CURL_OFF_T long -# define CURL_FMT_OFF_T "ld" -# define CURL_FMT_OFF_TU "lu" -# define CURL_FORMAT_OFF_T "%ld" -# define CURL_SIZEOF_CURL_OFF_T 4 +# define CURL_OFF_T long +# define CURL_FMT_OFF_T "ld" +# define CURL_FMT_OFF_TU "lu" +# define CURL_FORMAT_OFF_T "%ld" +# define CURL_SIZEOF_CURL_OFF_T 4 +# define CURL_SUFFIX_CURL_OFF_T L +# define CURL_SUFFIX_CURL_OFF_TU uL # else -# define CURL_OFF_T __int64 -# define CURL_FMT_OFF_T "I64d" -# define CURL_FMT_OFF_TU "I64u" -# define CURL_FORMAT_OFF_T "%I64d" -# define CURL_SIZEOF_CURL_OFF_T 8 +# define CURL_OFF_T __int64 +# define CURL_FMT_OFF_T "I64d" +# define CURL_FMT_OFF_TU "I64u" +# define CURL_FORMAT_OFF_T "%I64d" +# define CURL_SIZEOF_CURL_OFF_T 8 +# define CURL_SUFFIX_CURL_OFF_T i64 +# define CURL_SUFFIX_CURL_OFF_TU ui64 # endif #elif defined(__TURBOC__) -# define CURL_OFF_T long -# define CURL_FMT_OFF_T "ld" -# define CURL_FMT_OFF_TU "lu" -# define CURL_FORMAT_OFF_T "%ld" -# define CURL_SIZEOF_CURL_OFF_T 4 +# define CURL_OFF_T long +# define CURL_FMT_OFF_T "ld" +# define CURL_FMT_OFF_TU "lu" +# define CURL_FORMAT_OFF_T "%ld" +# define CURL_SIZEOF_CURL_OFF_T 4 +# define CURL_SUFFIX_CURL_OFF_T L +# define CURL_SUFFIX_CURL_OFF_TU uL #elif defined(__WATCOMC__) # if defined(__386__) -# define CURL_OFF_T __int64 -# define CURL_FMT_OFF_T "I64d" -# define CURL_FMT_OFF_TU "I64u" -# define CURL_FORMAT_OFF_T "%I64d" -# define CURL_SIZEOF_CURL_OFF_T 8 +# define CURL_OFF_T __int64 +# define CURL_FMT_OFF_T "I64d" +# define CURL_FMT_OFF_TU "I64u" +# define CURL_FORMAT_OFF_T "%I64d" +# define CURL_SIZEOF_CURL_OFF_T 8 +# define CURL_SUFFIX_CURL_OFF_T i64 +# define CURL_SUFFIX_CURL_OFF_TU ui64 # else -# define CURL_OFF_T long -# define CURL_FMT_OFF_T "ld" -# define CURL_FMT_OFF_TU "lu" -# define CURL_FORMAT_OFF_T "%ld" -# define CURL_SIZEOF_CURL_OFF_T 4 +# define CURL_OFF_T long +# define CURL_FMT_OFF_T "ld" +# define CURL_FMT_OFF_TU "lu" +# define CURL_FORMAT_OFF_T "%ld" +# define CURL_SIZEOF_CURL_OFF_T 4 +# define CURL_SUFFIX_CURL_OFF_T L +# define CURL_SUFFIX_CURL_OFF_TU uL # endif #elif defined(__POCC__) # if (__POCC__ < 280) -# define CURL_OFF_T long -# define CURL_FMT_OFF_T "ld" -# define CURL_FMT_OFF_TU "lu" -# define CURL_FORMAT_OFF_T "%ld" -# define CURL_SIZEOF_CURL_OFF_T 4 +# define CURL_OFF_T long +# define CURL_FMT_OFF_T "ld" +# define CURL_FMT_OFF_TU "lu" +# define CURL_FORMAT_OFF_T "%ld" +# define CURL_SIZEOF_CURL_OFF_T 4 +# define CURL_SUFFIX_CURL_OFF_T L +# define CURL_SUFFIX_CURL_OFF_TU uL # elif defined(_MSC_VER) -# define CURL_OFF_T __int64 -# define CURL_FMT_OFF_T "I64d" -# define CURL_FMT_OFF_TU "I64u" -# define CURL_FORMAT_OFF_T "%I64d" -# define CURL_SIZEOF_CURL_OFF_T 8 +# define CURL_OFF_T __int64 +# define CURL_FMT_OFF_T "I64d" +# define CURL_FMT_OFF_TU "I64u" +# define CURL_FORMAT_OFF_T "%I64d" +# define CURL_SIZEOF_CURL_OFF_T 8 +# define CURL_SUFFIX_CURL_OFF_T i64 +# define CURL_SUFFIX_CURL_OFF_TU ui64 # else -# define CURL_OFF_T long long -# define CURL_FMT_OFF_T "lld" -# define CURL_FMT_OFF_TU "llu" -# define CURL_FORMAT_OFF_T "%lld" -# define CURL_SIZEOF_CURL_OFF_T 8 +# define CURL_OFF_T long long +# define CURL_FMT_OFF_T "lld" +# define CURL_FMT_OFF_TU "llu" +# define CURL_FORMAT_OFF_T "%lld" +# define CURL_SIZEOF_CURL_OFF_T 8 +# define CURL_SUFFIX_CURL_OFF_T LL +# define CURL_SUFFIX_CURL_OFF_TU uLL # endif #elif defined(__LCC__) -# define CURL_OFF_T long -# define CURL_FMT_OFF_T "ld" -# define CURL_FMT_OFF_TU "lu" -# define CURL_FORMAT_OFF_T "%ld" -# define CURL_SIZEOF_CURL_OFF_T 4 +# define CURL_OFF_T long +# define CURL_FMT_OFF_T "ld" +# define CURL_FMT_OFF_TU "lu" +# define CURL_FORMAT_OFF_T "%ld" +# define CURL_SIZEOF_CURL_OFF_T 4 +# define CURL_SUFFIX_CURL_OFF_T L +# define CURL_SUFFIX_CURL_OFF_TU uL #elif defined(__SYMBIAN32__) # if defined(__GCC32__) -# define CURL_OFF_T long long -# define CURL_FMT_OFF_T "lld" -# define CURL_FMT_OFF_TU "llu" -# define CURL_FORMAT_OFF_T "%lld" -# define CURL_SIZEOF_CURL_OFF_T 8 +# define CURL_OFF_T long long +# define CURL_FMT_OFF_T "lld" +# define CURL_FMT_OFF_TU "llu" +# define CURL_FORMAT_OFF_T "%lld" +# define CURL_SIZEOF_CURL_OFF_T 8 +# define CURL_SUFFIX_CURL_OFF_T LL +# define CURL_SUFFIX_CURL_OFF_TU uLL # elif defined(__CW32__) # pragma longlong on -# define CURL_OFF_T long long -# define CURL_FMT_OFF_T "lld" -# define CURL_FMT_OFF_TU "llu" -# define CURL_FORMAT_OFF_T "%lld" -# define CURL_SIZEOF_CURL_OFF_T 8 +# define CURL_OFF_T long long +# define CURL_FMT_OFF_T "lld" +# define CURL_FMT_OFF_TU "llu" +# define CURL_FORMAT_OFF_T "%lld" +# define CURL_SIZEOF_CURL_OFF_T 8 +# define CURL_SUFFIX_CURL_OFF_T LL +# define CURL_SUFFIX_CURL_OFF_TU uLL # elif defined(__VC32__) -# define CURL_OFF_T __int64 -# define CURL_FMT_OFF_T "lld" -# define CURL_FMT_OFF_TU "llu" -# define CURL_FORMAT_OFF_T "%lld" -# define CURL_SIZEOF_CURL_OFF_T 8 +# define CURL_OFF_T __int64 +# define CURL_FMT_OFF_T "lld" +# define CURL_FMT_OFF_TU "llu" +# define CURL_FORMAT_OFF_T "%lld" +# define CURL_SIZEOF_CURL_OFF_T 8 +# define CURL_SUFFIX_CURL_OFF_T LL +# define CURL_SUFFIX_CURL_OFF_TU uLL # endif #elif defined(__MWERKS__) -# define CURL_OFF_T long long -# define CURL_FMT_OFF_T "lld" -# define CURL_FMT_OFF_TU "llu" -# define CURL_FORMAT_OFF_T "%lld" -# define CURL_SIZEOF_CURL_OFF_T 8 +# define CURL_OFF_T long long +# define CURL_FMT_OFF_T "lld" +# define CURL_FMT_OFF_TU "llu" +# define CURL_FORMAT_OFF_T "%lld" +# define CURL_SIZEOF_CURL_OFF_T 8 +# define CURL_SUFFIX_CURL_OFF_T LL +# define CURL_SUFFIX_CURL_OFF_TU uLL #elif defined(_WIN32_WCE) -# define CURL_OFF_T __int64 -# define CURL_FMT_OFF_T "I64d" -# define CURL_FMT_OFF_TU "I64u" -# define CURL_FORMAT_OFF_T "%I64d" -# define CURL_SIZEOF_CURL_OFF_T 8 +# define CURL_OFF_T __int64 +# define CURL_FMT_OFF_T "I64d" +# define CURL_FMT_OFF_TU "I64u" +# define CURL_FORMAT_OFF_T "%I64d" +# define CURL_SIZEOF_CURL_OFF_T 8 +# define CURL_SUFFIX_CURL_OFF_T i64 +# define CURL_SUFFIX_CURL_OFF_TU ui64 #elif defined(__MINGW32__) -# define CURL_OFF_T long long -# define CURL_FMT_OFF_T "I64d" -# define CURL_FMT_OFF_TU "I64u" -# define CURL_FORMAT_OFF_T "%I64d" -# define CURL_SIZEOF_CURL_OFF_T 8 +# define CURL_OFF_T long long +# define CURL_FMT_OFF_T "I64d" +# define CURL_FMT_OFF_TU "I64u" +# define CURL_FORMAT_OFF_T "%I64d" +# define CURL_SIZEOF_CURL_OFF_T 8 +# define CURL_SUFFIX_CURL_OFF_T i64 +# define CURL_SUFFIX_CURL_OFF_TU ui64 #elif defined(_MSC_VER) # if (_MSC_VER >= 900) -# define CURL_OFF_T __int64 -# define CURL_FMT_OFF_T "I64d" -# define CURL_FMT_OFF_TU "I64u" -# define CURL_FORMAT_OFF_T "%I64d" -# define CURL_SIZEOF_CURL_OFF_T 8 +# define CURL_OFF_T __int64 +# define CURL_FMT_OFF_T "I64d" +# define CURL_FMT_OFF_TU "I64u" +# define CURL_FORMAT_OFF_T "%I64d" +# define CURL_SIZEOF_CURL_OFF_T 8 +# define CURL_SUFFIX_CURL_OFF_T i64 +# define CURL_SUFFIX_CURL_OFF_TU ui64 # else -# define CURL_OFF_T long -# define CURL_FMT_OFF_T "ld" -# define CURL_FMT_OFF_TU "lu" -# define CURL_FORMAT_OFF_T "%ld" -# define CURL_SIZEOF_CURL_OFF_T 4 +# define CURL_OFF_T long +# define CURL_FMT_OFF_T "ld" +# define CURL_FMT_OFF_TU "lu" +# define CURL_FORMAT_OFF_T "%ld" +# define CURL_SIZEOF_CURL_OFF_T 4 +# define CURL_SUFFIX_CURL_OFF_T L +# define CURL_SUFFIX_CURL_OFF_TU uL # endif #elif defined(__VMS) # if defined(__alpha) || defined(__ia64) -# define CURL_OFF_T long long -# define CURL_FMT_OFF_T "lld" -# define CURL_FMT_OFF_TU "llu" -# define CURL_FORMAT_OFF_T "%lld" -# define CURL_SIZEOF_CURL_OFF_T 8 +# define CURL_OFF_T long long +# define CURL_FMT_OFF_T "lld" +# define CURL_FMT_OFF_TU "llu" +# define CURL_FORMAT_OFF_T "%lld" +# define CURL_SIZEOF_CURL_OFF_T 8 +# define CURL_SUFFIX_CURL_OFF_T LL +# define CURL_SUFFIX_CURL_OFF_TU uLL # else -# define CURL_OFF_T long -# define CURL_FMT_OFF_T "ld" -# define CURL_FMT_OFF_TU "lu" -# define CURL_FORMAT_OFF_T "%ld" -# define CURL_SIZEOF_CURL_OFF_T 4 +# define CURL_OFF_T long +# define CURL_FMT_OFF_T "ld" +# define CURL_FMT_OFF_TU "lu" +# define CURL_FORMAT_OFF_T "%ld" +# define CURL_SIZEOF_CURL_OFF_T 4 +# define CURL_SUFFIX_CURL_OFF_T L +# define CURL_SUFFIX_CURL_OFF_TU uL # endif #elif defined(__OS400__) # if defined(__ILEC400__) -# define CURL_OFF_T long long -# define CURL_FMT_OFF_T "lld" -# define CURL_FMT_OFF_TU "llu" -# define CURL_FORMAT_OFF_T "%lld" -# define CURL_SIZEOF_CURL_OFF_T 8 +# define CURL_OFF_T long long +# define CURL_FMT_OFF_T "lld" +# define CURL_FMT_OFF_TU "llu" +# define CURL_FORMAT_OFF_T "%lld" +# define CURL_SIZEOF_CURL_OFF_T 8 +# define CURL_SUFFIX_CURL_OFF_T LL +# define CURL_SUFFIX_CURL_OFF_TU uLL # endif #elif defined(__MVS__) # if defined(__IBMC__) || defined(__IBMCPP__) # if defined(_LONG_LONG) -# define CURL_OFF_T long long -# define CURL_FMT_OFF_T "lld" -# define CURL_FMT_OFF_TU "llu" -# define CURL_FORMAT_OFF_T "%lld" -# define CURL_SIZEOF_CURL_OFF_T 8 +# define CURL_OFF_T long long +# define CURL_FMT_OFF_T "lld" +# define CURL_FMT_OFF_TU "llu" +# define CURL_FORMAT_OFF_T "%lld" +# define CURL_SIZEOF_CURL_OFF_T 8 +# define CURL_SUFFIX_CURL_OFF_T LL +# define CURL_SUFFIX_CURL_OFF_TU uLL # elif defined(_LP64) -# define CURL_OFF_T long -# define CURL_FMT_OFF_T "ld" -# define CURL_FMT_OFF_TU "lu" -# define CURL_FORMAT_OFF_T "%ld" -# define CURL_SIZEOF_CURL_OFF_T 8 +# define CURL_OFF_T long +# define CURL_FMT_OFF_T "ld" +# define CURL_FMT_OFF_TU "lu" +# define CURL_FORMAT_OFF_T "%ld" +# define CURL_SIZEOF_CURL_OFF_T 8 +# define CURL_SUFFIX_CURL_OFF_T L +# define CURL_SUFFIX_CURL_OFF_TU uL # else -# define CURL_OFF_T long -# define CURL_FMT_OFF_T "ld" -# define CURL_FMT_OFF_TU "lu" -# define CURL_FORMAT_OFF_T "%ld" -# define CURL_SIZEOF_CURL_OFF_T 4 +# define CURL_OFF_T long +# define CURL_FMT_OFF_T "ld" +# define CURL_FMT_OFF_TU "lu" +# define CURL_FORMAT_OFF_T "%ld" +# define CURL_SIZEOF_CURL_OFF_T 4 +# define CURL_SUFFIX_CURL_OFF_T L +# define CURL_SUFFIX_CURL_OFF_TU uL # endif # endif #elif defined(__370__) # if defined(__IBMC__) || defined(__IBMCPP__) # if defined(_LONG_LONG) -# define CURL_OFF_T long long -# define CURL_FMT_OFF_T "lld" -# define CURL_FMT_OFF_TU "llu" -# define CURL_FORMAT_OFF_T "%lld" -# define CURL_SIZEOF_CURL_OFF_T 8 +# define CURL_OFF_T long long +# define CURL_FMT_OFF_T "lld" +# define CURL_FMT_OFF_TU "llu" +# define CURL_FORMAT_OFF_T "%lld" +# define CURL_SIZEOF_CURL_OFF_T 8 +# define CURL_SUFFIX_CURL_OFF_T LL +# define CURL_SUFFIX_CURL_OFF_TU uLL # elif defined(_LP64) -# define CURL_OFF_T long -# define CURL_FMT_OFF_T "ld" -# define CURL_FMT_OFF_TU "lu" -# define CURL_FORMAT_OFF_T "%ld" -# define CURL_SIZEOF_CURL_OFF_T 8 +# define CURL_OFF_T long +# define CURL_FMT_OFF_T "ld" +# define CURL_FMT_OFF_TU "lu" +# define CURL_FORMAT_OFF_T "%ld" +# define CURL_SIZEOF_CURL_OFF_T 8 +# define CURL_SUFFIX_CURL_OFF_T L +# define CURL_SUFFIX_CURL_OFF_TU uL # else -# define CURL_OFF_T long -# define CURL_FMT_OFF_T "ld" -# define CURL_FMT_OFF_TU "lu" -# define CURL_FORMAT_OFF_T "%ld" -# define CURL_SIZEOF_CURL_OFF_T 4 +# define CURL_OFF_T long +# define CURL_FMT_OFF_T "ld" +# define CURL_FMT_OFF_TU "lu" +# define CURL_FORMAT_OFF_T "%ld" +# define CURL_SIZEOF_CURL_OFF_T 4 +# define CURL_SUFFIX_CURL_OFF_T L +# define CURL_SUFFIX_CURL_OFF_TU uL # endif # endif @@ -351,17 +407,21 @@ #elif defined(__GNUC__) # if defined(__i386__) -# define CURL_OFF_T long long -# define CURL_FMT_OFF_T "lld" -# define CURL_FMT_OFF_TU "llu" -# define CURL_FORMAT_OFF_T "%lld" -# define CURL_SIZEOF_CURL_OFF_T 8 +# define CURL_OFF_T long long +# define CURL_FMT_OFF_T "lld" +# define CURL_FMT_OFF_TU "llu" +# define CURL_FORMAT_OFF_T "%lld" +# define CURL_SIZEOF_CURL_OFF_T 8 +# define CURL_SUFFIX_CURL_OFF_T LL +# define CURL_SUFFIX_CURL_OFF_TU uLL # elif defined(__x86_64__) -# define CURL_OFF_T long -# define CURL_FMT_OFF_T "ld" -# define CURL_FMT_OFF_TU "lu" -# define CURL_FORMAT_OFF_T "%ld" -# define CURL_SIZEOF_CURL_OFF_T 8 +# define CURL_OFF_T long +# define CURL_FMT_OFF_T "ld" +# define CURL_FMT_OFF_TU "lu" +# define CURL_FORMAT_OFF_T "%ld" +# define CURL_SIZEOF_CURL_OFF_T 8 +# define CURL_SUFFIX_CURL_OFF_T L +# define CURL_SUFFIX_CURL_OFF_TU uL # endif #else diff --git a/include/curl/curlbuild.h.in b/include/curl/curlbuild.h.in index cc4d77eb8..7ed27f7a7 100644 --- a/include/curl/curlbuild.h.in +++ b/include/curl/curlbuild.h.in @@ -126,4 +126,10 @@ typedef CURL_OFF_T curl_off_t; /* The expected size of curl_off_t, as to be computed by sizeof. */ #undef CURL_SIZEOF_CURL_OFF_T +/* curl_off_t constant suffix. */ +#undef CURL_SUFFIX_CURL_OFF_T + +/* unsigned curl_off_t constant suffix. */ +#undef CURL_SUFFIX_CURL_OFF_TU + #endif /* __CURL_CURLBUILD_H */ -- cgit v1.2.1 From ca5e38751c65c29bc94616a86e8d3d6affb8f053 Mon Sep 17 00:00:00 2001 From: Yang Tse Date: Mon, 11 Aug 2008 19:00:26 +0000 Subject: Ooops --- include/curl/curlbuild.h.dist | 48 +++++++++++++++++++++---------------------- 1 file changed, 24 insertions(+), 24 deletions(-) (limited to 'include') diff --git a/include/curl/curlbuild.h.dist b/include/curl/curlbuild.h.dist index e622e5bac..6d87d29f0 100644 --- a/include/curl/curlbuild.h.dist +++ b/include/curl/curlbuild.h.dist @@ -145,7 +145,7 @@ # define CURL_FORMAT_OFF_T "%ld" # define CURL_SIZEOF_CURL_OFF_T 4 # define CURL_SUFFIX_CURL_OFF_T L -# define CURL_SUFFIX_CURL_OFF_TU uL +# define CURL_SUFFIX_CURL_OFF_TU UL #elif defined(__SALFORDC__) # define CURL_OFF_T long @@ -154,7 +154,7 @@ # define CURL_FORMAT_OFF_T "%ld" # define CURL_SIZEOF_CURL_OFF_T 4 # define CURL_SUFFIX_CURL_OFF_T L -# define CURL_SUFFIX_CURL_OFF_TU uL +# define CURL_SUFFIX_CURL_OFF_TU UL #elif defined(__BORLANDC__) # if (__BORLANDC__ < 0x520) @@ -164,7 +164,7 @@ # define CURL_FORMAT_OFF_T "%ld" # define CURL_SIZEOF_CURL_OFF_T 4 # define CURL_SUFFIX_CURL_OFF_T L -# define CURL_SUFFIX_CURL_OFF_TU uL +# define CURL_SUFFIX_CURL_OFF_TU UL # else # define CURL_OFF_T __int64 # define CURL_FMT_OFF_T "I64d" @@ -182,7 +182,7 @@ # define CURL_FORMAT_OFF_T "%ld" # define CURL_SIZEOF_CURL_OFF_T 4 # define CURL_SUFFIX_CURL_OFF_T L -# define CURL_SUFFIX_CURL_OFF_TU uL +# define CURL_SUFFIX_CURL_OFF_TU UL #elif defined(__WATCOMC__) # if defined(__386__) @@ -200,7 +200,7 @@ # define CURL_FORMAT_OFF_T "%ld" # define CURL_SIZEOF_CURL_OFF_T 4 # define CURL_SUFFIX_CURL_OFF_T L -# define CURL_SUFFIX_CURL_OFF_TU uL +# define CURL_SUFFIX_CURL_OFF_TU UL # endif #elif defined(__POCC__) @@ -211,7 +211,7 @@ # define CURL_FORMAT_OFF_T "%ld" # define CURL_SIZEOF_CURL_OFF_T 4 # define CURL_SUFFIX_CURL_OFF_T L -# define CURL_SUFFIX_CURL_OFF_TU uL +# define CURL_SUFFIX_CURL_OFF_TU UL # elif defined(_MSC_VER) # define CURL_OFF_T __int64 # define CURL_FMT_OFF_T "I64d" @@ -227,7 +227,7 @@ # define CURL_FORMAT_OFF_T "%lld" # define CURL_SIZEOF_CURL_OFF_T 8 # define CURL_SUFFIX_CURL_OFF_T LL -# define CURL_SUFFIX_CURL_OFF_TU uLL +# define CURL_SUFFIX_CURL_OFF_TU ULL # endif #elif defined(__LCC__) @@ -237,7 +237,7 @@ # define CURL_FORMAT_OFF_T "%ld" # define CURL_SIZEOF_CURL_OFF_T 4 # define CURL_SUFFIX_CURL_OFF_T L -# define CURL_SUFFIX_CURL_OFF_TU uL +# define CURL_SUFFIX_CURL_OFF_TU UL #elif defined(__SYMBIAN32__) # if defined(__GCC32__) @@ -247,7 +247,7 @@ # define CURL_FORMAT_OFF_T "%lld" # define CURL_SIZEOF_CURL_OFF_T 8 # define CURL_SUFFIX_CURL_OFF_T LL -# define CURL_SUFFIX_CURL_OFF_TU uLL +# define CURL_SUFFIX_CURL_OFF_TU ULL # elif defined(__CW32__) # pragma longlong on # define CURL_OFF_T long long @@ -256,7 +256,7 @@ # define CURL_FORMAT_OFF_T "%lld" # define CURL_SIZEOF_CURL_OFF_T 8 # define CURL_SUFFIX_CURL_OFF_T LL -# define CURL_SUFFIX_CURL_OFF_TU uLL +# define CURL_SUFFIX_CURL_OFF_TU ULL # elif defined(__VC32__) # define CURL_OFF_T __int64 # define CURL_FMT_OFF_T "lld" @@ -264,7 +264,7 @@ # define CURL_FORMAT_OFF_T "%lld" # define CURL_SIZEOF_CURL_OFF_T 8 # define CURL_SUFFIX_CURL_OFF_T LL -# define CURL_SUFFIX_CURL_OFF_TU uLL +# define CURL_SUFFIX_CURL_OFF_TU ULL # endif #elif defined(__MWERKS__) @@ -274,7 +274,7 @@ # define CURL_FORMAT_OFF_T "%lld" # define CURL_SIZEOF_CURL_OFF_T 8 # define CURL_SUFFIX_CURL_OFF_T LL -# define CURL_SUFFIX_CURL_OFF_TU uLL +# define CURL_SUFFIX_CURL_OFF_TU ULL #elif defined(_WIN32_WCE) # define CURL_OFF_T __int64 @@ -310,7 +310,7 @@ # define CURL_FORMAT_OFF_T "%ld" # define CURL_SIZEOF_CURL_OFF_T 4 # define CURL_SUFFIX_CURL_OFF_T L -# define CURL_SUFFIX_CURL_OFF_TU uL +# define CURL_SUFFIX_CURL_OFF_TU UL # endif #elif defined(__VMS) @@ -321,7 +321,7 @@ # define CURL_FORMAT_OFF_T "%lld" # define CURL_SIZEOF_CURL_OFF_T 8 # define CURL_SUFFIX_CURL_OFF_T LL -# define CURL_SUFFIX_CURL_OFF_TU uLL +# define CURL_SUFFIX_CURL_OFF_TU ULL # else # define CURL_OFF_T long # define CURL_FMT_OFF_T "ld" @@ -329,7 +329,7 @@ # define CURL_FORMAT_OFF_T "%ld" # define CURL_SIZEOF_CURL_OFF_T 4 # define CURL_SUFFIX_CURL_OFF_T L -# define CURL_SUFFIX_CURL_OFF_TU uL +# define CURL_SUFFIX_CURL_OFF_TU UL # endif #elif defined(__OS400__) @@ -340,7 +340,7 @@ # define CURL_FORMAT_OFF_T "%lld" # define CURL_SIZEOF_CURL_OFF_T 8 # define CURL_SUFFIX_CURL_OFF_T LL -# define CURL_SUFFIX_CURL_OFF_TU uLL +# define CURL_SUFFIX_CURL_OFF_TU ULL # endif #elif defined(__MVS__) @@ -352,7 +352,7 @@ # define CURL_FORMAT_OFF_T "%lld" # define CURL_SIZEOF_CURL_OFF_T 8 # define CURL_SUFFIX_CURL_OFF_T LL -# define CURL_SUFFIX_CURL_OFF_TU uLL +# define CURL_SUFFIX_CURL_OFF_TU ULL # elif defined(_LP64) # define CURL_OFF_T long # define CURL_FMT_OFF_T "ld" @@ -360,7 +360,7 @@ # define CURL_FORMAT_OFF_T "%ld" # define CURL_SIZEOF_CURL_OFF_T 8 # define CURL_SUFFIX_CURL_OFF_T L -# define CURL_SUFFIX_CURL_OFF_TU uL +# define CURL_SUFFIX_CURL_OFF_TU UL # else # define CURL_OFF_T long # define CURL_FMT_OFF_T "ld" @@ -368,7 +368,7 @@ # define CURL_FORMAT_OFF_T "%ld" # define CURL_SIZEOF_CURL_OFF_T 4 # define CURL_SUFFIX_CURL_OFF_T L -# define CURL_SUFFIX_CURL_OFF_TU uL +# define CURL_SUFFIX_CURL_OFF_TU UL # endif # endif @@ -381,7 +381,7 @@ # define CURL_FORMAT_OFF_T "%lld" # define CURL_SIZEOF_CURL_OFF_T 8 # define CURL_SUFFIX_CURL_OFF_T LL -# define CURL_SUFFIX_CURL_OFF_TU uLL +# define CURL_SUFFIX_CURL_OFF_TU ULL # elif defined(_LP64) # define CURL_OFF_T long # define CURL_FMT_OFF_T "ld" @@ -389,7 +389,7 @@ # define CURL_FORMAT_OFF_T "%ld" # define CURL_SIZEOF_CURL_OFF_T 8 # define CURL_SUFFIX_CURL_OFF_T L -# define CURL_SUFFIX_CURL_OFF_TU uL +# define CURL_SUFFIX_CURL_OFF_TU UL # else # define CURL_OFF_T long # define CURL_FMT_OFF_T "ld" @@ -397,7 +397,7 @@ # define CURL_FORMAT_OFF_T "%ld" # define CURL_SIZEOF_CURL_OFF_T 4 # define CURL_SUFFIX_CURL_OFF_T L -# define CURL_SUFFIX_CURL_OFF_TU uL +# define CURL_SUFFIX_CURL_OFF_TU UL # endif # endif @@ -413,7 +413,7 @@ # define CURL_FORMAT_OFF_T "%lld" # define CURL_SIZEOF_CURL_OFF_T 8 # define CURL_SUFFIX_CURL_OFF_T LL -# define CURL_SUFFIX_CURL_OFF_TU uLL +# define CURL_SUFFIX_CURL_OFF_TU ULL # elif defined(__x86_64__) # define CURL_OFF_T long # define CURL_FMT_OFF_T "ld" @@ -421,7 +421,7 @@ # define CURL_FORMAT_OFF_T "%ld" # define CURL_SIZEOF_CURL_OFF_T 8 # define CURL_SUFFIX_CURL_OFF_T L -# define CURL_SUFFIX_CURL_OFF_TU uL +# define CURL_SUFFIX_CURL_OFF_TU UL # endif #else -- cgit v1.2.1 From 60a3773c50671079709f7711180358cb97476344 Mon Sep 17 00:00:00 2001 From: Yang Tse Date: Tue, 12 Aug 2008 03:00:24 +0000 Subject: Added macros for minimum-width signed and unsigned curl_off_t integer constants CURL_OFF_T_C and CURL_OFF_TU_C. The clever double helper macro used internally to provide its functionality is thanks to Lars Nilsson. --- include/curl/curl.h | 17 ---------------- include/curl/curlrules.h | 53 ++++++++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 53 insertions(+), 17 deletions(-) (limited to 'include') diff --git a/include/curl/curl.h b/include/curl/curl.h index 9dd54ff69..0aaad88fa 100644 --- a/include/curl/curl.h +++ b/include/curl/curl.h @@ -548,23 +548,6 @@ typedef enum { #ifdef CINIT #undef CINIT #endif -/* - * Figure out if we can use the ## operator, which is supported by ISO/ANSI C - * and C++. Some compilers support it without setting __STDC__ or __cplusplus - * so we need to carefully check for them too. We don't use configure-checks - * for these since we want these headers to remain generic and working for all - * platforms. - */ -#if defined(__STDC__) || defined(_MSC_VER) || defined(__cplusplus) || \ - defined(__HP_aCC) || defined(__BORLANDC__) || defined(__LCC__) || \ - defined(__POCC__) || defined(__SALFORDC__) || defined(__HIGHC__) || \ - defined(__ILEC400__) - /* This compiler is believed to have an ISO compatible preprocessor */ -#define CURL_ISOCPP -#else - /* This compiler is believed NOT to have an ISO compatible preprocessor */ -#undef CURL_ISOCPP -#endif #ifdef CURL_ISOCPP #define CINIT(name,type,number) CURLOPT_ ## name = CURLOPTTYPE_ ## type + number diff --git a/include/curl/curlrules.h b/include/curl/curlrules.h index 56499f9a2..cda33b21b 100644 --- a/include/curl/curlrules.h +++ b/include/curl/curlrules.h @@ -101,6 +101,16 @@ Error Compilation_aborted_CURL_SIZEOF_CURL_OFF_T_is_missing #endif +#ifndef CURL_SUFFIX_CURL_OFF_T +# error "CURL_SUFFIX_CURL_OFF_T definition is missing!" + Error Compilation_aborted_CURL_SUFFIX_CURL_OFF_T_is_missing +#endif + +#ifndef CURL_SUFFIX_CURL_OFF_TU +# error "CURL_SUFFIX_CURL_OFF_TU definition is missing!" + Error Compilation_aborted_CURL_SUFFIX_CURL_OFF_TU_is_missing +#endif + /* * Macros private to this header file. */ @@ -129,6 +139,49 @@ typedef char __curl_rule_02__ [CurlchkszGE(curl_off_t, long)]; +/* ================================================================ */ +/* EXTERNALLY AND INTERNALLY VISIBLE DEFINITIONS */ +/* ================================================================ */ + +/* + * CURL_ISOCPP and CURL_OFF_T_C definitions are done here in order to allow + * these to be visible and exported by the external libcurl interface API, + * while also making them visible to the library internals, simply including + * setup.h, without actually needing to include curl.h internally. + * If some day this section would grow big enough, all this should be moved + * to its own header file. + */ + +/* + * Figure out if we can use the ## preprocessor operator, which is supported + * by ISO/ANSI C and C++. Some compilers support it without setting __STDC__ + * or __cplusplus so we need to carefully check for them too. + */ + +#if defined(__STDC__) || defined(_MSC_VER) || defined(__cplusplus) || \ + defined(__HP_aCC) || defined(__BORLANDC__) || defined(__LCC__) || \ + defined(__POCC__) || defined(__SALFORDC__) || defined(__HIGHC__) || \ + defined(__ILEC400__) + /* This compiler is believed to have an ISO compatible preprocessor */ +#define CURL_ISOCPP +#else + /* This compiler is believed NOT to have an ISO compatible preprocessor */ +#undef CURL_ISOCPP +#endif + +/* + * Macros for minimum-width signed and unsigned curl_off_t integer constants. + */ + +#ifdef CURL_ISOCPP +# define __CURL_OFF_T_C_HELPER2(Val,Suffix) Val ## Suffix +#else +# define __CURL_OFF_T_C_HELPER2(Val,Suffix) Val/**/Suffix +#endif +#define __CURL_OFF_T_C_HELPER1(Val,Suffix) __CURL_OFF_T_C_HELPER2(Val,Suffix) +#define CURL_OFF_T_C(Val) __CURL_OFF_T_C_HELPER1(Val,CURL_SUFFIX_CURL_OFF_T) +#define CURL_OFF_TU_C(Val) __CURL_OFF_T_C_HELPER1(Val,CURL_SUFFIX_CURL_OFF_TU) + /* * Get rid of macros private to this header file. */ -- cgit v1.2.1 From b55b0258e074263a88d1b6839c974ac5d58968d1 Mon Sep 17 00:00:00 2001 From: Gisle Vanem Date: Wed, 13 Aug 2008 07:16:20 +0000 Subject: MingW uses gcc. Hence the suffixes for 64-bit are 'LL' and 'ULL'. --- include/curl/curlbuild.h.dist | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'include') diff --git a/include/curl/curlbuild.h.dist b/include/curl/curlbuild.h.dist index 6d87d29f0..06e06adef 100644 --- a/include/curl/curlbuild.h.dist +++ b/include/curl/curlbuild.h.dist @@ -31,7 +31,7 @@ * NOTE 1: * ------- * - * See file include/curl/curlbuild.h.in, run configure, and forget + * See file include/curl/curlbuild.h.in, run configure, and forget * that this file exists it is only used for non-configure systems. * But you can keep reading if you want ;-) * @@ -230,7 +230,7 @@ # define CURL_SUFFIX_CURL_OFF_TU ULL # endif -#elif defined(__LCC__) +#elif defined(__LCC__) # define CURL_OFF_T long # define CURL_FMT_OFF_T "ld" # define CURL_FMT_OFF_TU "lu" @@ -291,8 +291,8 @@ # define CURL_FMT_OFF_TU "I64u" # define CURL_FORMAT_OFF_T "%I64d" # define CURL_SIZEOF_CURL_OFF_T 8 -# define CURL_SUFFIX_CURL_OFF_T i64 -# define CURL_SUFFIX_CURL_OFF_TU ui64 +# define CURL_SUFFIX_CURL_OFF_T LL +# define CURL_SUFFIX_CURL_OFF_TU ULL #elif defined(_MSC_VER) # if (_MSC_VER >= 900) -- cgit v1.2.1 From 9a9041f1ce9563e95feec88749933398fe541f7b Mon Sep 17 00:00:00 2001 From: Gisle Vanem Date: Wed, 13 Aug 2008 08:32:22 +0000 Subject: Watcom doesn't have . --- include/curl/curl.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'include') diff --git a/include/curl/curl.h b/include/curl/curl.h index 0aaad88fa..b7555e0be 100644 --- a/include/curl/curl.h +++ b/include/curl/curl.h @@ -77,7 +77,7 @@ #ifndef _WIN32_WCE #include #endif -#if !defined(WIN32) || !defined(__WATCOMC__) +#if !defined(WIN32) && !defined(__WATCOMC__) #include #endif #include -- cgit v1.2.1 From feb03e471786e9c543ef6e807a4a748046c0ce2b Mon Sep 17 00:00:00 2001 From: Yang Tse Date: Wed, 13 Aug 2008 15:32:20 +0000 Subject: The size of long is a build time characteristic and as such it is now recorded in curlbuild.h as CURL_SIZEOF_LONG. Definition now done from configure process and in CVS curlbuild.h.dist for non-configure systems. --- include/curl/curlbuild.h.dist | 72 +++++++++++++++++++++++++++++++------------ include/curl/curlbuild.h.in | 3 ++ include/curl/curlrules.h | 18 +++++++++-- 3 files changed, 72 insertions(+), 21 deletions(-) (limited to 'include') diff --git a/include/curl/curlbuild.h.dist b/include/curl/curlbuild.h.dist index 06e06adef..7dd26a698 100644 --- a/include/curl/curlbuild.h.dist +++ b/include/curl/curlbuild.h.dist @@ -139,6 +139,7 @@ /* ================================================================ */ #if defined(__DJGPP__) +# define CURL_SIZEOF_LONG 4 # define CURL_OFF_T long # define CURL_FMT_OFF_T "ld" # define CURL_FMT_OFF_TU "lu" @@ -148,6 +149,7 @@ # define CURL_SUFFIX_CURL_OFF_TU UL #elif defined(__SALFORDC__) +# define CURL_SIZEOF_LONG 4 # define CURL_OFF_T long # define CURL_FMT_OFF_T "ld" # define CURL_FMT_OFF_TU "lu" @@ -158,6 +160,7 @@ #elif defined(__BORLANDC__) # if (__BORLANDC__ < 0x520) +# define CURL_SIZEOF_LONG 4 # define CURL_OFF_T long # define CURL_FMT_OFF_T "ld" # define CURL_FMT_OFF_TU "lu" @@ -166,6 +169,7 @@ # define CURL_SUFFIX_CURL_OFF_T L # define CURL_SUFFIX_CURL_OFF_TU UL # else +# define CURL_SIZEOF_LONG 4 # define CURL_OFF_T __int64 # define CURL_FMT_OFF_T "I64d" # define CURL_FMT_OFF_TU "I64u" @@ -176,6 +180,7 @@ # endif #elif defined(__TURBOC__) +# define CURL_SIZEOF_LONG 4 # define CURL_OFF_T long # define CURL_FMT_OFF_T "ld" # define CURL_FMT_OFF_TU "lu" @@ -186,6 +191,7 @@ #elif defined(__WATCOMC__) # if defined(__386__) +# define CURL_SIZEOF_LONG 4 # define CURL_OFF_T __int64 # define CURL_FMT_OFF_T "I64d" # define CURL_FMT_OFF_TU "I64u" @@ -194,6 +200,7 @@ # define CURL_SUFFIX_CURL_OFF_T i64 # define CURL_SUFFIX_CURL_OFF_TU ui64 # else +# define CURL_SIZEOF_LONG 4 # define CURL_OFF_T long # define CURL_FMT_OFF_T "ld" # define CURL_FMT_OFF_TU "lu" @@ -205,6 +212,7 @@ #elif defined(__POCC__) # if (__POCC__ < 280) +# define CURL_SIZEOF_LONG 4 # define CURL_OFF_T long # define CURL_FMT_OFF_T "ld" # define CURL_FMT_OFF_TU "lu" @@ -213,6 +221,7 @@ # define CURL_SUFFIX_CURL_OFF_T L # define CURL_SUFFIX_CURL_OFF_TU UL # elif defined(_MSC_VER) +# define CURL_SIZEOF_LONG 4 # define CURL_OFF_T __int64 # define CURL_FMT_OFF_T "I64d" # define CURL_FMT_OFF_TU "I64u" @@ -221,6 +230,7 @@ # define CURL_SUFFIX_CURL_OFF_T i64 # define CURL_SUFFIX_CURL_OFF_TU ui64 # else +# define CURL_SIZEOF_LONG 4 # define CURL_OFF_T long long # define CURL_FMT_OFF_T "lld" # define CURL_FMT_OFF_TU "llu" @@ -231,6 +241,7 @@ # endif #elif defined(__LCC__) +# define CURL_SIZEOF_LONG 4 # define CURL_OFF_T long # define CURL_FMT_OFF_T "ld" # define CURL_FMT_OFF_TU "lu" @@ -241,6 +252,7 @@ #elif defined(__SYMBIAN32__) # if defined(__GCC32__) +# define CURL_SIZEOF_LONG 4 # define CURL_OFF_T long long # define CURL_FMT_OFF_T "lld" # define CURL_FMT_OFF_TU "llu" @@ -250,6 +262,7 @@ # define CURL_SUFFIX_CURL_OFF_TU ULL # elif defined(__CW32__) # pragma longlong on +# define CURL_SIZEOF_LONG 4 # define CURL_OFF_T long long # define CURL_FMT_OFF_T "lld" # define CURL_FMT_OFF_TU "llu" @@ -258,6 +271,7 @@ # define CURL_SUFFIX_CURL_OFF_T LL # define CURL_SUFFIX_CURL_OFF_TU ULL # elif defined(__VC32__) +# define CURL_SIZEOF_LONG 4 # define CURL_OFF_T __int64 # define CURL_FMT_OFF_T "lld" # define CURL_FMT_OFF_TU "llu" @@ -268,6 +282,7 @@ # endif #elif defined(__MWERKS__) +# define CURL_SIZEOF_LONG 4 # define CURL_OFF_T long long # define CURL_FMT_OFF_T "lld" # define CURL_FMT_OFF_TU "llu" @@ -277,6 +292,7 @@ # define CURL_SUFFIX_CURL_OFF_TU ULL #elif defined(_WIN32_WCE) +# define CURL_SIZEOF_LONG 4 # define CURL_OFF_T __int64 # define CURL_FMT_OFF_T "I64d" # define CURL_FMT_OFF_TU "I64u" @@ -286,6 +302,7 @@ # define CURL_SUFFIX_CURL_OFF_TU ui64 #elif defined(__MINGW32__) +# define CURL_SIZEOF_LONG 4 # define CURL_OFF_T long long # define CURL_FMT_OFF_T "I64d" # define CURL_FMT_OFF_TU "I64u" @@ -294,27 +311,9 @@ # define CURL_SUFFIX_CURL_OFF_T LL # define CURL_SUFFIX_CURL_OFF_TU ULL -#elif defined(_MSC_VER) -# if (_MSC_VER >= 900) -# define CURL_OFF_T __int64 -# define CURL_FMT_OFF_T "I64d" -# define CURL_FMT_OFF_TU "I64u" -# define CURL_FORMAT_OFF_T "%I64d" -# define CURL_SIZEOF_CURL_OFF_T 8 -# define CURL_SUFFIX_CURL_OFF_T i64 -# define CURL_SUFFIX_CURL_OFF_TU ui64 -# else -# define CURL_OFF_T long -# define CURL_FMT_OFF_T "ld" -# define CURL_FMT_OFF_TU "lu" -# define CURL_FORMAT_OFF_T "%ld" -# define CURL_SIZEOF_CURL_OFF_T 4 -# define CURL_SUFFIX_CURL_OFF_T L -# define CURL_SUFFIX_CURL_OFF_TU UL -# endif - #elif defined(__VMS) # if defined(__alpha) || defined(__ia64) +# define CURL_SIZEOF_LONG 4 # define CURL_OFF_T long long # define CURL_FMT_OFF_T "lld" # define CURL_FMT_OFF_TU "llu" @@ -323,6 +322,7 @@ # define CURL_SUFFIX_CURL_OFF_T LL # define CURL_SUFFIX_CURL_OFF_TU ULL # else +# define CURL_SIZEOF_LONG 4 # define CURL_OFF_T long # define CURL_FMT_OFF_T "ld" # define CURL_FMT_OFF_TU "lu" @@ -334,6 +334,7 @@ #elif defined(__OS400__) # if defined(__ILEC400__) +# define CURL_SIZEOF_LONG 4 # define CURL_OFF_T long long # define CURL_FMT_OFF_T "lld" # define CURL_FMT_OFF_TU "llu" @@ -346,6 +347,7 @@ #elif defined(__MVS__) # if defined(__IBMC__) || defined(__IBMCPP__) # if defined(_LONG_LONG) +# define CURL_SIZEOF_LONG 4 # define CURL_OFF_T long long # define CURL_FMT_OFF_T "lld" # define CURL_FMT_OFF_TU "llu" @@ -354,6 +356,7 @@ # define CURL_SUFFIX_CURL_OFF_T LL # define CURL_SUFFIX_CURL_OFF_TU ULL # elif defined(_LP64) +# define CURL_SIZEOF_LONG 4 # define CURL_OFF_T long # define CURL_FMT_OFF_T "ld" # define CURL_FMT_OFF_TU "lu" @@ -362,6 +365,7 @@ # define CURL_SUFFIX_CURL_OFF_T L # define CURL_SUFFIX_CURL_OFF_TU UL # else +# define CURL_SIZEOF_LONG 4 # define CURL_OFF_T long # define CURL_FMT_OFF_T "ld" # define CURL_FMT_OFF_TU "lu" @@ -375,6 +379,7 @@ #elif defined(__370__) # if defined(__IBMC__) || defined(__IBMCPP__) # if defined(_LONG_LONG) +# define CURL_SIZEOF_LONG 4 # define CURL_OFF_T long long # define CURL_FMT_OFF_T "lld" # define CURL_FMT_OFF_TU "llu" @@ -383,6 +388,7 @@ # define CURL_SUFFIX_CURL_OFF_T LL # define CURL_SUFFIX_CURL_OFF_TU ULL # elif defined(_LP64) +# define CURL_SIZEOF_LONG 4 # define CURL_OFF_T long # define CURL_FMT_OFF_T "ld" # define CURL_FMT_OFF_TU "lu" @@ -391,6 +397,7 @@ # define CURL_SUFFIX_CURL_OFF_T L # define CURL_SUFFIX_CURL_OFF_TU UL # else +# define CURL_SIZEOF_LONG 4 # define CURL_OFF_T long # define CURL_FMT_OFF_T "ld" # define CURL_FMT_OFF_TU "lu" @@ -401,12 +408,38 @@ # endif # endif +/* ===================================== */ +/* KEEP MSVC THE PENULTIMATE ENTRY */ +/* ===================================== */ + +#elif defined(_MSC_VER) +# if (_MSC_VER >= 900) +# define CURL_SIZEOF_LONG 4 +# define CURL_OFF_T __int64 +# define CURL_FMT_OFF_T "I64d" +# define CURL_FMT_OFF_TU "I64u" +# define CURL_FORMAT_OFF_T "%I64d" +# define CURL_SIZEOF_CURL_OFF_T 8 +# define CURL_SUFFIX_CURL_OFF_T i64 +# define CURL_SUFFIX_CURL_OFF_TU ui64 +# else +# define CURL_SIZEOF_LONG 4 +# define CURL_OFF_T long +# define CURL_FMT_OFF_T "ld" +# define CURL_FMT_OFF_TU "lu" +# define CURL_FORMAT_OFF_T "%ld" +# define CURL_SIZEOF_CURL_OFF_T 4 +# define CURL_SUFFIX_CURL_OFF_T L +# define CURL_SUFFIX_CURL_OFF_TU UL +# endif + /* ===================================== */ /* KEEP GENERIC GCC THE LAST ENTRY */ /* ===================================== */ #elif defined(__GNUC__) # if defined(__i386__) +# define CURL_SIZEOF_LONG 4 # define CURL_OFF_T long long # define CURL_FMT_OFF_T "lld" # define CURL_FMT_OFF_TU "llu" @@ -415,6 +448,7 @@ # define CURL_SUFFIX_CURL_OFF_T LL # define CURL_SUFFIX_CURL_OFF_TU ULL # elif defined(__x86_64__) +# define CURL_SIZEOF_LONG 8 # define CURL_OFF_T long # define CURL_FMT_OFF_T "ld" # define CURL_FMT_OFF_TU "lu" diff --git a/include/curl/curlbuild.h.in b/include/curl/curlbuild.h.in index 7ed27f7a7..e0d35a555 100644 --- a/include/curl/curlbuild.h.in +++ b/include/curl/curlbuild.h.in @@ -108,6 +108,9 @@ # include #endif +/* The expected size of long , as to be computed by sizeof. */ +#undef CURL_SIZEOF_LONG + /* Signed integral data type used for curl_off_t. */ #undef CURL_OFF_T diff --git a/include/curl/curlrules.h b/include/curl/curlrules.h index cda33b21b..4a7671fcd 100644 --- a/include/curl/curlrules.h +++ b/include/curl/curlrules.h @@ -76,6 +76,11 @@ * Verify that some macros are actually defined. */ +#ifndef CURL_SIZEOF_LONG +# error "CURL_SIZEOF_LONG definition is missing!" + Error Compilation_aborted_CURL_SIZEOF_LONG_is_missing +#endif + #ifndef CURL_OFF_T # error "CURL_OFF_T definition is missing!" Error Compilation_aborted_CURL_OFF_T_is_missing @@ -119,6 +124,15 @@ #define CurlchkszGE(t1, t2) sizeof(t1) >= sizeof(t2) ? 1 : -1 +/* + * Verify that the size previously defined and expected for long + * is the same as the one reported by sizeof() at compile time. + */ + +typedef char + __curl_rule_01__ + [CurlchkszEQ(long, CURL_SIZEOF_LONG)]; + /* * Verify that the size previously defined and expected for * curl_off_t is actually the the same as the one reported @@ -126,7 +140,7 @@ */ typedef char - __curl_rule_01__ + __curl_rule_02__ [CurlchkszEQ(curl_off_t, CURL_SIZEOF_CURL_OFF_T)]; /* @@ -136,7 +150,7 @@ typedef char */ typedef char - __curl_rule_02__ + __curl_rule_03__ [CurlchkszGE(curl_off_t, long)]; /* ================================================================ */ -- cgit v1.2.1 From 6f1e89085caf5fd0ad8f75a93929de58b897cd88 Mon Sep 17 00:00:00 2001 From: Yang Tse Date: Wed, 13 Aug 2008 16:14:22 +0000 Subject: Adjust IBM C compiler CURL_SIZEOF_LONG --- include/curl/curlbuild.h.dist | 16 ++++++++++------ 1 file changed, 10 insertions(+), 6 deletions(-) (limited to 'include') diff --git a/include/curl/curlbuild.h.dist b/include/curl/curlbuild.h.dist index 7dd26a698..483e69e4e 100644 --- a/include/curl/curlbuild.h.dist +++ b/include/curl/curlbuild.h.dist @@ -346,8 +346,12 @@ #elif defined(__MVS__) # if defined(__IBMC__) || defined(__IBMCPP__) -# if defined(_LONG_LONG) +# if defined(_ILP32) # define CURL_SIZEOF_LONG 4 +# elif defined(_LP64) +# define CURL_SIZEOF_LONG 8 +# endif +# if defined(_LONG_LONG) # define CURL_OFF_T long long # define CURL_FMT_OFF_T "lld" # define CURL_FMT_OFF_TU "llu" @@ -356,7 +360,6 @@ # define CURL_SUFFIX_CURL_OFF_T LL # define CURL_SUFFIX_CURL_OFF_TU ULL # elif defined(_LP64) -# define CURL_SIZEOF_LONG 4 # define CURL_OFF_T long # define CURL_FMT_OFF_T "ld" # define CURL_FMT_OFF_TU "lu" @@ -365,7 +368,6 @@ # define CURL_SUFFIX_CURL_OFF_T L # define CURL_SUFFIX_CURL_OFF_TU UL # else -# define CURL_SIZEOF_LONG 4 # define CURL_OFF_T long # define CURL_FMT_OFF_T "ld" # define CURL_FMT_OFF_TU "lu" @@ -378,8 +380,12 @@ #elif defined(__370__) # if defined(__IBMC__) || defined(__IBMCPP__) -# if defined(_LONG_LONG) +# if defined(_ILP32) # define CURL_SIZEOF_LONG 4 +# elif defined(_LP64) +# define CURL_SIZEOF_LONG 8 +# endif +# if defined(_LONG_LONG) # define CURL_OFF_T long long # define CURL_FMT_OFF_T "lld" # define CURL_FMT_OFF_TU "llu" @@ -388,7 +394,6 @@ # define CURL_SUFFIX_CURL_OFF_T LL # define CURL_SUFFIX_CURL_OFF_TU ULL # elif defined(_LP64) -# define CURL_SIZEOF_LONG 4 # define CURL_OFF_T long # define CURL_FMT_OFF_T "ld" # define CURL_FMT_OFF_TU "lu" @@ -397,7 +402,6 @@ # define CURL_SUFFIX_CURL_OFF_T L # define CURL_SUFFIX_CURL_OFF_TU UL # else -# define CURL_SIZEOF_LONG 4 # define CURL_OFF_T long # define CURL_FMT_OFF_T "ld" # define CURL_FMT_OFF_TU "lu" -- cgit v1.2.1 From 66fb9ca5f6de6eb74c2c3ade7ee651a299247749 Mon Sep 17 00:00:00 2001 From: Yang Tse Date: Fri, 15 Aug 2008 02:58:15 +0000 Subject: For congruency sake with the naming of other CURL_XXXXXX_CURL_OFF_T macros, the names of the curl_off_t formatting string directives now become CURL_FORMAT_CURL_OFF_T and CURL_FORMAT_CURL_OFF_TU. CURL_FMT_OFF_T -> CURL_FORMAT_CURL_OFF_T CURL_FMT_OFF_TU -> CURL_FORMAT_CURL_OFF_TU Remove the use of an internal name for the curl_off_t formatting string directives and use the common one available from the inside and outside of the library. FORMAT_OFF_T -> CURL_FORMAT_CURL_OFF_T FORMAT_OFF_TU -> CURL_FORMAT_CURL_OFF_TU --- include/curl/curlbuild.h.dist | 132 +++++++++++++++++++++--------------------- include/curl/curlbuild.h.in | 16 ++--- include/curl/curlrules.h | 12 ++-- 3 files changed, 80 insertions(+), 80 deletions(-) (limited to 'include') diff --git a/include/curl/curlbuild.h.dist b/include/curl/curlbuild.h.dist index 483e69e4e..60f5d749d 100644 --- a/include/curl/curlbuild.h.dist +++ b/include/curl/curlbuild.h.dist @@ -114,14 +114,14 @@ Error Compilation_aborted_CURL_OFF_T_already_defined #endif -#ifdef CURL_FMT_OFF_T -# error "CURL_FMT_OFF_T shall not be defined except in curlbuild.h" - Error Compilation_aborted_CURL_FMT_OFF_T_already_defined +#ifdef CURL_FORMAT_CURL_OFF_T +# error "CURL_FORMAT_CURL_OFF_T shall not be defined except in curlbuild.h" + Error Compilation_aborted_CURL_FORMAT_CURL_OFF_T_already_defined #endif -#ifdef CURL_FMT_OFF_TU -# error "CURL_FMT_OFF_TU shall not be defined except in curlbuild.h" - Error Compilation_aborted_CURL_FMT_OFF_TU_already_defined +#ifdef CURL_FORMAT_CURL_OFF_TU +# error "CURL_FORMAT_CURL_OFF_TU shall not be defined except in curlbuild.h" + Error Compilation_aborted_CURL_FORMAT_CURL_OFF_TU_already_defined #endif #ifdef CURL_FORMAT_OFF_T @@ -141,8 +141,8 @@ #if defined(__DJGPP__) # define CURL_SIZEOF_LONG 4 # define CURL_OFF_T long -# define CURL_FMT_OFF_T "ld" -# define CURL_FMT_OFF_TU "lu" +# define CURL_FORMAT_CURL_OFF_T "ld" +# define CURL_FORMAT_CURL_OFF_TU "lu" # define CURL_FORMAT_OFF_T "%ld" # define CURL_SIZEOF_CURL_OFF_T 4 # define CURL_SUFFIX_CURL_OFF_T L @@ -151,8 +151,8 @@ #elif defined(__SALFORDC__) # define CURL_SIZEOF_LONG 4 # define CURL_OFF_T long -# define CURL_FMT_OFF_T "ld" -# define CURL_FMT_OFF_TU "lu" +# define CURL_FORMAT_CURL_OFF_T "ld" +# define CURL_FORMAT_CURL_OFF_TU "lu" # define CURL_FORMAT_OFF_T "%ld" # define CURL_SIZEOF_CURL_OFF_T 4 # define CURL_SUFFIX_CURL_OFF_T L @@ -162,8 +162,8 @@ # if (__BORLANDC__ < 0x520) # define CURL_SIZEOF_LONG 4 # define CURL_OFF_T long -# define CURL_FMT_OFF_T "ld" -# define CURL_FMT_OFF_TU "lu" +# define CURL_FORMAT_CURL_OFF_T "ld" +# define CURL_FORMAT_CURL_OFF_TU "lu" # define CURL_FORMAT_OFF_T "%ld" # define CURL_SIZEOF_CURL_OFF_T 4 # define CURL_SUFFIX_CURL_OFF_T L @@ -171,8 +171,8 @@ # else # define CURL_SIZEOF_LONG 4 # define CURL_OFF_T __int64 -# define CURL_FMT_OFF_T "I64d" -# define CURL_FMT_OFF_TU "I64u" +# define CURL_FORMAT_CURL_OFF_T "I64d" +# define CURL_FORMAT_CURL_OFF_TU "I64u" # define CURL_FORMAT_OFF_T "%I64d" # define CURL_SIZEOF_CURL_OFF_T 8 # define CURL_SUFFIX_CURL_OFF_T i64 @@ -182,8 +182,8 @@ #elif defined(__TURBOC__) # define CURL_SIZEOF_LONG 4 # define CURL_OFF_T long -# define CURL_FMT_OFF_T "ld" -# define CURL_FMT_OFF_TU "lu" +# define CURL_FORMAT_CURL_OFF_T "ld" +# define CURL_FORMAT_CURL_OFF_TU "lu" # define CURL_FORMAT_OFF_T "%ld" # define CURL_SIZEOF_CURL_OFF_T 4 # define CURL_SUFFIX_CURL_OFF_T L @@ -193,8 +193,8 @@ # if defined(__386__) # define CURL_SIZEOF_LONG 4 # define CURL_OFF_T __int64 -# define CURL_FMT_OFF_T "I64d" -# define CURL_FMT_OFF_TU "I64u" +# define CURL_FORMAT_CURL_OFF_T "I64d" +# define CURL_FORMAT_CURL_OFF_TU "I64u" # define CURL_FORMAT_OFF_T "%I64d" # define CURL_SIZEOF_CURL_OFF_T 8 # define CURL_SUFFIX_CURL_OFF_T i64 @@ -202,8 +202,8 @@ # else # define CURL_SIZEOF_LONG 4 # define CURL_OFF_T long -# define CURL_FMT_OFF_T "ld" -# define CURL_FMT_OFF_TU "lu" +# define CURL_FORMAT_CURL_OFF_T "ld" +# define CURL_FORMAT_CURL_OFF_TU "lu" # define CURL_FORMAT_OFF_T "%ld" # define CURL_SIZEOF_CURL_OFF_T 4 # define CURL_SUFFIX_CURL_OFF_T L @@ -214,8 +214,8 @@ # if (__POCC__ < 280) # define CURL_SIZEOF_LONG 4 # define CURL_OFF_T long -# define CURL_FMT_OFF_T "ld" -# define CURL_FMT_OFF_TU "lu" +# define CURL_FORMAT_CURL_OFF_T "ld" +# define CURL_FORMAT_CURL_OFF_TU "lu" # define CURL_FORMAT_OFF_T "%ld" # define CURL_SIZEOF_CURL_OFF_T 4 # define CURL_SUFFIX_CURL_OFF_T L @@ -223,8 +223,8 @@ # elif defined(_MSC_VER) # define CURL_SIZEOF_LONG 4 # define CURL_OFF_T __int64 -# define CURL_FMT_OFF_T "I64d" -# define CURL_FMT_OFF_TU "I64u" +# define CURL_FORMAT_CURL_OFF_T "I64d" +# define CURL_FORMAT_CURL_OFF_TU "I64u" # define CURL_FORMAT_OFF_T "%I64d" # define CURL_SIZEOF_CURL_OFF_T 8 # define CURL_SUFFIX_CURL_OFF_T i64 @@ -232,8 +232,8 @@ # else # define CURL_SIZEOF_LONG 4 # define CURL_OFF_T long long -# define CURL_FMT_OFF_T "lld" -# define CURL_FMT_OFF_TU "llu" +# define CURL_FORMAT_CURL_OFF_T "lld" +# define CURL_FORMAT_CURL_OFF_TU "llu" # define CURL_FORMAT_OFF_T "%lld" # define CURL_SIZEOF_CURL_OFF_T 8 # define CURL_SUFFIX_CURL_OFF_T LL @@ -243,8 +243,8 @@ #elif defined(__LCC__) # define CURL_SIZEOF_LONG 4 # define CURL_OFF_T long -# define CURL_FMT_OFF_T "ld" -# define CURL_FMT_OFF_TU "lu" +# define CURL_FORMAT_CURL_OFF_T "ld" +# define CURL_FORMAT_CURL_OFF_TU "lu" # define CURL_FORMAT_OFF_T "%ld" # define CURL_SIZEOF_CURL_OFF_T 4 # define CURL_SUFFIX_CURL_OFF_T L @@ -254,8 +254,8 @@ # if defined(__GCC32__) # define CURL_SIZEOF_LONG 4 # define CURL_OFF_T long long -# define CURL_FMT_OFF_T "lld" -# define CURL_FMT_OFF_TU "llu" +# define CURL_FORMAT_CURL_OFF_T "lld" +# define CURL_FORMAT_CURL_OFF_TU "llu" # define CURL_FORMAT_OFF_T "%lld" # define CURL_SIZEOF_CURL_OFF_T 8 # define CURL_SUFFIX_CURL_OFF_T LL @@ -264,8 +264,8 @@ # pragma longlong on # define CURL_SIZEOF_LONG 4 # define CURL_OFF_T long long -# define CURL_FMT_OFF_T "lld" -# define CURL_FMT_OFF_TU "llu" +# define CURL_FORMAT_CURL_OFF_T "lld" +# define CURL_FORMAT_CURL_OFF_TU "llu" # define CURL_FORMAT_OFF_T "%lld" # define CURL_SIZEOF_CURL_OFF_T 8 # define CURL_SUFFIX_CURL_OFF_T LL @@ -273,8 +273,8 @@ # elif defined(__VC32__) # define CURL_SIZEOF_LONG 4 # define CURL_OFF_T __int64 -# define CURL_FMT_OFF_T "lld" -# define CURL_FMT_OFF_TU "llu" +# define CURL_FORMAT_CURL_OFF_T "lld" +# define CURL_FORMAT_CURL_OFF_TU "llu" # define CURL_FORMAT_OFF_T "%lld" # define CURL_SIZEOF_CURL_OFF_T 8 # define CURL_SUFFIX_CURL_OFF_T LL @@ -284,8 +284,8 @@ #elif defined(__MWERKS__) # define CURL_SIZEOF_LONG 4 # define CURL_OFF_T long long -# define CURL_FMT_OFF_T "lld" -# define CURL_FMT_OFF_TU "llu" +# define CURL_FORMAT_CURL_OFF_T "lld" +# define CURL_FORMAT_CURL_OFF_TU "llu" # define CURL_FORMAT_OFF_T "%lld" # define CURL_SIZEOF_CURL_OFF_T 8 # define CURL_SUFFIX_CURL_OFF_T LL @@ -294,8 +294,8 @@ #elif defined(_WIN32_WCE) # define CURL_SIZEOF_LONG 4 # define CURL_OFF_T __int64 -# define CURL_FMT_OFF_T "I64d" -# define CURL_FMT_OFF_TU "I64u" +# define CURL_FORMAT_CURL_OFF_T "I64d" +# define CURL_FORMAT_CURL_OFF_TU "I64u" # define CURL_FORMAT_OFF_T "%I64d" # define CURL_SIZEOF_CURL_OFF_T 8 # define CURL_SUFFIX_CURL_OFF_T i64 @@ -304,8 +304,8 @@ #elif defined(__MINGW32__) # define CURL_SIZEOF_LONG 4 # define CURL_OFF_T long long -# define CURL_FMT_OFF_T "I64d" -# define CURL_FMT_OFF_TU "I64u" +# define CURL_FORMAT_CURL_OFF_T "I64d" +# define CURL_FORMAT_CURL_OFF_TU "I64u" # define CURL_FORMAT_OFF_T "%I64d" # define CURL_SIZEOF_CURL_OFF_T 8 # define CURL_SUFFIX_CURL_OFF_T LL @@ -315,8 +315,8 @@ # if defined(__alpha) || defined(__ia64) # define CURL_SIZEOF_LONG 4 # define CURL_OFF_T long long -# define CURL_FMT_OFF_T "lld" -# define CURL_FMT_OFF_TU "llu" +# define CURL_FORMAT_CURL_OFF_T "lld" +# define CURL_FORMAT_CURL_OFF_TU "llu" # define CURL_FORMAT_OFF_T "%lld" # define CURL_SIZEOF_CURL_OFF_T 8 # define CURL_SUFFIX_CURL_OFF_T LL @@ -324,8 +324,8 @@ # else # define CURL_SIZEOF_LONG 4 # define CURL_OFF_T long -# define CURL_FMT_OFF_T "ld" -# define CURL_FMT_OFF_TU "lu" +# define CURL_FORMAT_CURL_OFF_T "ld" +# define CURL_FORMAT_CURL_OFF_TU "lu" # define CURL_FORMAT_OFF_T "%ld" # define CURL_SIZEOF_CURL_OFF_T 4 # define CURL_SUFFIX_CURL_OFF_T L @@ -336,8 +336,8 @@ # if defined(__ILEC400__) # define CURL_SIZEOF_LONG 4 # define CURL_OFF_T long long -# define CURL_FMT_OFF_T "lld" -# define CURL_FMT_OFF_TU "llu" +# define CURL_FORMAT_CURL_OFF_T "lld" +# define CURL_FORMAT_CURL_OFF_TU "llu" # define CURL_FORMAT_OFF_T "%lld" # define CURL_SIZEOF_CURL_OFF_T 8 # define CURL_SUFFIX_CURL_OFF_T LL @@ -353,24 +353,24 @@ # endif # if defined(_LONG_LONG) # define CURL_OFF_T long long -# define CURL_FMT_OFF_T "lld" -# define CURL_FMT_OFF_TU "llu" +# define CURL_FORMAT_CURL_OFF_T "lld" +# define CURL_FORMAT_CURL_OFF_TU "llu" # define CURL_FORMAT_OFF_T "%lld" # define CURL_SIZEOF_CURL_OFF_T 8 # define CURL_SUFFIX_CURL_OFF_T LL # define CURL_SUFFIX_CURL_OFF_TU ULL # elif defined(_LP64) # define CURL_OFF_T long -# define CURL_FMT_OFF_T "ld" -# define CURL_FMT_OFF_TU "lu" +# define CURL_FORMAT_CURL_OFF_T "ld" +# define CURL_FORMAT_CURL_OFF_TU "lu" # define CURL_FORMAT_OFF_T "%ld" # define CURL_SIZEOF_CURL_OFF_T 8 # define CURL_SUFFIX_CURL_OFF_T L # define CURL_SUFFIX_CURL_OFF_TU UL # else # define CURL_OFF_T long -# define CURL_FMT_OFF_T "ld" -# define CURL_FMT_OFF_TU "lu" +# define CURL_FORMAT_CURL_OFF_T "ld" +# define CURL_FORMAT_CURL_OFF_TU "lu" # define CURL_FORMAT_OFF_T "%ld" # define CURL_SIZEOF_CURL_OFF_T 4 # define CURL_SUFFIX_CURL_OFF_T L @@ -387,24 +387,24 @@ # endif # if defined(_LONG_LONG) # define CURL_OFF_T long long -# define CURL_FMT_OFF_T "lld" -# define CURL_FMT_OFF_TU "llu" +# define CURL_FORMAT_CURL_OFF_T "lld" +# define CURL_FORMAT_CURL_OFF_TU "llu" # define CURL_FORMAT_OFF_T "%lld" # define CURL_SIZEOF_CURL_OFF_T 8 # define CURL_SUFFIX_CURL_OFF_T LL # define CURL_SUFFIX_CURL_OFF_TU ULL # elif defined(_LP64) # define CURL_OFF_T long -# define CURL_FMT_OFF_T "ld" -# define CURL_FMT_OFF_TU "lu" +# define CURL_FORMAT_CURL_OFF_T "ld" +# define CURL_FORMAT_CURL_OFF_TU "lu" # define CURL_FORMAT_OFF_T "%ld" # define CURL_SIZEOF_CURL_OFF_T 8 # define CURL_SUFFIX_CURL_OFF_T L # define CURL_SUFFIX_CURL_OFF_TU UL # else # define CURL_OFF_T long -# define CURL_FMT_OFF_T "ld" -# define CURL_FMT_OFF_TU "lu" +# define CURL_FORMAT_CURL_OFF_T "ld" +# define CURL_FORMAT_CURL_OFF_TU "lu" # define CURL_FORMAT_OFF_T "%ld" # define CURL_SIZEOF_CURL_OFF_T 4 # define CURL_SUFFIX_CURL_OFF_T L @@ -420,8 +420,8 @@ # if (_MSC_VER >= 900) # define CURL_SIZEOF_LONG 4 # define CURL_OFF_T __int64 -# define CURL_FMT_OFF_T "I64d" -# define CURL_FMT_OFF_TU "I64u" +# define CURL_FORMAT_CURL_OFF_T "I64d" +# define CURL_FORMAT_CURL_OFF_TU "I64u" # define CURL_FORMAT_OFF_T "%I64d" # define CURL_SIZEOF_CURL_OFF_T 8 # define CURL_SUFFIX_CURL_OFF_T i64 @@ -429,8 +429,8 @@ # else # define CURL_SIZEOF_LONG 4 # define CURL_OFF_T long -# define CURL_FMT_OFF_T "ld" -# define CURL_FMT_OFF_TU "lu" +# define CURL_FORMAT_CURL_OFF_T "ld" +# define CURL_FORMAT_CURL_OFF_TU "lu" # define CURL_FORMAT_OFF_T "%ld" # define CURL_SIZEOF_CURL_OFF_T 4 # define CURL_SUFFIX_CURL_OFF_T L @@ -445,8 +445,8 @@ # if defined(__i386__) # define CURL_SIZEOF_LONG 4 # define CURL_OFF_T long long -# define CURL_FMT_OFF_T "lld" -# define CURL_FMT_OFF_TU "llu" +# define CURL_FORMAT_CURL_OFF_T "lld" +# define CURL_FORMAT_CURL_OFF_TU "llu" # define CURL_FORMAT_OFF_T "%lld" # define CURL_SIZEOF_CURL_OFF_T 8 # define CURL_SUFFIX_CURL_OFF_T LL @@ -454,8 +454,8 @@ # elif defined(__x86_64__) # define CURL_SIZEOF_LONG 8 # define CURL_OFF_T long -# define CURL_FMT_OFF_T "ld" -# define CURL_FMT_OFF_TU "lu" +# define CURL_FORMAT_CURL_OFF_T "ld" +# define CURL_FORMAT_CURL_OFF_TU "lu" # define CURL_FORMAT_OFF_T "%ld" # define CURL_SIZEOF_CURL_OFF_T 8 # define CURL_SUFFIX_CURL_OFF_T L diff --git a/include/curl/curlbuild.h.in b/include/curl/curlbuild.h.in index e0d35a555..903ab3ee7 100644 --- a/include/curl/curlbuild.h.in +++ b/include/curl/curlbuild.h.in @@ -63,14 +63,14 @@ Error Compilation_aborted_CURL_OFF_T_already_defined #endif -#ifdef CURL_FMT_OFF_T -# error "CURL_FMT_OFF_T shall not be defined except in curlbuild.h" - Error Compilation_aborted_CURL_FMT_OFF_T_already_defined +#ifdef CURL_FORMAT_CURL_OFF_T +# error "CURL_FORMAT_CURL_OFF_T shall not be defined except in curlbuild.h" + Error Compilation_aborted_CURL_FORMAT_CURL_OFF_T_already_defined #endif -#ifdef CURL_FMT_OFF_TU -# error "CURL_FMT_OFF_TU shall not be defined except in curlbuild.h" - Error Compilation_aborted_CURL_FMT_OFF_TU_already_defined +#ifdef CURL_FORMAT_CURL_OFF_TU +# error "CURL_FORMAT_CURL_OFF_TU shall not be defined except in curlbuild.h" + Error Compilation_aborted_CURL_FORMAT_CURL_OFF_TU_already_defined #endif #ifdef CURL_FORMAT_OFF_T @@ -118,10 +118,10 @@ typedef CURL_OFF_T curl_off_t; /* curl_off_t formatting string directive without "%" conversion specifier. */ -#undef CURL_FMT_OFF_T +#undef CURL_FORMAT_CURL_OFF_T /* unsigned curl_off_t formatting string without "%" conversion specifier. */ -#undef CURL_FMT_OFF_TU +#undef CURL_FORMAT_CURL_OFF_TU /* curl_off_t formatting string directive with "%" conversion specifier. */ #undef CURL_FORMAT_OFF_T diff --git a/include/curl/curlrules.h b/include/curl/curlrules.h index 4a7671fcd..73e1d2a35 100644 --- a/include/curl/curlrules.h +++ b/include/curl/curlrules.h @@ -86,14 +86,14 @@ Error Compilation_aborted_CURL_OFF_T_is_missing #endif -#ifndef CURL_FMT_OFF_T -# error "CURL_FMT_OFF_T definition is missing!" - Error Compilation_aborted_CURL_FMT_OFF_T_is_missing +#ifndef CURL_FORMAT_CURL_OFF_T +# error "CURL_FORMAT_CURL_OFF_T definition is missing!" + Error Compilation_aborted_CURL_FORMAT_CURL_OFF_T_is_missing #endif -#ifndef CURL_FMT_OFF_TU -# error "CURL_FMT_OFF_TU definition is missing!" - Error Compilation_aborted_CURL_FMT_OFF_TU_is_missing +#ifndef CURL_FORMAT_CURL_OFF_TU +# error "CURL_FORMAT_CURL_OFF_TU definition is missing!" + Error Compilation_aborted_CURL_FORMAT_CURL_OFF_TU_is_missing #endif #ifndef CURL_FORMAT_OFF_T -- cgit v1.2.1 From 95a093e97b4c1f61248872571ea9704d0b899095 Mon Sep 17 00:00:00 2001 From: Gisle Vanem Date: Sun, 17 Aug 2008 13:55:24 +0000 Subject: Replace 'HttpPost' with 'curl_httppost'. --- include/curl/curl.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'include') diff --git a/include/curl/curl.h b/include/curl/curl.h index b7555e0be..c9a763537 100644 --- a/include/curl/curl.h +++ b/include/curl/curl.h @@ -658,7 +658,7 @@ typedef enum { /* This points to a linked list of headers, struct curl_slist kind */ CINIT(HTTPHEADER, OBJECTPOINT, 23), - /* This points to a linked list of post entries, struct HttpPost */ + /* This points to a linked list of post entries, struct curl_httppost */ CINIT(HTTPPOST, OBJECTPOINT, 24), /* name of the file keeping your private SSL-certificate */ @@ -1284,7 +1284,7 @@ struct curl_forms { * CURL_FORMADD_MEMORY if the allocation of a FormInfo struct failed * CURL_FORMADD_UNKNOWN_OPTION if an unknown option was used * CURL_FORMADD_INCOMPLETE if the some FormInfo is not complete (or error) - * CURL_FORMADD_MEMORY if a HttpPost struct cannot be allocated + * CURL_FORMADD_MEMORY if a curl_httppost struct cannot be allocated * CURL_FORMADD_MEMORY if some allocation for string copying failed. * CURL_FORMADD_ILLEGAL_ARRAY if an illegal option is used in an array * -- cgit v1.2.1 From 4dbfc91e2b69497ac4dfc78e88e76c4f98633ad2 Mon Sep 17 00:00:00 2001 From: Yang Tse Date: Thu, 21 Aug 2008 06:58:12 +0000 Subject: MSVC's __int64 data type is only available when _INTEGRAL_MAX_BITS >= 64 --- include/curl/curlbuild.h.dist | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'include') diff --git a/include/curl/curlbuild.h.dist b/include/curl/curlbuild.h.dist index 60f5d749d..ed284b052 100644 --- a/include/curl/curlbuild.h.dist +++ b/include/curl/curlbuild.h.dist @@ -417,7 +417,7 @@ /* ===================================== */ #elif defined(_MSC_VER) -# if (_MSC_VER >= 900) +# if (_MSC_VER >= 900) && (_INTEGRAL_MAX_BITS >= 64) # define CURL_SIZEOF_LONG 4 # define CURL_OFF_T __int64 # define CURL_FORMAT_CURL_OFF_T "I64d" -- cgit v1.2.1 From f164260eeeb246e32b30ab382cf7eb454e6f953a Mon Sep 17 00:00:00 2001 From: Yang Tse Date: Mon, 25 Aug 2008 01:18:49 +0000 Subject: For congruency sake with the naming of other CURL_XXXXXX_CURL_OFF_T macros, the name of the curl_off_t data type used now becomes CURL_TYPEOF_CURL_OFF_T CURL_OFF_T -> CURL_TYPEOF_CURL_OFF_T --- include/curl/curlbuild.h.dist | 70 +++++++++++++++++++++---------------------- include/curl/curlbuild.h.in | 10 +++---- include/curl/curlrules.h | 8 ++--- 3 files changed, 44 insertions(+), 44 deletions(-) (limited to 'include') diff --git a/include/curl/curlbuild.h.dist b/include/curl/curlbuild.h.dist index ed284b052..9c2a79c4b 100644 --- a/include/curl/curlbuild.h.dist +++ b/include/curl/curlbuild.h.dist @@ -109,9 +109,9 @@ /* DEFINITION OF THESE SYMBOLS SHALL NOT TAKE PLACE ANYWHERE ELSE */ /* ================================================================ */ -#ifdef CURL_OFF_T -# error "CURL_OFF_T shall not be defined except in curlbuild.h" - Error Compilation_aborted_CURL_OFF_T_already_defined +#ifdef CURL_TYPEOF_CURL_OFF_T +# error "CURL_TYPEOF_CURL_OFF_T shall not be defined except in curlbuild.h" + Error Compilation_aborted_CURL_TYPEOF_CURL_OFF_T_already_defined #endif #ifdef CURL_FORMAT_CURL_OFF_T @@ -140,7 +140,7 @@ #if defined(__DJGPP__) # define CURL_SIZEOF_LONG 4 -# define CURL_OFF_T long +# define CURL_TYPEOF_CURL_OFF_T long # define CURL_FORMAT_CURL_OFF_T "ld" # define CURL_FORMAT_CURL_OFF_TU "lu" # define CURL_FORMAT_OFF_T "%ld" @@ -150,7 +150,7 @@ #elif defined(__SALFORDC__) # define CURL_SIZEOF_LONG 4 -# define CURL_OFF_T long +# define CURL_TYPEOF_CURL_OFF_T long # define CURL_FORMAT_CURL_OFF_T "ld" # define CURL_FORMAT_CURL_OFF_TU "lu" # define CURL_FORMAT_OFF_T "%ld" @@ -161,7 +161,7 @@ #elif defined(__BORLANDC__) # if (__BORLANDC__ < 0x520) # define CURL_SIZEOF_LONG 4 -# define CURL_OFF_T long +# define CURL_TYPEOF_CURL_OFF_T long # define CURL_FORMAT_CURL_OFF_T "ld" # define CURL_FORMAT_CURL_OFF_TU "lu" # define CURL_FORMAT_OFF_T "%ld" @@ -170,7 +170,7 @@ # define CURL_SUFFIX_CURL_OFF_TU UL # else # define CURL_SIZEOF_LONG 4 -# define CURL_OFF_T __int64 +# define CURL_TYPEOF_CURL_OFF_T __int64 # define CURL_FORMAT_CURL_OFF_T "I64d" # define CURL_FORMAT_CURL_OFF_TU "I64u" # define CURL_FORMAT_OFF_T "%I64d" @@ -181,7 +181,7 @@ #elif defined(__TURBOC__) # define CURL_SIZEOF_LONG 4 -# define CURL_OFF_T long +# define CURL_TYPEOF_CURL_OFF_T long # define CURL_FORMAT_CURL_OFF_T "ld" # define CURL_FORMAT_CURL_OFF_TU "lu" # define CURL_FORMAT_OFF_T "%ld" @@ -192,7 +192,7 @@ #elif defined(__WATCOMC__) # if defined(__386__) # define CURL_SIZEOF_LONG 4 -# define CURL_OFF_T __int64 +# define CURL_TYPEOF_CURL_OFF_T __int64 # define CURL_FORMAT_CURL_OFF_T "I64d" # define CURL_FORMAT_CURL_OFF_TU "I64u" # define CURL_FORMAT_OFF_T "%I64d" @@ -201,7 +201,7 @@ # define CURL_SUFFIX_CURL_OFF_TU ui64 # else # define CURL_SIZEOF_LONG 4 -# define CURL_OFF_T long +# define CURL_TYPEOF_CURL_OFF_T long # define CURL_FORMAT_CURL_OFF_T "ld" # define CURL_FORMAT_CURL_OFF_TU "lu" # define CURL_FORMAT_OFF_T "%ld" @@ -213,7 +213,7 @@ #elif defined(__POCC__) # if (__POCC__ < 280) # define CURL_SIZEOF_LONG 4 -# define CURL_OFF_T long +# define CURL_TYPEOF_CURL_OFF_T long # define CURL_FORMAT_CURL_OFF_T "ld" # define CURL_FORMAT_CURL_OFF_TU "lu" # define CURL_FORMAT_OFF_T "%ld" @@ -222,7 +222,7 @@ # define CURL_SUFFIX_CURL_OFF_TU UL # elif defined(_MSC_VER) # define CURL_SIZEOF_LONG 4 -# define CURL_OFF_T __int64 +# define CURL_TYPEOF_CURL_OFF_T __int64 # define CURL_FORMAT_CURL_OFF_T "I64d" # define CURL_FORMAT_CURL_OFF_TU "I64u" # define CURL_FORMAT_OFF_T "%I64d" @@ -231,7 +231,7 @@ # define CURL_SUFFIX_CURL_OFF_TU ui64 # else # define CURL_SIZEOF_LONG 4 -# define CURL_OFF_T long long +# define CURL_TYPEOF_CURL_OFF_T long long # define CURL_FORMAT_CURL_OFF_T "lld" # define CURL_FORMAT_CURL_OFF_TU "llu" # define CURL_FORMAT_OFF_T "%lld" @@ -242,7 +242,7 @@ #elif defined(__LCC__) # define CURL_SIZEOF_LONG 4 -# define CURL_OFF_T long +# define CURL_TYPEOF_CURL_OFF_T long # define CURL_FORMAT_CURL_OFF_T "ld" # define CURL_FORMAT_CURL_OFF_TU "lu" # define CURL_FORMAT_OFF_T "%ld" @@ -253,7 +253,7 @@ #elif defined(__SYMBIAN32__) # if defined(__GCC32__) # define CURL_SIZEOF_LONG 4 -# define CURL_OFF_T long long +# define CURL_TYPEOF_CURL_OFF_T long long # define CURL_FORMAT_CURL_OFF_T "lld" # define CURL_FORMAT_CURL_OFF_TU "llu" # define CURL_FORMAT_OFF_T "%lld" @@ -263,7 +263,7 @@ # elif defined(__CW32__) # pragma longlong on # define CURL_SIZEOF_LONG 4 -# define CURL_OFF_T long long +# define CURL_TYPEOF_CURL_OFF_T long long # define CURL_FORMAT_CURL_OFF_T "lld" # define CURL_FORMAT_CURL_OFF_TU "llu" # define CURL_FORMAT_OFF_T "%lld" @@ -272,7 +272,7 @@ # define CURL_SUFFIX_CURL_OFF_TU ULL # elif defined(__VC32__) # define CURL_SIZEOF_LONG 4 -# define CURL_OFF_T __int64 +# define CURL_TYPEOF_CURL_OFF_T __int64 # define CURL_FORMAT_CURL_OFF_T "lld" # define CURL_FORMAT_CURL_OFF_TU "llu" # define CURL_FORMAT_OFF_T "%lld" @@ -283,7 +283,7 @@ #elif defined(__MWERKS__) # define CURL_SIZEOF_LONG 4 -# define CURL_OFF_T long long +# define CURL_TYPEOF_CURL_OFF_T long long # define CURL_FORMAT_CURL_OFF_T "lld" # define CURL_FORMAT_CURL_OFF_TU "llu" # define CURL_FORMAT_OFF_T "%lld" @@ -293,7 +293,7 @@ #elif defined(_WIN32_WCE) # define CURL_SIZEOF_LONG 4 -# define CURL_OFF_T __int64 +# define CURL_TYPEOF_CURL_OFF_T __int64 # define CURL_FORMAT_CURL_OFF_T "I64d" # define CURL_FORMAT_CURL_OFF_TU "I64u" # define CURL_FORMAT_OFF_T "%I64d" @@ -303,7 +303,7 @@ #elif defined(__MINGW32__) # define CURL_SIZEOF_LONG 4 -# define CURL_OFF_T long long +# define CURL_TYPEOF_CURL_OFF_T long long # define CURL_FORMAT_CURL_OFF_T "I64d" # define CURL_FORMAT_CURL_OFF_TU "I64u" # define CURL_FORMAT_OFF_T "%I64d" @@ -314,7 +314,7 @@ #elif defined(__VMS) # if defined(__alpha) || defined(__ia64) # define CURL_SIZEOF_LONG 4 -# define CURL_OFF_T long long +# define CURL_TYPEOF_CURL_OFF_T long long # define CURL_FORMAT_CURL_OFF_T "lld" # define CURL_FORMAT_CURL_OFF_TU "llu" # define CURL_FORMAT_OFF_T "%lld" @@ -323,7 +323,7 @@ # define CURL_SUFFIX_CURL_OFF_TU ULL # else # define CURL_SIZEOF_LONG 4 -# define CURL_OFF_T long +# define CURL_TYPEOF_CURL_OFF_T long # define CURL_FORMAT_CURL_OFF_T "ld" # define CURL_FORMAT_CURL_OFF_TU "lu" # define CURL_FORMAT_OFF_T "%ld" @@ -335,7 +335,7 @@ #elif defined(__OS400__) # if defined(__ILEC400__) # define CURL_SIZEOF_LONG 4 -# define CURL_OFF_T long long +# define CURL_TYPEOF_CURL_OFF_T long long # define CURL_FORMAT_CURL_OFF_T "lld" # define CURL_FORMAT_CURL_OFF_TU "llu" # define CURL_FORMAT_OFF_T "%lld" @@ -352,7 +352,7 @@ # define CURL_SIZEOF_LONG 8 # endif # if defined(_LONG_LONG) -# define CURL_OFF_T long long +# define CURL_TYPEOF_CURL_OFF_T long long # define CURL_FORMAT_CURL_OFF_T "lld" # define CURL_FORMAT_CURL_OFF_TU "llu" # define CURL_FORMAT_OFF_T "%lld" @@ -360,7 +360,7 @@ # define CURL_SUFFIX_CURL_OFF_T LL # define CURL_SUFFIX_CURL_OFF_TU ULL # elif defined(_LP64) -# define CURL_OFF_T long +# define CURL_TYPEOF_CURL_OFF_T long # define CURL_FORMAT_CURL_OFF_T "ld" # define CURL_FORMAT_CURL_OFF_TU "lu" # define CURL_FORMAT_OFF_T "%ld" @@ -368,7 +368,7 @@ # define CURL_SUFFIX_CURL_OFF_T L # define CURL_SUFFIX_CURL_OFF_TU UL # else -# define CURL_OFF_T long +# define CURL_TYPEOF_CURL_OFF_T long # define CURL_FORMAT_CURL_OFF_T "ld" # define CURL_FORMAT_CURL_OFF_TU "lu" # define CURL_FORMAT_OFF_T "%ld" @@ -386,7 +386,7 @@ # define CURL_SIZEOF_LONG 8 # endif # if defined(_LONG_LONG) -# define CURL_OFF_T long long +# define CURL_TYPEOF_CURL_OFF_T long long # define CURL_FORMAT_CURL_OFF_T "lld" # define CURL_FORMAT_CURL_OFF_TU "llu" # define CURL_FORMAT_OFF_T "%lld" @@ -394,7 +394,7 @@ # define CURL_SUFFIX_CURL_OFF_T LL # define CURL_SUFFIX_CURL_OFF_TU ULL # elif defined(_LP64) -# define CURL_OFF_T long +# define CURL_TYPEOF_CURL_OFF_T long # define CURL_FORMAT_CURL_OFF_T "ld" # define CURL_FORMAT_CURL_OFF_TU "lu" # define CURL_FORMAT_OFF_T "%ld" @@ -402,7 +402,7 @@ # define CURL_SUFFIX_CURL_OFF_T L # define CURL_SUFFIX_CURL_OFF_TU UL # else -# define CURL_OFF_T long +# define CURL_TYPEOF_CURL_OFF_T long # define CURL_FORMAT_CURL_OFF_T "ld" # define CURL_FORMAT_CURL_OFF_TU "lu" # define CURL_FORMAT_OFF_T "%ld" @@ -419,7 +419,7 @@ #elif defined(_MSC_VER) # if (_MSC_VER >= 900) && (_INTEGRAL_MAX_BITS >= 64) # define CURL_SIZEOF_LONG 4 -# define CURL_OFF_T __int64 +# define CURL_TYPEOF_CURL_OFF_T __int64 # define CURL_FORMAT_CURL_OFF_T "I64d" # define CURL_FORMAT_CURL_OFF_TU "I64u" # define CURL_FORMAT_OFF_T "%I64d" @@ -428,7 +428,7 @@ # define CURL_SUFFIX_CURL_OFF_TU ui64 # else # define CURL_SIZEOF_LONG 4 -# define CURL_OFF_T long +# define CURL_TYPEOF_CURL_OFF_T long # define CURL_FORMAT_CURL_OFF_T "ld" # define CURL_FORMAT_CURL_OFF_TU "lu" # define CURL_FORMAT_OFF_T "%ld" @@ -444,7 +444,7 @@ #elif defined(__GNUC__) # if defined(__i386__) # define CURL_SIZEOF_LONG 4 -# define CURL_OFF_T long long +# define CURL_TYPEOF_CURL_OFF_T long long # define CURL_FORMAT_CURL_OFF_T "lld" # define CURL_FORMAT_CURL_OFF_TU "llu" # define CURL_FORMAT_OFF_T "%lld" @@ -453,7 +453,7 @@ # define CURL_SUFFIX_CURL_OFF_TU ULL # elif defined(__x86_64__) # define CURL_SIZEOF_LONG 8 -# define CURL_OFF_T long +# define CURL_TYPEOF_CURL_OFF_T long # define CURL_FORMAT_CURL_OFF_T "ld" # define CURL_FORMAT_CURL_OFF_TU "lu" # define CURL_FORMAT_OFF_T "%ld" @@ -469,8 +469,8 @@ /* Data type definition of curl_off_t. */ -#ifdef CURL_OFF_T - typedef CURL_OFF_T curl_off_t; +#ifdef CURL_TYPEOF_CURL_OFF_T + typedef CURL_TYPEOF_CURL_OFF_T curl_off_t; #endif #endif /* __CURL_CURLBUILD_H */ diff --git a/include/curl/curlbuild.h.in b/include/curl/curlbuild.h.in index 903ab3ee7..db9809384 100644 --- a/include/curl/curlbuild.h.in +++ b/include/curl/curlbuild.h.in @@ -58,9 +58,9 @@ /* DEFINITION OF THESE SYMBOLS SHALL NOT TAKE PLACE ANYWHERE ELSE */ /* ================================================================ */ -#ifdef CURL_OFF_T -# error "CURL_OFF_T shall not be defined except in curlbuild.h" - Error Compilation_aborted_CURL_OFF_T_already_defined +#ifdef CURL_TYPEOF_CURL_OFF_T +# error "CURL_TYPEOF_CURL_OFF_T shall not be defined except in curlbuild.h" + Error Compilation_aborted_CURL_TYPEOF_CURL_OFF_T_already_defined #endif #ifdef CURL_FORMAT_CURL_OFF_T @@ -112,10 +112,10 @@ #undef CURL_SIZEOF_LONG /* Signed integral data type used for curl_off_t. */ -#undef CURL_OFF_T +#undef CURL_TYPEOF_CURL_OFF_T /* Data type definition of curl_off_t. */ -typedef CURL_OFF_T curl_off_t; +typedef CURL_TYPEOF_CURL_OFF_T curl_off_t; /* curl_off_t formatting string directive without "%" conversion specifier. */ #undef CURL_FORMAT_CURL_OFF_T diff --git a/include/curl/curlrules.h b/include/curl/curlrules.h index 73e1d2a35..5a4103d44 100644 --- a/include/curl/curlrules.h +++ b/include/curl/curlrules.h @@ -81,9 +81,9 @@ Error Compilation_aborted_CURL_SIZEOF_LONG_is_missing #endif -#ifndef CURL_OFF_T -# error "CURL_OFF_T definition is missing!" - Error Compilation_aborted_CURL_OFF_T_is_missing +#ifndef CURL_TYPEOF_CURL_OFF_T +# error "CURL_TYPEOF_CURL_OFF_T definition is missing!" + Error Compilation_aborted_CURL_TYPEOF_CURL_OFF_T_is_missing #endif #ifndef CURL_FORMAT_CURL_OFF_T @@ -211,6 +211,6 @@ typedef char #undef CURL_PULL_STDINT_H #undef CURL_PULL_INTTYPES_H -#undef CURL_OFF_T +#undef CURL_TYPEOF_CURL_OFF_T #endif /* __CURL_CURLRULES_H */ -- cgit v1.2.1 From 4962e1772d3a8102234f090efecae3bc887c4b4a Mon Sep 17 00:00:00 2001 From: Yang Tse Date: Mon, 25 Aug 2008 13:42:53 +0000 Subject: Add missing preprocessor symbol definition checks --- include/curl/curlbuild.h.dist | 15 +++++++++++++++ include/curl/curlbuild.h.in | 19 +++++++++++++++++-- 2 files changed, 32 insertions(+), 2 deletions(-) (limited to 'include') diff --git a/include/curl/curlbuild.h.dist b/include/curl/curlbuild.h.dist index 9c2a79c4b..d5dc57597 100644 --- a/include/curl/curlbuild.h.dist +++ b/include/curl/curlbuild.h.dist @@ -109,6 +109,11 @@ /* DEFINITION OF THESE SYMBOLS SHALL NOT TAKE PLACE ANYWHERE ELSE */ /* ================================================================ */ +#ifdef CURL_SIZEOF_LONG +# error "CURL_SIZEOF_LONG shall not be defined except in curlbuild.h" + Error Compilation_aborted_CURL_SIZEOF_LONG_already_defined +#endif + #ifdef CURL_TYPEOF_CURL_OFF_T # error "CURL_TYPEOF_CURL_OFF_T shall not be defined except in curlbuild.h" Error Compilation_aborted_CURL_TYPEOF_CURL_OFF_T_already_defined @@ -134,6 +139,16 @@ Error Compilation_aborted_CURL_SIZEOF_CURL_OFF_T_already_defined #endif +#ifdef CURL_SUFFIX_CURL_OFF_T +# error "CURL_SUFFIX_CURL_OFF_T shall not be defined except in curlbuild.h" + Error Compilation_aborted_CURL_SUFFIX_CURL_OFF_T_already_defined +#endif + +#ifdef CURL_SUFFIX_CURL_OFF_TU +# error "CURL_SUFFIX_CURL_OFF_TU shall not be defined except in curlbuild.h" + Error Compilation_aborted_CURL_SUFFIX_CURL_OFF_TU_already_defined +#endif + /* ================================================================ */ /* EXTERNAL INTERFACE SETTINGS FOR NON-CONFIGURE SYSTEMS ONLY */ /* ================================================================ */ diff --git a/include/curl/curlbuild.h.in b/include/curl/curlbuild.h.in index db9809384..e1c0dc3d4 100644 --- a/include/curl/curlbuild.h.in +++ b/include/curl/curlbuild.h.in @@ -58,6 +58,11 @@ /* DEFINITION OF THESE SYMBOLS SHALL NOT TAKE PLACE ANYWHERE ELSE */ /* ================================================================ */ +#ifdef CURL_SIZEOF_LONG +# error "CURL_SIZEOF_LONG shall not be defined except in curlbuild.h" + Error Compilation_aborted_CURL_SIZEOF_LONG_already_defined +#endif + #ifdef CURL_TYPEOF_CURL_OFF_T # error "CURL_TYPEOF_CURL_OFF_T shall not be defined except in curlbuild.h" Error Compilation_aborted_CURL_TYPEOF_CURL_OFF_T_already_defined @@ -83,6 +88,16 @@ Error Compilation_aborted_CURL_SIZEOF_CURL_OFF_T_already_defined #endif +#ifdef CURL_SUFFIX_CURL_OFF_T +# error "CURL_SUFFIX_CURL_OFF_T shall not be defined except in curlbuild.h" + Error Compilation_aborted_CURL_SUFFIX_CURL_OFF_T_already_defined +#endif + +#ifdef CURL_SUFFIX_CURL_OFF_TU +# error "CURL_SUFFIX_CURL_OFF_TU shall not be defined except in curlbuild.h" + Error Compilation_aborted_CURL_SUFFIX_CURL_OFF_TU_already_defined +#endif + /* ================================================================ */ /* EXTERNAL INTERFACE SETTINGS FOR CONFIGURE CAPABLE SYSTEMS ONLY */ /* ================================================================ */ @@ -108,7 +123,7 @@ # include #endif -/* The expected size of long , as to be computed by sizeof. */ +/* The size of `long', as computed by sizeof. */ #undef CURL_SIZEOF_LONG /* Signed integral data type used for curl_off_t. */ @@ -126,7 +141,7 @@ typedef CURL_TYPEOF_CURL_OFF_T curl_off_t; /* curl_off_t formatting string directive with "%" conversion specifier. */ #undef CURL_FORMAT_OFF_T -/* The expected size of curl_off_t, as to be computed by sizeof. */ +/* The size of `curl_off_t', as computed by sizeof. */ #undef CURL_SIZEOF_CURL_OFF_T /* curl_off_t constant suffix. */ -- cgit v1.2.1 From 74d3b80d707a1018cd08fe53685e4744131f378b Mon Sep 17 00:00:00 2001 From: Dan Fandrich Date: Tue, 26 Aug 2008 22:36:03 +0000 Subject: Treat all ARM compilers (RVCT, GCC) equally on Symbian OS. They are both compatible, and otherwise the dependency generation phase of the build would throw warnings since the actual compiler isn't known at that time. --- include/curl/curlbuild.h.dist | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'include') diff --git a/include/curl/curlbuild.h.dist b/include/curl/curlbuild.h.dist index d5dc57597..eacf6ad3b 100644 --- a/include/curl/curlbuild.h.dist +++ b/include/curl/curlbuild.h.dist @@ -266,7 +266,7 @@ # define CURL_SUFFIX_CURL_OFF_TU UL #elif defined(__SYMBIAN32__) -# if defined(__GCC32__) +# if defined(__EABI__) /* Treat all ARM compilers equally */ # define CURL_SIZEOF_LONG 4 # define CURL_TYPEOF_CURL_OFF_T long long # define CURL_FORMAT_CURL_OFF_T "lld" -- cgit v1.2.1 From 29b75ca46f51887d503bfb453bcb349b7b8c920b Mon Sep 17 00:00:00 2001 From: Yang Tse Date: Thu, 28 Aug 2008 13:58:07 +0000 Subject: ignore curlver.h.dist --- include/curl/.cvsignore | 1 + 1 file changed, 1 insertion(+) (limited to 'include') diff --git a/include/curl/.cvsignore b/include/curl/.cvsignore index 67b973ae3..d3a3a090f 100644 --- a/include/curl/.cvsignore +++ b/include/curl/.cvsignore @@ -1,4 +1,5 @@ Makefile Makefile.in curlbuild.h +curlver.h.dist stamp-* -- cgit v1.2.1 From 2ae7d2e6ea8ce9a4b6f72189f3f959fae144337f Mon Sep 17 00:00:00 2001 From: Yang Tse Date: Thu, 28 Aug 2008 16:08:31 +0000 Subject: Adjust curl_off_t definitions for DJGPP. Ancient versions of DJGPP do not have a 64-bit data type. --- include/curl/curlbuild.h.dist | 29 ++++++++++++++++++++--------- 1 file changed, 20 insertions(+), 9 deletions(-) (limited to 'include') diff --git a/include/curl/curlbuild.h.dist b/include/curl/curlbuild.h.dist index eacf6ad3b..cabe8c645 100644 --- a/include/curl/curlbuild.h.dist +++ b/include/curl/curlbuild.h.dist @@ -153,15 +153,26 @@ /* EXTERNAL INTERFACE SETTINGS FOR NON-CONFIGURE SYSTEMS ONLY */ /* ================================================================ */ -#if defined(__DJGPP__) -# define CURL_SIZEOF_LONG 4 -# define CURL_TYPEOF_CURL_OFF_T long -# define CURL_FORMAT_CURL_OFF_T "ld" -# define CURL_FORMAT_CURL_OFF_TU "lu" -# define CURL_FORMAT_OFF_T "%ld" -# define CURL_SIZEOF_CURL_OFF_T 4 -# define CURL_SUFFIX_CURL_OFF_T L -# define CURL_SUFFIX_CURL_OFF_TU UL +#if defined(__DJGPP__) || defined(__GO32__) +# if defined(__DJGPP__) && (__DJGPP__ > 1) +# define CURL_SIZEOF_LONG 4 +# define CURL_TYPEOF_CURL_OFF_T long long +# define CURL_FORMAT_CURL_OFF_T "lld" +# define CURL_FORMAT_CURL_OFF_TU "llu" +# define CURL_FORMAT_OFF_T "%lld" +# define CURL_SIZEOF_CURL_OFF_T 8 +# define CURL_SUFFIX_CURL_OFF_T LL +# define CURL_SUFFIX_CURL_OFF_TU ULL +# else +# define CURL_SIZEOF_LONG 4 +# define CURL_TYPEOF_CURL_OFF_T long +# define CURL_FORMAT_CURL_OFF_T "ld" +# define CURL_FORMAT_CURL_OFF_TU "lu" +# define CURL_FORMAT_OFF_T "%ld" +# define CURL_SIZEOF_CURL_OFF_T 4 +# define CURL_SUFFIX_CURL_OFF_T L +# define CURL_SUFFIX_CURL_OFF_TU UL +# endif #elif defined(__SALFORDC__) # define CURL_SIZEOF_LONG 4 -- cgit v1.2.1 From 238db14002e4d8fad36ecc833c15b6f1674cdbcb Mon Sep 17 00:00:00 2001 From: Daniel Stenberg Date: Mon, 1 Sep 2008 15:26:28 +0000 Subject: clear the way for 7.19.1 work! --- include/curl/curlver.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'include') diff --git a/include/curl/curlver.h b/include/curl/curlver.h index 6c4def01f..43de0f28b 100644 --- a/include/curl/curlver.h +++ b/include/curl/curlver.h @@ -31,13 +31,13 @@ /* This is the version number of the libcurl package from which this header file origins: */ -#define LIBCURL_VERSION "7.19.0-CVS" +#define LIBCURL_VERSION "7.19.1-CVS" /* The numeric version number is also available "in parts" by using these defines: */ #define LIBCURL_VERSION_MAJOR 7 #define LIBCURL_VERSION_MINOR 19 -#define LIBCURL_VERSION_PATCH 0 +#define LIBCURL_VERSION_PATCH 1 /* This is the numeric version of the libcurl version number, meant for easier parsing and comparions by programs. The LIBCURL_VERSION_NUM define will -- cgit v1.2.1 From c8d4e8b5d0c83d959256a54dabccc8176db10d78 Mon Sep 17 00:00:00 2001 From: Yang Tse Date: Tue, 2 Sep 2008 11:28:12 +0000 Subject: hex version number for 7.19.1 is 0x071301 --- include/curl/curlver.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'include') diff --git a/include/curl/curlver.h b/include/curl/curlver.h index 43de0f28b..f4302a4da 100644 --- a/include/curl/curlver.h +++ b/include/curl/curlver.h @@ -54,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 0x071300 +#define LIBCURL_VERSION_NUM 0x071301 /* * This is the date and time when the full source package was created. The -- cgit v1.2.1 From 4c9768565ec3a9baf26ac8a547bca6e42cc64fa5 Mon Sep 17 00:00:00 2001 From: Daniel Stenberg Date: Fri, 5 Sep 2008 14:29:21 +0000 Subject: - Introducing CURLOPT_CERTINFO and the corresponding CURLINFO_CERTINFO. By enabling this feature with CURLOPT_CERTINFO for a request using SSL (HTTPS or FTPS), libcurl will gather lots of server certificate info and that info can then get extracted by a client after the request has completed with curl_easy_getinfo()'s CURLINFO_CERTINFO option. Linus Nielsen Feltzing helped me test and smoothen out this feature. Unfortunately, this feature currently only works with libcurl built to use OpenSSL. This feature was sponsored by networking4all.com - thanks! --- include/curl/curl.h | 17 ++++++++++++++++- 1 file changed, 16 insertions(+), 1 deletion(-) (limited to 'include') diff --git a/include/curl/curl.h b/include/curl/curl.h index c9a763537..2b574c9d7 100644 --- a/include/curl/curl.h +++ b/include/curl/curl.h @@ -1135,6 +1135,11 @@ typedef enum { /* (IPv6) Address scope */ CINIT(ADDRESS_SCOPE, LONG, 171), + /* Collect certificate chain info and allow it to get retrievable with + CURLINFO_CERTINFO after the transfer is complete. (Unfortunately) only + working with OpenSSL-powered builds. */ + CINIT(CERTINFO, LONG, 172), + CURLOPT_LASTENTRY /* the last unused */ } CURLoption; @@ -1491,6 +1496,15 @@ CURL_EXTERN void curl_slist_free_all(struct curl_slist *); */ CURL_EXTERN time_t curl_getdate(const char *p, const time_t *unused); +/* info about the certificate chain, only for OpenSSL builds. Asked + for with CURLOPT_CERTINFO / CURLINFO_CERTINFO */ +struct curl_certinfo { + int num_of_certs; /* number of certificates with information */ + struct curl_slist **certinfo; /* for each index in this array, there's a + linked list with textual information in the + format "name: value" */ +}; + #define CURLINFO_STRING 0x100000 #define CURLINFO_LONG 0x200000 #define CURLINFO_DOUBLE 0x300000 @@ -1533,9 +1547,10 @@ typedef enum { CURLINFO_REDIRECT_URL = CURLINFO_STRING + 31, CURLINFO_PRIMARY_IP = CURLINFO_STRING + 32, CURLINFO_APPCONNECT_TIME = CURLINFO_DOUBLE + 33, + CURLINFO_CERTINFO = CURLINFO_SLIST + 34, /* Fill in new entries below here! */ - CURLINFO_LASTONE = 33 + CURLINFO_LASTONE = 34 } CURLINFO; /* CURLINFO_RESPONSE_CODE is the new name for the option previously known as -- cgit v1.2.1 From 18110b519c56a464bca4258332279c580f07a52f Mon Sep 17 00:00:00 2001 From: Daniel Stenberg Date: Fri, 5 Sep 2008 16:13:20 +0000 Subject: - Martin Drasar provided the CURLOPT_POSTREDIR patch. It renames CURLOPT_POST301 (but adds a define for backwards compatibility for you who don't define CURL_NO_OLDIES). This option allows you to now also change the libcurl behavior for a HTTP response 302 after a POST to not use GET in the subsequent request (when CURLOPT_FOLLOWLOCATION is enabled). I edited the patch somewhat before commit. The curl tool got a matching --post302 option. Test case 1076 was added to verify this. --- include/curl/curl.h | 18 ++++++++++++++++-- 1 file changed, 16 insertions(+), 2 deletions(-) (limited to 'include') diff --git a/include/curl/curl.h b/include/curl/curl.h index 2b574c9d7..d93fd6764 100644 --- a/include/curl/curl.h +++ b/include/curl/curl.h @@ -1103,8 +1103,9 @@ typedef enum { CINIT(NEW_FILE_PERMS, LONG, 159), CINIT(NEW_DIRECTORY_PERMS, LONG, 160), - /* Obey RFC 2616/10.3.2 and keep POSTs as POSTs after a 301 */ - CINIT(POST301, LONG, 161), + /* Set the behaviour of POST when redirecting. Values must be set to one + of CURL_REDIR* defines below. This used to be called CURLOPT_POST301 */ + CINIT(POSTREDIR, LONG, 161), /* used by scp/sftp to verify the host's public key */ CINIT(SSH_HOST_PUBLIC_KEY_MD5, OBJECTPOINT, 162), @@ -1147,6 +1148,11 @@ typedef enum { the obsolete stuff removed! */ /* Backwards compatibility with older names */ +/* These are scheduled to disappear by 2011 */ + +/* This was added in version 7.19.1 */ +#define CURLOPT_POST301 CURLOPT_POSTREDIR + /* These are scheduled to disappear by 2009 */ /* The following were added in 7.17.0 */ @@ -1211,6 +1217,14 @@ enum { CURL_SSLVERSION_LAST /* never use, keep last */ }; +/* symbols to use with CURLOPT_POSTREDIR. + CURL_REDIR_POST_301 and CURL_REDIR_POST_302 can be bitwise ORed so that + CURL_REDIR_POST_301 | CURL_REDIR_POST_302 == CURL_REDIR_POST_ALL */ + +#define CURL_REDIR_GET_ALL 0 +#define CURL_REDIR_POST_301 1 +#define CURL_REDIR_POST_302 2 +#define CURL_REDIR_POST_ALL (CURL_REDIR_POST_301|CURL_REDIR_POST_302) typedef enum { CURL_TIMECOND_NONE, -- cgit v1.2.1 From 08cf6780ba8ea242cb451f07e14bb572079e22cf Mon Sep 17 00:00:00 2001 From: Daniel Stenberg Date: Wed, 8 Oct 2008 10:39:43 +0000 Subject: - Igor Novoseltsev brought a patch that introduced two new options to curl_easy_setopt: CURLOPT_USERNAME and CURLOPT_PASSWORD that sort of deprecates the good old CURLOPT_USERPWD since they allow applications to set the user name and password independently and perhaps more importantly allow both to contain colon(s) which CURLOPT_USERPWD doesn't fully support. --- include/curl/curl.h | 4 ++++ include/curl/typecheck-gcc.h | 2 ++ 2 files changed, 6 insertions(+) (limited to 'include') diff --git a/include/curl/curl.h b/include/curl/curl.h index d93fd6764..d6db92fb7 100644 --- a/include/curl/curl.h +++ b/include/curl/curl.h @@ -1141,6 +1141,10 @@ typedef enum { working with OpenSSL-powered builds. */ CINIT(CERTINFO, LONG, 172), + /* "name" and "pwd" to use when fetching. */ + CINIT(USERNAME, OBJECTPOINT, 173), + CINIT(PASSWORD, OBJECTPOINT, 174), + CURLOPT_LASTENTRY /* the last unused */ } CURLoption; diff --git a/include/curl/typecheck-gcc.h b/include/curl/typecheck-gcc.h index bd0b0b7bb..33e264771 100644 --- a/include/curl/typecheck-gcc.h +++ b/include/curl/typecheck-gcc.h @@ -196,6 +196,8 @@ _CURL_WARNING(_curl_easy_getinfo_err_curl_slist, (option) == CURLOPT_INTERFACE || \ (option) == CURLOPT_NETRC_FILE || \ (option) == CURLOPT_USERPWD || \ + (option) == CURLOPT_USERNAME || \ + (option) == CURLOPT_PASSWORD || \ (option) == CURLOPT_PROXYUSERPWD || \ (option) == CURLOPT_ENCODING || \ (option) == CURLOPT_REFERER || \ -- cgit v1.2.1 From ebadeff0caa424013a729d3ad1e7210142bc781f Mon Sep 17 00:00:00 2001 From: Yang Tse Date: Thu, 9 Oct 2008 00:07:56 +0000 Subject: fix compiler warning: zero used for undefined preprocessing identifier --- include/curl/curl.h | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'include') diff --git a/include/curl/curl.h b/include/curl/curl.h index d6db92fb7..7a0960f03 100644 --- a/include/curl/curl.h +++ b/include/curl/curl.h @@ -1779,7 +1779,8 @@ CURL_EXTERN CURLcode curl_easy_pause(CURL *handle, int bitmask); #include "multi.h" /* the typechecker doesn't work in C++ (yet) */ -#if (__GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 3)) && \ +#if defined(__GNUC__) && defined(__GNUC_MINOR__) && \ + ((__GNUC__ > 4) || (__GNUC__ == 4 && __GNUC_MINOR__ >= 3)) && \ !defined(__cplusplus) && !defined(CURL_DISABLE_TYPECHECK) #include "typecheck-gcc.h" #else -- cgit v1.2.1 From a9a4300a367a4beeef0674240e6721d68f1b1ae3 Mon Sep 17 00:00:00 2001 From: Daniel Stenberg Date: Thu, 16 Oct 2008 20:21:22 +0000 Subject: - Igor Novoseltsev added CURLOPT_PROXYUSER and CURLOPT_PROXYPASSWORD that then make CURLOPT_PROXYUSERPWD sort of deprecated. The primary motive for adding these new options is that they have no problems with the colon separator that the CURLOPT_PROXYUSERPWD option does. --- include/curl/curl.h | 4 ++++ include/curl/typecheck-gcc.h | 4 +++- 2 files changed, 7 insertions(+), 1 deletion(-) (limited to 'include') diff --git a/include/curl/curl.h b/include/curl/curl.h index 7a0960f03..0d4fdbbb2 100644 --- a/include/curl/curl.h +++ b/include/curl/curl.h @@ -1144,6 +1144,10 @@ typedef enum { /* "name" and "pwd" to use when fetching. */ CINIT(USERNAME, OBJECTPOINT, 173), CINIT(PASSWORD, OBJECTPOINT, 174), + + /* "name" and "pwd" to use with Proxy when fetching. */ + CINIT(PROXYUSERNAME, OBJECTPOINT, 175), + CINIT(PROXYPASSWORD, OBJECTPOINT, 176), CURLOPT_LASTENTRY /* the last unused */ } CURLoption; diff --git a/include/curl/typecheck-gcc.h b/include/curl/typecheck-gcc.h index 33e264771..6f5313f1f 100644 --- a/include/curl/typecheck-gcc.h +++ b/include/curl/typecheck-gcc.h @@ -198,7 +198,9 @@ _CURL_WARNING(_curl_easy_getinfo_err_curl_slist, (option) == CURLOPT_USERPWD || \ (option) == CURLOPT_USERNAME || \ (option) == CURLOPT_PASSWORD || \ - (option) == CURLOPT_PROXYUSERPWD || \ + (option) == CURLOPT_PROXYUSERPWD || \ + (option) == CURLOPT_PROXYUSERNAME || \ + (option) == CURLOPT_PROXYPASSWORD || \ (option) == CURLOPT_ENCODING || \ (option) == CURLOPT_REFERER || \ (option) == CURLOPT_USERAGENT || \ -- cgit v1.2.1 From 98b13037e7a853d28d34a49f5d01b60480a67957 Mon Sep 17 00:00:00 2001 From: Yang Tse Date: Fri, 17 Oct 2008 03:59:02 +0000 Subject: remove some spurious line-endings --- include/curl/curl.h | 8 ++++---- include/curl/typecheck-gcc.h | 6 +++--- 2 files changed, 7 insertions(+), 7 deletions(-) (limited to 'include') diff --git a/include/curl/curl.h b/include/curl/curl.h index 0d4fdbbb2..daa925fa8 100644 --- a/include/curl/curl.h +++ b/include/curl/curl.h @@ -1144,10 +1144,10 @@ typedef enum { /* "name" and "pwd" to use when fetching. */ CINIT(USERNAME, OBJECTPOINT, 173), CINIT(PASSWORD, OBJECTPOINT, 174), - - /* "name" and "pwd" to use with Proxy when fetching. */ - CINIT(PROXYUSERNAME, OBJECTPOINT, 175), - CINIT(PROXYPASSWORD, OBJECTPOINT, 176), + + /* "name" and "pwd" to use with Proxy when fetching. */ + CINIT(PROXYUSERNAME, OBJECTPOINT, 175), + CINIT(PROXYPASSWORD, OBJECTPOINT, 176), CURLOPT_LASTENTRY /* the last unused */ } CURLoption; diff --git a/include/curl/typecheck-gcc.h b/include/curl/typecheck-gcc.h index 6f5313f1f..41cc7598e 100644 --- a/include/curl/typecheck-gcc.h +++ b/include/curl/typecheck-gcc.h @@ -198,9 +198,9 @@ _CURL_WARNING(_curl_easy_getinfo_err_curl_slist, (option) == CURLOPT_USERPWD || \ (option) == CURLOPT_USERNAME || \ (option) == CURLOPT_PASSWORD || \ - (option) == CURLOPT_PROXYUSERPWD || \ - (option) == CURLOPT_PROXYUSERNAME || \ - (option) == CURLOPT_PROXYPASSWORD || \ + (option) == CURLOPT_PROXYUSERPWD || \ + (option) == CURLOPT_PROXYUSERNAME || \ + (option) == CURLOPT_PROXYPASSWORD || \ (option) == CURLOPT_ENCODING || \ (option) == CURLOPT_REFERER || \ (option) == CURLOPT_USERAGENT || \ -- cgit v1.2.1 From b8092857d94786298e50113d201a7610edba4516 Mon Sep 17 00:00:00 2001 From: Daniel Stenberg Date: Wed, 5 Nov 2008 12:17:30 +0000 Subject: and we're back on square one working on the next release... --- include/curl/curlver.h | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'include') diff --git a/include/curl/curlver.h b/include/curl/curlver.h index f4302a4da..ae8963512 100644 --- a/include/curl/curlver.h +++ b/include/curl/curlver.h @@ -31,13 +31,13 @@ /* This is the version number of the libcurl package from which this header file origins: */ -#define LIBCURL_VERSION "7.19.1-CVS" +#define LIBCURL_VERSION "7.19.2-CVS" /* The numeric version number is also available "in parts" by using these defines: */ #define LIBCURL_VERSION_MAJOR 7 #define LIBCURL_VERSION_MINOR 19 -#define LIBCURL_VERSION_PATCH 1 +#define LIBCURL_VERSION_PATCH 2 /* This is the numeric version of the libcurl version number, meant for easier parsing and comparions by programs. The LIBCURL_VERSION_NUM define will @@ -54,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 0x071301 +#define LIBCURL_VERSION_NUM 0x071302 /* * This is the date and time when the full source package was created. The -- cgit v1.2.1 From ae6530ee82fc81506ec7c34ffea4fcf3be7c3717 Mon Sep 17 00:00:00 2001 From: Daniel Stenberg Date: Thu, 13 Nov 2008 13:24:00 +0000 Subject: and we are now on the 7.19.3 road --- include/curl/curlver.h | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'include') diff --git a/include/curl/curlver.h b/include/curl/curlver.h index ae8963512..254b0ed91 100644 --- a/include/curl/curlver.h +++ b/include/curl/curlver.h @@ -31,13 +31,13 @@ /* This is the version number of the libcurl package from which this header file origins: */ -#define LIBCURL_VERSION "7.19.2-CVS" +#define LIBCURL_VERSION "7.19.3-CVS" /* The numeric version number is also available "in parts" by using these defines: */ #define LIBCURL_VERSION_MAJOR 7 #define LIBCURL_VERSION_MINOR 19 -#define LIBCURL_VERSION_PATCH 2 +#define LIBCURL_VERSION_PATCH 3 /* This is the numeric version of the libcurl version number, meant for easier parsing and comparions by programs. The LIBCURL_VERSION_NUM define will @@ -54,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 0x071302 +#define LIBCURL_VERSION_NUM 0x071303 /* * This is the date and time when the full source package was created. The -- cgit v1.2.1 From 6e376532b00879ead13d5e07453ab8dd0d97571e Mon Sep 17 00:00:00 2001 From: Daniel Stenberg Date: Wed, 10 Dec 2008 23:13:31 +0000 Subject: - Internet Explorer had a broken HTTP digest authentication before v7 and there are servers "out there" that relies on the client doing this broken Digest authentication. Apache even comes with an option to work with such broken clients. The difference is only for URLs that contain a query-part (a '?'-letter and text to the right of it). libcurl now supports this quirk, and you enable it by setting the CURLAUTH_DIGEST_IE bit in the bitmask you pass to the CURLOPT_HTTPAUTH or CURLOPT_PROXYAUTH options. They are thus individually controlled to server and proxy. --- include/curl/curl.h | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'include') diff --git a/include/curl/curl.h b/include/curl/curl.h index daa925fa8..e94ff5f9d 100644 --- a/include/curl/curl.h +++ b/include/curl/curl.h @@ -474,8 +474,9 @@ typedef enum { #define CURLAUTH_DIGEST (1<<1) /* Digest */ #define CURLAUTH_GSSNEGOTIATE (1<<2) /* GSS-Negotiate */ #define CURLAUTH_NTLM (1<<3) /* NTLM */ -#define CURLAUTH_ANY ~0 /* all types set */ -#define CURLAUTH_ANYSAFE (~CURLAUTH_BASIC) +#define CURLAUTH_DIGEST_IE (1<<4) /* Digest with IE flavour */ +#define CURLAUTH_ANY (~CURLAUTH_DIGEST_IE) /* all fine types set */ +#define CURLAUTH_ANYSAFE (~(CURLAUTH_BASIC|CURLAUTH_DIGEST_IE)) #define CURLSSH_AUTH_ANY ~0 /* all types supported by the server */ #define CURLSSH_AUTH_NONE 0 /* none allowed, silly but complete */ -- cgit v1.2.1 From 0de0e95020af9da8d2bec884964ee491d9b42da5 Mon Sep 17 00:00:00 2001 From: Daniel Stenberg Date: Tue, 13 Jan 2009 22:01:39 +0000 Subject: - Stefan Teleman brought a patch to fix the default curlbuild.h file for the SunPro compilers. --- include/curl/curlbuild.h.dist | 26 ++++++++++++++++++++++++++ 1 file changed, 26 insertions(+) (limited to 'include') diff --git a/include/curl/curlbuild.h.dist b/include/curl/curlbuild.h.dist index cabe8c645..fe38f0f59 100644 --- a/include/curl/curlbuild.h.dist +++ b/include/curl/curlbuild.h.dist @@ -438,6 +438,32 @@ # endif # endif +/* ===================================== */ +/* SunPro Compilers */ +/* ===================================== */ + +#elif defined(__SUNPRO_C) || defined(__SUNPRO_CC) +#include +#include + +# define CURL_TYPEOF_CURL_OFF_T off_t +# define CURL_SIZEOF_CURL_OFF_T 8 +# if defined(__amd64) || defined(__sparcv9) +# define CURL_SIZEOF_LONG 8 +# define CURL_FORMAT_CURL_OFF_T "ld" +# define CURL_FORMAT_CURL_OFF_TU "lu" +# define CURL_FORMAT_OFF_T "%ld" +# define CURL_SUFFIX_CURL_OFF_T L +# define CURL_SUFFIX_CURL_OFF_TU UL +# else +# define CURL_SIZEOF_LONG 4 +# define CURL_FORMAT_CURL_OFF_T "lld" +# define CURL_FORMAT_CURL_OFF_TU "llu" +# define CURL_FORMAT_OFF_T "%lld" +# define CURL_SUFFIX_CURL_OFF_T LL +# define CURL_SUFFIX_CURL_OFF_TU ULL +# endif + /* ===================================== */ /* KEEP MSVC THE PENULTIMATE ENTRY */ /* ===================================== */ -- cgit v1.2.1 From 37c5250e03b2bea485749819f7a7a6101149cee4 Mon Sep 17 00:00:00 2001 From: Daniel Stenberg Date: Fri, 16 Jan 2009 08:36:40 +0000 Subject: - Andrew de los Reyes fixed curlbuild.h for "generic" gcc builds on PPC, both 32 bit and 64 bit. --- include/curl/curlbuild.h.dist | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'include') diff --git a/include/curl/curlbuild.h.dist b/include/curl/curlbuild.h.dist index fe38f0f59..247213cd4 100644 --- a/include/curl/curlbuild.h.dist +++ b/include/curl/curlbuild.h.dist @@ -7,7 +7,7 @@ * | (__| |_| | _ <| |___ * \___|\___/|_| \_\_____| * - * Copyright (C) 1998 - 2008, Daniel Stenberg, , et al. + * Copyright (C) 1998 - 2009, 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 @@ -494,7 +494,7 @@ /* ===================================== */ #elif defined(__GNUC__) -# if defined(__i386__) +# if defined(__i386__) || defined(__ppc__) # define CURL_SIZEOF_LONG 4 # define CURL_TYPEOF_CURL_OFF_T long long # define CURL_FORMAT_CURL_OFF_T "lld" @@ -503,7 +503,7 @@ # define CURL_SIZEOF_CURL_OFF_T 8 # define CURL_SUFFIX_CURL_OFF_T LL # define CURL_SUFFIX_CURL_OFF_TU ULL -# elif defined(__x86_64__) +# elif defined(__x86_64__) || defined(__ppc64__) # define CURL_SIZEOF_LONG 8 # define CURL_TYPEOF_CURL_OFF_T long # define CURL_FORMAT_CURL_OFF_T "ld" -- cgit v1.2.1 From 3fa6c51bb145a2cd81daac5d56cbee9ca9652288 Mon Sep 17 00:00:00 2001 From: Gunter Knauf Date: Sat, 17 Jan 2009 14:56:33 +0000 Subject: fixed global copyright. --- include/curl/curlver.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'include') diff --git a/include/curl/curlver.h b/include/curl/curlver.h index 254b0ed91..29ac96184 100644 --- a/include/curl/curlver.h +++ b/include/curl/curlver.h @@ -7,7 +7,7 @@ * | (__| |_| | _ <| |___ * \___|\___/|_| \_\_____| * - * Copyright (C) 1998 - 2008, Daniel Stenberg, , et al. + * Copyright (C) 1998 - 2009, 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 @@ -27,7 +27,7 @@ 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, ." +#define LIBCURL_COPYRIGHT "1996 - 2009 Daniel Stenberg, ." /* This is the version number of the libcurl package from which this header file origins: */ -- cgit v1.2.1 From 718004d9b5b6301d495a9e032ffad43247b32f2e Mon Sep 17 00:00:00 2001 From: Daniel Stenberg Date: Mon, 19 Jan 2009 10:11:25 +0000 Subject: start over on our journey towards 7.19.4... --- include/curl/curlver.h | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'include') diff --git a/include/curl/curlver.h b/include/curl/curlver.h index 29ac96184..e8b938d46 100644 --- a/include/curl/curlver.h +++ b/include/curl/curlver.h @@ -31,13 +31,13 @@ /* This is the version number of the libcurl package from which this header file origins: */ -#define LIBCURL_VERSION "7.19.3-CVS" +#define LIBCURL_VERSION "7.19.4-CVS" /* The numeric version number is also available "in parts" by using these defines: */ #define LIBCURL_VERSION_MAJOR 7 #define LIBCURL_VERSION_MINOR 19 -#define LIBCURL_VERSION_PATCH 3 +#define LIBCURL_VERSION_PATCH 4 /* This is the numeric version of the libcurl version number, meant for easier parsing and comparions by programs. The LIBCURL_VERSION_NUM define will @@ -54,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 0x071303 +#define LIBCURL_VERSION_NUM 0x071304 /* * This is the date and time when the full source package was created. The -- cgit v1.2.1 From 5aeef9c1c87f2f72f10807a609ced1976ab46cd2 Mon Sep 17 00:00:00 2001 From: Daniel Stenberg Date: Sun, 25 Jan 2009 23:26:25 +0000 Subject: - Craig A West brought CURLOPT_NOPROXY and the corresponding --noproxy option. They basically offer the same thing the NO_PROXY environment variable only offered previously: list a set of host names that shall not use the proxy even if one is specified. --- include/curl/curl.h | 11 ++++++++++- include/curl/typecheck-gcc.h | 3 ++- 2 files changed, 12 insertions(+), 2 deletions(-) (limited to 'include') diff --git a/include/curl/curl.h b/include/curl/curl.h index e94ff5f9d..830e8a1d8 100644 --- a/include/curl/curl.h +++ b/include/curl/curl.h @@ -7,7 +7,7 @@ * | (__| |_| | _ <| |___ * \___|\___/|_| \_\_____| * - * Copyright (C) 1998 - 2008, Daniel Stenberg, , et al. + * Copyright (C) 1998 - 2009, 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 @@ -1150,6 +1150,15 @@ typedef enum { CINIT(PROXYUSERNAME, OBJECTPOINT, 175), CINIT(PROXYPASSWORD, OBJECTPOINT, 176), + /* Comma separated list of hostnames defining no-proxy zones. These should + match both hostnames directly, and hostnames within a domain. For + example, local.com will match local.com and www.local.com, but NOT + notlocal.com or www.notlocal.com. For compatibility with other + implementations of this, .local.com will be considered to be the same as + local.com. A single * is the only valid wildcard, and effectively + disables the use of proxy. */ + CINIT(NOPROXY, OBJECTPOINT, 177), + CURLOPT_LASTENTRY /* the last unused */ } CURLoption; diff --git a/include/curl/typecheck-gcc.h b/include/curl/typecheck-gcc.h index 41cc7598e..39fad7acb 100644 --- a/include/curl/typecheck-gcc.h +++ b/include/curl/typecheck-gcc.h @@ -7,7 +7,7 @@ * | (__| |_| | _ <| |___ * \___|\___/|_| \_\_____| * - * Copyright (C) 1998 - 2008, Daniel Stenberg, , et al. + * Copyright (C) 1998 - 2009, 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 @@ -201,6 +201,7 @@ _CURL_WARNING(_curl_easy_getinfo_err_curl_slist, (option) == CURLOPT_PROXYUSERPWD || \ (option) == CURLOPT_PROXYUSERNAME || \ (option) == CURLOPT_PROXYPASSWORD || \ + (option) == CURLOPT_NOPROXY || \ (option) == CURLOPT_ENCODING || \ (option) == CURLOPT_REFERER || \ (option) == CURLOPT_USERAGENT || \ -- cgit v1.2.1 From 0516ce7786e9500c2e447d48aa9b3f24a6ca70f9 Mon Sep 17 00:00:00 2001 From: Daniel Stenberg Date: Mon, 26 Jan 2009 22:43:06 +0000 Subject: - Chad Monroe provided the new CURLOPT_TFTP_BLKSIZE option that allows an app to set desired block size to use for TFTP transfers instead of the default 512 bytes. --- include/curl/curl.h | 3 +++ 1 file changed, 3 insertions(+) (limited to 'include') diff --git a/include/curl/curl.h b/include/curl/curl.h index 830e8a1d8..0b9ec4aef 100644 --- a/include/curl/curl.h +++ b/include/curl/curl.h @@ -1159,6 +1159,9 @@ typedef enum { disables the use of proxy. */ CINIT(NOPROXY, OBJECTPOINT, 177), + /* block size for TFTP transfers */ + CINIT(TFTP_BLKSIZE, LONG, 178), + CURLOPT_LASTENTRY /* the last unused */ } CURLoption; -- cgit v1.2.1 From de4610a55f9e99bebaf448ca33e2e43baf977c74 Mon Sep 17 00:00:00 2001 From: Daniel Stenberg Date: Wed, 28 Jan 2009 21:33:58 +0000 Subject: - Markus Moeller introduced two new options to libcurl: CURLOPT_SOCKS5_GSSAPI_SERVICE and CURLOPT_SOCKS5_GSSAPI_NEC to allow libcurl to do GSS-style authentication with SOCKS5 proxies. The curl tool got the options called --socks5-gssapi-service and --socks5-gssapi-nec to enable these. --- include/curl/curl.h | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'include') diff --git a/include/curl/curl.h b/include/curl/curl.h index 0b9ec4aef..005a613f0 100644 --- a/include/curl/curl.h +++ b/include/curl/curl.h @@ -1162,6 +1162,12 @@ typedef enum { /* block size for TFTP transfers */ CINIT(TFTP_BLKSIZE, LONG, 178), + /* Socks Service */ + CINIT(SOCKS5_GSSAPI_SERVICE, LONG, 179), + + /* Socks Service */ + CINIT(SOCKS5_GSSAPI_NEC, LONG, 180), + CURLOPT_LASTENTRY /* the last unused */ } CURLoption; -- cgit v1.2.1 From bdd4294e79eea15cb6f312f7ee7d388ad40a65e3 Mon Sep 17 00:00:00 2001 From: Daniel Stenberg Date: Mon, 2 Feb 2009 16:19:23 +0000 Subject: - Craig A West brought us: libcurl now defaults to do CONNECT with HTTP version 1.1 instead of 1.0 like before. This change also introduces the new proxy type for libcurl called 'CURLPROXY_HTTP_1_0' that then allows apps to switch (back) to CONNECT 1.0 requests. The curl tool also got a --proxy1.0 option that works exactly like --proxy but sets CURLPROXY_HTTP_1_0. I updated all test cases cases that use CONNECT and I tried to do some using --proxy1.0 and some updated to do CONNECT 1.1 to get both versions run. --- include/curl/curl.h | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'include') diff --git a/include/curl/curl.h b/include/curl/curl.h index 005a613f0..71283c0ed 100644 --- a/include/curl/curl.h +++ b/include/curl/curl.h @@ -459,7 +459,10 @@ typedef CURLcode (*curl_ssl_ctx_callback)(CURL *curl, /* easy handle */ void *userptr); typedef enum { - CURLPROXY_HTTP = 0, /* added in 7.10 */ + CURLPROXY_HTTP = 0, /* added in 7.10, new in 7.19.4 default is to use + CONNECT HTTP/1.1 */ + CURLPROXY_HTTP_1_0 = 1, /* added in 7.19.4, force to use CONNECT + HTTP/1.0 */ CURLPROXY_SOCKS4 = 4, /* support added in 7.15.2, enum existed already in 7.10 */ CURLPROXY_SOCKS5 = 5, /* added in 7.10 */ -- cgit v1.2.1 From 77fd094090749c32deef62acd2744060b0ab00df Mon Sep 17 00:00:00 2001 From: Daniel Stenberg Date: Tue, 10 Feb 2009 12:34:41 +0000 Subject: remove a trailing name from a comment --- include/curl/curl.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'include') diff --git a/include/curl/curl.h b/include/curl/curl.h index 71283c0ed..a5d5deec7 100644 --- a/include/curl/curl.h +++ b/include/curl/curl.h @@ -871,7 +871,7 @@ typedef enum { /* DNS cache timeout */ CINIT(DNS_CACHE_TIMEOUT, LONG, 92), - /* send linked-list of pre-transfer QUOTE commands (Wesley Laxton)*/ + /* send linked-list of pre-transfer QUOTE commands */ CINIT(PREQUOTE, OBJECTPOINT, 93), /* set the debug function */ -- cgit v1.2.1 From 002cf105c6779ecf66acb36ba86aa415b8b98b09 Mon Sep 17 00:00:00 2001 From: Daniel Stenberg Date: Wed, 11 Feb 2009 21:47:14 +0000 Subject: - CURLINFO_CONDITION_UNMET was added to allow an application to get to know if the condition in the previous request was unmet. This is typically a time condition set with CURLOPT_TIMECONDITION and was previously not possible to reliably figure out. From bug report #2565128 (http://curl.haxx.se/bug/view.cgi?id=2565128) --- include/curl/curl.h | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'include') diff --git a/include/curl/curl.h b/include/curl/curl.h index a5d5deec7..3cbf69f7c 100644 --- a/include/curl/curl.h +++ b/include/curl/curl.h @@ -1592,9 +1592,10 @@ typedef enum { CURLINFO_PRIMARY_IP = CURLINFO_STRING + 32, CURLINFO_APPCONNECT_TIME = CURLINFO_DOUBLE + 33, CURLINFO_CERTINFO = CURLINFO_SLIST + 34, + CURLINFO_CONDITION_UNMET = CURLINFO_LONG + 35, /* Fill in new entries below here! */ - CURLINFO_LASTONE = 34 + CURLINFO_LASTONE = 35 } CURLINFO; /* CURLINFO_RESPONSE_CODE is the new name for the option previously known as -- cgit v1.2.1 From 8f81fd6be5d3a480eca3f7ebbded5113f66c64be Mon Sep 17 00:00:00 2001 From: Daniel Stenberg Date: Tue, 17 Feb 2009 09:07:25 +0000 Subject: - CURLOPT_FTP_CREATE_MISSING_DIRS can now be set to 2 in addition to 1 for plain FTP connections, and it will then allow MKD to fail once and retry the CWD afterwards. This is especially useful if you're doing many simultanoes connections against the same server and they all have this option enabled, as then CWD may first fail but then another connection does MKD before this connection and thus MKD fails but trying CWD works! The numbers can (should?) now be set with the convenience enums now called CURLFTP_CREATE_DIR and CURLFTP_CREATE_DIR_RETRY. Tests has proven that if you're making an application that uploads a set of files to an ftp server, you will get a noticable gain in speed if you're using multiple connections and this option will be then be very useful. --- include/curl/curl.h | 16 +++++++++++++++- 1 file changed, 15 insertions(+), 1 deletion(-) (limited to 'include') diff --git a/include/curl/curl.h b/include/curl/curl.h index 3cbf69f7c..69fe45757 100644 --- a/include/curl/curl.h +++ b/include/curl/curl.h @@ -530,6 +530,17 @@ typedef enum { CURLFTPAUTH_LAST /* not an option, never use */ } curl_ftpauth; +/* parameter for the CURLOPT_FTP_CREATE_MISSING_DIRS option */ +typedef enum { + CURLFTP_CREATE_DIR_NONE, /* do NOT create missing dirs! */ + CURLFTP_CREATE_DIR, /* (FTP/SFTP) if CWD fails, try MKD and then CWD + again if MKD succeeded, for SFTP this does + similar magic */ + CURLFTP_CREATE_DIR_RETRY, /* (FTP only) if CWD fails, try MKD and then CWD + again even if MKD failed! */ + CURLFTP_CREATE_DIR_LAST /* not an option, never use */ +} curl_ftpcreatedir; + /* parameter for the CURLOPT_FTP_FILEMETHOD option */ typedef enum { CURLFTPMETHOD_DEFAULT, /* let libcurl pick */ @@ -936,7 +947,10 @@ typedef enum { argument */ CINIT(SSL_CTX_DATA, OBJECTPOINT, 109), - /* FTP Option that causes missing dirs to be created on the remote server */ + /* FTP Option that causes missing dirs to be created on the remote server. + In 7.19.4 we introduced the convenience enums for this option using the + CURLFTP_CREATE_DIR prefix. + */ CINIT(FTP_CREATE_MISSING_DIRS, LONG, 110), /* Set this to a bitmask value to enable the particular authentications -- cgit v1.2.1 From 042cc1f69ec0878f542667cb684378869f859911 Mon Sep 17 00:00:00 2001 From: Daniel Stenberg Date: Mon, 2 Mar 2009 23:05:31 +0000 Subject: - David Kierznowski notified us about a security flaw (http://curl.haxx.se/docs/adv_20090303.html also known as CVE-2009-0037) in which previous libcurl versions (by design) can be tricked to access an arbitrary local/different file instead of a remote one when CURLOPT_FOLLOWLOCATION is enabled. This flaw is now fixed in this release together this the addition of two new setopt options for controlling this new behavior: o CURLOPT_REDIR_PROTOCOLS controls what protocols libcurl is allowed to follow to when CURLOPT_FOLLOWLOCATION is enabled. By default, this option excludes the FILE and SCP protocols and thus you nee to explicitly allow them in your app if you really want that behavior. o CURLOPT_PROTOCOLS controls what protocol(s) libcurl is allowed to fetch using the primary URL option. This is useful if you want to allow a user or other outsiders control what URL to pass to libcurl and yet not allow all protocols libcurl may have been built to support. --- include/curl/curl.h | 27 +++++++++++++++++++++++++++ 1 file changed, 27 insertions(+) (limited to 'include') diff --git a/include/curl/curl.h b/include/curl/curl.h index 69fe45757..8d952caab 100644 --- a/include/curl/curl.h +++ b/include/curl/curl.h @@ -550,6 +550,21 @@ typedef enum { CURLFTPMETHOD_LAST /* not an option, never use */ } curl_ftpmethod; +/* CURLPROTO_ defines are for the CURLOPT_*PROTOCOLS options */ +#define CURLPROTO_HTTP (1<<0) +#define CURLPROTO_HTTPS (1<<1) +#define CURLPROTO_FTP (1<<2) +#define CURLPROTO_FTPS (1<<3) +#define CURLPROTO_SCP (1<<4) +#define CURLPROTO_SFTP (1<<5) +#define CURLPROTO_TELNET (1<<6) +#define CURLPROTO_LDAP (1<<7) +#define CURLPROTO_LDAPS (1<<8) +#define CURLPROTO_DICT (1<<9) +#define CURLPROTO_FILE (1<<10) +#define CURLPROTO_TFTP (1<<11) +#define CURLPROTO_ALL (~0) /* enable everything */ + /* long may be 32 or 64 bits, but we should never depend on anything else but 32 */ #define CURLOPTTYPE_LONG 0 @@ -1185,6 +1200,18 @@ typedef enum { /* Socks Service */ CINIT(SOCKS5_GSSAPI_NEC, LONG, 180), + /* set the bitmask for the protocols that are allowed to be used for the + transfer, which thus helps the app which takes URLs from users or other + external inputs and want to restrict what protocol(s) to deal + with. Defaults to CURLPROTO_ALL. */ + CINIT(PROTOCOLS, LONG, 181), + + /* set the bitmask for the protocols that libcurl is allowed to follow to, + as a subset of the CURLOPT_PROTOCOLS ones. That means the protocol needs + to be set in both bitmasks to be allowed to get redirected to. Defaults + to all protocols except FILE and SCP. */ + CINIT(REDIR_PROTOCOLS, LONG, 182), + CURLOPT_LASTENTRY /* the last unused */ } CURLoption; -- cgit v1.2.1 From a1f455551f6dee3c625f2028fe556da5bf2f8fd6 Mon Sep 17 00:00:00 2001 From: Daniel Stenberg Date: Mon, 2 Mar 2009 23:44:42 +0000 Subject: start over on the journey towards 7.19.5 --- include/curl/curlver.h | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'include') diff --git a/include/curl/curlver.h b/include/curl/curlver.h index e8b938d46..fea3884a3 100644 --- a/include/curl/curlver.h +++ b/include/curl/curlver.h @@ -31,13 +31,13 @@ /* This is the version number of the libcurl package from which this header file origins: */ -#define LIBCURL_VERSION "7.19.4-CVS" +#define LIBCURL_VERSION "7.19.5-CVS" /* The numeric version number is also available "in parts" by using these defines: */ #define LIBCURL_VERSION_MAJOR 7 #define LIBCURL_VERSION_MINOR 19 -#define LIBCURL_VERSION_PATCH 4 +#define LIBCURL_VERSION_PATCH 5 /* This is the numeric version of the libcurl version number, meant for easier parsing and comparions by programs. The LIBCURL_VERSION_NUM define will @@ -54,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 0x071304 +#define LIBCURL_VERSION_NUM 0x071305 /* * This is the date and time when the full source package was created. The -- cgit v1.2.1 From 6173e38fdcf5a9db84be511dfcf0037b8339c0bb Mon Sep 17 00:00:00 2001 From: Daniel Stenberg Date: Wed, 11 Mar 2009 22:56:03 +0000 Subject: - Kamil Dudka made the curl tool properly call curl_global_init() before any other libcurl function. --- include/curl/curl.h | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'include') diff --git a/include/curl/curl.h b/include/curl/curl.h index 8d952caab..7ecb6317b 100644 --- a/include/curl/curl.h +++ b/include/curl/curl.h @@ -1510,7 +1510,9 @@ CURL_EXTERN void curl_free(void *p); * DESCRIPTION * * curl_global_init() should be invoked exactly once for each application that - * uses libcurl + * uses libcurl and before any call of other libcurl function. + * + * This function is not thread-safe! */ CURL_EXTERN CURLcode curl_global_init(long flags); -- cgit v1.2.1 From 4c5307b45655ba75ab066564afdc0c111a8b9291 Mon Sep 17 00:00:00 2001 From: Benoit Neil Date: Thu, 2 Apr 2009 13:14:53 +0000 Subject: Initial CMake scripts (libcurl only), based on the merge of tetest scripts and mine. These are far to be functionnal yet. PS: Hello world :) --- include/curl/curlbuild.h.cmake | 153 +++++++++++++++++++++++++++++++++++++++++ 1 file changed, 153 insertions(+) create mode 100644 include/curl/curlbuild.h.cmake (limited to 'include') diff --git a/include/curl/curlbuild.h.cmake b/include/curl/curlbuild.h.cmake new file mode 100644 index 000000000..07fcc1aeb --- /dev/null +++ b/include/curl/curlbuild.h.cmake @@ -0,0 +1,153 @@ +#ifndef __CURL_CURLBUILD_H +#define __CURL_CURLBUILD_H +/*************************************************************************** + * _ _ ____ _ + * Project ___| | | | _ \| | + * / __| | | | |_) | | + * | (__| |_| | _ <| |___ + * \___|\___/|_| \_\_____| + * + * 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 + * are also available at http://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 + * furnished to do so, under the terms of the COPYING file. + * + * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY + * KIND, either express or implied. + * + * $Id$ + ***************************************************************************/ + +/* ================================================================ */ +/* NOTES FOR CONFIGURE CAPABLE SYSTEMS */ +/* ================================================================ */ + +/* + * NOTE 1: + * ------- + * + * Nothing in this file is intended to be modified or adjusted by the + * curl library user nor by the curl library builder. + * + * If you think that something actually needs to be changed, adjusted + * or fixed in this file, then, report it on the libcurl development + * mailing list: http://cool.haxx.se/mailman/listinfo/curl-library/ + * + * This header file shall only export symbols which are 'curl' or 'CURL' + * prefixed, otherwise public name space would be polluted. + * + * NOTE 2: + * ------- + * + * Right now you might be staring at file include/curl/curlbuild.h.in or + * at file include/curl/curlbuild.h, this is due to the following reason: + * + * On systems capable of running the configure script, the configure process + * will overwrite the distributed include/curl/curlbuild.h file with one that + * is suitable and specific to the library being configured and built, which + * is generated from the include/curl/curlbuild.h.in template file. + * + */ + +/* ================================================================ */ +/* DEFINITION OF THESE SYMBOLS SHALL NOT TAKE PLACE ANYWHERE ELSE */ +/* ================================================================ */ + +#ifdef CURL_SIZEOF_LONG +# error "CURL_SIZEOF_LONG shall not be defined except in curlbuild.h" + Error Compilation_aborted_CURL_SIZEOF_LONG_already_defined +#endif + +#ifdef CURL_TYPEOF_CURL_OFF_T +# error "CURL_TYPEOF_CURL_OFF_T shall not be defined except in curlbuild.h" + Error Compilation_aborted_CURL_TYPEOF_CURL_OFF_T_already_defined +#endif + +#ifdef CURL_FORMAT_CURL_OFF_T +# error "CURL_FORMAT_CURL_OFF_T shall not be defined except in curlbuild.h" + Error Compilation_aborted_CURL_FORMAT_CURL_OFF_T_already_defined +#endif + +#ifdef CURL_FORMAT_CURL_OFF_TU +# error "CURL_FORMAT_CURL_OFF_TU shall not be defined except in curlbuild.h" + Error Compilation_aborted_CURL_FORMAT_CURL_OFF_TU_already_defined +#endif + +#ifdef CURL_FORMAT_OFF_T +# error "CURL_FORMAT_OFF_T shall not be defined except in curlbuild.h" + Error Compilation_aborted_CURL_FORMAT_OFF_T_already_defined +#endif + +#ifdef CURL_SIZEOF_CURL_OFF_T +# error "CURL_SIZEOF_CURL_OFF_T shall not be defined except in curlbuild.h" + Error Compilation_aborted_CURL_SIZEOF_CURL_OFF_T_already_defined +#endif + +#ifdef CURL_SUFFIX_CURL_OFF_T +# error "CURL_SUFFIX_CURL_OFF_T shall not be defined except in curlbuild.h" + Error Compilation_aborted_CURL_SUFFIX_CURL_OFF_T_already_defined +#endif + +#ifdef CURL_SUFFIX_CURL_OFF_TU +# error "CURL_SUFFIX_CURL_OFF_TU shall not be defined except in curlbuild.h" + Error Compilation_aborted_CURL_SUFFIX_CURL_OFF_TU_already_defined +#endif + +/* ================================================================ */ +/* EXTERNAL INTERFACE SETTINGS FOR CONFIGURE CAPABLE SYSTEMS ONLY */ +/* ================================================================ */ + +/* Configure process defines this to 1 when it finds out that system */ +/* header file sys/types.h must be included by the external interface. */ +#cmakedefine CURL_PULL_SYS_TYPES_H ${CURL_PULL_SYS_TYPES_H} +#ifdef CURL_PULL_SYS_TYPES_H +# include +#endif + +/* Configure process defines this to 1 when it finds out that system */ +/* header file stdint.h must be included by the external interface. */ +#cmakedefine CURL_PULL_STDINT_H ${CURL_PULL_STDINT_H} +#ifdef CURL_PULL_STDINT_H +# include +#endif + +/* Configure process defines this to 1 when it finds out that system */ +/* header file inttypes.h must be included by the external interface. */ +#cmakedefine CURL_PULL_INTTYPES_H ${CURL_PULL_INTTYPES_H} +#ifdef CURL_PULL_INTTYPES_H +# include +#endif + +/* The size of `long', as computed by sizeof. */ +#cmakedefine CURL_SIZEOF_LONG ${CURL_SIZEOF_LONG} + +/* Signed integral data type used for curl_off_t. */ +#cmakedefine CURL_TYPEOF_CURL_OFF_T ${CURL_TYPEOF_CURL_OFF_T} + +/* Data type definition of curl_off_t. */ +typedef CURL_TYPEOF_CURL_OFF_T curl_off_t; + +/* curl_off_t formatting string directive without "%" conversion specifier. */ +#cmakedefine CURL_FORMAT_CURL_OFF_T ${CURL_FORMAT_CURL_OFF_T} + +/* unsigned curl_off_t formatting string without "%" conversion specifier. */ +#cmakedefine CURL_FORMAT_CURL_OFF_TU ${CURL_FORMAT_CURL_OFF_TU} + +/* curl_off_t formatting string directive with "%" conversion specifier. */ +#cmakedefine CURL_FORMAT_OFF_T ${CURL_FORMAT_OFF_T} + +/* The size of `curl_off_t', as computed by sizeof. */ +#cmakedefine CURL_SIZEOF_CURL_OFF_T ${CURL_SIZEOF_CURL_OFF_T} + +/* curl_off_t constant suffix. */ +#cmakedefine CURL_SUFFIX_CURL_OFF_T ${CURL_SUFFIX_CURL_OFF_T} + +/* unsigned curl_off_t constant suffix. */ +#cmakedefine CURL_SUFFIX_CURL_OFF_TU ${CURL_SUFFIX_CURL_OFF_TU} + +#endif /* __CURL_CURLBUILD_H */ -- cgit v1.2.1 From 168fb3a8d89bd83c926f3fa2314e064294ebff0b Mon Sep 17 00:00:00 2001 From: Yang Tse Date: Thu, 2 Apr 2009 18:50:39 +0000 Subject: Fix curl_off_t definition for builds done using Sun compilers and a non-configured libcurl. In this case curl_off_t data type was gated to the off_t data type which depends on the _FILE_OFFSET_BITS. This configuration is exactly the unwanted configuration for our curl_off_t data type which must not depend on such setting. This breaks ABI for libcurl libraries built with Sun compilers which were built without having run the configure script with _FILE_OFFSET_BITS different than 64 and using the ILP32 data model. --- include/curl/curlbuild.h.dist | 44 +++++++++++++++++++++++++------------------ 1 file changed, 26 insertions(+), 18 deletions(-) (limited to 'include') diff --git a/include/curl/curlbuild.h.dist b/include/curl/curlbuild.h.dist index 247213cd4..bc5950df5 100644 --- a/include/curl/curlbuild.h.dist +++ b/include/curl/curlbuild.h.dist @@ -443,25 +443,33 @@ /* ===================================== */ #elif defined(__SUNPRO_C) || defined(__SUNPRO_CC) -#include -#include - -# define CURL_TYPEOF_CURL_OFF_T off_t -# define CURL_SIZEOF_CURL_OFF_T 8 -# if defined(__amd64) || defined(__sparcv9) -# define CURL_SIZEOF_LONG 8 -# define CURL_FORMAT_CURL_OFF_T "ld" -# define CURL_FORMAT_CURL_OFF_TU "lu" -# define CURL_FORMAT_OFF_T "%ld" -# define CURL_SUFFIX_CURL_OFF_T L -# define CURL_SUFFIX_CURL_OFF_TU UL +# if defined(_LP64) +# define CURL_SIZEOF_LONG 8 +# define CURL_TYPEOF_CURL_OFF_T long +# define CURL_FORMAT_CURL_OFF_T "ld" +# define CURL_FORMAT_CURL_OFF_TU "lu" +# define CURL_FORMAT_OFF_T "%ld" +# define CURL_SIZEOF_CURL_OFF_T 8 +# define CURL_SUFFIX_CURL_OFF_T L +# define CURL_SUFFIX_CURL_OFF_TU UL +# elif defined(__STDC__) && (__STDC__ == 1) +# define CURL_SIZEOF_LONG 4 +# define CURL_TYPEOF_CURL_OFF_T long +# define CURL_FORMAT_CURL_OFF_T "ld" +# define CURL_FORMAT_CURL_OFF_TU "lu" +# define CURL_FORMAT_OFF_T "%ld" +# define CURL_SIZEOF_CURL_OFF_T 4 +# define CURL_SUFFIX_CURL_OFF_T L +# define CURL_SUFFIX_CURL_OFF_TU UL # else -# define CURL_SIZEOF_LONG 4 -# define CURL_FORMAT_CURL_OFF_T "lld" -# define CURL_FORMAT_CURL_OFF_TU "llu" -# define CURL_FORMAT_OFF_T "%lld" -# define CURL_SUFFIX_CURL_OFF_T LL -# define CURL_SUFFIX_CURL_OFF_TU ULL +# define CURL_SIZEOF_LONG 4 +# define CURL_TYPEOF_CURL_OFF_T long long +# define CURL_FORMAT_CURL_OFF_T "lld" +# define CURL_FORMAT_CURL_OFF_TU "llu" +# define CURL_FORMAT_OFF_T "%lld" +# define CURL_SIZEOF_CURL_OFF_T 8 +# define CURL_SUFFIX_CURL_OFF_T LL +# define CURL_SUFFIX_CURL_OFF_TU ULL # endif /* ===================================== */ -- cgit v1.2.1 From ece891d6dbe4abd7912c7bc6fb0f1bc71e7b67e1 Mon Sep 17 00:00:00 2001 From: Yang Tse Date: Wed, 8 Apr 2009 01:25:34 +0000 Subject: Sun compilers specific preprocessor block removed from curlbuild.h.dist --- include/curl/curlbuild.h.dist | 34 ---------------------------------- 1 file changed, 34 deletions(-) (limited to 'include') diff --git a/include/curl/curlbuild.h.dist b/include/curl/curlbuild.h.dist index bc5950df5..faf0af6f6 100644 --- a/include/curl/curlbuild.h.dist +++ b/include/curl/curlbuild.h.dist @@ -438,40 +438,6 @@ # endif # endif -/* ===================================== */ -/* SunPro Compilers */ -/* ===================================== */ - -#elif defined(__SUNPRO_C) || defined(__SUNPRO_CC) -# if defined(_LP64) -# define CURL_SIZEOF_LONG 8 -# define CURL_TYPEOF_CURL_OFF_T long -# define CURL_FORMAT_CURL_OFF_T "ld" -# define CURL_FORMAT_CURL_OFF_TU "lu" -# define CURL_FORMAT_OFF_T "%ld" -# define CURL_SIZEOF_CURL_OFF_T 8 -# define CURL_SUFFIX_CURL_OFF_T L -# define CURL_SUFFIX_CURL_OFF_TU UL -# elif defined(__STDC__) && (__STDC__ == 1) -# define CURL_SIZEOF_LONG 4 -# define CURL_TYPEOF_CURL_OFF_T long -# define CURL_FORMAT_CURL_OFF_T "ld" -# define CURL_FORMAT_CURL_OFF_TU "lu" -# define CURL_FORMAT_OFF_T "%ld" -# define CURL_SIZEOF_CURL_OFF_T 4 -# define CURL_SUFFIX_CURL_OFF_T L -# define CURL_SUFFIX_CURL_OFF_TU UL -# else -# define CURL_SIZEOF_LONG 4 -# define CURL_TYPEOF_CURL_OFF_T long long -# define CURL_FORMAT_CURL_OFF_T "lld" -# define CURL_FORMAT_CURL_OFF_TU "llu" -# define CURL_FORMAT_OFF_T "%lld" -# define CURL_SIZEOF_CURL_OFF_T 8 -# define CURL_SUFFIX_CURL_OFF_T LL -# define CURL_SUFFIX_CURL_OFF_TU ULL -# endif - /* ===================================== */ /* KEEP MSVC THE PENULTIMATE ENTRY */ /* ===================================== */ -- cgit v1.2.1 From 020955ebc26ec978fe7ebac380519d877f0c3f79 Mon Sep 17 00:00:00 2001 From: Benoit Neil Date: Wed, 8 Apr 2009 23:35:09 +0000 Subject: Added special define for tests that directly include libcurl sources. --- include/curl/curl.h | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'include') diff --git a/include/curl/curl.h b/include/curl/curl.h index 7ecb6317b..30763700d 100644 --- a/include/curl/curl.h +++ b/include/curl/curl.h @@ -93,6 +93,10 @@ extern "C" { typedef void CURL; +#ifdef USES_DIRECT_CURL_UTILITIES +#define CURL_EXTERN +#else /* USES_DIRECT_CURL_UTILITIES */ + /* * Decorate exportable functions for Win32 and Symbian OS DLL linking. * This avoids using a .def file for building libcurl.dll. @@ -118,6 +122,7 @@ typedef void CURL; #define CURL_EXTERN #endif #endif +#endif /* USES_DIRECT_CURL_UTILITIES */ #ifndef curl_socket_typedef /* socket typedef */ -- cgit v1.2.1 From 4d396169c8f8f604e57fecb0b8624d0b424c1ea8 Mon Sep 17 00:00:00 2001 From: Benoit Neil Date: Thu, 9 Apr 2009 19:59:38 +0000 Subject: Cleaned up the custom definition I added (replaced by CURL_STATICLIB) --- include/curl/curl.h | 5 ----- 1 file changed, 5 deletions(-) (limited to 'include') diff --git a/include/curl/curl.h b/include/curl/curl.h index 30763700d..7ecb6317b 100644 --- a/include/curl/curl.h +++ b/include/curl/curl.h @@ -93,10 +93,6 @@ extern "C" { typedef void CURL; -#ifdef USES_DIRECT_CURL_UTILITIES -#define CURL_EXTERN -#else /* USES_DIRECT_CURL_UTILITIES */ - /* * Decorate exportable functions for Win32 and Symbian OS DLL linking. * This avoids using a .def file for building libcurl.dll. @@ -122,7 +118,6 @@ typedef void CURL; #define CURL_EXTERN #endif #endif -#endif /* USES_DIRECT_CURL_UTILITIES */ #ifndef curl_socket_typedef /* socket typedef */ -- cgit v1.2.1 From 0daeab3b8d35a65aa4a0bdd23c9c3f762c02c236 Mon Sep 17 00:00:00 2001 From: Yang Tse Date: Sun, 26 Apr 2009 18:51:03 +0000 Subject: Initial step towards a configure time curl_socklen_t definition --- include/curl/curlbuild.h.in | 25 ++++++++++++++++++++++++- 1 file changed, 24 insertions(+), 1 deletion(-) (limited to 'include') diff --git a/include/curl/curlbuild.h.in b/include/curl/curlbuild.h.in index e1c0dc3d4..8d73b7783 100644 --- a/include/curl/curlbuild.h.in +++ b/include/curl/curlbuild.h.in @@ -7,7 +7,7 @@ * | (__| |_| | _ <| |___ * \___|\___/|_| \_\_____| * - * Copyright (C) 1998 - 2008, Daniel Stenberg, , et al. + * Copyright (C) 1998 - 2009, 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 @@ -63,6 +63,16 @@ Error Compilation_aborted_CURL_SIZEOF_LONG_already_defined #endif +#ifdef CURL_TYPEOF_CURL_SOCKLEN_T +# error "CURL_TYPEOF_CURL_SOCKLEN_T shall not be defined except in curlbuild.h" + Error Compilation_aborted_CURL_TYPEOF_CURL_SOCKLEN_T_already_defined +#endif + +#ifdef CURL_SIZEOF_CURL_SOCKLEN_T +# error "CURL_SIZEOF_CURL_SOCKLEN_T shall not be defined except in curlbuild.h" + Error Compilation_aborted_CURL_SIZEOF_CURL_SOCKLEN_T_already_defined +#endif + #ifdef CURL_TYPEOF_CURL_OFF_T # error "CURL_TYPEOF_CURL_OFF_T shall not be defined except in curlbuild.h" Error Compilation_aborted_CURL_TYPEOF_CURL_OFF_T_already_defined @@ -123,9 +133,22 @@ # include #endif +/* Configure process defines this to 1 when it finds out that system */ +/* header file sys/socket.h must be included by the external interface. */ +#undef CURL_PULL_SYS_SOCKET_H +#ifdef CURL_PULL_SYS_SOCKET_H +# include +#endif + /* The size of `long', as computed by sizeof. */ #undef CURL_SIZEOF_LONG +/* Integral data type used for curl_socklen_t. */ +#undef CURL_TYPEOF_CURL_SOCKLEN_T + +/* The size of `curl_socklen_t', as computed by sizeof. */ +#undef CURL_SIZEOF_CURL_SOCKLEN_T + /* Signed integral data type used for curl_off_t. */ #undef CURL_TYPEOF_CURL_OFF_T -- cgit v1.2.1 From e01b7c1ede6f8b91f458259dbed96acce7bf3779 Mon Sep 17 00:00:00 2001 From: Daniel Stenberg Date: Tue, 28 Apr 2009 11:19:10 +0000 Subject: - Bug report #2709004 (http://curl.haxx.se/bug/view.cgi?id=2709004) by Tim Chen pointed out how curl couldn't upload with resume when reading from a pipe. This ended up with the introduction of a new return code for the CURLOPT_SEEKFUNCTION callback that basically says that the seek failed but that libcurl may try to resolve the situation anyway. In our case this means libcurl will attempt to instead read that much data from the stream instead of seeking and that way curl can now upload with resume when data is read from a stream! --- include/curl/curl.h | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) (limited to 'include') diff --git a/include/curl/curl.h b/include/curl/curl.h index 7ecb6317b..9c8cd40e0 100644 --- a/include/curl/curl.h +++ b/include/curl/curl.h @@ -186,15 +186,21 @@ typedef size_t (*curl_write_callback)(char *buffer, size_t nitems, void *outstream); +/* this is the return codes for the seek callbacks */ +#define CURL_SEEKFUNC_OK 0 +#define CURL_SEEKFUNC_FAIL 1 /* fail the entire transfer */ +#define CURL_SEEKFUNC_CANTSEEK 2 /* tell libcurl seeking can't be done, so + libcurl might try other means instead */ +typedef int (*curl_seek_callback)(void *instream, + curl_off_t offset, + int origin); /* 'whence' */ + /* 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, -- cgit v1.2.1 From d0fe4071a9397c5656e83a59a756bd5e4bca3fff Mon Sep 17 00:00:00 2001 From: Yang Tse Date: Wed, 29 Apr 2009 15:15:38 +0000 Subject: curl_socklen_t follow-up --- include/curl/curlbuild.h.dist | 542 +++++++++++++++++++++++------------------- include/curl/curlbuild.h.in | 15 ++ include/curl/curlrules.h | 35 ++- 3 files changed, 345 insertions(+), 247 deletions(-) (limited to 'include') diff --git a/include/curl/curlbuild.h.dist b/include/curl/curlbuild.h.dist index faf0af6f6..62d0a1ec1 100644 --- a/include/curl/curlbuild.h.dist +++ b/include/curl/curlbuild.h.dist @@ -114,6 +114,16 @@ Error Compilation_aborted_CURL_SIZEOF_LONG_already_defined #endif +#ifdef CURL_TYPEOF_CURL_SOCKLEN_T +# error "CURL_TYPEOF_CURL_SOCKLEN_T shall not be defined except in curlbuild.h" + Error Compilation_aborted_CURL_TYPEOF_CURL_SOCKLEN_T_already_defined +#endif + +#ifdef CURL_SIZEOF_CURL_SOCKLEN_T +# error "CURL_SIZEOF_CURL_SOCKLEN_T shall not be defined except in curlbuild.h" + Error Compilation_aborted_CURL_SIZEOF_CURL_SOCKLEN_T_already_defined +#endif + #ifdef CURL_TYPEOF_CURL_OFF_T # error "CURL_TYPEOF_CURL_OFF_T shall not be defined except in curlbuild.h" Error Compilation_aborted_CURL_TYPEOF_CURL_OFF_T_already_defined @@ -155,288 +165,318 @@ #if defined(__DJGPP__) || defined(__GO32__) # if defined(__DJGPP__) && (__DJGPP__ > 1) -# define CURL_SIZEOF_LONG 4 -# define CURL_TYPEOF_CURL_OFF_T long long -# define CURL_FORMAT_CURL_OFF_T "lld" -# define CURL_FORMAT_CURL_OFF_TU "llu" -# define CURL_FORMAT_OFF_T "%lld" -# define CURL_SIZEOF_CURL_OFF_T 8 -# define CURL_SUFFIX_CURL_OFF_T LL -# define CURL_SUFFIX_CURL_OFF_TU ULL +# define CURL_SIZEOF_LONG 4 +# define CURL_TYPEOF_CURL_OFF_T long long +# define CURL_FORMAT_CURL_OFF_T "lld" +# define CURL_FORMAT_CURL_OFF_TU "llu" +# define CURL_FORMAT_OFF_T "%lld" +# define CURL_SIZEOF_CURL_OFF_T 8 +# define CURL_SUFFIX_CURL_OFF_T LL +# define CURL_SUFFIX_CURL_OFF_TU ULL # else -# define CURL_SIZEOF_LONG 4 -# define CURL_TYPEOF_CURL_OFF_T long -# define CURL_FORMAT_CURL_OFF_T "ld" -# define CURL_FORMAT_CURL_OFF_TU "lu" -# define CURL_FORMAT_OFF_T "%ld" -# define CURL_SIZEOF_CURL_OFF_T 4 -# define CURL_SUFFIX_CURL_OFF_T L -# define CURL_SUFFIX_CURL_OFF_TU UL +# define CURL_SIZEOF_LONG 4 +# define CURL_TYPEOF_CURL_OFF_T long +# define CURL_FORMAT_CURL_OFF_T "ld" +# define CURL_FORMAT_CURL_OFF_TU "lu" +# define CURL_FORMAT_OFF_T "%ld" +# define CURL_SIZEOF_CURL_OFF_T 4 +# define CURL_SUFFIX_CURL_OFF_T L +# define CURL_SUFFIX_CURL_OFF_TU UL # endif +# define CURL_TYPEOF_CURL_SOCKLEN_T int +# define CURL_SIZEOF_CURL_SOCKLEN_T 4 #elif defined(__SALFORDC__) -# define CURL_SIZEOF_LONG 4 -# define CURL_TYPEOF_CURL_OFF_T long -# define CURL_FORMAT_CURL_OFF_T "ld" -# define CURL_FORMAT_CURL_OFF_TU "lu" -# define CURL_FORMAT_OFF_T "%ld" -# define CURL_SIZEOF_CURL_OFF_T 4 -# define CURL_SUFFIX_CURL_OFF_T L -# define CURL_SUFFIX_CURL_OFF_TU UL +# define CURL_SIZEOF_LONG 4 +# define CURL_TYPEOF_CURL_OFF_T long +# define CURL_FORMAT_CURL_OFF_T "ld" +# define CURL_FORMAT_CURL_OFF_TU "lu" +# define CURL_FORMAT_OFF_T "%ld" +# define CURL_SIZEOF_CURL_OFF_T 4 +# define CURL_SUFFIX_CURL_OFF_T L +# define CURL_SUFFIX_CURL_OFF_TU UL +# define CURL_TYPEOF_CURL_SOCKLEN_T FIXME +# define CURL_SIZEOF_CURL_SOCKLEN_T -1 #elif defined(__BORLANDC__) # if (__BORLANDC__ < 0x520) -# define CURL_SIZEOF_LONG 4 -# define CURL_TYPEOF_CURL_OFF_T long -# define CURL_FORMAT_CURL_OFF_T "ld" -# define CURL_FORMAT_CURL_OFF_TU "lu" -# define CURL_FORMAT_OFF_T "%ld" -# define CURL_SIZEOF_CURL_OFF_T 4 -# define CURL_SUFFIX_CURL_OFF_T L -# define CURL_SUFFIX_CURL_OFF_TU UL +# define CURL_SIZEOF_LONG 4 +# define CURL_TYPEOF_CURL_OFF_T long +# define CURL_FORMAT_CURL_OFF_T "ld" +# define CURL_FORMAT_CURL_OFF_TU "lu" +# define CURL_FORMAT_OFF_T "%ld" +# define CURL_SIZEOF_CURL_OFF_T 4 +# define CURL_SUFFIX_CURL_OFF_T L +# define CURL_SUFFIX_CURL_OFF_TU UL # else -# define CURL_SIZEOF_LONG 4 -# define CURL_TYPEOF_CURL_OFF_T __int64 -# define CURL_FORMAT_CURL_OFF_T "I64d" -# define CURL_FORMAT_CURL_OFF_TU "I64u" -# define CURL_FORMAT_OFF_T "%I64d" -# define CURL_SIZEOF_CURL_OFF_T 8 -# define CURL_SUFFIX_CURL_OFF_T i64 -# define CURL_SUFFIX_CURL_OFF_TU ui64 +# define CURL_SIZEOF_LONG 4 +# define CURL_TYPEOF_CURL_OFF_T __int64 +# define CURL_FORMAT_CURL_OFF_T "I64d" +# define CURL_FORMAT_CURL_OFF_TU "I64u" +# define CURL_FORMAT_OFF_T "%I64d" +# define CURL_SIZEOF_CURL_OFF_T 8 +# define CURL_SUFFIX_CURL_OFF_T i64 +# define CURL_SUFFIX_CURL_OFF_TU ui64 # endif +# define CURL_TYPEOF_CURL_SOCKLEN_T FIXME +# define CURL_SIZEOF_CURL_SOCKLEN_T -1 #elif defined(__TURBOC__) -# define CURL_SIZEOF_LONG 4 -# define CURL_TYPEOF_CURL_OFF_T long -# define CURL_FORMAT_CURL_OFF_T "ld" -# define CURL_FORMAT_CURL_OFF_TU "lu" -# define CURL_FORMAT_OFF_T "%ld" -# define CURL_SIZEOF_CURL_OFF_T 4 -# define CURL_SUFFIX_CURL_OFF_T L -# define CURL_SUFFIX_CURL_OFF_TU UL +# define CURL_SIZEOF_LONG 4 +# define CURL_TYPEOF_CURL_OFF_T long +# define CURL_FORMAT_CURL_OFF_T "ld" +# define CURL_FORMAT_CURL_OFF_TU "lu" +# define CURL_FORMAT_OFF_T "%ld" +# define CURL_SIZEOF_CURL_OFF_T 4 +# define CURL_SUFFIX_CURL_OFF_T L +# define CURL_SUFFIX_CURL_OFF_TU UL +# define CURL_TYPEOF_CURL_SOCKLEN_T FIXME +# define CURL_SIZEOF_CURL_SOCKLEN_T -1 #elif defined(__WATCOMC__) # if defined(__386__) -# define CURL_SIZEOF_LONG 4 -# define CURL_TYPEOF_CURL_OFF_T __int64 -# define CURL_FORMAT_CURL_OFF_T "I64d" -# define CURL_FORMAT_CURL_OFF_TU "I64u" -# define CURL_FORMAT_OFF_T "%I64d" -# define CURL_SIZEOF_CURL_OFF_T 8 -# define CURL_SUFFIX_CURL_OFF_T i64 -# define CURL_SUFFIX_CURL_OFF_TU ui64 +# define CURL_SIZEOF_LONG 4 +# define CURL_TYPEOF_CURL_OFF_T __int64 +# define CURL_FORMAT_CURL_OFF_T "I64d" +# define CURL_FORMAT_CURL_OFF_TU "I64u" +# define CURL_FORMAT_OFF_T "%I64d" +# define CURL_SIZEOF_CURL_OFF_T 8 +# define CURL_SUFFIX_CURL_OFF_T i64 +# define CURL_SUFFIX_CURL_OFF_TU ui64 # else -# define CURL_SIZEOF_LONG 4 -# define CURL_TYPEOF_CURL_OFF_T long -# define CURL_FORMAT_CURL_OFF_T "ld" -# define CURL_FORMAT_CURL_OFF_TU "lu" -# define CURL_FORMAT_OFF_T "%ld" -# define CURL_SIZEOF_CURL_OFF_T 4 -# define CURL_SUFFIX_CURL_OFF_T L -# define CURL_SUFFIX_CURL_OFF_TU UL +# define CURL_SIZEOF_LONG 4 +# define CURL_TYPEOF_CURL_OFF_T long +# define CURL_FORMAT_CURL_OFF_T "ld" +# define CURL_FORMAT_CURL_OFF_TU "lu" +# define CURL_FORMAT_OFF_T "%ld" +# define CURL_SIZEOF_CURL_OFF_T 4 +# define CURL_SUFFIX_CURL_OFF_T L +# define CURL_SUFFIX_CURL_OFF_TU UL # endif +# define CURL_TYPEOF_CURL_SOCKLEN_T FIXME +# define CURL_SIZEOF_CURL_SOCKLEN_T -1 #elif defined(__POCC__) # if (__POCC__ < 280) -# define CURL_SIZEOF_LONG 4 -# define CURL_TYPEOF_CURL_OFF_T long -# define CURL_FORMAT_CURL_OFF_T "ld" -# define CURL_FORMAT_CURL_OFF_TU "lu" -# define CURL_FORMAT_OFF_T "%ld" -# define CURL_SIZEOF_CURL_OFF_T 4 -# define CURL_SUFFIX_CURL_OFF_T L -# define CURL_SUFFIX_CURL_OFF_TU UL +# define CURL_SIZEOF_LONG 4 +# define CURL_TYPEOF_CURL_OFF_T long +# define CURL_FORMAT_CURL_OFF_T "ld" +# define CURL_FORMAT_CURL_OFF_TU "lu" +# define CURL_FORMAT_OFF_T "%ld" +# define CURL_SIZEOF_CURL_OFF_T 4 +# define CURL_SUFFIX_CURL_OFF_T L +# define CURL_SUFFIX_CURL_OFF_TU UL # elif defined(_MSC_VER) -# define CURL_SIZEOF_LONG 4 -# define CURL_TYPEOF_CURL_OFF_T __int64 -# define CURL_FORMAT_CURL_OFF_T "I64d" -# define CURL_FORMAT_CURL_OFF_TU "I64u" -# define CURL_FORMAT_OFF_T "%I64d" -# define CURL_SIZEOF_CURL_OFF_T 8 -# define CURL_SUFFIX_CURL_OFF_T i64 -# define CURL_SUFFIX_CURL_OFF_TU ui64 +# define CURL_SIZEOF_LONG 4 +# define CURL_TYPEOF_CURL_OFF_T __int64 +# define CURL_FORMAT_CURL_OFF_T "I64d" +# define CURL_FORMAT_CURL_OFF_TU "I64u" +# define CURL_FORMAT_OFF_T "%I64d" +# define CURL_SIZEOF_CURL_OFF_T 8 +# define CURL_SUFFIX_CURL_OFF_T i64 +# define CURL_SUFFIX_CURL_OFF_TU ui64 # else -# define CURL_SIZEOF_LONG 4 -# define CURL_TYPEOF_CURL_OFF_T long long -# define CURL_FORMAT_CURL_OFF_T "lld" -# define CURL_FORMAT_CURL_OFF_TU "llu" -# define CURL_FORMAT_OFF_T "%lld" -# define CURL_SIZEOF_CURL_OFF_T 8 -# define CURL_SUFFIX_CURL_OFF_T LL -# define CURL_SUFFIX_CURL_OFF_TU ULL +# define CURL_SIZEOF_LONG 4 +# define CURL_TYPEOF_CURL_OFF_T long long +# define CURL_FORMAT_CURL_OFF_T "lld" +# define CURL_FORMAT_CURL_OFF_TU "llu" +# define CURL_FORMAT_OFF_T "%lld" +# define CURL_SIZEOF_CURL_OFF_T 8 +# define CURL_SUFFIX_CURL_OFF_T LL +# define CURL_SUFFIX_CURL_OFF_TU ULL # endif +# define CURL_TYPEOF_CURL_SOCKLEN_T FIXME +# define CURL_SIZEOF_CURL_SOCKLEN_T -1 #elif defined(__LCC__) -# define CURL_SIZEOF_LONG 4 -# define CURL_TYPEOF_CURL_OFF_T long -# define CURL_FORMAT_CURL_OFF_T "ld" -# define CURL_FORMAT_CURL_OFF_TU "lu" -# define CURL_FORMAT_OFF_T "%ld" -# define CURL_SIZEOF_CURL_OFF_T 4 -# define CURL_SUFFIX_CURL_OFF_T L -# define CURL_SUFFIX_CURL_OFF_TU UL +# define CURL_SIZEOF_LONG 4 +# define CURL_TYPEOF_CURL_OFF_T long +# define CURL_FORMAT_CURL_OFF_T "ld" +# define CURL_FORMAT_CURL_OFF_TU "lu" +# define CURL_FORMAT_OFF_T "%ld" +# define CURL_SIZEOF_CURL_OFF_T 4 +# define CURL_SUFFIX_CURL_OFF_T L +# define CURL_SUFFIX_CURL_OFF_TU UL +# define CURL_TYPEOF_CURL_SOCKLEN_T FIXME +# define CURL_SIZEOF_CURL_SOCKLEN_T -1 #elif defined(__SYMBIAN32__) # if defined(__EABI__) /* Treat all ARM compilers equally */ -# define CURL_SIZEOF_LONG 4 -# define CURL_TYPEOF_CURL_OFF_T long long -# define CURL_FORMAT_CURL_OFF_T "lld" -# define CURL_FORMAT_CURL_OFF_TU "llu" -# define CURL_FORMAT_OFF_T "%lld" -# define CURL_SIZEOF_CURL_OFF_T 8 -# define CURL_SUFFIX_CURL_OFF_T LL -# define CURL_SUFFIX_CURL_OFF_TU ULL +# define CURL_SIZEOF_LONG 4 +# define CURL_TYPEOF_CURL_OFF_T long long +# define CURL_FORMAT_CURL_OFF_T "lld" +# define CURL_FORMAT_CURL_OFF_TU "llu" +# define CURL_FORMAT_OFF_T "%lld" +# define CURL_SIZEOF_CURL_OFF_T 8 +# define CURL_SUFFIX_CURL_OFF_T LL +# define CURL_SUFFIX_CURL_OFF_TU ULL # elif defined(__CW32__) # pragma longlong on -# define CURL_SIZEOF_LONG 4 -# define CURL_TYPEOF_CURL_OFF_T long long -# define CURL_FORMAT_CURL_OFF_T "lld" -# define CURL_FORMAT_CURL_OFF_TU "llu" -# define CURL_FORMAT_OFF_T "%lld" -# define CURL_SIZEOF_CURL_OFF_T 8 -# define CURL_SUFFIX_CURL_OFF_T LL -# define CURL_SUFFIX_CURL_OFF_TU ULL +# define CURL_SIZEOF_LONG 4 +# define CURL_TYPEOF_CURL_OFF_T long long +# define CURL_FORMAT_CURL_OFF_T "lld" +# define CURL_FORMAT_CURL_OFF_TU "llu" +# define CURL_FORMAT_OFF_T "%lld" +# define CURL_SIZEOF_CURL_OFF_T 8 +# define CURL_SUFFIX_CURL_OFF_T LL +# define CURL_SUFFIX_CURL_OFF_TU ULL # elif defined(__VC32__) -# define CURL_SIZEOF_LONG 4 -# define CURL_TYPEOF_CURL_OFF_T __int64 -# define CURL_FORMAT_CURL_OFF_T "lld" -# define CURL_FORMAT_CURL_OFF_TU "llu" -# define CURL_FORMAT_OFF_T "%lld" -# define CURL_SIZEOF_CURL_OFF_T 8 -# define CURL_SUFFIX_CURL_OFF_T LL -# define CURL_SUFFIX_CURL_OFF_TU ULL +# define CURL_SIZEOF_LONG 4 +# define CURL_TYPEOF_CURL_OFF_T __int64 +# define CURL_FORMAT_CURL_OFF_T "lld" +# define CURL_FORMAT_CURL_OFF_TU "llu" +# define CURL_FORMAT_OFF_T "%lld" +# define CURL_SIZEOF_CURL_OFF_T 8 +# define CURL_SUFFIX_CURL_OFF_T LL +# define CURL_SUFFIX_CURL_OFF_TU ULL # endif +# define CURL_TYPEOF_CURL_SOCKLEN_T FIXME +# define CURL_SIZEOF_CURL_SOCKLEN_T -1 #elif defined(__MWERKS__) -# define CURL_SIZEOF_LONG 4 -# define CURL_TYPEOF_CURL_OFF_T long long -# define CURL_FORMAT_CURL_OFF_T "lld" -# define CURL_FORMAT_CURL_OFF_TU "llu" -# define CURL_FORMAT_OFF_T "%lld" -# define CURL_SIZEOF_CURL_OFF_T 8 -# define CURL_SUFFIX_CURL_OFF_T LL -# define CURL_SUFFIX_CURL_OFF_TU ULL +# define CURL_SIZEOF_LONG 4 +# define CURL_TYPEOF_CURL_OFF_T long long +# define CURL_FORMAT_CURL_OFF_T "lld" +# define CURL_FORMAT_CURL_OFF_TU "llu" +# define CURL_FORMAT_OFF_T "%lld" +# define CURL_SIZEOF_CURL_OFF_T 8 +# define CURL_SUFFIX_CURL_OFF_T LL +# define CURL_SUFFIX_CURL_OFF_TU ULL +# define CURL_TYPEOF_CURL_SOCKLEN_T FIXME +# define CURL_SIZEOF_CURL_SOCKLEN_T -1 #elif defined(_WIN32_WCE) -# define CURL_SIZEOF_LONG 4 -# define CURL_TYPEOF_CURL_OFF_T __int64 -# define CURL_FORMAT_CURL_OFF_T "I64d" -# define CURL_FORMAT_CURL_OFF_TU "I64u" -# define CURL_FORMAT_OFF_T "%I64d" -# define CURL_SIZEOF_CURL_OFF_T 8 -# define CURL_SUFFIX_CURL_OFF_T i64 -# define CURL_SUFFIX_CURL_OFF_TU ui64 +# define CURL_SIZEOF_LONG 4 +# define CURL_TYPEOF_CURL_OFF_T __int64 +# define CURL_FORMAT_CURL_OFF_T "I64d" +# define CURL_FORMAT_CURL_OFF_TU "I64u" +# define CURL_FORMAT_OFF_T "%I64d" +# define CURL_SIZEOF_CURL_OFF_T 8 +# define CURL_SUFFIX_CURL_OFF_T i64 +# define CURL_SUFFIX_CURL_OFF_TU ui64 +# define CURL_TYPEOF_CURL_SOCKLEN_T FIXME +# define CURL_SIZEOF_CURL_SOCKLEN_T -1 #elif defined(__MINGW32__) -# define CURL_SIZEOF_LONG 4 -# define CURL_TYPEOF_CURL_OFF_T long long -# define CURL_FORMAT_CURL_OFF_T "I64d" -# define CURL_FORMAT_CURL_OFF_TU "I64u" -# define CURL_FORMAT_OFF_T "%I64d" -# define CURL_SIZEOF_CURL_OFF_T 8 -# define CURL_SUFFIX_CURL_OFF_T LL -# define CURL_SUFFIX_CURL_OFF_TU ULL +# define CURL_SIZEOF_LONG 4 +# define CURL_TYPEOF_CURL_OFF_T long long +# define CURL_FORMAT_CURL_OFF_T "I64d" +# define CURL_FORMAT_CURL_OFF_TU "I64u" +# define CURL_FORMAT_OFF_T "%I64d" +# define CURL_SIZEOF_CURL_OFF_T 8 +# define CURL_SUFFIX_CURL_OFF_T LL +# define CURL_SUFFIX_CURL_OFF_TU ULL +# define CURL_TYPEOF_CURL_SOCKLEN_T FIXME +# define CURL_SIZEOF_CURL_SOCKLEN_T -1 #elif defined(__VMS) # if defined(__alpha) || defined(__ia64) -# define CURL_SIZEOF_LONG 4 -# define CURL_TYPEOF_CURL_OFF_T long long -# define CURL_FORMAT_CURL_OFF_T "lld" -# define CURL_FORMAT_CURL_OFF_TU "llu" -# define CURL_FORMAT_OFF_T "%lld" -# define CURL_SIZEOF_CURL_OFF_T 8 -# define CURL_SUFFIX_CURL_OFF_T LL -# define CURL_SUFFIX_CURL_OFF_TU ULL +# define CURL_SIZEOF_LONG 4 +# define CURL_TYPEOF_CURL_OFF_T long long +# define CURL_FORMAT_CURL_OFF_T "lld" +# define CURL_FORMAT_CURL_OFF_TU "llu" +# define CURL_FORMAT_OFF_T "%lld" +# define CURL_SIZEOF_CURL_OFF_T 8 +# define CURL_SUFFIX_CURL_OFF_T LL +# define CURL_SUFFIX_CURL_OFF_TU ULL # else -# define CURL_SIZEOF_LONG 4 -# define CURL_TYPEOF_CURL_OFF_T long -# define CURL_FORMAT_CURL_OFF_T "ld" -# define CURL_FORMAT_CURL_OFF_TU "lu" -# define CURL_FORMAT_OFF_T "%ld" -# define CURL_SIZEOF_CURL_OFF_T 4 -# define CURL_SUFFIX_CURL_OFF_T L -# define CURL_SUFFIX_CURL_OFF_TU UL +# define CURL_SIZEOF_LONG 4 +# define CURL_TYPEOF_CURL_OFF_T long +# define CURL_FORMAT_CURL_OFF_T "ld" +# define CURL_FORMAT_CURL_OFF_TU "lu" +# define CURL_FORMAT_OFF_T "%ld" +# define CURL_SIZEOF_CURL_OFF_T 4 +# define CURL_SUFFIX_CURL_OFF_T L +# define CURL_SUFFIX_CURL_OFF_TU UL # endif +# define CURL_TYPEOF_CURL_SOCKLEN_T FIXME +# define CURL_SIZEOF_CURL_SOCKLEN_T -1 #elif defined(__OS400__) # if defined(__ILEC400__) -# define CURL_SIZEOF_LONG 4 -# define CURL_TYPEOF_CURL_OFF_T long long -# define CURL_FORMAT_CURL_OFF_T "lld" -# define CURL_FORMAT_CURL_OFF_TU "llu" -# define CURL_FORMAT_OFF_T "%lld" -# define CURL_SIZEOF_CURL_OFF_T 8 -# define CURL_SUFFIX_CURL_OFF_T LL -# define CURL_SUFFIX_CURL_OFF_TU ULL +# define CURL_SIZEOF_LONG 4 +# define CURL_TYPEOF_CURL_OFF_T long long +# define CURL_FORMAT_CURL_OFF_T "lld" +# define CURL_FORMAT_CURL_OFF_TU "llu" +# define CURL_FORMAT_OFF_T "%lld" +# define CURL_SIZEOF_CURL_OFF_T 8 +# define CURL_SUFFIX_CURL_OFF_T LL +# define CURL_SUFFIX_CURL_OFF_TU ULL # endif +# define CURL_TYPEOF_CURL_SOCKLEN_T FIXME +# define CURL_SIZEOF_CURL_SOCKLEN_T -1 #elif defined(__MVS__) # if defined(__IBMC__) || defined(__IBMCPP__) # if defined(_ILP32) -# define CURL_SIZEOF_LONG 4 +# define CURL_SIZEOF_LONG 4 # elif defined(_LP64) -# define CURL_SIZEOF_LONG 8 +# define CURL_SIZEOF_LONG 8 # endif # if defined(_LONG_LONG) -# define CURL_TYPEOF_CURL_OFF_T long long -# define CURL_FORMAT_CURL_OFF_T "lld" -# define CURL_FORMAT_CURL_OFF_TU "llu" -# define CURL_FORMAT_OFF_T "%lld" -# define CURL_SIZEOF_CURL_OFF_T 8 -# define CURL_SUFFIX_CURL_OFF_T LL -# define CURL_SUFFIX_CURL_OFF_TU ULL +# define CURL_TYPEOF_CURL_OFF_T long long +# define CURL_FORMAT_CURL_OFF_T "lld" +# define CURL_FORMAT_CURL_OFF_TU "llu" +# define CURL_FORMAT_OFF_T "%lld" +# define CURL_SIZEOF_CURL_OFF_T 8 +# define CURL_SUFFIX_CURL_OFF_T LL +# define CURL_SUFFIX_CURL_OFF_TU ULL # elif defined(_LP64) -# define CURL_TYPEOF_CURL_OFF_T long -# define CURL_FORMAT_CURL_OFF_T "ld" -# define CURL_FORMAT_CURL_OFF_TU "lu" -# define CURL_FORMAT_OFF_T "%ld" -# define CURL_SIZEOF_CURL_OFF_T 8 -# define CURL_SUFFIX_CURL_OFF_T L -# define CURL_SUFFIX_CURL_OFF_TU UL +# define CURL_TYPEOF_CURL_OFF_T long +# define CURL_FORMAT_CURL_OFF_T "ld" +# define CURL_FORMAT_CURL_OFF_TU "lu" +# define CURL_FORMAT_OFF_T "%ld" +# define CURL_SIZEOF_CURL_OFF_T 8 +# define CURL_SUFFIX_CURL_OFF_T L +# define CURL_SUFFIX_CURL_OFF_TU UL # else -# define CURL_TYPEOF_CURL_OFF_T long -# define CURL_FORMAT_CURL_OFF_T "ld" -# define CURL_FORMAT_CURL_OFF_TU "lu" -# define CURL_FORMAT_OFF_T "%ld" -# define CURL_SIZEOF_CURL_OFF_T 4 -# define CURL_SUFFIX_CURL_OFF_T L -# define CURL_SUFFIX_CURL_OFF_TU UL +# define CURL_TYPEOF_CURL_OFF_T long +# define CURL_FORMAT_CURL_OFF_T "ld" +# define CURL_FORMAT_CURL_OFF_TU "lu" +# define CURL_FORMAT_OFF_T "%ld" +# define CURL_SIZEOF_CURL_OFF_T 4 +# define CURL_SUFFIX_CURL_OFF_T L +# define CURL_SUFFIX_CURL_OFF_TU UL # endif # endif +# define CURL_TYPEOF_CURL_SOCKLEN_T FIXME +# define CURL_SIZEOF_CURL_SOCKLEN_T -1 #elif defined(__370__) # if defined(__IBMC__) || defined(__IBMCPP__) # if defined(_ILP32) -# define CURL_SIZEOF_LONG 4 +# define CURL_SIZEOF_LONG 4 # elif defined(_LP64) -# define CURL_SIZEOF_LONG 8 +# define CURL_SIZEOF_LONG 8 # endif # if defined(_LONG_LONG) -# define CURL_TYPEOF_CURL_OFF_T long long -# define CURL_FORMAT_CURL_OFF_T "lld" -# define CURL_FORMAT_CURL_OFF_TU "llu" -# define CURL_FORMAT_OFF_T "%lld" -# define CURL_SIZEOF_CURL_OFF_T 8 -# define CURL_SUFFIX_CURL_OFF_T LL -# define CURL_SUFFIX_CURL_OFF_TU ULL +# define CURL_TYPEOF_CURL_OFF_T long long +# define CURL_FORMAT_CURL_OFF_T "lld" +# define CURL_FORMAT_CURL_OFF_TU "llu" +# define CURL_FORMAT_OFF_T "%lld" +# define CURL_SIZEOF_CURL_OFF_T 8 +# define CURL_SUFFIX_CURL_OFF_T LL +# define CURL_SUFFIX_CURL_OFF_TU ULL # elif defined(_LP64) -# define CURL_TYPEOF_CURL_OFF_T long -# define CURL_FORMAT_CURL_OFF_T "ld" -# define CURL_FORMAT_CURL_OFF_TU "lu" -# define CURL_FORMAT_OFF_T "%ld" -# define CURL_SIZEOF_CURL_OFF_T 8 -# define CURL_SUFFIX_CURL_OFF_T L -# define CURL_SUFFIX_CURL_OFF_TU UL +# define CURL_TYPEOF_CURL_OFF_T long +# define CURL_FORMAT_CURL_OFF_T "ld" +# define CURL_FORMAT_CURL_OFF_TU "lu" +# define CURL_FORMAT_OFF_T "%ld" +# define CURL_SIZEOF_CURL_OFF_T 8 +# define CURL_SUFFIX_CURL_OFF_T L +# define CURL_SUFFIX_CURL_OFF_TU UL # else -# define CURL_TYPEOF_CURL_OFF_T long -# define CURL_FORMAT_CURL_OFF_T "ld" -# define CURL_FORMAT_CURL_OFF_TU "lu" -# define CURL_FORMAT_OFF_T "%ld" -# define CURL_SIZEOF_CURL_OFF_T 4 -# define CURL_SUFFIX_CURL_OFF_T L -# define CURL_SUFFIX_CURL_OFF_TU UL +# define CURL_TYPEOF_CURL_OFF_T long +# define CURL_FORMAT_CURL_OFF_T "ld" +# define CURL_FORMAT_CURL_OFF_TU "lu" +# define CURL_FORMAT_OFF_T "%ld" +# define CURL_SIZEOF_CURL_OFF_T 4 +# define CURL_SUFFIX_CURL_OFF_T L +# define CURL_SUFFIX_CURL_OFF_TU UL # endif # endif +# define CURL_TYPEOF_CURL_SOCKLEN_T FIXME +# define CURL_SIZEOF_CURL_SOCKLEN_T -1 /* ===================================== */ /* KEEP MSVC THE PENULTIMATE ENTRY */ @@ -444,24 +484,26 @@ #elif defined(_MSC_VER) # if (_MSC_VER >= 900) && (_INTEGRAL_MAX_BITS >= 64) -# define CURL_SIZEOF_LONG 4 -# define CURL_TYPEOF_CURL_OFF_T __int64 -# define CURL_FORMAT_CURL_OFF_T "I64d" -# define CURL_FORMAT_CURL_OFF_TU "I64u" -# define CURL_FORMAT_OFF_T "%I64d" -# define CURL_SIZEOF_CURL_OFF_T 8 -# define CURL_SUFFIX_CURL_OFF_T i64 -# define CURL_SUFFIX_CURL_OFF_TU ui64 +# define CURL_SIZEOF_LONG 4 +# define CURL_TYPEOF_CURL_OFF_T __int64 +# define CURL_FORMAT_CURL_OFF_T "I64d" +# define CURL_FORMAT_CURL_OFF_TU "I64u" +# define CURL_FORMAT_OFF_T "%I64d" +# define CURL_SIZEOF_CURL_OFF_T 8 +# define CURL_SUFFIX_CURL_OFF_T i64 +# define CURL_SUFFIX_CURL_OFF_TU ui64 # else -# define CURL_SIZEOF_LONG 4 -# define CURL_TYPEOF_CURL_OFF_T long -# define CURL_FORMAT_CURL_OFF_T "ld" -# define CURL_FORMAT_CURL_OFF_TU "lu" -# define CURL_FORMAT_OFF_T "%ld" -# define CURL_SIZEOF_CURL_OFF_T 4 -# define CURL_SUFFIX_CURL_OFF_T L -# define CURL_SUFFIX_CURL_OFF_TU UL +# define CURL_SIZEOF_LONG 4 +# define CURL_TYPEOF_CURL_OFF_T long +# define CURL_FORMAT_CURL_OFF_T "ld" +# define CURL_FORMAT_CURL_OFF_TU "lu" +# define CURL_FORMAT_OFF_T "%ld" +# define CURL_SIZEOF_CURL_OFF_T 4 +# define CURL_SUFFIX_CURL_OFF_T L +# define CURL_SUFFIX_CURL_OFF_TU UL # endif +# define CURL_TYPEOF_CURL_SOCKLEN_T int +# define CURL_SIZEOF_CURL_SOCKLEN_T 4 /* ===================================== */ /* KEEP GENERIC GCC THE LAST ENTRY */ @@ -469,30 +511,38 @@ #elif defined(__GNUC__) # if defined(__i386__) || defined(__ppc__) -# define CURL_SIZEOF_LONG 4 -# define CURL_TYPEOF_CURL_OFF_T long long -# define CURL_FORMAT_CURL_OFF_T "lld" -# define CURL_FORMAT_CURL_OFF_TU "llu" -# define CURL_FORMAT_OFF_T "%lld" -# define CURL_SIZEOF_CURL_OFF_T 8 -# define CURL_SUFFIX_CURL_OFF_T LL -# define CURL_SUFFIX_CURL_OFF_TU ULL +# define CURL_SIZEOF_LONG 4 +# define CURL_TYPEOF_CURL_OFF_T long long +# define CURL_FORMAT_CURL_OFF_T "lld" +# define CURL_FORMAT_CURL_OFF_TU "llu" +# define CURL_FORMAT_OFF_T "%lld" +# define CURL_SIZEOF_CURL_OFF_T 8 +# define CURL_SUFFIX_CURL_OFF_T LL +# define CURL_SUFFIX_CURL_OFF_TU ULL # elif defined(__x86_64__) || defined(__ppc64__) -# define CURL_SIZEOF_LONG 8 -# define CURL_TYPEOF_CURL_OFF_T long -# define CURL_FORMAT_CURL_OFF_T "ld" -# define CURL_FORMAT_CURL_OFF_TU "lu" -# define CURL_FORMAT_OFF_T "%ld" -# define CURL_SIZEOF_CURL_OFF_T 8 -# define CURL_SUFFIX_CURL_OFF_T L -# define CURL_SUFFIX_CURL_OFF_TU UL +# define CURL_SIZEOF_LONG 8 +# define CURL_TYPEOF_CURL_OFF_T long +# define CURL_FORMAT_CURL_OFF_T "ld" +# define CURL_FORMAT_CURL_OFF_TU "lu" +# define CURL_FORMAT_OFF_T "%ld" +# define CURL_SIZEOF_CURL_OFF_T 8 +# define CURL_SUFFIX_CURL_OFF_T L +# define CURL_SUFFIX_CURL_OFF_TU UL # endif +# define CURL_TYPEOF_CURL_SOCKLEN_T FIXME +# define CURL_SIZEOF_CURL_SOCKLEN_T -1 #else # error "Unknown non-configure build target!" Error Compilation_aborted_Unknown_non_configure_build_target #endif +/* Data type definition of curl_socklen_t. */ + +#ifdef CURL_TYPEOF_CURL_SOCKLEN_T + typedef CURL_TYPEOF_CURL_SOCKLEN_T curl_socklen_t; +#endif + /* Data type definition of curl_off_t. */ #ifdef CURL_TYPEOF_CURL_OFF_T diff --git a/include/curl/curlbuild.h.in b/include/curl/curlbuild.h.in index 8d73b7783..48c7cf1f3 100644 --- a/include/curl/curlbuild.h.in +++ b/include/curl/curlbuild.h.in @@ -112,6 +112,18 @@ /* EXTERNAL INTERFACE SETTINGS FOR CONFIGURE CAPABLE SYSTEMS ONLY */ /* ================================================================ */ +/* Configure process defines this to 1 when it finds out that system */ +/* header file ws2tcpip.h must be included by the external interface. */ +#undef CURL_PULL_WS2TCPIP_H +#ifdef CURL_PULL_WS2TCPIP_H +# ifndef WIN32_LEAN_AND_MEAN +# define WIN32_LEAN_AND_MEAN +# endif +# include +# include +# include +#endif + /* Configure process defines this to 1 when it finds out that system */ /* header file sys/types.h must be included by the external interface. */ #undef CURL_PULL_SYS_TYPES_H @@ -149,6 +161,9 @@ /* The size of `curl_socklen_t', as computed by sizeof. */ #undef CURL_SIZEOF_CURL_SOCKLEN_T +/* Data type definition of curl_socklen_t. */ +typedef CURL_TYPEOF_CURL_SOCKLEN_T curl_socklen_t; + /* Signed integral data type used for curl_off_t. */ #undef CURL_TYPEOF_CURL_OFF_T diff --git a/include/curl/curlrules.h b/include/curl/curlrules.h index 5a4103d44..a03858397 100644 --- a/include/curl/curlrules.h +++ b/include/curl/curlrules.h @@ -7,7 +7,7 @@ * | (__| |_| | _ <| |___ * \___|\___/|_| \_\_____| * - * Copyright (C) 1998 - 2008, Daniel Stenberg, , et al. + * Copyright (C) 1998 - 2009, 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 @@ -81,6 +81,16 @@ Error Compilation_aborted_CURL_SIZEOF_LONG_is_missing #endif +#ifndef CURL_TYPEOF_CURL_SOCKLEN_T +# error "CURL_TYPEOF_CURL_SOCKLEN_T definition is missing!" + Error Compilation_aborted_CURL_TYPEOF_CURL_SOCKLEN_T_is_missing +#endif + +#ifndef CURL_SIZEOF_CURL_SOCKLEN_T +# error "CURL_SIZEOF_CURL_SOCKLEN_T definition is missing!" + Error Compilation_aborted_CURL_SIZEOF_CURL_SOCKLEN_T_is_missing +#endif + #ifndef CURL_TYPEOF_CURL_OFF_T # error "CURL_TYPEOF_CURL_OFF_T definition is missing!" Error Compilation_aborted_CURL_TYPEOF_CURL_OFF_T_is_missing @@ -153,6 +163,26 @@ typedef char __curl_rule_03__ [CurlchkszGE(curl_off_t, long)]; +/* + * Verify that the size previously defined and expected for + * curl_socklen_t is actually the the same as the one reported + * by sizeof() at compile time. + */ + +typedef char + __curl_rule_04__ + [CurlchkszEQ(curl_socklen_t, CURL_SIZEOF_CURL_SOCKLEN_T)]; + +/* + * Verify at compile time that the size of curl_socklen_t as reported + * by sizeof() is greater or equal than the one reported for int for + * the current compilation. + */ + +typedef char + __curl_rule_05__ + [CurlchkszGE(curl_socklen_t, int)]; + /* ================================================================ */ /* EXTERNALLY AND INTERNALLY VISIBLE DEFINITIONS */ /* ================================================================ */ @@ -207,10 +237,13 @@ typedef char * Get rid of macros not intended to exist beyond this point. */ +#undef CURL_PULL_WS2TCPIP_H #undef CURL_PULL_SYS_TYPES_H +#undef CURL_PULL_SYS_SOCKET_H #undef CURL_PULL_STDINT_H #undef CURL_PULL_INTTYPES_H +#undef CURL_TYPEOF_CURL_SOCKLEN_T #undef CURL_TYPEOF_CURL_OFF_T #endif /* __CURL_CURLRULES_H */ -- cgit v1.2.1 From 5a91746b80fd41b9915574d8514f1d40e9cfd1b6 Mon Sep 17 00:00:00 2001 From: Yang Tse Date: Fri, 1 May 2009 12:39:40 +0000 Subject: David McCreedy's "TPF-platform specific changes to various files" patch --- include/curl/curlbuild.h.dist | 12 ++++++++++++ 1 file changed, 12 insertions(+) (limited to 'include') diff --git a/include/curl/curlbuild.h.dist b/include/curl/curlbuild.h.dist index 62d0a1ec1..f60679006 100644 --- a/include/curl/curlbuild.h.dist +++ b/include/curl/curlbuild.h.dist @@ -478,6 +478,18 @@ # define CURL_TYPEOF_CURL_SOCKLEN_T FIXME # define CURL_SIZEOF_CURL_SOCKLEN_T -1 +#elif defined(TPF) +# define CURL_SIZEOF_LONG 8 +# define CURL_TYPEOF_CURL_OFF_T long +# define CURL_FORMAT_CURL_OFF_T "ld" +# define CURL_FORMAT_CURL_OFF_TU "lu" +# define CURL_FORMAT_OFF_T "%ld" +# define CURL_SIZEOF_CURL_OFF_T 8 +# define CURL_SUFFIX_CURL_OFF_T L +# define CURL_SUFFIX_CURL_OFF_TU UL +# define CURL_TYPEOF_CURL_SOCKLEN_T FIXME +# define CURL_SIZEOF_CURL_SOCKLEN_T -1 + /* ===================================== */ /* KEEP MSVC THE PENULTIMATE ENTRY */ /* ===================================== */ -- cgit v1.2.1 From 589d2ee7b5861fc45127aadf1ef0853da22a4b21 Mon Sep 17 00:00:00 2001 From: Yang Tse Date: Fri, 1 May 2009 22:41:23 +0000 Subject: David McCreedy's "TPF-platform specific changes to various files" patch follow-up --- include/curl/curlbuild.h.dist | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'include') diff --git a/include/curl/curlbuild.h.dist b/include/curl/curlbuild.h.dist index f60679006..20fdef8ac 100644 --- a/include/curl/curlbuild.h.dist +++ b/include/curl/curlbuild.h.dist @@ -487,8 +487,8 @@ # define CURL_SIZEOF_CURL_OFF_T 8 # define CURL_SUFFIX_CURL_OFF_T L # define CURL_SUFFIX_CURL_OFF_TU UL -# define CURL_TYPEOF_CURL_SOCKLEN_T FIXME -# define CURL_SIZEOF_CURL_SOCKLEN_T -1 +# define CURL_TYPEOF_CURL_SOCKLEN_T int +# define CURL_SIZEOF_CURL_SOCKLEN_T 4 /* ===================================== */ /* KEEP MSVC THE PENULTIMATE ENTRY */ -- cgit v1.2.1 From 9137e717b04644592b9b527839470337fdd9f44d Mon Sep 17 00:00:00 2001 From: Yang Tse Date: Sat, 2 May 2009 02:37:32 +0000 Subject: Use build-time configured curl_socklen_t instead of socklen_t --- include/curl/curlbuild.h.dist | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'include') diff --git a/include/curl/curlbuild.h.dist b/include/curl/curlbuild.h.dist index 20fdef8ac..0de850263 100644 --- a/include/curl/curlbuild.h.dist +++ b/include/curl/curlbuild.h.dist @@ -389,8 +389,8 @@ # define CURL_SUFFIX_CURL_OFF_T L # define CURL_SUFFIX_CURL_OFF_TU UL # endif -# define CURL_TYPEOF_CURL_SOCKLEN_T FIXME -# define CURL_SIZEOF_CURL_SOCKLEN_T -1 +# define CURL_TYPEOF_CURL_SOCKLEN_T unsigned int +# define CURL_SIZEOF_CURL_SOCKLEN_T 4 #elif defined(__OS400__) # if defined(__ILEC400__) -- cgit v1.2.1 From b5c599c80c18866dcb78599e99162bcf8ed4205d Mon Sep 17 00:00:00 2001 From: Yang Tse Date: Sat, 2 May 2009 03:16:04 +0000 Subject: This wasn't intended to be committed. So, until fixed this will remain FIXME. --- include/curl/curlbuild.h.dist | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'include') diff --git a/include/curl/curlbuild.h.dist b/include/curl/curlbuild.h.dist index 0de850263..20fdef8ac 100644 --- a/include/curl/curlbuild.h.dist +++ b/include/curl/curlbuild.h.dist @@ -389,8 +389,8 @@ # define CURL_SUFFIX_CURL_OFF_T L # define CURL_SUFFIX_CURL_OFF_TU UL # endif -# define CURL_TYPEOF_CURL_SOCKLEN_T unsigned int -# define CURL_SIZEOF_CURL_SOCKLEN_T 4 +# define CURL_TYPEOF_CURL_SOCKLEN_T FIXME +# define CURL_SIZEOF_CURL_SOCKLEN_T -1 #elif defined(__OS400__) # if defined(__ILEC400__) -- cgit v1.2.1 From b9920bdd0ea395f2136b6e44b9b41d951af55850 Mon Sep 17 00:00:00 2001 From: Yang Tse Date: Mon, 4 May 2009 15:25:57 +0000 Subject: fIX *__SOCKLEN_T definitions for several Windows target tool-chains --- include/curl/curlbuild.h.dist | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) (limited to 'include') diff --git a/include/curl/curlbuild.h.dist b/include/curl/curlbuild.h.dist index 20fdef8ac..3f55979c6 100644 --- a/include/curl/curlbuild.h.dist +++ b/include/curl/curlbuild.h.dist @@ -195,8 +195,8 @@ # define CURL_SIZEOF_CURL_OFF_T 4 # define CURL_SUFFIX_CURL_OFF_T L # define CURL_SUFFIX_CURL_OFF_TU UL -# define CURL_TYPEOF_CURL_SOCKLEN_T FIXME -# define CURL_SIZEOF_CURL_SOCKLEN_T -1 +# define CURL_TYPEOF_CURL_SOCKLEN_T int +# define CURL_SIZEOF_CURL_SOCKLEN_T 4 #elif defined(__BORLANDC__) # if (__BORLANDC__ < 0x520) @@ -285,8 +285,8 @@ # define CURL_SUFFIX_CURL_OFF_T LL # define CURL_SUFFIX_CURL_OFF_TU ULL # endif -# define CURL_TYPEOF_CURL_SOCKLEN_T FIXME -# define CURL_SIZEOF_CURL_SOCKLEN_T -1 +# define CURL_TYPEOF_CURL_SOCKLEN_T int +# define CURL_SIZEOF_CURL_SOCKLEN_T 4 #elif defined(__LCC__) # define CURL_SIZEOF_LONG 4 @@ -354,8 +354,8 @@ # define CURL_SIZEOF_CURL_OFF_T 8 # define CURL_SUFFIX_CURL_OFF_T i64 # define CURL_SUFFIX_CURL_OFF_TU ui64 -# define CURL_TYPEOF_CURL_SOCKLEN_T FIXME -# define CURL_SIZEOF_CURL_SOCKLEN_T -1 +# define CURL_TYPEOF_CURL_SOCKLEN_T int +# define CURL_SIZEOF_CURL_SOCKLEN_T 4 #elif defined(__MINGW32__) # define CURL_SIZEOF_LONG 4 @@ -366,8 +366,8 @@ # define CURL_SIZEOF_CURL_OFF_T 8 # define CURL_SUFFIX_CURL_OFF_T LL # define CURL_SUFFIX_CURL_OFF_TU ULL -# define CURL_TYPEOF_CURL_SOCKLEN_T FIXME -# define CURL_SIZEOF_CURL_SOCKLEN_T -1 +# define CURL_TYPEOF_CURL_SOCKLEN_T int +# define CURL_SIZEOF_CURL_SOCKLEN_T 4 #elif defined(__VMS) # if defined(__alpha) || defined(__ia64) -- cgit v1.2.1 From 8c08ecfcbfc6a818c85ded27d15b0e1a2c5b3137 Mon Sep 17 00:00:00 2001 From: Yang Tse Date: Mon, 4 May 2009 17:05:25 +0000 Subject: fIX *__SOCKLEN_T definitions for MVS and 370 targets --- include/curl/curlbuild.h.dist | 24 ++++++++++++++++++++---- 1 file changed, 20 insertions(+), 4 deletions(-) (limited to 'include') diff --git a/include/curl/curlbuild.h.dist b/include/curl/curlbuild.h.dist index 3f55979c6..ba077925e 100644 --- a/include/curl/curlbuild.h.dist +++ b/include/curl/curlbuild.h.dist @@ -438,9 +438,11 @@ # define CURL_SUFFIX_CURL_OFF_T L # define CURL_SUFFIX_CURL_OFF_TU UL # endif +# define CURL_TYPEOF_CURL_SOCKLEN_T socklen_t +# define CURL_SIZEOF_CURL_SOCKLEN_T 4 +# define CURL_PULL_SYS_TYPES_H 1 +# define CURL_PULL_SYS_SOCKET_H 1 # endif -# define CURL_TYPEOF_CURL_SOCKLEN_T FIXME -# define CURL_SIZEOF_CURL_SOCKLEN_T -1 #elif defined(__370__) # if defined(__IBMC__) || defined(__IBMCPP__) @@ -474,9 +476,11 @@ # define CURL_SUFFIX_CURL_OFF_T L # define CURL_SUFFIX_CURL_OFF_TU UL # endif +# define CURL_TYPEOF_CURL_SOCKLEN_T socklen_t +# define CURL_SIZEOF_CURL_SOCKLEN_T 4 +# define CURL_PULL_SYS_TYPES_H 1 +# define CURL_PULL_SYS_SOCKET_H 1 # endif -# define CURL_TYPEOF_CURL_SOCKLEN_T FIXME -# define CURL_SIZEOF_CURL_SOCKLEN_T -1 #elif defined(TPF) # define CURL_SIZEOF_LONG 8 @@ -549,6 +553,18 @@ Error Compilation_aborted_Unknown_non_configure_build_target #endif +/* CURL_PULL_SYS_TYPES_H is defined above when inclusion of header file */ +/* sys/types.h is required here to properly make type definitions below. */ +#ifdef CURL_PULL_SYS_TYPES_H +# include +#endif + +/* CURL_PULL_SYS_SOCKET_H is defined above when inclusion of header file */ +/* sys/socket.h is required here to properly make type definitions below. */ +#ifdef CURL_PULL_SYS_SOCKET_H +# include +#endif + /* Data type definition of curl_socklen_t. */ #ifdef CURL_TYPEOF_CURL_SOCKLEN_T -- cgit v1.2.1 From 77bb536542358b71b62bc245b2d00dfcd1afe7d2 Mon Sep 17 00:00:00 2001 From: Yang Tse Date: Wed, 6 May 2009 13:58:41 +0000 Subject: fIX *__SOCKLEN_T definitions for OS400 and generic GCC targets --- include/curl/curlbuild.h.dist | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) (limited to 'include') diff --git a/include/curl/curlbuild.h.dist b/include/curl/curlbuild.h.dist index ba077925e..8b4360daa 100644 --- a/include/curl/curlbuild.h.dist +++ b/include/curl/curlbuild.h.dist @@ -402,9 +402,11 @@ # define CURL_SIZEOF_CURL_OFF_T 8 # define CURL_SUFFIX_CURL_OFF_T LL # define CURL_SUFFIX_CURL_OFF_TU ULL +# define CURL_TYPEOF_CURL_SOCKLEN_T socklen_t +# define CURL_SIZEOF_CURL_SOCKLEN_T 4 +# define CURL_PULL_SYS_TYPES_H 1 +# define CURL_PULL_SYS_SOCKET_H 1 # endif -# define CURL_TYPEOF_CURL_SOCKLEN_T FIXME -# define CURL_SIZEOF_CURL_SOCKLEN_T -1 #elif defined(__MVS__) # if defined(__IBMC__) || defined(__IBMCPP__) @@ -545,8 +547,10 @@ # define CURL_SUFFIX_CURL_OFF_T L # define CURL_SUFFIX_CURL_OFF_TU UL # endif -# define CURL_TYPEOF_CURL_SOCKLEN_T FIXME -# define CURL_SIZEOF_CURL_SOCKLEN_T -1 +# define CURL_TYPEOF_CURL_SOCKLEN_T socklen_t +# define CURL_SIZEOF_CURL_SOCKLEN_T 4 +# define CURL_PULL_SYS_TYPES_H 1 +# define CURL_PULL_SYS_SOCKET_H 1 #else # error "Unknown non-configure build target!" -- cgit v1.2.1 From 3d024d5fce4c52cf137ef71e59006e7e6ec8b61a Mon Sep 17 00:00:00 2001 From: Yang Tse Date: Mon, 11 May 2009 18:20:13 +0000 Subject: fIX *__SOCKLEN_T definitions for SYMBIAN32 and VMS targets --- include/curl/curlbuild.h.dist | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'include') diff --git a/include/curl/curlbuild.h.dist b/include/curl/curlbuild.h.dist index 8b4360daa..f7290ae05 100644 --- a/include/curl/curlbuild.h.dist +++ b/include/curl/curlbuild.h.dist @@ -330,8 +330,8 @@ # define CURL_SUFFIX_CURL_OFF_T LL # define CURL_SUFFIX_CURL_OFF_TU ULL # endif -# define CURL_TYPEOF_CURL_SOCKLEN_T FIXME -# define CURL_SIZEOF_CURL_SOCKLEN_T -1 +# define CURL_TYPEOF_CURL_SOCKLEN_T unsigned int +# define CURL_SIZEOF_CURL_SOCKLEN_T 4 #elif defined(__MWERKS__) # define CURL_SIZEOF_LONG 4 @@ -389,8 +389,8 @@ # define CURL_SUFFIX_CURL_OFF_T L # define CURL_SUFFIX_CURL_OFF_TU UL # endif -# define CURL_TYPEOF_CURL_SOCKLEN_T FIXME -# define CURL_SIZEOF_CURL_SOCKLEN_T -1 +# define CURL_TYPEOF_CURL_SOCKLEN_T unsigned int +# define CURL_SIZEOF_CURL_SOCKLEN_T 4 #elif defined(__OS400__) # if defined(__ILEC400__) -- cgit v1.2.1 From a1f13dd31b9766a79d8cf0ed5b3993f881184118 Mon Sep 17 00:00:00 2001 From: Yang Tse Date: Tue, 12 May 2009 01:57:53 +0000 Subject: fiX *__SOCKLEN_T definitions for remaining targets --- include/curl/curlbuild.h.dist | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) (limited to 'include') diff --git a/include/curl/curlbuild.h.dist b/include/curl/curlbuild.h.dist index f7290ae05..15cfced5a 100644 --- a/include/curl/curlbuild.h.dist +++ b/include/curl/curlbuild.h.dist @@ -218,8 +218,8 @@ # define CURL_SUFFIX_CURL_OFF_T i64 # define CURL_SUFFIX_CURL_OFF_TU ui64 # endif -# define CURL_TYPEOF_CURL_SOCKLEN_T FIXME -# define CURL_SIZEOF_CURL_SOCKLEN_T -1 +# define CURL_TYPEOF_CURL_SOCKLEN_T int +# define CURL_SIZEOF_CURL_SOCKLEN_T 4 #elif defined(__TURBOC__) # define CURL_SIZEOF_LONG 4 @@ -230,8 +230,8 @@ # define CURL_SIZEOF_CURL_OFF_T 4 # define CURL_SUFFIX_CURL_OFF_T L # define CURL_SUFFIX_CURL_OFF_TU UL -# define CURL_TYPEOF_CURL_SOCKLEN_T FIXME -# define CURL_SIZEOF_CURL_SOCKLEN_T -1 +# define CURL_TYPEOF_CURL_SOCKLEN_T int +# define CURL_SIZEOF_CURL_SOCKLEN_T 4 #elif defined(__WATCOMC__) # if defined(__386__) @@ -253,8 +253,8 @@ # define CURL_SUFFIX_CURL_OFF_T L # define CURL_SUFFIX_CURL_OFF_TU UL # endif -# define CURL_TYPEOF_CURL_SOCKLEN_T FIXME -# define CURL_SIZEOF_CURL_SOCKLEN_T -1 +# define CURL_TYPEOF_CURL_SOCKLEN_T int +# define CURL_SIZEOF_CURL_SOCKLEN_T 4 #elif defined(__POCC__) # if (__POCC__ < 280) @@ -297,8 +297,8 @@ # define CURL_SIZEOF_CURL_OFF_T 4 # define CURL_SUFFIX_CURL_OFF_T L # define CURL_SUFFIX_CURL_OFF_TU UL -# define CURL_TYPEOF_CURL_SOCKLEN_T FIXME -# define CURL_SIZEOF_CURL_SOCKLEN_T -1 +# define CURL_TYPEOF_CURL_SOCKLEN_T int +# define CURL_SIZEOF_CURL_SOCKLEN_T 4 #elif defined(__SYMBIAN32__) # if defined(__EABI__) /* Treat all ARM compilers equally */ @@ -342,8 +342,8 @@ # define CURL_SIZEOF_CURL_OFF_T 8 # define CURL_SUFFIX_CURL_OFF_T LL # define CURL_SUFFIX_CURL_OFF_TU ULL -# define CURL_TYPEOF_CURL_SOCKLEN_T FIXME -# define CURL_SIZEOF_CURL_SOCKLEN_T -1 +# define CURL_TYPEOF_CURL_SOCKLEN_T int +# define CURL_SIZEOF_CURL_SOCKLEN_T 4 #elif defined(_WIN32_WCE) # define CURL_SIZEOF_LONG 4 -- cgit v1.2.1 From 89fb7c85bfd3db7b6ff9e4eceab26f1b8079219d Mon Sep 17 00:00:00 2001 From: Daniel Stenberg Date: Mon, 18 May 2009 07:58:00 +0000 Subject: start climbing to 7.19.6 --- include/curl/curlver.h | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'include') diff --git a/include/curl/curlver.h b/include/curl/curlver.h index fea3884a3..ccfcaddf9 100644 --- a/include/curl/curlver.h +++ b/include/curl/curlver.h @@ -31,13 +31,13 @@ /* This is the version number of the libcurl package from which this header file origins: */ -#define LIBCURL_VERSION "7.19.5-CVS" +#define LIBCURL_VERSION "7.19.6-CVS" /* The numeric version number is also available "in parts" by using these defines: */ #define LIBCURL_VERSION_MAJOR 7 #define LIBCURL_VERSION_MINOR 19 -#define LIBCURL_VERSION_PATCH 5 +#define LIBCURL_VERSION_PATCH 6 /* This is the numeric version of the libcurl version number, meant for easier parsing and comparions by programs. The LIBCURL_VERSION_NUM define will @@ -54,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 0x071305 +#define LIBCURL_VERSION_NUM 0x071306 /* * This is the date and time when the full source package was created. The -- cgit v1.2.1 From 4650732f4a8590c8f6a00566510f9cdd656397a7 Mon Sep 17 00:00:00 2001 From: Yang Tse Date: Mon, 18 May 2009 12:25:45 +0000 Subject: Update copyright year, to force CVS to update the $Id date string format --- include/curl/stdcheaders.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'include') diff --git a/include/curl/stdcheaders.h b/include/curl/stdcheaders.h index 11c1e2f6e..0a1bcdad1 100644 --- a/include/curl/stdcheaders.h +++ b/include/curl/stdcheaders.h @@ -7,7 +7,7 @@ * | (__| |_| | _ <| |___ * \___|\___/|_| \_\_____| * - * Copyright (C) 1998 - 2004, Daniel Stenberg, , et al. + * Copyright (C) 1998 - 2009, 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 -- cgit v1.2.1 From 15eaf27bc7b4ad33af275b9cd0601ef19d54ac9c Mon Sep 17 00:00:00 2001 From: Dan Fandrich Date: Thu, 28 May 2009 21:32:31 +0000 Subject: Fixed a few comment typos (from the FreeBSD ports) --- include/curl/curl.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'include') diff --git a/include/curl/curl.h b/include/curl/curl.h index 9c8cd40e0..2e164d923 100644 --- a/include/curl/curl.h +++ b/include/curl/curl.h @@ -186,7 +186,7 @@ typedef size_t (*curl_write_callback)(char *buffer, size_t nitems, void *outstream); -/* this is the return codes for the seek callbacks */ +/* These are the return codes for the seek callbacks */ #define CURL_SEEKFUNC_OK 0 #define CURL_SEEKFUNC_FAIL 1 /* fail the entire transfer */ #define CURL_SEEKFUNC_CANTSEEK 2 /* tell libcurl seeking can't be done, so @@ -1516,7 +1516,7 @@ CURL_EXTERN void curl_free(void *p); * DESCRIPTION * * curl_global_init() should be invoked exactly once for each application that - * uses libcurl and before any call of other libcurl function. + * uses libcurl and before any call of other libcurl functions. * * This function is not thread-safe! */ -- cgit v1.2.1 From cda8d63d4308e1506b7fd65417b8cae01e637707 Mon Sep 17 00:00:00 2001 From: Dan Fandrich Date: Sat, 30 May 2009 00:07:50 +0000 Subject: Allow compiling under Android --- include/curl/curl.h | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'include') diff --git a/include/curl/curl.h b/include/curl/curl.h index 2e164d923..78213b308 100644 --- a/include/curl/curl.h +++ b/include/curl/curl.h @@ -70,7 +70,8 @@ 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) || defined(__SYMBIAN32__) || defined(__INTEGRITY) + defined(__minix) || defined(__SYMBIAN32__) || defined(__INTEGRITY) || \ + defined(ANDROID) #include #endif -- cgit v1.2.1 From c0e004ec1c427101f2f90cd264bcab152e016dcc Mon Sep 17 00:00:00 2001 From: Yang Tse Date: Mon, 1 Jun 2009 09:18:15 +0000 Subject: John E. Malmberg's VMS specific clean-up for curl.h --- include/curl/curl.h | 9 ++------- 1 file changed, 2 insertions(+), 7 deletions(-) (limited to 'include') diff --git a/include/curl/curl.h b/include/curl/curl.h index 78213b308..65b27ba5b 100644 --- a/include/curl/curl.h +++ b/include/curl/curl.h @@ -48,13 +48,8 @@ #include /* The include stuff here below is mainly for time_t! */ -#ifdef vms -# include -# include -#else -# include -# include -#endif /* defined (vms) */ +#include +#include #if defined(WIN32) && !defined(_WIN32_WCE) && !defined(__GNUC__) && \ !defined(__CYGWIN__) || defined(__MINGW32__) -- cgit v1.2.1 From 00883822be245d2660a569e6bde38892b9433aa2 Mon Sep 17 00:00:00 2001 From: Yang Tse Date: Thu, 4 Jun 2009 19:11:11 +0000 Subject: allow building libcurl for VxWorks --- include/curl/curl.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'include') diff --git a/include/curl/curl.h b/include/curl/curl.h index 65b27ba5b..05df0f1c9 100644 --- a/include/curl/curl.h +++ b/include/curl/curl.h @@ -73,7 +73,7 @@ #ifndef _WIN32_WCE #include #endif -#if !defined(WIN32) && !defined(__WATCOMC__) +#if !defined(WIN32) && !defined(__WATCOMC__) && !defined(__VXWORKS__) #include #endif #include -- cgit v1.2.1 From 15be673054bd0b71f9a4e47ee0af337f3d917e09 Mon Sep 17 00:00:00 2001 From: Bill Hoffman Date: Sat, 6 Jun 2009 13:18:01 +0000 Subject: ENH: add some cmake docs and fix build with socklen_t --- include/curl/curlbuild.h.cmake | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) (limited to 'include') diff --git a/include/curl/curlbuild.h.cmake b/include/curl/curlbuild.h.cmake index 07fcc1aeb..0173a215f 100644 --- a/include/curl/curlbuild.h.cmake +++ b/include/curl/curlbuild.h.cmake @@ -63,6 +63,15 @@ Error Compilation_aborted_CURL_SIZEOF_LONG_already_defined #endif +#ifdef CURL_TYPEOF_CURL_SOCKLEN_T +# error "CURL_TYPEOF_CURL_SOCKLEN_T shall not be defined except in curlbuild.h" + Error Compilation_aborted_CURL_TYPEOF_CURL_SOCKLEN_T_already_defined +#endif + +#ifdef CURL_SIZEOF_CURL_SOCKLEN_T +# error "CURL_SIZEOF_CURL_SOCKLEN_T shall not be defined except in curlbuild.h" + Error Compilation_aborted_CURL_SIZEOF_CURL_SOCKLEN_T_already_defined +#endif #ifdef CURL_TYPEOF_CURL_OFF_T # error "CURL_TYPEOF_CURL_OFF_T shall not be defined except in curlbuild.h" Error Compilation_aborted_CURL_TYPEOF_CURL_OFF_T_already_defined @@ -126,6 +135,20 @@ /* The size of `long', as computed by sizeof. */ #cmakedefine CURL_SIZEOF_LONG ${CURL_SIZEOF_LONG} +/* Integral data type used for curl_socklen_t. */ +#cmakedefine CURL_TYPEOF_CURL_SOCKLEN_T ${CURL_TYPEOF_CURL_SOCKLEN_T} + +/* on windows socklen_t is in here */ +#ifdef _WIN32 +# include +#endif + +/* Data type definition of curl_socklen_t. */ +typedef CURL_TYPEOF_CURL_SOCKLEN_T curl_socklen_t; + +/* The size of `curl_socklen_t', as computed by sizeof. */ +#cmakedefine CURL_SIZEOF_CURL_SOCKLEN_T ${CURL_SIZEOF_CURL_SOCKLEN_T} + /* Signed integral data type used for curl_off_t. */ #cmakedefine CURL_TYPEOF_CURL_OFF_T ${CURL_TYPEOF_CURL_OFF_T} -- cgit v1.2.1 From 2c166812253c28cdfbffdd4de069f5c11db3c7a8 Mon Sep 17 00:00:00 2001 From: Yang Tse Date: Wed, 10 Jun 2009 02:49:42 +0000 Subject: Adjusted to take in account that... With the curl memory tracking feature decoupled from the debug build feature, CURLDEBUG and DEBUGBUILD preprocessor symbol definitions are used as follows: CURLDEBUG used for curl debug memory tracking specific code (--enable-curldebug) DEBUGBUILD used for debug enabled specific code (--enable-debug) --- include/curl/curl.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'include') diff --git a/include/curl/curl.h b/include/curl/curl.h index 05df0f1c9..970c11678 100644 --- a/include/curl/curl.h +++ b/include/curl/curl.h @@ -1786,8 +1786,8 @@ typedef struct { #define CURL_VERSION_LARGEFILE (1<<9) /* supports files bigger than 2GB */ #define CURL_VERSION_IDN (1<<10) /* International Domain Names support */ #define CURL_VERSION_SSPI (1<<11) /* SSPI is supported */ -#define CURL_VERSION_CONV (1<<12) /* character conversions are - supported */ +#define CURL_VERSION_CONV (1<<12) /* character conversions supported */ +#define CURL_VERSION_CURLDEBUG (1<<13) /* debug memory tracking supported */ /* * NAME curl_version_info() -- cgit v1.2.1 From fb08218a0409bdae7ccdc647ffdddf72c3c5fe61 Mon Sep 17 00:00:00 2001 From: Bill Hoffman Date: Wed, 15 Jul 2009 19:25:22 +0000 Subject: BUG: curl did not build with cmake with VS 2005 for two reasons, ws2tcpip.h requires winsock2.h to be included before it with that compiler, and wldap32 is not available with the default install of the compiler, so disable ldap support if that is not found --- include/curl/curlbuild.h.cmake | 1 + 1 file changed, 1 insertion(+) (limited to 'include') diff --git a/include/curl/curlbuild.h.cmake b/include/curl/curlbuild.h.cmake index 0173a215f..afa1316c0 100644 --- a/include/curl/curlbuild.h.cmake +++ b/include/curl/curlbuild.h.cmake @@ -140,6 +140,7 @@ /* on windows socklen_t is in here */ #ifdef _WIN32 +# include # include #endif -- cgit v1.2.1 From 47c392e135f17d400acc5d7e99b88d16578cb406 Mon Sep 17 00:00:00 2001 From: Daniel Stenberg Date: Wed, 22 Jul 2009 22:49:01 +0000 Subject: - Added CURLOPT_SSH_KNOWNHOSTS, CURLOPT_SSH_KEYFUNCTION, CURLOPT_SSH_KEYDATA. They introduce known_host support for SSH keys to libcurl. See docs for details. --- include/curl/curl.h | 49 +++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 49 insertions(+) (limited to 'include') diff --git a/include/curl/curl.h b/include/curl/curl.h index 970c11678..d261ce39b 100644 --- a/include/curl/curl.h +++ b/include/curl/curl.h @@ -493,6 +493,45 @@ typedef enum { #define CURL_ERROR_SIZE 256 +struct curl_khkey { + const char *key; /* points to a zero-terminated string encoded with base64 + if len is zero, otherwise to the "raw" data */ + size_t len; + enum type { + CURLKHTYPE_UNKNOWN, + CURLKHTYPE_RSA1, + CURLKHTYPE_RSA, + CURLKHTYPE_DSS + } keytype; +}; + +/* this is the set of return values expected from the curl_sshkeycallback + callback */ +enum curl_khstat { + CURLKHSTAT_FINE_ADD_TO_FILE, + CURLKHSTAT_FINE, + CURLKHSTAT_REJECT, /* reject the connection, return an error */ + CURLKHSTAT_DEFER, /* do not accept it, but we can't answer right now so + this causes a CURLE_DEFER error but otherwise the + connection will be left intact etc */ + CURLKHSTAT_LAST /* not for use, only a marker for last-in-list */ +}; + +/* this is the set of status codes pass in to the callback */ +enum curl_khmatch { + CURLKHMATCH_OK, /* match */ + CURLKHMATCH_MISMATCH, /* host found, key mismatch! */ + CURLKHMATCH_MISSING, /* no matching host/key found */ + CURLKHMATCH_LAST /* not for use, only a marker for last-in-list */ +}; + +typedef int + (*curl_sshkeycallback) (CURL *easy, /* easy handle */ + const struct curl_khkey *knownkey, /* known */ + const struct curl_khkey *foundkey, /* found */ + enum curl_khmatch, /* libcurl's view on the keys */ + void *clientp); /* custom pointer passed from app */ + /* parameter for the CURLOPT_USE_SSL option */ typedef enum { CURLUSESSL_NONE, /* do not attempt to use SSL */ @@ -1214,6 +1253,16 @@ typedef enum { to all protocols except FILE and SCP. */ CINIT(REDIR_PROTOCOLS, LONG, 182), + /* set the SSH knownhost file name to use */ + CINIT(SSH_KNOWNHOSTS, OBJECTPOINT, 183), + + /* set the SSH host key callback, must point to a curl_sshkeycallback + function */ + CINIT(SSH_KEYFUNCTION, FUNCTIONPOINT, 184), + + /* set the SSH host key callback custom pointer */ + CINIT(SSH_KEYDATA, OBJECTPOINT, 185), + CURLOPT_LASTENTRY /* the last unused */ } CURLoption; -- cgit v1.2.1 From 501f9f83099d654a98c94ca29cf45b60d0963c27 Mon Sep 17 00:00:00 2001 From: Patrick Monnerat Date: Tue, 11 Aug 2009 14:07:08 +0000 Subject: Fix definition of CURLOPT_SOCKS5_GSSAPI_SERVICE from LONG to OBJECTPOINT Fix OS400 makefile for tests to use the new Makefile.inc in libtest Update the OS400 wrappers and RPG binding according to the current CVS source state --- include/curl/curl.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'include') diff --git a/include/curl/curl.h b/include/curl/curl.h index d261ce39b..116ba50f7 100644 --- a/include/curl/curl.h +++ b/include/curl/curl.h @@ -1236,7 +1236,7 @@ typedef enum { CINIT(TFTP_BLKSIZE, LONG, 178), /* Socks Service */ - CINIT(SOCKS5_GSSAPI_SERVICE, LONG, 179), + CINIT(SOCKS5_GSSAPI_SERVICE, OBJECTPOINT, 179), /* Socks Service */ CINIT(SOCKS5_GSSAPI_NEC, LONG, 180), -- cgit v1.2.1 From c6712a0c6cfbce24f719bc5822443e05f5a83170 Mon Sep 17 00:00:00 2001 From: Daniel Stenberg Date: Wed, 12 Aug 2009 11:24:52 +0000 Subject: start over fresh again towards 7.19.7 --- include/curl/curlver.h | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'include') diff --git a/include/curl/curlver.h b/include/curl/curlver.h index ccfcaddf9..e56ec884c 100644 --- a/include/curl/curlver.h +++ b/include/curl/curlver.h @@ -31,13 +31,13 @@ /* This is the version number of the libcurl package from which this header file origins: */ -#define LIBCURL_VERSION "7.19.6-CVS" +#define LIBCURL_VERSION "7.19.7-CVS" /* The numeric version number is also available "in parts" by using these defines: */ #define LIBCURL_VERSION_MAJOR 7 #define LIBCURL_VERSION_MINOR 19 -#define LIBCURL_VERSION_PATCH 6 +#define LIBCURL_VERSION_PATCH 7 /* This is the numeric version of the libcurl version number, meant for easier parsing and comparions by programs. The LIBCURL_VERSION_NUM define will @@ -54,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 0x071306 +#define LIBCURL_VERSION_NUM 0x071307 /* * This is the date and time when the full source package was created. The -- cgit v1.2.1 From 60c099467778b21ba62e19e924fd1a801be6ef4d Mon Sep 17 00:00:00 2001 From: Gunter Knauf Date: Mon, 31 Aug 2009 02:05:04 +0000 Subject: removed curl prefix for curlbuild.h as Patrick suggested. --- include/curl/curl.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'include') diff --git a/include/curl/curl.h b/include/curl/curl.h index 116ba50f7..0a2c719f4 100644 --- a/include/curl/curl.h +++ b/include/curl/curl.h @@ -32,7 +32,7 @@ */ #include "curlver.h" /* libcurl version defines */ -#include "curl/curlbuild.h" /* libcurl build definitions */ +#include "curlbuild.h" /* libcurl build definitions */ #include "curlrules.h" /* libcurl rules enforcement */ /* -- cgit v1.2.1 From 44e2832b2a06ad95a3a5241b7c1b0fece76cace5 Mon Sep 17 00:00:00 2001 From: Gunter Knauf Date: Mon, 31 Aug 2009 13:58:47 +0000 Subject: added curl prefix for curlbuild.h back until we find a better solution; it breaks almost all autobuilds. --- include/curl/curl.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'include') diff --git a/include/curl/curl.h b/include/curl/curl.h index 0a2c719f4..116ba50f7 100644 --- a/include/curl/curl.h +++ b/include/curl/curl.h @@ -32,7 +32,7 @@ */ #include "curlver.h" /* libcurl version defines */ -#include "curlbuild.h" /* libcurl build definitions */ +#include "curl/curlbuild.h" /* libcurl build definitions */ #include "curlrules.h" /* libcurl rules enforcement */ /* -- cgit v1.2.1 From f3bd0c3fc3a69843f5f67f61c6a75fc705fe5078 Mon Sep 17 00:00:00 2001 From: Patrick Monnerat Date: Mon, 31 Aug 2009 15:48:52 +0000 Subject: Added a warning comment about curlbuild.h inclusion leading path. --- include/curl/curl.h | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'include') diff --git a/include/curl/curl.h b/include/curl/curl.h index 116ba50f7..77e95c555 100644 --- a/include/curl/curl.h +++ b/include/curl/curl.h @@ -32,6 +32,11 @@ */ #include "curlver.h" /* libcurl version defines */ +/* The leading path on the following include statement is required by the + autobuild system (tests/testcurl.pl) because curlbuild.h is not generated + in the same directory as curl.h in this special case. As long as the + autobuild system works that way, do not remove it, unless you know what + you're doing. */ #include "curl/curlbuild.h" /* libcurl build definitions */ #include "curlrules.h" /* libcurl rules enforcement */ -- cgit v1.2.1 From ea2754e0289d6714c37569da0bd14917cbdd0196 Mon Sep 17 00:00:00 2001 From: Daniel Stenberg Date: Tue, 1 Sep 2009 07:02:37 +0000 Subject: clarify: building outside of the source tree is not special for the test script --- include/curl/curl.h | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) (limited to 'include') diff --git a/include/curl/curl.h b/include/curl/curl.h index 77e95c555..34da873b6 100644 --- a/include/curl/curl.h +++ b/include/curl/curl.h @@ -32,11 +32,10 @@ */ #include "curlver.h" /* libcurl version defines */ -/* The leading path on the following include statement is required by the - autobuild system (tests/testcurl.pl) because curlbuild.h is not generated - in the same directory as curl.h in this special case. As long as the - autobuild system works that way, do not remove it, unless you know what - you're doing. */ +/* The leading path on the following include statement is required to properly + allow building outside of the source tree, because then curlbuild.h is not + generated in the same directory as curl.h. Do not remove it, unless you + know what you're doing. */ #include "curl/curlbuild.h" /* libcurl build definitions */ #include "curlrules.h" /* libcurl rules enforcement */ -- cgit v1.2.1 From 8646cecb785e8ac426527daedc1eb35e27f2edca Mon Sep 17 00:00:00 2001 From: Daniel Stenberg Date: Sun, 27 Sep 2009 21:34:13 +0000 Subject: - I introduced a maximum limit for received HTTP headers. It is controlled by the define CURL_MAX_HTTP_HEADER which is even exposed in the public header file to allow for users to fairly easy rebuild libcurl with a modified limit. The rationale for a fixed limit is that libcurl is realloc()ing a buffer to be able to put a full header into it, so that it can call the header callback with the entire header, but that also risk getting it into trouble if a server by mistake or willingly sends a header that is more or less without an end. The limit is set to 100K. --- include/curl/curl.h | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to 'include') diff --git a/include/curl/curl.h b/include/curl/curl.h index 34da873b6..4b79eca9f 100644 --- a/include/curl/curl.h +++ b/include/curl/curl.h @@ -178,6 +178,15 @@ typedef int (*curl_progress_callback)(void *clientp, time for those who feel adventurous. */ #define CURL_MAX_WRITE_SIZE 16384 #endif + +#ifndef CURL_MAX_HTTP_HEADER +/* The only reason to have a max limit for this is to avoid the risk of a bad + server feeding libcurl with a never-ending header that will cause reallocs + infinitely */ +#define CURL_MAX_HTTP_HEADER (100*1024) +#endif + + /* This is a magic return code for the write callback that, when returned, will signal libcurl to pause receiving on the current transfer. */ #define CURL_WRITEFUNC_PAUSE 0x10000001 -- cgit v1.2.1 From 5e253785af3fe6b6b611b0782d25e02cb60ac855 Mon Sep 17 00:00:00 2001 From: Yang Tse Date: Fri, 16 Oct 2009 13:30:31 +0000 Subject: Move comment --- include/curl/curl.h | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) (limited to 'include') diff --git a/include/curl/curl.h b/include/curl/curl.h index 4b79eca9f..761e69a2b 100644 --- a/include/curl/curl.h +++ b/include/curl/curl.h @@ -31,11 +31,15 @@ * http://cool.haxx.se/mailman/listinfo/curl-library/ */ +/* + * Leading 'curl' path on the 'curlbuild.h' include statement is + * required to properly allow building outside of the source tree, + * due to the fact that in this case 'curlbuild.h' is generated in + * a subdirectory of the build tree while 'curl.h actually remains + * in a subdirectory of the source tree. + */ + #include "curlver.h" /* libcurl version defines */ -/* The leading path on the following include statement is required to properly - allow building outside of the source tree, because then curlbuild.h is not - generated in the same directory as curl.h. Do not remove it, unless you - know what you're doing. */ #include "curl/curlbuild.h" /* libcurl build definitions */ #include "curlrules.h" /* libcurl rules enforcement */ -- cgit v1.2.1 From 21af9bf1cd41393aedf546aef5d21a43219c9eca Mon Sep 17 00:00:00 2001 From: Yang Tse Date: Tue, 27 Oct 2009 16:56:20 +0000 Subject: Fix spelling --- include/README | 2 +- include/curl/curlbuild.h.dist | 4 ++-- include/curl/curlrules.h | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) (limited to 'include') diff --git a/include/README b/include/README index 485722e30..a75249f0a 100644 --- a/include/README +++ b/include/README @@ -39,7 +39,7 @@ The following notes apply to libcurl version 7.19.0 and later. the library that you have built. It is _your_ responsability to provide this file. No one at the cURL project can know how you have built the library. -* File curl/curlbuild.h includes platform and configuration dependant info, +* File curl/curlbuild.h includes platform and configuration dependent info, and must not be modified by anyone. Configure script generates it for you. * We cannot assume anything else but very basic compiler features being diff --git a/include/curl/curlbuild.h.dist b/include/curl/curlbuild.h.dist index 15cfced5a..9c3469ef4 100644 --- a/include/curl/curlbuild.h.dist +++ b/include/curl/curlbuild.h.dist @@ -68,7 +68,7 @@ * * For any given platform/compiler curl_off_t must be typedef'ed to a * 64-bit wide signed integral data type. The width of this data type - * must remain constant and independant of any possible large file + * must remain constant and independent of any possible large file * support settings. * * As an exception to the above, curl_off_t shall be typedef'ed to a @@ -76,7 +76,7 @@ * * As a general rule, curl_off_t shall not be mapped to off_t. This * rule shall only be violated if off_t is the only 64-bit data type - * available and the size of off_t is independant of large file support + * available and the size of off_t is independent of large file support * settings. Keep your build on the safe side avoiding an off_t gating. * If you have a 64-bit off_t then take for sure that another 64-bit * data type exists, dig deeper and you will find it. diff --git a/include/curl/curlrules.h b/include/curl/curlrules.h index a03858397..9705e2ba9 100644 --- a/include/curl/curlrules.h +++ b/include/curl/curlrules.h @@ -57,7 +57,7 @@ * that the dimension of a constant array can not be a negative one. * In this way if the compile time verification fails, the compilation * will fail issuing an error. The error description wording is compiler - * dependant but it will be quite similar to one of the following: + * dependent but it will be quite similar to one of the following: * * "negative subscript or subscript is too large" * "array must have at least one element" -- cgit v1.2.1 From 99e43046a7415796d1369c493fed7043fc98075c Mon Sep 17 00:00:00 2001 From: Daniel Stenberg Date: Wed, 4 Nov 2009 13:11:43 +0000 Subject: start over towards 7.19.8 --- include/curl/curlver.h | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'include') diff --git a/include/curl/curlver.h b/include/curl/curlver.h index e56ec884c..7e856b0c2 100644 --- a/include/curl/curlver.h +++ b/include/curl/curlver.h @@ -31,13 +31,13 @@ /* This is the version number of the libcurl package from which this header file origins: */ -#define LIBCURL_VERSION "7.19.7-CVS" +#define LIBCURL_VERSION "7.19.8-CVS" /* The numeric version number is also available "in parts" by using these defines: */ #define LIBCURL_VERSION_MAJOR 7 #define LIBCURL_VERSION_MINOR 19 -#define LIBCURL_VERSION_PATCH 7 +#define LIBCURL_VERSION_PATCH 8 /* This is the numeric version of the libcurl version number, meant for easier parsing and comparions by programs. The LIBCURL_VERSION_NUM define will @@ -54,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 0x071307 +#define LIBCURL_VERSION_NUM 0x071308 /* * This is the date and time when the full source package was created. The -- cgit v1.2.1 From 55e68ba3338b02d9a52dfe6343054e61a944a895 Mon Sep 17 00:00:00 2001 From: Yang Tse Date: Thu, 5 Nov 2009 15:04:03 +0000 Subject: I removed leading 'curl' path on the 'curlbuild.h' include statement in curl.h, adjusting auto-makefiles include path, to enhance portability to OS's without an orthogonal directory tree structure such as OS/400. --- include/curl/curl.h | 10 +--------- 1 file changed, 1 insertion(+), 9 deletions(-) (limited to 'include') diff --git a/include/curl/curl.h b/include/curl/curl.h index 761e69a2b..279c1b602 100644 --- a/include/curl/curl.h +++ b/include/curl/curl.h @@ -31,16 +31,8 @@ * http://cool.haxx.se/mailman/listinfo/curl-library/ */ -/* - * Leading 'curl' path on the 'curlbuild.h' include statement is - * required to properly allow building outside of the source tree, - * due to the fact that in this case 'curlbuild.h' is generated in - * a subdirectory of the build tree while 'curl.h actually remains - * in a subdirectory of the source tree. - */ - #include "curlver.h" /* libcurl version defines */ -#include "curl/curlbuild.h" /* libcurl build definitions */ +#include "curlbuild.h" /* libcurl build definitions */ #include "curlrules.h" /* libcurl rules enforcement */ /* -- cgit v1.2.1 From 448f6684bb01915d1926564fea60b5dcf15d607d Mon Sep 17 00:00:00 2001 From: Daniel Stenberg Date: Fri, 27 Nov 2009 23:53:50 +0000 Subject: 7.20.0 is the planned next version number --- include/curl/curlver.h | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'include') diff --git a/include/curl/curlver.h b/include/curl/curlver.h index 7e856b0c2..ef0c5279f 100644 --- a/include/curl/curlver.h +++ b/include/curl/curlver.h @@ -31,13 +31,13 @@ /* This is the version number of the libcurl package from which this header file origins: */ -#define LIBCURL_VERSION "7.19.8-CVS" +#define LIBCURL_VERSION "7.20.0-CVS" /* The numeric version number is also available "in parts" by using these defines: */ #define LIBCURL_VERSION_MAJOR 7 -#define LIBCURL_VERSION_MINOR 19 -#define LIBCURL_VERSION_PATCH 8 +#define LIBCURL_VERSION_MINOR 20 +#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 @@ -54,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 0x071308 +#define LIBCURL_VERSION_NUM 0x071400 /* * This is the date and time when the full source package was created. The -- cgit v1.2.1 From ec3bb8f727405642a471b4b1b9eb0118fc003104 Mon Sep 17 00:00:00 2001 From: Daniel Stenberg Date: Sat, 12 Dec 2009 21:54:01 +0000 Subject: introducing IMAP, POP3 and SMTP support (still lots of polish left to do) --- include/curl/curl.h | 13 +++++++++++++ 1 file changed, 13 insertions(+) (limited to 'include') diff --git a/include/curl/curl.h b/include/curl/curl.h index 279c1b602..f7c3f52ff 100644 --- a/include/curl/curl.h +++ b/include/curl/curl.h @@ -613,6 +613,12 @@ typedef enum { #define CURLPROTO_DICT (1<<9) #define CURLPROTO_FILE (1<<10) #define CURLPROTO_TFTP (1<<11) +#define CURLPROTO_IMAP (1<<12) +#define CURLPROTO_IMAPS (1<<13) +#define CURLPROTO_POP3 (1<<14) +#define CURLPROTO_POP3S (1<<15) +#define CURLPROTO_SMTP (1<<16) +#define CURLPROTO_SMTPS (1<<17) #define CURLPROTO_ALL (~0) /* enable everything */ /* long may be 32 or 64 bits, but we should never depend on anything else @@ -1028,6 +1034,7 @@ typedef enum { essentially places a demand on the FTP server to acknowledge commands in a timely manner. */ CINIT(FTP_RESPONSE_TIMEOUT, LONG, 112), +#define CURLOPT_SERVER_RESPONSE_TIMEOUT CURLOPT_FTP_RESPONSE_TIMEOUT /* Set this option to one of the CURL_IPRESOLVE_* defines (see below) to tell libcurl to resolve names to those IP versions only. This only has @@ -1272,6 +1279,12 @@ typedef enum { /* set the SSH host key callback custom pointer */ CINIT(SSH_KEYDATA, OBJECTPOINT, 185), + /* set the SMTP mail originator */ + CINIT(MAIL_FROM, OBJECTPOINT, 186), + + /* set the SMTP mail receiver(s) */ + CINIT(MAIL_RCPT, OBJECTPOINT, 187), + CURLOPT_LASTENTRY /* the last unused */ } CURLoption; -- cgit v1.2.1 From b89789d82fdb2df7adc8d00e7574ab0e531c3f7b Mon Sep 17 00:00:00 2001 From: Daniel Stenberg Date: Fri, 25 Dec 2009 23:32:01 +0000 Subject: - Renato Botelho and Peter Pentchev brought a patch that makes the libcurl headers work correctly even on FreeBSD systems before v8. --- include/curl/curl.h | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) (limited to 'include') diff --git a/include/curl/curl.h b/include/curl/curl.h index f7c3f52ff..7fc11e340 100644 --- a/include/curl/curl.h +++ b/include/curl/curl.h @@ -47,6 +47,11 @@ #include #include +#if defined(__FreeBSD__) +/* Needed to check FreeBSD version */ +#include +#endif + /* The include stuff here below is mainly for time_t! */ #include #include @@ -66,7 +71,7 @@ require it! */ #if defined(_AIX) || defined(__NOVELL_LIBC__) || defined(__NetBSD__) || \ defined(__minix) || defined(__SYMBIAN32__) || defined(__INTEGRITY) || \ - defined(ANDROID) + defined(ANDROID) || (defined(__FreeBSD__) && __FreeBSD_version < 800000) #include #endif -- cgit v1.2.1 From 1f7d9f4f7b71d70fcd01bafab29f02e2345b11d1 Mon Sep 17 00:00:00 2001 From: Yang Tse Date: Sun, 27 Dec 2009 02:31:29 +0000 Subject: Adjust FreeBSD version check to follow FreeBSD Porter's Handbook http://www.freebsd.org/doc/en/books/porters-handbook/porting-versions.html --- include/curl/curl.h | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) (limited to 'include') diff --git a/include/curl/curl.h b/include/curl/curl.h index 7fc11e340..e765a4d2c 100644 --- a/include/curl/curl.h +++ b/include/curl/curl.h @@ -47,8 +47,8 @@ #include #include -#if defined(__FreeBSD__) -/* Needed to check FreeBSD version */ +#if defined(__FreeBSD__) && (__FreeBSD__ >= 2) +/* Needed for __FreeBSD_version symbol definition */ #include #endif @@ -71,7 +71,8 @@ require it! */ #if defined(_AIX) || defined(__NOVELL_LIBC__) || defined(__NetBSD__) || \ defined(__minix) || defined(__SYMBIAN32__) || defined(__INTEGRITY) || \ - defined(ANDROID) || (defined(__FreeBSD__) && __FreeBSD_version < 800000) + defined(ANDROID) || \ + (defined(__FreeBSD_version) && (__FreeBSD_version < 800000)) #include #endif -- cgit v1.2.1 From 3184a91ec86b2f35f16a8e11e2daa03fac8e91b6 Mon Sep 17 00:00:00 2001 From: Yang Tse Date: Wed, 30 Dec 2009 17:59:56 +0000 Subject: VMS specific preprocessor symbol checking adjustments --- include/curl/curlbuild.h.dist | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) (limited to 'include') diff --git a/include/curl/curlbuild.h.dist b/include/curl/curlbuild.h.dist index 9c3469ef4..0ee7135c5 100644 --- a/include/curl/curlbuild.h.dist +++ b/include/curl/curlbuild.h.dist @@ -370,16 +370,7 @@ # define CURL_SIZEOF_CURL_SOCKLEN_T 4 #elif defined(__VMS) -# if defined(__alpha) || defined(__ia64) -# define CURL_SIZEOF_LONG 4 -# define CURL_TYPEOF_CURL_OFF_T long long -# define CURL_FORMAT_CURL_OFF_T "lld" -# define CURL_FORMAT_CURL_OFF_TU "llu" -# define CURL_FORMAT_OFF_T "%lld" -# define CURL_SIZEOF_CURL_OFF_T 8 -# define CURL_SUFFIX_CURL_OFF_T LL -# define CURL_SUFFIX_CURL_OFF_TU ULL -# else +# if defined(__VAX) # define CURL_SIZEOF_LONG 4 # define CURL_TYPEOF_CURL_OFF_T long # define CURL_FORMAT_CURL_OFF_T "ld" @@ -388,6 +379,15 @@ # define CURL_SIZEOF_CURL_OFF_T 4 # define CURL_SUFFIX_CURL_OFF_T L # define CURL_SUFFIX_CURL_OFF_TU UL +# else +# define CURL_SIZEOF_LONG 4 +# define CURL_TYPEOF_CURL_OFF_T long long +# define CURL_FORMAT_CURL_OFF_T "lld" +# define CURL_FORMAT_CURL_OFF_TU "llu" +# define CURL_FORMAT_OFF_T "%lld" +# define CURL_SIZEOF_CURL_OFF_T 8 +# define CURL_SUFFIX_CURL_OFF_T LL +# define CURL_SUFFIX_CURL_OFF_TU ULL # endif # define CURL_TYPEOF_CURL_SOCKLEN_T unsigned int # define CURL_SIZEOF_CURL_SOCKLEN_T 4 -- cgit v1.2.1 From 605bbfc4c0fa838f50bf9d18e69e417168f524c0 Mon Sep 17 00:00:00 2001 From: Daniel Stenberg Date: Fri, 1 Jan 2010 14:44:44 +0000 Subject: - Ingmar Runge enhanced libcurl's FTP engine to support the PRET command. This command is a special "hack" used by the drftpd server, but even though it is a custom extension I've deemed it fine to add to libcurl since this server seems to survive and people keep using it and want libcurl to support it. The new libcurl option is named CURLOPT_FTP_USE_PRET, and it is also usable from the curl tool with --ftp-pret. Using this option on a server that doesn't support this command will make libcurl fail. --- include/curl/curl.h | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'include') diff --git a/include/curl/curl.h b/include/curl/curl.h index e765a4d2c..f689598fa 100644 --- a/include/curl/curl.h +++ b/include/curl/curl.h @@ -413,6 +413,7 @@ typedef enum { wrong format (Added in 7.19.0) */ CURLE_SSL_ISSUER_ERROR, /* 83 - Issuer check failed. (Added in 7.19.0) */ + CURLE_FTP_PRET_FAILED, /* 84 - a PRET command failed */ CURL_LAST /* never use! */ } CURLcode; @@ -1291,6 +1292,9 @@ typedef enum { /* set the SMTP mail receiver(s) */ CINIT(MAIL_RCPT, OBJECTPOINT, 187), + /* FTP: send PRET before PASV */ + CINIT(FTP_USE_PRET, LONG, 188), + CURLOPT_LASTENTRY /* the last unused */ } CURLoption; -- cgit v1.2.1 From a62f32d3c2012a4e2e48dac3d9ec780733c4a844 Mon Sep 17 00:00:00 2001 From: Daniel Stenberg Date: Fri, 1 Jan 2010 14:52:50 +0000 Subject: update copyright year since we are in 2010 now --- include/curl/curl.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'include') diff --git a/include/curl/curl.h b/include/curl/curl.h index f689598fa..fcefafc08 100644 --- a/include/curl/curl.h +++ b/include/curl/curl.h @@ -7,7 +7,7 @@ * | (__| |_| | _ <| |___ * \___|\___/|_| \_\_____| * - * Copyright (C) 1998 - 2009, Daniel Stenberg, , et al. + * Copyright (C) 1998 - 2010, 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 -- cgit v1.2.1 From 2c0418f154afbdc8f4d27d63d4329d3364be9c75 Mon Sep 17 00:00:00 2001 From: Daniel Stenberg Date: Thu, 21 Jan 2010 11:48:48 +0000 Subject: Julien Chaffraix removed an old obsolete typedef --- include/curl/curl.h | 8 -------- 1 file changed, 8 deletions(-) (limited to 'include') diff --git a/include/curl/curl.h b/include/curl/curl.h index fcefafc08..3d31086c3 100644 --- a/include/curl/curl.h +++ b/include/curl/curl.h @@ -242,14 +242,6 @@ typedef curl_socket_t curlsocktype purpose, struct curl_sockaddr *address); -#ifndef CURL_NO_OLDIES - /* not used since 7.10.8, will be removed in a future release */ -typedef int (*curl_passwd_callback)(void *clientp, - const char *prompt, - char *buffer, - int buflen); -#endif - typedef enum { CURLIOE_OK, /* I/O operation successful */ CURLIOE_UNKNOWNCMD, /* command was unknown to callback */ -- cgit v1.2.1 From bc4582b68a673d3b0f5a2e7d971605de2c8b3730 Mon Sep 17 00:00:00 2001 From: Daniel Stenberg Date: Thu, 21 Jan 2010 13:58:30 +0000 Subject: Chris Conroy brought support for RTSP transfers, and with it comes 8(!) new libcurl options for controlling what to get and how to receive posssibly interleaved RTP data. Initial commit. --- include/curl/curl.h | 60 ++++++++++++++++++++++++++++++++++++++++++++++++++++- 1 file changed, 59 insertions(+), 1 deletion(-) (limited to 'include') diff --git a/include/curl/curl.h b/include/curl/curl.h index 3d31086c3..5fb53e32a 100644 --- a/include/curl/curl.h +++ b/include/curl/curl.h @@ -197,6 +197,12 @@ typedef size_t (*curl_write_callback)(char *buffer, size_t nitems, void *outstream); +typedef size_t (*curl_rtp_write_callback)(char *buffer, + size_t size, + size_t nitems, + void *outstream, + int channel); + /* These are the return codes for the seek callbacks */ #define CURL_SEEKFUNC_OK 0 #define CURL_SEEKFUNC_FAIL 1 /* fail the entire transfer */ @@ -406,6 +412,9 @@ typedef enum { CURLE_SSL_ISSUER_ERROR, /* 83 - Issuer check failed. (Added in 7.19.0) */ CURLE_FTP_PRET_FAILED, /* 84 - a PRET command failed */ + CURLE_RTSP_CSEQ_ERROR, /* 85 - mismatch of RTSP CSeq numbers */ + CURLE_RTSP_SESSION_ERROR, /* 86 - mismatch of RTSP Session Identifiers */ + CURL_LAST /* never use! */ } CURLcode; @@ -618,6 +627,7 @@ typedef enum { #define CURLPROTO_POP3S (1<<15) #define CURLPROTO_SMTP (1<<16) #define CURLPROTO_SMTPS (1<<17) +#define CURLPROTO_RTSP (1<<18) #define CURLPROTO_ALL (~0) /* enable everything */ /* long may be 32 or 64 bits, but we should never depend on anything else @@ -1287,6 +1297,30 @@ typedef enum { /* FTP: send PRET before PASV */ CINIT(FTP_USE_PRET, LONG, 188), + /* RTSP request method (OPTIONS, SETUP, PLAY, etc...) */ + CINIT(RTSP_REQUEST, LONG, 189), + + /* The RTSP session identifier */ + CINIT(RTSP_SESSION_ID, OBJECTPOINT, 190), + + /* The RTSP stream URI */ + CINIT(RTSP_STREAM_URI, OBJECTPOINT, 191), + + /* The Transport: header to use in RTSP requests */ + CINIT(RTSP_TRANSPORT, OBJECTPOINT, 192), + + /* Manually initialize the client RTSP CSeq for this handle */ + CINIT(RTSP_CLIENT_CSEQ, LONG, 193), + + /* Manually initialize the server RTSP CSeq for this handle */ + CINIT(RTSP_SERVER_CSEQ, LONG, 194), + + /* The stream to pass to RTPFUNCTION. */ + CINIT(RTPDATA, OBJECTPOINT, 195), + + /* Let the application define a custom write method for RTP data */ + CINIT(RTPFUNCTION, FUNCTIONPOINT, 196), + CURLOPT_LASTENTRY /* the last unused */ } CURLoption; @@ -1330,6 +1364,7 @@ typedef enum { #define CURLOPT_WRITEDATA CURLOPT_FILE #define CURLOPT_READDATA CURLOPT_INFILE #define CURLOPT_HEADERDATA CURLOPT_WRITEHEADER +#define CURLOPT_RTSPHEADER CURLOPT_HTTPHEADER /* These enums are for use with the CURLOPT_HTTP_VERSION option. */ enum { @@ -1342,6 +1377,25 @@ enum { CURL_HTTP_VERSION_LAST /* *ILLEGAL* http version */ }; +/* + * Public API enums for RTSP requests + */ +enum { + CURL_RTSPREQ_NONE, /* first in list */ + CURL_RTSPREQ_OPTIONS, + CURL_RTSPREQ_DESCRIBE, + CURL_RTSPREQ_ANNOUNCE, + CURL_RTSPREQ_SETUP, + CURL_RTSPREQ_PLAY, + CURL_RTSPREQ_PAUSE, + CURL_RTSPREQ_TEARDOWN, + CURL_RTSPREQ_GET_PARAMETER, + CURL_RTSPREQ_SET_PARAMETER, + CURL_RTSPREQ_RECORD, + CURL_RTSPREQ_RECEIVE, + CURL_RTSPREQ_LAST /* last in list */ +}; + /* These enums are for use with the CURLOPT_NETRC option. */ enum CURL_NETRC_OPTION { CURL_NETRC_IGNORED, /* The .netrc will never be read. @@ -1711,9 +1765,13 @@ typedef enum { CURLINFO_APPCONNECT_TIME = CURLINFO_DOUBLE + 33, CURLINFO_CERTINFO = CURLINFO_SLIST + 34, CURLINFO_CONDITION_UNMET = CURLINFO_LONG + 35, + CURLINFO_RTSP_SESSION_ID = CURLINFO_STRING + 36, + CURLINFO_RTSP_CLIENT_CSEQ = CURLINFO_LONG + 37, + CURLINFO_RTSP_SERVER_CSEQ = CURLINFO_LONG + 38, + CURLINFO_RTSP_CSEQ_RECV = CURLINFO_LONG + 39, /* Fill in new entries below here! */ - CURLINFO_LASTONE = 35 + CURLINFO_LASTONE = 39 } CURLINFO; /* CURLINFO_RESPONSE_CODE is the new name for the option previously known as -- cgit v1.2.1 From 2f9a17fc4442a04d4ec81dc937fa3af7c8caeda7 Mon Sep 17 00:00:00 2001 From: Daniel Stenberg Date: Thu, 21 Jan 2010 14:05:06 +0000 Subject: remove typedef we ended up not using --- include/curl/curl.h | 6 ------ 1 file changed, 6 deletions(-) (limited to 'include') diff --git a/include/curl/curl.h b/include/curl/curl.h index 5fb53e32a..de709655d 100644 --- a/include/curl/curl.h +++ b/include/curl/curl.h @@ -197,12 +197,6 @@ typedef size_t (*curl_write_callback)(char *buffer, size_t nitems, void *outstream); -typedef size_t (*curl_rtp_write_callback)(char *buffer, - size_t size, - size_t nitems, - void *outstream, - int channel); - /* These are the return codes for the seek callbacks */ #define CURL_SEEKFUNC_OK 0 #define CURL_SEEKFUNC_FAIL 1 /* fail the entire transfer */ -- cgit v1.2.1 From 844c19cc5b5a62e572f4fb9e00c5c6a61c2fb581 Mon Sep 17 00:00:00 2001 From: Daniel Stenberg Date: Fri, 22 Jan 2010 12:17:03 +0000 Subject: s/RTPFUNCTION/INTERLEAVEFUNCTION/ s/RTPDATA/INTERLEAVEDATA/ --- include/curl/curl.h | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'include') diff --git a/include/curl/curl.h b/include/curl/curl.h index de709655d..3f5c49a27 100644 --- a/include/curl/curl.h +++ b/include/curl/curl.h @@ -1309,11 +1309,11 @@ typedef enum { /* Manually initialize the server RTSP CSeq for this handle */ CINIT(RTSP_SERVER_CSEQ, LONG, 194), - /* The stream to pass to RTPFUNCTION. */ - CINIT(RTPDATA, OBJECTPOINT, 195), + /* The stream to pass to INTERLEAVEFUNCTION. */ + CINIT(INTERLEAVEDATA, OBJECTPOINT, 195), /* Let the application define a custom write method for RTP data */ - CINIT(RTPFUNCTION, FUNCTIONPOINT, 196), + CINIT(INTERLEAVEFUNCTION, FUNCTIONPOINT, 196), CURLOPT_LASTENTRY /* the last unused */ } CURLoption; -- cgit v1.2.1 From 49ba75af269044e3ac10a6d9431fcc1818760449 Mon Sep 17 00:00:00 2001 From: Yang Tse Date: Tue, 2 Feb 2010 12:58:49 +0000 Subject: - Symbol CURL_FORMAT_OFF_T now obsoleted, will be removed in a future release, symbol will not be available when building with CURL_NO_OLDIES defined. Use of CURL_FORMAT_CURL_OFF_T is preferred since 7.19.0 --- include/curl/curlrules.h | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'include') diff --git a/include/curl/curlrules.h b/include/curl/curlrules.h index 9705e2ba9..8e7096642 100644 --- a/include/curl/curlrules.h +++ b/include/curl/curlrules.h @@ -7,7 +7,7 @@ * | (__| |_| | _ <| |___ * \___|\___/|_| \_\_____| * - * Copyright (C) 1998 - 2009, Daniel Stenberg, , et al. + * Copyright (C) 1998 - 2010, 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 @@ -246,4 +246,8 @@ typedef char #undef CURL_TYPEOF_CURL_SOCKLEN_T #undef CURL_TYPEOF_CURL_OFF_T +#ifdef CURL_NO_OLDIES +#undef CURL_FORMAT_OFF_T /* not required since 7.19.0 - obsoleted in 7.20.0 */ +#endif + #endif /* __CURL_CURLRULES_H */ -- cgit v1.2.1 From 77066c6e47254453622112b6981e3bb7f2ad54d2 Mon Sep 17 00:00:00 2001 From: Daniel Stenberg Date: Tue, 9 Feb 2010 11:37:10 +0000 Subject: start working on 7.20.1 --- include/curl/curlver.h | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'include') diff --git a/include/curl/curlver.h b/include/curl/curlver.h index ef0c5279f..fc7a8711d 100644 --- a/include/curl/curlver.h +++ b/include/curl/curlver.h @@ -7,7 +7,7 @@ * | (__| |_| | _ <| |___ * \___|\___/|_| \_\_____| * - * Copyright (C) 1998 - 2009, Daniel Stenberg, , et al. + * Copyright (C) 1998 - 2010, 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 @@ -27,17 +27,17 @@ 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 - 2009 Daniel Stenberg, ." +#define LIBCURL_COPYRIGHT "1996 - 2010 Daniel Stenberg, ." /* This is the version number of the libcurl package from which this header file origins: */ -#define LIBCURL_VERSION "7.20.0-CVS" +#define LIBCURL_VERSION "7.20.1-CVS" /* The numeric version number is also available "in parts" by using these defines: */ #define LIBCURL_VERSION_MAJOR 7 #define LIBCURL_VERSION_MINOR 20 -#define LIBCURL_VERSION_PATCH 0 +#define LIBCURL_VERSION_PATCH 1 /* This is the numeric version of the libcurl version number, meant for easier parsing and comparions by programs. The LIBCURL_VERSION_NUM define will @@ -54,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 0x071400 +#define LIBCURL_VERSION_NUM 0x071401 /* * This is the date and time when the full source package was created. The -- cgit v1.2.1 From 99f366adf92e940ea8178da35c4189f5206bd716 Mon Sep 17 00:00:00 2001 From: Dan Fandrich Date: Wed, 10 Feb 2010 21:17:53 +0000 Subject: Mention the minimum size of CURL_MAX_WRITE_SIZE --- include/curl/curl.h | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'include') diff --git a/include/curl/curl.h b/include/curl/curl.h index 3f5c49a27..155913af4 100644 --- a/include/curl/curl.h +++ b/include/curl/curl.h @@ -177,7 +177,9 @@ typedef int (*curl_progress_callback)(void *clientp, /* Tests have proven that 20K is a very bad buffer size for uploads on Windows, while 16K for some odd reason performed a lot better. We do the ifndef check to allow this value to easier be changed at build - time for those who feel adventurous. */ + time for those who feel adventurous. The practical minimum is about + 400 bytes since libcurl uses a buffer of this size as a scratch area + (unrelated to network send operations). */ #define CURL_MAX_WRITE_SIZE 16384 #endif -- cgit v1.2.1 From c703d01a23762127dd34aea48d0898070b6508b8 Mon Sep 17 00:00:00 2001 From: Daniel Stenberg Date: Sat, 13 Feb 2010 17:51:30 +0000 Subject: - Tom Donovan fixed the CURL_FORMAT_* defines when building with cmake. --- include/curl/curlbuild.h.cmake | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'include') diff --git a/include/curl/curlbuild.h.cmake b/include/curl/curlbuild.h.cmake index afa1316c0..72435f0d9 100644 --- a/include/curl/curlbuild.h.cmake +++ b/include/curl/curlbuild.h.cmake @@ -157,13 +157,13 @@ typedef CURL_TYPEOF_CURL_SOCKLEN_T curl_socklen_t; typedef CURL_TYPEOF_CURL_OFF_T curl_off_t; /* curl_off_t formatting string directive without "%" conversion specifier. */ -#cmakedefine CURL_FORMAT_CURL_OFF_T ${CURL_FORMAT_CURL_OFF_T} +#cmakedefine CURL_FORMAT_CURL_OFF_T "${CURL_FORMAT_CURL_OFF_T}" /* unsigned curl_off_t formatting string without "%" conversion specifier. */ -#cmakedefine CURL_FORMAT_CURL_OFF_TU ${CURL_FORMAT_CURL_OFF_TU} +#cmakedefine CURL_FORMAT_CURL_OFF_TU "${CURL_FORMAT_CURL_OFF_TU}" /* curl_off_t formatting string directive with "%" conversion specifier. */ -#cmakedefine CURL_FORMAT_OFF_T ${CURL_FORMAT_OFF_T} +#cmakedefine CURL_FORMAT_OFF_T "${CURL_FORMAT_OFF_T}" /* The size of `curl_off_t', as computed by sizeof. */ #cmakedefine CURL_SIZEOF_CURL_OFF_T ${CURL_SIZEOF_CURL_OFF_T} -- cgit v1.2.1 From a07bc79117971b96ebf3188c0a34a73ee0a3609b Mon Sep 17 00:00:00 2001 From: Yang Tse Date: Sun, 14 Feb 2010 19:40:18 +0000 Subject: removed trailing whitespace --- include/README | 8 ++++---- include/curl/curlrules.h | 2 +- include/curl/stdcheaders.h | 14 +++++++------- 3 files changed, 12 insertions(+), 12 deletions(-) (limited to 'include') diff --git a/include/README b/include/README index a75249f0a..f4cc18b44 100644 --- a/include/README +++ b/include/README @@ -1,7 +1,7 @@ - _ _ ____ _ - ___| | | | _ \| | - / __| | | | |_) | | - | (__| |_| | _ <| |___ + _ _ ____ _ + ___| | | | _ \| | + / __| | | | |_) | | + | (__| |_| | _ <| |___ \___|\___/|_| \_\_____| Include files for libcurl, external users. diff --git a/include/curl/curlrules.h b/include/curl/curlrules.h index 8e7096642..8aa6c5252 100644 --- a/include/curl/curlrules.h +++ b/include/curl/curlrules.h @@ -187,7 +187,7 @@ typedef char /* EXTERNALLY AND INTERNALLY VISIBLE DEFINITIONS */ /* ================================================================ */ -/* +/* * CURL_ISOCPP and CURL_OFF_T_C definitions are done here in order to allow * these to be visible and exported by the external libcurl interface API, * while also making them visible to the library internals, simply including diff --git a/include/curl/stdcheaders.h b/include/curl/stdcheaders.h index 0a1bcdad1..1ea70443f 100644 --- a/include/curl/stdcheaders.h +++ b/include/curl/stdcheaders.h @@ -1,18 +1,18 @@ #ifndef __STDC_HEADERS_H #define __STDC_HEADERS_H /*************************************************************************** - * _ _ ____ _ - * Project ___| | | | _ \| | - * / __| | | | |_) | | - * | (__| |_| | _ <| |___ + * _ _ ____ _ + * Project ___| | | | _ \| | + * / __| | | | |_) | | + * | (__| |_| | _ <| |___ * \___|\___/|_| \_\_____| * - * Copyright (C) 1998 - 2009, Daniel Stenberg, , et al. + * Copyright (C) 1998 - 2010, 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 * are also available at http://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 * furnished to do so, under the terms of the COPYING file. @@ -31,4 +31,4 @@ size_t fwrite (const void *, size_t, size_t, FILE *); int strcasecmp(const char *, const char *); int strncasecmp(const char *, const char *, size_t); -#endif +#endif /* __STDC_HEADERS_H */ -- cgit v1.2.1 From b40acd8009cf92c0efbf850cb23e579210f07602 Mon Sep 17 00:00:00 2001 From: Daniel Stenberg Date: Sat, 20 Mar 2010 23:35:45 +0100 Subject: provide an initial set of .gitignore files --- include/curl/.gitignore | 3 +++ 1 file changed, 3 insertions(+) create mode 100644 include/curl/.gitignore (limited to 'include') diff --git a/include/curl/.gitignore b/include/curl/.gitignore new file mode 100644 index 000000000..9958c2224 --- /dev/null +++ b/include/curl/.gitignore @@ -0,0 +1,3 @@ +curlbuild.h +stamp-h3 + -- cgit v1.2.1 From e1d6034977093908ba63c4cdf8d0d65703c81700 Mon Sep 17 00:00:00 2001 From: Daniel Stenberg Date: Mon, 22 Mar 2010 00:26:29 +0100 Subject: remove references to CVS in the code and use DEV instead --- include/curl/curlver.h | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'include') diff --git a/include/curl/curlver.h b/include/curl/curlver.h index fc7a8711d..d65114afe 100644 --- a/include/curl/curlver.h +++ b/include/curl/curlver.h @@ -31,7 +31,7 @@ /* This is the version number of the libcurl package from which this header file origins: */ -#define LIBCURL_VERSION "7.20.1-CVS" +#define LIBCURL_VERSION "7.20.1-DEV" /* The numeric version number is also available "in parts" by using these defines: */ @@ -58,13 +58,13 @@ /* * This is the date and time when the full source package was created. The - * timestamp is not stored in CVS, as the timestamp is properly set in the + * timestamp is not stored in git, as the timestamp is properly set in the * tarballs by the maketgz script. * * The format of the date should follow this template: * * "Mon Feb 12 11:35:33 UTC 2007" */ -#define LIBCURL_TIMESTAMP "CVS" +#define LIBCURL_TIMESTAMP "DEV" #endif /* __CURL_CURLVER_H */ -- cgit v1.2.1 From 123c6d5c82c34c3ac48fb051dd8d9ce8fe4ad51b Mon Sep 17 00:00:00 2001 From: Daniel Stenberg Date: Wed, 24 Mar 2010 10:45:47 +0100 Subject: s/CVS/git --- include/README | 2 +- include/curl/Makefile.am | 2 +- include/curl/curlbuild.h.dist | 6 +++--- 3 files changed, 5 insertions(+), 5 deletions(-) (limited to 'include') diff --git a/include/README b/include/README index f4cc18b44..205f9f7dd 100644 --- a/include/README +++ b/include/README @@ -24,7 +24,7 @@ The following notes apply to libcurl version 7.19.0 and later. * The distributed curlbuild.h file is generated as a copy of curlbuild.h.dist when the libcurl source code distribution archive file is originally created. -* If you check out from CVS on a non-configure platform, you must run the +* If you check out from git on a non-configure platform, you must run the appropriate buildconf* script to set up curlbuild.h and other local files before being able of compiling the library. diff --git a/include/curl/Makefile.am b/include/curl/Makefile.am index bee5c25af..a3b444386 100644 --- a/include/curl/Makefile.am +++ b/include/curl/Makefile.am @@ -4,7 +4,7 @@ pkginclude_HEADERS = \ pkgincludedir= $(includedir)/curl -# curlbuild.h does not exist in the CVS tree. When the original libcurl +# curlbuild.h does not exist in the git tree. When the original libcurl # source code distribution archive file is created, curlbuild.h.dist is # renamed to curlbuild.h and included in the tarball so that it can be # used directly on non-configure systems. diff --git a/include/curl/curlbuild.h.dist b/include/curl/curlbuild.h.dist index 0ee7135c5..da9506923 100644 --- a/include/curl/curlbuild.h.dist +++ b/include/curl/curlbuild.h.dist @@ -7,7 +7,7 @@ * | (__| |_| | _ <| |___ * \___|\___/|_| \_\_____| * - * Copyright (C) 1998 - 2009, Daniel Stenberg, , et al. + * Copyright (C) 1998 - 2010, 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 @@ -90,7 +90,7 @@ * when the libcurl source code distribution archive file is created. * * File include/curl/curlbuild.h.dist is not included in the distribution - * archive. File include/curl/curlbuild.h is not present in the CVS tree. + * archive. File include/curl/curlbuild.h is not present in the git tree. * * The distributed include/curl/curlbuild.h file is only intended to be used * on systems which can not run the also distributed configure script. @@ -100,7 +100,7 @@ * is suitable and specific to the library being configured and built, which * is generated from the include/curl/curlbuild.h.in template file. * - * If you check out from CVS on a non-configure platform, you must run the + * If you check out from git on a non-configure platform, you must run the * appropriate buildconf* script to set up curlbuild.h and other local files. * */ -- cgit v1.2.1 From 2309b4e330b96bc2e1f8e36b6184015e59544037 Mon Sep 17 00:00:00 2001 From: Daniel Stenberg Date: Wed, 24 Mar 2010 11:02:54 +0100 Subject: remove the CVSish $Id$ lines --- include/curl/curl.h | 1 - include/curl/curlbuild.h.cmake | 1 - include/curl/curlbuild.h.dist | 1 - include/curl/curlbuild.h.in | 1 - include/curl/curlrules.h | 1 - include/curl/curlver.h | 1 - include/curl/easy.h | 1 - include/curl/mprintf.h | 1 - include/curl/multi.h | 1 - include/curl/stdcheaders.h | 1 - include/curl/typecheck-gcc.h | 1 - 11 files changed, 11 deletions(-) (limited to 'include') diff --git a/include/curl/curl.h b/include/curl/curl.h index 155913af4..e63596828 100644 --- a/include/curl/curl.h +++ b/include/curl/curl.h @@ -20,7 +20,6 @@ * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY * KIND, either express or implied. * - * $Id$ ***************************************************************************/ /* diff --git a/include/curl/curlbuild.h.cmake b/include/curl/curlbuild.h.cmake index 72435f0d9..4f83e3fe1 100644 --- a/include/curl/curlbuild.h.cmake +++ b/include/curl/curlbuild.h.cmake @@ -20,7 +20,6 @@ * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY * KIND, either express or implied. * - * $Id$ ***************************************************************************/ /* ================================================================ */ diff --git a/include/curl/curlbuild.h.dist b/include/curl/curlbuild.h.dist index da9506923..d0b32acbe 100644 --- a/include/curl/curlbuild.h.dist +++ b/include/curl/curlbuild.h.dist @@ -20,7 +20,6 @@ * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY * KIND, either express or implied. * - * $Id$ ***************************************************************************/ /* ================================================================ */ diff --git a/include/curl/curlbuild.h.in b/include/curl/curlbuild.h.in index 48c7cf1f3..cb1de80a0 100644 --- a/include/curl/curlbuild.h.in +++ b/include/curl/curlbuild.h.in @@ -20,7 +20,6 @@ * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY * KIND, either express or implied. * - * $Id$ ***************************************************************************/ /* ================================================================ */ diff --git a/include/curl/curlrules.h b/include/curl/curlrules.h index 8aa6c5252..8aad1df67 100644 --- a/include/curl/curlrules.h +++ b/include/curl/curlrules.h @@ -20,7 +20,6 @@ * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY * KIND, either express or implied. * - * $Id$ ***************************************************************************/ /* ================================================================ */ diff --git a/include/curl/curlver.h b/include/curl/curlver.h index d65114afe..98d904370 100644 --- a/include/curl/curlver.h +++ b/include/curl/curlver.h @@ -20,7 +20,6 @@ * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY * KIND, either express or implied. * - * $Id$ ***************************************************************************/ /* This header file contains nothing but libcurl version info, generated by diff --git a/include/curl/easy.h b/include/curl/easy.h index 88aa0e655..1ddb4fe5a 100644 --- a/include/curl/easy.h +++ b/include/curl/easy.h @@ -20,7 +20,6 @@ * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY * KIND, either express or implied. * - * $Id$ ***************************************************************************/ #ifdef __cplusplus extern "C" { diff --git a/include/curl/mprintf.h b/include/curl/mprintf.h index d6d7f4455..de7dd2f3c 100644 --- a/include/curl/mprintf.h +++ b/include/curl/mprintf.h @@ -20,7 +20,6 @@ * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY * KIND, either express or implied. * - * $Id$ ***************************************************************************/ #include diff --git a/include/curl/multi.h b/include/curl/multi.h index 92621aa99..f96566669 100644 --- a/include/curl/multi.h +++ b/include/curl/multi.h @@ -20,7 +20,6 @@ * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY * KIND, either express or implied. * - * $Id$ ***************************************************************************/ /* This is an "external" header file. Don't give away any internals here! diff --git a/include/curl/stdcheaders.h b/include/curl/stdcheaders.h index 1ea70443f..ad82ef633 100644 --- a/include/curl/stdcheaders.h +++ b/include/curl/stdcheaders.h @@ -20,7 +20,6 @@ * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY * KIND, either express or implied. * - * $Id$ ***************************************************************************/ #include diff --git a/include/curl/typecheck-gcc.h b/include/curl/typecheck-gcc.h index 39fad7acb..c4fad516d 100644 --- a/include/curl/typecheck-gcc.h +++ b/include/curl/typecheck-gcc.h @@ -20,7 +20,6 @@ * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY * KIND, either express or implied. * - * $Id$ ***************************************************************************/ /* wraps curl_easy_setopt() with typechecking */ -- cgit v1.2.1 From 5709a0dca248e9e7237c1849072454c1dcb6a890 Mon Sep 17 00:00:00 2001 From: Bill Hoffman Date: Wed, 24 Mar 2010 14:07:18 -0400 Subject: CMake fixes for Linux. Make sure is included if around when testing/using socklen_t. Also, disable LDAP if LDAP_H is not found on the system. --- include/curl/curlbuild.h.cmake | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'include') diff --git a/include/curl/curlbuild.h.cmake b/include/curl/curlbuild.h.cmake index 4f83e3fe1..3aa772fc4 100644 --- a/include/curl/curlbuild.h.cmake +++ b/include/curl/curlbuild.h.cmake @@ -143,6 +143,10 @@ # include #endif +#ifdef HAVE_SYS_SOCKET_H +# include +#endif + /* Data type definition of curl_socklen_t. */ typedef CURL_TYPEOF_CURL_SOCKLEN_T curl_socklen_t; -- cgit v1.2.1 From 05de2cf18094ddfb461b70bd5e6af4b6098c408c Mon Sep 17 00:00:00 2001 From: Daniel Stenberg Date: Thu, 25 Mar 2010 23:22:03 +0100 Subject: remove all .cvsignore files --- include/.cvsignore | 2 -- include/curl/.cvsignore | 5 ----- 2 files changed, 7 deletions(-) delete mode 100644 include/.cvsignore delete mode 100644 include/curl/.cvsignore (limited to 'include') diff --git a/include/.cvsignore b/include/.cvsignore deleted file mode 100644 index 282522db0..000000000 --- a/include/.cvsignore +++ /dev/null @@ -1,2 +0,0 @@ -Makefile -Makefile.in diff --git a/include/curl/.cvsignore b/include/curl/.cvsignore deleted file mode 100644 index d3a3a090f..000000000 --- a/include/curl/.cvsignore +++ /dev/null @@ -1,5 +0,0 @@ -Makefile -Makefile.in -curlbuild.h -curlver.h.dist -stamp-* -- cgit v1.2.1 From 5a814f6f2ce8a9718823c2365c45b25cc756456b Mon Sep 17 00:00:00 2001 From: Daniel Stenberg Date: Wed, 14 Apr 2010 17:12:34 +0200 Subject: ignore files generated by 'maketgz' --- include/curl/.gitignore | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'include') diff --git a/include/curl/.gitignore b/include/curl/.gitignore index 9958c2224..bfd4bca20 100644 --- a/include/curl/.gitignore +++ b/include/curl/.gitignore @@ -1,3 +1,3 @@ curlbuild.h stamp-h3 - +curlver.h.dist -- cgit v1.2.1 From 72411118ec7d13cf84573183f545e991cd6307a6 Mon Sep 17 00:00:00 2001 From: Daniel Stenberg Date: Wed, 14 Apr 2010 17:34:26 +0200 Subject: bumped to start the journey towards 7.20.2 --- include/curl/curlver.h | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'include') diff --git a/include/curl/curlver.h b/include/curl/curlver.h index 98d904370..c7dc18e6c 100644 --- a/include/curl/curlver.h +++ b/include/curl/curlver.h @@ -30,13 +30,13 @@ /* This is the version number of the libcurl package from which this header file origins: */ -#define LIBCURL_VERSION "7.20.1-DEV" +#define LIBCURL_VERSION "7.20.2-DEV" /* The numeric version number is also available "in parts" by using these defines: */ #define LIBCURL_VERSION_MAJOR 7 #define LIBCURL_VERSION_MINOR 20 -#define LIBCURL_VERSION_PATCH 1 +#define LIBCURL_VERSION_PATCH 2 /* This is the numeric version of the libcurl version number, meant for easier parsing and comparions by programs. The LIBCURL_VERSION_NUM define will @@ -53,7 +53,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 0x071401 +#define LIBCURL_VERSION_NUM 0x071402 /* * This is the date and time when the full source package was created. The -- cgit v1.2.1 From 04cb15ae9dc0e863487ee55de2226cf5033311c0 Mon Sep 17 00:00:00 2001 From: Howard Chu Date: Wed, 12 May 2010 23:07:20 +0200 Subject: RTMP: initial support added, powered by librtmp librtmp is found at http://rtmpdump.mplayerhq.hu/ --- include/curl/curl.h | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'include') diff --git a/include/curl/curl.h b/include/curl/curl.h index e63596828..802136690 100644 --- a/include/curl/curl.h +++ b/include/curl/curl.h @@ -623,6 +623,12 @@ typedef enum { #define CURLPROTO_SMTP (1<<16) #define CURLPROTO_SMTPS (1<<17) #define CURLPROTO_RTSP (1<<18) +#define CURLPROTO_RTMP (1<<19) +#define CURLPROTO_RTMPT (1<<20) +#define CURLPROTO_RTMPE (1<<21) +#define CURLPROTO_RTMPTE (1<<22) +#define CURLPROTO_RTMPS (1<<23) +#define CURLPROTO_RTMPTS (1<<24) #define CURLPROTO_ALL (~0) /* enable everything */ /* long may be 32 or 64 bits, but we should never depend on anything else -- cgit v1.2.1 From 0825cd80a62c21725fb3615f1fdd3aa6cc5f0f34 Mon Sep 17 00:00:00 2001 From: Pavel Raiskup Date: Wed, 12 May 2010 15:33:22 +0200 Subject: FTP: WILDCARDMATCH/CHUNKING/FNMATCH added --- include/curl/curl.h | 109 ++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 109 insertions(+) (limited to 'include') diff --git a/include/curl/curl.h b/include/curl/curl.h index 802136690..d59e01de6 100644 --- a/include/curl/curl.h +++ b/include/curl/curl.h @@ -198,6 +198,96 @@ typedef size_t (*curl_write_callback)(char *buffer, size_t nitems, void *outstream); + + +/* enumeration of file types */ +typedef enum { + CURLFILETYPE_FILE = 0, + CURLFILETYPE_DIRECTORY, + CURLFILETYPE_SYMLINK, + CURLFILETYPE_DEVICE_BLOCK, + CURLFILETYPE_DEVICE_CHAR, + CURLFILETYPE_NAMEDPIPE, + CURLFILETYPE_SOCKET, + CURLFILETYPE_DOOR, /* is possible only on Sun Solaris now */ + + CURLFILETYPE_UNKNOWN /* should never occur */ +} curlfiletype; + +#define CURLFINFOFLAG_KNOWN_FILENAME (1<<0) +#define CURLFINFOFLAG_KNOWN_FILETYPE (1<<1) +#define CURLFINFOFLAG_KNOWN_TIME (1<<2) +#define CURLFINFOFLAG_KNOWN_PERM (1<<3) +#define CURLFINFOFLAG_KNOWN_UID (1<<4) +#define CURLFINFOFLAG_KNOWN_GID (1<<5) +#define CURLFINFOFLAG_KNOWN_SIZE (1<<6) +#define CURLFINFOFLAG_KNOWN_HLINKCOUNT (1<<7) + +/* Content of this structure depends on information which is known and is + achievable (e.g. by FTP LIST parsing). Please see the url_easy_setopt(3) man + page for callbacks returning this structure -- some fields are mandatory, + some others are optional. The FLAG field has special meaning. */ +struct curl_fileinfo { + char *filename; + curlfiletype filetype; + time_t time; + int32_t perm; + int uid; + int gid; + curl_off_t size; + long int hardlinks; + + struct { + /* If some of these fields is not NULL, it is a pointer to b_data. */ + char *time; + char *perm; + char *user; + char *group; + char *target; /* pointer to the target filename of a symlink */ + } strings; + + int32_t flags; + + /* used internally */ + char * b_data; + size_t b_size; + size_t b_used; +}; + +/* return codes for CURLOPT_CHUNK_BGN_FUNCTION */ +#define CURL_CHUNK_BGN_FUNC_OK 0 +#define CURL_CHUNK_BGN_FUNC_FAIL 1 /* tell the lib to end the task */ +#define CURL_CHUNK_BGN_FUNC_SKIP 2 /* skip this chunk over */ + +/* if splitting of data transfer is enabled, this callback is called before + download of an individual chunk started. Note that parameter "remains" works + only for FTP wildcard downloading (for now), otherwise is not used */ +typedef long (*curl_chunk_bgn_callback)(const void *transfer_info, + void *ptr, + int remains); + +/* return codes for CURLOPT_CHUNK_END_FUNCTION */ +#define CURL_CHUNK_END_FUNC_OK 0 +#define CURL_CHUNK_END_FUNC_FAIL 1 /* tell the lib to end the task */ + +/* If splitting of data transfer is enabled this callback is called after + download of an individual chunk finished. + Note! After this callback was set then it have to be called FOR ALL chunks. + Even if downloading of this chunk was skipped in CHUNK_BGN_FUNC. + This is the reason why we don't need "transfer_info" parameter in this + callback and we are not interested in "remains" parameter too. */ +typedef long (*curl_chunk_end_callback)(void *ptr); + +/* return codes for FNMATCHFUNCTION */ +#define CURL_FNMATCHFUNC_MATCH 0 /* string corresponds to the pattern */ +#define CURL_FNMATCHFUNC_NOMATCH 1 /* pattern doesn't match the string */ +#define CURL_FNMATCHFUNC_FAIL 2 /* an error occurred */ + +/* callback type for wildcard downloading pattern matching. If the + string matches the pattern, return CURL_FNMATCHFUNC_MATCH value, etc. */ +typedef int (*curl_fnmatch_callback)(const char *pattern, + const char *string); + /* These are the return codes for the seek callbacks */ #define CURL_SEEKFUNC_OK 0 #define CURL_SEEKFUNC_FAIL 1 /* fail the entire transfer */ @@ -409,6 +499,8 @@ typedef enum { CURLE_FTP_PRET_FAILED, /* 84 - a PRET command failed */ CURLE_RTSP_CSEQ_ERROR, /* 85 - mismatch of RTSP CSeq numbers */ CURLE_RTSP_SESSION_ERROR, /* 86 - mismatch of RTSP Session Identifiers */ + CURLE_FTP_BAD_FILE_LIST, /* 87 - unable to parse FTP file list */ + CURLE_CHUNK_FAILED, /* 88 - chunk callback reported error */ CURL_LAST /* never use! */ } CURLcode; @@ -1322,6 +1414,23 @@ typedef enum { /* Let the application define a custom write method for RTP data */ CINIT(INTERLEAVEFUNCTION, FUNCTIONPOINT, 196), + /* Turn on wildcard matching */ + CINIT(WILDCARDMATCH, LONG, 197), + + /* Directory matching callback called before downloading of an + individual file (chunk) started */ + CINIT(CHUNK_BGN_FUNCTION, FUNCTIONPOINT, 198), + + /* Directory matching callback called after the file (chunk) + was downloaded, or skipped */ + CINIT(CHUNK_END_FUNCTION, FUNCTIONPOINT, 199), + + /* Change match (fnmatch-like) callback for wildcard matching */ + CINIT(FNMATCH_FUNCTION, FUNCTIONPOINT, 200), + + /* Let the application define custom chunk data pointer */ + CINIT(CHUNK_DATA, OBJECTPOINT, 201), + CURLOPT_LASTENTRY /* the last unused */ } CURLoption; -- cgit v1.2.1 From d6706294e0bac0a0209e6bd61032848aae3d2d63 Mon Sep 17 00:00:00 2001 From: Daniel Stenberg Date: Fri, 14 May 2010 20:55:54 +0200 Subject: version: we're now going for 7.21.0 --- include/curl/curlver.h | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'include') diff --git a/include/curl/curlver.h b/include/curl/curlver.h index c7dc18e6c..eca0c311b 100644 --- a/include/curl/curlver.h +++ b/include/curl/curlver.h @@ -30,13 +30,13 @@ /* This is the version number of the libcurl package from which this header file origins: */ -#define LIBCURL_VERSION "7.20.2-DEV" +#define LIBCURL_VERSION "7.21.0-DEV" /* The numeric version number is also available "in parts" by using these defines: */ #define LIBCURL_VERSION_MAJOR 7 -#define LIBCURL_VERSION_MINOR 20 -#define LIBCURL_VERSION_PATCH 2 +#define LIBCURL_VERSION_MINOR 21 +#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 @@ -53,7 +53,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 0x071402 +#define LIBCURL_VERSION_NUM 0x071500 /* * This is the date and time when the full source package was created. The -- cgit v1.2.1 From e4af5d6efcf9c8ddae087009df1782d890a0e13b Mon Sep 17 00:00:00 2001 From: Pavel Raiskup Date: Sat, 15 May 2010 21:58:50 +0200 Subject: ftp wildcard: fix int32_t and size/group mixups --- include/curl/curl.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'include') diff --git a/include/curl/curl.h b/include/curl/curl.h index d59e01de6..a2e26bad0 100644 --- a/include/curl/curl.h +++ b/include/curl/curl.h @@ -231,7 +231,7 @@ struct curl_fileinfo { char *filename; curlfiletype filetype; time_t time; - int32_t perm; + unsigned int perm; int uid; int gid; curl_off_t size; @@ -246,7 +246,7 @@ struct curl_fileinfo { char *target; /* pointer to the target filename of a symlink */ } strings; - int32_t flags; + unsigned int flags; /* used internally */ char * b_data; -- cgit v1.2.1 From 2ffe834bffa893efcd8942736ab14e311a0087b3 Mon Sep 17 00:00:00 2001 From: Kamil Dudka Date: Sun, 16 May 2010 02:49:08 +0200 Subject: ftp wildcard: a new option CURLOPT_FNMATCH_DATA --- include/curl/curl.h | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'include') diff --git a/include/curl/curl.h b/include/curl/curl.h index a2e26bad0..83ba078cb 100644 --- a/include/curl/curl.h +++ b/include/curl/curl.h @@ -285,7 +285,8 @@ typedef long (*curl_chunk_end_callback)(void *ptr); /* callback type for wildcard downloading pattern matching. If the string matches the pattern, return CURL_FNMATCHFUNC_MATCH value, etc. */ -typedef int (*curl_fnmatch_callback)(const char *pattern, +typedef int (*curl_fnmatch_callback)(void *ptr, + const char *pattern, const char *string); /* These are the return codes for the seek callbacks */ @@ -1431,6 +1432,9 @@ typedef enum { /* Let the application define custom chunk data pointer */ CINIT(CHUNK_DATA, OBJECTPOINT, 201), + /* FNMATCH_FUNCTION user pointer */ + CINIT(FNMATCH_DATA, OBJECTPOINT, 202), + CURLOPT_LASTENTRY /* the last unused */ } CURLoption; -- cgit v1.2.1 From 8098d9417c649272b9d6d2ad76abbde7dfbfcad1 Mon Sep 17 00:00:00 2001 From: Frank Meier Date: Sat, 5 Jun 2010 00:29:09 +0200 Subject: getinfo: added *_PRIMARY_PORT, *_LOCAL_IP and *_LOCAL_PORT --- include/curl/curl.h | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'include') diff --git a/include/curl/curl.h b/include/curl/curl.h index 83ba078cb..b19828f58 100644 --- a/include/curl/curl.h +++ b/include/curl/curl.h @@ -1883,9 +1883,12 @@ typedef enum { CURLINFO_RTSP_CLIENT_CSEQ = CURLINFO_LONG + 37, CURLINFO_RTSP_SERVER_CSEQ = CURLINFO_LONG + 38, CURLINFO_RTSP_CSEQ_RECV = CURLINFO_LONG + 39, + CURLINFO_PRIMARY_PORT = CURLINFO_LONG + 40, + CURLINFO_LOCAL_IP = CURLINFO_STRING + 41, + CURLINFO_LOCAL_PORT = CURLINFO_LONG + 42, /* Fill in new entries below here! */ - CURLINFO_LASTONE = 39 + CURLINFO_LASTONE = 42 } CURLINFO; /* CURLINFO_RESPONSE_CODE is the new name for the option previously known as -- cgit v1.2.1 From a09814138a32bcbda9b2472963e28b263df308d9 Mon Sep 17 00:00:00 2001 From: Daniel Stenberg Date: Wed, 16 Jun 2010 14:26:43 +0200 Subject: version: start working on the 7.21.1-dev version --- include/curl/curlver.h | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'include') diff --git a/include/curl/curlver.h b/include/curl/curlver.h index eca0c311b..681ed5772 100644 --- a/include/curl/curlver.h +++ b/include/curl/curlver.h @@ -30,13 +30,13 @@ /* This is the version number of the libcurl package from which this header file origins: */ -#define LIBCURL_VERSION "7.21.0-DEV" +#define LIBCURL_VERSION "7.21.1-DEV" /* The numeric version number is also available "in parts" by using these defines: */ #define LIBCURL_VERSION_MAJOR 7 #define LIBCURL_VERSION_MINOR 21 -#define LIBCURL_VERSION_PATCH 0 +#define LIBCURL_VERSION_PATCH 1 /* This is the numeric version of the libcurl version number, meant for easier parsing and comparions by programs. The LIBCURL_VERSION_NUM define will @@ -53,7 +53,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 0x071500 +#define LIBCURL_VERSION_NUM 0x071501 /* * This is the date and time when the full source package was created. The -- cgit v1.2.1 From 000ac0c975b3ff03beeffe406f5ce93e79894446 Mon Sep 17 00:00:00 2001 From: Daniel Stenberg Date: Mon, 2 Aug 2010 23:48:21 +0200 Subject: typecheck-gcc: add checks for recently added options I added all OBJECTPOINT curl_easy_setopt() options from 178 to 202. Left to add: the five FUNCTIONPOINT (callbacks) options added since: SSH_KEYFUNCTION INTERLEAVEFUNCTION CHUNK_BGN_FUNCTION CHUNK_END_FUNCTION FNMATCH_FUNCTION --- include/curl/typecheck-gcc.h | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) (limited to 'include') diff --git a/include/curl/typecheck-gcc.h b/include/curl/typecheck-gcc.h index c4fad516d..62883f567 100644 --- a/include/curl/typecheck-gcc.h +++ b/include/curl/typecheck-gcc.h @@ -7,7 +7,7 @@ * | (__| |_| | _ <| |___ * \___|\___/|_| \_\_____| * - * Copyright (C) 1998 - 2009, Daniel Stenberg, , et al. + * Copyright (C) 1998 - 2010, 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 @@ -230,6 +230,12 @@ _CURL_WARNING(_curl_easy_getinfo_err_curl_slist, (option) == CURLOPT_SSH_PRIVATE_KEYFILE || \ (option) == CURLOPT_CRLFILE || \ (option) == CURLOPT_ISSUERCERT || \ + (option) == CURLOPT_SOCKS5_GSSAPI_SERVICE || \ + (option) == CURLOPT_SSH_KNOWNHOSTS || \ + (option) == CURLOPT_MAIL_FROM || \ + (option) == CURLOPT_RTSP_SESSION_ID || \ + (option) == CURLOPT_RTSP_STREAM_URI || \ + (option) == CURLOPT_RTSP_TRANSPORT || \ 0) /* evaluates to true if option takes a curl_write_callback argument */ @@ -256,6 +262,10 @@ _CURL_WARNING(_curl_easy_getinfo_err_curl_slist, (option) == CURLOPT_SSL_CTX_DATA || \ (option) == CURLOPT_SEEKDATA || \ (option) == CURLOPT_PRIVATE || \ + (option) == CURLOPT_SSH_KEYDATA || \ + (option) == CURLOPT_INTERLEAVEDATA || \ + (option) == CURLOPT_CHUNK_DATA || \ + (option) == CURLOPT_FNMATCH_DATA || \ 0) /* evaluates to true if option takes a POST data argument (void* or char*) */ @@ -272,6 +282,7 @@ _CURL_WARNING(_curl_easy_getinfo_err_curl_slist, (option) == CURLOPT_POSTQUOTE || \ (option) == CURLOPT_PREQUOTE || \ (option) == CURLOPT_TELNETOPTIONS || \ + (option) == CURLOPT_MAIL_RCPT || \ 0) /* groups of curl_easy_getinfo infos that take the same type of argument */ -- cgit v1.2.1 From 4342a2087af15306fdb23cb8c6d7ce64c1e899de Mon Sep 17 00:00:00 2001 From: Daniel Stenberg Date: Wed, 11 Aug 2010 23:57:44 +0200 Subject: release cycle loop: start over toward 7.21.2 --- include/curl/curlver.h | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'include') diff --git a/include/curl/curlver.h b/include/curl/curlver.h index 681ed5772..1b1286ba8 100644 --- a/include/curl/curlver.h +++ b/include/curl/curlver.h @@ -30,13 +30,13 @@ /* This is the version number of the libcurl package from which this header file origins: */ -#define LIBCURL_VERSION "7.21.1-DEV" +#define LIBCURL_VERSION "7.21.2-DEV" /* The numeric version number is also available "in parts" by using these defines: */ #define LIBCURL_VERSION_MAJOR 7 #define LIBCURL_VERSION_MINOR 21 -#define LIBCURL_VERSION_PATCH 1 +#define LIBCURL_VERSION_PATCH 2 /* This is the numeric version of the libcurl version number, meant for easier parsing and comparions by programs. The LIBCURL_VERSION_NUM define will @@ -53,7 +53,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 0x071501 +#define LIBCURL_VERSION_NUM 0x071502 /* * This is the date and time when the full source package was created. The -- cgit v1.2.1 From a6e088e85540d1be98f5fccffea4fca38fe47ccb Mon Sep 17 00:00:00 2001 From: Kamil Dudka Date: Thu, 12 Aug 2010 20:45:52 +0200 Subject: typecheck-gcc: work around gcc upstream bug #32061 original bug report at https://bugzilla.redhat.com/617757 --- include/curl/typecheck-gcc.h | 135 +++++++++++++++++++++++++------------------ 1 file changed, 79 insertions(+), 56 deletions(-) (limited to 'include') diff --git a/include/curl/typecheck-gcc.h b/include/curl/typecheck-gcc.h index 62883f567..e6f74a958 100644 --- a/include/curl/typecheck-gcc.h +++ b/include/curl/typecheck-gcc.h @@ -25,11 +25,16 @@ /* wraps curl_easy_setopt() with typechecking */ /* To add a new kind of warning, add an - * if(_curl_is_sometype_option(_curl_opt) && ! _curl_is_sometype(value)) - * _curl_easy_setopt_err_sometype(); + * if(_curl_is_sometype_option(_curl_opt)) + * if(!_curl_is_sometype(value)) + * _curl_easy_setopt_err_sometype(); * block and define _curl_is_sometype_option, _curl_is_sometype and * _curl_easy_setopt_err_sometype below * + * NOTE: We use two nested 'if' statements here instead of the && operator, in + * order to work around gcc bug #32061. It affects only gcc 4.3.x/4.4.x + * when compiling with -Wlogical-op. + * * To add an option that uses the same type as an existing option, you'll just * need to extend the appropriate _curl_*_option macro */ @@ -37,51 +42,66 @@ __extension__ ({ \ __typeof__ (option) _curl_opt = option; \ if (__builtin_constant_p(_curl_opt)) { \ - if (_curl_is_long_option(_curl_opt) && !_curl_is_long(value)) \ - _curl_easy_setopt_err_long(); \ - if (_curl_is_off_t_option(_curl_opt) && !_curl_is_off_t(value)) \ - _curl_easy_setopt_err_curl_off_t(); \ - if (_curl_is_string_option(_curl_opt) && !_curl_is_string(value)) \ - _curl_easy_setopt_err_string(); \ - if (_curl_is_write_cb_option(_curl_opt) && !_curl_is_write_cb(value)) \ - _curl_easy_setopt_err_write_callback(); \ - if ((_curl_opt) == CURLOPT_READFUNCTION && !_curl_is_read_cb(value)) \ - _curl_easy_setopt_err_read_cb(); \ - if ((_curl_opt) == CURLOPT_IOCTLFUNCTION && !_curl_is_ioctl_cb(value)) \ - _curl_easy_setopt_err_ioctl_cb(); \ - if ((_curl_opt) == CURLOPT_SOCKOPTFUNCTION && !_curl_is_sockopt_cb(value))\ - _curl_easy_setopt_err_sockopt_cb(); \ - if ((_curl_opt) == CURLOPT_OPENSOCKETFUNCTION && \ - !_curl_is_opensocket_cb(value)) \ - _curl_easy_setopt_err_opensocket_cb(); \ - if ((_curl_opt) == CURLOPT_PROGRESSFUNCTION && \ - !_curl_is_progress_cb(value)) \ - _curl_easy_setopt_err_progress_cb(); \ - if ((_curl_opt) == CURLOPT_DEBUGFUNCTION && !_curl_is_debug_cb(value)) \ - _curl_easy_setopt_err_debug_cb(); \ - if ((_curl_opt) == CURLOPT_SSL_CTX_FUNCTION && \ - !_curl_is_ssl_ctx_cb(value)) \ - _curl_easy_setopt_err_ssl_ctx_cb(); \ - if (_curl_is_conv_cb_option(_curl_opt) && !_curl_is_conv_cb(value)) \ - _curl_easy_setopt_err_conv_cb(); \ - if ((_curl_opt) == CURLOPT_SEEKFUNCTION && !_curl_is_seek_cb(value)) \ - _curl_easy_setopt_err_seek_cb(); \ - if (_curl_is_cb_data_option(_curl_opt) && !_curl_is_cb_data(value)) \ - _curl_easy_setopt_err_cb_data(); \ - if ((_curl_opt) == CURLOPT_ERRORBUFFER && !_curl_is_error_buffer(value)) \ - _curl_easy_setopt_err_error_buffer(); \ - if ((_curl_opt) == CURLOPT_STDERR && !_curl_is_FILE(value)) \ - _curl_easy_setopt_err_FILE(); \ - if (_curl_is_postfields_option(_curl_opt) && !_curl_is_postfields(value)) \ - _curl_easy_setopt_err_postfields(); \ - if ((_curl_opt) == CURLOPT_HTTPPOST && \ - !_curl_is_arr((value), struct curl_httppost)) \ - _curl_easy_setopt_err_curl_httpost(); \ - if (_curl_is_slist_option(_curl_opt) && \ - !_curl_is_arr((value), struct curl_slist)) \ - _curl_easy_setopt_err_curl_slist(); \ - if ((_curl_opt) == CURLOPT_SHARE && !_curl_is_ptr((value), CURLSH)) \ - _curl_easy_setopt_err_CURLSH(); \ + if (_curl_is_long_option(_curl_opt)) \ + if (!_curl_is_long(value)) \ + _curl_easy_setopt_err_long(); \ + if (_curl_is_off_t_option(_curl_opt)) \ + if (!_curl_is_off_t(value)) \ + _curl_easy_setopt_err_curl_off_t(); \ + if (_curl_is_string_option(_curl_opt)) \ + if (!_curl_is_string(value)) \ + _curl_easy_setopt_err_string(); \ + if (_curl_is_write_cb_option(_curl_opt)) \ + if (!_curl_is_write_cb(value)) \ + _curl_easy_setopt_err_write_callback(); \ + if ((_curl_opt) == CURLOPT_READFUNCTION) \ + if (!_curl_is_read_cb(value)) \ + _curl_easy_setopt_err_read_cb(); \ + if ((_curl_opt) == CURLOPT_IOCTLFUNCTION) \ + if (!_curl_is_ioctl_cb(value)) \ + _curl_easy_setopt_err_ioctl_cb(); \ + if ((_curl_opt) == CURLOPT_SOCKOPTFUNCTION) \ + if (!_curl_is_sockopt_cb(value)) \ + _curl_easy_setopt_err_sockopt_cb(); \ + if ((_curl_opt) == CURLOPT_OPENSOCKETFUNCTION) \ + if (!_curl_is_opensocket_cb(value)) \ + _curl_easy_setopt_err_opensocket_cb(); \ + if ((_curl_opt) == CURLOPT_PROGRESSFUNCTION) \ + if (!_curl_is_progress_cb(value)) \ + _curl_easy_setopt_err_progress_cb(); \ + if ((_curl_opt) == CURLOPT_DEBUGFUNCTION) \ + if (!_curl_is_debug_cb(value)) \ + _curl_easy_setopt_err_debug_cb(); \ + if ((_curl_opt) == CURLOPT_SSL_CTX_FUNCTION) \ + if (!_curl_is_ssl_ctx_cb(value)) \ + _curl_easy_setopt_err_ssl_ctx_cb(); \ + if (_curl_is_conv_cb_option(_curl_opt)) \ + if (!_curl_is_conv_cb(value)) \ + _curl_easy_setopt_err_conv_cb(); \ + if ((_curl_opt) == CURLOPT_SEEKFUNCTION) \ + if (!_curl_is_seek_cb(value)) \ + _curl_easy_setopt_err_seek_cb(); \ + if (_curl_is_cb_data_option(_curl_opt)) \ + if (!_curl_is_cb_data(value)) \ + _curl_easy_setopt_err_cb_data(); \ + if ((_curl_opt) == CURLOPT_ERRORBUFFER) \ + if (!_curl_is_error_buffer(value)) \ + _curl_easy_setopt_err_error_buffer(); \ + if ((_curl_opt) == CURLOPT_STDERR) \ + if (!_curl_is_FILE(value)) \ + _curl_easy_setopt_err_FILE(); \ + if (_curl_is_postfields_option(_curl_opt)) \ + if (!_curl_is_postfields(value)) \ + _curl_easy_setopt_err_postfields(); \ + if ((_curl_opt) == CURLOPT_HTTPPOST) \ + if (!_curl_is_arr((value), struct curl_httppost)) \ + _curl_easy_setopt_err_curl_httpost(); \ + if (_curl_is_slist_option(_curl_opt)) \ + if (!_curl_is_arr((value), struct curl_slist)) \ + _curl_easy_setopt_err_curl_slist(); \ + if ((_curl_opt) == CURLOPT_SHARE) \ + if (!_curl_is_ptr((value), CURLSH)) \ + _curl_easy_setopt_err_CURLSH(); \ } \ curl_easy_setopt(handle, _curl_opt, value); \ }) @@ -92,15 +112,18 @@ __extension__ ({ \ __extension__ ({ \ __typeof__ (info) _curl_info = info; \ if (__builtin_constant_p(_curl_info)) { \ - if (_curl_is_string_info(_curl_info) && !_curl_is_arr((arg), char *)) \ - _curl_easy_getinfo_err_string(); \ - if (_curl_is_long_info(_curl_info) && !_curl_is_arr((arg), long)) \ - _curl_easy_getinfo_err_long(); \ - if (_curl_is_double_info(_curl_info) && !_curl_is_arr((arg), double)) \ - _curl_easy_getinfo_err_double(); \ - if (_curl_is_slist_info(_curl_info) && \ - !_curl_is_arr((arg), struct curl_slist *)) \ - _curl_easy_getinfo_err_curl_slist(); \ + if (_curl_is_string_info(_curl_info)) \ + if (!_curl_is_arr((arg), char *)) \ + _curl_easy_getinfo_err_string(); \ + if (_curl_is_long_info(_curl_info)) \ + if (!_curl_is_arr((arg), long)) \ + _curl_easy_getinfo_err_long(); \ + if (_curl_is_double_info(_curl_info)) \ + if (!_curl_is_arr((arg), double)) \ + _curl_easy_getinfo_err_double(); \ + if (_curl_is_slist_info(_curl_info)) \ + if (!_curl_is_arr((arg), struct curl_slist *)) \ + _curl_easy_getinfo_err_curl_slist(); \ } \ curl_easy_getinfo(handle, _curl_info, arg); \ }) -- cgit v1.2.1 From 201637d4682973bcc4a1fd0f4e8d4159300bd0b8 Mon Sep 17 00:00:00 2001 From: Cameron Kaiser Date: Thu, 12 Aug 2010 07:55:48 -0700 Subject: Gopher protocol support (initial release) --- include/curl/curl.h | 1 + 1 file changed, 1 insertion(+) (limited to 'include') diff --git a/include/curl/curl.h b/include/curl/curl.h index b19828f58..cb9d0fbfb 100644 --- a/include/curl/curl.h +++ b/include/curl/curl.h @@ -722,6 +722,7 @@ typedef enum { #define CURLPROTO_RTMPTE (1<<22) #define CURLPROTO_RTMPS (1<<23) #define CURLPROTO_RTMPTS (1<<24) +#define CURLPROTO_GOPHER (1<<25) #define CURLPROTO_ALL (~0) /* enable everything */ /* long may be 32 or 64 bits, but we should never depend on anything else -- cgit v1.2.1 From ea07fde40bbbeac77db94656ae3efbe1506937b6 Mon Sep 17 00:00:00 2001 From: Daniel Stenberg Date: Wed, 13 Oct 2010 00:21:39 +0200 Subject: curlver.h: start over at 7.21.3 --- include/curl/curlver.h | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'include') diff --git a/include/curl/curlver.h b/include/curl/curlver.h index 1b1286ba8..fffa74b14 100644 --- a/include/curl/curlver.h +++ b/include/curl/curlver.h @@ -30,13 +30,13 @@ /* This is the version number of the libcurl package from which this header file origins: */ -#define LIBCURL_VERSION "7.21.2-DEV" +#define LIBCURL_VERSION "7.21.3-DEV" /* The numeric version number is also available "in parts" by using these defines: */ #define LIBCURL_VERSION_MAJOR 7 #define LIBCURL_VERSION_MINOR 21 -#define LIBCURL_VERSION_PATCH 2 +#define LIBCURL_VERSION_PATCH 3 /* This is the numeric version of the libcurl version number, meant for easier parsing and comparions by programs. The LIBCURL_VERSION_NUM define will @@ -53,7 +53,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 0x071502 +#define LIBCURL_VERSION_NUM 0x071503 /* * This is the date and time when the full source package was created. The -- cgit v1.2.1 From 1b24b89cca3c06e36b69969af8edeeaca659515b Mon Sep 17 00:00:00 2001 From: Daniel Stenberg Date: Fri, 5 Nov 2010 22:31:40 +0100 Subject: CURLOPT_RESOLVE: added CURLOPT_RESOLVE is a new option that sends along a curl_slist with name:port:address sets that will populate the DNS cache with entries so that request can be "fooled" to use another host than what otherwise would've been used. Previously we've encouraged the use of Host: for that when dealing with HTTP, but this new feature has the added bonus that it allows the name from the URL to be used for TLS SNI and server certificate name checks as well. This is a first change. Surely more will follow to make it decent. --- include/curl/curl.h | 3 +++ 1 file changed, 3 insertions(+) (limited to 'include') diff --git a/include/curl/curl.h b/include/curl/curl.h index cb9d0fbfb..e95887fe7 100644 --- a/include/curl/curl.h +++ b/include/curl/curl.h @@ -1436,6 +1436,9 @@ typedef enum { /* FNMATCH_FUNCTION user pointer */ CINIT(FNMATCH_DATA, OBJECTPOINT, 202), + /* send linked-list of name:port:address sets */ + CINIT(RESOLVE, OBJECTPOINT, 203), + CURLOPT_LASTENTRY /* the last unused */ } CURLoption; -- cgit v1.2.1 From 8636742256c724bee50452d9ef92ffd25b76b8a1 Mon Sep 17 00:00:00 2001 From: Daniel Stenberg Date: Thu, 11 Nov 2010 16:41:59 +0100 Subject: HTTP Auth: Add CURLAUTH_ONLY This is a meta symbol. OR this value together with a single specific auth value to force libcurl to probe for un-restricted auth and if not, only that single auth algorithm is acceptable. For example you can use CURLAUTH_DIGEST|CURLAUTH_ONLY to make libcurl first probe for what method to use, but yet only consider Digest to be acceptable. Using _only_ CURLAUTH_DIGEST without the CURLAUTH_ONLY field, will make libcurl explicitly use Digest right away and not do any probing. --- include/curl/curl.h | 3 +++ 1 file changed, 3 insertions(+) (limited to 'include') diff --git a/include/curl/curl.h b/include/curl/curl.h index e95887fe7..fbd0d9b01 100644 --- a/include/curl/curl.h +++ b/include/curl/curl.h @@ -585,6 +585,9 @@ typedef enum { #define CURLAUTH_GSSNEGOTIATE (1<<2) /* GSS-Negotiate */ #define CURLAUTH_NTLM (1<<3) /* NTLM */ #define CURLAUTH_DIGEST_IE (1<<4) /* Digest with IE flavour */ +#define CURLAUTH_ONLY (1<<31) /* used together with a single other + type to force no auth or just that + single type */ #define CURLAUTH_ANY (~CURLAUTH_DIGEST_IE) /* all fine types set */ #define CURLAUTH_ANYSAFE (~(CURLAUTH_BASIC|CURLAUTH_DIGEST_IE)) -- cgit v1.2.1 From 5e37689a1ac6d844f73f9b3bb49fc1e9d696c00a Mon Sep 17 00:00:00 2001 From: Daniel Stenberg Date: Wed, 15 Dec 2010 15:54:17 +0100 Subject: 7.21.4: version bump --- include/curl/curlver.h | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'include') diff --git a/include/curl/curlver.h b/include/curl/curlver.h index fffa74b14..95dda70b2 100644 --- a/include/curl/curlver.h +++ b/include/curl/curlver.h @@ -30,13 +30,13 @@ /* This is the version number of the libcurl package from which this header file origins: */ -#define LIBCURL_VERSION "7.21.3-DEV" +#define LIBCURL_VERSION "7.21.4-DEV" /* The numeric version number is also available "in parts" by using these defines: */ #define LIBCURL_VERSION_MAJOR 7 #define LIBCURL_VERSION_MINOR 21 -#define LIBCURL_VERSION_PATCH 3 +#define LIBCURL_VERSION_PATCH 4 /* This is the numeric version of the libcurl version number, meant for easier parsing and comparions by programs. The LIBCURL_VERSION_NUM define will @@ -53,7 +53,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 0x071503 +#define LIBCURL_VERSION_NUM 0x071504 /* * This is the date and time when the full source package was created. The -- cgit v1.2.1 From c5d9cd5c1bd69729debef8ff16d2bdbc8b42e7c2 Mon Sep 17 00:00:00 2001 From: Yang Tse Date: Wed, 12 Jan 2011 02:33:39 +0100 Subject: build: allow usage of Borland 5.5.1 external preprocessor cpp32 --- include/curl/curlrules.h | 23 ++++++++++++++++------- 1 file changed, 16 insertions(+), 7 deletions(-) (limited to 'include') diff --git a/include/curl/curlrules.h b/include/curl/curlrules.h index 8aad1df67..cbc12fdd2 100644 --- a/include/curl/curlrules.h +++ b/include/curl/curlrules.h @@ -7,7 +7,7 @@ * | (__| |_| | _ <| |___ * \___|\___/|_| \_\_____| * - * Copyright (C) 1998 - 2010, Daniel Stenberg, , et al. + * Copyright (C) 1998 - 2011, 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 @@ -216,14 +216,23 @@ typedef char * Macros for minimum-width signed and unsigned curl_off_t integer constants. */ -#ifdef CURL_ISOCPP -# define __CURL_OFF_T_C_HELPER2(Val,Suffix) Val ## Suffix +#if defined(__BORLANDC__) && (__BORLANDC__ == 0x0551) +# define __CURL_OFF_T_C_HLPR2(x) x +# define __CURL_OFF_T_C_HLPR1(x) __CURL_OFF_T_C_HLPR2(x) +# define CURL_OFF_T_C(Val) __CURL_OFF_T_C_HLPR1(Val) ## \ + __CURL_OFF_T_C_HLPR1(CURL_SUFFIX_CURL_OFF_T) +# define CURL_OFF_TU_C(Val) __CURL_OFF_T_C_HLPR1(Val) ## \ + __CURL_OFF_T_C_HLPR1(CURL_SUFFIX_CURL_OFF_TU) #else -# define __CURL_OFF_T_C_HELPER2(Val,Suffix) Val/**/Suffix +# ifdef CURL_ISOCPP +# define __CURL_OFF_T_C_HLPR2(Val,Suffix) Val ## Suffix +# else +# define __CURL_OFF_T_C_HLPR2(Val,Suffix) Val/**/Suffix +# endif +# define __CURL_OFF_T_C_HLPR1(Val,Suffix) __CURL_OFF_T_C_HLPR2(Val,Suffix) +# define CURL_OFF_T_C(Val) __CURL_OFF_T_C_HLPR1(Val,CURL_SUFFIX_CURL_OFF_T) +# define CURL_OFF_TU_C(Val) __CURL_OFF_T_C_HLPR1(Val,CURL_SUFFIX_CURL_OFF_TU) #endif -#define __CURL_OFF_T_C_HELPER1(Val,Suffix) __CURL_OFF_T_C_HELPER2(Val,Suffix) -#define CURL_OFF_T_C(Val) __CURL_OFF_T_C_HELPER1(Val,CURL_SUFFIX_CURL_OFF_T) -#define CURL_OFF_TU_C(Val) __CURL_OFF_T_C_HELPER1(Val,CURL_SUFFIX_CURL_OFF_TU) /* * Get rid of macros private to this header file. -- cgit v1.2.1 From 59cf93ccdbaa5e866f9de6b2d9b1ae5cee84863f Mon Sep 17 00:00:00 2001 From: Quinn Slack Date: Wed, 19 Jan 2011 20:35:02 +0100 Subject: TLS-SRP: support added when using GnuTLS --- include/curl/curl.h | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) (limited to 'include') diff --git a/include/curl/curl.h b/include/curl/curl.h index fbd0d9b01..bf6542076 100644 --- a/include/curl/curl.h +++ b/include/curl/curl.h @@ -502,6 +502,7 @@ typedef enum { CURLE_RTSP_SESSION_ERROR, /* 86 - mismatch of RTSP Session Identifiers */ CURLE_FTP_BAD_FILE_LIST, /* 87 - unable to parse FTP file list */ CURLE_CHUNK_FAILED, /* 88 - chunk callback reported error */ + CURLE_TLSAUTH_FAILED, /* 89 - Failed TLS authentication */ CURL_LAST /* never use! */ } CURLcode; @@ -1442,6 +1443,15 @@ typedef enum { /* send linked-list of name:port:address sets */ CINIT(RESOLVE, OBJECTPOINT, 203), + /* Set a username for authenticated TLS */ + CINIT(TLSAUTH_USERNAME, OBJECTPOINT, 204), + + /* Set a password for authenticated TLS */ + CINIT(TLSAUTH_PASSWORD, OBJECTPOINT, 205), + + /* Set authentication type for authenticated TLS */ + CINIT(TLSAUTH_TYPE, OBJECTPOINT, 206), + CURLOPT_LASTENTRY /* the last unused */ } CURLoption; @@ -1538,6 +1548,12 @@ enum { CURL_SSLVERSION_LAST /* never use, keep last */ }; +enum CURL_TLSAUTH { + CURL_TLSAUTH_NONE, + CURL_TLSAUTH_SRP, + CURL_TLSAUTH_LAST /* never use, keep last */ +}; + /* symbols to use with CURLOPT_POSTREDIR. CURL_REDIR_POST_301 and CURL_REDIR_POST_302 can be bitwise ORed so that CURL_REDIR_POST_301 | CURL_REDIR_POST_302 == CURL_REDIR_POST_ALL */ @@ -2043,6 +2059,7 @@ typedef struct { #define CURL_VERSION_SSPI (1<<11) /* SSPI is supported */ #define CURL_VERSION_CONV (1<<12) /* character conversions supported */ #define CURL_VERSION_CURLDEBUG (1<<13) /* debug memory tracking supported */ +#define CURL_VERSION_TLSAUTH_SRP (1<<14) /* TLS-SRP auth is supported */ /* * NAME curl_version_info() -- cgit v1.2.1 From 3cffcba3d0cf78a2aa17197059f810f5a7ce05a5 Mon Sep 17 00:00:00 2001 From: Quinn Slack Date: Wed, 9 Feb 2011 23:34:30 +0100 Subject: CURLE_TLSAUTH_FAILED: removed On second thought, I think CURLE_TLSAUTH_FAILED should be eliminated. It was only being raised when an internal error occurred while allocating or setting the GnuTLS SRP client credentials struct. For TLS authentication failures, the general CURLE_SSL_CONNECT_ERROR seems appropriate; its error string already includes "passwords" as a possible cause. Having a separate TLS auth error code might also cause people to think that a TLS auth failure means the wrong username or password was entered, when it could also be a sign of a man-in-the-middle attack. --- include/curl/curl.h | 1 - 1 file changed, 1 deletion(-) (limited to 'include') diff --git a/include/curl/curl.h b/include/curl/curl.h index bf6542076..4744f4830 100644 --- a/include/curl/curl.h +++ b/include/curl/curl.h @@ -502,7 +502,6 @@ typedef enum { CURLE_RTSP_SESSION_ERROR, /* 86 - mismatch of RTSP Session Identifiers */ CURLE_FTP_BAD_FILE_LIST, /* 87 - unable to parse FTP file list */ CURLE_CHUNK_FAILED, /* 88 - chunk callback reported error */ - CURLE_TLSAUTH_FAILED, /* 89 - Failed TLS authentication */ CURL_LAST /* never use! */ } CURLcode; -- cgit v1.2.1 From fae0e2f9681aceebe169ee2d6a20113f41db3fbc Mon Sep 17 00:00:00 2001 From: Daniel Stenberg Date: Thu, 17 Feb 2011 13:59:27 +0100 Subject: curlver.h: bump to 7.21.5 --- include/curl/curlver.h | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'include') diff --git a/include/curl/curlver.h b/include/curl/curlver.h index 95dda70b2..98ec29431 100644 --- a/include/curl/curlver.h +++ b/include/curl/curlver.h @@ -7,7 +7,7 @@ * | (__| |_| | _ <| |___ * \___|\___/|_| \_\_____| * - * Copyright (C) 1998 - 2010, Daniel Stenberg, , et al. + * Copyright (C) 1998 - 2011, 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,17 +26,17 @@ 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 - 2010 Daniel Stenberg, ." +#define LIBCURL_COPYRIGHT "1996 - 2011 Daniel Stenberg, ." /* This is the version number of the libcurl package from which this header file origins: */ -#define LIBCURL_VERSION "7.21.4-DEV" +#define LIBCURL_VERSION "7.21.5-DEV" /* The numeric version number is also available "in parts" by using these defines: */ #define LIBCURL_VERSION_MAJOR 7 #define LIBCURL_VERSION_MINOR 21 -#define LIBCURL_VERSION_PATCH 4 +#define LIBCURL_VERSION_PATCH 5 /* This is the numeric version of the libcurl version number, meant for easier parsing and comparions by programs. The LIBCURL_VERSION_NUM define will @@ -53,7 +53,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 0x071504 +#define LIBCURL_VERSION_NUM 0x071505 /* * This is the date and time when the full source package was created. The -- cgit v1.2.1 From 1c3c0162c62e2788373261a43f484ff401017d8a Mon Sep 17 00:00:00 2001 From: Daniel Stenberg Date: Wed, 9 Feb 2011 15:46:41 +0100 Subject: SOCKOPTFUNCTION: callback can say already-connected Introducing a few CURL_SOCKOPT* defines for conveniance. The new CURL_SOCKOPT_ALREADY_CONNECTED signals to libcurl that the socket is to be treated as already connected and thus it will skip the connect() call. --- include/curl/curl.h | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'include') diff --git a/include/curl/curl.h b/include/curl/curl.h index 4744f4830..73713dd07 100644 --- a/include/curl/curl.h +++ b/include/curl/curl.h @@ -315,6 +315,13 @@ typedef enum { CURLSOCKTYPE_LAST /* never use */ } curlsocktype; +/* The return code from the sockopt_callback can signal information back + to libcurl: */ +#define CURL_SOCKOPT_OK 0 +#define CURL_SOCKOPT_ERROR 1 /* causes libcurl to abort and return + CURLE_ABORTED_BY_CALLBACK */ +#define CURL_SOCKOPT_ALREADY_CONNECTED 2 + typedef int (*curl_sockopt_callback)(void *clientp, curl_socket_t curlfd, curlsocktype purpose); -- cgit v1.2.1 From 9680df4807be3a33640611a79d2e113335e3fc69 Mon Sep 17 00:00:00 2001 From: Daniel Stenberg Date: Tue, 22 Mar 2011 22:48:11 +0100 Subject: headers: more copyright headers added --- include/curl/Makefile.am | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) (limited to 'include') diff --git a/include/curl/Makefile.am b/include/curl/Makefile.am index a3b444386..5f5d5130c 100644 --- a/include/curl/Makefile.am +++ b/include/curl/Makefile.am @@ -1,3 +1,24 @@ +#*************************************************************************** +# _ _ ____ _ +# Project ___| | | | _ \| | +# / __| | | | |_) | | +# | (__| |_| | _ <| |___ +# \___|\___/|_| \_\_____| +# +# Copyright (C) 1998 - 2011, 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 +# are also available at http://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 +# furnished to do so, under the terms of the COPYING file. +# +# This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY +# KIND, either express or implied. +# +########################################################################### pkginclude_HEADERS = \ curl.h curlver.h easy.h mprintf.h stdcheaders.h types.h multi.h \ typecheck-gcc.h curlbuild.h curlrules.h -- cgit v1.2.1 From 01f05d0c758795e5bb02c6245fc73b8458eb397a Mon Sep 17 00:00:00 2001 From: Daniel Stenberg Date: Tue, 5 Apr 2011 15:14:02 +0200 Subject: return code cleanup: build, init and run-time errors Stop the abuse of CURLE_FAILED_INIT as return code for things not being init related by introducing two new return codes: CURLE_NOT_BUILT_IN and CURLE_UNKNOWN_OPTION CURLE_NOT_BUILT_IN replaces return code 4 that has been obsoleted for several years. It is used for returning error when something is attempted to be used but the feature/option was not enabled or explictitly disabled at build-time. Getting this error mostly means that libcurl needs to be rebuilt. CURLE_FAILED_INIT is now saved and used strictly for init failures. Getting this problem means something went seriously wrong, like a resource shortage or similar. CURLE_UNKNOWN_OPTION is the option formerly known as CURLE_UNKNOWN_TELNET_OPTION (and the old name is still present, separately defined to be removed in a very distant future). This error code is meant to be used to return when an option is given to libcurl that isn't known. This problem would mostly indicate a problem in the program that uses libcurl. --- include/curl/curl.h | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) (limited to 'include') diff --git a/include/curl/curl.h b/include/curl/curl.h index 73713dd07..2bd9cd042 100644 --- a/include/curl/curl.h +++ b/include/curl/curl.h @@ -7,7 +7,7 @@ * | (__| |_| | _ <| |___ * \___|\___/|_| \_\_____| * - * Copyright (C) 1998 - 2010, Daniel Stenberg, , et al. + * Copyright (C) 1998 - 2011, 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 @@ -401,7 +401,8 @@ typedef enum { CURLE_UNSUPPORTED_PROTOCOL, /* 1 */ CURLE_FAILED_INIT, /* 2 */ CURLE_URL_MALFORMAT, /* 3 */ - CURLE_OBSOLETE4, /* 4 - NOT USED */ + CURLE_NOT_BUILT_IN, /* 4 - [was obsoleted in August 2007 for + 7.17.0, reused in April 2011 for 7.21.5] */ CURLE_COULDNT_RESOLVE_PROXY, /* 5 */ CURLE_COULDNT_RESOLVE_HOST, /* 6 */ CURLE_COULDNT_CONNECT, /* 7 */ @@ -451,7 +452,7 @@ typedef enum { CURLE_INTERFACE_FAILED, /* 45 - CURLOPT_INTERFACE failed */ CURLE_OBSOLETE46, /* 46 - NOT USED */ CURLE_TOO_MANY_REDIRECTS , /* 47 - catch endless re-direct loops */ - CURLE_UNKNOWN_TELNET_OPTION, /* 48 - User specified an unknown option */ + CURLE_UNKNOWN_OPTION, /* 48 - User specified an unknown option */ CURLE_TELNET_OPTION_SYNTAX , /* 49 - Malformed telnet option */ CURLE_OBSOLETE50, /* 50 - NOT USED */ CURLE_PEER_FAILED_VERIFICATION, /* 51 - peer's certificate or fingerprint @@ -518,6 +519,9 @@ typedef enum { /* Backwards compatibility with older names */ +/* The following were added in 7.21.5, April 2011 */ +#define CURLE_UNKNOWN_TELNET_OPTION CURLE_UNKNOWN_OPTION + /* The following were added in 7.17.1 */ /* These are scheduled to disappear by 2009 */ #define CURLE_SSL_PEER_CERTIFICATE CURLE_PEER_FAILED_VERIFICATION -- cgit v1.2.1 From 5b716b7c91d50d9351567f6dcbd76dcc803f0c27 Mon Sep 17 00:00:00 2001 From: Dan Fandrich Date: Tue, 5 Apr 2011 14:44:25 -0700 Subject: Fixed compatibility macro CURLE_URL_MALFORMAT_USER --- include/curl/curl.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'include') diff --git a/include/curl/curl.h b/include/curl/curl.h index 2bd9cd042..1a7ba7695 100644 --- a/include/curl/curl.h +++ b/include/curl/curl.h @@ -540,7 +540,7 @@ typedef enum { #define CURLE_LIBRARY_NOT_FOUND CURLE_OBSOLETE40 #define CURLE_MALFORMAT_USER CURLE_OBSOLETE24 #define CURLE_SHARE_IN_USE CURLE_OBSOLETE57 -#define CURLE_URL_MALFORMAT_USER CURLE_OBSOLETE4 +#define CURLE_URL_MALFORMAT_USER CURLE_NOT_BUILT_IN #define CURLE_FTP_ACCESS_DENIED CURLE_REMOTE_ACCESS_DENIED #define CURLE_FTP_COULDNT_SET_BINARY CURLE_FTP_COULDNT_SET_TYPE -- cgit v1.2.1 From 909acfbbbaa069655f156dc1dc274c728e2071fb Mon Sep 17 00:00:00 2001 From: Daniel Stenberg Date: Sun, 17 Apr 2011 23:44:24 +0200 Subject: 7.21.6: next planned release number --- include/curl/curlver.h | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'include') diff --git a/include/curl/curlver.h b/include/curl/curlver.h index 98ec29431..8e1c50c0d 100644 --- a/include/curl/curlver.h +++ b/include/curl/curlver.h @@ -30,13 +30,13 @@ /* This is the version number of the libcurl package from which this header file origins: */ -#define LIBCURL_VERSION "7.21.5-DEV" +#define LIBCURL_VERSION "7.21.6-DEV" /* The numeric version number is also available "in parts" by using these defines: */ #define LIBCURL_VERSION_MAJOR 7 #define LIBCURL_VERSION_MINOR 21 -#define LIBCURL_VERSION_PATCH 5 +#define LIBCURL_VERSION_PATCH 6 /* This is the numeric version of the libcurl version number, meant for easier parsing and comparions by programs. The LIBCURL_VERSION_NUM define will @@ -53,7 +53,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 0x071505 +#define LIBCURL_VERSION_NUM 0x071506 /* * This is the date and time when the full source package was created. The -- cgit v1.2.1 From ebb37eac8ba8caca5282c41635e491f19fe7df48 Mon Sep 17 00:00:00 2001 From: Daniel Stenberg Date: Tue, 12 Apr 2011 22:09:18 +0200 Subject: CURLE_BAD_CONTENT_ENCODING: now used for transfer encoding too --- include/curl/curl.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'include') diff --git a/include/curl/curl.h b/include/curl/curl.h index 1a7ba7695..b44649588 100644 --- a/include/curl/curl.h +++ b/include/curl/curl.h @@ -467,7 +467,7 @@ typedef enum { CURLE_SSL_CERTPROBLEM, /* 58 - problem with the local certificate */ CURLE_SSL_CIPHER, /* 59 - couldn't use specified cipher */ CURLE_SSL_CACERT, /* 60 - problem with the CA cert (path?) */ - CURLE_BAD_CONTENT_ENCODING, /* 61 - Unrecognized transfer encoding */ + CURLE_BAD_CONTENT_ENCODING, /* 61 - Unrecognized/bad encoding */ CURLE_LDAP_INVALID_URL, /* 62 - Invalid LDAP URL */ CURLE_FILESIZE_EXCEEDED, /* 63 - Maximum file size exceeded */ CURLE_USE_SSL_FAILED, /* 64 - Requested FTP SSL level failed */ -- cgit v1.2.1 From 8e4fb01e64bee1893452f25873758cb856898d84 Mon Sep 17 00:00:00 2001 From: Daniel Stenberg Date: Thu, 14 Apr 2011 22:45:42 +0200 Subject: transfer-encoding: added new option and cmdline Added CURLOPT_TRANSFER_ENCODING as the option to set to request Transfer Encoding in HTTP requests (if built zlib enabled). I also renamed CURLOPT_ENCODING to CURLOPT_ACCEPT_ENCODING (while keeping the old name around) to reduce the confusion when we have to encoding options for HTTP. --tr-encoding is now the new command line option for curl to request this, and thus I updated the test cases accordingly. --- include/curl/curl.h | 20 +++++++++++++++++--- include/curl/typecheck-gcc.h | 4 ++-- 2 files changed, 19 insertions(+), 5 deletions(-) (limited to 'include') diff --git a/include/curl/curl.h b/include/curl/curl.h index b44649588..6996257c2 100644 --- a/include/curl/curl.h +++ b/include/curl/curl.h @@ -517,7 +517,8 @@ typedef enum { #ifndef CURL_NO_OLDIES /* define this to test if your app builds with all the obsolete stuff removed! */ -/* Backwards compatibility with older names */ +/* compatibility with older names */ +#define CURLOPT_ENCODING CURLOPT_ACCEPT_ENCODING /* The following were added in 7.21.5, April 2011 */ #define CURLE_UNKNOWN_TELNET_OPTION CURLE_UNKNOWN_OPTION @@ -1103,8 +1104,9 @@ typedef enum { CINIT(PROXYTYPE, LONG, 101), /* Set the Accept-Encoding string. Use this to tell a server you would like - the response to be compressed. */ - CINIT(ENCODING, OBJECTPOINT, 102), + the response to be compressed. Before 7.21.6, this was known as + CURLOPT_ENCODING */ + CINIT(ACCEPT_ENCODING, OBJECTPOINT, 102), /* Set pointer to private data */ CINIT(PRIVATE, OBJECTPOINT, 103), @@ -1462,6 +1464,18 @@ typedef enum { /* Set authentication type for authenticated TLS */ CINIT(TLSAUTH_TYPE, OBJECTPOINT, 206), + /* Set to 1 to enable the "TE:" header in HTTP requests to ask for + compressed transfer-encoded responses. Set to 0 to disable the use of TE: + in outgoing requests. The current default is 0, but it might change in a + future libcurl release. + + libcurl will ask for the compressed methods it knows of, and if that + isn't any, it will not ask for transfer-encoding at all even if this + option is set to 1. + + */ + CINIT(TRANSFER_ENCODING, LONG, 207), + CURLOPT_LASTENTRY /* the last unused */ } CURLoption; diff --git a/include/curl/typecheck-gcc.h b/include/curl/typecheck-gcc.h index e6f74a958..46f92d728 100644 --- a/include/curl/typecheck-gcc.h +++ b/include/curl/typecheck-gcc.h @@ -7,7 +7,7 @@ * | (__| |_| | _ <| |___ * \___|\___/|_| \_\_____| * - * Copyright (C) 1998 - 2010, Daniel Stenberg, , et al. + * Copyright (C) 1998 - 2011, 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 @@ -224,7 +224,7 @@ _CURL_WARNING(_curl_easy_getinfo_err_curl_slist, (option) == CURLOPT_PROXYUSERNAME || \ (option) == CURLOPT_PROXYPASSWORD || \ (option) == CURLOPT_NOPROXY || \ - (option) == CURLOPT_ENCODING || \ + (option) == CURLOPT_ACCEPT_ENCODING || \ (option) == CURLOPT_REFERER || \ (option) == CURLOPT_USERAGENT || \ (option) == CURLOPT_COOKIE || \ -- cgit v1.2.1 From 7609b32e7cb06e034a3e80ad6c57902c99a646df Mon Sep 17 00:00:00 2001 From: Fabian Keil Date: Tue, 19 Apr 2011 16:05:17 +0200 Subject: Fix spelling errors in include/ --- include/README | 2 +- include/curl/curl.h | 2 +- include/curl/easy.h | 4 ++-- 3 files changed, 4 insertions(+), 4 deletions(-) (limited to 'include') diff --git a/include/README b/include/README index 205f9f7dd..3e52a1d0a 100644 --- a/include/README +++ b/include/README @@ -36,7 +36,7 @@ The following notes apply to libcurl version 7.19.0 and later. * If you intend to distribute an already compiled libcurl library you _MUST_ also distribute along with it the generated curl/curlbuild.h which has been used to compile it. Otherwise the library will be of no use for the users of - the library that you have built. It is _your_ responsability to provide this + the library that you have built. It is _your_ responsibility to provide this file. No one at the cURL project can know how you have built the library. * File curl/curlbuild.h includes platform and configuration dependent info, diff --git a/include/curl/curl.h b/include/curl/curl.h index 6996257c2..ee9754da8 100644 --- a/include/curl/curl.h +++ b/include/curl/curl.h @@ -529,7 +529,7 @@ typedef enum { /* The following were added in 7.17.0 */ /* These are scheduled to disappear by 2009 */ -#define CURLE_OBSOLETE CURLE_OBSOLETE50 /* noone should be using this! */ +#define CURLE_OBSOLETE CURLE_OBSOLETE50 /* no one should be using this! */ #define CURLE_BAD_PASSWORD_ENTERED CURLE_OBSOLETE46 #define CURLE_BAD_CALLING_ORDER CURLE_OBSOLETE44 #define CURLE_FTP_USER_PASSWORD_INCORRECT CURLE_OBSOLETE10 diff --git a/include/curl/easy.h b/include/curl/easy.h index 1ddb4fe5a..c1e3e7609 100644 --- a/include/curl/easy.h +++ b/include/curl/easy.h @@ -53,8 +53,8 @@ CURL_EXTERN CURLcode curl_easy_getinfo(CURL *curl, CURLINFO info, ...); * * Creates a new curl session handle with the same options set for the handle * passed in. Duplicating a handle could only be a matter of cloning data and - * options, internal state info and things like persistant connections cannot - * be transfered. It is useful in multithreaded applications when you can run + * options, internal state info and things like persistent connections cannot + * be transferred. It is useful in multithreaded applications when you can run * curl_easy_duphandle() for each new thread to avoid a series of identical * curl_easy_setopt() invokes in every thread. */ -- cgit v1.2.1 From c985a8df51d75a9c72765d644b9fff4c2fa5952e Mon Sep 17 00:00:00 2001 From: Daniel Stenberg Date: Fri, 22 Apr 2011 22:02:55 +0200 Subject: bump version: work towards 7.21.7 --- include/curl/curlver.h | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'include') diff --git a/include/curl/curlver.h b/include/curl/curlver.h index 8e1c50c0d..7b86889c2 100644 --- a/include/curl/curlver.h +++ b/include/curl/curlver.h @@ -30,13 +30,13 @@ /* This is the version number of the libcurl package from which this header file origins: */ -#define LIBCURL_VERSION "7.21.6-DEV" +#define LIBCURL_VERSION "7.21.7-DEV" /* The numeric version number is also available "in parts" by using these defines: */ #define LIBCURL_VERSION_MAJOR 7 #define LIBCURL_VERSION_MINOR 21 -#define LIBCURL_VERSION_PATCH 6 +#define LIBCURL_VERSION_PATCH 7 /* This is the numeric version of the libcurl version number, meant for easier parsing and comparions by programs. The LIBCURL_VERSION_NUM define will @@ -53,7 +53,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 0x071506 +#define LIBCURL_VERSION_NUM 0x071507 /* * This is the date and time when the full source package was created. The -- cgit v1.2.1 From 61877b569f29ec735e35cf0b52bc1b00ce03078b Mon Sep 17 00:00:00 2001 From: Daniel Stenberg Date: Thu, 5 May 2011 00:02:39 +0200 Subject: Corrected comments closepolicy has been deprecated and unused for years --- include/curl/curl.h | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'include') diff --git a/include/curl/curl.h b/include/curl/curl.h index ee9754da8..e731ee900 100644 --- a/include/curl/curl.h +++ b/include/curl/curl.h @@ -991,8 +991,7 @@ typedef enum { /* Max amount of cached alive connections */ CINIT(MAXCONNECTS, LONG, 71), - /* What policy to use when closing connections when the cache is filled - up */ + /* 72 - DEPRECATED */ CINIT(CLOSEPOLICY, LONG, 72), /* 73 = OBSOLETE */ -- cgit v1.2.1 From 2ef7a28a71f819343afefa721e5497119fb2cee0 Mon Sep 17 00:00:00 2001 From: Daniel Stenberg Date: Tue, 3 May 2011 22:39:38 +0200 Subject: include: cleanup Made the public headers checksrc compliant Removed types.h (it's been unused since April 2004) Made the root makefile do make in include by default as well, so that TAGS and the checksrc will work better. --- include/curl/Makefile.am | 9 +++- include/curl/curl.h | 13 ++--- include/curl/curlbuild.h.in | 22 ++++---- include/curl/typecheck-gcc.h | 118 +++++++++++++++++++++++-------------------- include/curl/types.h | 1 - 5 files changed, 88 insertions(+), 75 deletions(-) delete mode 100644 include/curl/types.h (limited to 'include') diff --git a/include/curl/Makefile.am b/include/curl/Makefile.am index 5f5d5130c..86e8b7834 100644 --- a/include/curl/Makefile.am +++ b/include/curl/Makefile.am @@ -20,7 +20,7 @@ # ########################################################################### pkginclude_HEADERS = \ - curl.h curlver.h easy.h mprintf.h stdcheaders.h types.h multi.h \ + curl.h curlver.h easy.h mprintf.h stdcheaders.h multi.h \ typecheck-gcc.h curlbuild.h curlrules.h pkgincludedir= $(includedir)/curl @@ -44,3 +44,10 @@ EXTRA_DIST = curlbuild.h.in DISTCLEANFILES = curlbuild.h +checksrc: + @@PERL@ $(top_srcdir)/lib/checksrc.pl -Wcurlbuild.h -D$(top_srcdir)/include/curl $(pkginclude_HEADERS) $(EXTRA_DIST) + +if CURLDEBUG +# for debug builds, we scan the sources on all regular make invokes +all-local: checksrc +endif diff --git a/include/curl/curl.h b/include/curl/curl.h index e731ee900..09f305466 100644 --- a/include/curl/curl.h +++ b/include/curl/curl.h @@ -507,7 +507,7 @@ typedef enum { 7.19.0) */ CURLE_FTP_PRET_FAILED, /* 84 - a PRET command failed */ CURLE_RTSP_CSEQ_ERROR, /* 85 - mismatch of RTSP CSeq numbers */ - CURLE_RTSP_SESSION_ERROR, /* 86 - mismatch of RTSP Session Identifiers */ + CURLE_RTSP_SESSION_ERROR, /* 86 - mismatch of RTSP Session Ids */ CURLE_FTP_BAD_FILE_LIST, /* 87 - unable to parse FTP file list */ CURLE_CHUNK_FAILED, /* 88 - chunk callback reported error */ @@ -755,7 +755,7 @@ typedef enum { #endif #ifdef CURL_ISOCPP -#define CINIT(name,type,number) CURLOPT_ ## name = CURLOPTTYPE_ ## type + number +#define CINIT(na,t,nu) CURLOPT_ ## na = CURLOPTTYPE_ ## t + nu #else /* The macro "##" is ISO C, we assume pre-ISO C doesn't support it. */ #define LONG CURLOPTTYPE_LONG @@ -924,7 +924,7 @@ typedef enum { CINIT(FAILONERROR, LONG, 45), /* no output on http error codes >= 300 */ CINIT(UPLOAD, LONG, 46), /* this is an upload */ CINIT(POST, LONG, 47), /* HTTP POST method */ - CINIT(DIRLISTONLY, LONG, 48), /* return bare names when listing directories */ + CINIT(DIRLISTONLY, LONG, 48), /* bare names when listing directories */ CINIT(APPEND, LONG, 50), /* Append instead of overwrite on upload! */ @@ -1118,8 +1118,8 @@ typedef enum { and password to whatever host the server decides. */ CINIT(UNRESTRICTED_AUTH, LONG, 105), - /* Specifically switch on or off the FTP engine's use of the EPRT command ( it - also disables the LPRT attempt). By default, those ones will always be + /* Specifically switch on or off the FTP engine's use of the EPRT command ( + it also disables the LPRT attempt). By default, those ones will always be attempted before the good old traditional PORT command. */ CINIT(FTP_USE_EPRT, LONG, 106), @@ -1703,7 +1703,8 @@ CURL_EXTERN CURLFORMcode curl_formadd(struct curl_httppost **httppost, * Should return the buffer length passed to it as the argument "len" on * success. */ -typedef size_t (*curl_formget_callback)(void *arg, const char *buf, size_t len); +typedef size_t (*curl_formget_callback)(void *arg, const char *buf, + size_t len); /* * NAME curl_formget() diff --git a/include/curl/curlbuild.h.in b/include/curl/curlbuild.h.in index cb1de80a0..fe348f40d 100644 --- a/include/curl/curlbuild.h.in +++ b/include/curl/curlbuild.h.in @@ -7,7 +7,7 @@ * | (__| |_| | _ <| |___ * \___|\___/|_| \_\_____| * - * Copyright (C) 1998 - 2009, Daniel Stenberg, , et al. + * Copyright (C) 1998 - 2011, 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 @@ -58,52 +58,52 @@ /* ================================================================ */ #ifdef CURL_SIZEOF_LONG -# error "CURL_SIZEOF_LONG shall not be defined except in curlbuild.h" +#error "CURL_SIZEOF_LONG shall not be defined except in curlbuild.h" Error Compilation_aborted_CURL_SIZEOF_LONG_already_defined #endif #ifdef CURL_TYPEOF_CURL_SOCKLEN_T -# error "CURL_TYPEOF_CURL_SOCKLEN_T shall not be defined except in curlbuild.h" +#error "CURL_TYPEOF_CURL_SOCKLEN_T shall not be defined except in curlbuild.h" Error Compilation_aborted_CURL_TYPEOF_CURL_SOCKLEN_T_already_defined #endif #ifdef CURL_SIZEOF_CURL_SOCKLEN_T -# error "CURL_SIZEOF_CURL_SOCKLEN_T shall not be defined except in curlbuild.h" +#error "CURL_SIZEOF_CURL_SOCKLEN_T shall not be defined except in curlbuild.h" Error Compilation_aborted_CURL_SIZEOF_CURL_SOCKLEN_T_already_defined #endif #ifdef CURL_TYPEOF_CURL_OFF_T -# error "CURL_TYPEOF_CURL_OFF_T shall not be defined except in curlbuild.h" +#error "CURL_TYPEOF_CURL_OFF_T shall not be defined except in curlbuild.h" Error Compilation_aborted_CURL_TYPEOF_CURL_OFF_T_already_defined #endif #ifdef CURL_FORMAT_CURL_OFF_T -# error "CURL_FORMAT_CURL_OFF_T shall not be defined except in curlbuild.h" +#error "CURL_FORMAT_CURL_OFF_T shall not be defined except in curlbuild.h" Error Compilation_aborted_CURL_FORMAT_CURL_OFF_T_already_defined #endif #ifdef CURL_FORMAT_CURL_OFF_TU -# error "CURL_FORMAT_CURL_OFF_TU shall not be defined except in curlbuild.h" +#error "CURL_FORMAT_CURL_OFF_TU shall not be defined except in curlbuild.h" Error Compilation_aborted_CURL_FORMAT_CURL_OFF_TU_already_defined #endif #ifdef CURL_FORMAT_OFF_T -# error "CURL_FORMAT_OFF_T shall not be defined except in curlbuild.h" +#error "CURL_FORMAT_OFF_T shall not be defined except in curlbuild.h" Error Compilation_aborted_CURL_FORMAT_OFF_T_already_defined #endif #ifdef CURL_SIZEOF_CURL_OFF_T -# error "CURL_SIZEOF_CURL_OFF_T shall not be defined except in curlbuild.h" +#error "CURL_SIZEOF_CURL_OFF_T shall not be defined except in curlbuild.h" Error Compilation_aborted_CURL_SIZEOF_CURL_OFF_T_already_defined #endif #ifdef CURL_SUFFIX_CURL_OFF_T -# error "CURL_SUFFIX_CURL_OFF_T shall not be defined except in curlbuild.h" +#error "CURL_SUFFIX_CURL_OFF_T shall not be defined except in curlbuild.h" Error Compilation_aborted_CURL_SUFFIX_CURL_OFF_T_already_defined #endif #ifdef CURL_SUFFIX_CURL_OFF_TU -# error "CURL_SUFFIX_CURL_OFF_TU shall not be defined except in curlbuild.h" +#error "CURL_SUFFIX_CURL_OFF_TU shall not be defined except in curlbuild.h" Error Compilation_aborted_CURL_SUFFIX_CURL_OFF_TU_already_defined #endif diff --git a/include/curl/typecheck-gcc.h b/include/curl/typecheck-gcc.h index 46f92d728..f043a18e4 100644 --- a/include/curl/typecheck-gcc.h +++ b/include/curl/typecheck-gcc.h @@ -41,66 +41,66 @@ #define curl_easy_setopt(handle, option, value) \ __extension__ ({ \ __typeof__ (option) _curl_opt = option; \ - if (__builtin_constant_p(_curl_opt)) { \ - if (_curl_is_long_option(_curl_opt)) \ - if (!_curl_is_long(value)) \ + if(__builtin_constant_p(_curl_opt)) { \ + if(_curl_is_long_option(_curl_opt)) \ + if(!_curl_is_long(value)) \ _curl_easy_setopt_err_long(); \ - if (_curl_is_off_t_option(_curl_opt)) \ - if (!_curl_is_off_t(value)) \ + if(_curl_is_off_t_option(_curl_opt)) \ + if(!_curl_is_off_t(value)) \ _curl_easy_setopt_err_curl_off_t(); \ - if (_curl_is_string_option(_curl_opt)) \ - if (!_curl_is_string(value)) \ + if(_curl_is_string_option(_curl_opt)) \ + if(!_curl_is_string(value)) \ _curl_easy_setopt_err_string(); \ - if (_curl_is_write_cb_option(_curl_opt)) \ - if (!_curl_is_write_cb(value)) \ + if(_curl_is_write_cb_option(_curl_opt)) \ + if(!_curl_is_write_cb(value)) \ _curl_easy_setopt_err_write_callback(); \ - if ((_curl_opt) == CURLOPT_READFUNCTION) \ - if (!_curl_is_read_cb(value)) \ + if((_curl_opt) == CURLOPT_READFUNCTION) \ + if(!_curl_is_read_cb(value)) \ _curl_easy_setopt_err_read_cb(); \ - if ((_curl_opt) == CURLOPT_IOCTLFUNCTION) \ - if (!_curl_is_ioctl_cb(value)) \ + if((_curl_opt) == CURLOPT_IOCTLFUNCTION) \ + if(!_curl_is_ioctl_cb(value)) \ _curl_easy_setopt_err_ioctl_cb(); \ - if ((_curl_opt) == CURLOPT_SOCKOPTFUNCTION) \ - if (!_curl_is_sockopt_cb(value)) \ + if((_curl_opt) == CURLOPT_SOCKOPTFUNCTION) \ + if(!_curl_is_sockopt_cb(value)) \ _curl_easy_setopt_err_sockopt_cb(); \ - if ((_curl_opt) == CURLOPT_OPENSOCKETFUNCTION) \ - if (!_curl_is_opensocket_cb(value)) \ + if((_curl_opt) == CURLOPT_OPENSOCKETFUNCTION) \ + if(!_curl_is_opensocket_cb(value)) \ _curl_easy_setopt_err_opensocket_cb(); \ - if ((_curl_opt) == CURLOPT_PROGRESSFUNCTION) \ - if (!_curl_is_progress_cb(value)) \ + if((_curl_opt) == CURLOPT_PROGRESSFUNCTION) \ + if(!_curl_is_progress_cb(value)) \ _curl_easy_setopt_err_progress_cb(); \ - if ((_curl_opt) == CURLOPT_DEBUGFUNCTION) \ - if (!_curl_is_debug_cb(value)) \ + if((_curl_opt) == CURLOPT_DEBUGFUNCTION) \ + if(!_curl_is_debug_cb(value)) \ _curl_easy_setopt_err_debug_cb(); \ - if ((_curl_opt) == CURLOPT_SSL_CTX_FUNCTION) \ - if (!_curl_is_ssl_ctx_cb(value)) \ + if((_curl_opt) == CURLOPT_SSL_CTX_FUNCTION) \ + if(!_curl_is_ssl_ctx_cb(value)) \ _curl_easy_setopt_err_ssl_ctx_cb(); \ - if (_curl_is_conv_cb_option(_curl_opt)) \ - if (!_curl_is_conv_cb(value)) \ + if(_curl_is_conv_cb_option(_curl_opt)) \ + if(!_curl_is_conv_cb(value)) \ _curl_easy_setopt_err_conv_cb(); \ - if ((_curl_opt) == CURLOPT_SEEKFUNCTION) \ - if (!_curl_is_seek_cb(value)) \ + if((_curl_opt) == CURLOPT_SEEKFUNCTION) \ + if(!_curl_is_seek_cb(value)) \ _curl_easy_setopt_err_seek_cb(); \ - if (_curl_is_cb_data_option(_curl_opt)) \ - if (!_curl_is_cb_data(value)) \ + if(_curl_is_cb_data_option(_curl_opt)) \ + if(!_curl_is_cb_data(value)) \ _curl_easy_setopt_err_cb_data(); \ - if ((_curl_opt) == CURLOPT_ERRORBUFFER) \ - if (!_curl_is_error_buffer(value)) \ + if((_curl_opt) == CURLOPT_ERRORBUFFER) \ + if(!_curl_is_error_buffer(value)) \ _curl_easy_setopt_err_error_buffer(); \ - if ((_curl_opt) == CURLOPT_STDERR) \ - if (!_curl_is_FILE(value)) \ + if((_curl_opt) == CURLOPT_STDERR) \ + if(!_curl_is_FILE(value)) \ _curl_easy_setopt_err_FILE(); \ - if (_curl_is_postfields_option(_curl_opt)) \ - if (!_curl_is_postfields(value)) \ + if(_curl_is_postfields_option(_curl_opt)) \ + if(!_curl_is_postfields(value)) \ _curl_easy_setopt_err_postfields(); \ - if ((_curl_opt) == CURLOPT_HTTPPOST) \ - if (!_curl_is_arr((value), struct curl_httppost)) \ + if((_curl_opt) == CURLOPT_HTTPPOST) \ + if(!_curl_is_arr((value), struct curl_httppost)) \ _curl_easy_setopt_err_curl_httpost(); \ - if (_curl_is_slist_option(_curl_opt)) \ - if (!_curl_is_arr((value), struct curl_slist)) \ + if(_curl_is_slist_option(_curl_opt)) \ + if(!_curl_is_arr((value), struct curl_slist)) \ _curl_easy_setopt_err_curl_slist(); \ - if ((_curl_opt) == CURLOPT_SHARE) \ - if (!_curl_is_ptr((value), CURLSH)) \ + if((_curl_opt) == CURLOPT_SHARE) \ + if(!_curl_is_ptr((value), CURLSH)) \ _curl_easy_setopt_err_CURLSH(); \ } \ curl_easy_setopt(handle, _curl_opt, value); \ @@ -111,18 +111,18 @@ __extension__ ({ \ #define curl_easy_getinfo(handle, info, arg) \ __extension__ ({ \ __typeof__ (info) _curl_info = info; \ - if (__builtin_constant_p(_curl_info)) { \ - if (_curl_is_string_info(_curl_info)) \ - if (!_curl_is_arr((arg), char *)) \ + if(__builtin_constant_p(_curl_info)) { \ + if(_curl_is_string_info(_curl_info)) \ + if(!_curl_is_arr((arg), char *)) \ _curl_easy_getinfo_err_string(); \ - if (_curl_is_long_info(_curl_info)) \ - if (!_curl_is_arr((arg), long)) \ + if(_curl_is_long_info(_curl_info)) \ + if(!_curl_is_arr((arg), long)) \ _curl_easy_getinfo_err_long(); \ - if (_curl_is_double_info(_curl_info)) \ - if (!_curl_is_arr((arg), double)) \ + if(_curl_is_double_info(_curl_info)) \ + if(!_curl_is_arr((arg), double)) \ _curl_easy_getinfo_err_double(); \ - if (_curl_is_slist_info(_curl_info)) \ - if (!_curl_is_arr((arg), struct curl_slist *)) \ + if(_curl_is_slist_info(_curl_info)) \ + if(!_curl_is_arr((arg), struct curl_slist *)) \ _curl_easy_getinfo_err_curl_slist(); \ } \ curl_easy_getinfo(handle, _curl_info, arg); \ @@ -149,7 +149,8 @@ _CURL_WARNING(_curl_easy_setopt_err_long, _CURL_WARNING(_curl_easy_setopt_err_curl_off_t, "curl_easy_setopt expects a curl_off_t argument for this option") _CURL_WARNING(_curl_easy_setopt_err_string, - "curl_easy_setopt expects a string (char* or char[]) argument for this option" + "curl_easy_setopt expects a " + "string (char* or char[]) argument for this option" ) _CURL_WARNING(_curl_easy_setopt_err_write_callback, "curl_easy_setopt expects a curl_write_callback argument for this option") @@ -160,7 +161,8 @@ _CURL_WARNING(_curl_easy_setopt_err_ioctl_cb, _CURL_WARNING(_curl_easy_setopt_err_sockopt_cb, "curl_easy_setopt expects a curl_sockopt_callback argument for this option") _CURL_WARNING(_curl_easy_setopt_err_opensocket_cb, - "curl_easy_setopt expects a curl_opensocket_callback argument for this option" + "curl_easy_setopt expects a " + "curl_opensocket_callback argument for this option" ) _CURL_WARNING(_curl_easy_setopt_err_progress_cb, "curl_easy_setopt expects a curl_progress_callback argument for this option") @@ -173,9 +175,11 @@ _CURL_WARNING(_curl_easy_setopt_err_conv_cb, _CURL_WARNING(_curl_easy_setopt_err_seek_cb, "curl_easy_setopt expects a curl_seek_callback argument for this option") _CURL_WARNING(_curl_easy_setopt_err_cb_data, - "curl_easy_setopt expects a private data pointer as argument for this option") + "curl_easy_setopt expects a " + "private data pointer as argument for this option") _CURL_WARNING(_curl_easy_setopt_err_error_buffer, - "curl_easy_setopt expects a char buffer of CURL_ERROR_SIZE as argument for this option") + "curl_easy_setopt expects a " + "char buffer of CURL_ERROR_SIZE as argument for this option") _CURL_WARNING(_curl_easy_setopt_err_FILE, "curl_easy_setopt expects a FILE* argument for this option") _CURL_WARNING(_curl_easy_setopt_err_postfields, @@ -481,7 +485,8 @@ typedef int (_curl_sockopt_callback1)(void *, curl_socket_t, curlsocktype); typedef int (_curl_sockopt_callback2)(const void *, curl_socket_t, curlsocktype); -/* evaluates to true if expr is of type curl_opensocket_callback or "similar" */ +/* evaluates to true if expr is of type curl_opensocket_callback or + "similar" */ #define _curl_is_opensocket_cb(expr) \ (_curl_is_NULL(expr) || \ __builtin_types_compatible_p(__typeof__(expr), curl_opensocket_callback) ||\ @@ -550,7 +555,8 @@ typedef CURLcode (_curl_ssl_ctx_callback4)(CURL *, const void *, const void *); typedef CURLcode (_curl_ssl_ctx_callback5)(CURL *, SSL_CTX, void *); typedef CURLcode (_curl_ssl_ctx_callback6)(CURL *, SSL_CTX, const void *); typedef CURLcode (_curl_ssl_ctx_callback7)(CURL *, const SSL_CTX, void *); -typedef CURLcode (_curl_ssl_ctx_callback8)(CURL *, const SSL_CTX, const void *); +typedef CURLcode (_curl_ssl_ctx_callback8)(CURL *, const SSL_CTX, + const void *); #else typedef _curl_ssl_ctx_callback1 _curl_ssl_ctx_callback5; typedef _curl_ssl_ctx_callback1 _curl_ssl_ctx_callback6; diff --git a/include/curl/types.h b/include/curl/types.h deleted file mode 100644 index d37d6ae9e..000000000 --- a/include/curl/types.h +++ /dev/null @@ -1 +0,0 @@ -/* not used */ -- cgit v1.2.1 From b5d170b55110bacc61a4aa8bf99df1afc303c5dc Mon Sep 17 00:00:00 2001 From: Daniel Stenberg Date: Mon, 16 May 2011 23:46:43 +0200 Subject: CLOSESOCKETFUNCTION: added Introduced the initial setup to allow closesocket callbacks by making sure sclose() is only ever called from one place in the libcurl source and still run all test cases fine. --- include/curl/curl.h | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'include') diff --git a/include/curl/curl.h b/include/curl/curl.h index 09f305466..e4fbfdf89 100644 --- a/include/curl/curl.h +++ b/include/curl/curl.h @@ -341,6 +341,9 @@ typedef curl_socket_t curlsocktype purpose, struct curl_sockaddr *address); +typedef void +(*curl_closesocket_callback)(void *clientp, curl_socket_t item); + typedef enum { CURLIOE_OK, /* I/O operation successful */ CURLIOE_UNKNOWNCMD, /* command was unknown to callback */ @@ -1475,6 +1478,11 @@ typedef enum { */ CINIT(TRANSFER_ENCODING, LONG, 207), + /* Callback function for closing socket (instead of close(2)). The callback + should have type curl_closesocket_callback */ + CINIT(CLOSESOCKETFUNCTION, FUNCTIONPOINT, 208), + CINIT(CLOSESOCKETDATA, OBJECTPOINT, 209), + CURLOPT_LASTENTRY /* the last unused */ } CURLoption; -- cgit v1.2.1 From 60f0ebbdc9fbddccaa4e2fcd1dce3d3a05f234ed Mon Sep 17 00:00:00 2001 From: Daniel Stenberg Date: Mon, 16 May 2011 23:52:15 +0200 Subject: CLOSESOCKETFUNCTION: use the callback Fix the return type of the callback to match close() and make use of it. --- include/curl/curl.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'include') diff --git a/include/curl/curl.h b/include/curl/curl.h index e4fbfdf89..a9d42fad6 100644 --- a/include/curl/curl.h +++ b/include/curl/curl.h @@ -341,7 +341,7 @@ typedef curl_socket_t curlsocktype purpose, struct curl_sockaddr *address); -typedef void +typedef int (*curl_closesocket_callback)(void *clientp, curl_socket_t item); typedef enum { -- cgit v1.2.1 From 67f28662e1dbb3cf65e5eb5d920fc9a2cc64bb26 Mon Sep 17 00:00:00 2001 From: Daniel Stenberg Date: Thu, 23 Jun 2011 13:02:47 +0200 Subject: bump release: start working towards 7.21.8 --- include/curl/curlver.h | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'include') diff --git a/include/curl/curlver.h b/include/curl/curlver.h index 7b86889c2..5fe5c2d73 100644 --- a/include/curl/curlver.h +++ b/include/curl/curlver.h @@ -30,13 +30,13 @@ /* This is the version number of the libcurl package from which this header file origins: */ -#define LIBCURL_VERSION "7.21.7-DEV" +#define LIBCURL_VERSION "7.21.8-DEV" /* The numeric version number is also available "in parts" by using these defines: */ #define LIBCURL_VERSION_MAJOR 7 #define LIBCURL_VERSION_MINOR 21 -#define LIBCURL_VERSION_PATCH 7 +#define LIBCURL_VERSION_PATCH 8 /* This is the numeric version of the libcurl version number, meant for easier parsing and comparions by programs. The LIBCURL_VERSION_NUM define will @@ -53,7 +53,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 0x071507 +#define LIBCURL_VERSION_NUM 0x071508 /* * This is the date and time when the full source package was created. The -- cgit v1.2.1 From a6d4807d028eb82f4a99587b0a8851727ca88566 Mon Sep 17 00:00:00 2001 From: Mandy Wu Date: Mon, 18 Jul 2011 23:36:36 +0200 Subject: NTLM single-sign on supported With the use of the 'ntlm_auth' tool from the Samba project --- include/curl/curl.h | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'include') diff --git a/include/curl/curl.h b/include/curl/curl.h index a9d42fad6..998c109b9 100644 --- a/include/curl/curl.h +++ b/include/curl/curl.h @@ -600,6 +600,7 @@ typedef enum { #define CURLAUTH_GSSNEGOTIATE (1<<2) /* GSS-Negotiate */ #define CURLAUTH_NTLM (1<<3) /* NTLM */ #define CURLAUTH_DIGEST_IE (1<<4) /* Digest with IE flavour */ +#define CURLAUTH_NTLM_SSO (1<<5) /* NTLM single-sign-on */ #define CURLAUTH_ONLY (1<<31) /* used together with a single other type to force no auth or just that single type */ @@ -2092,8 +2093,9 @@ typedef struct { #define CURL_VERSION_CONV (1<<12) /* character conversions supported */ #define CURL_VERSION_CURLDEBUG (1<<13) /* debug memory tracking supported */ #define CURL_VERSION_TLSAUTH_SRP (1<<14) /* TLS-SRP auth is supported */ - -/* +#define CURL_VERSION_NTLM_SSO (1<<15) /* NTLM single-sign-on is supported + by using ntlm_auth */ + /* * NAME curl_version_info() * * DESCRIPTION -- cgit v1.2.1 From ebf42c4be76df40ec6d3bf32f229bbb274e2c32f Mon Sep 17 00:00:00 2001 From: Adam Tkac Date: Tue, 19 Jul 2011 19:10:43 +0200 Subject: Add new CURLOPT_GSSAPI_DELEGATION option. Curl_gss_init_sec_context got new parameter - SessionHandle. Signed-off-by: Adam Tkac --- include/curl/curl.h | 3 +++ 1 file changed, 3 insertions(+) (limited to 'include') diff --git a/include/curl/curl.h b/include/curl/curl.h index 998c109b9..3a510e58e 100644 --- a/include/curl/curl.h +++ b/include/curl/curl.h @@ -1484,6 +1484,9 @@ typedef enum { CINIT(CLOSESOCKETFUNCTION, FUNCTIONPOINT, 208), CINIT(CLOSESOCKETDATA, OBJECTPOINT, 209), + /* allow GSSAPI credential delegation */ + CINIT(GSSAPI_DELEGATION, LONG, 210), + CURLOPT_LASTENTRY /* the last unused */ } CURLoption; -- cgit v1.2.1 From a7864c41db6ac12a1b67f2646f837174f75a240b Mon Sep 17 00:00:00 2001 From: Kamil Dudka Date: Mon, 25 Jul 2011 11:49:26 +0200 Subject: curl_gssapi: refine the handling of CURLOPT_GSSAPI_DELEGATION Suggested by Richard Silverman. --- include/curl/curl.h | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'include') diff --git a/include/curl/curl.h b/include/curl/curl.h index 3a510e58e..0dc934bfb 100644 --- a/include/curl/curl.h +++ b/include/curl/curl.h @@ -615,6 +615,10 @@ typedef enum { #define CURLSSH_AUTH_KEYBOARD (1<<3) /* keyboard interactive */ #define CURLSSH_AUTH_DEFAULT CURLSSH_AUTH_ANY +#define CURLGSSAPI_DELEGATION_NONE 0 /* no delegation (default) */ +#define CURLGSSAPI_DELEGATION_POLICY_FLAG (1<<0) /* if permitted by policy */ +#define CURLGSSAPI_DELEGATION_FLAG (1<<1) /* delegate always */ + #define CURL_ERROR_SIZE 256 struct curl_khkey { -- cgit v1.2.1 From b56bbabee0b49abef4d163b203f6e2e4f6651066 Mon Sep 17 00:00:00 2001 From: Yang Tse Date: Thu, 4 Aug 2011 20:47:31 +0200 Subject: curl.h: untangle a preprocessor block, removing duplicate sys/types.h inclusion --- include/curl/curl.h | 12 +++++------- 1 file changed, 5 insertions(+), 7 deletions(-) (limited to 'include') diff --git a/include/curl/curl.h b/include/curl/curl.h index 0dc934bfb..ab64fe25a 100644 --- a/include/curl/curl.h +++ b/include/curl/curl.h @@ -55,18 +55,17 @@ #include #include -#if defined(WIN32) && !defined(_WIN32_WCE) && !defined(__GNUC__) && \ - !defined(__CYGWIN__) || defined(__MINGW32__) +#if defined(WIN32) && !defined(_WIN32_WCE) && !defined(__CYGWIN__) #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 +#endif /* 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 + libc5-based Linux systems. Only include it on systems that are known to require it! */ #if defined(_AIX) || defined(__NOVELL_LIBC__) || defined(__NetBSD__) || \ defined(__minix) || defined(__SYMBIAN32__) || defined(__INTEGRITY) || \ @@ -75,14 +74,13 @@ #include #endif -#ifndef _WIN32_WCE +#if !defined(WIN32) && !defined(_WIN32_WCE) #include #endif + #if !defined(WIN32) && !defined(__WATCOMC__) && !defined(__VXWORKS__) #include #endif -#include -#endif #ifdef __BEOS__ #include -- cgit v1.2.1 From a6ed2b8426675115d6d29bfec4d8597cf715b33c Mon Sep 17 00:00:00 2001 From: Yang Tse Date: Thu, 4 Aug 2011 21:27:29 +0200 Subject: BSD-style lwIP TCP/IP stack support: Allow compilation of libcurl and curl using BSD-style lwIP on Win32. In order to compile libcurl and curl with this support it is necessary to edit files lib/config-win32.h and src/config-win32.h and uncomment a line to make definition of preprocessor symbol USE_LWIPSOCK visible. Afterwards you can compile as usual. In order to use compiled library with BSD-style lwIP TCP/IP stack in your program it is mandatory that you include lwIP header file before including or Compilation has been verified with lwIP 1.4.0 and contrib-1.4.0 from: http://download.savannah.gnu.org/releases/lwip/lwip-1.4.0.zip http://download.savannah.gnu.org/releases/lwip/contrib-1.4.0.zip Have fun! --- include/curl/curl.h | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'include') diff --git a/include/curl/curl.h b/include/curl/curl.h index ab64fe25a..b4330a8be 100644 --- a/include/curl/curl.h +++ b/include/curl/curl.h @@ -56,7 +56,7 @@ #include #if defined(WIN32) && !defined(_WIN32_WCE) && !defined(__CYGWIN__) -#if !(defined(_WINSOCKAPI_) || defined(_WINSOCK_H)) +#if !(defined(_WINSOCKAPI_) || defined(_WINSOCK_H) || defined(__LWIP_OPT_H__)) /* The check above prevents the winsock2 inclusion if winsock.h already was included, since they can't co-exist without problems */ #include @@ -78,6 +78,10 @@ #include #endif +#if defined(__LWIP_OPT_H__) +#include +#endif + #if !defined(WIN32) && !defined(__WATCOMC__) && !defined(__VXWORKS__) #include #endif -- cgit v1.2.1 From f6272dd9b8ae8d188068aeb0df2af496a964e407 Mon Sep 17 00:00:00 2001 From: Yang Tse Date: Fri, 5 Aug 2011 15:42:05 +0200 Subject: BSD-style lwIP TCP/IP stack support - followup --- include/curl/curl.h | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) (limited to 'include') diff --git a/include/curl/curl.h b/include/curl/curl.h index b4330a8be..c31918728 100644 --- a/include/curl/curl.h +++ b/include/curl/curl.h @@ -78,10 +78,6 @@ #include #endif -#if defined(__LWIP_OPT_H__) -#include -#endif - #if !defined(WIN32) && !defined(__WATCOMC__) && !defined(__VXWORKS__) #include #endif @@ -124,7 +120,7 @@ typedef void CURL; #ifndef curl_socket_typedef /* socket typedef */ -#ifdef WIN32 +#if defined(WIN32) && !defined(__LWIP_OPT_H__) typedef SOCKET curl_socket_t; #define CURL_SOCKET_BAD INVALID_SOCKET #else -- cgit v1.2.1 From 56a0635216fbde5a50bf4776acaebf22f94f9778 Mon Sep 17 00:00:00 2001 From: Daniel Stenberg Date: Mon, 8 Aug 2011 09:27:53 +0200 Subject: version bump: next release is 7.22.0 --- include/curl/curlver.h | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'include') diff --git a/include/curl/curlver.h b/include/curl/curlver.h index 5fe5c2d73..a4675cc43 100644 --- a/include/curl/curlver.h +++ b/include/curl/curlver.h @@ -30,13 +30,13 @@ /* This is the version number of the libcurl package from which this header file origins: */ -#define LIBCURL_VERSION "7.21.8-DEV" +#define LIBCURL_VERSION "7.22.0-DEV" /* The numeric version number is also available "in parts" by using these defines: */ #define LIBCURL_VERSION_MAJOR 7 -#define LIBCURL_VERSION_MINOR 21 -#define LIBCURL_VERSION_PATCH 8 +#define LIBCURL_VERSION_MINOR 22 +#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 @@ -53,7 +53,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 0x071508 +#define LIBCURL_VERSION_NUM 0x071600 /* * This is the date and time when the full source package was created. The -- cgit v1.2.1 From f8831d55e0a6f9c2cb21c4e37b30fd62af9f5b20 Mon Sep 17 00:00:00 2001 From: Daniel Stenberg Date: Tue, 9 Aug 2011 10:46:02 +0200 Subject: curl.h: mark deprecated CURLOPT_ options on same line This is to aid easier machine parsing and to make sure nobody who reads these header lines can miss the info. --- include/curl/curl.h | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) (limited to 'include') diff --git a/include/curl/curl.h b/include/curl/curl.h index c31918728..2de5bfb05 100644 --- a/include/curl/curl.h +++ b/include/curl/curl.h @@ -919,9 +919,7 @@ typedef enum { /* send linked-list of post-transfer QUOTE commands */ CINIT(POSTQUOTE, OBJECTPOINT, 39), - /* Pass a pointer to string of the output using full variable-replacement - as described elsewhere. */ - CINIT(WRITEINFO, OBJECTPOINT, 40), + CINIT(WRITEINFO, OBJECTPOINT, 40), /* DEPRECATED, do not use! */ CINIT(VERBOSE, LONG, 41), /* talk a lot */ CINIT(HEADER, LONG, 42), /* throw the header out too */ @@ -997,8 +995,7 @@ typedef enum { /* Max amount of cached alive connections */ CINIT(MAXCONNECTS, LONG, 71), - /* 72 - DEPRECATED */ - CINIT(CLOSEPOLICY, LONG, 72), + CINIT(CLOSEPOLICY, LONG, 72), /* DEPRECATED, do not use! */ /* 73 = OBSOLETE */ @@ -1072,7 +1069,7 @@ typedef enum { CINIT(SSLENGINE_DEFAULT, LONG, 90), /* Non-zero value means to use the global dns cache */ - CINIT(DNS_USE_GLOBAL_CACHE, LONG, 91), /* To become OBSOLETE soon */ + CINIT(DNS_USE_GLOBAL_CACHE, LONG, 91), /* DEPRECATED, do not use! */ /* DNS cache timeout */ CINIT(DNS_CACHE_TIMEOUT, LONG, 92), -- cgit v1.2.1 From 407e08baad45b060e3fa1387190a8b12aca9ab60 Mon Sep 17 00:00:00 2001 From: Yang Tse Date: Fri, 26 Aug 2011 18:57:50 +0200 Subject: NTLM single-sign on adjustments (X) Functions renamed: Curl_output_ntlm_sso -> Curl_output_ntlm_wb sso_ntlm_close -> wb_ntlm_close sso_ntlm_response -> wb_ntlm_response sso_ntlm_initiate -> wb_ntlm_initiate Preprocessor symbols renamed: CURLAUTH_NTLM_SSO -> CURLAUTH_NTLM_WB CURL_VERSION_NTLM_SSO -> CURL_VERSION_NTLM_WB --- include/curl/curl.h | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'include') diff --git a/include/curl/curl.h b/include/curl/curl.h index 2de5bfb05..ef6bda8f3 100644 --- a/include/curl/curl.h +++ b/include/curl/curl.h @@ -598,7 +598,7 @@ typedef enum { #define CURLAUTH_GSSNEGOTIATE (1<<2) /* GSS-Negotiate */ #define CURLAUTH_NTLM (1<<3) /* NTLM */ #define CURLAUTH_DIGEST_IE (1<<4) /* Digest with IE flavour */ -#define CURLAUTH_NTLM_SSO (1<<5) /* NTLM single-sign-on */ +#define CURLAUTH_NTLM_WB (1<<5) /* NTLM delegating to winbind helper */ #define CURLAUTH_ONLY (1<<31) /* used together with a single other type to force no auth or just that single type */ @@ -2095,8 +2095,8 @@ typedef struct { #define CURL_VERSION_CONV (1<<12) /* character conversions supported */ #define CURL_VERSION_CURLDEBUG (1<<13) /* debug memory tracking supported */ #define CURL_VERSION_TLSAUTH_SRP (1<<14) /* TLS-SRP auth is supported */ -#define CURL_VERSION_NTLM_SSO (1<<15) /* NTLM single-sign-on is supported - by using ntlm_auth */ +#define CURL_VERSION_NTLM_WB (1<<15) /* NTLM delegating to winbind helper */ + /* * NAME curl_version_info() * -- cgit v1.2.1 From 2411adb40bad8717d1da542bdff5e22cf2ae1a2b Mon Sep 17 00:00:00 2001 From: Daniel Stenberg Date: Tue, 13 Sep 2011 20:04:03 +0200 Subject: 7.22.1: start working --- include/curl/curlver.h | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'include') diff --git a/include/curl/curlver.h b/include/curl/curlver.h index a4675cc43..b190710e0 100644 --- a/include/curl/curlver.h +++ b/include/curl/curlver.h @@ -30,13 +30,13 @@ /* This is the version number of the libcurl package from which this header file origins: */ -#define LIBCURL_VERSION "7.22.0-DEV" +#define LIBCURL_VERSION "7.22.1-DEV" /* The numeric version number is also available "in parts" by using these defines: */ #define LIBCURL_VERSION_MAJOR 7 #define LIBCURL_VERSION_MINOR 22 -#define LIBCURL_VERSION_PATCH 0 +#define LIBCURL_VERSION_PATCH 1 /* This is the numeric version of the libcurl version number, meant for easier parsing and comparions by programs. The LIBCURL_VERSION_NUM define will @@ -53,7 +53,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 0x071600 +#define LIBCURL_VERSION_NUM 0x071601 /* * This is the date and time when the full source package was created. The -- cgit v1.2.1 From 119f43360b60c903982104944145d9cd8b7ec054 Mon Sep 17 00:00:00 2001 From: Yang Tse Date: Sun, 25 Sep 2011 18:53:29 +0200 Subject: allow write callbacks to indicate OOM to libcurl Allow (*curl_write_callback) write callbacks to return CURL_WRITEFUNC_OUT_OF_MEMORY to properly indicate libcurl of OOM conditions inside the callback itself. --- include/curl/curl.h | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) (limited to 'include') diff --git a/include/curl/curl.h b/include/curl/curl.h index ef6bda8f3..4f0182616 100644 --- a/include/curl/curl.h +++ b/include/curl/curl.h @@ -187,10 +187,15 @@ typedef int (*curl_progress_callback)(void *clientp, #define CURL_MAX_HTTP_HEADER (100*1024) #endif - /* This is a magic return code for the write callback that, when returned, will signal libcurl to pause receiving on the current transfer. */ #define CURL_WRITEFUNC_PAUSE 0x10000001 + +/* If the write callback itself allocates memory dynamically and this fails + due to an out of memory condition, returning CURL_WRITEFUNC_OUT_OF_MEMORY + is the proper way to tell libcurl of this condition. */ +#define CURL_WRITEFUNC_OUT_OF_MEMORY 0x10000002 + typedef size_t (*curl_write_callback)(char *buffer, size_t size, size_t nitems, -- cgit v1.2.1 From a1087db5c61c7cc1e8bae09d2abc65a88d1826cf Mon Sep 17 00:00:00 2001 From: Guenter Knauf Date: Mon, 26 Sep 2011 12:42:15 +0200 Subject: Added unsigned char* to _curl_is_debug_cb. --- include/curl/typecheck-gcc.h | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) (limited to 'include') diff --git a/include/curl/typecheck-gcc.h b/include/curl/typecheck-gcc.h index f043a18e4..4e00ca9a4 100644 --- a/include/curl/typecheck-gcc.h +++ b/include/curl/typecheck-gcc.h @@ -521,7 +521,11 @@ typedef int (_curl_progress_callback2)(const void *, _curl_callback_compatible((expr), _curl_debug_callback1) || \ _curl_callback_compatible((expr), _curl_debug_callback2) || \ _curl_callback_compatible((expr), _curl_debug_callback3) || \ - _curl_callback_compatible((expr), _curl_debug_callback4)) + _curl_callback_compatible((expr), _curl_debug_callback4) || \ + _curl_callback_compatible((expr), _curl_debug_callback5) || \ + _curl_callback_compatible((expr), _curl_debug_callback6) || \ + _curl_callback_compatible((expr), _curl_debug_callback7) || \ + _curl_callback_compatible((expr), _curl_debug_callback8)) typedef int (_curl_debug_callback1) (CURL *, curl_infotype, char *, size_t, void *); typedef int (_curl_debug_callback2) (CURL *, @@ -530,6 +534,14 @@ typedef int (_curl_debug_callback3) (CURL *, curl_infotype, const char *, size_t, void *); typedef int (_curl_debug_callback4) (CURL *, curl_infotype, const char *, size_t, const void *); +typedef int (_curl_debug_callback5) (CURL *, + curl_infotype, unsigned char *, size_t, void *); +typedef int (_curl_debug_callback6) (CURL *, + curl_infotype, unsigned char *, size_t, const void *); +typedef int (_curl_debug_callback7) (CURL *, + curl_infotype, const unsigned char *, size_t, void *); +typedef int (_curl_debug_callback8) (CURL *, + curl_infotype, const unsigned char *, size_t, const void *); /* evaluates to true if expr is of type curl_ssl_ctx_callback or "similar" */ /* this is getting even messier... */ -- cgit v1.2.1 From d9f686db88cc6ed01af8f7d690a9e44b7dcfb6ee Mon Sep 17 00:00:00 2001 From: Yang Tse Date: Mon, 26 Sep 2011 03:18:51 +0200 Subject: remove short-lived CURL_WRITEFUNC_OUT_OF_MEMORY --- include/curl/curl.h | 5 ----- 1 file changed, 5 deletions(-) (limited to 'include') diff --git a/include/curl/curl.h b/include/curl/curl.h index 4f0182616..062f788a3 100644 --- a/include/curl/curl.h +++ b/include/curl/curl.h @@ -191,11 +191,6 @@ typedef int (*curl_progress_callback)(void *clientp, will signal libcurl to pause receiving on the current transfer. */ #define CURL_WRITEFUNC_PAUSE 0x10000001 -/* If the write callback itself allocates memory dynamically and this fails - due to an out of memory condition, returning CURL_WRITEFUNC_OUT_OF_MEMORY - is the proper way to tell libcurl of this condition. */ -#define CURL_WRITEFUNC_OUT_OF_MEMORY 0x10000002 - typedef size_t (*curl_write_callback)(char *buffer, size_t size, size_t nitems, -- cgit v1.2.1 From e709cc8627ef3e0a8b00362f7d85ea71024b944d Mon Sep 17 00:00:00 2001 From: Daniel Stenberg Date: Thu, 29 Sep 2011 08:52:47 +0200 Subject: curlverh.h: next release will be 7.23.0 --- include/curl/curlver.h | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'include') diff --git a/include/curl/curlver.h b/include/curl/curlver.h index b190710e0..33d069f83 100644 --- a/include/curl/curlver.h +++ b/include/curl/curlver.h @@ -30,13 +30,13 @@ /* This is the version number of the libcurl package from which this header file origins: */ -#define LIBCURL_VERSION "7.22.1-DEV" +#define LIBCURL_VERSION "7.23.0-DEV" /* The numeric version number is also available "in parts" by using these defines: */ #define LIBCURL_VERSION_MAJOR 7 -#define LIBCURL_VERSION_MINOR 22 -#define LIBCURL_VERSION_PATCH 1 +#define LIBCURL_VERSION_MINOR 23 +#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 @@ -53,7 +53,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 0x071601 +#define LIBCURL_VERSION_NUM 0x071700 /* * This is the date and time when the full source package was created. The -- cgit v1.2.1 From 15e3e451702396e870c00d186ff7710792a1f28e Mon Sep 17 00:00:00 2001 From: Daniel Stenberg Date: Mon, 3 Oct 2011 22:32:36 +0200 Subject: share: don't use SSL unless enabled Don't even declare the struct members for disabled features Introducing the CURLSHE_NOT_BUILT_IN return code for the share interface when trying to set a sharing option that has been disabled (or not enabled) in the library. --- include/curl/curl.h | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'include') diff --git a/include/curl/curl.h b/include/curl/curl.h index 062f788a3..f4aa17fdd 100644 --- a/include/curl/curl.h +++ b/include/curl/curl.h @@ -2014,8 +2014,9 @@ typedef enum { CURLSHE_BAD_OPTION, /* 1 */ CURLSHE_IN_USE, /* 2 */ CURLSHE_INVALID, /* 3 */ - CURLSHE_NOMEM, /* out of memory */ - CURLSHE_LAST /* never use */ + CURLSHE_NOMEM, /* 4 out of memory */ + CURLSHE_NOT_BUILT_IN, /* 5 feature not present in lib */ + CURLSHE_LAST /* never use */ } CURLSHcode; typedef enum { -- cgit v1.2.1 From 62bcf005f4678a93158358265ba905bace33b834 Mon Sep 17 00:00:00 2001 From: Dave Reisner Date: Tue, 11 Oct 2011 03:24:40 +0200 Subject: typecheck: allow NULL to unset CURLOPT_ERRORBUFFER There might be situations where a user would want to unset this option. Avoid forcing him/her to cast the NULL argument to (char *) in order to get past the compile time typecheck. --- include/curl/typecheck-gcc.h | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'include') diff --git a/include/curl/typecheck-gcc.h b/include/curl/typecheck-gcc.h index 4e00ca9a4..5c584b002 100644 --- a/include/curl/typecheck-gcc.h +++ b/include/curl/typecheck-gcc.h @@ -392,7 +392,8 @@ _CURL_WARNING(_curl_easy_getinfo_err_curl_slist, /* evaluates to true if expr is abuffer suitable for CURLOPT_ERRORBUFFER */ /* XXX: also check size of an char[] array? */ #define _curl_is_error_buffer(expr) \ - (__builtin_types_compatible_p(__typeof__(expr), char *) || \ + (_curl_is_NULL(expr) || \ + __builtin_types_compatible_p(__typeof__(expr), char *) || \ __builtin_types_compatible_p(__typeof__(expr), char[])) /* evaluates to true if expr is of type (const) void* or (const) FILE* */ -- cgit v1.2.1 From 5e0aa3aac95662c3318f4e7d11f67ebc8566601c Mon Sep 17 00:00:00 2001 From: Daniel Stenberg Date: Tue, 15 Nov 2011 20:44:49 +0100 Subject: 7.24.0: start the work --- include/curl/curlver.h | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'include') diff --git a/include/curl/curlver.h b/include/curl/curlver.h index 33d069f83..bc6ca64ca 100644 --- a/include/curl/curlver.h +++ b/include/curl/curlver.h @@ -30,12 +30,12 @@ /* This is the version number of the libcurl package from which this header file origins: */ -#define LIBCURL_VERSION "7.23.0-DEV" +#define LIBCURL_VERSION "7.24.0-DEV" /* The numeric version number is also available "in parts" by using these defines: */ #define LIBCURL_VERSION_MAJOR 7 -#define LIBCURL_VERSION_MINOR 23 +#define LIBCURL_VERSION_MINOR 24 #define LIBCURL_VERSION_PATCH 0 /* This is the numeric version of the libcurl version number, meant for easier @@ -53,7 +53,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 0x071700 +#define LIBCURL_VERSION_NUM 0x071800 /* * This is the date and time when the full source package was created. The -- cgit v1.2.1 From 8d0a504f0d34c2471393ef23fb2345c73c5d4746 Mon Sep 17 00:00:00 2001 From: Jason Glasgow Date: Tue, 12 Apr 2011 11:34:28 -0400 Subject: CURLOPT_DNS_SERVERS: set name servers if possible --- include/curl/curl.h | 3 +++ 1 file changed, 3 insertions(+) (limited to 'include') diff --git a/include/curl/curl.h b/include/curl/curl.h index f4aa17fdd..8f823486a 100644 --- a/include/curl/curl.h +++ b/include/curl/curl.h @@ -1486,6 +1486,9 @@ typedef enum { /* allow GSSAPI credential delegation */ CINIT(GSSAPI_DELEGATION, LONG, 210), + /* Set the name servers to use for DNS resolution */ + CINIT(DNS_SERVERS, OBJECTPOINT, 211), + CURLOPT_LASTENTRY /* the last unused */ } CURLoption; -- cgit v1.2.1 From bedfafe38e93677a72e9cd52fa60c4bc72bc5e01 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ce=CC=81dric=20Deltheil?= Date: Tue, 20 Dec 2011 12:23:11 +0100 Subject: curl.h: add __ANDROID__ macro check When working with the Android Standalone Toolchain the compiler defines this macro: /path/to/arm-linux-androideabi-gcc -E -dM - < /dev/null \ | grep -i android #define __ANDROID__ 1 We really need to check both ANDROID and __ANDROID__ since I've observed that: * if you use Android.mk file(s) and the 'ndk-build' script (aka vanilla way), ANDROID is predefined (see -DANDROID extra C flag), * if you use the Android Standalone Toolchain, then __ANDROID__ is predefined as stated by the compiler --- include/curl/curl.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'include') diff --git a/include/curl/curl.h b/include/curl/curl.h index 8f823486a..1e908a3ec 100644 --- a/include/curl/curl.h +++ b/include/curl/curl.h @@ -69,7 +69,7 @@ require it! */ #if defined(_AIX) || defined(__NOVELL_LIBC__) || defined(__NetBSD__) || \ defined(__minix) || defined(__SYMBIAN32__) || defined(__INTEGRITY) || \ - defined(ANDROID) || \ + defined(ANDROID) || defined(__ANDROID__) || \ (defined(__FreeBSD_version) && (__FreeBSD_version < 800000)) #include #endif -- cgit v1.2.1 From c834213ad52c52431e9ca597862dc81839cabe84 Mon Sep 17 00:00:00 2001 From: Gokhan Sengun Date: Mon, 19 Dec 2011 14:35:20 +0100 Subject: FTP: perform active connections non-blocking 1- Two new error codes are introduced. CURLE_FTP_ACCEPT_FAILED to be set whenever ACCEPTing fails because of FTP server connected. CURLE_FTP_ACCEPT_TIMEOUT to be set whenever ACCEPTing timeouts. Neither of these errors are considered fatal and control connection remains OK because it could just be a firewall blocking server to connect to the client. 2- One new setopt option was introduced. CURLOPT_ACCEPTTIMEOUT_MS It sets the maximum amount of time FTP client is going to wait for a server to connect. Internal default accept timeout is 60 seconds. --- include/curl/curl.h | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) (limited to 'include') diff --git a/include/curl/curl.h b/include/curl/curl.h index 1e908a3ec..f53d6d446 100644 --- a/include/curl/curl.h +++ b/include/curl/curl.h @@ -411,9 +411,12 @@ typedef enum { CURLE_REMOTE_ACCESS_DENIED, /* 9 a service was denied by the server due to lack of access - when login fails this is not returned. */ - CURLE_OBSOLETE10, /* 10 - NOT USED */ + CURLE_FTP_ACCEPT_FAILED, /* 10 - [was obsoleted in April 2006 for + 7.15.4, reused in Dec 2011 for 7.24.0]*/ CURLE_FTP_WEIRD_PASS_REPLY, /* 11 */ - CURLE_OBSOLETE12, /* 12 - NOT USED */ + CURLE_FTP_ACCEPT_TIMEOUT, /* 12 - timeout occurred accepting server + [was obsoleted in August 2007 for 7.17.0, + reused in Dec 2011 for 7.24.0]*/ CURLE_FTP_WEIRD_PASV_REPLY, /* 13 */ CURLE_FTP_WEIRD_227_FORMAT, /* 14 */ CURLE_FTP_CANT_GET_HOST, /* 15 */ @@ -511,7 +514,6 @@ typedef enum { CURLE_RTSP_SESSION_ERROR, /* 86 - mismatch of RTSP Session Ids */ CURLE_FTP_BAD_FILE_LIST, /* 87 - unable to parse FTP file list */ CURLE_CHUNK_FAILED, /* 88 - chunk callback reported error */ - CURL_LAST /* never use! */ } CURLcode; @@ -1489,6 +1491,10 @@ typedef enum { /* Set the name servers to use for DNS resolution */ CINIT(DNS_SERVERS, OBJECTPOINT, 211), + /* Time-out accept operations (currently for FTP only) after this amount + of miliseconds. */ + CINIT(ACCEPTTIMEOUT_MS, LONG, 212), + CURLOPT_LASTENTRY /* the last unused */ } CURLoption; -- cgit v1.2.1 From 52824ed1ab80d20941aa7fecd727000d83cdf47c Mon Sep 17 00:00:00 2001 From: Daniel Stenberg Date: Thu, 5 Jan 2012 19:57:39 +0100 Subject: curl.h: provide backwards compatible symbols In commit c834213ad52 we re-used some obsolete error codes, and here are two defines that makes sure existing source codes that happen to use any of these deprecated ones will still compile. As usual, define CURL_NO_OLDIES to avoid getting these "precaution defines". --- include/curl/curl.h | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'include') diff --git a/include/curl/curl.h b/include/curl/curl.h index f53d6d446..59a5c796a 100644 --- a/include/curl/curl.h +++ b/include/curl/curl.h @@ -7,7 +7,7 @@ * | (__| |_| | _ <| |___ * \___|\___/|_| \_\_____| * - * Copyright (C) 1998 - 2011, Daniel Stenberg, , et al. + * Copyright (C) 1998 - 2012, 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 @@ -520,6 +520,10 @@ typedef enum { #ifndef CURL_NO_OLDIES /* define this to test if your app builds with all the obsolete stuff removed! */ +/* Previously obsoletes error codes re-used in 7.24.0 */ +#define CURLE_OBSOLETE10 CURLE_FTP_ACCEPT_FAILED +#define CURLE_OBSOLETE12 CURLE_FTP_ACCEPT_TIMEOUT + /* compatibility with older names */ #define CURLOPT_ENCODING CURLOPT_ACCEPT_ENCODING -- cgit v1.2.1 From 93e344bbf49a970d5c0a4d6d7393e44e6e4f3e5b Mon Sep 17 00:00:00 2001 From: Yang Tse Date: Wed, 25 Jan 2012 11:27:39 +0100 Subject: version: start working on 7.24.1-DEV --- include/curl/curlver.h | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'include') diff --git a/include/curl/curlver.h b/include/curl/curlver.h index bc6ca64ca..0c0d9bd29 100644 --- a/include/curl/curlver.h +++ b/include/curl/curlver.h @@ -7,7 +7,7 @@ * | (__| |_| | _ <| |___ * \___|\___/|_| \_\_____| * - * Copyright (C) 1998 - 2011, Daniel Stenberg, , et al. + * Copyright (C) 1998 - 2012, 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 @@ -30,13 +30,13 @@ /* This is the version number of the libcurl package from which this header file origins: */ -#define LIBCURL_VERSION "7.24.0-DEV" +#define LIBCURL_VERSION "7.24.1-DEV" /* The numeric version number is also available "in parts" by using these defines: */ #define LIBCURL_VERSION_MAJOR 7 #define LIBCURL_VERSION_MINOR 24 -#define LIBCURL_VERSION_PATCH 0 +#define LIBCURL_VERSION_PATCH 1 /* This is the numeric version of the libcurl version number, meant for easier parsing and comparions by programs. The LIBCURL_VERSION_NUM define will @@ -53,7 +53,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 0x071800 +#define LIBCURL_VERSION_NUM 0x071801 /* * This is the date and time when the full source package was created. The -- cgit v1.2.1 From 705f0f7a5b6120bb783d139c9266b285a4c8acd8 Mon Sep 17 00:00:00 2001 From: Dave Reisner Date: Tue, 24 Jan 2012 01:28:06 +0000 Subject: add library support for tuning TCP_KEEPALIVE This adds three new options to control the behavior of TCP keepalives: - CURLOPT_TCP_KEEPALIVE: enable/disable probes - CURLOPT_TCP_KEEPIDLE: idle time before sending first probe - CURLOPT_TCP_KEEPINTVL: delay between successive probes While not all operating systems support the TCP_KEEPIDLE and TCP_KEEPINTVL knobs, the library will still allow these options to be set by clients, silently ignoring the values. --- include/curl/curl.h | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'include') diff --git a/include/curl/curl.h b/include/curl/curl.h index 59a5c796a..2a9957e9c 100644 --- a/include/curl/curl.h +++ b/include/curl/curl.h @@ -1499,6 +1499,13 @@ typedef enum { of miliseconds. */ CINIT(ACCEPTTIMEOUT_MS, LONG, 212), + /* Set TCP keepalive */ + CINIT(TCP_KEEPALIVE, LONG, 213), + + /* non-universal keepalive knobs (Linux, AIX, HP-UX, more) */ + CINIT(TCP_KEEPIDLE, LONG, 214), + CINIT(TCP_KEEPINTVL, LONG, 215), + CURLOPT_LASTENTRY /* the last unused */ } CURLoption; -- cgit v1.2.1 From 2a699bc6e94b8223d900e8880ad628aebf17ab6d Mon Sep 17 00:00:00 2001 From: Daniel Stenberg Date: Mon, 6 Feb 2012 22:12:06 +0100 Subject: CURLOPT_SSL_OPTIONS: added Allow an appliction to set libcurl specific SSL options. The first and only options supported right now is CURLSSLOPT_ALLOW_BEAST. It will make libcurl to disable any work-arounds the underlying SSL library may have to address a known security flaw in the SSL3 and TLS1.0 protocol versions. This is a reaction to us unconditionally removing that behavior after this security advisory: http://curl.haxx.se/docs/adv_20120124B.html ... it did however cause a lot of programs to fail because of old servers not liking this work-around. Now programs can opt to decrease the security in order to interoperate with old servers better. --- include/curl/curl.h | 12 ++++++++++++ 1 file changed, 12 insertions(+) (limited to 'include') diff --git a/include/curl/curl.h b/include/curl/curl.h index 2a9957e9c..3c9c41d8a 100644 --- a/include/curl/curl.h +++ b/include/curl/curl.h @@ -673,6 +673,15 @@ typedef enum { CURLUSESSL_LAST /* not an option, never use */ } curl_usessl; +/* Definition of bits for the CURLOPT_SSL_OPTIONS argument: */ + +/* - ALLOW_BEAST tells libcurl to allow the BEAST SSL vulnerability in the + name of improving interoperability with older servers. Some SSL libraries + have introduced work-arounds for this flaw but those work-arounds sometimes + make the SSL communication fail. To regain functionality with those broken + servers, a user can this way allow the vulnerability back. */ +#define CURLSSLOPT_ALLOW_BEAST (1<<0) + #ifndef CURL_NO_OLDIES /* define this to test if your app builds with all the obsolete stuff removed! */ @@ -1506,6 +1515,9 @@ typedef enum { CINIT(TCP_KEEPIDLE, LONG, 214), CINIT(TCP_KEEPINTVL, LONG, 215), + /* Enable/disable specific SSL features with a bitmask, see CURLSSLOPT_* */ + CINIT(SSL_OPTIONS, LONG, 216), + CURLOPT_LASTENTRY /* the last unused */ } CURLoption; -- cgit v1.2.1 From 714accd0904b8282f66d7bdf4ab3290a4a7fb638 Mon Sep 17 00:00:00 2001 From: Daniel Stenberg Date: Mon, 13 Feb 2012 23:28:26 +0100 Subject: curlver.h: bumped to 7.25.0 and updated the end year in the generic copyright string --- include/curl/curlver.h | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'include') diff --git a/include/curl/curlver.h b/include/curl/curlver.h index 0c0d9bd29..15184b606 100644 --- a/include/curl/curlver.h +++ b/include/curl/curlver.h @@ -26,17 +26,17 @@ 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 - 2011 Daniel Stenberg, ." +#define LIBCURL_COPYRIGHT "1996 - 2012 Daniel Stenberg, ." /* This is the version number of the libcurl package from which this header file origins: */ -#define LIBCURL_VERSION "7.24.1-DEV" +#define LIBCURL_VERSION "7.25.0-DEV" /* The numeric version number is also available "in parts" by using these defines: */ #define LIBCURL_VERSION_MAJOR 7 -#define LIBCURL_VERSION_MINOR 24 -#define LIBCURL_VERSION_PATCH 1 +#define LIBCURL_VERSION_MINOR 25 +#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 @@ -53,7 +53,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 0x071801 +#define LIBCURL_VERSION_NUM 0x071901 /* * This is the date and time when the full source package was created. The -- cgit v1.2.1 From 020128053379ba5baa41bc2f72c391f6fcfbdf29 Mon Sep 17 00:00:00 2001 From: Daniel Stenberg Date: Tue, 14 Feb 2012 19:24:03 +0100 Subject: LIBCURL_VERSION_NUM: 0x071900 I accidentally left the lowest bits 01 before --- include/curl/curlver.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'include') diff --git a/include/curl/curlver.h b/include/curl/curlver.h index 15184b606..b3a723a7d 100644 --- a/include/curl/curlver.h +++ b/include/curl/curlver.h @@ -53,7 +53,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 0x071901 +#define LIBCURL_VERSION_NUM 0x071900 /* * This is the date and time when the full source package was created. The -- cgit v1.2.1 From 0cf0ab6f3008aaad0bb5e3291539e80123028864 Mon Sep 17 00:00:00 2001 From: Steve Holme Date: Wed, 5 Oct 2011 22:22:29 +0100 Subject: smtp_mail: Added support to MAIL FROM for the optional AUTH parameter Added a new CURLOPT_MAIL_AUTH option that allows the calling program to set the optional AUTH parameter in the MAIL FROM command. When this option is specified and an authentication mechanism is used to communicate with the mail server then the AUTH parameter will be included in the MAIL FROM command. This is particularly useful when the calling program is acting as a relay in a trusted environment and performing server to server communication, as it allows the relaying server to specify the address of the mailbox that was used to authenticate and send the original email. --- include/curl/curl.h | 3 +++ 1 file changed, 3 insertions(+) (limited to 'include') diff --git a/include/curl/curl.h b/include/curl/curl.h index 3c9c41d8a..f2501cd2b 100644 --- a/include/curl/curl.h +++ b/include/curl/curl.h @@ -1518,6 +1518,9 @@ typedef enum { /* Enable/disable specific SSL features with a bitmask, see CURLSSLOPT_* */ CINIT(SSL_OPTIONS, LONG, 216), + /* set the SMTP auth originator */ + CINIT(MAIL_AUTH, OBJECTPOINT, 217), + CURLOPT_LASTENTRY /* the last unused */ } CURLoption; -- cgit v1.2.1 From 682f0840e7f2db0b55d6c296b3935dbada349c35 Mon Sep 17 00:00:00 2001 From: Yang Tse Date: Fri, 23 Mar 2012 16:59:03 +0100 Subject: version: start working on 7.25.1-DEV --- include/curl/curlver.h | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'include') diff --git a/include/curl/curlver.h b/include/curl/curlver.h index b3a723a7d..5a571b895 100644 --- a/include/curl/curlver.h +++ b/include/curl/curlver.h @@ -30,13 +30,13 @@ /* This is the version number of the libcurl package from which this header file origins: */ -#define LIBCURL_VERSION "7.25.0-DEV" +#define LIBCURL_VERSION "7.25.1-DEV" /* The numeric version number is also available "in parts" by using these defines: */ #define LIBCURL_VERSION_MAJOR 7 #define LIBCURL_VERSION_MINOR 25 -#define LIBCURL_VERSION_PATCH 0 +#define LIBCURL_VERSION_PATCH 1 /* This is the numeric version of the libcurl version number, meant for easier parsing and comparions by programs. The LIBCURL_VERSION_NUM define will @@ -53,7 +53,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 0x071900 +#define LIBCURL_VERSION_NUM 0x071901 /* * This is the date and time when the full source package was created. The -- cgit v1.2.1 From 0b516b7162dc387ed80b0f24476b950ab2e18cb7 Mon Sep 17 00:00:00 2001 From: Andrei Cipu Date: Fri, 30 Mar 2012 10:40:04 +0300 Subject: CURLOPT_POSTREDIR: also allow 303 to do POST on the redirected URL As it turns out, some people do want that after all. --- include/curl/curl.h | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) (limited to 'include') diff --git a/include/curl/curl.h b/include/curl/curl.h index f2501cd2b..f3166d952 100644 --- a/include/curl/curl.h +++ b/include/curl/curl.h @@ -1624,13 +1624,16 @@ enum CURL_TLSAUTH { }; /* symbols to use with CURLOPT_POSTREDIR. - CURL_REDIR_POST_301 and CURL_REDIR_POST_302 can be bitwise ORed so that - CURL_REDIR_POST_301 | CURL_REDIR_POST_302 == CURL_REDIR_POST_ALL */ + CURL_REDIR_POST_301, CURL_REDIR_POST_302 and CURL_REDIR_POST_303 + can be bitwise ORed so that CURL_REDIR_POST_301 | CURL_REDIR_POST_302 + | CURL_REDIR_POST_303 == CURL_REDIR_POST_ALL */ #define CURL_REDIR_GET_ALL 0 #define CURL_REDIR_POST_301 1 #define CURL_REDIR_POST_302 2 -#define CURL_REDIR_POST_ALL (CURL_REDIR_POST_301|CURL_REDIR_POST_302) +#define CURL_REDIR_POST_303 4 +#define CURL_REDIR_POST_ALL \ + (CURL_REDIR_POST_301|CURL_REDIR_POST_302|CURL_REDIR_POST_303) typedef enum { CURL_TIMECOND_NONE, -- cgit v1.2.1 From 919c97fa65a5c00f7044e849eeb0095408413505 Mon Sep 17 00:00:00 2001 From: Yang Tse Date: Fri, 6 Apr 2012 23:35:15 +0200 Subject: curl tool: use configuration files from lib directory Configuration files such as curl_config.h and all config-*.h no longer exist nor are generated/copied into 'src' directory, now these only exist in 'lib' directory from where curl tool sources uses them. Additionally old src/setup.h has been refactored into src/tool_setup.h which now pulls lib/setup.h The possibility of a makefile needing an include path adjustment exists. --- include/curl/.gitignore | 1 + 1 file changed, 1 insertion(+) (limited to 'include') diff --git a/include/curl/.gitignore b/include/curl/.gitignore index bfd4bca20..8adbe4118 100644 --- a/include/curl/.gitignore +++ b/include/curl/.gitignore @@ -1,3 +1,4 @@ curlbuild.h +stamp-h2 stamp-h3 curlver.h.dist -- cgit v1.2.1 From 8b63b48627961c0bf880eb4d57cf24d6a828dcd2 Mon Sep 17 00:00:00 2001 From: Jonathan Nieder Date: Sat, 14 Apr 2012 15:06:57 +0200 Subject: headers: surround GCC attribute names with double underscores This protects from attribute names being defined by third party's code. Improvement: http://curl.haxx.se/mail/lib-2012-04/0127.html --- include/curl/typecheck-gcc.h | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) (limited to 'include') diff --git a/include/curl/typecheck-gcc.h b/include/curl/typecheck-gcc.h index 5c584b002..f8917e811 100644 --- a/include/curl/typecheck-gcc.h +++ b/include/curl/typecheck-gcc.h @@ -7,7 +7,7 @@ * | (__| |_| | _ <| |___ * \___|\___/|_| \_\_____| * - * Copyright (C) 1998 - 2011, Daniel Stenberg, , et al. + * Copyright (C) 1998 - 2012, 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 @@ -141,8 +141,9 @@ __extension__ ({ \ /* To define a new warning, use _CURL_WARNING(identifier, "message") */ #define _CURL_WARNING(id, message) \ - static void __attribute__((warning(message))) __attribute__((unused)) \ - __attribute__((noinline)) id(void) { __asm__(""); } + static void __attribute__((__warning__(message))) \ + __attribute__((__unused__)) __attribute__((__noinline__)) \ + id(void) { __asm__(""); } _CURL_WARNING(_curl_easy_setopt_err_long, "curl_easy_setopt expects a long argument for this option") -- cgit v1.2.1 From 09690be8decdde2d8cb7c7a41d1d11021ec49c96 Mon Sep 17 00:00:00 2001 From: Yang Tse Date: Wed, 18 Apr 2012 23:04:07 +0200 Subject: curl.h: CURLAUTH_* bitmasks adjusted to become 'unsigned long' typed Info: http://curl.haxx.se/mail/lib-2012-04/0170.html --- include/curl/curl.h | 38 ++++++++++++++++++++++++++------------ 1 file changed, 26 insertions(+), 12 deletions(-) (limited to 'include') diff --git a/include/curl/curl.h b/include/curl/curl.h index f3166d952..2cad28298 100644 --- a/include/curl/curl.h +++ b/include/curl/curl.h @@ -598,18 +598,32 @@ typedef enum { 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) */ -#define CURLAUTH_DIGEST (1<<1) /* Digest */ -#define CURLAUTH_GSSNEGOTIATE (1<<2) /* GSS-Negotiate */ -#define CURLAUTH_NTLM (1<<3) /* NTLM */ -#define CURLAUTH_DIGEST_IE (1<<4) /* Digest with IE flavour */ -#define CURLAUTH_NTLM_WB (1<<5) /* NTLM delegating to winbind helper */ -#define CURLAUTH_ONLY (1<<31) /* used together with a single other - type to force no auth or just that - single type */ -#define CURLAUTH_ANY (~CURLAUTH_DIGEST_IE) /* all fine types set */ -#define CURLAUTH_ANYSAFE (~(CURLAUTH_BASIC|CURLAUTH_DIGEST_IE)) +/* + * Bitmasks for CURLOPT_HTTPAUTH and CURLOPT_PROXYAUTH options: + * + * CURLAUTH_NONE - No HTTP authentication + * CURLAUTH_BASIC - HTTP Basic authentication (default) + * CURLAUTH_DIGEST - HTTP Digest authentication + * CURLAUTH_GSSNEGOTIATE - HTTP GSS-Negotiate authentication + * CURLAUTH_NTLM - HTTP NTLM authentication + * CURLAUTH_DIGEST_IE - HTTP Digest authentication with IE flavour + * CURLAUTH_NTLM_WB - HTTP NTLM authentication delegated to winbind helper + * CURLAUTH_ONLY - Use together with a single other type to force no + * authentication or just that single type + * CURLAUTH_ANY - All fine types set + * CURLAUTH_ANYSAFE - All fine types except Basic + */ + +#define CURLAUTH_NONE ((unsigned long)0) +#define CURLAUTH_BASIC (((unsigned long)1)<<0) +#define CURLAUTH_DIGEST (((unsigned long)1)<<1) +#define CURLAUTH_GSSNEGOTIATE (((unsigned long)1)<<2) +#define CURLAUTH_NTLM (((unsigned long)1)<<3) +#define CURLAUTH_DIGEST_IE (((unsigned long)1)<<4) +#define CURLAUTH_NTLM_WB (((unsigned long)1)<<5) +#define CURLAUTH_ONLY (((unsigned long)1)<<31) +#define CURLAUTH_ANY (~CURLAUTH_DIGEST_IE) +#define CURLAUTH_ANYSAFE (~(CURLAUTH_BASIC|CURLAUTH_DIGEST_IE)) #define CURLSSH_AUTH_ANY ~0 /* all types supported by the server */ #define CURLSSH_AUTH_NONE 0 /* none allowed, silly but complete */ -- cgit v1.2.1 From fdf2517bd906e058c45c1f9290bb54326e5f7266 Mon Sep 17 00:00:00 2001 From: Daniel Stenberg Date: Tue, 22 May 2012 10:56:50 +0200 Subject: 7.26.0: will be the next release version --- include/curl/curlver.h | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'include') diff --git a/include/curl/curlver.h b/include/curl/curlver.h index 5a571b895..f3e559abf 100644 --- a/include/curl/curlver.h +++ b/include/curl/curlver.h @@ -30,13 +30,13 @@ /* This is the version number of the libcurl package from which this header file origins: */ -#define LIBCURL_VERSION "7.25.1-DEV" +#define LIBCURL_VERSION "7.26.0-DEV" /* The numeric version number is also available "in parts" by using these defines: */ #define LIBCURL_VERSION_MAJOR 7 -#define LIBCURL_VERSION_MINOR 25 -#define LIBCURL_VERSION_PATCH 1 +#define LIBCURL_VERSION_MINOR 26 +#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 @@ -53,7 +53,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 0x071901 +#define LIBCURL_VERSION_NUM 0x071A00 /* * This is the date and time when the full source package was created. The -- cgit v1.2.1 From 244e96613844887c4bcf1ed29ba237093b7d40f5 Mon Sep 17 00:00:00 2001 From: Daniel Stenberg Date: Thu, 24 May 2012 18:32:34 +0200 Subject: bump to 7.26.1: start working towards next release --- include/curl/curlver.h | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'include') diff --git a/include/curl/curlver.h b/include/curl/curlver.h index f3e559abf..aa08a79fd 100644 --- a/include/curl/curlver.h +++ b/include/curl/curlver.h @@ -30,13 +30,13 @@ /* This is the version number of the libcurl package from which this header file origins: */ -#define LIBCURL_VERSION "7.26.0-DEV" +#define LIBCURL_VERSION "7.26.1-DEV" /* The numeric version number is also available "in parts" by using these defines: */ #define LIBCURL_VERSION_MAJOR 7 #define LIBCURL_VERSION_MINOR 26 -#define LIBCURL_VERSION_PATCH 0 +#define LIBCURL_VERSION_PATCH 1 /* This is the numeric version of the libcurl version number, meant for easier parsing and comparions by programs. The LIBCURL_VERSION_NUM define will @@ -53,7 +53,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 0x071A00 +#define LIBCURL_VERSION_NUM 0x071A01 /* * This is the date and time when the full source package was created. The -- cgit v1.2.1 From 69f01ec2d1f1186e28c781ae3efa65e146d8424f Mon Sep 17 00:00:00 2001 From: Daniel Stenberg Date: Sun, 3 Jun 2012 13:52:25 +0200 Subject: version: bump to 7.27.0 for next release Due to new features --- include/curl/curlver.h | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'include') diff --git a/include/curl/curlver.h b/include/curl/curlver.h index aa08a79fd..b8921bb77 100644 --- a/include/curl/curlver.h +++ b/include/curl/curlver.h @@ -30,13 +30,13 @@ /* This is the version number of the libcurl package from which this header file origins: */ -#define LIBCURL_VERSION "7.26.1-DEV" +#define LIBCURL_VERSION "7.27.0-DEV" /* The numeric version number is also available "in parts" by using these defines: */ #define LIBCURL_VERSION_MAJOR 7 -#define LIBCURL_VERSION_MINOR 26 -#define LIBCURL_VERSION_PATCH 1 +#define LIBCURL_VERSION_MINOR 27 +#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 @@ -53,7 +53,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 0x071A01 +#define LIBCURL_VERSION_NUM 0x071B00 /* * This is the date and time when the full source package was created. The -- cgit v1.2.1 From 634f7cfee40d4658bc19dc9f23b5628c644c1848 Mon Sep 17 00:00:00 2001 From: Marc Hoersken Date: Mon, 11 Jun 2012 08:36:48 +0200 Subject: version: Replaced SSPI feature information with version string details Added Windows SSPI version information to the curl version string when SCHANNEL SSL is not enabled, as the version of the library should also be included when SSPI is used to generate security contexts. Removed SSPI from the feature list as the features are GSS-Negotiate, NTLM and SSL depending on the usage of the SSPI library. --- include/curl/curl.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'include') diff --git a/include/curl/curl.h b/include/curl/curl.h index 2cad28298..2c743b454 100644 --- a/include/curl/curl.h +++ b/include/curl/curl.h @@ -2144,7 +2144,7 @@ typedef struct { #define CURL_VERSION_SPNEGO (1<<8) /* SPNEGO auth */ #define CURL_VERSION_LARGEFILE (1<<9) /* supports files bigger than 2GB */ #define CURL_VERSION_IDN (1<<10) /* International Domain Names support */ -#define CURL_VERSION_SSPI (1<<11) /* SSPI is supported */ +#define CURL_VERSION_OBSOLETE11 (1<<11) /* NOT USED - removed in 7.27.0 */ #define CURL_VERSION_CONV (1<<12) /* character conversions supported */ #define CURL_VERSION_CURLDEBUG (1<<13) /* debug memory tracking supported */ #define CURL_VERSION_TLSAUTH_SRP (1<<14) /* TLS-SRP auth is supported */ -- cgit v1.2.1 From af0888aaf6b444388d9b2770e310e9ef48354515 Mon Sep 17 00:00:00 2001 From: Daniel Stenberg Date: Mon, 11 Jun 2012 22:58:39 +0200 Subject: Revert: 634f7cfee40d4658 partially Make sure CURL_VERSION_SSPI is present and works as in previous releases for ABI and API compatibility reasons. --- include/curl/curl.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'include') diff --git a/include/curl/curl.h b/include/curl/curl.h index 2c743b454..2cad28298 100644 --- a/include/curl/curl.h +++ b/include/curl/curl.h @@ -2144,7 +2144,7 @@ typedef struct { #define CURL_VERSION_SPNEGO (1<<8) /* SPNEGO auth */ #define CURL_VERSION_LARGEFILE (1<<9) /* supports files bigger than 2GB */ #define CURL_VERSION_IDN (1<<10) /* International Domain Names support */ -#define CURL_VERSION_OBSOLETE11 (1<<11) /* NOT USED - removed in 7.27.0 */ +#define CURL_VERSION_SSPI (1<<11) /* SSPI is supported */ #define CURL_VERSION_CONV (1<<12) /* character conversions supported */ #define CURL_VERSION_CURLDEBUG (1<<13) /* debug memory tracking supported */ #define CURL_VERSION_TLSAUTH_SRP (1<<14) /* TLS-SRP auth is supported */ -- cgit v1.2.1 From dd4699c1119f95110cf6410ca3ff382c5de509f0 Mon Sep 17 00:00:00 2001 From: Daniel Stenberg Date: Fri, 27 Jul 2012 23:57:27 +0200 Subject: version bump: start towards next release Let's call it 7.27.1 for now, but it it probably going to become 7.28.0 when released. --- include/curl/curlver.h | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'include') diff --git a/include/curl/curlver.h b/include/curl/curlver.h index b8921bb77..65f90aef4 100644 --- a/include/curl/curlver.h +++ b/include/curl/curlver.h @@ -30,13 +30,13 @@ /* This is the version number of the libcurl package from which this header file origins: */ -#define LIBCURL_VERSION "7.27.0-DEV" +#define LIBCURL_VERSION "7.27.1-DEV" /* The numeric version number is also available "in parts" by using these defines: */ #define LIBCURL_VERSION_MAJOR 7 #define LIBCURL_VERSION_MINOR 27 -#define LIBCURL_VERSION_PATCH 0 +#define LIBCURL_VERSION_PATCH 1 /* This is the numeric version of the libcurl version number, meant for easier parsing and comparions by programs. The LIBCURL_VERSION_NUM define will @@ -53,7 +53,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 0x071B00 +#define LIBCURL_VERSION_NUM 0x071B01 /* * This is the date and time when the full source package was created. The -- cgit v1.2.1 From 021e89b8c637565ac6e5e9c474c898ab7e87dc41 Mon Sep 17 00:00:00 2001 From: Daniel Stenberg Date: Wed, 8 Aug 2012 23:01:34 +0200 Subject: bump version to 7.28.0 I am about to merge the first patch that adds changes into the pending release, and thus we bump the minor number. --- include/curl/curlver.h | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'include') diff --git a/include/curl/curlver.h b/include/curl/curlver.h index 65f90aef4..41cceef59 100644 --- a/include/curl/curlver.h +++ b/include/curl/curlver.h @@ -30,13 +30,13 @@ /* This is the version number of the libcurl package from which this header file origins: */ -#define LIBCURL_VERSION "7.27.1-DEV" +#define LIBCURL_VERSION "7.28.0-DEV" /* The numeric version number is also available "in parts" by using these defines: */ #define LIBCURL_VERSION_MAJOR 7 -#define LIBCURL_VERSION_MINOR 27 -#define LIBCURL_VERSION_PATCH 1 +#define LIBCURL_VERSION_MINOR 28 +#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 @@ -53,7 +53,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 0x071B01 +#define LIBCURL_VERSION_NUM 0x071c00 /* * This is the date and time when the full source package was created. The -- cgit v1.2.1 From e351972bc89aa4ccfc83054a01d29ee7337e0b4a Mon Sep 17 00:00:00 2001 From: Armel Asselin Date: Fri, 9 Mar 2012 17:24:42 +0100 Subject: SSH: added agent based authentication CURLSSH_AUTH_AGENT is a new auth type for SSH --- include/curl/curl.h | 1 + 1 file changed, 1 insertion(+) (limited to 'include') diff --git a/include/curl/curl.h b/include/curl/curl.h index 2cad28298..46ccf164b 100644 --- a/include/curl/curl.h +++ b/include/curl/curl.h @@ -631,6 +631,7 @@ typedef enum { #define CURLSSH_AUTH_PASSWORD (1<<1) /* password */ #define CURLSSH_AUTH_HOST (1<<2) /* host key files */ #define CURLSSH_AUTH_KEYBOARD (1<<3) /* keyboard interactive */ +#define CURLSSH_AUTH_AGENT (1<<4) /* agent (ssh-agent, pageant...) */ #define CURLSSH_AUTH_DEFAULT CURLSSH_AUTH_ANY #define CURLGSSAPI_DELEGATION_NONE 0 /* no delegation (default) */ -- cgit v1.2.1 From 23ef5e4ba22386ccc43f99db1d0f4106dc603e80 Mon Sep 17 00:00:00 2001 From: Gokhan Sengun Date: Mon, 25 Jun 2012 01:46:01 +0300 Subject: ftp: active conn, allow application to set sockopt after accept() call For active FTP connections, applications may need setting the sockopt after accept() call returns successful. This fix gives a call to the callback registered with CURL_SOCKOPTFUNCTION option. Also a new sock type - CURLSOCKTYPE_ACCEPT - is added. This type is to be passed to application callbacks with - purpose - parameter. Applications may use this parameter to distinguish between socket types. --- include/curl/curl.h | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'include') diff --git a/include/curl/curl.h b/include/curl/curl.h index 46ccf164b..200188d91 100644 --- a/include/curl/curl.h +++ b/include/curl/curl.h @@ -309,8 +309,9 @@ typedef size_t (*curl_read_callback)(char *buffer, void *instream); typedef enum { - CURLSOCKTYPE_IPCXN, /* socket created for a specific IP connection */ - CURLSOCKTYPE_LAST /* never use */ + CURLSOCKTYPE_IPCXN, /* socket created for a specific IP connection */ + CURLSOCKTYPE_ACCEPT, /* socket created by accept() call */ + CURLSOCKTYPE_LAST /* never use */ } curlsocktype; /* The return code from the sockopt_callback can signal information back -- cgit v1.2.1 From 54faab69cbdabe51bab1bdee0a9c69e423178084 Mon Sep 17 00:00:00 2001 From: Daniel Stenberg Date: Mon, 27 Aug 2012 14:50:53 +0200 Subject: curl.h: fix comment to refer to current names CURLOPT_USE_SSL should be set to CURLUSESSL_* and nothing else in modern libcurl versions. --- include/curl/curl.h | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'include') diff --git a/include/curl/curl.h b/include/curl/curl.h index 200188d91..49b2084c1 100644 --- a/include/curl/curl.h +++ b/include/curl/curl.h @@ -1223,9 +1223,9 @@ typedef enum { CINIT(NETRC_FILE, OBJECTPOINT, 118), /* Enable SSL/TLS for FTP, pick one of: - CURLFTPSSL_TRY - try using SSL, proceed anyway otherwise - CURLFTPSSL_CONTROL - SSL for the control connection or fail - CURLFTPSSL_ALL - SSL for all communication or fail + CURLUSESSL_TRY - try using SSL, proceed anyway otherwise + CURLUSESSL_CONTROL - SSL for the control connection or fail + CURLUSESSL_ALL - SSL for all communication or fail */ CINIT(USE_SSL, LONG, 119), -- cgit v1.2.1 From de24d7bd4c03ea3eeba928edc9ae9e7a826c67c8 Mon Sep 17 00:00:00 2001 From: Sara Golemon Date: Mon, 27 Aug 2012 12:48:55 -0700 Subject: multi: add curl_multi_wait() /* * Name: curl_multi_wait() * * Desc: Poll on all fds within a CURLM set as well as any * additional fds passed to the function. * * Returns: CURLMcode type, general multi error code. */ CURL_EXTERN CURLMcode curl_multi_wait(CURLM *multi_handle, struct curl_waitfd extra_fds[], unsigned int extra_nfds, int timeout_ms); --- include/curl/multi.h | 28 +++++++++++++++++++++++++++- 1 file changed, 27 insertions(+), 1 deletion(-) (limited to 'include') diff --git a/include/curl/multi.h b/include/curl/multi.h index f96566669..737f17ce2 100644 --- a/include/curl/multi.h +++ b/include/curl/multi.h @@ -7,7 +7,7 @@ * | (__| |_| | _ <| |___ * \___|\___/|_| \_\_____| * - * Copyright (C) 1998 - 2007, Daniel Stenberg, , et al. + * Copyright (C) 1998 - 2012, 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 @@ -89,6 +89,19 @@ struct CURLMsg { }; typedef struct CURLMsg CURLMsg; +/* Based on poll(2) structure and values. + * We don't use pollfd and POLL* constants explicitly + * to cover platforms without poll(). */ +#define CURL_WAIT_POLLIN 0x0001 +#define CURL_WAIT_POLLPRI 0x0002 +#define CURL_WAIT_POLLOUT 0x0004 + +struct curl_waitfd { + curl_socket_t fd; + short events; + short revents; /* not supported yet */ +}; + /* * Name: curl_multi_init() * @@ -133,6 +146,19 @@ CURL_EXTERN CURLMcode curl_multi_fdset(CURLM *multi_handle, fd_set *exc_fd_set, int *max_fd); +/* + * Name: curl_multi_wait() + * + * Desc: Poll on all fds within a CURLM set as well as any + * additional fds passed to the function. + * + * Returns: CURLMcode type, general multi error code. + */ +CURL_EXTERN CURLMcode curl_multi_wait(CURLM *multi_handle, + struct curl_waitfd extra_fds[], + unsigned int extra_nfds, + int timeout_ms); + /* * Name: curl_multi_perform() * -- cgit v1.2.1 From b78944146a0670b74be00e189f468adfc5fca5b7 Mon Sep 17 00:00:00 2001 From: Sara Golemon Date: Sat, 15 Sep 2012 10:38:52 -0700 Subject: curl_multi_wait: Add parameter to return number of active sockets Minor change to recently introduced function. BC breaking, but since curl_multi_wait() doesn't exist in any releases that should be fine. --- include/curl/multi.h | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'include') diff --git a/include/curl/multi.h b/include/curl/multi.h index 737f17ce2..6dcd2bac4 100644 --- a/include/curl/multi.h +++ b/include/curl/multi.h @@ -157,7 +157,8 @@ CURL_EXTERN CURLMcode curl_multi_fdset(CURLM *multi_handle, CURL_EXTERN CURLMcode curl_multi_wait(CURLM *multi_handle, struct curl_waitfd extra_fds[], unsigned int extra_nfds, - int timeout_ms); + int timeout_ms, + int *ret); /* * Name: curl_multi_perform() -- cgit v1.2.1 From 4ea7a65af725d0530a173b080acb6cb6db5432b3 Mon Sep 17 00:00:00 2001 From: Daniel Stenberg Date: Wed, 26 Sep 2012 11:46:23 +0200 Subject: CURLOPT_CONNECTTIMEOUT: works without signals or posix too! --- include/curl/curl.h | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) (limited to 'include') diff --git a/include/curl/curl.h b/include/curl/curl.h index 49b2084c1..5b39a24bf 100644 --- a/include/curl/curl.h +++ b/include/curl/curl.h @@ -1047,9 +1047,8 @@ typedef enum { /* Set to the Entropy Gathering Daemon socket pathname */ CINIT(EGDSOCKET, OBJECTPOINT, 77), - /* Time-out connect operations after this amount of seconds, if connects - are OK within this time, then fine... This only aborts the connect - phase. [Only works on unix-style/SIGALRM operating systems] */ + /* Time-out connect operations after this amount of seconds, if connects are + OK within this time, then fine... This only aborts the connect phase. */ CINIT(CONNECTTIMEOUT, LONG, 78), /* Function that will be called to store headers (instead of fwrite). The -- cgit v1.2.1 From ff32546d812ba02d23942e73a86fc17fed04f76e Mon Sep 17 00:00:00 2001 From: Daniel Stenberg Date: Wed, 10 Oct 2012 22:35:08 +0200 Subject: version-bump: towards 7.28.1! --- include/curl/curlver.h | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'include') diff --git a/include/curl/curlver.h b/include/curl/curlver.h index 41cceef59..40ae96317 100644 --- a/include/curl/curlver.h +++ b/include/curl/curlver.h @@ -30,13 +30,13 @@ /* This is the version number of the libcurl package from which this header file origins: */ -#define LIBCURL_VERSION "7.28.0-DEV" +#define LIBCURL_VERSION "7.28.1-DEV" /* The numeric version number is also available "in parts" by using these defines: */ #define LIBCURL_VERSION_MAJOR 7 #define LIBCURL_VERSION_MINOR 28 -#define LIBCURL_VERSION_PATCH 0 +#define LIBCURL_VERSION_PATCH 1 /* This is the numeric version of the libcurl version number, meant for easier parsing and comparions by programs. The LIBCURL_VERSION_NUM define will @@ -53,7 +53,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 0x071c00 +#define LIBCURL_VERSION_NUM 0x071c01 /* * This is the date and time when the full source package was created. The -- cgit v1.2.1 From ba476bb6d81258486712e01db5be905b2032811b Mon Sep 17 00:00:00 2001 From: Daniel Stenberg Date: Tue, 20 Nov 2012 10:27:36 +0100 Subject: bump: start working on 7.28.2 --- include/curl/curlver.h | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'include') diff --git a/include/curl/curlver.h b/include/curl/curlver.h index 40ae96317..9594d53ae 100644 --- a/include/curl/curlver.h +++ b/include/curl/curlver.h @@ -30,13 +30,13 @@ /* This is the version number of the libcurl package from which this header file origins: */ -#define LIBCURL_VERSION "7.28.1-DEV" +#define LIBCURL_VERSION "7.28.2-DEV" /* The numeric version number is also available "in parts" by using these defines: */ #define LIBCURL_VERSION_MAJOR 7 #define LIBCURL_VERSION_MINOR 28 -#define LIBCURL_VERSION_PATCH 1 +#define LIBCURL_VERSION_PATCH 2 /* This is the numeric version of the libcurl version number, meant for easier parsing and comparions by programs. The LIBCURL_VERSION_NUM define will @@ -53,7 +53,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 0x071c01 +#define LIBCURL_VERSION_NUM 0x071c02 /* * This is the date and time when the full source package was created. The -- cgit v1.2.1 From 665adcd4b7bcdb7deb638cdc499fbe71f8d777f2 Mon Sep 17 00:00:00 2001 From: Yang Tse Date: Fri, 23 Nov 2012 17:57:00 +0100 Subject: build: fix AIX compilation and usage AIX sys/poll.h header file defines 'events' and 'revents' as C preprocessor macros. Usage of these literals in libcurl's external API was introduced in commit de24d7bd4c causing AIX build failures. Appropriate inclusion of sys/poll.h by libcurl's external interface fixes AIX build and usage issues while avoiding a SONAME bump. --- include/curl/curlbuild.h.in | 9 ++++++++- include/curl/curlrules.h | 3 ++- 2 files changed, 10 insertions(+), 2 deletions(-) (limited to 'include') diff --git a/include/curl/curlbuild.h.in b/include/curl/curlbuild.h.in index fe348f40d..e29f195d2 100644 --- a/include/curl/curlbuild.h.in +++ b/include/curl/curlbuild.h.in @@ -7,7 +7,7 @@ * | (__| |_| | _ <| |___ * \___|\___/|_| \_\_____| * - * Copyright (C) 1998 - 2011, Daniel Stenberg, , et al. + * Copyright (C) 1998 - 2012, 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 @@ -151,6 +151,13 @@ # include #endif +/* Configure process defines this to 1 when it finds out that system */ +/* header file sys/poll.h must be included by the external interface. */ +#undef CURL_PULL_SYS_POLL_H +#ifdef CURL_PULL_SYS_POLL_H +# include +#endif + /* The size of `long', as computed by sizeof. */ #undef CURL_SIZEOF_LONG diff --git a/include/curl/curlrules.h b/include/curl/curlrules.h index cbc12fdd2..4e9c88003 100644 --- a/include/curl/curlrules.h +++ b/include/curl/curlrules.h @@ -7,7 +7,7 @@ * | (__| |_| | _ <| |___ * \___|\___/|_| \_\_____| * - * Copyright (C) 1998 - 2011, Daniel Stenberg, , et al. + * Copyright (C) 1998 - 2012, 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 @@ -248,6 +248,7 @@ typedef char #undef CURL_PULL_WS2TCPIP_H #undef CURL_PULL_SYS_TYPES_H #undef CURL_PULL_SYS_SOCKET_H +#undef CURL_PULL_SYS_POLL_H #undef CURL_PULL_STDINT_H #undef CURL_PULL_INTTYPES_H -- cgit v1.2.1