News for hackers. Stuff that matters.
Re:Large Unix programs were historically not all that portab... by grymoire1 on Saturday September 04, 2021 @12:04PM (#28416255)
I remember one C book that described a way to write portable code. There were three phases in the header files: (1) The vendor, (2) The characteristics, (3) a portable layer on the system calls. So the first would define VAX, SUN, etc. The second would use the first section to define LITTLE_ENDIAN, BIG_ENDIAN, HAS_IOCTL, etc. And the third would implement a portable layer on top of the system calls. It was nice to compile because section 1 would often be defined automatically by the pre-processor, and the rest would just be defined properly. No config was needed to compile - you just types "make".

Alas - this was extra work on the developer, and at the time there were a zillion variations, which a developer had to deal with.

There are no comments on this comment yet.