splint will not ignore system headers
===

Just recently, I decided to clean up my act and use splint to check my code. All went well with a buch of issues seen and dealt with. Then I noticed a compiler waring that splint overlooked. I had used isdigit() without including the ctype.h header. No problem - just drop in the appropriate #include <ctype.h>

Suddenly splint throws a fit with this output:

    /usr/include/sys/cdefs.h:540:30: #error Unknown architecture
      Preprocessing error. (Use -preproc to inhibit warning)
      In file included from /usr/include/sys/_types.h:32,
                 from /usr/include/_types.h:27,
                 from /usr/include/runetype.h:42,
                 from /usr/include/ctype.h:69,
                 from music.c:11

Now, I had set flags to prevent processing of system header. Or so I thought. I am also compiling for the STM32 so I really don't want the system include files in `/usr/include`.

Whatever I do, I can't seem to stop splint looking in the system path - which is not even defined with CPATH. It seems that all the previous checking has been using the system includes rather than the ones provided by the compiler. Here is my `.splintrc` file:

    -DUSE_STDPERIPH_DRIVER
    -DSTARTUP_FROM_RESET
    -DINITIALIZE_STACK
    -D__GNUC__
    -DUSE_FULL_ASSERT
    -shadow
    -fcnuse
    -I.
    -ILibraries/CMSIS/Include
    -ILibraries/CMSIS/ST/STM32F4xx/Include
    -ILibraries/STM32F4xx_StdPeriph_Driver/inc
    -I"/Applications/CrossWorks\ for\ ARM\ 2.2/include"
    -unrecogcomments
    +matchanyintegral
    -sysdirerrors
    +skip-sys-headers
    +sysdirs Libraries

Am I just making some stupid mistake or is this behaviour that I cannot change? I have only found one reference to this issue after a search and it was - typically - left unresolved. Others seem to have found splint just too hard to make work properly and abandoned it. I don't want to do that.

The preprocessng error is spurious here. If I use `-preproc` I just get a different error. The point is that splint is apparently ignoring my instruction about not parsing system headers and then looking in the wrong place anyway.