[Linux.System.Programming(2007.9)].Robert.Love.文字
Nearly all of the examples in this book are self-contained. This means you can easily copy them into your text editor, and put them to actual use. Unless otherwise mentioned, all of the code snippets should build without any special compiler flags. (In a few cases, you need to link with a special library.) I recommend the following command to compile a source file:
$ gcc -Wall -Wextra -O2 -g -o snippet snippet.c
This compiles the source file snippet.c into the executable binary snippet, enabling many warning checks, significant but sane optimizations, and debugging. The code in this book should compile using this command without errors or warnings—although of course, you might have to build a skeleton program around the snippet first.
When a section introduces a new function, it is in the usual Unix manpage format with a special emphasized font, which looks like this:
#include <fcntl.h>
int posix_fadvise (int fd, off_t pos, off_t len, int advice);
The required headers, and any needed definitions, are at the top, followed by a full prototype of the call.
资源链接
标签
发布日期
2017-06-04
擦亮日期
2017-06-04