Skip to content

Remove unnecessary includes, and shield POSIX-only includes

This fixes #29 (closed). For each of the headers listed there:

  • sys/types.h is unused and I removed it
  • sys/stat.h is used by the kernel cache to create directories; I moved it into the POSIX-only includes like unistd.h
  • pwd.h is used to get the user's home directory to find the location of the kernel cache on non-Windows system

I added some preprocessor guards to the kernel cache so that the various functions in the POSIX-only headers above are only used if those were successfully included.

Merge request reports