tech-kern archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: setsockopt() compat issue



On Fri, Oct 17, 2008 at 02:58:11PM -0400, der Mouse wrote:
> >> It affects only 64bit platforms anyway ...
> > Out of interest, would this always affect 64-bit platforms?  I
> > thought somehow that they used 64-bit ints in any case in which case
> > this would not bite..
> 
> I think all NetBSD's current 64-bit platforms still use 32-bit ints
> (it's longs and pointers that are 64-bit).
> 
> Arguably this is wrong, since int is supposed to be the machine's
> native word size.  Why it was done this way I don't know - I didn't
> make that choice and can't recall anything even hinting at why it was
> made the way it was.

One reason I've heard is that it helps minimize the space impact of
a 64-bit system because any data type that doesn't have long or
pointer values in it stays the same size.
Of course, it seems like most structures I see _do_ have pointers
in them, so that reasoning doesn't really apply.

eric


Home | Main Index | Thread Index | Old Index