title: visual studio 2008 error C2371: 'int8_t' : redefinition; different basic types (http_parser.h)
body: <p>i try to compile simple c/c++ app that is using http_parser from node.js
  i also using libuv , and basically trying to compile <a href="https://github.com/philips/libuv-webserver/blob/master/webserver.c" rel="nofollow">this</a> example in windows.
  using visual studio 2008  </p>
  
  <p>but i getting this compilation error :</p>
  
  <pre><code>&gt;d:\dev\cpp\servers\libuv\libuv_http_server\http_parser.h(35) : error C2371: 'int8_t' : redefinition; different basic types
  1&gt;        d:\dev\cpp\servers\libuv\libuv-master\libuv-master\include\uv-private\stdint-msvc2008.h(82) : see declaration of 'int8_t'
  </code></pre>
  
  <p>the code in the http_parser.h file looks like this:</p>
  
  <pre><code>#include &lt;sys/types.h&gt;
  #if defined(_WIN32) &amp;&amp; !defined(__MINGW32__) &amp;&amp; (!defined(_MSC_VER) || _MSC_VER&lt;1600)
  #include &lt;BaseTsd.h&gt;
  #include &lt;stddef.h&gt;
  //#undef __int8
  typedef __int8 int8_t;
  typedef unsigned __int8 uint8_t;
  typedef __int16 int16_t;
  typedef unsigned __int16 uint16_t;
  typedef __int32 int32_t;
  typedef unsigned __int32 uint32_t;
  typedef __int64 int64_t;
  typedef unsigned __int64 uint64_t;
  #else
  #include &lt;stdint.h&gt;
  #endif
  </code></pre>
  
  <p>as you can see i tryed to undef it but it didnt worked.
  what can i do so it will pass compilation . 
  if i just remove it im getting this error :</p>
  
  <pre><code>http_parser.c(180) : error C2061: syntax error : identifier 'unhex'
  </code></pre>
  
  <p>on this code section :</p>
  
  <pre><code>static const int8_t unhex[256] =
    {-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1
    ,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1
    ,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1
    , 0, 1, 2, 3, 4, 5, 6, 7, 8, 9,-1,-1,-1,-1,-1,-1
    ,-1,10,11,12,13,14,15,-1,-1,-1,-1,-1,-1,-1,-1,-1
    ,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1
    ,-1,10,11,12,13,14,15,-1,-1,-1,-1,-1,-1,-1,-1,-1
    ,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1
    };
  </code></pre>
  
  <p>and many other sections that using int8_t</p>