Make compatible with VS 2005 32 bits compiler #128

wants to merge 1 commit into

3 participants


No description provided.

@bnoordhuis bnoordhuis commented on the diff Oct 1, 2012
@@ -38,7 +38,9 @@
typedef unsigned __int32 uint32_t;
typedef __int64 int64_t;
typedef unsigned __int64 uint64_t;
+#if _MSC_VER<1400
bnoordhuis Oct 1, 2012 Node.js Foundation member

Why is this necessary and are you confident that it won't break MSVS 2008 or 2010?

juanper Oct 16, 2012

This is necessary because I'm using MSVS 2005 yet in production code. My company don't want move yours production code to MSVS 2010/12 yet but I need this parser to extend old code. And I don't want install other compiler only to build this code. I tested in my home computer using both MSVS 2005 and MSVS 2010 and works fine.


I confirm that this seems to be necessary for MSVC 2005, as discovered in udp/lacewing#60.


Actually, the same issue is apparently happening with VC 2008 (but somehow not for me).

The error is:

lacewing\src\webserver\http\../../../deps/http-parser/http_parser.h(41) : error C2371: 'size_t' : redefinition; different basic types
        predefined C++ types (compiler internal)(19) : see declaration of 'size_t'

It would be nice if an MSVC guru could give some guidance on this whole inttypes mess.


#141 seems to be the correct fix.

@bnoordhuis bnoordhuis added a commit that closed this pull request Dec 12, 2012
@udp udp Fix MSVS 2005 and 2008 missing size_t typdef.
Replace manual size_t typedef with stddef.h include

Fixes #128, #141.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment