[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
Re: setsockopt() compat issue
On Sun, Oct 19, 2008 at 01:07:22PM +0200, Johnny Billquist wrote:
> How about the fact that the C standard says that an int should be the
> "native word size of the hardware"?
Where? I can find only a single place where "native" is used in the C99
specification and it should be noted that e.g. sizeof() is specified to
return size_t, not int. That makes it pretty clear that none of the
standard types is guarantied to always have the same size as a pointer
or even an index.
The very concept of "native word size" is fuzzy, as soon as hardware has
registers of different sizes. For most purposes size_t is reasonable,
but not always. It can be more efficient to use shorter registers, e.g.
on AMD64 you get shorter opcodes.
Main Index |
Thread Index |