My apue. h Configuration

Source: Internet
Author: User

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 );}

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.