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
This commit is contained in:
Vadim Zeitlin 2004-09-11 18:39:04 +00:00
parent 939a2e8010
commit 50531bd2bd

View File

@ -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 */
/* ---------------------------------------------------------------------------- */