# ifdef __FreeBSD__
# undef _T
# endif
-# define _T(x) x
+
+# if !defined(__MINGW32__) || !defined(_T)
+# define _T(x) x
+# endif
// ctype.h functions
# define wxIsalnum isalnum
#if !defined(wxStricmp) && !wxUSE_UNICODE
# if defined(__BORLANDC__) || defined(__WATCOMC__) || defined(__SALFORDC__) || defined(__VISAGECPP__) || defined(__EMX__)
# define wxStricmp stricmp
+# define wxStrnicmp strnicmp
# elif defined(__SC__) || defined(__VISUALC__) || (defined(__MWERKS__) && defined(__INTEL__))
# define wxStricmp _stricmp
+# define wxStrnicmp _strnicmp
# elif defined(__UNIX__) || defined(__GNUWIN32__)
# define wxStricmp strcasecmp
+# define wxStrnicmp strncasecmp
# elif defined(__MWERKS__) && !defined(__INTEL__)
// use wxWindows' implementation
# else