From 50531bd2bd35e65179eeb38bba412cdcc5899bd3 Mon Sep 17 00:00:00 2001 From: Vadim Zeitlin Date: Sat, 11 Sep 2004 18:39:04 +0000 Subject: [PATCH] define wxWCHAR_T_IS_REAL_TYPE macro: 1 for compilers having real wchar_t native type and 0 for broken ones which define it as a typedef git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@29093 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- include/wx/defs.h | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) diff --git a/include/wx/defs.h b/include/wx/defs.h index 6fc8a46f85..5a04a4f19c 100644 --- a/include/wx/defs.h +++ b/include/wx/defs.h @@ -817,6 +817,24 @@ typedef float wxFloat32; typedef double wxDouble; #endif +/* + Some (non standard) compilers typedef wchar_t as an existing type instead + of treating it as a real fundamental type, set wxWCHAR_T_IS_REAL_TYPE to 0 + for them and to 1 for all the others. + */ +#if wxUSE_WCHAR_T + /* + VC++ typedefs wchar_t as unsigned short by default, that is unless + /Za or /Zc:wchar_t option is used in which case _WCHAR_T_DEFINED is + defined. + */ +# if defined(__VISUALC__) && !defined(_NATIVE_WCHAR_T_DEFINED) +# define wxWCHAR_T_IS_REAL_TYPE 0 +# else /* compiler having standard-conforming wchar_t */ +# define wxWCHAR_T_IS_REAL_TYPE 1 +# endif +#endif /* wxUSE_WCHAR_T */ + /* ---------------------------------------------------------------------------- */ /* byte ordering related definition and macros */ /* ---------------------------------------------------------------------------- */ -- 2.45.2