fix DMars compilation to use precompiled headers
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@21223 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
@@ -15,7 +15,7 @@
|
|||||||
// check if to use precompiled headers: do it for most Windows compilers unless
|
// check if to use precompiled headers: do it for most Windows compilers unless
|
||||||
// adding DigitalMars here appears to amke it slower!
|
// adding DigitalMars here appears to amke it slower!
|
||||||
// explicitly disabled by defining NOPCH
|
// explicitly disabled by defining NOPCH
|
||||||
#if ((defined(__BORLANDC__) || defined(__VISUALC__) || defined(__WATCOMC__)) && defined(__WXMSW__)) || defined(__VISAGECPP__) || defined(__MWERKS__)
|
#if ((defined(__BORLANDC__) || defined(__VISUALC__) || defined(__DIGITALMARS__) || defined(__WATCOMC__)) && defined(__WXMSW__)) || defined(__VISAGECPP__) || defined(__MWERKS__)
|
||||||
#if !defined(NOPCH)
|
#if !defined(NOPCH)
|
||||||
#define WX_PRECOMP
|
#define WX_PRECOMP
|
||||||
#endif
|
#endif
|
||||||
|
@@ -1,7 +1,6 @@
|
|||||||
# Symantec C++ makefile
|
#Makefile from wxHatch for Symantec/Digital Mars compiler
|
||||||
WXDIR = ..\..
|
WXDIR=..\..\..\wxWindows.25
|
||||||
EXTRALIBS=
|
|
||||||
TARGET=dialogs
|
TARGET=dialogs
|
||||||
OBJECTS = $(TARGET).obj
|
OBJECTS = $(TARGET).obj
|
||||||
|
EXTRALIBS =
|
||||||
include $(WXDIR)\src\makeprog.sc
|
include $(WXDIR)\src\makeprog.sc
|
||||||
|
|
||||||
|
@@ -141,9 +141,7 @@ wxDataObjectComposite::GetPreferredFormat(Direction WXUNUSED(dir)) const
|
|||||||
}
|
}
|
||||||
|
|
||||||
#if defined(__WXMSW__)
|
#if defined(__WXMSW__)
|
||||||
#ifdef __DIGITALMARS__
|
|
||||||
extern "C"
|
|
||||||
#endif
|
|
||||||
size_t wxDataObjectComposite::GetBufferOffset( const wxDataFormat& format )
|
size_t wxDataObjectComposite::GetBufferOffset( const wxDataFormat& format )
|
||||||
{
|
{
|
||||||
wxDataObjectSimple *dataObj = GetObject(format);
|
wxDataObjectSimple *dataObj = GetObject(format);
|
||||||
@@ -154,9 +152,7 @@ size_t wxDataObjectComposite::GetBufferOffset( const wxDataFormat& format )
|
|||||||
return dataObj->GetBufferOffset( format );
|
return dataObj->GetBufferOffset( format );
|
||||||
}
|
}
|
||||||
|
|
||||||
#ifdef __DIGITALMARS__
|
|
||||||
extern "C"
|
|
||||||
#endif
|
|
||||||
const void* wxDataObjectComposite::GetSizeFromBuffer( const void* buffer,
|
const void* wxDataObjectComposite::GetSizeFromBuffer( const void* buffer,
|
||||||
size_t* size,
|
size_t* size,
|
||||||
const wxDataFormat& format )
|
const wxDataFormat& format )
|
||||||
@@ -169,9 +165,7 @@ const void* wxDataObjectComposite::GetSizeFromBuffer( const void* buffer,
|
|||||||
return dataObj->GetSizeFromBuffer( buffer, size, format );
|
return dataObj->GetSizeFromBuffer( buffer, size, format );
|
||||||
}
|
}
|
||||||
|
|
||||||
#ifdef __DIGITALMARS__
|
|
||||||
extern "C"
|
|
||||||
#endif
|
|
||||||
void* wxDataObjectComposite::SetSizeInBuffer( void* buffer, size_t size,
|
void* wxDataObjectComposite::SetSizeInBuffer( void* buffer, size_t size,
|
||||||
const wxDataFormat& format )
|
const wxDataFormat& format )
|
||||||
{
|
{
|
||||||
|
@@ -33,7 +33,7 @@
|
|||||||
// This causes a conflict with jmorecfg.h header from libjpeg, so we have
|
// This causes a conflict with jmorecfg.h header from libjpeg, so we have
|
||||||
// to make sure libjpeg won't try to define boolean itself. This is done by
|
// to make sure libjpeg won't try to define boolean itself. This is done by
|
||||||
// defining HAVE_BOOLEAN.
|
// defining HAVE_BOOLEAN.
|
||||||
#if defined(__WXMSW__) && (defined(__MWERKS__) || (defined(__WATCOMC__) && __WATCOMC__ < 1200))
|
#if defined(__WXMSW__) && (defined(__MWERKS__) || defined(__DIGITALMARS__) || (defined(__WATCOMC__) && __WATCOMC__ < 1200))
|
||||||
#define HAVE_BOOLEAN
|
#define HAVE_BOOLEAN
|
||||||
#include <windows.h>
|
#include <windows.h>
|
||||||
#endif
|
#endif
|
||||||
|
@@ -3,6 +3,7 @@
|
|||||||
SC_SUFFIX=_sc
|
SC_SUFFIX=_sc
|
||||||
|
|
||||||
####WXDIR = $(WXWIN)
|
####WXDIR = $(WXWIN)
|
||||||
|
WXOUTDIR=$(WXDIR)\d_mars
|
||||||
INCDIR = $(WXDIR)\include
|
INCDIR = $(WXDIR)\include
|
||||||
CONTRIBINCDIR = $(WXDIR)\contrib\include
|
CONTRIBINCDIR = $(WXDIR)\contrib\include
|
||||||
MSWINCDIR = $(WXDIR)\include\wx\msw
|
MSWINCDIR = $(WXDIR)\include\wx\msw
|
||||||
@@ -27,7 +28,10 @@ RC=rcc
|
|||||||
|
|
||||||
# WIN32 settings
|
# WIN32 settings
|
||||||
# -H ... fix to use directory
|
# -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)
|
##CFLAGS = -o -mn -W -H -D__NT__ -DWIN32 -D__WIN32__ -D__WIN95__ -D__WINDOWS__ -D__WXMSW__ -D__SC__ -D__WXDEBUG__ $(EXTRACPPFLAGS)
|
||||||
|
CFLAGS = -mn -D_WINDOWS -6 -a8 -Nc -c -H -HD$(WXOUTDIR) -HO- -DWXMSW -D__WIN32__ -D__WIN95__ -D__WXDEBUG__ $(EXTRACPPFLAGS)
|
||||||
|
CPPFLAGS = -cpp -Ae -Ar
|
||||||
|
|
||||||
LINKER = link
|
LINKER = link
|
||||||
# possible bug with putting d on any extralibs if we have debug and release versions one day
|
# possible bug with putting d on any extralibs if we have debug and release versions one day
|
||||||
LDFLAGS = $(EXTRALDFLAGS)
|
LDFLAGS = $(EXTRALDFLAGS)
|
||||||
@@ -35,7 +39,7 @@ LIBS=$(WXLIB) $(EXTRALIBS) $(SUPPORTLIBS) advapi32 comctl32 comdlg32 ctl3d32 gc
|
|||||||
|
|
||||||
|
|
||||||
.$(SRCSUFF).obj:
|
.$(SRCSUFF).obj:
|
||||||
*$(CC) -c $(CFLAGS) $(INCLUDE) $(OPTIONS) $< -o$@
|
*$(CC) -c $(CPPFLAGS) $(CFLAGS) $(INCLUDE) $(OPTIONS) $< -o$@
|
||||||
|
|
||||||
# -Jm: relaxed type checking only for .C files
|
# -Jm: relaxed type checking only for .C files
|
||||||
.c.obj:
|
.c.obj:
|
||||||
|
@@ -151,11 +151,7 @@ HICON wxDEFAULT_MDIPARENTFRAME_ICON = (HICON) NULL;
|
|||||||
|
|
||||||
HBRUSH wxDisableButtonBrush = (HBRUSH) 0;
|
HBRUSH wxDisableButtonBrush = (HBRUSH) 0;
|
||||||
|
|
||||||
#ifdef __DIGITALMARS__
|
|
||||||
extern "C" LRESULT WXDLLEXPORT APIENTRY wxWndProc(HWND, UINT, WPARAM, LPARAM);
|
|
||||||
#else
|
|
||||||
LRESULT WXDLLEXPORT APIENTRY wxWndProc(HWND, UINT, WPARAM, LPARAM);
|
LRESULT WXDLLEXPORT APIENTRY wxWndProc(HWND, UINT, WPARAM, LPARAM);
|
||||||
#endif
|
|
||||||
|
|
||||||
// FIXME wxUSE_ON_FATAL_EXCEPTION is only supported for VC++ now because it
|
// FIXME wxUSE_ON_FATAL_EXCEPTION is only supported for VC++ now because it
|
||||||
// needs compiler support for Win32 SEH. Others (especially Borland)
|
// needs compiler support for Win32 SEH. Others (especially Borland)
|
||||||
|
@@ -174,10 +174,6 @@ bool wxIsClipboardFormatAvailable(wxDataFormat dataFormat)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
#ifdef __DIGITALMARS__
|
|
||||||
extern "C" HGLOBAL wxDIB::ConvertFromBitmap(HBITMAP hbmp);
|
|
||||||
#endif
|
|
||||||
|
|
||||||
|
|
||||||
bool wxSetClipboardData(wxDataFormat dataFormat,
|
bool wxSetClipboardData(wxDataFormat dataFormat,
|
||||||
const void *data,
|
const void *data,
|
||||||
|
@@ -440,9 +440,6 @@ size_t wxDIB::ConvertFromBitmap(BITMAPINFO *pbi, HBITMAP hbmp)
|
|||||||
}
|
}
|
||||||
|
|
||||||
/* static */
|
/* static */
|
||||||
#ifdef __DIGITALMARS__
|
|
||||||
extern "C"
|
|
||||||
#endif
|
|
||||||
HGLOBAL wxDIB::ConvertFromBitmap(HBITMAP hbmp)
|
HGLOBAL wxDIB::ConvertFromBitmap(HBITMAP hbmp)
|
||||||
{
|
{
|
||||||
// first calculate the size needed
|
// first calculate the size needed
|
||||||
|
@@ -327,13 +327,14 @@ MSWOBJS = $(MSWDIR)\accel.obj \
|
|||||||
# Add $(NONESSENTIALOBJS) if wanting generic dialogs, PostScript etc.
|
# Add $(NONESSENTIALOBJS) if wanting generic dialogs, PostScript etc.
|
||||||
OBJECTS = $(COMMONOBJS) $(GENERICOBJS) $(MSWOBJS) $(HTMLOBJS)
|
OBJECTS = $(COMMONOBJS) $(GENERICOBJS) $(MSWOBJS) $(HTMLOBJS)
|
||||||
|
|
||||||
all: MAKEARCHDIR MAKELIBS $(LIBTARGET) zlib png jpeg tiff regex
|
all: MAKEARCHDIR MAKELIBS PCH $(LIBTARGET) zlib png jpeg tiff regex
|
||||||
|
|
||||||
MAKEARCHDIR:
|
MAKEARCHDIR:
|
||||||
@if not exist $(MSWINCDIR)\setup.h copy $(MSWINCDIR)\setup0.h $(MSWINCDIR)\setup.h
|
@if not exist $(MSWINCDIR)\setup.h copy $(MSWINCDIR)\setup0.h $(MSWINCDIR)\setup.h
|
||||||
@if not exist $(ARCHINCDIR)\wx\setup.h mkdir $(ARCHINCDIR)
|
@if not exist $(ARCHINCDIR)\wx\setup.h mkdir $(ARCHINCDIR)
|
||||||
@if not exist $(ARCHINCDIR)\wx\setup.h mkdir $(ARCHINCDIR)\wx
|
@if not exist $(ARCHINCDIR)\wx\setup.h mkdir $(ARCHINCDIR)\wx
|
||||||
@if not exist $(ARCHINCDIR)\wx\setup.h copy $(MSWINCDIR)\setup.h $(ARCHINCDIR)\wx\setup.h
|
@if not exist $(ARCHINCDIR)\wx\setup.h copy $(MSWINCDIR)\setup.h $(ARCHINCDIR)\wx\setup.h
|
||||||
|
@if not exist $(WXOUTDIR)\nul mkdir $(WXOUTDIR)
|
||||||
|
|
||||||
#build our own copies of missing libraries
|
#build our own copies of missing libraries
|
||||||
MAKELIBS:
|
MAKELIBS:
|
||||||
@@ -344,7 +345,7 @@ $(LIBTARGET): $(OBJECTS)
|
|||||||
-del $(LIBTARGET)
|
-del $(LIBTARGET)
|
||||||
*lib /PAGESIZE:512 $(LIBTARGET) y $(OBJECTS), nul;
|
*lib /PAGESIZE:512 $(LIBTARGET) y $(OBJECTS), nul;
|
||||||
|
|
||||||
clean: clean_msw clean_zlib clean_png clean_jpeg clean_tiff clean_regex
|
clean: clean_msw clean_zlib clean_png clean_jpeg clean_tiff clean_regex clean_pch
|
||||||
|
|
||||||
clean_msw:
|
clean_msw:
|
||||||
-del $(COMMDIR)\*.obj
|
-del $(COMMDIR)\*.obj
|
||||||
@@ -356,6 +357,13 @@ clean_msw:
|
|||||||
-del ole\*.obj
|
-del ole\*.obj
|
||||||
-del $(LIBTARGET)
|
-del $(LIBTARGET)
|
||||||
|
|
||||||
|
PCH: $(INCDIR)\wx\wxprec.h
|
||||||
|
dmc $(CPPFLAGS) $(CFLAGS) $(INCLUDE) -HF$(WXOUTDIR)\wxprec.SYM -o$(WXOUTDIR)\wxprec.PCO $(INCDIR)\wx\wxprec.h
|
||||||
|
|
||||||
|
clean_pch:
|
||||||
|
del $(WXOUTDIR)\*.sym
|
||||||
|
del $(WXOUTDIR)\*.PCO
|
||||||
|
|
||||||
png:
|
png:
|
||||||
make -f $(WXDIR)\src\png\makefile.sc FINAL=$(FINAL)
|
make -f $(WXDIR)\src\png\makefile.sc FINAL=$(FINAL)
|
||||||
|
|
||||||
|
@@ -68,11 +68,7 @@ extern wxMenu *wxCurrentPopupMenu;
|
|||||||
extern const wxChar *wxMDIFrameClassName; // from app.cpp
|
extern const wxChar *wxMDIFrameClassName; // from app.cpp
|
||||||
extern const wxChar *wxMDIChildFrameClassName;
|
extern const wxChar *wxMDIChildFrameClassName;
|
||||||
extern const wxChar *wxMDIChildFrameClassNameNoRedraw;
|
extern const wxChar *wxMDIChildFrameClassNameNoRedraw;
|
||||||
#ifdef __DIGITALMARS__
|
|
||||||
extern "C" void wxAssociateWinWithHandle(HWND hWnd, wxWindow *win);
|
|
||||||
#else
|
|
||||||
extern void wxAssociateWinWithHandle(HWND hWnd, wxWindow *win);
|
extern void wxAssociateWinWithHandle(HWND hWnd, wxWindow *win);
|
||||||
#endif
|
|
||||||
extern void wxRemoveHandleAssociation(wxWindow *win);
|
extern void wxRemoveHandleAssociation(wxWindow *win);
|
||||||
|
|
||||||
static HWND invalidHandle = 0;
|
static HWND invalidHandle = 0;
|
||||||
|
@@ -410,19 +410,6 @@ STDMETHODIMP wxIDataObject::GetDataHere(FORMATETC *pformatetc,
|
|||||||
return S_OK;
|
return S_OK;
|
||||||
}
|
}
|
||||||
|
|
||||||
#ifdef __DIGITALMARS__
|
|
||||||
extern "C"
|
|
||||||
size_t wxDataObjectComposite::GetBufferOffset( const wxDataFormat& format );
|
|
||||||
|
|
||||||
extern "C"
|
|
||||||
const void* wxDataObjectComposite::GetSizeFromBuffer( const void* buffer,
|
|
||||||
size_t* size,
|
|
||||||
const wxDataFormat& format ) ;
|
|
||||||
extern "C"
|
|
||||||
void* wxDataObjectComposite::SetSizeInBuffer( void* buffer, size_t size,
|
|
||||||
const wxDataFormat& format ) ;
|
|
||||||
|
|
||||||
#endif
|
|
||||||
|
|
||||||
// set data functions
|
// set data functions
|
||||||
STDMETHODIMP wxIDataObject::SetData(FORMATETC *pformatetc,
|
STDMETHODIMP wxIDataObject::SetData(FORMATETC *pformatetc,
|
||||||
|
@@ -1316,11 +1316,7 @@ static HCURSOR gs_wxBusyCursor = 0; // new, busy cursor
|
|||||||
static HCURSOR gs_wxBusyCursorOld = 0; // old cursor
|
static HCURSOR gs_wxBusyCursorOld = 0; // old cursor
|
||||||
static int gs_wxBusyCursorCount = 0;
|
static int gs_wxBusyCursorCount = 0;
|
||||||
|
|
||||||
#ifdef __DIGITALMARS__
|
|
||||||
extern "C" HCURSOR wxGetCurrentBusyCursor()
|
|
||||||
#else
|
|
||||||
extern HCURSOR wxGetCurrentBusyCursor()
|
extern HCURSOR wxGetCurrentBusyCursor()
|
||||||
#endif
|
|
||||||
{
|
{
|
||||||
return gs_wxBusyCursor;
|
return gs_wxBusyCursor;
|
||||||
}
|
}
|
||||||
|
@@ -176,13 +176,8 @@ static bool gs_hasStdCmap = FALSE;
|
|||||||
// ---------------------------------------------------------------------------
|
// ---------------------------------------------------------------------------
|
||||||
|
|
||||||
// the window proc for all our windows
|
// the window proc for all our windows
|
||||||
#ifdef __DIGITALMARS__
|
|
||||||
extern "C" LRESULT WXDLLEXPORT APIENTRY _EXPORT wxWndProc(HWND hWnd, UINT message,
|
|
||||||
WPARAM wParam, LPARAM lParam);
|
|
||||||
#else
|
|
||||||
LRESULT WXDLLEXPORT APIENTRY _EXPORT wxWndProc(HWND hWnd, UINT message,
|
LRESULT WXDLLEXPORT APIENTRY _EXPORT wxWndProc(HWND hWnd, UINT message,
|
||||||
WPARAM wParam, LPARAM lParam);
|
WPARAM wParam, LPARAM lParam);
|
||||||
#endif
|
|
||||||
|
|
||||||
|
|
||||||
#ifdef __WXDEBUG__
|
#ifdef __WXDEBUG__
|
||||||
@@ -190,11 +185,7 @@ LRESULT WXDLLEXPORT APIENTRY _EXPORT wxWndProc(HWND hWnd, UINT message,
|
|||||||
#endif //__WXDEBUG__
|
#endif //__WXDEBUG__
|
||||||
|
|
||||||
void wxRemoveHandleAssociation(wxWindowMSW *win);
|
void wxRemoveHandleAssociation(wxWindowMSW *win);
|
||||||
#ifdef __DIGITALMARS__
|
|
||||||
extern "C" void wxAssociateWinWithHandle(HWND hWnd, wxWindowMSW *win);
|
|
||||||
#else
|
|
||||||
extern void wxAssociateWinWithHandle(HWND hWnd, wxWindowMSW *win);
|
extern void wxAssociateWinWithHandle(HWND hWnd, wxWindowMSW *win);
|
||||||
#endif
|
|
||||||
wxWindow *wxFindWinFromHandle(WXHWND hWnd);
|
wxWindow *wxFindWinFromHandle(WXHWND hWnd);
|
||||||
|
|
||||||
// this magical function is used to translate VK_APPS key presses to right
|
// this magical function is used to translate VK_APPS key presses to right
|
||||||
@@ -1739,11 +1730,7 @@ bool wxWindowMSW::DoPopupMenu(wxMenu *menu, int x, int y)
|
|||||||
long wxWindowMSW::MSWDefWindowProc(WXUINT nMsg, WXWPARAM wParam, WXLPARAM lParam)
|
long wxWindowMSW::MSWDefWindowProc(WXUINT nMsg, WXWPARAM wParam, WXLPARAM lParam)
|
||||||
{
|
{
|
||||||
if ( m_oldWndProc )
|
if ( m_oldWndProc )
|
||||||
#ifdef __DIGITALMARS__
|
|
||||||
return ::CallWindowProc( (FARPROC) m_oldWndProc, GetHwnd(), (UINT) nMsg, (WPARAM) wParam, (LPARAM) lParam);
|
|
||||||
#else
|
|
||||||
return ::CallWindowProc(CASTWNDPROC m_oldWndProc, GetHwnd(), (UINT) nMsg, (WPARAM) wParam, (LPARAM) lParam);
|
return ::CallWindowProc(CASTWNDPROC m_oldWndProc, GetHwnd(), (UINT) nMsg, (WPARAM) wParam, (LPARAM) lParam);
|
||||||
#endif
|
|
||||||
else
|
else
|
||||||
return ::DefWindowProc(GetHwnd(), nMsg, wParam, lParam);
|
return ::DefWindowProc(GetHwnd(), nMsg, wParam, lParam);
|
||||||
}
|
}
|
||||||
@@ -3309,9 +3296,6 @@ bool wxWindowMSW::HandleDropFiles(WXWPARAM wParam)
|
|||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
#ifdef __DIGITALMARS__
|
|
||||||
extern "C" HCURSOR wxGetCurrentBusyCursor();
|
|
||||||
#endif
|
|
||||||
|
|
||||||
bool wxWindowMSW::HandleSetCursor(WXHWND WXUNUSED(hWnd),
|
bool wxWindowMSW::HandleSetCursor(WXHWND WXUNUSED(hWnd),
|
||||||
short nHitTest,
|
short nHitTest,
|
||||||
|
@@ -227,7 +227,7 @@
|
|||||||
*/
|
*/
|
||||||
#ifndef MACOS
|
#ifndef MACOS
|
||||||
# if (defined(__MWERKS__) && defined(macintosh)) || defined(applec) || \
|
# if (defined(__MWERKS__) && defined(macintosh)) || defined(applec) || \
|
||||||
defined(THINK_C) || defined(__SC__) || defined(TARGET_OS_MAC)
|
defined(THINK_C) || (defined(__SC__) && !defined(__DMC__))|| defined(TARGET_OS_MAC)
|
||||||
# define MACOS
|
# define MACOS
|
||||||
# endif
|
# endif
|
||||||
#endif
|
#endif
|
||||||
|
@@ -87,7 +87,7 @@
|
|||||||
#endif
|
#endif
|
||||||
|
|
||||||
/* Some Mac compilers merge all .h files incorrectly: */
|
/* Some Mac compilers merge all .h files incorrectly: */
|
||||||
#if defined(__MWERKS__) || defined(applec) ||defined(THINK_C) ||defined(__SC__)
|
#if defined(__MWERKS__) || defined(applec) ||defined(THINK_C) ||(defined(__SC__) && !defined(__DMC__))
|
||||||
# define NO_DUMMY_DECL
|
# define NO_DUMMY_DECL
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user