1.在http://www.apuebook.com下载源代码Unix环境高级编程 源代码地址 http://www.linuxidc.com/Linux/2011-04/34826.htmUnix环境高级编程源码编译 http://www.linuxidc.com/Linux/2011-09/42503.htmapue.h头文件(Unix环境高级编程) http://www.linuxidc.com/Linux/2012-01/51729.htm《Unix环境高级编程》(第二版)apue.h的错误 http://www.linuxidc.com/Linux/2011-04/34662.htmUnix环境高级编程第二版读书笔记 http://www.linuxidc.com/Linux/2011-04/34235.htm《Unix环境高级编程》中apue.h的问题 http://www.linuxidc.com/Linux/2013-01/77686.htm 2. 查看READroot@Ubuntu:/home/wl/mywork/apue.2e# cat -n README 1 Read the file called DISCLAIMER. 2 3 Some source changes needed to be made after the book went out for the first 4 printing. I forgot to make corresponding changes in the source tree on the 5 system used to develop the book. The changes are summarized below. 6 7 1. lib/recvfd.c and sockets/recvfd.c - needed sys/uio.h on Mac OS X 8 2. lib/sendfd.c and sockets/sendfd.c - needed sys/uio.h on Mac OS X 9 3. stdio/buf.c - added code for Mac OS X 10 4. threadctl/suspend.c - changed wait to waitloc to avoid symbol definition 11 clash on Solaris 12 5. include/apue.h - FreeBSD compiles work better if we rely on the default 13 system settings. Solaris needed a different XOPEN_SOURCE definition 14 and also a CMSG_LEN definition. 15 16 To build the source, edit the Make.defines.* file for your system and set 17 WKDIR to the pathname of the tree containing the source code. Then just 18 run "make". It should figure out the system type and build the source for 19 that platform automatically. If you are running on a system other than 20 FreeBSD, Linux, Mac OS X, or Solaris, you"ll need to modify the makefiles 21 to include the settings for your system. Also, you"ll probably need to 22 modify the source code to get it to build on a different operating system. 23 The example source was compiled and tested using FreeBSD 5.2.1, Linux 2.4.22, 24 Mac OS X 10.3, and Solaris 9. 25 26 For FAQs, updated source code, and the lost chapter, see http://www.apuebook.com. 27 Please direct questions, suggestions, and bug reports to sar@apuebook.com. 28 29 Steve Rago 30 May 30, 2005 root@ubuntu:/home/wl/mywork/apue.2e#从第16行开始看到19行就可以了~~