For quite a while we've had the issue that some type definitions were missing, most notably size_t when generating documentation for libgit2. We "solved" that by defining it ourselves when DOCURIUM is defined. This is clearly a terrible hack but we did not know what was happening.
Then in #39 we got errors about not finding stddef.h. Further investigation revealed that this was because that PR included a change to ask the library to print out errors.
It turns out that by default we do not include the directory in which clang stores its headers, which means we've been missing some necessary ones for quite some time now.
This PR queries clang for its include file by parsing its verbose output (inspiration from drothlis/clang-ctags#7) and passing it as an include path. We also remove -DDOCURIUM=1 as it should no longer be necessary.
For quite a while we've had the issue that some type definitions were missing, most notably
size_t
when generating documentation for libgit2. We "solved" that by defining it ourselves whenDOCURIUM
is defined. This is clearly a terrible hack but we did not know what was happening.Then in #39 we got errors about not finding
stddef.h
. Further investigation revealed that this was because that PR included a change to ask the library to print out errors.It turns out that by default we do not include the directory in which clang stores its headers, which means we've been missing some necessary ones for quite some time now.
This PR queries clang for its include file by parsing its verbose output (inspiration from drothlis/clang-ctags#7) and passing it as an include path. We also remove
-DDOCURIUM=1
as it should no longer be necessary.