Merge the library functions of UNIX Network Programming Volume 2 into the library functions of volume 1.

Source: Internet
Author: User

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.

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.