+#include "wx/stringimpl.h"
+
+// wint_t is just a typedef for wchar_t for many old compilers but for modern
+// ones it's a separate type and we must provide a conversion to it to allow
+// passing wxUniChar[Ref] to functions taking wint_t such as iswalnum() &c
+#if (defined(__GNUC__) && !defined(__DARWIN__) && !defined(__OS2__)) || \
+ (defined(__VISUALC__) && defined(_NATIVE_WCHAR_T_DEFINED))
+ #define wxWINT_T_IS_SEPARATE_TYPE
+#endif
+
+// helper macro for doing something dependent on whether wint_t is or isn't a
+// typedef inside another macro
+#ifdef wxWINT_T_IS_SEPARATE_TYPE
+ #define wxIF_WINT_T_TYPE(x) x
+#else // !wxWINT_T_IS_SEPARATE_TYPE
+ #define wxIF_WINT_T_TYPE(x)
+#endif // wxWINT_T_IS_SEPARATE_TYPE/!wxWINT_T_IS_SEPARATE_TYPE
+
+// wchar_t seems to be defined as unsigned short by all Windows compilers but
+// unsigned int everywhere else
+#ifndef __WIN32__
+ #define wxWCHAR_T_IS_UINT
+#endif