Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Posting-Version: version B 2.10.2 9/18/84; site turtlevax.UUCP Path: utzoo!watmath!clyde!burl!ulysses!allegra!mit-eddie!genrad!decvax!decwrl!turtlevax!ken From: ken@turtlevax.UUCP (Ken Turkowski) Newsgroups: net.unix-wizards,net.lang.c Subject: Re: integer types, sys calls, and stdio Message-ID: <631@turtlevax.UUCP> Date: Sat, 12-Jan-85 23:02:49 EST Article-I.D.: turtleva.631 Posted: Sat Jan 12 23:02:49 1985 Date-Received: Mon, 14-Jan-85 05:09:19 EST References: <1997@mordor.UUCP> Reply-To: ken@turtlevax.UUCP (Ken Turkowski) Distribution: net Organization: CADLINC, Inc. @ Menlo Park, CA Lines: 35 Keywords: the meaning of "int" Xref: watmath net.unix-wizards:11500 net.lang.c:3867 In article <1997@mordor.UUCP> jdb@mordor.UUCP (John Bruner) writes: >Here at the S-1 Project at LLNL we are porting UNIX to our own >machine, the S-1 Mark IIA. The hardware is capable of operating >upon 9-bit, 18-bit, 36-bit, and 72-bit quantities, so we have >defined the following types: > > char = 9 bits (S-1 quarterword) > short = 18 bits (S-1 halfword) > int = 36 bits (S-1 singleword) > long = 72 bits (S-1 doubleword) ... >We can define our system calls to use "int" and "long" integers as >V7 does, but this means that we'll have to use 72-bit integers when >a 36-bit integer would nearly always suffice. This seems ugly to me. ... >One final recourse for us would be to admit defeat, change "long" >to 36-bits, and hack in a "long long" type for 72-bit integers. I >don't want to do this, because it means that while the definition of >integer types is machine dependent, the machine that they depend upon >is the PDP-11 or the VAX. Chars have always been 8 bits, shorts always 16, and longs always 32. I would suggest that you keep as close to this as possible. Int has varied between 16 and 32 bits; hell, why not make it 64? :-) viz, char = 9 bits (S-1 quarterword) short = 18 bits (S-1 halfword) long = 36 bits (S-1 singleword) int = 72 bits (S-1 doubleword) -- Ken Turkowski @ CADLINC, Menlo Park, CA UUCP: {amd,decwrl,nsc,seismo,spar}!turtlevax!ken ARPA: turtlevax!ken@DECWRL.ARPA