comparison stdint.h @ 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
comparison
equal deleted inserted replaced
20:9be805b7c8c6 21:c0040f8fc49b
40 #pragma once 40 #pragma once
41 #endif 41 #endif
42 42
43 #include <limits.h> 43 #include <limits.h>
44 44
45 // For Visual Studio 6 in C++ mode wrap <wchar.h> include with 'extern "C++" {}' 45 // For Visual Studio 6 in C++ mode and for many Visual Studio versions when
46 // compiling for ARM we should wrap <wchar.h> include with 'extern "C++" {}'
46 // or compiler give many errors like this: 47 // or compiler give many errors like this:
47 // error C2733: second C linkage of overloaded function 'wmemchr' not allowed 48 // error C2733: second C linkage of overloaded function 'wmemchr' not allowed
48 #if (_MSC_VER < 1300) && defined(__cplusplus) 49 extern "C" {
49 extern "C++" { 50 # include <wchar.h>
50 #endif 51 }
51 # include <wchar.h>
52 #if (_MSC_VER < 1300) && defined(__cplusplus)
53 }
54 #endif
55 52
56 // Define _W64 macros to mark types changing their size, like intptr_t. 53 // Define _W64 macros to mark types changing their size, like intptr_t.
57 #ifndef _W64 54 #ifndef _W64
58 # if !defined(__midl) && (defined(_X86_) || defined(_M_IX86)) && _MSC_VER >= 1300 55 # if !defined(__midl) && (defined(_X86_) || defined(_M_IX86)) && _MSC_VER >= 1300
59 # define _W64 __w64 56 # define _W64 __w64