X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/f6f5941be5f080ca42cb5fed4b672f5db16c0d8e..b814b812485527736a6c11fd3468df36f97a1e4a:/include/wx/wxchar.h diff --git a/include/wx/wxchar.h b/include/wx/wxchar.h index 89bf08deea..d120ab33d8 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 @@ -194,8 +194,9 @@ // define _T() and related macros // ---------------------------------------------------------------------------- -// BSD systems define _T() to be something different, override it +// BSD systems define _T() to be something different in ctype.h, override it #if defined(__FreeBSD__) || defined(__DARWIN__) + #include #undef _T #endif @@ -395,6 +396,8 @@ #define wxPuts putws #define wxFputs fputws #else + #define wxNEED_FPUTWC + #include int wxFputs(const wxChar *ch, FILE *stream); @@ -582,7 +585,9 @@ WXDLLEXPORT bool wxOKlibc(); // for internal use #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 @@ -642,18 +647,18 @@ WXDLLEXPORT bool wxOKlibc(); // for internal use int wxVfprintf( FILE *stream, const wxChar *format, va_list ap ); int wxVprintf( const wxChar *format, va_list ap ); int wxVsprintf( wxChar *str, const wxChar *format, va_list ap ); - - // 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 - int wxSnprintf( wxChar *str, size_t size, const wxChar *format, ... ) ATTRIBUTE_PRINTF_4; - int wxVsnprintf( wxChar *str, size_t size, const wxChar *format, va_list ap ); - #else - #define wxSnprintf wxSnprintf_ - #define wxVsnprintf wxVsnprintf_ - #endif #endif // wxNEED_PRINTF_CONVERSION +// 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 + int wxSnprintf( wxChar *str, size_t size, const wxChar *format, ... ) ATTRIBUTE_PRINTF_4; + int wxVsnprintf( wxChar *str, size_t size, const wxChar *format, va_list ap ); +#else + #define wxSnprintf wxSnprintf_ + #define wxVsnprintf wxVsnprintf_ +#endif + // ---------------------------------------------------------------------------- // various functions which might not be available in libc and for which we // provide our own replacements in wxchar.cpp