Path: utzoo!utgpu!water!watmath!clyde!rutgers!cmcl2!beta!hc!ames!amelia!orville.nas.nasa.gov!fouts From: fouts@orville.nas.nasa.gov (Marty Fouts) Newsgroups: comp.arch Subject: Re: Re: More than 32 bits needed where? Message-ID: <219@amelia.nas.nasa.gov> Date: 20 Feb 88 21:17:39 GMT References: <235@unicom.UUCP> Sender: news@amelia.nas.nasa.gov Reply-To: fouts@orville.nas.nasa.gov (Marty Fouts) Lines: 36 In article <711@elxsi.UUCP> rw@beatnix.UUCP (Russell Williams) writes: >> > We tried making longs 64 bits and lots of programs wouldn't run, so >we put int=long=32 bits and added a "long long" type. Another example >of common practice along the lines of dereferencing null pointers. >Customers don't like being told their programs are non-portable ("fine, >I'll buy a Vax"), and of course we're stuck with fixing the AT&T and >Berkeley code. In the real world the portability of a C program is >not really defined by K&R but by what a Vax running Unix does. > I frequently use computers from two vendors with machines capable of 64 bit integer arithmetic. Amdahl also has a "long long" data type, but Cray bit the bullet and made long 64 bits. The Cray software people had to fix a lot of problems up front, but now they are in a better position for dealing with 64 bit addresses. Amdahl is going to have to face this problem soon anyway, because we need the ability to address files > 4 GB in length (generated on the Cray) on the Amdahl. Of course, under UTS lseek has a long (not long long) argument parameter because of all of the programs that would break if sizeof(long) != sizeof(int), so lseek won't work as is on these big files. So, if we are going to get > 4 GB files, we either need to change the lseek parameter to 64 bits (by either making it long long, or by making long 64 bits) or we have to invent a new system call (say "llseek" for seek with a long long parameter.) In either case, programs are going to break and have to be fixed. And none of the fixes are going to be trivial. More programs than if Amdahl had made long 64 bits in the first place. To me the moral of the story is that expediency *always* comes home to roost eventualy. C'est La Guerre. Marty