Note: _GNU_SOURCE needs to be defined before including header files so that the respective headers enable the features. For example: #define _GNU_SOURCE #include <stdio. h> #include <stdlib.
What is _xopen_source?
4. 147. When you do #define _XOPEN_SOURCE <some number> or cc -D_XOPEN_SOURCE=<some number> it tells your compiler to include definitions for some extra functions that are defined in the X/Open and POSIX standards.
What are feature test macros?
Feature test macros allow the programmer to control the definitions that are exposed by system header files when a program is compiled. ... The requirement that the macro must be defined before including any header file exists because header files may freely include one another.