restore casts in docs

This commit is contained in:
Viktor Szakats 2025-07-28 02:38:49 +02:00
parent af22a19ced
commit 2985b559e9
No known key found for this signature in database
GPG key ID: B5ABD165E2AEF201
4 changed files with 5 additions and 4 deletions

View file

@ -61,7 +61,7 @@ int main(void)
curl_easy_setopt(curl, CURLOPT_URL, "ftp://example.com/file.txt");
curl_easy_setopt(curl, CURLOPT_USE_SSL, CURLUSESSL_TRY);
/* funny server, ask for SSL before TLS */
curl_easy_setopt(curl, CURLOPT_FTPSSLAUTH, CURLFTPAUTH_SSL);
curl_easy_setopt(curl, CURLOPT_FTPSSLAUTH, (long)CURLFTPAUTH_SSL);
res = curl_easy_perform(curl);
curl_easy_cleanup(curl);
}

View file

@ -67,7 +67,7 @@ int main(void)
curl_easy_setopt(curl, CURLOPT_URL,
"ftp://example.com/non-existing/new.txt");
curl_easy_setopt(curl, CURLOPT_FTP_CREATE_MISSING_DIRS,
CURLFTP_CREATE_DIR_RETRY);
(long)CURLFTP_CREATE_DIR_RETRY);
res = curl_easy_perform(curl);

View file

@ -68,7 +68,8 @@ int main(void)
if(curl) {
CURLcode res;
curl_easy_setopt(curl, CURLOPT_URL, "ftp://example.com/1/2/3/4/new.txt");
curl_easy_setopt(curl, CURLOPT_FTP_FILEMETHOD, CURLFTPMETHOD_SINGLECWD);
curl_easy_setopt(curl, CURLOPT_FTP_FILEMETHOD,
(long)CURLFTPMETHOD_SINGLECWD);
res = curl_easy_perform(curl);

View file

@ -63,7 +63,7 @@ int main(void)
curl_easy_setopt(curl, CURLOPT_URL, "ftp://example.com/file.txt");
curl_easy_setopt(curl, CURLOPT_USE_SSL, CURLUSESSL_CONTROL);
/* go back to clear-text FTP after authenticating */
curl_easy_setopt(curl, CURLOPT_FTP_SSL_CCC, CURLFTPSSL_CCC_ACTIVE);
curl_easy_setopt(curl, CURLOPT_FTP_SSL_CCC, (long)CURLFTPSSL_CCC_ACTIVE);
res = curl_easy_perform(curl);
curl_easy_cleanup(curl);
}