# HG changeset patch # User ipse.c99@d525d15b-5824-0410-80a3-6185d19c2cde # Date 1171216385 0 # Node ID 334a223531224bf08c80f6135f816bbe8c789d0b # Parent 054398f65efe7b815e4aceee6ff6e9238e1815f3 More correct fix for compilation under VS6. diff --git a/stdint.h b/stdint.h --- a/stdint.h +++ b/stdint.h @@ -42,12 +42,16 @@ #include #include -#if _MSC_VER >= 1300 -// Include wchar.h only for Visual Studio 2002 or later. -// If you try using this header inside 'extern "C" {}' VS6 will give you bunch -// of compiler errors like this: + +// For Visual Studio 6 in C++ mode wrap include with 'extern "C++" {}' +// or compiler give many errors like this: // error C2733: second C linkage of overloaded function 'wmemchr' not allowed -# include +#if (_MSC_VER < 1300) && defined(__cplusplus) + extern "C++" { +#endif +# include +#if (_MSC_VER < 1300) && defined(__cplusplus) + } #endif // 7.18.1 Integer types