changeset 21:c0040f8fc49b

[Issue 2] Always wrap <wcharюрЮ with external "C" {}. It turns out that not only Visual Studio 6 requires this, but also newer versions when compiling for ARM.
author ipse.c99@d525d15b-5824-0410-80a3-6185d19c2cde
date Mon, 11 May 2009 21:27:45 +0000
parents 9be805b7c8c6
children ff2caa6b48d1
files stdint.h
diffstat 1 files changed, 5 insertions(+), 8 deletions(-) [+]
line wrap: on
line diff
--- a/stdint.h
+++ b/stdint.h
@@ -42,16 +42,13 @@
 
 #include <limits.h>
 
-// For Visual Studio 6 in C++ mode wrap <wchar.h> include with 'extern "C++" {}'
+// For Visual Studio 6 in C++ mode and for many Visual Studio versions when
+// compiling for ARM we should wrap <wchar.h> include with 'extern "C++" {}'
 // or compiler give many errors like this:
 //   error C2733: second C linkage of overloaded function 'wmemchr' not allowed
-#if (_MSC_VER < 1300) && defined(__cplusplus)
-   extern "C++" {
-#endif 
-#     include <wchar.h>
-#if (_MSC_VER < 1300) && defined(__cplusplus)
-   }
-#endif
+extern "C" {
+#   include <wchar.h>
+}
 
 // Define _W64 macros to mark types changing their size, like intptr_t.
 #ifndef _W64