[net.unix-wizards] #defines for portable code

day@kovacs.UUCP (David Yost) (08/02/84)

I have been developing and porting the Rand Editor to
different machines and systems for five years now.
(If you are interested in the significant recent
developments, mail or call 213-650-1089.)

#defined names that tell you the version of the
system, such as SYS5_2 or V7 are not the solution.
Among other problems, there are too many hacked
kernels out there, and many of the hacks are needed,
so you want your program to know they are there.

A large, sophisticated piece of software needs to
know things about the machine, the compiler, the
library functions, and the system calls.  My solution
to the porting issues has been to use two include
files: "c_env.h" for the machine and the compiler,
and "localenv.h" for the library and the kernel.

For more details, see net.sources.

	Dave Yost       213-650-1089