X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/b63b07a809f9a3d22596d4971ef5c8971153823a..95561ddfc3c0c84c71316d40cb539135fa68b440:/include/wx/wxchar.h diff --git a/include/wx/wxchar.h b/include/wx/wxchar.h index 6a047fe88a..4b5c712f6c 100644 --- a/include/wx/wxchar.h +++ b/include/wx/wxchar.h @@ -22,10 +22,7 @@ /* check whether we have wchar_t and which size it is if we do */ #if !defined(wxUSE_WCHAR_T) - #if defined(__WIN16__) - /* no wchar_t under Win16 regadrless of compiler used */ - #define wxUSE_WCHAR_T 0 - #elif defined(__UNIX__) + #if defined(__UNIX__) #if defined(HAVE_WCSTR_H) || defined(HAVE_WCHAR_H) || defined(__FreeBSD__) || defined(__DARWIN__) #define wxUSE_WCHAR_T 1 #else @@ -443,7 +440,7 @@ #define wxNEED_WX_STDIO_H #define wxNEED_WX_STDLIB_H #define wxNEED_WX_TIME_H - #elif defined(__MWERKS__) && ( defined(macintosh) || defined(__MACH__) ) + #elif defined(__MWERKS__) && ( defined(__MSL__) || defined(__MACH__) ) /* ctype.h functions (wctype.h) */ #define wxIsalnum iswalnum #define wxIsalpha iswalpha @@ -640,6 +637,10 @@ #ifdef HAVE_WCSLEN #define wxWcslen wcslen #else + #if defined( __WXMAC_XCODE__ ) && !defined( __cplusplus ) + /* xcode native targets are giving multiply defined symbols on regex */ + static + #endif inline size_t wxWcslen(const wchar_t *s) { size_t n = 0; @@ -753,12 +754,7 @@ WXDLLIMPEXP_BASE bool wxOKlibc(); /* for internal use */ We choose to always emulate Windows behaviour as more useful for us so even if we have wprintf() we still must wrap it in a non trivial wxPrintf(). - However, if we don't have any vswprintf() at all we don't need to redefine - anything as our own wxVsnprintf_() already behaves as needed. */ -#ifndef wxVsnprintf_ - #undef wxNEED_PRINTF_CONVERSION -#endif #if defined(wxNEED_PRINTF_CONVERSION) || defined(wxNEED_WPRINTF) /* @@ -783,7 +779,11 @@ WXDLLIMPEXP_BASE bool wxOKlibc(); /* for internal use */ /* these 2 can be simply mapped to the versions with underscore at the end */ /* if we don't have to do the conversion */ -#ifdef wxNEED_PRINTF_CONVERSION +/* + However, if we don't have any vswprintf() at all we don't need to redefine + anything as our own wxVsnprintf_() already behaves as needed. +*/ +#if defined(wxNEED_PRINTF_CONVERSION) && defined(wxVsnprintf_) int wxSnprintf( wxChar *str, size_t size, const wxChar *format, ... ) ATTRIBUTE_PRINTF_3; int wxVsnprintf( wxChar *str, size_t size, const wxChar *format, va_list ap ); #else