X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/129db666f1d5e578f94291a1514d9af7ea46d380..31988931ca21eb21a493db848dc948433599389c:/include/wx/wxchar.h diff --git a/include/wx/wxchar.h b/include/wx/wxchar.h index 6b82bc62f4..a8ce78ad9f 100644 --- a/include/wx/wxchar.h +++ b/include/wx/wxchar.h @@ -12,7 +12,7 @@ #ifndef _WX_WXCHAR_H_ #define _WX_WXCHAR_H_ -#ifdef __GNUG__ +#if defined(__GNUG__) && !defined(__APPLE__) #pragma interface "wxchar.h" #endif @@ -239,6 +239,8 @@ // ---------------------------------------------------------------------------- #ifdef wxHAVE_TCHAR_SUPPORT + #include + // ctype.h functions #define wxIsalnum _istalnum #define wxIsalpha _istalpha @@ -309,6 +311,13 @@ #define wxVsscanf _vstscanf #define wxVsprintf _vstprintf + // special case: not all TCHAR-aware compilers have those + #if defined(__VISUALC__) || \ + (defined(__BORLANDC__) && __BORLANDC__ >= 0x540) + #define wxVsnprintf_ _vsntprintf + #define wxSnprintf_ _sntprintf + #endif + // special case: these functions are missing under Win9x with Unicows so we // have to implement them ourselves #if wxUSE_UNICODE_MSLU @@ -396,6 +405,8 @@ #define wxPuts putws #define wxFputs fputws #else + #define wxNEED_FPUTWC + #include int wxFputs(const wxChar *ch, FILE *stream); @@ -574,22 +585,21 @@ WXDLLEXPORT bool wxOKlibc(); // for internal use We define function with a trailing underscore here because the real one is a wrapper around it as explained below */ -#ifdef wxHAVE_TCHAR_SUPPORT - #define wxVsnprintf_ _vsntprintf - #define wxSnprintf_ _sntprintf -#else // !TCHAR +#ifndef wxVsnprintf_ #if wxUSE_UNICODE #if defined(HAVE_VSWPRINTF) #define wxVsnprintf_ vswprintf #endif #else // ASCII - #if (defined(HAVE_VSNPRINTF) || defined(__WXMAC__)) + // all versions of CodeWarrior supported by wxWindows apparently have + // vsnprintf() + #if defined(HAVE_VSNPRINTF) || defined(__MWERKS__) // assume we have snprintf() too if we have vsnprintf() #define wxVsnprintf_ vsnprintf #define wxSnprintf_ snprintf #endif #endif -#endif // TCHAR/!TCHAR +#endif // wxVsnprintf_ not defined yet #ifndef wxVsnprintf_ // no [v]snprintf(), cook our own