# define HAVE_WCSLEN 1
# include <tchar.h>
+
# if wxUSE_UNICODE // temporary - preserve binary compatibility
typedef _TCHAR wxChar;
typedef _TSCHAR wxSChar;
typedef signed __WCHAR_TYPE__ wxSChar;
typedef unsigned __WCHAR_TYPE__ wxUChar;
-# define T(x) L##x
+# define _T(x) L##x
// ctype.h functions (wctype.h)
# define wxIsalnum iswalnum
# endif
# ifdef __FreeBSD__
-# undef T
+# undef _T
+# endif
+
+# if !defined(__MINGW32__) || !defined(_T)
+# define _T(x) x
# endif
-# define T(x) x
// ctype.h functions
# define wxIsalnum isalnum
WXDLLEXPORT size_t wxStrftime(wxChar *s, size_t max, const wxChar *fmt, const struct tm *tm);
#endif
+// although global macros with such names are really bad, we want to have
+// another name for _T() which should be used to avoid confusion between _T()
+// and _() in wxWindows sources
+#define wxT(x) _T(x)
+
// a Unicode-friendly __FILE__ analog
#ifndef __TFILE__
- #define __XFILE__(x) T(x)
+ #define __XFILE__(x) wxT(x)
#define __TFILE__ __XFILE__(__FILE__)
#endif