Subject: Re: PTRTOINT64() / INT64TOPTR()
To: Klaus Klein <kleink@reziprozitaet.de>
From: Andrew Brown <atatat@atatdot.net>
List: tech-kern
Date: 02/18/2004 09:32:05
On Wed, Feb 18, 2004 at 01:11:16PM +0100, Klaus Klein wrote:
>On Tuesday 17 February 2004 23:31, Daniel Carosone wrote:
>> On Wed, Feb 18, 2004 at 09:17:58AM +1100, Simon Burge wrote:
>> > I wonder if <sys/sysctl.h> is the right place - the macro isn't
>> > sysctl-specific.  That said, I'm not sure where else.  <sys/param.h>
>> > seems like overkill.
>>
>> types.h or one of the inttypes variants under it?
>
>I'd prefer having it not appear in the standard headers.  First,
>there's the namespace issue.   Second, C99 doesn't really say
>that you can convert between pointers and uint64_t (note that
>the current implementation is using u_int64_t, and PTRTOUINT64()
>would be a slightly less confusing name); that's why there's
>uintptr_t, after all.

well...sys/sysctl.h isn't a standard header.

uintptr_t isn't wide enough for this particular purpose (and i'm not
sure why unsigned long isn't simply sufficient in either case).

since it's not *that* widely used yet (three places?), i don't mind
changing the name to be more pedantic.  :)

-- 
|-----< "CODE WARRIOR" >-----|
codewarrior@daemon.org             * "ah!  i see you have the internet
twofsonet@graffiti.com (Andrew Brown)                that goes *ping*!"
werdna@squooshy.com       * "information is power -- share the wealth."