From: Charles F. Von Rospach <CHUQUI at MIT-MC>
Date: 7 December 1982 21:47-EST
Here is a summary of replies I got to my request for differences between
Vax Unix and PDP-11 Unix (both machine and documentation). My thanks for
all those who took time to send me notes.
The big change is (of course) the size of various variables. On the PDP-11,
int and unsigned are 16bits, on the Vax, they are 32bits. This creates a
significant problem where programs written for one machine make size
assumptions. I have found two problems with this so far:
1> A program I am porting is made some assumptions about the size of int
in a bitmap, so when it changed to 32bits, it went whacko. I am still
trying to straighten it out.
2> I caught myself writing a program where I was putting large numbers
(ie 821231) into an int. This is great on the Vax, but if I ever try to
move this program to the PDP-11, there is going to be trouble.
In both cases, there does not seem to be a way to get lint to scream about
this. I don't know if this blindness can be fixed (how do you tell a
program what size numbers you are going to use?), but it creates significant
BH at SU-AI passed along the fact that yacc defines one of its variables as
short instead of int. This creates a problem transporting yacc grammars to
It was pointed out that there was a problem with the -O option of cc, in that
it creates bad code in some occasions. Someone want to post a routine that
fails so those of us who don't know if our compilers have been fixed can test
One final discrrepancy I have found is that the manual pages for time(2) and
ctime(3) are incorrect. Both dewscribe the pointer variable for time() as
being long, when on the Vax, at least, it is of type time_t, and the file
<sys/types.h> needs to be included.
If you know of any additional problems between these two machines, let me
know, and I will try to keep the net updated.
chuck (chuqui at mit-mc)