[COFF] [TUHS] Re: Hypothetical: Could MULTICS have been written in C, if available?
Peter Pentchev via COFF
coff at tuhs.org
Wed May 27 23:16:25 AEST 2026
On Wed, May 27, 2026 at 04:15:03PM +0300, Peter Pentchev wrote:
> On Wed, May 27, 2026 at 06:49:42AM -0400, Noel Chiappa via COFF wrote:
> > > From: Larry McVoy
> >
> > > From BitKeeper's libc/style.h
> > > ...
> > > typedef signed char i8;
> > > typedef signed short i16;
> > > typedef signed int i32;
> > > typedef signed long long i64;
> >
> > As I've mentioned before, I did something similar for portable networking
> > code we wrote at MIT; our types were all 'xxxy', where 'xxx' were the
> > semantics (signed integer, unsigned integer, none, etc) and 'y' was the size
> > - but richer than the above list: in addition to 8,16,32 (used for giving
> > packet formats) we also had 'f' (at least 16 bits, but whatever was fastest
> > on the architecture/compiler at hand - 16 bits on the early MC68000's); 'w'
> > (the word lenth - address size - of the machine); etc.
> >
> > The resultant code was wonderfully portable; I once, on a bet, managed to
> > move our portable real-time OS (written with these declarations) to a new
> > machine (the AMD 29000) literally overnight; I pulled an all-nighter, and
> > it was runing when people got there the next morning.
> >
> > > those have worked for the last 27 years on pretty much every platform,
> >
> > In that later era, OK. They would not have worked in mine; on a PDP-11, an
> > 'int' was 16 bits. (I wonder how long an 'int' is on modern 64-bit
> > architectures? They probably had to keep it at 32 bits, or it would have
> > broken too much code
>
> Correct, it is 32 bits on most architectures.
>
> > - or was it defined to always be 32 bits in later C specs?)
>
> No, the C standard has never mandated exact sizes for any of those types.
...of course, with the exception, mentioned in my previous e-mail, of
the stdint.h header in C99 and later which defines uint32_t, int16_t, etc.
G'luck,
Peter
--
Peter Pentchev roam at ringlet.net roam at debian.org peter at morpheusly.com
PGP key: https://www.ringlet.net/roam/roam.key.asc
Key fingerprint 2EE7 A7A5 17FC 124C F115 C354 651E EFB0 2527 DF13
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 833 bytes
Desc: not available
URL: <http://www.tuhs.org/pipermail/coff/attachments/20260527/747e8ee0/attachment.sig>
More information about the COFF
mailing list