上QQ阅读APP看书,第一时间看更新
Libraries
Standard C not only defines a syntax, the environment, and how programs are linked, it also provides a set of libraries that may be leveraged by a programmer to perform system programming. Some of these libraries are as follows:
- errno.h: Provides the code needed for working with errors. This library will be discussed in further detail in Chapter 13, Error - Handling with Exceptions.
- inttypes.h: Provides type information, which will be discussed in Chapter 3, System Types for C and C++.
- limits.h: Provides information about the limits of each type, which will be discussed in Chapter 3, System Types for C and C++.
- setjump.h: Provides the APIs for C-style exception handling, which will be discussed in Chapter 13, Error - Handling with Exceptions.
- signal.h: Provides APIs for handling signals sent from the system to your program, which will be discussed in Chapter 5, Programming Linux/Unix Systems.
- stdbool.h: Provides type information, which will be discussed in Chapter 3, System Types for C and C++.
- stddef.h: Provides type information, which will be discussed in Chapter 3, System Types for C and C++.
- stdint.h: Provides type information, which will be discussed in Chapter 3, System Types for C and C++.
- stdio.h: Provides functions for working with input and output while system programming, which will be discussed in Chapter 6, Learning to Program Console Input/Output, and Chapter 8, Learning to Program File Input/Output.
- stdlib.h: Provides various utilities, including dynamic memory allocation APIs, which will be discussed in Chapter 7, A Comprehensive Look at Memory Management.
- time.h: Provides facilities for working with clocks, which will be discussed in Chapter 11, Time Interfaces in Unix.
As stated previously, the bulk of this book will focus on these facilities and how they support system programming.