diff options
author | Daniel Stenberg <daniel@haxx.se> | 2019-05-14 10:03:54 +0200 |
---|---|---|
committer | Daniel Stenberg <daniel@haxx.se> | 2019-05-18 16:14:10 +0200 |
commit | 697b1f911b6fee51ff2b271a292488fd7f9cdcda (patch) | |
tree | 92c60566de44f5cf4275e941b538ac5917b0d4cd /src/tool_operate.c | |
parent | e91e48161235272ff485ff32bd048c53af731f43 (diff) | |
download | curl-697b1f911b6fee51ff2b271a292488fd7f9cdcda.tar.gz |
curl: make code work with protocol-disabled libcurl
Closes #3844
Diffstat (limited to 'src/tool_operate.c')
-rw-r--r-- | src/tool_operate.c | 17 |
1 files changed, 12 insertions, 5 deletions
diff --git a/src/tool_operate.c b/src/tool_operate.c index 835303c53..462119a1c 100644 --- a/src/tool_operate.c +++ b/src/tool_operate.c @@ -825,7 +825,9 @@ static CURLcode operate_do(struct GlobalConfig *global, /* where to store */ my_setopt(curl, CURLOPT_WRITEDATA, &outs); +#ifndef CURL_DISABLE_RTSP my_setopt(curl, CURLOPT_INTERLEAVEDATA, &outs); +#endif if(metalink || !config->use_metalink) /* what call to write */ my_setopt(curl, CURLOPT_WRITEFUNCTION, tool_write_cb); @@ -1032,8 +1034,9 @@ static CURLcode operate_do(struct GlobalConfig *global, my_setopt(curl, CURLOPT_RESUME_FROM_LARGE, CURL_OFF_T_C(0)); my_setopt_str(curl, CURLOPT_KEYPASSWD, config->key_passwd); +#ifndef CURL_DISABLE_PROXY my_setopt_str(curl, CURLOPT_PROXY_KEYPASSWD, config->proxy_key_passwd); - +#endif if(built_in_protos & (CURLPROTO_SCP|CURLPROTO_SFTP)) { /* SSH and SSL private key uses same command-line option */ @@ -1239,8 +1242,9 @@ static CURLcode operate_do(struct GlobalConfig *global, /* three new ones in libcurl 7.3: */ my_setopt_str(curl, CURLOPT_INTERFACE, config->iface); +#ifndef CURL_DISABLE_FTP my_setopt_str(curl, CURLOPT_KRBLEVEL, config->krblevel); - +#endif progressbarinit(&progressbar, config); if((global->progressmode == CURL_PROGRESS_BAR) && !global->noprogress && !global->mute) { @@ -1262,9 +1266,10 @@ static CURLcode operate_do(struct GlobalConfig *global, if(config->dns_ipv6_addr) my_setopt_str(curl, CURLOPT_DNS_LOCAL_IP6, config->dns_ipv6_addr); +#ifndef CURL_DISABLE_TELNET /* new in libcurl 7.6.2: */ my_setopt_slist(curl, CURLOPT_TELNETOPTIONS, config->telnet_options); - +#endif /* new in libcurl 7.7: */ my_setopt_str(curl, CURLOPT_RANDOM_FILE, config->random_file); my_setopt_str(curl, CURLOPT_EGDSOCKET, config->egd_file); @@ -1367,9 +1372,10 @@ static CURLcode operate_do(struct GlobalConfig *global, my_setopt_str(curl, CURLOPT_SERVICE_NAME, config->service_name); +#ifndef CURL_DISABLE_FTP /* curl 7.13.0 */ my_setopt_str(curl, CURLOPT_FTP_ACCOUNT, config->ftp_account); - +#endif my_setopt(curl, CURLOPT_IGNORE_CONTENT_LENGTH, config->ignorecl?1L:0L); #ifndef CURL_DISABLE_FTP @@ -1385,10 +1391,11 @@ static CURLcode operate_do(struct GlobalConfig *global, my_setopt_str(curl, CURLOPT_LOCALPORTRANGE, config->localportrange); } +#ifndef CURL_DISABLE_FTP /* curl 7.15.5 */ my_setopt_str(curl, CURLOPT_FTP_ALTERNATIVE_TO_USER, config->ftp_alternative_to_user); - +#endif /* curl 7.16.0 */ if(config->disable_sessionid) /* disable it */ |