Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP

Loading…

Make compatible with VS 2005 32 bits compiler #128

Closed
wants to merge 1 commit into from

3 participants

@juanper

No description provided.

@bnoordhuis bnoordhuis commented on the diff
http_parser.h
@@ -38,7 +38,9 @@
typedef unsigned __int32 uint32_t;
typedef __int64 int64_t;
typedef unsigned __int64 uint64_t;
+#if _MSC_VER<1400

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

@juanper
juanper added a note

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
@udp

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

@udp

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.

@udp

#141 seems to be the correct fix.

@bnoordhuis bnoordhuis closed this pull request from a commit
@udp udp Fix MSVS 2005 and 2008 missing size_t typdef.
Replace manual size_t typedef with stddef.h include

Fixes #128, #141.
2b77aba
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Commits on Oct 1, 2012
  1. @juanper
This page is out of date. Refresh to see the latest.
Showing with 2 additions and 0 deletions.
  1. +2 −0  http_parser.h
View
2  http_parser.h
@@ -38,7 +38,9 @@ typedef __int32 int32_t;
typedef unsigned __int32 uint32_t;
typedef __int64 int64_t;
typedef unsigned __int64 uint64_t;
+#if _MSC_VER<1400

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

@juanper
juanper added a note

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
typedef SIZE_T size_t;
+#endif
typedef SSIZE_T ssize_t;
#else
#include <stdint.h>
Something went wrong with that request. Please try again.