Source
The preceding section describes the configuration of the function of Library 1 in the UNIX Network Programming volume. But there is another configuration in volume 2, and the functions related to inter-process communication are not in volume 1.
It is inconvenient to use the two library functions. Now, all the functions in volume 1 in volume 2 are merged into the library functions in volume 1.
1. Create a UNIX Network Programming Volume 2 -- configure. h configuration file for inter-process communication
CD directory
./Configure
Then, the configure. h file is created.
2. Merge Configure. H files of UNIX Network Programming volumes 1 and 2
Add the macro definition of the configure. h header file generated above to configure. h of volume 1.
3. Add the functions not available in volume 1 in volume 2 wrapunix. C and wrapthread. C to the corresponding file in volume 1.
Add the header file and function declaration to unp. h.
4. Add files not found in volume 1, such as sleep_us.c, and add makefile function dependencies to make. defines.
Add the function declaration to unp. h.
Note: It is easy to look at, but it is difficult to operate. Be patient when you are critical. Note the addition of header files.