This is the mail archive of the cygwin mailing list for the Cygwin project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: Difference in 32/64-bit curl.


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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]