-// check whether we should include wchar.h or equivalent
-# if !defined(wxUSE_WCHAR_T)
-# if defined(__VISUALC__) && (__VISUALC__ < 900)
-# define wxUSE_WCHAR_T 0 // wchar_t is not available for MSVC++ 1.5
-# elif defined(__UNIX__)
-# if defined(HAVE_WCSTR_H) || defined(HAVE_WCHAR_H) || defined(__FreeBSD__) || defined(__DARWIN__)
-# define wxUSE_WCHAR_T 1
-# else
-# define wxUSE_WCHAR_T 0
-# endif
-# elif defined(__GNUWIN32__) && !defined(__MINGW32__) // Cygwin (not Mingw32) doesn't have wcslen.h, needed in buffer.h
-# define wxUSE_WCHAR_T 0
-# elif defined(__BORLANDC__) // WIN16 BC++
-# define wxUSE_WCHAR_T 0
-# elif defined(__WATCOMC__)
-# define wxUSE_WCHAR_T 0
-# elif defined(__VISAGECPP__) && (__IBMCPP__ < 400)
-# define wxUSE_WCHAR_T 0
-# else
- // add additional compiler checks if this fails
-# define wxUSE_WCHAR_T 1
-# endif
-# endif // !defined(wxUSE_WCHAR_T)
-
-# if wxUSE_WCHAR_T
-# ifdef HAVE_WCHAR_H
- // include wchar.h to get wcslen() declaration used by wx/buffer.h
-# include <wchar.h>
-# elif defined(HAVE_WCSTR_H)
- // old compilers have wcslen() here
-# include <wcstr.h>
-# elif defined(__FreeBSD__) || defined(__DARWIN__) || defined(__EMX__)
- // include stdlib.h for wchar_t, wcslen is provided in wxchar.cpp
-# include <stdlib.h>
- size_t WXDLLEXPORT wcslen(const wchar_t *s);
-# endif // HAVE_WCHAR_H
-# endif // wxUSE_WCHAR_T
-
-// check whether we are doing Unicode
-# if wxUSE_UNICODE
-
-# include <wctype.h>
-
-// this is probably glibc-specific
-# if defined(__WCHAR_TYPE__)
-
-typedef __WCHAR_TYPE__ wxChar;
-typedef signed __WCHAR_TYPE__ wxSChar;
-typedef unsigned __WCHAR_TYPE__ wxUChar;
-
-# define _T(x) L##x
-
- // ctype.h functions (wctype.h)
-# define wxIsalnum iswalnum
-# define wxIsalpha iswalpha
-# define wxIsctrl iswcntrl
-# define wxIsdigit iswdigit
-# define wxIsgraph iswgraph
-# define wxIslower iswlower
-# define wxIsprint iswprint
-# define wxIspunct iswpunct
-# define wxIsspace iswspace
-# define wxIsupper iswupper
-# define wxIsxdigit iswxdigit
-
-# if defined(__GLIBC__) && (__GLIBC__ == 2) && (__GLIBC_MINOR__ == 0)
- // /usr/include/wctype.h incorrectly declares translations tables which
- // provokes tons of compile-time warnings - try to correct this
-# define wxTolower(wc) towctrans((wc), (wctrans_t)__ctype_tolower)
-# define wxToupper(wc) towctrans((wc), (wctrans_t)__ctype_toupper)
-# else
-# define wxTolower towlower
-# define wxToupper towupper
-# endif // gcc/!gcc
-
- // string.h functions (wchar.h)
-# define wxStrcat wcscat
-# define wxStrchr wcschr
-# define wxStrcmp wcscmp
-# define wxStrcoll wcscoll
-# define wxStrcpy wcscpy
-# define wxStrcspn wcscspn
-# define wxStrlen_ wcslen // used in wxStrlen inline function
-# define wxStrncat wcsncat
-# define wxStrncmp wcsncmp
-# define wxStrncpy wcsncpy
-# define wxStrpbrk wcspbrk
-# define wxStrrchr wcsrchr
-# define wxStrspn wcsspn
-# define wxStrstr wcsstr
-# define wxStrtod wcstod
-# define wxStrtok wcstok
-# define wxStrtol wcstol
-# define wxStrtoul wcstoul
-# define wxStrxfrm wcsxfrm
-
-// glibc doesn't have wc equivalents of the other stuff
-# define wxNEED_WX_STDIO_H
-# define wxNEED_WX_STDLIB_H
-# define wxNEED_WX_TIME_H
-
-# else//!glibc
-# error "Please define your compiler's Unicode conventions in wxChar.h"
-# endif
-# else//!Unicode
-
-# include <ctype.h>
-# include <string.h>
-
- typedef char wxChar;
- typedef signed char wxSChar;
- typedef unsigned char wxUChar;
-
-# if defined(__FreeBSD__) || defined(__DARWIN__)
-# undef _T
-# endif
-
-# if !defined(__MINGW32__) || !defined(_T)
-# define _T(x) x
-# endif
-
- // ctype.h functions
-# define wxIsalnum isalnum
-# define wxIsalpha isalpha
-# define wxIsctrl isctrl
-# define wxIsdigit isdigit
-# define wxIsgraph isgraph
-# define wxIslower islower
-# define wxIsprint isprint
-# define wxIspunct ispunct
-# define wxIsspace isspace
-# define wxIsupper isupper
-# define wxIsxdigit isxdigit
-# define wxTolower tolower
-# define wxToupper toupper