This is the mail archive of the
cygwin
mailing list for the Cygwin project.
Re: Difference in 32/64-bit curl.
- From: David Boyce <dsb at boyski dot com>
- To: cygwin at cygwin dot com
- Date: Wed, 24 Apr 2013 18:31:40 -0700
- Subject: Re: Difference in 32/64-bit curl.
- References: <51766C22 dot 10702 at bahnhof dot se> <51770372 dot 4070408 at t-online dot de> <20130424125930 dot GQ26397 at calimero dot vinschen dot de> <1UUzp1-23sI640 at fwd56 dot aul dot t-online dot de> <51784CC0 dot 7050304 at t-online dot de>
On Wed, Apr 24, 2013 at 2:21 PM, Christian Franke
<Christian.Franke@t-online.de> wrote:
>>>
>>> Yes, option is possibly set as int (bool) but retrieved as long:
>
>
> Is this possibly an upstream bug which is hidden on Linux et al. due to a different x64 ABI (which requires register parameter zero extension) ?
Very possible. In my previous experience of libcurl, all integral
option values need to be cast to long in the curl_easy_setopt()
function call. Here's what the manual
(http://curl.haxx.se/libcurl/c/curl_easy_setopt.html) says:
"curl_easy_setopt() is used to tell libcurl how to behave. By using
the appropriate options to curl_easy_setopt, you can change libcurl's
behavior. All options are set with the option followed by a parameter.
That parameter can be a long, a function pointer, an object pointer or
a curl_off_t, depending on what the specific option expects."
It's very common for libcurl users to get into trouble by passing "1"
when they mean "1L" or "(long)1". So common that the curl command
itself may be guilty of the same mistake.
-David
--
Problem reports: http://cygwin.com/problems.html
FAQ: http://cygwin.com/faq/
Documentation: http://cygwin.com/docs.html
Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple