From ad5c34f309074eefe625b82e1203eec5b91247f5 Mon Sep 17 00:00:00 2001 From: Julian Smart Date: Fri, 8 Jan 1999 21:09:46 +0000 Subject: [PATCH] Changes to allow Cygwin to compile in non-PCH mode git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@1350 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- distrib/msw/zipdist.bat | 6 ++++++ include/wx/defs.h | 36 +++++++++++++++++++++++++++++++++++- include/wx/msw/treectrl.h | 1 + include/wx/wxprec.h | 2 +- src/common/file.cpp | 3 +++ src/msw/joystick.cpp | 1 + src/msw/listctrl.cpp | 2 +- src/msw/makefile.g95 | 6 +++--- src/msw/slider95.cpp | 2 ++ src/msw/taskbar.cpp | 8 ++++++-- src/msw/treectrl.cpp | 6 +++++- 11 files changed, 64 insertions(+), 9 deletions(-) diff --git a/distrib/msw/zipdist.bat b/distrib/msw/zipdist.bat index f6d91e089b..0e1dde4dab 100755 --- a/distrib/msw/zipdist.bat +++ b/distrib/msw/zipdist.bat @@ -38,6 +38,12 @@ zip32 -@ %dest\ogl3.zip < %src\utils\ogl\distrib\ogl.rsp rem Tex2RTF zip32 -@ %dest\tex2rtf.zip < %src\distrib\msw\tex2rtf.rsp +copy %src\docs\changes.txt %dest +copy %src\docs\msw\install.txt %dest\install_msw.txt +copy %src\docs\motif\install.txt %dest\install_motif.txt +copy %src\docs\gtk\install.txt %dest\install_gtk.txt +copy %src\docs\readme.txt %dest + cd %dest echo wxWindows archived. diff --git a/include/wx/defs.h b/include/wx/defs.h index 170cc0e38f..a9ae62cf41 100644 --- a/include/wx/defs.h +++ b/include/wx/defs.h @@ -976,7 +976,6 @@ typedef void* gpointer; /* Stand-ins for GDK types */ typedef gulong GdkAtom; -typedef struct _GdkVisual GdkVisual; typedef struct _GdkColor GdkColor; typedef struct _GdkColormap GdkColormap; typedef struct _GdkFont GdkFont; @@ -995,7 +994,42 @@ typedef struct _GtkList GtkList; typedef struct _GtkToolbar GtkToolbar; typedef struct _GtkNotebook GtkNotebook; typedef struct _GtkNotebookPage GtkNotebookPage; + +#endif + +// This is required because of clashing macros in windows.h, which may be +// included before or after wxWindows classes, and therefore must be +// disabled here before any significant wxWindows headers are included. +#ifdef __WXMSW__ +#ifdef GetClassInfo +#undef GetClassInfo +#endif + +#ifdef GetClassName +#undef GetClassName +#endif + +#ifdef DrawText +#undef DrawText +#endif + +#ifdef GetCharWidth +#undef GetCharWidth +#endif + +#ifdef StartDoc +#undef StartDoc +#endif + +#ifdef FindWindow +#undef FindWindow +#endif + +#ifdef FindResource +#undef FindResource +#endif #endif + // __WXMSW__ #endif // _WX_DEFS_H_ diff --git a/include/wx/msw/treectrl.h b/include/wx/msw/treectrl.h index 9fda6b0f87..48c0d60504 100644 --- a/include/wx/msw/treectrl.h +++ b/include/wx/msw/treectrl.h @@ -21,6 +21,7 @@ #include "wx/control.h" #include "wx/event.h" +#include "wx/textctrl.h" #ifdef __GNUWIN32__ # ifdef GetFirstChild diff --git a/include/wx/wxprec.h b/include/wx/wxprec.h index a5e0b4bce8..b7c00c4f70 100644 --- a/include/wx/wxprec.h +++ b/include/wx/wxprec.h @@ -10,7 +10,7 @@ ///////////////////////////////////////////////////////////////////////////// // check if to use precompiled headers -#if (defined(__BORLANDC__) || defined(_MSC_VER) || defined(__WATCOMC__) || defined(__GNUWIN32__)) && defined(__WXMSW__) +#if (defined(__BORLANDC__) || defined(_MSC_VER) || defined(__WATCOMC__)) && defined(__WXMSW__) #if !NOPCH #define WX_PRECOMP #endif diff --git a/src/common/file.cpp b/src/common/file.cpp index 30bc2d13d7..9a8684002b 100644 --- a/src/common/file.cpp +++ b/src/common/file.cpp @@ -53,6 +53,9 @@ #include // for GetTempFileName #elif (defined(__UNIX__) || defined(__GNUWIN32__)) #include +#ifdef __GNUWIN32__ + #include +#endif #elif (defined(__WXSTUBS__)) // Have to ifdef this for different environments #include diff --git a/src/msw/joystick.cpp b/src/msw/joystick.cpp index de7d50f4b1..6f5dfcd0b5 100644 --- a/src/msw/joystick.cpp +++ b/src/msw/joystick.cpp @@ -39,6 +39,7 @@ typedef UINT MMRESULT; #define NO_JOYGETPOSEX #endif +#include #include IMPLEMENT_DYNAMIC_CLASS(wxJoystick, wxObject) diff --git a/src/msw/listctrl.cpp b/src/msw/listctrl.cpp index ef8ee7abc9..0ba3d68da5 100644 --- a/src/msw/listctrl.cpp +++ b/src/msw/listctrl.cpp @@ -21,7 +21,7 @@ #endif #ifndef WX_PRECOMP -#include "wx.h" +#include "wx/wx.h" #endif #if defined(__WIN95__) diff --git a/src/msw/makefile.g95 b/src/msw/makefile.g95 index 202b58d8a1..21199e7ca6 100644 --- a/src/msw/makefile.g95 +++ b/src/msw/makefile.g95 @@ -60,12 +60,9 @@ DOCDIR = $(WXDIR)\docs GENERICOBJS= \ $(GENDIR)/choicdgg.$(OBJSUFF) \ - $(GENDIR)/colrdlgg.$(OBJSUFF) \ $(GENDIR)/dirdlgg.$(OBJSUFF) \ - $(GENDIR)/fontdlgg.$(OBJSUFF) \ $(GENDIR)/gridg.$(OBJSUFF) \ $(GENDIR)/laywin.$(OBJSUFF) \ - $(GENDIR)/msgdlgg.$(OBJSUFF) \ $(GENDIR)/panelg.$(OBJSUFF) \ $(GENDIR)/prop.$(OBJSUFF) \ $(GENDIR)/propform.$(OBJSUFF) \ @@ -77,8 +74,11 @@ GENERICOBJS= \ $(GENDIR)/tabg.$(OBJSUFF) \ $(GENDIR)/textdlgg.$(OBJSUFF) +# $(GENDIR)/colrdlgg.$(OBJSUFF) \ +# $(GENDIR)/fontdlgg.$(OBJSUFF) \ # $(GENDIR)/prntdlgg.$(OBJSUFF) \ # $(GENDIR)/printps.$(OBJSUFF) \ +# $(GENDIR)/msgdlgg.$(OBJSUFF) \ COMMONOBJS = \ $(COMMDIR)/config.$(OBJSUFF) \ diff --git a/src/msw/slider95.cpp b/src/msw/slider95.cpp index 6e5f9c4ba3..9047d9bd7c 100644 --- a/src/msw/slider95.cpp +++ b/src/msw/slider95.cpp @@ -22,6 +22,8 @@ #ifndef WX_PRECOMP #include +#include +#include #endif #ifdef __WIN95__ diff --git a/src/msw/taskbar.cpp b/src/msw/taskbar.cpp index 749fabf602..334be2636e 100644 --- a/src/msw/taskbar.cpp +++ b/src/msw/taskbar.cpp @@ -21,15 +21,19 @@ #pragma hdrstop #endif +#include + #ifndef WX_PRECOMP #include "wx/defs.h" +#include "wx/window.h" +#include "wx/frame.h" +#include "wx/utils.h" #endif #ifdef __WIN95__ -#include #include -#include +#include #include #ifdef __GNUWIN32__ diff --git a/src/msw/treectrl.cpp b/src/msw/treectrl.cpp index 929193aa7d..07b86000b9 100644 --- a/src/msw/treectrl.cpp +++ b/src/msw/treectrl.cpp @@ -28,7 +28,7 @@ #endif #ifndef WX_PRECOMP - #include "wx.h" + #include "wx/wx.h" #endif #if defined(__WIN95__) @@ -54,6 +54,10 @@ #undef GetNextSibling #endif +#ifdef GetClassInfo +#undef GetClassInfo +#endif + #include "wx/msw/treectrl.h" // Bug in headers, sometimes -- 2.45.2