From edeb1ae65f903b216363dd4200ce33418dfd4eb4 Mon Sep 17 00:00:00 2001 From: Yang Tse Date: Mon, 22 Jul 2013 20:03:27 +0200 Subject: curl: fix symbolic names for CURL_NETRC_* enum in --libcurl output --- src/tool_operate.c | 6 +++--- src/tool_setopt.c | 7 +++++++ src/tool_setopt.h | 2 ++ 3 files changed, 12 insertions(+), 3 deletions(-) (limited to 'src') diff --git a/src/tool_operate.c b/src/tool_operate.c index 4df802967..292e3eb64 100644 --- a/src/tool_operate.c +++ b/src/tool_operate.c @@ -933,11 +933,11 @@ int operate(struct Configurable *config, int argc, argv_item_t argv[]) my_setopt(curl, CURLOPT_APPEND, config->ftp_append?1L:0L); if(config->netrc_opt) - my_setopt(curl, CURLOPT_NETRC, CURL_NETRC_OPTIONAL); + my_setopt_enum(curl, CURLOPT_NETRC, (long)CURL_NETRC_OPTIONAL); else if(config->netrc || config->netrc_file) - my_setopt(curl, CURLOPT_NETRC, CURL_NETRC_REQUIRED); + my_setopt_enum(curl, CURLOPT_NETRC, (long)CURL_NETRC_REQUIRED); else - my_setopt(curl, CURLOPT_NETRC, CURL_NETRC_IGNORED); + my_setopt_enum(curl, CURLOPT_NETRC, (long)CURL_NETRC_IGNORED); if(config->netrc_file) my_setopt(curl, CURLOPT_NETRC_FILE, config->netrc_file); diff --git a/src/tool_setopt.c b/src/tool_setopt.c index 19439923a..cb93e1117 100644 --- a/src/tool_setopt.c +++ b/src/tool_setopt.c @@ -104,6 +104,13 @@ const NameValue setopt_nv_CURLUSESSL[] = { NVEND, }; +const NameValue setopt_nv_CURL_NETRC[] = { + NV(CURL_NETRC_IGNORED), + NV(CURL_NETRC_OPTIONAL), + NV(CURL_NETRC_REQUIRED), + NVEND, +}; + /* These mappings essentially triplicated - see * tool_libinfo.c and tool_paramhlp.c */ const NameValue setopt_nv_CURLPROTO[] = { diff --git a/src/tool_setopt.h b/src/tool_setopt.h index 6aeaecbe6..ec07a96d3 100644 --- a/src/tool_setopt.h +++ b/src/tool_setopt.h @@ -52,6 +52,7 @@ extern const NameValue setopt_nv_CURL_SSLVERSION[]; extern const NameValue setopt_nv_CURL_TIMECOND[]; extern const NameValue setopt_nv_CURLFTPSSL_CCC[]; extern const NameValue setopt_nv_CURLUSESSL[]; +extern const NameValue setopt_nv_CURL_NETRC[]; extern const NameValue setopt_nv_CURLPROTO[]; extern const NameValueUnsigned setopt_nv_CURLAUTH[]; @@ -62,6 +63,7 @@ extern const NameValueUnsigned setopt_nv_CURLAUTH[]; #define setopt_nv_CURLOPT_TIMECONDITION setopt_nv_CURL_TIMECOND #define setopt_nv_CURLOPT_FTP_SSL_CCC setopt_nv_CURLFTPSSL_CCC #define setopt_nv_CURLOPT_USE_SSL setopt_nv_CURLUSESSL +#define setopt_nv_CURLOPT_NETRC setopt_nv_CURL_NETRC #define setopt_nv_CURLOPT_PROTOCOLS setopt_nv_CURLPROTO #define setopt_nv_CURLOPT_REDIR_PROTOCOLS setopt_nv_CURLPROTO #define setopt_nv_CURLOPT_PROXYTYPE setopt_nv_CURLPROXY -- cgit v1.2.3