| |
|
|
|
cURL Mailing List Monthly Index Single Mail
curl-library Archives
Re: CURLAUTH_ONLY definition and usage
From: Yang Tse <yangsita_at_gmail.com>
Date: Wed, 18 Apr 2012 18:12:25 +0200
2012/4/17, Daniel Stenberg wrote:
>> Ok. Although url.c:1485 provides a couple of 'features' that I'm not sure
I'll leave those 'adjustments' for later on, given that these are just
I really want we focus first on the CURLAUTH_* constants and
1) Current definition of CURLAUTH_ONLY as (1<<31) is not a valid 32bit
2) First appealling idea is to define it as (1U<<31) making all
3) CURLAUTH_* bitmasks are or'ed together and passed to
On systems where sizeof(long) is greater than sizeof(int), and current
We can avoid bitmask bits moving around when passed through
And given that on systems with a 32bit long, (1L<<31) is not yet a
3) I believe that we should change CURLAUTH_* bitmasks to become
Now we have two options for the definition..
The nice looking one which should work nearly with any compiler:
#define CURLAUTH_ONLY (1UL<<31)
Or a not so nice looking one which should work with all compilers:
#define CURLAUTH_ONLY (((unsigned long)1)<<31)
Basically thats my reasoning.
-- -=[Yang]=- ------------------------------------------------------------------- List admin: http://cool.haxx.se/list/listinfo/curl-library Etiquette: http://curl.haxx.se/mail/etiquette.htmlReceived on 2012-04-18 These mail archives are generated by hypermail. |
Page updated January 05, 2012.
web site info