On Thu, Mar 05, 2009 at 08:04:07AM -0500, Isaac Dupree wrote:
> > We've been using "unsigned long" for storing virtual addresses in the
> > Linux kernel for 10+ years and it works just fine.  :-)
> 
> and Linux kernel uses GCC compiler in precise ways
> 
> I believe that ptrdiff_t is the proper standardized type for an integer the 
> size of a pointer.  except... it's always signed :-)
> 
> Can you just use pointer types and pointer arithmetic?
> 
> also, standards aside, a common way to get such a type, is "configure" script 
> testing various possibilities like "unsigned long" and "unsigned long long" 
> and seeing which one is the right size for the target architecture. (not sure 
> if that works when cross-compiling though)

I think we're already using longs this way in quite a few places.  It's not
such a big deal IMHO.

-- 
Robert Millan

  The DRM opt-in fallacy: "Your data belongs to us. We will decide when (and
  how) you may access your data; but nobody's threatening your freedom: we
  still allow you to remove your data and not access it at all."


_______________________________________________
Grub-devel mailing list
Grub-devel@gnu.org
http://lists.gnu.org/mailman/listinfo/grub-devel

Reply via email to