From ae090fdb7f4be47466b5728ad37065923b48c8c3 Mon Sep 17 00:00:00 2001 From: Julian Smart Date: Fri, 8 Jun 2001 15:04:00 +0000 Subject: [PATCH] Support for Cygwin 1.0 (thought it worked before, but...) git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@10458 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- include/wx/msw/gccpriv.h | 7 ++++++- include/wx/msw/private.h | 2 +- src/makeg95.env | 4 ++-- src/msw/app.cpp | 2 +- src/msw/checklst.cpp | 2 +- src/msw/combobox.cpp | 4 ++-- src/msw/control.cpp | 2 +- src/msw/dragimag.cpp | 2 +- src/msw/fontenum.cpp | 2 +- src/msw/gauge95.cpp | 2 +- src/msw/imaglist.cpp | 2 +- src/msw/joystick.cpp | 2 +- src/msw/listctrl.cpp | 2 +- src/msw/notebook.cpp | 2 +- src/msw/ole/automtn.cpp | 2 +- src/msw/ole/oleutils.cpp | 6 ++++++ src/msw/radiobox.cpp | 2 +- src/msw/registry.cpp | 2 +- src/msw/slider95.cpp | 2 +- src/msw/spinbutt.cpp | 2 +- src/msw/spinctrl.cpp | 2 +- src/msw/statbr95.cpp | 2 +- src/msw/tabctrl.cpp | 2 +- src/msw/tbar95.cpp | 6 +++--- src/msw/textctrl.cpp | 2 +- src/msw/tooltip.cpp | 2 +- src/msw/treectrl.cpp | 2 +- src/msw/wave.cpp | 2 +- src/msw/window.cpp | 4 ++-- 29 files changed, 44 insertions(+), 33 deletions(-) diff --git a/include/wx/msw/gccpriv.h b/include/wx/msw/gccpriv.h index 5b130f01a0..5fff4db826 100644 --- a/include/wx/msw/gccpriv.h +++ b/include/wx/msw/gccpriv.h @@ -15,7 +15,7 @@ // Cygwin / Mingw32 with gcc >= 2.95 use new windows headers which // are more ms-like (header author is Anders Norlander, hence the name) -#if (defined(__MINGW32__) || defined(__CYGWIN__)) && ((__GNUC__>2) ||((__GNUC__==2) && (__GNUC_MINOR__>=95))) +#if (defined(__MINGW32__) || defined(__CYGWIN__)) && ((__GNUC__>2) || ((__GNUC__==2) && (__GNUC_MINOR__>=95))) #ifndef wxUSE_NORLANDER_HEADERS #define wxUSE_NORLANDER_HEADERS 1 #endif @@ -32,5 +32,10 @@ #define __GNUWIN32_OLD__ #endif +// Cygwin 1.0 +#if defined(__CYGWIN__) && ((__GNUC__==2) && (__GNUC_MINOR__==9)) + #define __CYGWIN10__ +#endif + #endif // _WX_MSW_GCCPRIV_H_ diff --git a/include/wx/msw/private.h b/include/wx/msw/private.h index 0f012b1994..1c4136e33a 100644 --- a/include/wx/msw/private.h +++ b/include/wx/msw/private.h @@ -68,7 +68,7 @@ WXDLLEXPORT_DATA(extern HFONT) wxSTATUS_LINE_FONT; // this defines a CASTWNDPROC macro which casts a pointer to the type of a // window proc -#ifdef __GNUWIN32_OLD__ +#if defined(__GNUWIN32_OLD__) && !defined(__CYGWIN10__) #define CASTWNDPROC (long unsigned) #else #if defined(STRICT) || defined(__GNUC__) diff --git a/src/makeg95.env b/src/makeg95.env index 1485e1d8b8..888bfee2ed 100644 --- a/src/makeg95.env +++ b/src/makeg95.env @@ -151,11 +151,11 @@ COMPPATHS= ########################## Directories ############################### +OLELIBS=-lole32 -loleaut32 -luuid WINLIBS=-lstdc++ -lgcc \ -lwinspool -lwinmm -lshell32 \ -lcomctl32 -lctl3d32 -lodbc32 -ladvapi32 \ - -lole32 -loleaut32 -luuid \ - -lodbc32 -lwsock32 -lopengl32 -lglu32 # -loldnames + -lodbc32 -lwsock32 -lopengl32 -lglu32 $(OLELIBS) # -loldnames #WINLIBS=-lstdc++ -lgcc \ # -lwinspool -lwinmm -lshell32 \ diff --git a/src/msw/app.cpp b/src/msw/app.cpp index 64b718e4e0..6277236d8e 100644 --- a/src/msw/app.cpp +++ b/src/msw/app.cpp @@ -86,7 +86,7 @@ #include #include -#if defined(__WIN95__) && !(defined(__GNUWIN32_OLD__) || defined(__TWIN32__)) +#if defined(__WIN95__) && !((defined(__GNUWIN32_OLD__) || defined(__TWIN32__)) && !defined(__CYGWIN10__)) #include #endif diff --git a/src/msw/checklst.cpp b/src/msw/checklst.cpp index 808a4b4f7f..ae3ced7b55 100644 --- a/src/msw/checklst.cpp +++ b/src/msw/checklst.cpp @@ -45,7 +45,7 @@ #include #include -#ifdef __GNUWIN32_OLD__ +#if defined(__GNUWIN32_OLD__) #include "wx/msw/gnuwin32/extra.h" #endif diff --git a/src/msw/combobox.cpp b/src/msw/combobox.cpp index fafda5dd76..a7062aaff4 100644 --- a/src/msw/combobox.cpp +++ b/src/msw/combobox.cpp @@ -41,7 +41,7 @@ #include "wx/msw/private.h" #if wxUSE_TOOLTIPS - #ifndef __GNUWIN32_OLD__ + #if !defined(__GNUWIN32_OLD__) || defined(__CYGWIN10__) #include #endif #include "wx/tooltip.h" @@ -115,7 +115,7 @@ LRESULT APIENTRY _EXPORT wxComboEditWndProc(HWND hWnd, #endif // 0 // deal with tooltips here -#if wxUSE_TOOLTIPS +#if wxUSE_TOOLTIPS && defined(TTN_NEEDTEXT) case WM_NOTIFY: { wxCHECK_MSG( win, 0, _T("should have a parent") ); diff --git a/src/msw/control.cpp b/src/msw/control.cpp index 689ed8f972..7a3c2e5828 100644 --- a/src/msw/control.cpp +++ b/src/msw/control.cpp @@ -31,7 +31,7 @@ #include "wx/msw/private.h" -#if defined(__WIN95__) && !(defined(__GNUWIN32_OLD__) || defined(__TWIN32__)) +#if defined(__WIN95__) && !((defined(__GNUWIN32_OLD__) || defined(__TWIN32__)) && !defined(__CYGWIN10__)) #include #endif diff --git a/src/msw/dragimag.cpp b/src/msw/dragimag.cpp index f8c1580476..6898665ca2 100644 --- a/src/msw/dragimag.cpp +++ b/src/msw/dragimag.cpp @@ -49,7 +49,7 @@ #include "wx/msw/dragimag.h" #include "wx/msw/private.h" -#if defined(__WIN95__) && !(defined(__GNUWIN32_OLD__) || defined(__TWIN32__)) +#if defined(__WIN95__) && !((defined(__GNUWIN32_OLD__) || defined(__TWIN32__)) && !defined(__CYGWIN10__)) #include #endif diff --git a/src/msw/fontenum.cpp b/src/msw/fontenum.cpp index 431c2eae92..7bf7c8df2b 100644 --- a/src/msw/fontenum.cpp +++ b/src/msw/fontenum.cpp @@ -133,7 +133,7 @@ bool wxFontEnumeratorHelper::SetEncoding(wxFontEncoding encoding) return TRUE; } -#if defined(__GNUWIN32__) +#if defined(__GNUWIN32__) && !defined(__CYGWIN10__) #if wxUSE_NORLANDER_HEADERS #define wxFONTENUMPROC int(*)(const LOGFONT *, const TEXTMETRIC *, long unsigned int, LPARAM) #else diff --git a/src/msw/gauge95.cpp b/src/msw/gauge95.cpp index e171056ef1..efcb6da297 100644 --- a/src/msw/gauge95.cpp +++ b/src/msw/gauge95.cpp @@ -37,7 +37,7 @@ #include "wx/msw/gauge95.h" #include "wx/msw/private.h" -#if defined(__WIN95__) && !(defined(__GNUWIN32_OLD__) || defined(__TWIN32__)) +#if defined(__WIN95__) && !((defined(__GNUWIN32_OLD__) || defined(__TWIN32__)) && !defined(__CYGWIN10__)) #include #endif diff --git a/src/msw/imaglist.cpp b/src/msw/imaglist.cpp index f8a26cd036..5140135aeb 100644 --- a/src/msw/imaglist.cpp +++ b/src/msw/imaglist.cpp @@ -46,7 +46,7 @@ #include "wx/msw/imaglist.h" #include "wx/msw/private.h" -#if !defined(__GNUWIN32_OLD__) && !defined(__TWIN32__) +#if defined(__WIN95__) && !((defined(__GNUWIN32_OLD__) || defined(__TWIN32__)) && !defined(__CYGWIN10__)) #include #endif diff --git a/src/msw/joystick.cpp b/src/msw/joystick.cpp index 28c0752f05..b8920854e6 100644 --- a/src/msw/joystick.cpp +++ b/src/msw/joystick.cpp @@ -24,7 +24,7 @@ #include "wx/window.h" #include "wx/msw/private.h" -#ifndef __GNUWIN32_OLD__ +#if !defined(__GNUWIN32_OLD__) || defined(__CYGWIN10__) #include #endif diff --git a/src/msw/listctrl.cpp b/src/msw/listctrl.cpp index 9aab81658d..10826ae39f 100644 --- a/src/msw/listctrl.cpp +++ b/src/msw/listctrl.cpp @@ -45,7 +45,7 @@ #include "wx/msw/private.h" -#ifdef __GNUWIN32_OLD__ +#if ((defined(__GNUWIN32_OLD__) || defined(__TWIN32__)) && !defined(__CYGWIN10__)) #include "wx/msw/gnuwin32/extra.h" #else #include diff --git a/src/msw/notebook.cpp b/src/msw/notebook.cpp index 952ad27333..ff201a3ec9 100644 --- a/src/msw/notebook.cpp +++ b/src/msw/notebook.cpp @@ -46,7 +46,7 @@ #endif #endif -#if defined(__WIN95__) && !(defined(__GNUWIN32_OLD__) || defined(__TWIN32__)) +#if defined(__WIN95__) && !((defined(__GNUWIN32_OLD__) || defined(__TWIN32__)) && !defined(__CYGWIN10__)) #include #endif diff --git a/src/msw/ole/automtn.cpp b/src/msw/ole/automtn.cpp index a5c49e721b..e08b49196d 100644 --- a/src/msw/ole/automtn.cpp +++ b/src/msw/ole/automtn.cpp @@ -24,7 +24,7 @@ // Watcom C++ gives a linker error if this is compiled in. // With Borland C++, all samples crash if this is compiled in. -#if !defined(__WATCOMC__) && !(defined(__BORLANDC__) && (__BORLANDC__ < 0x520)) +#if !defined(__WATCOMC__) && !(defined(__BORLANDC__) && (__BORLANDC__ < 0x520)) && !defined(__CYGWIN10__) #include "wx/log.h" #include "wx/msw/ole/automtn.h" diff --git a/src/msw/ole/oleutils.cpp b/src/msw/ole/oleutils.cpp index 55e74c6c45..7649d712e2 100644 --- a/src/msw/ole/oleutils.cpp +++ b/src/msw/ole/oleutils.cpp @@ -31,6 +31,8 @@ #include "wx/setup.h" #include "wx/log.h" +#ifndef __CYGWIN10__ + #include // OLE @@ -208,3 +210,7 @@ void wxLogRelease(const char *szInterface, ULONG cRef) #endif // wxUSE_DRAG_AND_DROP + +#endif + // __CYGWIN10__ + diff --git a/src/msw/radiobox.cpp b/src/msw/radiobox.cpp index a89956a5ca..0310b8c887 100644 --- a/src/msw/radiobox.cpp +++ b/src/msw/radiobox.cpp @@ -39,7 +39,7 @@ #include "wx/msw/private.h" #if wxUSE_TOOLTIPS - #ifndef __GNUWIN32_OLD__ + #if !defined(__GNUWIN32_OLD__) || defined(__CYGWIN10__) #include #endif #include "wx/tooltip.h" diff --git a/src/msw/registry.cpp b/src/msw/registry.cpp index b0c061c1d0..34e7c891a5 100644 --- a/src/msw/registry.cpp +++ b/src/msw/registry.cpp @@ -316,7 +316,7 @@ bool wxRegKey::GetKeyInfo(size_t *pnSubKeys, #if defined(__WIN32__) && !defined(__TWIN32__) // old gcc headers incorrectly prototype RegQueryInfoKey() -#ifdef __GNUWIN32_OLD__ +#if defined(__GNUWIN32_OLD__) && !defined(__CYGWIN10__) #define REG_PARAM (size_t *) #else #define REG_PARAM (LPDWORD) diff --git a/src/msw/slider95.cpp b/src/msw/slider95.cpp index 67d7bc1a57..443bfec956 100644 --- a/src/msw/slider95.cpp +++ b/src/msw/slider95.cpp @@ -31,7 +31,7 @@ #include "wx/msw/slider95.h" #include "wx/msw/private.h" -#if defined(__WIN95__) && !(defined(__GNUWIN32_OLD__) || defined(__TWIN32__)) +#if defined(__WIN95__) && !((defined(__GNUWIN32_OLD__) || defined(__TWIN32__)) && !defined(__CYGWIN10__)) #include #endif diff --git a/src/msw/spinbutt.cpp b/src/msw/spinbutt.cpp index 81734c8ee7..215abe2427 100644 --- a/src/msw/spinbutt.cpp +++ b/src/msw/spinbutt.cpp @@ -46,7 +46,7 @@ IMPLEMENT_DYNAMIC_CLASS(wxSpinEvent, wxNotifyEvent) #include "wx/msw/private.h" -#if defined(__WIN95__) && !(defined(__GNUWIN32_OLD__) || defined(__TWIN32__)) +#if defined(__WIN95__) && !((defined(__GNUWIN32_OLD__) || defined(__TWIN32__)) && !defined(__CYGWIN10__)) #include #endif diff --git a/src/msw/spinctrl.cpp b/src/msw/spinctrl.cpp index e4cef9f9ac..b06ff27e38 100644 --- a/src/msw/spinctrl.cpp +++ b/src/msw/spinctrl.cpp @@ -40,7 +40,7 @@ #include "wx/spinctrl.h" #include "wx/msw/private.h" -#if defined(__WIN95__) && !(defined(__GNUWIN32_OLD__) || defined(__TWIN32__)) +#if defined(__WIN95__) && !((defined(__GNUWIN32_OLD__) || defined(__TWIN32__)) && !defined(__CYGWIN10__)) #include #endif diff --git a/src/msw/statbr95.cpp b/src/msw/statbr95.cpp index c1c3c4706f..a9576f40b5 100644 --- a/src/msw/statbr95.cpp +++ b/src/msw/statbr95.cpp @@ -36,7 +36,7 @@ #include "wx/msw/private.h" #include -#if !(defined(__GNUWIN32_OLD__) || defined(__TWIN32__)) +#if defined(__WIN95__) && !((defined(__GNUWIN32_OLD__) || defined(__TWIN32__)) && !defined(__CYGWIN10__)) #include #endif diff --git a/src/msw/tabctrl.cpp b/src/msw/tabctrl.cpp index 5b970afa46..1e4e378ac0 100644 --- a/src/msw/tabctrl.cpp +++ b/src/msw/tabctrl.cpp @@ -32,7 +32,7 @@ #include -#if !(defined(__GNUWIN32_OLD__) || defined(__TWIN32__)) +#if defined(__WIN95__) && !((defined(__GNUWIN32_OLD__) || defined(__TWIN32__)) && !defined(__CYGWIN10__)) #include #else #include "wx/msw/gnuwin32/extra.h" diff --git a/src/msw/tbar95.cpp b/src/msw/tbar95.cpp index 2f534d533d..4ffad79693 100644 --- a/src/msw/tbar95.cpp +++ b/src/msw/tbar95.cpp @@ -50,10 +50,10 @@ #ifndef __TWIN32__ -#ifdef __GNUWIN32_OLD__ - #include "wx/msw/gnuwin32/extra.h" -#else +#if defined(__WIN95__) && !((defined(__GNUWIN32_OLD__) || defined(__TWIN32__)) && !defined(__CYGWIN10__)) #include +#else + #include "wx/msw/gnuwin32/extra.h" #endif #endif // __TWIN32__ diff --git a/src/msw/textctrl.cpp b/src/msw/textctrl.cpp index 62850ac1d1..9d68d44fc6 100644 --- a/src/msw/textctrl.cpp +++ b/src/msw/textctrl.cpp @@ -60,7 +60,7 @@ # include #endif -#if wxUSE_RICHEDIT && !defined(__GNUWIN32_OLD__) +#if wxUSE_RICHEDIT && (!defined(__GNUWIN32_OLD__) || defined(__CYGWIN10__)) #include #endif diff --git a/src/msw/tooltip.cpp b/src/msw/tooltip.cpp index 0dcc94f036..e8b34e7da0 100644 --- a/src/msw/tooltip.cpp +++ b/src/msw/tooltip.cpp @@ -32,7 +32,7 @@ #include "wx/tooltip.h" #include "wx/msw/private.h" -#if defined(__WIN95__) && (!defined(__GNUWIN32_OLD__) || defined(__MINGW32__)) +#if defined(__WIN95__) && !((defined(__GNUWIN32_OLD__) || defined(__TWIN32__)) && !defined(__CYGWIN10__)) #include #endif diff --git a/src/msw/treectrl.cpp b/src/msw/treectrl.cpp index f42d35f685..ddae7272b4 100644 --- a/src/msw/treectrl.cpp +++ b/src/msw/treectrl.cpp @@ -54,7 +54,7 @@ #include "wx/msw/gnuwin32/extra.h" #endif -#if defined(__WIN95__) && !(defined(__GNUWIN32_OLD__) || defined(__TWIN32__)) +#if defined(__WIN95__) && !((defined(__GNUWIN32_OLD__) || defined(__TWIN32__)) && !defined(__CYGWIN10__)) #include #endif diff --git a/src/msw/wave.cpp b/src/msw/wave.cpp index 675d15c9ae..4016b5dce9 100644 --- a/src/msw/wave.cpp +++ b/src/msw/wave.cpp @@ -31,7 +31,7 @@ #include #include -#ifdef __GNUWIN32_OLD__ +#if defined(__GNUWIN32_OLD__) && !defined(__CYGWIN10__) #include "wx/msw/gnuwin32/extra.h" #else #include diff --git a/src/msw/window.cpp b/src/msw/window.cpp index faf7da6136..4986e29e79 100644 --- a/src/msw/window.cpp +++ b/src/msw/window.cpp @@ -84,7 +84,7 @@ #include -#ifndef __GNUWIN32_OLD__ +#if !defined(__GNUWIN32_OLD__) || defined(__CYGWIN10__) #include #include #endif @@ -93,7 +93,7 @@ #include #endif -#if !defined(__GNUWIN32_OLD__) && !defined(__TWIN32__) +#if (!defined(__GNUWIN32_OLD__) && !defined(__TWIN32__)) || defined(__CYGWIN10__) #ifdef __WIN95__ #include #endif -- 2.45.2