From 013675321e3ceb494aac3063759d6b6a8cc8f821 Mon Sep 17 00:00:00 2001 From: Chris Elliott Date: Mon, 2 Feb 2004 14:16:32 +0000 Subject: [PATCH] fixes from Arjan Knepper for D Mars git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_2_4_BRANCH@25478 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- include/wx/filefn.h | 2 +- include/wx/platform.h | 2 +- lib/_sc/wsock32_sc.def | 4 ++++ src/common/cmndata.cpp | 2 +- src/msw/dc.cpp | 2 +- src/msw/gdiimage.cpp | 2 +- src/msw/ownerdrw.cpp | 2 +- src/msw/tbar95.cpp | 3 --- src/msw/toplevel.cpp | 2 +- src/msw/utils.cpp | 2 +- 10 files changed, 12 insertions(+), 11 deletions(-) diff --git a/include/wx/filefn.h b/include/wx/filefn.h index d43ce64ac0..c4000661da 100644 --- a/include/wx/filefn.h +++ b/include/wx/filefn.h @@ -35,7 +35,7 @@ typedef _off_t off_t; #elif defined(__BORLANDC__) && defined(__WIN16__) typedef long off_t; -#elif defined(__SC__) +#elif (defined(__SC__) && !defined(__DIGITALMARS__)) typedef long off_t; #elif defined(__MWERKS__) && !defined(__INTEL__) typedef long off_t; diff --git a/include/wx/platform.h b/include/wx/platform.h index a44c32fd30..5997b30a2b 100644 --- a/include/wx/platform.h +++ b/include/wx/platform.h @@ -302,7 +302,7 @@ This macro can be used to check that the version of mingw32 compiler is at least maj.min */ -#if defined( __GNUWIN32__ ) || defined( __MINGW32__ ) || defined( __CYGWIN__ ) || defined(__DIGITALMARS__) +#if defined( __GNUWIN32__ ) || defined( __MINGW32__ ) || defined( __CYGWIN__ ) #include "wx/msw/gccpriv.h" #else #undef wxCHECK_W32API_VERSION diff --git a/lib/_sc/wsock32_sc.def b/lib/_sc/wsock32_sc.def index 9cb5991ef2..40304e13b3 100644 --- a/lib/_sc/wsock32_sc.def +++ b/lib/_sc/wsock32_sc.def @@ -30,3 +30,7 @@ EXPORTS _shutdown@8 = shutdown _closesocket@4 = closesocket _WSAAsyncSelect@16 = WSAAsyncSelect + + _setsockopt@20 = setsockopt + + diff --git a/src/common/cmndata.cpp b/src/common/cmndata.cpp index 85c46db9c1..9bf7b8f145 100644 --- a/src/common/cmndata.cpp +++ b/src/common/cmndata.cpp @@ -61,7 +61,7 @@ #include #endif - #if defined(__WATCOMC__) || defined(__SC__) || defined(__SALFORDC__) + #if defined(__WATCOMC__) || (defined(__SC__) && !defined(__DIGITALMARS__)) || defined(__SALFORDC__) #include #include #endif diff --git a/src/msw/dc.cpp b/src/msw/dc.cpp index ff2e769782..7557477dc0 100644 --- a/src/msw/dc.cpp +++ b/src/msw/dc.cpp @@ -620,7 +620,7 @@ void wxDC::DoDrawCheckMark(wxCoord x1, wxCoord y1, wxCoord x2 = x1 + width, y2 = y1 + height; -#if defined(__WIN32__) && !defined(__SC__) && !defined(__WXMICROWIN__) +#if defined(__WIN32__) && (!defined(__SC__) || defined(__DIGITALMARS__)) && !defined(__WXMICROWIN__) RECT rect; rect.left = x1; rect.top = y1; diff --git a/src/msw/gdiimage.cpp b/src/msw/gdiimage.cpp index 1b5000fa5e..b1a7d097bc 100644 --- a/src/msw/gdiimage.cpp +++ b/src/msw/gdiimage.cpp @@ -534,7 +534,7 @@ bool wxICOResourceHandler::LoadIcon(wxIcon *icon, // note that we can't just always call LoadImage() because it seems to do // some icon rescaling internally which results in very ugly 16x16 icons -#if defined(__WIN32__) && !defined(__SC__) +#if defined(__WIN32__) && (!defined(__SC__) || defined (__DIGITALMARS__) ) if ( hasSize ) { hicon = (HICON)::LoadImage(wxGetInstance(), name, IMAGE_ICON, diff --git a/src/msw/ownerdrw.cpp b/src/msw/ownerdrw.cpp index efec719b42..fc92fe7a0c 100644 --- a/src/msw/ownerdrw.cpp +++ b/src/msw/ownerdrw.cpp @@ -228,7 +228,7 @@ bool wxOwnerDrawn::OnMeasureItem(size_t *pwidth, size_t *pheight) // get drawn embossed? How can we tell DrawState that we don't want the // embossing? -#if defined(__WIN32__) && !defined(__SC__) && !defined(__TWIN32__) +#if defined(__WIN32__) && (!defined(__SC__) || defined (__DIGITALMARS__)) && !defined(__TWIN32__) #define O_DRAW_NATIVE_API // comments below explain why I use it #endif diff --git a/src/msw/tbar95.cpp b/src/msw/tbar95.cpp index 70b4f32fa7..d1fa351de2 100644 --- a/src/msw/tbar95.cpp +++ b/src/msw/tbar95.cpp @@ -50,9 +50,6 @@ // ---------------------------------------------------------------------------- // Toolbar define value missing // ---------------------------------------------------------------------------- -#if defined(__DIGITALMARS__) -#define CCS_VERT 0x00000080L -#endif #include "wx/msw/private.h" diff --git a/src/msw/toplevel.cpp b/src/msw/toplevel.cpp index cf47527062..81d9c861f7 100644 --- a/src/msw/toplevel.cpp +++ b/src/msw/toplevel.cpp @@ -193,7 +193,7 @@ WXDWORD wxTopLevelWindowMSW::MSWGetStyle(long style, WXDWORD *exflags) const if ( exflags ) { -#if !defined(__WIN16__) && !defined(__SC__) +#if !defined(__WIN16__) && (!defined(__SC__) || defined (__DIGITALMARS__)) if ( !(GetExtraStyle() & wxTOPLEVEL_EX_DIALOG) ) { if ( style & wxFRAME_TOOL_WINDOW ) diff --git a/src/msw/utils.cpp b/src/msw/utils.cpp index fa1fe77f4c..25eebf2b0d 100644 --- a/src/msw/utils.cpp +++ b/src/msw/utils.cpp @@ -1022,7 +1022,7 @@ wxString wxGetOsDescription() int wxGetOsVersion(int *majorVsn, int *minorVsn) { -#if defined(__WIN32__) && !defined(__SC__) +#if defined(__WIN32__) && (!defined(__SC__) || defined(__DIGITALMARS__)) static int ver = -1, major = -1, minor = -1; if ( ver == -1 )