My apue. h is configured to download the compressed package of the src.tar.gzsource code at http://www.apuebook.com. 1. decompress the package to www.2cto.com in the/home/directory. 2. Enter/home/apue.2e and modify Make. defines. in linux, WKDIR =/home/xxx/apue.2e is WKDIR =/home/apue.2e 3. Then, go to the apue.2e/std directory and modify linux. mk: change all the nawk in it to awk. You can use this command: % s/nawk/awk/g 4. then, put the apue under the/home/godsoul/apue.2e/inlcude directory. h file and error in the/home/godsoul/apue.2e/lib directory. copy all c files to the/usr/include directory. finally, edit the copied apue. h file, add a line before the last line # endif # include "error. c "www.2cto.com 6. the prompt ARG_MAX is undefined, This can be modified. In apue.2e/include/apue. add a line in h: # define ARG_MAX 4096 open apue.2e/threadctl/getenv1.c and apue.2e/threadctl/getenv3.c, and add a line: # include "apue. h "7. after modification, make clean and re-make 8. open the 1-1 program and run the # include "apue. h "add a line below # include" error. c "# include" apue. h "# include" error. c "# include <dirent. h> int main (int argc, char * argv []) {DIR * dp; struct dirent * dirp; if (argc! = 2) err_quit ("usage: ls directory_name"); if (dp = opendir (argv [1]) = NULL) err_sys ("can't open % s", argv [1]); while (dirp = readdir (dp ))! = NULL) printf ("% s \ n", dirp-> d_name); closedir (dp); exit (0 );}