The features.h header file provides various macro definitions that indicate standard compliance with other header files, i.e. which functions (hence the name) should be enabled or disabled depending on which standard the user wants to use.
Most C / C ++ compilers have command line options for standard compliance. Take GCC as an example: when you pass the -std=gnu9x , you request a GNU dialect of the C99 standard. The features.h header ensures that all other headers that include it will include those or other features that are necessary to support this particular dialect. This is achieved using #define -ing or #undef with some "intermediate" macros.
As a bonus, features.h also provides macros with glibc version information, as well as various other bits and beans.
source share