diff options
| author | 2023-03-21 21:09:35 -0400 | |
|---|---|---|
| committer | 2023-03-21 21:09:35 -0400 | |
| commit | cf1be97f216b35ee1d9717d8c95a2eb907ecdd19 (patch) | |
| tree | eec927fe016f9e5ba2f74482617716d0f52fa0c1 | |
| parent | native: add support for enums and FILE* in setopt (diff) | |
native: add libcurl version detection
| -rw-r--r-- | jurl_enums.c | 4 | ||||
| -rw-r--r-- | jurl_setopt.c | 10 |
2 files changed, 9 insertions, 5 deletions
diff --git a/jurl_enums.c b/jurl_enums.c index 8df2c19..31a61b4 100644 --- a/jurl_enums.c +++ b/jurl_enums.c @@ -70,7 +70,9 @@ static const struct jurl_enum jurl_enums[] = { {CURLOPT_HTTP_VERSION, CURL_HTTP_VERSION_2TLS, "http-version/2tls"}, {CURLOPT_HTTP_VERSION, CURL_HTTP_VERSION_2_PRIOR_KNOWLEDGE, "http-version/2-prior-knowledge"}, {CURLOPT_HTTP_VERSION, CURL_HTTP_VERSION_3, "http-version/3"}, - /* {CURLOPT_HTTP_VERSION, CURL_HTTP_VERSION_3ONLY, "http-version/3only"}, */ +#if CURL_AT_LEAST_VERSION(7,88,0) + {CURLOPT_HTTP_VERSION, CURL_HTTP_VERSION_3ONLY, "http-version/3only"}, +#endif {CURLOPT_FTP_CREATE_MISSING_DIRS, CURLFTP_CREATE_DIR_NONE, "ftp-create-dir/none"}, {CURLOPT_FTP_CREATE_MISSING_DIRS, CURLFTP_CREATE_DIR, "ftp-create-dir/dir"}, diff --git a/jurl_setopt.c b/jurl_setopt.c index d3426da..a720eed 100644 --- a/jurl_setopt.c +++ b/jurl_setopt.c @@ -278,16 +278,18 @@ static const struct jurl_opt jurl_opts[] = { // SKIP: ssh-hostkeydata: callback // * websocket options - // not present on my system for some reason - /* {CURLOPT_WS_OPTIONS, "ws-options", JURL_PARAMTYPE_ENUM}, */ +#if CURL_AT_LEAST_VERSION(7,86,0) + {CURLOPT_WS_OPTIONS, "ws-options", JURL_PARAMTYPE_ENUM}, +#endif // * other options // SKIP: private: complex representation // SKIP: share: complex representation {CURLOPT_NEW_FILE_PERMS, "new-file-perms", JURL_PARAMTYPE_LONG}, {CURLOPT_NEW_DIRECTORY_PERMS, "new-directory-perms", JURL_PARAMTYPE_LONG}, - // not present on my system for some reason - /* {CURLOPT_QUICK_EXIT, "quick-exit", JURL_PARAMTYPE_BOOLEAN}, */ +#if CURL_AT_LEAST_VERSION(7,87,0) + {CURLOPT_QUICK_EXIT, "quick-exit", JURL_PARAMTYPE_BOOLEAN}, +#endif // * telnet options {CURLOPT_TELNETOPTIONS, "telnetoptions", JURL_PARAMTYPE_SLIST}, |
