cURL / Mailing Lists / curl-library / Single Mail

curl-library

Re: Any explanation behind the value of CURLAUTH_ONLY?

From: Dan Fandrich <dan_at_coneharvesters.com>
Date: Wed, 14 Jan 2015 23:33:06 +0100

On Wed, Jan 14, 2015 at 05:59:00PM +0100, Daniel Stenberg wrote:
> On Tue, 13 Jan 2015, Dan Fandrich wrote:
>
> >The interpretation of these bits as a signed or unsigned number will
> >differ, but since libcurl treats the result as a raw set of bits, it
> >doesn't really matter.
>
> That's also why the values are defined using typecasts to unsigned long.
>
> >This treatment encourages sloppy and nonportable programming practises but
> >in this case it works out in the end.
>
> Probably wasn't the most clever value to pick. I'm not always as bright as I
> want to be! =)

I was actually talking about how sloppy C lets you be in mixing types in such a
way that things suddenly (and sometimes subtly) breaks on a different
architecture. Adding an explicit cast as in this case is about all you can do
to mitigate this on the libcurl side.

>>> Dan
-------------------------------------------------------------------
List admin: http://cool.haxx.se/list/listinfo/curl-library
Etiquette: http://curl.haxx.se/mail/etiquette.html
Received on 2015-01-14