Modify or re-write the code in dosunix.c (which is the sample code) and compile and link it in the usual way. The module dip3.c be compiled and dip3.o should be included in the link.
To avoid compatibility problems with the code in the Unix compiler library be careful with byte alignment issues: DP4 programs expect data to be packed, for example by specifying the compilation option -Zp1
on SCO compilers, or through the use of #pragma pack(1) in source code on Linux. However on some implementations, especially Linux, the system header files will not work if you compile with single byte alignment. It is probable that you do not need to force byte alignment when writing an OSDI. However, if you do then the following technique generally avoids any problems:
In 4.5xx there should not be any name-space conflicts between functions in the standard C library and the DP4 library (ccown.a). In the event that there are, and you are using the conflicting functions from the Unix library, then you should link the DP4 library before your modules. However, please contact Itim Technology Solutions in this case.
Appropriate commands for compiling and linking are:
cc -o dip3 $(CFLAGS) dip3.c dipunix.c ccown.a
A sample makefile is or should be supplied with the Unix OSDI.