]> git.saurik.com Git - wxWidgets.git/commitdiff
Made changes to allow build with new mingw32/gcc-2.95
authorJ. Russell Smyth <drfish@cox.net>
Wed, 4 Aug 1999 00:42:51 +0000 (00:42 +0000)
committerJ. Russell Smyth <drfish@cox.net>
Wed, 4 Aug 1999 00:42:51 +0000 (00:42 +0000)
added wxUSE_NORLANDER_HEADERS for mingw32/gcc-2.95

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@3258 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775

34 files changed:
include/wx/defs.h
include/wx/msw/private.h
include/wx/msw/registry.h
src/common/dynlib.cpp
src/generic/tipdlg.cpp
src/msw/app.cpp
src/msw/checklst.cpp
src/msw/control.cpp
src/msw/curico.cpp
src/msw/dc.cpp
src/msw/dde.cpp
src/msw/dib.cpp
src/msw/dibutils.cpp
src/msw/dragimag.cpp
src/msw/gauge95.cpp
src/msw/imaglist.cpp
src/msw/joystick.cpp
src/msw/listbox.cpp
src/msw/listctrl.cpp
src/msw/minifram.cpp
src/msw/notebook.cpp
src/msw/registry.cpp
src/msw/slider95.cpp
src/msw/spinbutt.cpp
src/msw/statbr95.cpp
src/msw/tabctrl.cpp
src/msw/taskbar.cpp
src/msw/tbar95.cpp
src/msw/textctrl.cpp
src/msw/tooltip.cpp
src/msw/treectrl.cpp
src/msw/wave.cpp
src/msw/window.cpp
utils/wxtree/src/makefile.g95

index 5e225385ecf2e1f9b719d5cc04250477bee8b6ca..f99ef2326b78933e03d2b17a79d22aefc6365fa9 100644 (file)
 #if defined(__HPUX__) && defined(__GNUG__)
     #define va_list __gnuc_va_list
 #endif // HP-UX
+    
+// Mingw32 gcc-2.95 uses new windows headers which are more ms-like
+// we are setting this define because of the complex check
+// using NORLANDER as Cygwin may follow. (header author is Anders Norlander)
+#if defined(__MINGW32__) && (__GNUC__>=2) && (__GNUC_MINOR__>=95)
+#   define wxUSE_NORLANDER_HEADERS 1
+#endif
+
 
 //////////////////////////////////////////////////////////////////////////////////
 // Currently Only MS-Windows/NT, XView and Motif are supported
index 8d4eee417ec1b7aa443446b995ee6eb6d63539c0..0ff6b1a46d288b4f54ac17db36cabb6ead13d9eb 100644 (file)
@@ -56,7 +56,7 @@ WXDLLEXPORT_DATA(extern HFONT) wxSTATUS_LINE_FONT;
 // window proc
 // ---------------------------------------------------------------------------
 
-#if defined(__GNUWIN32__) 
+#if defined(__GNUWIN32__) && !defined(wxUSE_NORLANDER_HEADERS)
 #  define CASTWNDPROC (long unsigned)
 #else
 #  ifdef __BORLANDC__
@@ -69,7 +69,7 @@ WXDLLEXPORT_DATA(extern HFONT) wxSTATUS_LINE_FONT;
 #  endif
 
 #  else
-#    if defined (__WIN32__) && defined(STRICT)
+#    if defined (__WIN32__) && defined(STRICT) 
        typedef long (_stdcall * WndProcCast) (HWND, unsigned int, unsigned int, long);
 #      define CASTWNDPROC (WndProcCast)
 #    elif defined(__WIN16__)
index 693207b3fd31a4c6f9d2a4ab69ab6ee3b9568136..958b78c878df9fd6e4040a734577c875b5b907f4 100644 (file)
@@ -125,7 +125,7 @@ public:
   bool  Exists() const;
     // get the info about key (any number of these pointers may be NULL)
 
-#ifdef __GNUWIN32__
+#if defined( __GNUWIN32__) && !defined(wxUSE_NORLANDER_HEADERS)
   bool  GetKeyInfo(size_t *pnSubKeys,      // number of subkeys
                    size_t *pnMaxKeyLen,    // max len of subkey name
                    size_t *pnValues,       // number of values
index ef1ba88aa14dd00b564841c9441090123a8a5892..a3158210e28d26848bc82e2519b66061f59e8938 100644 (file)
@@ -276,7 +276,7 @@ wxDllLoader::GetSymbol(wxDllType dllHandle, const wxString &name)
 // wxLibraries (only one instance should normally exist)
 // ---------------------------------------------------------------------------
 
-wxLibraries::wxLibraries()
+wxLibraries::wxLibraries():m_loaded(wxKEY_STRING)
 {
 }
 
index ad93ae8f818a74305e8f3da4147907eeec898332..4aebcf06e30e8255de21d89d0b2807cc7bf2ee3a 100644 (file)
@@ -152,7 +152,7 @@ wxString wxFileTipProvider::GetTip()
 // ----------------------------------------------------------------------------
 
 BEGIN_EVENT_TABLE(wxTipDialog, wxDialog)
-    EVT_BUTTON(wxID_NEXT_TIP, OnNextTip)
+    EVT_BUTTON(wxID_NEXT_TIP, wxTipDialog::OnNextTip)
 END_EVENT_TABLE()
 
 wxTipDialog::wxTipDialog(wxWindow *parent,
index 35c8510c4872d2a90d8b21b30ef9ed8e0907407d..dc4e711541d8e0e4be1bc4254f96d73e88d0f2d6 100644 (file)
@@ -82,7 +82,7 @@
 #include <string.h>
 #include <ctype.h>
 
-#if (defined(__WIN95__) && !defined(__GNUWIN32__)) || defined(__TWIN32__)
+#if (defined(__WIN95__) && !defined(__GNUWIN32__)) || defined(__TWIN32__) || defined(wxUSE_NORLANDER_HEADERS)
     #include <commctrl.h>
 #endif
 
index f9de4075a89e918b968566a452d232a911174c03..963c661c4394ea880038f0689adc038c42617441 100644 (file)
@@ -45,7 +45,7 @@
 #include <windows.h>
 #include <windowsx.h>
 
-#ifdef __GNUWIN32__
+#if defined(__GNUWIN32__) && !defined(wxUSE_NORLANDER_HEADERS)
 #include "wx/msw/gnuwin32/extra.h"
 #endif
 
index 88ab79da903f1ad3a1b38c4b3dc4cf1d605638e9..3ae9f711d211cce38bbf0caf2f87435b3ee5f51f 100644 (file)
@@ -30,7 +30,7 @@
 
 #include "wx/msw/private.h"
 
-#if (defined(__WIN95__) && !defined(__GNUWIN32__)) || defined(__TWIN32__)
+#if (defined(__WIN95__) && !defined(__GNUWIN32__)) || defined(__TWIN32__) || defined(wxUSE_NORLANDER_HEADERS)
 #include <commctrl.h>
 #endif
 
index 7cabfd7ce054e4aa7b8ecf15444889b007c84829..5bd16e67a0867a723c2a7cfef1e51587e2424dc0 100644 (file)
@@ -25,7 +25,7 @@
 #endif
 
 #ifndef __TWIN32__
-#ifdef __GNUWIN32__
+#if defined (__GNUWIN32__) && !defined(wxUSE_NORLANDER_HEADERS)
 #include "wx/msw/gnuwin32/extra.h"
 #endif
 #endif
index d17e9b196137b35cc9628f1b159de6226d551c97..f424405768d840d002d44ca63677659eaf6162f9 100644 (file)
@@ -46,6 +46,9 @@
 #include <math.h>
 
 #if wxUSE_COMMON_DIALOGS
+#if wxUSE_NORLANDER_HEADERS
+    #include <windows.h>
+#endif
     #include <commdlg.h>
 #endif
 
index 2d28519eccd48830ed0e8a9d09bbe3b22565ecd8..cff1fb1a1a966a0fb175bc811e1e775f32c0c0ad 100644 (file)
 #include <ddeml.h>
 
 #ifndef __TWIN32__
+#if !wxUSE_NORLANDER_HEADERS
 #ifdef __GNUWIN32__
 #include "wx/msw/gnuwin32/extra.h"
 #endif
 #endif
+#endif
 
 #include <string.h>
 
index 54ccf8ab88cf35239c1b7119448fee8660c07a7c..e4f8360ad673c4f0f87f777121c3e87e05d3ed90 100644 (file)
 #include "wx/msw/dib.h"
 
 #ifndef __TWIN32__
+#ifndef wxUSE_NORLANDER_HEADERS
 #ifdef __GNUWIN32__
 #include "wx/msw/gnuwin32/extra.h"
 #endif
 #endif
+#endif
 
 #ifndef SEEK_CUR
 /* flags for _lseek */
index e8f639f22c3dedfbff30ef054eb5a1eaaa533481..31bcfb7e29144c0c9b5b45d61ffebd8e2349507f 100644 (file)
@@ -167,7 +167,7 @@ int DibWriteFile(LPTSTR szFile, LPBITMAPINFOHEADER lpbi)
   bmf.bfReserved1 = 0;
   bmf.bfReserved2 = 0;
   bmf.bfOffBits = sizeof(bmf) + (char FAR*)(DibPtr(lpbi)) - (char FAR*)lpbi;
-#if defined( __WATCOMC__) || defined(__VISUALC__) || defined(__SC__) || defined(__SALFORDC__) || defined(__MWERKS__)
+#if defined( __WATCOMC__) || defined(__VISUALC__) || defined(__SC__) || defined(__SALFORDC__) || defined(__MWERKS__) || defined(wxUSE_NORLANDER_HEADERS)
   if (_hwrite(fh, (LPCSTR)(&bmf), sizeof(bmf))<0 ||
   _hwrite(fh, (LPCSTR)lpbi, size)<0) {
     _lclose(fh);
index 8c6749eb92f80d4baa70f786ac1c8f44b21a73c9..667462e346f80f2f9a306976e0ad69bfc8496cb5 100644 (file)
@@ -38,7 +38,7 @@
 #include "wx/msw/dragimag.h"
 #include "wx/msw/private.h"
 
-#if (defined(__WIN95__) && !defined(__GNUWIN32__)) || defined(__TWIN32__)
+#if (defined(__WIN95__) && !defined(__GNUWIN32__)) || defined(__TWIN32__) || defined(wxUSE_NORLANDER_HEADERS)
 #include <commctrl.h>
 #endif
 
index ade3fdca7ce4924ee623022fbb892fb1f40c773c..0ddfcba4d4ea6141e91fa6d74f32ef353d182837 100644 (file)
@@ -29,7 +29,7 @@
 #include "wx/msw/gauge95.h"
 #include "wx/msw/private.h"
 
-#if (defined(__WIN95__) && !defined(__GNUWIN32__)) || defined(__TWIN32__)
+#if (defined(__WIN95__) && !defined(__GNUWIN32__)) || defined(__TWIN32__) || defined(wxUSE_NORLANDER_HEADERS)
 #include <commctrl.h>
 #endif
 
index a4e2fe629dfde1418c5a09bd3061bad5f5f9ffb4..540c176058af316a8a13c4a4bd0f7fb3c1a6a159 100644 (file)
@@ -37,7 +37,7 @@
 #include "wx/msw/imaglist.h"
 #include "wx/msw/private.h"
 
-#if (defined(__WIN95__) && !defined(__GNUWIN32__)) || defined(__TWIN32__)
+#if (defined(__WIN95__) && !defined(__GNUWIN32__)) || defined(__TWIN32__) || defined(wxUSE_NORLANDER_HEADERS)
 #include <commctrl.h>
 #endif
 
index 407e7041308cef05985064547c04764f62a13735..58b763191597c918e3907eb25f3cda1cd7e8a31e 100644 (file)
@@ -24,7 +24,7 @@
 #include "wx/window.h"
 #include "wx/msw/private.h"
 
-#ifndef __GNUWIN32__
+#if !defined( __GNUWIN32__ ) || defined(wxUSE_NORLANDER_HEADERS)
 #include <mmsystem.h>
 #endif
 
@@ -34,9 +34,11 @@ typedef UINT MMRESULT;
 
 #ifndef __TWIN32__
 #ifdef __GNUWIN32__
+#ifndef wxUSE_NORLANDER_HEADERS
 #include <wx/msw/gnuwin32/extra.h>
 #endif
 #endif
+#endif
 
 // Why doesn't BC++ have joyGetPosEx?
 #if !defined(__WIN32__) || defined(__BORLANDC__) || defined(__TWIN32__)
index 34927877b227338b16c6de4fe5e71668cb7ef967..02d55e900d4d19195be5f7e9a758cead0824aa79 100644 (file)
@@ -49,7 +49,9 @@
 
 #ifndef __TWIN32__
     #if defined(__GNUWIN32__)
-        #include <wx/msw/gnuwin32/extra.h>
+        #ifndef wxUSE_NORLANDER_HEADERS
+            #include <wx/msw/gnuwin32/extra.h>
+        #endif
     #endif
 #endif
 
index 811fadec21bcd816674cb4163f59e2a9eebf4d66..e3372ec70789ab74218b419a1ca4c6211fce2e23 100644 (file)
@@ -39,7 +39,7 @@
 
 #include "wx/msw/private.h"
 
-#ifdef __GNUWIN32__
+#if defined(__GNUWIN32__) && !defined(wxUSE_NORLANDER_HEADERS)
     #include "wx/msw/gnuwin32/extra.h"
 #else
     #include <commctrl.h>
index 016e7e775a4ed27f0f37241b80bd668b9c4e8782..e40b0532f8ad1ae7dd32606d42dbc8cf6466d5b2 100644 (file)
 
 #ifndef __TWIN32__
 #ifdef __GNUWIN32__
+#ifndef wxUSE_NORLANDER_HEADERS
 #include "wx/msw/gnuwin32/extra.h"
 #endif
 #endif
+#endif
 
 #if !USE_SHARED_LIBRARY
 IMPLEMENT_DYNAMIC_CLASS(wxMiniFrame, wxFrame)
index 52bf8dcd0dea663992d6fede27a2ae32ce5f91e9..2961439e4b653d655dcaab0c2e1d3aa822699cf8 100644 (file)
 
 #ifndef __TWIN32__
 #ifdef __GNUWIN32__
+#ifndef wxUSE_NORLANDER_HEADERS
   #include "wx/msw/gnuwin32/extra.h"
 #endif
 #endif
+#endif
 
-#if !defined(__GNUWIN32__) || defined(__TWIN32__)
+#if !defined(__GNUWIN32__) || defined(__TWIN32__) || defined(wxUSE_NORLANDER_HEADERS)
   #include <commctrl.h>
 #endif
 
index dca9790b5de68d6f10f5ce869f0cccf473288a22..fe8897463ec947a417234378e63dfade2c0fef94 100644 (file)
@@ -302,7 +302,7 @@ wxString wxRegKey::GetName(bool bShortPrefix) const
   return str;
 }
 
-#ifdef __GNUWIN32__
+#if defined( __GNUWIN32__ ) && !defined(wxUSE_NORLANDER_HEADERS)
 bool wxRegKey::GetKeyInfo(size_t* pnSubKeys,
                           size_t* pnMaxKeyLen,
                           size_t* pnValues,
index ad622b84fdf3a26efddc29622580ba48e900c225..d6334217be0a04e9a2976b4e839c418db57f0902 100644 (file)
@@ -31,7 +31,7 @@
 #include "wx/msw/slider95.h"
 #include "wx/msw/private.h"
 
-#if (defined(__WIN95__) && !defined(__GNUWIN32__)) || defined(__TWIN32__)
+#if (defined(__WIN95__) && !defined(__GNUWIN32__)) || defined(__TWIN32__) || defined(wxUSE_NORLANDER_HEADERS)
 #include <commctrl.h>
 #endif
 
index 86e07a7f8403f94c9014e1d1068dcc5321285512..b83b6f0493f8357d98ef933dfd16b2f0533cd600 100644 (file)
@@ -32,7 +32,7 @@
 #include "wx/spinbutt.h"
 #include "wx/msw/private.h"
 
-#if !defined(__GNUWIN32__) || defined(__TWIN32__)
+#if !defined(__GNUWIN32__) || defined(__TWIN32__) || defined(wxUSE_NORLANDER_HEADERS)
     #include <commctrl.h>
 #endif
 
index e6a2d6dbdb53fa10d5345f1389e1832df31a9a73..b8de79f67c6869531fe46d4e2961c84c7d6b633a 100644 (file)
@@ -36,7 +36,7 @@
 #include "wx/msw/private.h"
 #include <windowsx.h>
 
-#if !defined(__GNUWIN32__) || defined(__TWIN32__)
+#if !defined(__GNUWIN32__) || defined(__TWIN32__) || defined(wxUSE_NORLANDER_HEADERS)
 #include <commctrl.h>
 #endif
 
index 4f525436fcc7b9bab2bbb70b6bb596dfc1854a05..ee06ee6fe493d19af90662255b92cb965b6fb130 100644 (file)
 
 #include <windows.h>
 
-#if (defined(__WIN95__) && !defined(__GNUWIN32__)) || defined(__TWIN32__)
+#if (defined(__WIN95__) && !defined(__GNUWIN32__)) || defined(__TWIN32__) || defined(wxUSE_NORLANDER_HEADERS)
 #include <commctrl.h>
 #endif
 
 #ifndef __TWIN32__
 #ifdef __GNUWIN32__
+#ifndef wxUSE_NORLANDER_HEADERS
 #include "wx/msw/gnuwin32/extra.h"
 #endif
 #endif
+#endif
 
 #include "wx/msw/dib.h"
 #include "wx/msw/tabctrl.h"
index fdf563dc377958c13b6a9de3d0664a1b4a2bb02b..8c8fbe0b6f2b07a19a43ddbe8863f7ce1e39b1cb 100644 (file)
 
 #ifndef __TWIN32__
 #ifdef __GNUWIN32__
+#ifndef wxUSE_NORLANDER_HEADERS
 #include <wx/msw/gnuwin32/extra.h>
 #endif
 #endif
+#endif
 
 #ifdef __SALFORDC__
 #include <shellapi.h>
index 6a9fcc6cfa8312b3f8942be7352391883d4ff963..51c70e7556830217ceda5a6586385549d5349827 100644 (file)
 
 #include <windows.h>
 
-#if (defined(__WIN95__) && !defined(__GNUWIN32__)) || defined(__TWIN32__)
+#if (defined(__WIN95__) && !defined(__GNUWIN32__)) || defined(__TWIN32__) || defined(wxUSE_NORLANDER_HEADERS)
 #include <commctrl.h>
 #endif
 
 #ifndef __TWIN32__
 #ifdef __GNUWIN32__
+#ifndef wxUSE_NORLANDER_HEADERS
 #include "wx/msw/gnuwin32/extra.h"
 #endif
 #endif
+#endif
 
 #include "wx/msw/dib.h"
 #include "wx/tbar95.h"
index e953ec4e7daf80a3dc9d8ed8cdf68d7a1232ae4f..6770cc598c17317d9d26a356d1a8a0ca2818d729 100644 (file)
@@ -57,7 +57,7 @@
 #   include <fstream>
 #endif
 
-#if wxUSE_RICHEDIT && !defined(__GNUWIN32__)
+#if wxUSE_RICHEDIT && (!defined(__GNUWIN32__) || defined(wxUSE_NORLANDER_HEADERS))
     #include <richedit.h>
 #endif
 
index c119026190fc3039312275d01d5aea67554f4a58..ca76d82573fdf1711f86e7876e10bb2590cbffa5 100644 (file)
@@ -32,7 +32,7 @@
 #include "wx/tooltip.h"
 #include "wx/msw/private.h"
 
-#if (defined(__WIN95__) && !defined(__GNUWIN32__)) || defined(__TWIN32__)
+#if (defined(__WIN95__) && !defined(__GNUWIN32__)) || defined(__TWIN32__) || defined(wxUSE_NORLANDER_HEADERS)
 #include <commctrl.h>
 #endif
 
@@ -47,7 +47,7 @@ public:
     wxToolInfo(wxWindow *win)
     {
         // initialize all members
-#ifdef __GNUWIN32__
+#if defined( __GNUWIN32__ ) && !defined(wxUSE_NORLANDER_HEADERS)
         memset(this, 0, sizeof(TOOLINFO));
 #else
         ::ZeroMemory(this, sizeof(TOOLINFO));
index 4118355c1a53710d97e3c58be607d0649dfb2ded..8363d6ca9f58e033820252684541e2cb2f9396e3 100644 (file)
 #include "wx/treectrl.h"
 
 #ifdef __GNUWIN32__
+#ifndef wxUSE_NORLANDER_HEADERS
 #include "wx/msw/gnuwin32/extra.h"
 #endif
+#endif
 
-#if (defined(__WIN95__) && !defined(__GNUWIN32__)) || defined(__TWIN32__)
+#if (defined(__WIN95__) && !defined(__GNUWIN32__)) || defined(__TWIN32__) || defined(wxUSE_NORLANDER_HEADERS)
     #include <commctrl.h>
 #endif
 
@@ -195,7 +197,7 @@ bool wxTreeCtrl::Create(wxWindow *parent,
     if ( m_windowStyle & wxTR_LINES_AT_ROOT )
         wstyle |= TVS_LINESATROOT;
 
-#ifndef __GNUWIN32__
+#if !defined( __GNUWIN32__ ) && !defined(wxUSE_NORLANDER_HEADERS)
     // we emulate the multiple selection tree controls by using checkboxes: set
     // up the image list we need for this if we do have multiple selections
     if ( m_windowStyle & wxTR_MULTIPLE )
index df4b95ee7440ad0a15929ef79c1c6f281ed1a152..19b164f5a0e0bb773f9d2498c2a6c35ecae501ea 100644 (file)
 #include <windows.h>
 #include <windowsx.h>
 
-#ifndef __GNUWIN32__
+#if !defined( __GNUWIN32__ ) || defined(wxUSE_NORLANDER_HEADERS)
 #include <mmsystem.h>
 #endif
 
 #ifndef __TWIN32__
 #ifdef __GNUWIN32__
+#ifndef wxUSE_NORLANDER_HEADERS
 #include "wx/msw/gnuwin32/extra.h"
 #endif
 #endif
+#endif
 
 wxWave::wxWave()
   : m_waveData(NULL), m_waveLength(0), m_isResource(FALSE)
index 5e17c7e732152c378f119ea5db55061e424c233d..b9dfdd75e158613783f1340f0a7bbc278cae2e96 100644 (file)
@@ -80,7 +80,7 @@
 
 #include <string.h>
 
-#ifndef __GNUWIN32__
+#if !defined(__GNUWIN32__)|| defined(wxUSE_NORLANDER_HEADERS)
     #include <shellapi.h>
     #include <mmsystem.h>
 #endif
     #include <windowsx.h>
 #endif
 
-#if ( defined(__WIN95__) && !defined(__GNUWIN32__)) || defined(__TWIN32__ )
+#if ( defined(__WIN95__) && !defined(__GNUWIN32__)) || defined(__TWIN32__ ) || defined(wxUSE_NORLANDER_HEADERS)
     #include <commctrl.h>
 #endif
 
 #ifndef __TWIN32__
     #ifdef __GNUWIN32__
-        #include <wx/msw/gnuwin32/extra.h>
+        #ifndef wxUSE_NORLANDER_HEADERS
+            #include <wx/msw/gnuwin32/extra.h>
+        #endif
     #endif
 #endif
 
index 38c05afa709c4cd3e6bf0103db9efbb2c9b0b5c3..721817437c4e3796bdff9f59e3ee09698c6e1149 100644 (file)
@@ -7,7 +7,7 @@
 #
 # Makefile for wxWindows sample (Cygwin/Mingw32).
 
-WXDIR = ../../..
+WXDIR = $(WXWIN)
 
 TARGET=test
 OBJECTS = $(TARGET).o wxtree.o