[TUHS] The origins of portability in C
Rob Pike via TUHS
tuhs at tuhs.org
Fri Oct 3 11:52:00 AEST 2025
It was done for the port to the Interdata. To answer question 3, I often
heard (and early on, believed) that things like *p++ were invented for the
addressing modes on the PDP-11, but was told by Ken and Dennis that they
were not original.
-rob
On Fri, Oct 3, 2025 at 11:34 AM christopher fujino via TUHS <tuhs at tuhs.org>
wrote:
> I have often read things like, "`int`s in C are of unfixed size so that
> Unix could be ported." So I was surprised to read in Dennis Ritchie's "The
> Development of the C Language" that:
>
> PL/I, the implementation language of Multics, was not much to our
> > tastes, but we were also using other languages, including BCPL, and we
> > regretted losing the
> > advantages of writing programs in a language above the level of
> assembler,
> > such as ease of writ-
> > ing and clarity of understanding. At the time we did not put much weight
> > on portability; interest
> > in this arose later.
> >
>
> Brian Kernighan quotes Steve Johnson in "Unix: A History and a Memoir":
>
> There was another pressure to make Unix portable. A number of DEC's
> > competitors were beginning to grumble that regulated AT&T had too cozy a
> > relationship with DEC. We pointed out that there were no other machines
> > like the PDP-11 on the market, but this argument was getting weaker.
> > Dennis hooked me into the portability effort with one sentence: 'I think
> > that it would be easier to move Unix to another piece of hardware than to
> > rewrite an application to run under a different operating system.' I was
> > all in from that point on.
>
>
> A few questions:
>
> 1. Was Johnson's Portable C Compiler developed explicitly to port Unix, or
> was it already around?
> 2. And if it was already around, what was the initial motivation for
> creating a portable C compiler?
> 3. Am I right to assume that prior to the Portable C Compiler, C's
> primitives were thought of as PDP-11 specific?
>
> Thanks!
>
> Chris
>
More information about the TUHS
mailing list