X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/386d53dc2e27c5f0e5c0d34fd50e3f7cbf51407e..ced55544160feffbf02445e73ce4693285940c0a:/include/wx/wxchar.h?ds=sidebyside diff --git a/include/wx/wxchar.h b/include/wx/wxchar.h index eb2dd42e9c..5a6263ac63 100644 --- a/include/wx/wxchar.h +++ b/include/wx/wxchar.h @@ -76,6 +76,11 @@ #define HAVE_WCHAR_H #endif #endif +#if defined(__MWERKS__) && !defined(__MACH__) + #ifndef HAVE_WCSLEN + #define HAVE_WCSLEN + #endif +#endif #if wxUSE_WCHAR_T #ifdef HAVE_WCHAR_H @@ -114,6 +119,8 @@ #include #elif defined(__WATCOMC__) #define wxHAVE_TCHAR_SUPPORT +#elif defined(__DMC__) + #define wxHAVE_TCHAR_SUPPORT #elif defined(__MINGW32__) && wxCHECK_W32API_VERSION( 1, 0 ) #define wxHAVE_TCHAR_SUPPORT #include @@ -300,7 +307,18 @@ #define wxPutchar _puttchar #define wxPuts _putts #define wxScanf _tscanf - #define wxSprintf _stprintf + #if defined(__DMC__) + #if wxUSE_UNICODE + /* Digital Mars adds count to _stprintf (C99) so prototype conversion see wxchar.cpp */ + int wxSprintf (wchar_t * __RESTRICT s, const wchar_t * __RESTRICT format, ... ) ; + #else + /* and there is a bug in D Mars tchar.h prior to 8.39.4n, so define as sprintf */ + #define wxSprintf sprintf + #endif + #else + #define wxSprintf _stprintf + #endif + #define wxSscanf _stscanf #define wxTmpnam _ttmpnam #define wxUngetc _tungetc @@ -345,7 +363,7 @@ #include /* this is probably glibc-specific */ - #if defined(__WCHAR_TYPE__) + #if defined(__WCHAR_TYPE__) && !defined(__MWERKS__) /* ctype.h functions (wctype.h) */ #define wxIsalnum iswalnum #define wxIsalpha iswalpha @@ -493,21 +511,6 @@ #define wxCtime wctime /* #define wxStrftime wcsftime */ - /* - #define wxNEED_FPUTWC - - #include - - int wxFputs(const wxChar *ch, FILE *stream); - int wxPutc(wxChar ch, FILE *stream); - - #define wxPuts(ws) wxFputs(ws, stdout) - #define wxPutchar(wch) wxPutc(wch, stdout) - - #define wxNEED_PRINTF_CONVERSION - #define wxNEED_WX_STDIO_H - #define wxNEED_WX_STDLIB_H - */ #define wxNEED_WX_TIME_H #else /* !metrowerks for apple */ #error "Please define wide character functions for your environment"