What breaks? (was Re: 64 bit longs?)

Henry Spencer henry at zoo.toronto.edu
Tue Jan 22 06:00:08 AEST 1991


In article <1991Jan21.113942.24379 at watmath.waterloo.edu> datangua at watmath.waterloo.edu (David Tanguay) writes:
>|>>There is no portable way to declare a type with *exactly* 32 bits, ...
>|In that case, that machine is going to have real trouble declaring, say,
>|a TCP header structure.
>
>What about 36 bit machines? Or did you really mean "at least" 32 bits,
>and not "exactly"? If the TCP software requires an (non-bitfield) integral
>type of exactly 32 bits then it is the TCP software that is broken.

The TCP header, being part of a network protocol, is defined down to the bit
independently of any specific machine.  Its address fields, for example,
are 32 bits.  Not 31, not 33, and certainly not 36.  32 and only 32.
A machine with a sufficiently weird structure may have trouble declaring
a TCP header using a C struct.  That is the machine's problem.  The 36-bit
machines have a long history of difficulty in dealing with protocols and
devices built around 8/16/32 bit conventions; they cope using various
kludges.
-- 
If the Space Shuttle was the answer,   | Henry Spencer at U of Toronto Zoology
what was the question?                 |  henry at zoo.toronto.edu   utzoo!henry



More information about the Comp.lang.c mailing list