Subject: Re: new sysctl(KERN_PROC, ...) interface (was: sysinfo(2))
To: Darren Reed <>
From: Chris G. Demetriou <>
List: tech-kern
Date: 04/17/2000 15:06:26
Darren Reed <> writes:
> > > 	#define PTRTOINT64(foo) ((u_int64_t)(long)(foo))
> I missed the original, but we should use intptr_t, not long here.
> It is architecture size dependant, of course.  IMHO, we use long
> too often where we should be using intptr_t.

Yes.  Of course, unless i'm mistaken, 'intptr_t' is a relative
newcomer, and most people haven't been educated as to the joys of its

if we're going there, as far as i'm concerned:

	* we should also be switching to uintNN_t (from u_intNN_t)
          type names, and

	* we should be using c9x-style printf format cpp magic to
          arrange for types to be printed correctly w/o having to
	  resort to weird casts.

Chris Demetriou - -
Disclaimer: Not speaking for NetBSD, just expressing my own opinion.