Difficulties - stat struct
- The header files are accurate
- … but extremely difficult to follow
- e.g. #include <sys/stat.h> brings in 11 different files, and defines 60 typedefs
- Searching through these is painful
- Fortunately cpp to the rescue
- cpp loads all the relevant files
- … and replaces macro definitions
- … leaving less abstracted code
- … that is easier to follow
- … as all definitions in this one output file
- … and only the correct definition for this platform (e.g. for timespec)