Style guides and portability

John R. MacMillan john at sco.COM
Fri Jan 18 05:50:44 AEST 1991


|At the risk of putting my foot in something unpleasant, I would like
|to say I believe INT32 & friends *are* of real value.  Sure, right now
|"long int" is 32 bits on any machine which supports it.  I firmly
|believe that in the relatively near future 64-bit & above machines
|will become a common reality.  I don't know what C, etc. will do to
|support 64-bit integers, but I *do* know that whatever it is, I will
|be able to port my code with at most a simple change of the type of
|INT32.  It helps me sleep at night ... :-)

If the new machine has a 32 bit integer type, perhaps.

I ported a large amount of software to a 64-bit machine, and one
application which broke most often used int16, int32, et al, so the
argument that simply using these constructs will allow upward
portability is not true.

Much of the confusion in this piece of software stemmed from the fact
that in some places int16 was thought of as being *at least* 16 bits
and in others it was *exactly* 16 bits.  The porting guide stated the
former, but obviously not all the developers adhered to it.  The
machine had no 16 bit integer type.
-- 
John R. MacMillan  | I guess I lied to you when I told you I like baseball
SCO Canada, Inc.   | It's not so much the game I like it's the hats.
john at sco.COM       |      -- barenaked ladies



More information about the Comp.lang.c mailing list