X-Recipient: archive-cygwin@delorie.com
DomainKey-Signature: a=rsa-sha1; c=nofws; d=sourceware.org; h=list-id
	:list-unsubscribe:list-subscribe:list-archive:list-post
	:list-help:sender:mime-version:in-reply-to:references:date
	:message-id:subject:from:to:content-type; q=dns; s=default; b=iU
	r6oNF/18b20H24QiEI8han3B2m4mBr2hb8Gd9Zp0rRxMQKyOOautKuuEYbtRYJnZ
	ExNHZGcOem2/MtBwOw/6y1JWNRd3NnTw7gOvb+7NIOq3pqf2JgezkYJzDQ+3degK
	URi+97L01DGwwiS6vz2U0mM69d/WCnuybeZ/NdiRE=
DKIM-Signature: v=1; a=rsa-sha1; c=relaxed; d=sourceware.org; h=list-id
	:list-unsubscribe:list-subscribe:list-archive:list-post
	:list-help:sender:mime-version:in-reply-to:references:date
	:message-id:subject:from:to:content-type; s=default; bh=ZxMGLX9n
	/ISDCBWCfhnn2K81MvM=; b=g/HSX30bs1bSo8pm28aUk6dP5NwJ6eSvPOHPyY1S
	Vc1VSpqHuGmAwE3OfHzbtUQoaxnHtXM/v8S8q2/FRPjrPPQNZocosajl1Hj0Mxlm
	t4UeV7SsO2TcFodwKz7KMoGFuzOL3QXe/do8toTTJJc2oOCvKo+VB+vI9uuJcvrG
	pA8=
Mailing-List: contact cygwin-help@cygwin.com; run by ezmlm
List-Id: <cygwin.cygwin.com>
List-Subscribe: <mailto:cygwin-subscribe@cygwin.com>
List-Archive: <http://sourceware.org/ml/cygwin/>
List-Post: <mailto:cygwin@cygwin.com>
List-Help: <mailto:cygwin-help@cygwin.com>, <http://sourceware.org/ml/#faqs>
Sender: cygwin-owner@cygwin.com
Mail-Followup-To: cygwin@cygwin.com
Delivered-To: mailing list cygwin@cygwin.com
X-Spam-SWARE-Status: No, score=-2.2 required=5.0 tests=AWL,BAYES_00,FREEMAIL_FROM,KHOP_THREADED,RCVD_IN_DNSWL_LOW,RCVD_IN_HOSTKARMA_YE,SPF_PASS autolearn=ham version=3.3.1
MIME-Version: 1.0
X-Received: by 10.60.83.70 with SMTP id o6mr14709037oey.81.1366853501078; Wed, 24 Apr 2013 18:31:41 -0700 (PDT)
In-Reply-To: <51784CC0.7050304@t-online.de>
References: <51766C22.10702@bahnhof.se>	<51770372.4070408@t-online.de>	<20130424125930.GQ26397@calimero.vinschen.de>	<1UUzp1-23sI640@fwd56.aul.t-online.de>	<51784CC0.7050304@t-online.de>
Date: Wed, 24 Apr 2013 18:31:40 -0700
Message-ID: <CACUHbYNMqFwm0==4YBhB22VB203Ug34ww=tvJr=A_k-DLP86Xg@mail.gmail.com>
Subject: Re: Difference in 32/64-bit curl.
From: David Boyce <dsb@boyski.com>
To: cygwin@cygwin.com
Content-Type: text/plain; charset=ISO-8859-1

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

