From 4ded51f2fa07a060f5212a8957db5ce356775866 Mon Sep 17 00:00:00 2001 From: Chris Elliott Date: Tue, 22 Apr 2003 21:12:30 +0000 Subject: [PATCH] update to make digitalmars compile/link image sample git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@20314 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- src/common/datetime.cpp | 3 ++- src/common/regex.cpp | 2 +- src/common/valgen.cpp | 8 ++++---- src/generic/dirctrlg.cpp | 4 +++- src/makeprog.sc | 2 +- src/makesc.env | 13 ++++--------- src/msw/makefile.sc | 3 ++- src/tiff/tiffcomp.h | 10 +++++++--- 8 files changed, 24 insertions(+), 21 deletions(-) diff --git a/src/common/datetime.cpp b/src/common/datetime.cpp index 45a15e0c88..7ff53bacf5 100644 --- a/src/common/datetime.cpp +++ b/src/common/datetime.cpp @@ -3530,7 +3530,8 @@ const wxChar *wxDateTime::ParseTime(const wxChar *time) size_t len = timeString.length(); if ( timeString.CmpNoCase(wxString(time, len)) == 0 ) { - Set(stdTimes[n].hour, 0, 0); + // casts required by DigitalMars + Set(stdTimes[n].hour, wxDateTime_t(0), wxDateTime_t(0)); return time + len; } diff --git a/src/common/regex.cpp b/src/common/regex.cpp index cbaa57991d..6f041f7680 100644 --- a/src/common/regex.cpp +++ b/src/common/regex.cpp @@ -39,7 +39,7 @@ #endif //WX_PRECOMP // FreeBSD & Watcom require this, it probably doesn't hurt for others -#if defined(__UNIX__) || defined(__WATCOMC__) +#if defined(__UNIX__) || defined(__WATCOMC__) || defined(__DIGITALMARS__) #include #endif diff --git a/src/common/valgen.cpp b/src/common/valgen.cpp index b4814ac7b0..6b8e98e061 100644 --- a/src/common/valgen.cpp +++ b/src/common/valgen.cpp @@ -44,13 +44,13 @@ #include "wx/slider.h" #endif -#if wxUSE_SPINCTRL && !defined(__WIN16__) + #include "wx/spinctrl.h" -#endif -#if wxUSE_SPINBTN && !defined(__WIN16__) + +#if wxUSE_SPINBTN #include "wx/spinbutt.h" #endif -#if wxUSE_CHECKLISTBOX && !defined(__WIN16__) +#if wxUSE_CHECKLISTBOX #include "wx/checklst.h" #endif diff --git a/src/generic/dirctrlg.cpp b/src/generic/dirctrlg.cpp index 891d11d7aa..b42f9d6d9e 100644 --- a/src/generic/dirctrlg.cpp +++ b/src/generic/dirctrlg.cpp @@ -614,7 +614,9 @@ void wxGenericDirCtrl::OnExpandItem(wxTreeEvent &event) // VS: this is needed because the event handler is called from wxTreeCtrl // ctor when wxTR_HIDE_ROOT was specified - if (m_rootId == 0) + + if (!m_rootId.IsOk()) + m_rootId = m_treeCtrl->GetRootItem(); ExpandDir(parentId); diff --git a/src/makeprog.sc b/src/makeprog.sc index 1e5289068e..31562629b7 100644 --- a/src/makeprog.sc +++ b/src/makeprog.sc @@ -7,7 +7,7 @@ INCLUDE=$(INCDIR) include $(WXDIR)\src\makesc.env $(TARGET).exe: $(TARGET).obj $(TARGET).res - link $(LDFLAGS) $*, $@, $*, $(LIBS) + link $(LDFLAGS) /DELEXECUTABLE /RC $*, $@, $*, $(LIBS) sc32.def: diff --git a/src/makesc.env b/src/makesc.env index d7919768af..3e76e640f4 100644 --- a/src/makesc.env +++ b/src/makesc.env @@ -8,6 +8,8 @@ MSWINCDIR = $(WXDIR)\include\wx\msw ARCHINCDIR = $(WXDIR)\lib\$(SC_SUFFIX) LIBDIR = $(WXDIR)\lib WXLIB = $(LIBDIR)\wx$(SC_SUFFIX).lib +WINSOCKLIB = $(LIBDIR)\winsock$(SC_SUFFIX).lib +SUPPORTLIBS = $(LIBDIR)\png$(SC_SUFFIX).lib $(LIBDIR)\tiff$(SC_SUFFIX).lib $(LIBDIR)\jpeg$(SC_SUFFIX).lib $(LIBDIR)\zlib$(SC_SUFFIX).lib SRCSUFF = cpp OBJSUFF = obj @@ -21,19 +23,12 @@ INCLUDE=-I$(INCDIR) -I$(ARCHINCDIR) -I$(WXDIR)/src/regex;$(WXDIR)/src/png;$(WXDI CC=dmc RC=rcc -# WIN16 settings -#CFLAGS = -Jm -ml -W -D__WXMSW__ -D__SC__ -D__WXDEBUG__ -D__WINDOWS__ -D__WIN16__ $(EXTRACPPFLAGS) -#LINKER = link -#LDFLAGS = -ml -W -L$(LINKER).exe $(EXTRALDFLAGS) -#LIBS=$(WXLIB) $(EXTRALIBS) libw.lib commdlg.lib ddeml.lib shell.lib # $(LIB)\ctl3dv2.lib -#DEFFILE=sc16.def - # WIN32 settings # -H ... fix to use directory CFLAGS = -o -mn -W -H -D__NT__ -DWIN32 -D__WIN32__ -D__WIN95__ -D__WINDOWS__ -D__WXMSW__ -D__SC__ -D__WXDEBUG__ $(EXTRACPPFLAGS) LINKER = link -LDFLAGS = /DELEXECUTABLE /RC $(EXTRALDFLAGS) -LIBS=$(WXLIB) $(EXTRALIBS) advapi32 comctl32 comdlg32 ctl3d32 gc gdi32 kernel32 ole32 oleaut32 snn user32 uuid +LDFLAGS = $(EXTRALDFLAGS) +LIBS=$(WXLIB) $(EXTRALIBS) $(SUPPORTLIBS) advapi32 comctl32 comdlg32 ctl3d32 gc gdi32 kernel32 ole32 oleaut32 snn user32 uuid $(WINSOCKLIB) DEFFILE=sc32.def .$(SRCSUFF).obj: diff --git a/src/msw/makefile.sc b/src/msw/makefile.sc index 798f7a323b..852d757876 100644 --- a/src/msw/makefile.sc +++ b/src/msw/makefile.sc @@ -331,7 +331,8 @@ MAKEARCHDIR: @if not exist $(ARCHINCDIR)\wx\setup.h copy $(MSWINCDIR)\setup.h $(ARCHINCDIR)\wx\setup.h MAKEWINSOCKLIB: - implib /system /v /suffix /Ic:\wx\dm\include\win32 $(WINSOCKLIB) $(WINDIR)\system32\winsock.dll + @if not exist $(WINSOCKLIB) implib /s $(WINSOCKLIB) $(WINDIR)\system32\winsock.dll +## implib /system /v /suffix /Ic:\wx\dm\include\win32 $(WINSOCKLIB) $(WINDIR)\system32\winsock.dll ## implib /s $(WINSOCKLIB) $(WINDIR)\system32\winsock.dll ##@if not exist $(WINSOCKLIB) diff --git a/src/tiff/tiffcomp.h b/src/tiff/tiffcomp.h index 2f7d0dd2cb..dde8764657 100644 --- a/src/tiff/tiffcomp.h +++ b/src/tiff/tiffcomp.h @@ -60,9 +60,13 @@ #endif #endif +#if defined (__SC__) && !defined (__DMC__) + #define __SYMANTEC__ +#endif + #include -#if defined(__PPCC__) || defined(__SC__) || defined(__MRC__) +#if defined(__PPCC__) || defined(__SYMANTEC__) || defined(__MRC__) #include #elif !defined(__MWERKS__) && !defined(THINK_C) && !defined(__acornriscos) && !defined(applec) #include @@ -83,7 +87,7 @@ * additional includes are also done to pull in the * appropriate definitions we're looking for. */ -#if defined(__MWERKS__) || defined(THINK_C) || defined(__PPCC__) || defined(__SC__) || defined(__MRC__) +#if defined(__MWERKS__) || defined(THINK_C) || defined(__PPCC__) || defined(__SYMANTEC__) || defined(__MRC__) #include #define BSDTYPES #define HAVE_UNISTD_H 0 @@ -137,7 +141,7 @@ typedef unsigned long u_long; * stack (when coerced by the compiler). */ /* Note: on MacPowerPC "extended" is undefined. So only use it for 68K-Macs */ -#if defined(__SC__) || defined(THINK_C) +#if defined(__SYMANTEC__) || defined(THINK_C) typedef extended dblparam_t; #else typedef double dblparam_t; -- 2.45.2