wxASSERT_MSG( wcs, wxT("NULL string in wxWCharBuffer") );
if (wcs) {
-#if (defined(__BORLANDC__) && (__BORLANDC__ > 0x530))
+#if ( defined(__BORLANDC__) && (__BORLANDC__ > 0x530) ) \
+ || ( defined(__MWERKS__) && defined(__WXMSW__) )
size_t siz = (std::wcslen(wcs)+1)*sizeof(wchar_t);
#else
size_t siz = (::wcslen(wcs)+1)*sizeof(wchar_t);
// ----------------------------------------------------------------------------
// Microsoft compiler loves underscores, feed them to it
-#if defined( __VISUALC__ ) || wxCHECK_W32API_VERSION( 0, 5 )
+#if defined( __VISUALC__ ) || wxCHECK_W32API_VERSION( 0, 5 ) \
+ || ( defined(__MWERKS__) && defined(__WXMSW__) )
// functions
#define wxClose _close
#define wxRead _read
#ifndef __MWERKS__
#include <sys/types.h> // needed for stat
#include <sys/stat.h> // stat
+#elif ( defined(__MWERKS__) && defined(__WXMSW__) )
+ #include <sys/types.h> // needed for stat
+ #include <sys/stat.h> // stat
#endif
#if defined(__BORLANDC__) || defined(_MSC_VER)
#if wxUSE_LONGLONG
#include "wx/longlong.h"
+#if defined(__MWERKS__) && defined(__WXMSW__)
+#include <string.h> // for memset()
+#else
#include <memory.h> // for memset()
+#endif
+
#include <math.h> // for fabs()
// ============================================================================
size_t WC2MB(char *buf, const wchar_t *psz, size_t n)
{
-#if defined(__BORLANDC__) && (__BORLANDC__ > 0x530)
+#if ( defined(__BORLANDC__) && (__BORLANDC__ > 0x530) ) \
+ || ( defined(__MWERKS__) && defined(__WXMSW__) )
size_t inbuf = std::wcslen(psz);
#else
size_t inbuf = ::wcslen(psz);
return m_cset->WC2MB(buf, psz, n);
// latin-1 (direct)
-#if defined(__BORLANDC__) && (__BORLANDC__ > 0x530)
+#if ( defined(__BORLANDC__) && (__BORLANDC__ > 0x530) ) \
+ || ( defined(__MWERKS__) && defined(__WXMSW__) )
size_t len=std::wcslen(psz);
#else
size_t len=::wcslen(psz);
# endif
#endif
+#if defined(__MWERKS__) && defined(__WXMSW__)
+# undef HAVE_FTIME
+# undef HAVE_GETTIMEOFDAY
+#endif
+
#include <time.h>
#ifndef __WXMAC__
#include <sys/types.h> // for time_t
#ifdef XMD_H
/* X11/xmd.h correctly defines INT32 */
#define INT32_DEFINED
-#elif (_MSC_VER >= 1200) || (__BORLANDC__ >= 0x550) || \
- wxCHECK_W32API_VERSION( 0, 5 ) || \
- ((defined(__MINGW32__) || defined(__CYGWIN__)) \
- && ((__GNUC__>2) || ((__GNUC__==2) && (__GNUC_MINOR__>95))))
+#elif (_MSC_VER >= 1200) || (__BORLANDC__ >= 0x550) \
+ || wxCHECK_W32API_VERSION( 0, 5 ) \
+ || ((defined(__MINGW32__) || defined(__CYGWIN__)) \
+ && ((__GNUC__>2) || ((__GNUC__==2) && (__GNUC_MINOR__>95)))) \
+ || (defined(__MWERKS__) && defined(__WXMSW__))
/* INT32 is defined in windows.h for these compilers */
#define INT32_DEFINED
#endif
+#if (defined(__MWERKS__) && defined(__WXMSW__))
+#define HAVE_BOOLEAN
+#endif
+
/*
* On a few systems, type boolean and/or its values FALSE, TRUE may appear
* in standard header files. Or you may have conflicts with application-
break;
#if !defined(__WATCOMC__) && ! (defined(__BORLANDC__) && (__BORLANDC__ < 0x500))
case CF_UNICODETEXT:
-#if (defined(__BORLANDC__) && (__BORLANDC__ > 0x530))
+#if ( defined(__BORLANDC__) && (__BORLANDC__ > 0x530) ) \
+ || ( defined(__MWERKS__) && defined(__WXMSW__) )
size = std::wcslen((const wchar_t *)pBuf) * sizeof(wchar_t);
#else
size = ::wcslen((const wchar_t *)pBuf) * sizeof(wchar_t);
#include "wx/msw/dib.h"
#include "wx/app.h" // for GetComCtl32Version
+#if defined(__MWERKS__) && defined(__WXMSW__)
+// including <windef.h> for max definition doesn't seem
+// to work using CodeWarrior 6 Windows. So we define it
+// here. (Otherwise we get a undefined identifier 'max'
+// later on in this file.) (Added by dimitri@shortcut.nl)
+# ifndef max
+# define max(a,b) (((a) > (b)) ? (a) : (b))
+# endif
+
+#endif
+
// ----------------------------------------------------------------------------
// conditional compilation
// ----------------------------------------------------------------------------