svn commit: r314087 - head/sys/x86/x86

Rick Macklem rmacklem at uoguelph.ca
Sun Feb 26 21:49:44 UTC 2017


Warner Losh wrote:
> On Sun, Feb 26, 2017 at 5:44 AM, Konstantin Belousov <kostikbel at gmail.com> wrote:
> > On Sun, Feb 26, 2017 at 04:43:12AM +1100, Bruce Evans wrote:
> > 2.9 BSD was a port to PDP-11, AFAIK, with 16bit ints.
>
> A bit off topic, but 2BSD was basically[**] a continuation of Research
> Unix which started out life on the PDP-11 (well, OK, it started life
> in assembler on the PDP-7, but then was rewritten in C on the PDP-11).
More off topic...this C was defined by Dennis Richie (sp?) and I heard him
once say "ANSI C isn't a bad language, but it isn't C". It didn't have "unsigned int"
because he noted that a "char *" behaved the same, so why is it needed?

> Or a compiler more modern than K&R[*].
I could be wrong (lost my K&R C book long ago), but I think K&R had:
char - 1byte
short - 2bytes
long - 4 bytes
long long - 8bytes
int - whatever the arch preferred, with a minimum of 2bytes
(And, yes, Brian did disagree with Dennis and added "unsigned".)

Personally, I think "long" should have remained 4bytes on all arches
and that would have made code less painful to port...
(I could live with "int" assumed to be at least 4bytes.)

rick
ps: And, yes, I still prefer "old C", but suffer through the ANSIisms.;-)


More information about the svn-src-all mailing list