applied patch 473558: fixes for CW compilation under MSW
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@12154 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
parent
2c37aade57
commit
de85a884d7
@ -71,7 +71,8 @@ public:
|
||||
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);
|
||||
|
@ -66,7 +66,8 @@ WXDLLEXPORT_DATA(extern const wxChar*) wxEmptyString;
|
||||
// ----------------------------------------------------------------------------
|
||||
|
||||
// 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
|
||||
|
@ -88,6 +88,9 @@
|
||||
#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)
|
||||
|
@ -28,7 +28,12 @@
|
||||
#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()
|
||||
|
||||
// ============================================================================
|
||||
|
@ -764,7 +764,8 @@ public:
|
||||
|
||||
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);
|
||||
@ -898,7 +899,8 @@ size_t wxCSConv::WC2MB(char *buf, const wchar_t *psz, size_t n) const
|
||||
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);
|
||||
|
@ -60,6 +60,11 @@
|
||||
# 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
|
||||
|
@ -169,10 +169,11 @@ typedef short INT16;
|
||||
#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
|
||||
@ -263,6 +264,10 @@ typedef unsigned int JDIMENSION;
|
||||
#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-
|
||||
|
@ -468,7 +468,8 @@ STDMETHODIMP wxIDataObject::SetData(FORMATETC *pformatetc,
|
||||
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);
|
||||
|
@ -61,6 +61,17 @@
|
||||
#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
|
||||
// ----------------------------------------------------------------------------
|
||||
|
Loading…
Reference in New Issue
Block a user