tech-kern archive

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

Re: setsockopt() compat issue



In message <200810200253.WAA21160%Sparkle.Rodents-Montreal.ORG@localhost>, der 
Mouse writ
es:
>I don't see why, any more than we have to introduce a non-standard
>primitive type for 24-bit integers today.

Well, today, it could be expressed as something like "int24_t", because
there's now verbiage in the standard to express the notion of new integer
types, a largest type, and so on.

In C89, the spec as written did not allow for types larger than long, and
it was "portable" to assume that long was the largest type.  Unfortunately,
many tens of thousands of lines of code were written around some variant of
the naive 32-bit assumptions of the time, and several large vendors concluded
that, if they wanted to keep getting money, they *HAD* to provide a "type
longer than long".  So they did, and C99, after much fussing, decided to
bless it (but fix the problem more thoroughly so it wouldn't happen again).

-s


Home | Main Index | Thread Index | Old Index