File request-setopt-long.patch of Package libs3-20200523
--- src/request.c.orig 2020-05-23 10:23:54.000000000 -0600
+++ src/request.c 2025-10-20 20:57:20.884661991 -0600
@@ -1189,16 +1189,16 @@
// Ask curl to parse the Last-Modified header. This is easier than
// parsing it ourselves.
- curl_easy_setopt_safe(CURLOPT_FILETIME, 1);
+ curl_easy_setopt_safe(CURLOPT_FILETIME, (long) 1);
// Curl docs suggest that this is necessary for multithreaded code.
// However, it also points out that DNS timeouts will not be honored
// during DNS lookup, which can be worked around by using the c-ares
// library, which we do not do yet.
- curl_easy_setopt_safe(CURLOPT_NOSIGNAL, 1);
+ curl_easy_setopt_safe(CURLOPT_NOSIGNAL, (long) 1);
// Turn off Curl's built-in progress meter
- curl_easy_setopt_safe(CURLOPT_NOPROGRESS, 1);
+ curl_easy_setopt_safe(CURLOPT_NOPROGRESS, (long) 1);
// xxx todo - support setting the proxy for Curl to use (can't use https
// for proxies though)
@@ -1207,20 +1207,20 @@
// I think this is useful - we don't need interactive performance, we need
// to complete large operations quickly
- curl_easy_setopt_safe(CURLOPT_TCP_NODELAY, 1);
+ curl_easy_setopt_safe(CURLOPT_TCP_NODELAY, (long) 1);
// Don't use Curl's 'netrc' feature
curl_easy_setopt_safe(CURLOPT_NETRC, CURL_NETRC_IGNORED);
// Don't verify S3's certificate unless S3_INIT_VERIFY_PEER is set.
// The request_context may be set to override this
- curl_easy_setopt_safe(CURLOPT_SSL_VERIFYPEER, verifyPeer);
+ curl_easy_setopt_safe(CURLOPT_SSL_VERIFYPEER, (long) verifyPeer);
// Follow any redirection directives that S3 sends
- curl_easy_setopt_safe(CURLOPT_FOLLOWLOCATION, 1);
+ curl_easy_setopt_safe(CURLOPT_FOLLOWLOCATION, (long) 1);
// A safety valve in case S3 goes bananas with redirects
- curl_easy_setopt_safe(CURLOPT_MAXREDIRS, 10);
+ curl_easy_setopt_safe(CURLOPT_MAXREDIRS, (long) 10);
// Set the User-Agent; maybe Amazon will track these?
curl_easy_setopt_safe(CURLOPT_USERAGENT, userAgentG);
@@ -1229,12 +1229,12 @@
// less than 1K per second for more than 15 seconds.
// xxx todo - make these configurable
// xxx todo - allow configurable max send and receive speed
- curl_easy_setopt_safe(CURLOPT_LOW_SPEED_LIMIT, 1024);
- curl_easy_setopt_safe(CURLOPT_LOW_SPEED_TIME, 15);
+ curl_easy_setopt_safe(CURLOPT_LOW_SPEED_LIMIT, (long) 1024);
+ curl_easy_setopt_safe(CURLOPT_LOW_SPEED_TIME, (long) 15);
if (params->timeoutMs > 0) {
- curl_easy_setopt_safe(CURLOPT_TIMEOUT_MS, params->timeoutMs);
+ curl_easy_setopt_safe(CURLOPT_TIMEOUT_MS, (long) params->timeoutMs);
}
@@ -1293,16 +1293,16 @@
// Set request type.
switch (params->httpRequestType) {
case HttpRequestTypeHEAD:
- curl_easy_setopt_safe(CURLOPT_NOBODY, 1);
+ curl_easy_setopt_safe(CURLOPT_NOBODY, (long) 1);
break;
case HttpRequestTypePOST:
curl_easy_setopt_safe(CURLOPT_CUSTOMREQUEST, "POST");
- curl_easy_setopt_safe(CURLOPT_UPLOAD, 1);
+ curl_easy_setopt_safe(CURLOPT_UPLOAD, (long) 1);
break;
case HttpRequestTypePUT:
case HttpRequestTypeCOPY:
- curl_easy_setopt_safe(CURLOPT_UPLOAD, 1);
+ curl_easy_setopt_safe(CURLOPT_UPLOAD, (long) 1);
break;
case HttpRequestTypeDELETE:
curl_easy_setopt_safe(CURLOPT_CUSTOMREQUEST, "DELETE");