title: How to use splint under linux with mingw
body: <p>I run debian linux actual stable with splint and mingw installed.
  I want to check my c code (which I need to compile with mingw, sorry) by splint. Simply adding the mingw-includes is not enough to run. I tried with defining <strong>GNU</strong> and i686 - but I'm sure more is needed. What further do I have to define or include?</p>
  
  <p>I tried the idea from <strong>loan</strong> resulting in a problem with <code>__builtin_va_list</code>.</p>
  
  <pre><code>Splint 3.1.2 --- 20 Feb 2009
  /usr/i686-w64-mingw32/include/vadefs.h:24:43: Parse Error:
      Suspect missing struct or union keyword: __builtin_va_list :
      int. (For help on parse errors, see splint -help parseerrors.)
  *** Cannot continue.
  </code></pre>
  
  <p>The funny thing is, that I can not find any definition for not - even with a recursive grep on the include folders. Am I searching wrong?<br>
  By defining it the way <code>-D__builtin_va_list=va_list</code> (from <strong>benjarobin</strong>) I ran into the error</p>
  
  <pre><code>Splint 3.1.2 --- 20 Feb 2009
  
  /home/ebelingb/.splintrc:229:1: Setting -stats redundant with current value
  /home/ebelingb/.splintrc:229:1: Setting -showsummary redundant with current
                                     value
  
  /usr/i686-w64-mingw32/include/winnt.h:2390:15:
      Parse Error. (For help on parse errors, see splint -help parseerrors.)
  *** Cannot continue.
  </code></pre>
  
  <p>which could not be recovered even by +trytorecover.</p>
  
  <p>The lines from winnt.h (and neighbouring) reads</p>
  
  <pre><code>2388    typedef struct _EXCEPTION_POINTERS {
  2389      PEXCEPTION_RECORD ExceptionRecord;
  2390      PCONTEXT ContextRecord;
  2391    } EXCEPTION_POINTERS,*PEXCEPTION_POINTERS;
  </code></pre>
  
  <p>Strange, isn't it?  </p>
  
  <p>Okay as this thread gets no further answers, I'll give some motivation by this <strong><em>minimal not working example</em></strong>:<br>
  Given a file <code>test.c</code></p>
  
  <pre><code>#include &lt;windows.h&gt;
  #include &lt;stdio.h&gt;
  #include &lt;time.h&gt;
  #define LOGFILEFORMAT "C:\\CBM\\log\\%Y%m%d.log"
  #define LOGTIMESTAMPFORMAT "%Y-%m-%d %H:%M:%S"
  int main() /*int argc,char **argv*/{
  Sleep(1234);
      return (0);
  }
  </code></pre>
  
  <p>and my <code>.splintrc</code></p>
  
  <pre><code>-I/usr/lib/gcc/i686-w64-mingw32/4.6/include
  -I/usr/lib/gcc/i686-w64-mingw32/4.6/include-fixed
  -I/usr/i686-w64-mingw32/include
  </code></pre>
  
  <p>the easy command <code>splint test.c</code> fails:</p>
  
  <pre><code>Splint 3.1.2 --- 20 Feb 2009
  
  /usr/i686-w64-mingw32/include/_mingw.h:480:29: Parse Error:
      Suspect missing struct or union keyword: __int64 :
      long int. (For help on parse errors, see splint -help parseerrors.)
  *** Cannot continue.
  </code></pre>
  
  <p>Again I do not know, how to setup. The includes above result from a preprocesing call of the compiler <code>i686-w64-mingw32-gcc</code>, which runs fine on <code>test.c</code>.</p>