Do not #undef wxNEED_PRINTF_CONVERSION if wxVsnprintf_ has not been defined

(to an OS implementation).  Instead, check when delcaring the wxSnprintf
and wxVsnprintf wrappers and only define them if wxVsnprintf_ has been defined.

This allows HAVE_VSWPRINTF to be false yet still allow other OS wchar
functions to be used which will be needed to work around FreeBSD/Darwin.


git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@26479 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
David Elliott
2004-03-30 01:50:58 +00:00
parent 6edf110703
commit 46d492a879

View File

@@ -750,12 +750,7 @@ WXDLLIMPEXP_BASE bool wxOKlibc(); /* for internal use */
We choose to always emulate Windows behaviour as more useful for us so even 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(). 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) #if defined(wxNEED_PRINTF_CONVERSION) || defined(wxNEED_WPRINTF)
/* /*
@@ -780,7 +775,11 @@ WXDLLIMPEXP_BASE bool wxOKlibc(); /* for internal use */
/* these 2 can be simply mapped to the versions with underscore at the end */ /* these 2 can be simply mapped to the versions with underscore at the end */
/* if we don't have to do the conversion */ /* 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 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 ); int wxVsnprintf( wxChar *str, size_t size, const wxChar *format, va_list ap );
#else #else