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
|
||||
// adding DigitalMars here appears to amke it slower!
|
||||
// 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)
|
||||
#define WX_PRECOMP
|
||||
#endif
|
||||
|
@@ -1,7 +1,6 @@
|
||||
# Symantec C++ makefile
|
||||
WXDIR = ..\..
|
||||
EXTRALIBS=
|
||||
#Makefile from wxHatch for Symantec/Digital Mars compiler
|
||||
WXDIR=..\..\..\wxWindows.25
|
||||
TARGET=dialogs
|
||||
OBJECTS = $(TARGET).obj
|
||||
OBJECTS = $(TARGET).obj
|
||||
EXTRALIBS =
|
||||
include $(WXDIR)\src\makeprog.sc
|
||||
|
||||
|
@@ -141,9 +141,7 @@ wxDataObjectComposite::GetPreferredFormat(Direction WXUNUSED(dir)) const
|
||||
}
|
||||
|
||||
#if defined(__WXMSW__)
|
||||
#ifdef __DIGITALMARS__
|
||||
extern "C"
|
||||
#endif
|
||||
|
||||
size_t wxDataObjectComposite::GetBufferOffset( const wxDataFormat& format )
|
||||
{
|
||||
wxDataObjectSimple *dataObj = GetObject(format);
|
||||
@@ -154,9 +152,7 @@ size_t wxDataObjectComposite::GetBufferOffset( const wxDataFormat& format )
|
||||
return dataObj->GetBufferOffset( format );
|
||||
}
|
||||
|
||||
#ifdef __DIGITALMARS__
|
||||
extern "C"
|
||||
#endif
|
||||
|
||||
const void* wxDataObjectComposite::GetSizeFromBuffer( const void* buffer,
|
||||
size_t* size,
|
||||
const wxDataFormat& format )
|
||||
@@ -169,9 +165,7 @@ const void* wxDataObjectComposite::GetSizeFromBuffer( const void* buffer,
|
||||
return dataObj->GetSizeFromBuffer( buffer, size, format );
|
||||
}
|
||||
|
||||
#ifdef __DIGITALMARS__
|
||||
extern "C"
|
||||
#endif
|
||||
|
||||
void* wxDataObjectComposite::SetSizeInBuffer( void* buffer, size_t size,
|
||||
const wxDataFormat& format )
|
||||
{
|
||||
|
@@ -33,7 +33,7 @@
|
||||
// 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
|
||||
// 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
|
||||
#include <windows.h>
|
||||
#endif
|
||||
|
@@ -3,6 +3,7 @@
|
||||
SC_SUFFIX=_sc
|
||||
|
||||
####WXDIR = $(WXWIN)
|
||||
WXOUTDIR=$(WXDIR)\d_mars
|
||||
INCDIR = $(WXDIR)\include
|
||||
CONTRIBINCDIR = $(WXDIR)\contrib\include
|
||||
MSWINCDIR = $(WXDIR)\include\wx\msw
|
||||
@@ -27,7 +28,10 @@ RC=rcc
|
||||
|
||||
# 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)
|
||||
##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
|
||||
# possible bug with putting d on any extralibs if we have debug and release versions one day
|
||||
LDFLAGS = $(EXTRALDFLAGS)
|
||||
@@ -35,7 +39,7 @@ LIBS=$(WXLIB) $(EXTRALIBS) $(SUPPORTLIBS) advapi32 comctl32 comdlg32 ctl3d32 gc
|
||||
|
||||
|
||||
.$(SRCSUFF).obj:
|
||||
*$(CC) -c $(CFLAGS) $(INCLUDE) $(OPTIONS) $< -o$@
|
||||
*$(CC) -c $(CPPFLAGS) $(CFLAGS) $(INCLUDE) $(OPTIONS) $< -o$@
|
||||
|
||||
# -Jm: relaxed type checking only for .C files
|
||||
.c.obj:
|
||||
|
@@ -151,11 +151,7 @@ HICON wxDEFAULT_MDIPARENTFRAME_ICON = (HICON) NULL;
|
||||
|
||||
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);
|
||||
#endif
|
||||
|
||||
// FIXME wxUSE_ON_FATAL_EXCEPTION is only supported for VC++ now because it
|
||||
// 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,
|
||||
const void *data,
|
||||
|
@@ -440,9 +440,6 @@ size_t wxDIB::ConvertFromBitmap(BITMAPINFO *pbi, HBITMAP hbmp)
|
||||
}
|
||||
|
||||
/* static */
|
||||
#ifdef __DIGITALMARS__
|
||||
extern "C"
|
||||
#endif
|
||||
HGLOBAL wxDIB::ConvertFromBitmap(HBITMAP hbmp)
|
||||
{
|
||||
// first calculate the size needed
|
||||
|
@@ -327,13 +327,14 @@ MSWOBJS = $(MSWDIR)\accel.obj \
|
||||
# Add $(NONESSENTIALOBJS) if wanting generic dialogs, PostScript etc.
|
||||
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:
|
||||
@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)\wx
|
||||
@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
|
||||
MAKELIBS:
|
||||
@@ -344,7 +345,7 @@ $(LIBTARGET): $(OBJECTS)
|
||||
-del $(LIBTARGET)
|
||||
*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:
|
||||
-del $(COMMDIR)\*.obj
|
||||
@@ -356,6 +357,13 @@ clean_msw:
|
||||
-del ole\*.obj
|
||||
-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:
|
||||
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 *wxMDIChildFrameClassName;
|
||||
extern const wxChar *wxMDIChildFrameClassNameNoRedraw;
|
||||
#ifdef __DIGITALMARS__
|
||||
extern "C" void wxAssociateWinWithHandle(HWND hWnd, wxWindow *win);
|
||||
#else
|
||||
extern void wxAssociateWinWithHandle(HWND hWnd, wxWindow *win);
|
||||
#endif
|
||||
extern void wxRemoveHandleAssociation(wxWindow *win);
|
||||
|
||||
static HWND invalidHandle = 0;
|
||||
|
@@ -410,19 +410,6 @@ STDMETHODIMP wxIDataObject::GetDataHere(FORMATETC *pformatetc,
|
||||
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
|
||||
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 int gs_wxBusyCursorCount = 0;
|
||||
|
||||
#ifdef __DIGITALMARS__
|
||||
extern "C" HCURSOR wxGetCurrentBusyCursor()
|
||||
#else
|
||||
extern HCURSOR wxGetCurrentBusyCursor()
|
||||
#endif
|
||||
{
|
||||
return gs_wxBusyCursor;
|
||||
}
|
||||
|
@@ -176,13 +176,8 @@ static bool gs_hasStdCmap = FALSE;
|
||||
// ---------------------------------------------------------------------------
|
||||
|
||||
// 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,
|
||||
WPARAM wParam, LPARAM lParam);
|
||||
#endif
|
||||
|
||||
|
||||
#ifdef __WXDEBUG__
|
||||
@@ -190,11 +185,7 @@ LRESULT WXDLLEXPORT APIENTRY _EXPORT wxWndProc(HWND hWnd, UINT message,
|
||||
#endif //__WXDEBUG__
|
||||
|
||||
void wxRemoveHandleAssociation(wxWindowMSW *win);
|
||||
#ifdef __DIGITALMARS__
|
||||
extern "C" void wxAssociateWinWithHandle(HWND hWnd, wxWindowMSW *win);
|
||||
#else
|
||||
extern void wxAssociateWinWithHandle(HWND hWnd, wxWindowMSW *win);
|
||||
#endif
|
||||
wxWindow *wxFindWinFromHandle(WXHWND hWnd);
|
||||
|
||||
// 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)
|
||||
{
|
||||
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);
|
||||
#endif
|
||||
else
|
||||
return ::DefWindowProc(GetHwnd(), nMsg, wParam, lParam);
|
||||
}
|
||||
@@ -3309,9 +3296,6 @@ bool wxWindowMSW::HandleDropFiles(WXWPARAM wParam)
|
||||
#endif
|
||||
}
|
||||
|
||||
#ifdef __DIGITALMARS__
|
||||
extern "C" HCURSOR wxGetCurrentBusyCursor();
|
||||
#endif
|
||||
|
||||
bool wxWindowMSW::HandleSetCursor(WXHWND WXUNUSED(hWnd),
|
||||
short nHitTest,
|
||||
|
@@ -227,7 +227,7 @@
|
||||
*/
|
||||
#ifndef MACOS
|
||||
# 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
|
||||
# endif
|
||||
#endif
|
||||
|
@@ -87,7 +87,7 @@
|
||||
#endif
|
||||
|
||||
/* 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
|
||||
#endif
|
||||
|
||||
|
Reference in New Issue
Block a user