diff options
author | ng0 <ng0@n0.is> | 2019-05-22 16:37:08 +0000 |
---|---|---|
committer | ng0 <ng0@n0.is> | 2019-05-22 16:37:08 +0000 |
commit | 76775eb29a045f4354ef7138deaf2e1721708dd4 (patch) | |
tree | 48e9517d65525dac2eeb54baac0e37bce9b58ca1 /packages | |
parent | a341c3159eaeb4a6386fc3360f8d082e25b26ec3 (diff) | |
parent | 885ce31401b6789c959131754b1e5ae518964072 (diff) | |
download | gnurl-76775eb29a045f4354ef7138deaf2e1721708dd4.tar.gz gnurl-76775eb29a045f4354ef7138deaf2e1721708dd4.tar.bz2 gnurl-76775eb29a045f4354ef7138deaf2e1721708dd4.zip |
Merge tag 'curl-7_65_0' of https://github.com/curl/curl
7.65.0
Diffstat (limited to 'packages')
-rw-r--r-- | packages/OS400/ccsidcurl.c | 156 | ||||
-rw-r--r-- | packages/OS400/curl.inc.in | 2 | ||||
-rw-r--r-- | packages/OS400/os400sys.c | 1 | ||||
-rw-r--r-- | packages/vms/curl_crtl_init.c | 1 | ||||
-rw-r--r-- | packages/vms/generate_config_vms_h_curl.com | 9 |
5 files changed, 85 insertions, 84 deletions
diff --git a/packages/OS400/ccsidcurl.c b/packages/OS400/ccsidcurl.c index a4cae27ee..fd3b5f073 100644 --- a/packages/OS400/ccsidcurl.c +++ b/packages/OS400/ccsidcurl.c @@ -94,7 +94,7 @@ iconv_open_CCSID(unsigned int ccsidout, unsigned int ccsidin, makeOS400IconvCode(fromcode, ccsidin); makeOS400IconvCode(tocode, ccsidout); - memset(tocode + 13, 0, sizeof tocode - 13); /* Dest. code id format. */ + memset(tocode + 13, 0, sizeof(tocode) - 13); /* Dest. code id format. */ if(cstr) fromcode[18] = '1'; /* Set null-terminator flag. */ @@ -104,8 +104,8 @@ iconv_open_CCSID(unsigned int ccsidout, unsigned int ccsidin, static int -convert(char * d, size_t dlen, int dccsid, - const char * s, int slen, int sccsid) +convert(char *d, size_t dlen, int dccsid, + const char *s, int slen, int sccsid) { int i; @@ -161,11 +161,11 @@ convert(char * d, size_t dlen, int dccsid, static char * -dynconvert(int dccsid, const char * s, int slen, int sccsid) +dynconvert(int dccsid, const char *s, int slen, int sccsid) { - char * d; - char * cp; + char *d; + char *cp; size_t dlen; int l; static const char nullbyte = 0; @@ -213,14 +213,14 @@ dynconvert(int dccsid, const char * s, int slen, int sccsid) static struct curl_slist * -slist_convert(int dccsid, struct curl_slist * from, int sccsid) +slist_convert(int dccsid, struct curl_slist *from, int sccsid) { - struct curl_slist * to = (struct curl_slist *) NULL; + struct curl_slist *to = (struct curl_slist *) NULL; for(; from; from = from->next) { struct curl_slist *nl; - char * cp = dynconvert(dccsid, from->data, -1, sccsid); + char *cp = dynconvert(dccsid, from->data, -1, sccsid); if(!cp) { curl_slist_free_all(to); @@ -243,8 +243,8 @@ curl_version_ccsid(unsigned int ccsid) { int i; - char * aversion; - char * eversion; + char *aversion; + char *eversion; aversion = curl_version(); @@ -254,7 +254,8 @@ curl_version_ccsid(unsigned int ccsid) i = strlen(aversion) + 1; i *= MAX_CONV_EXPANSION; - if(!(eversion = Curl_thread_buffer(LK_CURL_VERSION, i))) + eversion = Curl_thread_buffer(LK_CURL_VERSION, i); + if(!eversion) return (char *) NULL; if(convert(eversion, i, ccsid, aversion, -1, ASCII_CCSID) < 0) @@ -265,12 +266,12 @@ curl_version_ccsid(unsigned int ccsid) char * -curl_easy_escape_ccsid(CURL * handle, const char * string, int length, +curl_easy_escape_ccsid(CURL *handle, const char *string, int length, unsigned int sccsid, unsigned int dccsid) { - char * s; - char * d; + char *s; + char *d; if(!string) { errno = EINVAL; @@ -295,13 +296,13 @@ curl_easy_escape_ccsid(CURL * handle, const char * string, int length, char * -curl_easy_unescape_ccsid(CURL * handle, const char * string, int length, - int * outlength, +curl_easy_unescape_ccsid(CURL *handle, const char *string, int length, + int *outlength, unsigned int sccsid, unsigned int dccsid) { - char * s; - char * d; + char *s; + char *d; if(!string) { errno = EINVAL; @@ -330,11 +331,11 @@ curl_easy_unescape_ccsid(CURL * handle, const char * string, int length, struct curl_slist * -curl_slist_append_ccsid(struct curl_slist * list, - const char * data, unsigned int ccsid) +curl_slist_append_ccsid(struct curl_slist *list, + const char *data, unsigned int ccsid) { - char * s; + char *s; s = (char *) NULL; @@ -353,10 +354,10 @@ curl_slist_append_ccsid(struct curl_slist * list, time_t -curl_getdate_ccsid(const char * p, const time_t * unused, unsigned int ccsid) +curl_getdate_ccsid(const char *p, const time_t * unused, unsigned int ccsid) { - char * s; + char *s; time_t t; if(!p) @@ -375,7 +376,7 @@ curl_getdate_ccsid(const char * p, const time_t * unused, unsigned int ccsid) static int convert_version_info_string(const char * * stringp, - char * * bufp, int * left, unsigned int ccsid) + char * * bufp, int *left, unsigned int ccsid) { /* Helper for curl_version_info_ccsid(): convert a string if defined. @@ -403,7 +404,7 @@ curl_version_info_ccsid(CURLversion stamp, unsigned int ccsid) { curl_version_info_data * p; - char * cp; + char *cp; int n; int nproto; curl_version_info_data * id; @@ -468,17 +469,17 @@ curl_version_info_ccsid(CURLversion stamp, unsigned int ccsid) cp = Curl_thread_buffer(LK_VERSION_INFO_DATA, n); id = (curl_version_info_data *) Curl_thread_buffer(LK_VERSION_INFO, - sizeof *id); + sizeof(*id)); if(!id || !cp) return (curl_version_info_data *) NULL; /* Copy data and convert strings. */ - memcpy((char *) id, (char *) p, sizeof *p); + memcpy((char *) id, (char *) p, sizeof(*p)); if(id->protocols) { - int i = nproto * sizeof id->protocols[0]; + int i = nproto * sizeof(id->protocols[0]); id->protocols = (const char * const *) cp; memcpy(cp, (char *) p->protocols, i); @@ -521,8 +522,8 @@ curl_easy_strerror_ccsid(CURLcode error, unsigned int ccsid) { int i; - const char * s; - char * buf; + const char *s; + char *buf; s = curl_easy_strerror(error); @@ -531,7 +532,8 @@ curl_easy_strerror_ccsid(CURLcode error, unsigned int ccsid) i = MAX_CONV_EXPANSION * (strlen(s) + 1); - if(!(buf = Curl_thread_buffer(LK_EASY_STRERROR, i))) + buf = Curl_thread_buffer(LK_EASY_STRERROR, i); + if(!buf) return (const char *) NULL; if(convert(buf, i, ccsid, s, -1, ASCII_CCSID) < 0) @@ -546,8 +548,8 @@ curl_share_strerror_ccsid(CURLSHcode error, unsigned int ccsid) { int i; - const char * s; - char * buf; + const char *s; + char *buf; s = curl_share_strerror(error); @@ -556,7 +558,8 @@ curl_share_strerror_ccsid(CURLSHcode error, unsigned int ccsid) i = MAX_CONV_EXPANSION * (strlen(s) + 1); - if(!(buf = Curl_thread_buffer(LK_SHARE_STRERROR, i))) + buf = Curl_thread_buffer(LK_SHARE_STRERROR, i); + if(!buf) return (const char *) NULL; if(convert(buf, i, ccsid, s, -1, ASCII_CCSID) < 0) @@ -571,8 +574,8 @@ curl_multi_strerror_ccsid(CURLMcode error, unsigned int ccsid) { int i; - const char * s; - char * buf; + const char *s; + char *buf; s = curl_multi_strerror(error); @@ -581,7 +584,8 @@ curl_multi_strerror_ccsid(CURLMcode error, unsigned int ccsid) i = MAX_CONV_EXPANSION * (strlen(s) + 1); - if(!(buf = Curl_thread_buffer(LK_MULTI_STRERROR, i))) + buf = Curl_thread_buffer(LK_MULTI_STRERROR, i); + if(!buf) return (const char *) NULL; if(convert(buf, i, ccsid, s, -1, ASCII_CCSID) < 0) @@ -610,11 +614,11 @@ curl_certinfo_free_all(struct curl_certinfo *info) CURLcode -curl_easy_getinfo_ccsid(CURL * curl, CURLINFO info, ...) +curl_easy_getinfo_ccsid(CURL *curl, CURLINFO info, ...) { va_list arg; - void * paramp; + void *paramp; CURLcode ret; unsigned int ccsid; char * * cpp; @@ -632,7 +636,7 @@ curl_easy_getinfo_ccsid(CURL * curl, CURLINFO info, ...) ret = Curl_getinfo(data, info, paramp); if(ret == CURLE_OK) - switch ((int) info & CURLINFO_TYPEMASK) { + switch((int) info & CURLINFO_TYPEMASK) { case CURLINFO_STRING: ccsid = va_arg(arg, unsigned int); @@ -649,16 +653,17 @@ curl_easy_getinfo_ccsid(CURL * curl, CURLINFO info, ...) case CURLINFO_SLIST: ccsid = va_arg(arg, unsigned int); - switch (info) { + switch(info) { case CURLINFO_CERTINFO: cipf = *(struct curl_certinfo * *) paramp; if(cipf) { - if(!(cipt = (struct curl_certinfo *) malloc(sizeof *cipt))) + cipt = (struct curl_certinfo *) malloc(sizeof(*cipt)); + if(!cipt) ret = CURLE_OUT_OF_MEMORY; else { - cipt->certinfo = (struct curl_slist * *) - calloc(cipf->num_of_certs + - 1, sizeof(struct curl_slist *)); + cipt->certinfo = (struct curl_slist **) + calloc(cipf->num_of_certs + + 1, sizeof(struct curl_slist *)); if(!cipt->certinfo) ret = CURLE_OUT_OF_MEMORY; else { @@ -692,10 +697,12 @@ curl_easy_getinfo_ccsid(CURL * curl, CURLINFO info, ...) break; default: - slp = (struct curl_slist * *) paramp; - if(*slp) - if(!(*slp = slist_convert(ccsid, *slp, ASCII_CCSID))) + slp = (struct curl_slist **) paramp; + if(*slp) { + *slp = slist_convert(ccsid, *slp, ASCII_CCSID); + if(!*slp) ret = CURLE_OUT_OF_MEMORY; + } break; } } @@ -709,7 +716,7 @@ static int Curl_is_formadd_string(CURLformoption option) { - switch (option) { + switch(option) { case CURLFORM_FILENAME: case CURLFORM_CONTENTTYPE: @@ -745,8 +752,8 @@ Curl_formadd_convert(struct curl_forms * forms, { int l; - char * cp; - char * cp2; + char *cp; + char *cp2; if(formx < 0 || !forms[formx].value) return 0; @@ -795,7 +802,7 @@ curl_formadd_ccsid(struct curl_httppost * * httppost, struct curl_forms * lforms; struct curl_forms * tforms; unsigned int lformlen; - const char * value; + const char *value; unsigned int ccsid; int nargs; int namex; @@ -823,7 +830,7 @@ curl_formadd_ccsid(struct curl_httppost * * httppost, /* Allocate the local curl_forms array. */ lformlen = ALLOC_GRANULE; - lforms = malloc(lformlen * sizeof *lforms); + lforms = malloc(lformlen * sizeof(*lforms)); if(!lforms) return CURL_FORMADD_MEMORY; @@ -845,7 +852,7 @@ curl_formadd_ccsid(struct curl_httppost * * httppost, if(nargs >= lformlen) { lformlen += ALLOC_GRANULE; - tforms = realloc(lforms, lformlen * sizeof *lforms); + tforms = realloc(lforms, lformlen * sizeof(*lforms)); if(!tforms) { result = CURL_FORMADD_MEMORY; @@ -875,7 +882,7 @@ curl_formadd_ccsid(struct curl_httppost * * httppost, /* Dispatch by option. */ - switch (option) { + switch(option) { case CURLFORM_END: forms = (struct curl_forms *) NULL; /* Leave array mode. */ @@ -1065,11 +1072,11 @@ typedef struct { static size_t -Curl_formget_callback_ccsid(void * arg, const char * buf, size_t len) +Curl_formget_callback_ccsid(void *arg, const char *buf, size_t len) { cfcdata * p; - char * b; + char *b; int l; size_t ret; @@ -1097,7 +1104,7 @@ Curl_formget_callback_ccsid(void * arg, const char * buf, size_t len) int -curl_formget_ccsid(struct curl_httppost * form, void * arg, +curl_formget_ccsid(struct curl_httppost *form, void *arg, curl_formget_callback append, unsigned int ccsid) { @@ -1111,14 +1118,14 @@ curl_formget_ccsid(struct curl_httppost * form, void * arg, CURLcode -curl_easy_setopt_ccsid(CURL * curl, CURLoption tag, ...) +curl_easy_setopt_ccsid(CURL *curl, CURLoption tag, ...) { CURLcode result; va_list arg; - struct Curl_easy * data; - char * s; - char * cp; + struct Curl_easy *data; + char *s; + char *cp; unsigned int ccsid; curl_off_t pfsize; static char testwarn = 1; @@ -1141,12 +1148,12 @@ curl_easy_setopt_ccsid(CURL * curl, CURLoption tag, ...) (int) STRING_LAST != (int) STRING_COPYPOSTFIELDS + 1) curl_mfprintf(stderr, "*** WARNING: curl_easy_setopt_ccsid() should be reworked ***\n"); - } + } data = (struct Curl_easy *) curl; va_start(arg, tag); - switch (tag) { + switch(tag) { case CURLOPT_ABSTRACT_UNIX_SOCKET: case CURLOPT_ALTSVC: @@ -1235,8 +1242,8 @@ curl_easy_setopt_ccsid(CURL * curl, CURLoption tag, ...) if(!s) { result = CURLE_OUT_OF_MEMORY; break; - } } + } result = curl_easy_setopt(curl, tag, s); free(s); @@ -1254,7 +1261,7 @@ curl_easy_setopt_ccsid(CURL * curl, CURLoption tag, ...) if(!s || !pfsize || ccsid == NOCONV_CCSID || ccsid == ASCII_CCSID) { result = curl_easy_setopt(curl, CURLOPT_COPYPOSTFIELDS, s); break; - } + } if(pfsize == -1) { /* Data is null-terminated. */ @@ -1272,7 +1279,7 @@ curl_easy_setopt_ccsid(CURL * curl, CURLoption tag, ...) if(pfsize < 0 || pfsize > SIZE_MAX) { result = CURLE_OUT_OF_MEMORY; break; - } + } len = pfsize; pfsize = len * MAX_CONV_EXPANSION; @@ -1285,7 +1292,7 @@ curl_easy_setopt_ccsid(CURL * curl, CURLoption tag, ...) if(!cp) { result = CURLE_OUT_OF_MEMORY; break; - } + } pfsize = convert(cp, pfsize, ASCII_CCSID, s, len, ccsid); @@ -1293,11 +1300,11 @@ curl_easy_setopt_ccsid(CURL * curl, CURLoption tag, ...) free(cp); result = CURLE_OUT_OF_MEMORY; break; - } + } data->set.postfieldsize = pfsize; /* Replace data size. */ s = cp; - } + } result = curl_easy_setopt(curl, CURLOPT_POSTFIELDS, s); data->set.str[STRING_COPYPOSTFIELDS] = s; /* Give to library. */ @@ -1305,9 +1312,12 @@ curl_easy_setopt_ccsid(CURL * curl, CURLoption tag, ...) case CURLOPT_ERRORBUFFER: /* This is an output buffer. */ default: - result = Curl_vsetopt(data, tag, arg); + { + long val = va_arg(arg, long); + result = curl_easy_setopt(curl, tag, val); break; - } + } + } va_end(arg); return result; diff --git a/packages/OS400/curl.inc.in b/packages/OS400/curl.inc.in index 72a769f1d..8e36bac3b 100644 --- a/packages/OS400/curl.inc.in +++ b/packages/OS400/curl.inc.in @@ -1416,6 +1416,8 @@ d c 00286 d CURLOPT_ALTSVC... d c 10287 + d CURLOPT_MAXAGE_CONN... + d c 00288 * /if not defined(CURL_NO_OLDIES) d CURLOPT_FILE c 10001 diff --git a/packages/OS400/os400sys.c b/packages/OS400/os400sys.c index 849f23973..309ff4d94 100644 --- a/packages/OS400/os400sys.c +++ b/packages/OS400/os400sys.c @@ -389,7 +389,6 @@ Curl_gsk_environment_open(gsk_handle * my_env_handle) { struct Curl_gsk_descriptor * p; - gsk_handle h; int rc; if(!my_env_handle) diff --git a/packages/vms/curl_crtl_init.c b/packages/vms/curl_crtl_init.c index 01a34e555..7a8d84743 100644 --- a/packages/vms/curl_crtl_init.c +++ b/packages/vms/curl_crtl_init.c @@ -183,7 +183,6 @@ static void set_features(void) status = sys_trnlnm("GNV$UNIX_SHELL", unix_shell_name, sizeof unix_shell_name -1); if (!$VMS_STATUS_SUCCESS(status)) { - unix_shell_name[0] = 0; use_unix_settings = 0; } diff --git a/packages/vms/generate_config_vms_h_curl.com b/packages/vms/generate_config_vms_h_curl.com index 16e6dd7a2..62870da5e 100644 --- a/packages/vms/generate_config_vms_h_curl.com +++ b/packages/vms/generate_config_vms_h_curl.com @@ -328,9 +328,6 @@ $write cvh "#endif" $write cvh "#ifdef USE_CYASSL" $write cvh "#undef USE_CYASSL" $write cvh "#endif" -$write cvh "#ifdef USE_DARWINSSL" -$write cvh "#undef USE_DARWINSSL" -$write cvh "#endif" $write cvh "#ifdef USE_GNUTLS" $write cvh "#undef USE_GNUTLS" $write cvh "#endif" @@ -355,9 +352,6 @@ $write cvh "#endif" $write cvh "#ifdef USE_POLARSSL" $write cvh "#undef USE_POLARSSL" $write cvh "#endif" -$write cvh "#ifdef USE_SCHANNEL" -$write cvh "#undef USE_SCHANNEL" -$write cvh "#endif" $write cvh "#ifdef USE_THREADS_POSIX" $write cvh "#undef USE_THREADS_POSIX" $write cvh "#endif" @@ -367,9 +361,6 @@ $write cvh "#endif" $write cvh "#ifdef USE_UNIX_SOCKETS" $write cvh "#undef USE_UNIX_SOCKETS" $write cvh "#endif" -$write cvh "#ifdef USE_WINDOWS_SSPI" -$write cvh "#undef USE_WINDOWS_SSPI" -$write cvh "#endif" $! $write cvh "#ifndef HAVE_OLD_GSSMIT" $write cvh "#define gss_nt_service_name GSS_C_NT_HOSTBASED_SERVICE" |