1
0
mirror of https://github.com/moparisthebest/curl synced 2024-12-21 15:48:49 -05:00

Dan Fandrich's cleanup patch to make pedantic compiler options cause less

warnings. Minor edits by me.
This commit is contained in:
Daniel Stenberg 2004-01-29 13:56:45 +00:00
parent 0d6236f7e1
commit 4d17d6876e
29 changed files with 103 additions and 85 deletions

View File

@ -76,6 +76,7 @@
#include "urldata.h" #include "urldata.h"
#include "sendf.h" #include "sendf.h"
#include "if2ip.h" #include "if2ip.h"
#include "connect.h"
/* The last #include file should be: */ /* The last #include file should be: */
#ifdef CURLDEBUG #ifdef CURLDEBUG

View File

@ -32,6 +32,7 @@
#include <curl/curl.h> #include <curl/curl.h>
#include <curl/types.h> #include <curl/types.h>
#include "sendf.h" #include "sendf.h"
#include "content_encoding.h"
#define DSIZ 0x10000 /* buffer size for decompressed data */ #define DSIZ 0x10000 /* buffer size for decompressed data */

View File

@ -211,7 +211,7 @@ Curl_cookie_add(struct SessionHandle *data,
/* note that this name may or may not have a preceeding dot, but /* note that this name may or may not have a preceeding dot, but
we don't care about that, we treat the names the same anyway */ we don't care about that, we treat the names the same anyway */
char *ptr=whatptr; const char *domptr=whatptr;
int dotcount=1; int dotcount=1;
unsigned int i; unsigned int i;
@ -224,15 +224,15 @@ Curl_cookie_add(struct SessionHandle *data,
if('.' == whatptr[0]) if('.' == whatptr[0])
/* don't count the initial dot, assume it */ /* don't count the initial dot, assume it */
ptr++; domptr++;
do { do {
ptr = strchr(ptr, '.'); domptr = strchr(domptr, '.');
if(ptr) { if(domptr) {
ptr++; domptr++;
dotcount++; dotcount++;
} }
} while(ptr); } while(domptr);
for(i=0; for(i=0;
i<sizeof(seventhree)/sizeof(seventhree[0]); i++) { i<sizeof(seventhree)/sizeof(seventhree[0]); i++) {
@ -259,10 +259,10 @@ Curl_cookie_add(struct SessionHandle *data,
or the given domain is not valid and thus cannot be set. */ or the given domain is not valid and thus cannot be set. */
if(!domain || tailmatch(whatptr, domain)) { if(!domain || tailmatch(whatptr, domain)) {
char *ptr=whatptr; const char *tailptr=whatptr;
if(ptr[0] == '.') if(tailptr[0] == '.')
ptr++; tailptr++;
co->domain=strdup(ptr); /* dont prefix with dots internally */ co->domain=strdup(tailptr); /* don't prefix w/dots internally */
co->tailmatch=TRUE; /* we always do that if the domain name was co->tailmatch=TRUE; /* we always do that if the domain name was
given */ given */
} }

View File

@ -74,6 +74,7 @@
#include "progress.h" #include "progress.h"
#include "strequal.h" #include "strequal.h"
#include "dict.h"
#define _MPRINTF_REPLACE /* use our functions only */ #define _MPRINTF_REPLACE /* use our functions only */
#include <curl/mprintf.h> #include <curl/mprintf.h>

View File

@ -44,7 +44,7 @@ char *curl_escape(const char *string, int length)
char *testing_ptr = NULL; char *testing_ptr = NULL;
unsigned char in; unsigned char in;
int newlen = alloc; int newlen = alloc;
int index=0; int strindex=0;
length = alloc-1; length = alloc-1;
while(length--) { while(length--) {
@ -65,17 +65,17 @@ char *curl_escape(const char *string, int length)
ns = testing_ptr; ns = testing_ptr;
} }
} }
sprintf(&ns[index], "%%%02X", in); sprintf(&ns[strindex], "%%%02X", in);
index+=3; strindex+=3;
} }
else { else {
/* just copy this */ /* just copy this */
ns[index++]=in; ns[strindex++]=in;
} }
string++; string++;
} }
ns[index]=0; /* terminate it */ ns[strindex]=0; /* terminate it */
return ns; return ns;
} }
@ -88,7 +88,7 @@ char *curl_unescape(const char *string, int length)
int alloc = (length?length:(int)strlen(string))+1; int alloc = (length?length:(int)strlen(string))+1;
char *ns = malloc(alloc); char *ns = malloc(alloc);
unsigned char in; unsigned char in;
int index=0; int strindex=0;
unsigned int hex; unsigned int hex;
if( !ns ) { if( !ns ) {
@ -112,10 +112,10 @@ char *curl_unescape(const char *string, int length)
alloc-=2; alloc-=2;
} }
ns[index++] = in; ns[strindex++] = in;
string++; string++;
} }
ns[index]=0; /* terminate it */ ns[strindex]=0; /* terminate it */
return ns; return ns;
} }

View File

@ -81,6 +81,7 @@
#include "progress.h" #include "progress.h"
#include "sendf.h" #include "sendf.h"
#include "escape.h" #include "escape.h"
#include "file.h"
#define _MPRINTF_REPLACE /* use our functions only */ #define _MPRINTF_REPLACE /* use our functions only */
#include <curl/mprintf.h> #include <curl/mprintf.h>

View File

@ -118,6 +118,9 @@ Content-Disposition: form-data; name="FILECONTENT"
#include <time.h> #include <time.h>
#ifndef CURL_OLDSTYLE
#define CURL_OLDSTYLE 1 /* enable deprecated prototype for curl_formparse */
#endif
#include <curl/curl.h> #include <curl/curl.h>
#include "formdata.h" #include "formdata.h"

View File

@ -2388,7 +2388,7 @@ CURLcode Curl_ftpsendf(struct connectdata *conn,
bytes_written=0; bytes_written=0;
write_len = strlen(s); write_len = strlen(s);
do { while(1) {
res = Curl_write(conn, conn->sock[FIRSTSOCKET], sptr, write_len, res = Curl_write(conn, conn->sock[FIRSTSOCKET], sptr, write_len,
&bytes_written); &bytes_written);
@ -2404,7 +2404,7 @@ CURLcode Curl_ftpsendf(struct connectdata *conn,
} }
else else
break; break;
} while(1); }
return res; return res;
} }

View File

@ -152,9 +152,6 @@
#define yytable Curl_gd_yytable #define yytable Curl_gd_yytable
#define yycheck Curl_gd_yycheck #define yycheck Curl_gd_yycheck
static int yylex ();
static int yyerror ();
#define EPOCH 1970 #define EPOCH 1970
#define HOUR(x) ((x) * 60) #define HOUR(x) ((x) * 60)
@ -224,6 +221,11 @@ typedef struct _CURL_CONTEXT {
enum _MERIDIAN Meridian; enum _MERIDIAN Meridian;
} }
%{
static int yylex (YYSTYPE *yylval, void *cookie);
static int yyerror (const char *s);
%}
%token tAGO tDAY tDAY_UNIT tDAYZONE tDST tHOUR_UNIT tID %token tAGO tDAY tDAY_UNIT tDAYZONE tDST tHOUR_UNIT tID
%token tMERIDIAN tMINUTE_UNIT tMONTH tMONTH_UNIT %token tMERIDIAN tMINUTE_UNIT tMONTH tMONTH_UNIT
%token tSEC_UNIT tSNUMBER tUNUMBER tYEAR_UNIT tZONE %token tSEC_UNIT tSNUMBER tUNUMBER tYEAR_UNIT tZONE
@ -495,9 +497,9 @@ o_merid : /* NULL */
#include "getdate.h" #include "getdate.h"
#ifndef WIN32 /* the windows dudes don't need these, does anyone really? */ #ifndef WIN32 /* the windows dudes don't need these, does anyone really? */
extern struct tm *gmtime (); extern struct tm *gmtime (const time_t *);
extern struct tm *localtime (); extern struct tm *localtime (const time_t *);
extern time_t mktime (); extern time_t mktime (struct tm *);
#endif #endif
/* Month and day table. */ /* Month and day table. */
@ -689,16 +691,13 @@ static TABLE const MilitaryTable[] = {
/* ARGSUSED */ /* ARGSUSED */
static int static int
yyerror (s) yyerror (const char *s ATTRIBUTE_UNUSED)
char *s ATTRIBUTE_UNUSED;
{ {
return 0; return 0;
} }
static int static int
ToHour (Hours, Meridian) ToHour (int Hours, MERIDIAN Meridian)
int Hours;
MERIDIAN Meridian;
{ {
switch (Meridian) switch (Meridian)
{ {
@ -725,8 +724,7 @@ ToHour (Hours, Meridian)
} }
static int static int
ToYear (Year) ToYear (int Year)
int Year;
{ {
if (Year < 0) if (Year < 0)
Year = -Year; Year = -Year;
@ -742,9 +740,7 @@ ToYear (Year)
} }
static int static int
LookupWord (yylval, buff) LookupWord (YYSTYPE *yylval, char *buff)
YYSTYPE *yylval;
char *buff;
{ {
register char *p; register char *p;
register char *q; register char *q;
@ -864,9 +860,7 @@ LookupWord (yylval, buff)
} }
static int static int
yylex (yylval, cookie) yylex (YYSTYPE *yylval, void *cookie)
YYSTYPE *yylval;
void *cookie;
{ {
register unsigned char c; register unsigned char c;
register char *p; register char *p;
@ -1085,9 +1079,7 @@ curl_getdate (const char *p, const time_t *now)
/* ARGSUSED */ /* ARGSUSED */
int int
main (ac, av) main (int ac, char *av[])
int ac;
char *av[];
{ {
char buff[MAX_BUFF_LEN + 1]; char buff[MAX_BUFF_LEN + 1];
time_t d; time_t d;

View File

@ -35,6 +35,8 @@
#include <unixlib.h> #include <unixlib.h>
#endif #endif
#include <curl/curl.h>
#ifdef CURLDEBUG #ifdef CURLDEBUG
#include "memdebug.h" #include "memdebug.h"
#endif #endif

View File

@ -26,6 +26,7 @@
#include <curl/curl.h> #include <curl/curl.h>
#include "urldata.h" #include "urldata.h"
#include "getinfo.h"
#include <stdio.h> #include <stdio.h>
#include <string.h> #include <string.h>

View File

@ -193,11 +193,11 @@ void Curl_http_auth_act(struct connectdata *conn)
* authentication method. * authentication method.
*/ */
CURLcode http_auth_headers(struct connectdata *conn, static CURLcode http_auth_headers(struct connectdata *conn,
char *request, char *request,
char *path, char *path,
bool *ready) /* set TRUE when the auth phase is bool *ready) /* set TRUE when the auth phase
done and ready to do the *actual* is done and ready to do the *actual*
request */ request */
{ {
CURLcode result = CURLE_OK; CURLcode result = CURLE_OK;

View File

@ -34,6 +34,7 @@
#include "sendf.h" /* for the client write stuff */ #include "sendf.h" /* for the client write stuff */
#include "content_encoding.h" /* 08/29/02 jhrg */ #include "content_encoding.h" /* 08/29/02 jhrg */
#include "http.h"
#define _MPRINTF_REPLACE /* use our functions only */ #define _MPRINTF_REPLACE /* use our functions only */
#include <curl/mprintf.h> #include <curl/mprintf.h>
@ -99,8 +100,8 @@ void Curl_httpchunk_init(struct connectdata *conn)
*/ */
CHUNKcode Curl_httpchunk_read(struct connectdata *conn, CHUNKcode Curl_httpchunk_read(struct connectdata *conn,
char *datap, char *datap,
size_t length, ssize_t length,
size_t *wrote) ssize_t *wrote)
{ {
CURLcode result=CURLE_OK; CURLcode result=CURLE_OK;
struct Curl_chunker *ch = &conn->proto.http->chunk; struct Curl_chunker *ch = &conn->proto.http->chunk;

View File

@ -81,8 +81,8 @@ struct Curl_chunker {
char hexbuffer[ MAXNUM_SIZE + 1]; char hexbuffer[ MAXNUM_SIZE + 1];
int hexindex; int hexindex;
ChunkyState state; ChunkyState state;
size_t datasize; ssize_t datasize;
size_t dataleft; /* untouched data amount at the end of the last buffer */ ssize_t dataleft; /* untouched data amount at the end of the last buffer */
}; };
#endif #endif

View File

@ -72,6 +72,8 @@
#include <inet.h> #include <inet.h>
#endif #endif
#include "if2ip.h"
/* The last #include file should be: */ /* The last #include file should be: */
#ifdef CURLDEBUG #ifdef CURLDEBUG
#include "memdebug.h" #include "memdebug.h"

View File

@ -38,6 +38,8 @@
#include <string.h> #include <string.h>
#include <errno.h> #include <errno.h>
#include "inet_pton.h"
#define IN6ADDRSZ 16 #define IN6ADDRSZ 16
#define INADDRSZ 4 #define INADDRSZ 4
#define INT16SZ 2 #define INT16SZ 2
@ -68,10 +70,7 @@ static int inet_pton6(const char *src, unsigned char *dst);
* Paul Vixie, 1996. * Paul Vixie, 1996.
*/ */
int int
Curl_inet_pton(af, src, dst) Curl_inet_pton(int af, const char *src, void *dst)
int af;
const char *src;
void *dst;
{ {
switch (af) { switch (af) {
case AF_INET: case AF_INET:
@ -101,9 +100,7 @@ Curl_inet_pton(af, src, dst)
* Paul Vixie, 1996. * Paul Vixie, 1996.
*/ */
static int static int
inet_pton4(src, dst) inet_pton4(const char *src, unsigned char *dst)
const char *src;
unsigned char *dst;
{ {
static const char digits[] = "0123456789"; static const char digits[] = "0123456789";
int saw_digit, octets, ch; int saw_digit, octets, ch;
@ -156,9 +153,7 @@ inet_pton4(src, dst)
* Paul Vixie, 1996. * Paul Vixie, 1996.
*/ */
static int static int
inet_pton6(src, dst) inet_pton6(const char *src, unsigned char *dst)
const char *src;
unsigned char *dst;
{ {
static const char xdigits_l[] = "0123456789abcdef", static const char xdigits_l[] = "0123456789abcdef",
xdigits_u[] = "0123456789ABCDEF"; xdigits_u[] = "0123456789ABCDEF";

View File

@ -49,6 +49,7 @@
#include "sendf.h" #include "sendf.h"
#include "escape.h" #include "escape.h"
#include "transfer.h" #include "transfer.h"
#include "ldap.h"
#define _MPRINTF_REPLACE /* use our functions only */ #define _MPRINTF_REPLACE /* use our functions only */
#include <curl/mprintf.h> #include <curl/mprintf.h>

View File

@ -159,10 +159,10 @@ struct md5_ctx *context; /* context */
unsigned char *input; /* input block */ unsigned char *input; /* input block */
unsigned int inputLen; /* length of input block */ unsigned int inputLen; /* length of input block */
{ {
unsigned int i, index, partLen; unsigned int i, bufindex, partLen;
/* Compute number of bytes mod 64 */ /* Compute number of bytes mod 64 */
index = (unsigned int)((context->count[0] >> 3) & 0x3F); bufindex = (unsigned int)((context->count[0] >> 3) & 0x3F);
/* Update number of bits */ /* Update number of bits */
if ((context->count[0] += ((UINT4)inputLen << 3)) if ((context->count[0] += ((UINT4)inputLen << 3))
@ -170,23 +170,23 @@ unsigned int inputLen; /* length of input block */
context->count[1]++; context->count[1]++;
context->count[1] += ((UINT4)inputLen >> 29); context->count[1] += ((UINT4)inputLen >> 29);
partLen = 64 - index; partLen = 64 - bufindex;
/* Transform as many times as possible. */ /* Transform as many times as possible. */
if (inputLen >= partLen) { if (inputLen >= partLen) {
MD5_memcpy((void *)&context->buffer[index], (void *)input, partLen); MD5_memcpy((void *)&context->buffer[bufindex], (void *)input, partLen);
MD5Transform(context->state, context->buffer); MD5Transform(context->state, context->buffer);
for (i = partLen; i + 63 < inputLen; i += 64) for (i = partLen; i + 63 < inputLen; i += 64)
MD5Transform(context->state, &input[i]); MD5Transform(context->state, &input[i]);
index = 0; bufindex = 0;
} }
else else
i = 0; i = 0;
/* Buffer remaining input */ /* Buffer remaining input */
MD5_memcpy((void *)&context->buffer[index], (void *)&input[i], MD5_memcpy((void *)&context->buffer[bufindex], (void *)&input[i],
inputLen-i); inputLen-i);
} }
@ -198,14 +198,14 @@ unsigned char digest[16]; /* message digest */
struct md5_ctx *context; /* context */ struct md5_ctx *context; /* context */
{ {
unsigned char bits[8]; unsigned char bits[8];
unsigned int index, padLen; unsigned int count, padLen;
/* Save number of bits */ /* Save number of bits */
Encode (bits, context->count, 8); Encode (bits, context->count, 8);
/* Pad out to 56 mod 64. */ /* Pad out to 56 mod 64. */
index = (unsigned int)((context->count[0] >> 3) & 0x3f); count = (unsigned int)((context->count[0] >> 3) & 0x3f);
padLen = (index < 56) ? (56 - index) : (120 - index); padLen = (count < 56) ? (56 - count) : (120 - count);
MD5_Update (context, PADDING, padLen); MD5_Update (context, PADDING, padLen);
/* Append length (before padding) */ /* Append length (before padding) */
@ -345,6 +345,7 @@ static void Decode (UINT4 *output,
#include <string.h> #include <string.h>
#endif #endif
#include "md5.h"
void Curl_md5it(unsigned char *outbuffer, /* 16 bytes */ void Curl_md5it(unsigned char *outbuffer, /* 16 bytes */
unsigned char *input) unsigned char *input)

View File

@ -41,7 +41,8 @@
#include <unistd.h> #include <unistd.h>
#endif #endif
/* DONT include memdebug.h here! */ #define MEMDEBUG_NODEFINES /* don't redefine the standard functions */
#include "memdebug.h"
struct memdebug { struct memdebug {
int size; int size;
@ -194,7 +195,8 @@ void curl_dofree(void *ptr, int line, const char *source)
fprintf(logfile, "MEM %s:%d free(%p)\n", source, line, ptr); fprintf(logfile, "MEM %s:%d free(%p)\n", source, line, ptr);
} }
int curl_socket(int domain, int type, int protocol, int line, char *source) int curl_socket(int domain, int type, int protocol, int line,
const char *source)
{ {
int sockfd=(socket)(domain, type, protocol); int sockfd=(socket)(domain, type, protocol);
if(logfile && (sockfd!=-1)) if(logfile && (sockfd!=-1))
@ -214,7 +216,7 @@ int curl_accept(int s, struct sockaddr *addr, socklen_t *addrlen,
} }
/* this is our own defined way to close sockets on *ALL* platforms */ /* this is our own defined way to close sockets on *ALL* platforms */
int curl_sclose(int sockfd, int line, char *source) int curl_sclose(int sockfd, int line, const char *source)
{ {
int res=sclose(sockfd); int res=sclose(sockfd);
if(logfile) if(logfile)

View File

@ -49,7 +49,7 @@ void curl_memdebug(const char *logname);
void curl_memlimit(long limit); void curl_memlimit(long limit);
/* file descriptor manipulators */ /* file descriptor manipulators */
int curl_socket(int domain, int type, int protocol, int, const char *); int curl_socket(int domain, int type, int protocol, int line , const char *);
int curl_sclose(int sockfd, int, const char *source); int curl_sclose(int sockfd, int, const char *source);
int curl_accept(int s, struct sockaddr *addr, socklen_t *addrlen, int curl_accept(int s, struct sockaddr *addr, socklen_t *addrlen,
int line, const char *source); int line, const char *source);
@ -59,6 +59,8 @@ FILE *curl_fopen(const char *file, const char *mode, int line,
const char *source); const char *source);
int curl_fclose(FILE *file, int line, const char *source); int curl_fclose(FILE *file, int line, const char *source);
#ifndef MEMDEBUG_NODEFINES
/* Set this symbol on the command-line, recompile all lib-sources */ /* Set this symbol on the command-line, recompile all lib-sources */
#undef strdup #undef strdup
#define strdup(ptr) curl_dostrdup(ptr, __LINE__, __FILE__) #define strdup(ptr) curl_dostrdup(ptr, __LINE__, __FILE__)
@ -84,4 +86,6 @@ int curl_fclose(FILE *file, int line, const char *source);
#define fopen(file,mode) curl_fopen(file,mode,__LINE__,__FILE__) #define fopen(file,mode) curl_fopen(file,mode,__LINE__,__FILE__)
#define fclose(file) curl_fclose(file,__LINE__,__FILE__) #define fclose(file) curl_fclose(file,__LINE__,__FILE__)
#endif /* MEMDEBUG_NODEFINES */
#endif #endif

View File

@ -40,6 +40,8 @@
#include <curl/curl.h> /* for the curl_off_t type */ #include <curl/curl.h> /* for the curl_off_t type */
#include <curl/mprintf.h>
#ifndef SIZEOF_LONG_DOUBLE #ifndef SIZEOF_LONG_DOUBLE
#define SIZEOF_LONG_DOUBLE 0 #define SIZEOF_LONG_DOUBLE 0
#endif #endif

View File

@ -41,6 +41,7 @@
#endif #endif
#include <curl/curl.h> #include <curl/curl.h>
#include "netrc.h"
#include "strequal.h" #include "strequal.h"
#include "strtok.h" #include "strtok.h"

View File

@ -333,13 +333,15 @@ int Curl_pgrsUpdate(struct connectdata *conn)
} }
/* Figure out the estimated time of arrival for the upload */ /* Figure out the estimated time of arrival for the upload */
if((data->progress.flags & PGRS_UL_SIZE_KNOWN) && data->progress.ulspeed){ if((data->progress.flags & PGRS_UL_SIZE_KNOWN) &&
(data->progress.ulspeed > 0)) {
ulestimate = data->progress.size_ul / data->progress.ulspeed; ulestimate = data->progress.size_ul / data->progress.ulspeed;
ulpercen = (data->progress.uploaded / data->progress.size_ul)*100; ulpercen = (data->progress.uploaded / data->progress.size_ul)*100;
} }
/* ... and the download */ /* ... and the download */
if((data->progress.flags & PGRS_DL_SIZE_KNOWN) && data->progress.dlspeed) { if((data->progress.flags & PGRS_DL_SIZE_KNOWN) &&
(data->progress.dlspeed > 0)) {
dlestimate = data->progress.size_dl / data->progress.dlspeed; dlestimate = data->progress.size_dl / data->progress.dlspeed;
dlpercen = (data->progress.downloaded / data->progress.size_dl)*100; dlpercen = (data->progress.downloaded / data->progress.size_dl)*100;
} }
@ -351,7 +353,7 @@ int Curl_pgrsUpdate(struct connectdata *conn)
/* If we have a total estimate, we can display that and the expected /* If we have a total estimate, we can display that and the expected
time left */ time left */
if(total_estimate) { if(total_estimate > 0) {
time2str(time_left, (int)(total_estimate - data->progress.timespent)); time2str(time_left, (int)(total_estimate - data->progress.timespent));
time2str(time_total, (int)total_estimate); time2str(time_total, (int)total_estimate);
} }
@ -374,7 +376,7 @@ int Curl_pgrsUpdate(struct connectdata *conn)
total_transfer = data->progress.downloaded + data->progress.uploaded; total_transfer = data->progress.downloaded + data->progress.uploaded;
/* Get the percentage of data transfered so far */ /* Get the percentage of data transfered so far */
if(total_expected_transfer) if(total_expected_transfer > 0)
total_percen=(double)(total_transfer/total_expected_transfer)*100; total_percen=(double)(total_transfer/total_expected_transfer)*100;
fprintf(data->set.err, fprintf(data->set.err,

View File

@ -189,7 +189,7 @@ CURLcode Curl_sendf(int sockfd, struct connectdata *conn,
write_len = strlen(s); write_len = strlen(s);
sptr = s; sptr = s;
do { while (1) {
/* Write the buffer to the socket */ /* Write the buffer to the socket */
res = Curl_write(conn, sockfd, sptr, write_len, &bytes_written); res = Curl_write(conn, sockfd, sptr, write_len, &bytes_written);
@ -207,8 +207,7 @@ CURLcode Curl_sendf(int sockfd, struct connectdata *conn,
} }
else else
break; break;
}
} while(1);
free(s); /* free the output string */ free(s); /* free the output string */

View File

@ -178,7 +178,7 @@ curl_share_cleanup(CURLSH *sh)
CURLSHcode CURLSHcode
Curl_share_lock(struct SessionHandle *data, curl_lock_data type, Curl_share_lock(struct SessionHandle *data, curl_lock_data type,
curl_lock_access access) curl_lock_access accesstype)
{ {
struct Curl_share *share = data->share; struct Curl_share *share = data->share;
@ -186,7 +186,7 @@ Curl_share_lock(struct SessionHandle *data, curl_lock_data type,
return CURLSHE_INVALID; return CURLSHE_INVALID;
if(share->specifier & (1<<type)) { if(share->specifier & (1<<type)) {
share->lockfunc(data, type, access, share->clientdata); share->lockfunc(data, type, accesstype, share->clientdata);
} }
/* else if we don't share this, pretend successful lock */ /* else if we don't share this, pretend successful lock */

View File

@ -43,6 +43,7 @@
#include "formdata.h" /* for the boundary function */ #include "formdata.h" /* for the boundary function */
#include "url.h" /* for the ssl config check function */ #include "url.h" /* for the ssl config check function */
#include "inet_pton.h" #include "inet_pton.h"
#include "ssluse.h"
#ifdef USE_SSLEAY #ifdef USE_SSLEAY
#include <openssl/rand.h> #include <openssl/rand.h>
@ -1057,7 +1058,7 @@ Curl_SSLConnect(struct connectdata *conn,
/* pass the raw socket into the SSL layers */ /* pass the raw socket into the SSL layers */
SSL_set_fd(connssl->handle, sockfd); SSL_set_fd(connssl->handle, sockfd);
do { while(1) {
fd_set writefd; fd_set writefd;
fd_set readfd; fd_set readfd;
struct timeval interval; struct timeval interval;
@ -1167,7 +1168,7 @@ Curl_SSLConnect(struct connectdata *conn,
} }
else else
break; /* get out of loop */ break; /* get out of loop */
} while(1); } /* loop */
/* Informational message */ /* Informational message */
infof (data, "SSL connection using %s\n", infof (data, "SSL connection using %s\n",

View File

@ -26,6 +26,8 @@
#include <string.h> #include <string.h>
#include <ctype.h> #include <ctype.h>
#include "strequal.h"
#ifdef HAVE_STRCASECMP #ifdef HAVE_STRCASECMP
/* this is for "-ansi -Wall -pedantic" to stop complaining! */ /* this is for "-ansi -Wall -pedantic" to stop complaining! */
extern int (strcasecmp)(const char *s1, const char *s2); extern int (strcasecmp)(const char *s1, const char *s2);

View File

@ -27,6 +27,8 @@
#include <stddef.h> #include <stddef.h>
#include <string.h> #include <string.h>
#include "strtok.h"
char * char *
Curl_strtok_r(char *ptr, const char *sep, char **end) Curl_strtok_r(char *ptr, const char *sep, char **end)
{ {

View File

@ -72,6 +72,7 @@
#include <curl/curl.h> #include <curl/curl.h>
#include "transfer.h" #include "transfer.h"
#include "sendf.h" #include "sendf.h"
#include "telnet.h"
#define _MPRINTF_REPLACE /* use our functions only */ #define _MPRINTF_REPLACE /* use our functions only */
#include <curl/mprintf.h> #include <curl/mprintf.h>