#defines for portable code

David Yost day at kovacs.UUCP
Thu Aug 2 17:02:35 AEST 1984


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



More information about the Comp.unix.wizards mailing list