OS X system headers have a bunch of custom attributes that do not mimic exactly the syntax of GCC attributes in the Linux headers, so make the parser more permissive to get around that (the parser ignores attributes anyway).
One of the OS X headers also uses #include "..." expecting the include file to be found in the same search path as the regular #include <...>, we work around that (probably not in the best way).
Finally, one of the OS X system headers has a function that takes a block, we now accept that and treat it just as a regular function pointer.
Great, thanks for digging this stuff! I adjusted the indentation level in some blocks and added a comment about the system-include location path in case we need to remember this in the future.
OS X system headers have a bunch of custom attributes that do not mimic exactly the syntax of GCC attributes in the Linux headers, so make the parser more permissive to get around that (the parser ignores attributes anyway).
One of the OS X headers also uses
#include "..."
expecting the include file to be found in the same search path as the regular#include <...>
, we work around that (probably not in the best way).Finally, one of the OS X system headers has a function that takes a block, we now accept that and treat it just as a regular function pointer.