+#if (__BORLANDC__ >= 0x520)
+// BC++ 5.02 and later has broad tchar support
+# define HAVE_WCSLEN 1
+
+# include <tchar.h>
+
+# if wxUSE_UNICODE // temporary - preserve binary compatibility
+typedef _TCHAR wxChar;
+typedef _TSCHAR wxSChar;
+typedef _TUCHAR wxUChar;
+# else
+# define wxChar char
+# define wxSChar signed char
+# define wxUChar unsigned char
+# endif
+ // wchar_t is available
+# undef wxUSE_WCHAR_T
+# define wxUSE_WCHAR_T 1
+
+ // ctype.h functions
+# define wxIsalnum _istalnum
+# define wxIsalpha _istalpha
+# define wxIsctrl _istcntrl
+# define wxIsdigit _istdigit
+# define wxIsgraph _istgraph
+# define wxIslower _istlower
+# define wxIsprint _istprint
+# define wxIspunct _istpunct
+# define wxIsspace _istspace
+# define wxIsupper _istupper
+# define wxIsxdigit _istxdigit
+# define wxTolower _totlower
+# define wxToupper _totupper
+
+ // locale.h functons
+# define wxSetlocale _tsetlocale
+
+ // string.h functions
+# define wxStrcat _tcscat
+# define wxStrchr _tcschr
+# define wxStrcmp _tcscmp
+# define wxStrcoll _tcscoll
+# define wxStrcpy _tcscpy
+# define wxStrcspn _tcscspn
+# define wxStrftime _tcsftime
+# define wxStricmp _tcsicmp
+# define wxStrlen_ _tcslen // used in wxStrlen inline function
+# define wxStrncat _tcsncat
+# define wxStrncmp _tcsncmp
+# define wxStrncpy _tcsncpy
+# define wxStrpbrk _tcspbrk
+# define wxStrrchr _tcsrchr
+# define wxStrspn _tcsspn
+# define wxStrstr _tcsstr
+# define wxStrtod _tcstod
+// is there a _tcstok[_r] ?
+# define wxStrtol _tcstol
+# define wxStrtoul _tcstoul
+# define wxStrxfrm _tcsxfrm