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
This commit is contained in:
Julian Smart
2001-06-08 15:04:00 +00:00
parent ee544c1741
commit ae090fdb7f
29 changed files with 44 additions and 33 deletions

View File

@@ -15,7 +15,7 @@
// Cygwin / Mingw32 with gcc >= 2.95 use new windows headers which // Cygwin / Mingw32 with gcc >= 2.95 use new windows headers which
// are more ms-like (header author is Anders Norlander, hence the name) // 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 #ifndef wxUSE_NORLANDER_HEADERS
#define wxUSE_NORLANDER_HEADERS 1 #define wxUSE_NORLANDER_HEADERS 1
#endif #endif
@@ -32,5 +32,10 @@
#define __GNUWIN32_OLD__ #define __GNUWIN32_OLD__
#endif #endif
// Cygwin 1.0
#if defined(__CYGWIN__) && ((__GNUC__==2) && (__GNUC_MINOR__==9))
#define __CYGWIN10__
#endif
#endif #endif
// _WX_MSW_GCCPRIV_H_ // _WX_MSW_GCCPRIV_H_

View File

@@ -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 // this defines a CASTWNDPROC macro which casts a pointer to the type of a
// window proc // window proc
#ifdef __GNUWIN32_OLD__ #if defined(__GNUWIN32_OLD__) && !defined(__CYGWIN10__)
#define CASTWNDPROC (long unsigned) #define CASTWNDPROC (long unsigned)
#else #else
#if defined(STRICT) || defined(__GNUC__) #if defined(STRICT) || defined(__GNUC__)

View File

@@ -151,11 +151,11 @@ COMPPATHS=
########################## Directories ############################### ########################## Directories ###############################
OLELIBS=-lole32 -loleaut32 -luuid
WINLIBS=-lstdc++ -lgcc \ WINLIBS=-lstdc++ -lgcc \
-lwinspool -lwinmm -lshell32 \ -lwinspool -lwinmm -lshell32 \
-lcomctl32 -lctl3d32 -lodbc32 -ladvapi32 \ -lcomctl32 -lctl3d32 -lodbc32 -ladvapi32 \
-lole32 -loleaut32 -luuid \ -lodbc32 -lwsock32 -lopengl32 -lglu32 $(OLELIBS) # -loldnames
-lodbc32 -lwsock32 -lopengl32 -lglu32 # -loldnames
#WINLIBS=-lstdc++ -lgcc \ #WINLIBS=-lstdc++ -lgcc \
# -lwinspool -lwinmm -lshell32 \ # -lwinspool -lwinmm -lshell32 \

View File

@@ -86,7 +86,7 @@
#include <string.h> #include <string.h>
#include <ctype.h> #include <ctype.h>
#if defined(__WIN95__) && !(defined(__GNUWIN32_OLD__) || defined(__TWIN32__)) #if defined(__WIN95__) && !((defined(__GNUWIN32_OLD__) || defined(__TWIN32__)) && !defined(__CYGWIN10__))
#include <commctrl.h> #include <commctrl.h>
#endif #endif

View File

@@ -45,7 +45,7 @@
#include <windows.h> #include <windows.h>
#include <windowsx.h> #include <windowsx.h>
#ifdef __GNUWIN32_OLD__ #if defined(__GNUWIN32_OLD__)
#include "wx/msw/gnuwin32/extra.h" #include "wx/msw/gnuwin32/extra.h"
#endif #endif

View File

@@ -41,7 +41,7 @@
#include "wx/msw/private.h" #include "wx/msw/private.h"
#if wxUSE_TOOLTIPS #if wxUSE_TOOLTIPS
#ifndef __GNUWIN32_OLD__ #if !defined(__GNUWIN32_OLD__) || defined(__CYGWIN10__)
#include <commctrl.h> #include <commctrl.h>
#endif #endif
#include "wx/tooltip.h" #include "wx/tooltip.h"
@@ -115,7 +115,7 @@ LRESULT APIENTRY _EXPORT wxComboEditWndProc(HWND hWnd,
#endif // 0 #endif // 0
// deal with tooltips here // deal with tooltips here
#if wxUSE_TOOLTIPS #if wxUSE_TOOLTIPS && defined(TTN_NEEDTEXT)
case WM_NOTIFY: case WM_NOTIFY:
{ {
wxCHECK_MSG( win, 0, _T("should have a parent") ); wxCHECK_MSG( win, 0, _T("should have a parent") );

View File

@@ -31,7 +31,7 @@
#include "wx/msw/private.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 <commctrl.h> #include <commctrl.h>
#endif #endif

View File

@@ -49,7 +49,7 @@
#include "wx/msw/dragimag.h" #include "wx/msw/dragimag.h"
#include "wx/msw/private.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 <commctrl.h> #include <commctrl.h>
#endif #endif

View File

@@ -133,7 +133,7 @@ bool wxFontEnumeratorHelper::SetEncoding(wxFontEncoding encoding)
return TRUE; return TRUE;
} }
#if defined(__GNUWIN32__) #if defined(__GNUWIN32__) && !defined(__CYGWIN10__)
#if wxUSE_NORLANDER_HEADERS #if wxUSE_NORLANDER_HEADERS
#define wxFONTENUMPROC int(*)(const LOGFONT *, const TEXTMETRIC *, long unsigned int, LPARAM) #define wxFONTENUMPROC int(*)(const LOGFONT *, const TEXTMETRIC *, long unsigned int, LPARAM)
#else #else

View File

@@ -37,7 +37,7 @@
#include "wx/msw/gauge95.h" #include "wx/msw/gauge95.h"
#include "wx/msw/private.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 <commctrl.h> #include <commctrl.h>
#endif #endif

View File

@@ -46,7 +46,7 @@
#include "wx/msw/imaglist.h" #include "wx/msw/imaglist.h"
#include "wx/msw/private.h" #include "wx/msw/private.h"
#if !defined(__GNUWIN32_OLD__) && !defined(__TWIN32__) #if defined(__WIN95__) && !((defined(__GNUWIN32_OLD__) || defined(__TWIN32__)) && !defined(__CYGWIN10__))
#include <commctrl.h> #include <commctrl.h>
#endif #endif

View File

@@ -24,7 +24,7 @@
#include "wx/window.h" #include "wx/window.h"
#include "wx/msw/private.h" #include "wx/msw/private.h"
#ifndef __GNUWIN32_OLD__ #if !defined(__GNUWIN32_OLD__) || defined(__CYGWIN10__)
#include <mmsystem.h> #include <mmsystem.h>
#endif #endif

View File

@@ -45,7 +45,7 @@
#include "wx/msw/private.h" #include "wx/msw/private.h"
#ifdef __GNUWIN32_OLD__ #if ((defined(__GNUWIN32_OLD__) || defined(__TWIN32__)) && !defined(__CYGWIN10__))
#include "wx/msw/gnuwin32/extra.h" #include "wx/msw/gnuwin32/extra.h"
#else #else
#include <commctrl.h> #include <commctrl.h>

View File

@@ -46,7 +46,7 @@
#endif #endif
#endif #endif
#if defined(__WIN95__) && !(defined(__GNUWIN32_OLD__) || defined(__TWIN32__)) #if defined(__WIN95__) && !((defined(__GNUWIN32_OLD__) || defined(__TWIN32__)) && !defined(__CYGWIN10__))
#include <commctrl.h> #include <commctrl.h>
#endif #endif

View File

@@ -24,7 +24,7 @@
// Watcom C++ gives a linker error if this is compiled in. // Watcom C++ gives a linker error if this is compiled in.
// With Borland C++, all samples crash 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/log.h"
#include "wx/msw/ole/automtn.h" #include "wx/msw/ole/automtn.h"

View File

@@ -31,6 +31,8 @@
#include "wx/setup.h" #include "wx/setup.h"
#include "wx/log.h" #include "wx/log.h"
#ifndef __CYGWIN10__
#include <windows.h> #include <windows.h>
// OLE // OLE
@@ -208,3 +210,7 @@ void wxLogRelease(const char *szInterface, ULONG cRef)
#endif #endif
// wxUSE_DRAG_AND_DROP // wxUSE_DRAG_AND_DROP
#endif
// __CYGWIN10__

View File

@@ -39,7 +39,7 @@
#include "wx/msw/private.h" #include "wx/msw/private.h"
#if wxUSE_TOOLTIPS #if wxUSE_TOOLTIPS
#ifndef __GNUWIN32_OLD__ #if !defined(__GNUWIN32_OLD__) || defined(__CYGWIN10__)
#include <commctrl.h> #include <commctrl.h>
#endif #endif
#include "wx/tooltip.h" #include "wx/tooltip.h"

View File

@@ -316,7 +316,7 @@ bool wxRegKey::GetKeyInfo(size_t *pnSubKeys,
#if defined(__WIN32__) && !defined(__TWIN32__) #if defined(__WIN32__) && !defined(__TWIN32__)
// old gcc headers incorrectly prototype RegQueryInfoKey() // old gcc headers incorrectly prototype RegQueryInfoKey()
#ifdef __GNUWIN32_OLD__ #if defined(__GNUWIN32_OLD__) && !defined(__CYGWIN10__)
#define REG_PARAM (size_t *) #define REG_PARAM (size_t *)
#else #else
#define REG_PARAM (LPDWORD) #define REG_PARAM (LPDWORD)

View File

@@ -31,7 +31,7 @@
#include "wx/msw/slider95.h" #include "wx/msw/slider95.h"
#include "wx/msw/private.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 <commctrl.h> #include <commctrl.h>
#endif #endif

View File

@@ -46,7 +46,7 @@ IMPLEMENT_DYNAMIC_CLASS(wxSpinEvent, wxNotifyEvent)
#include "wx/msw/private.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 <commctrl.h> #include <commctrl.h>
#endif #endif

View File

@@ -40,7 +40,7 @@
#include "wx/spinctrl.h" #include "wx/spinctrl.h"
#include "wx/msw/private.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 <commctrl.h> #include <commctrl.h>
#endif #endif

View File

@@ -36,7 +36,7 @@
#include "wx/msw/private.h" #include "wx/msw/private.h"
#include <windowsx.h> #include <windowsx.h>
#if !(defined(__GNUWIN32_OLD__) || defined(__TWIN32__)) #if defined(__WIN95__) && !((defined(__GNUWIN32_OLD__) || defined(__TWIN32__)) && !defined(__CYGWIN10__))
#include <commctrl.h> #include <commctrl.h>
#endif #endif

View File

@@ -32,7 +32,7 @@
#include <windows.h> #include <windows.h>
#if !(defined(__GNUWIN32_OLD__) || defined(__TWIN32__)) #if defined(__WIN95__) && !((defined(__GNUWIN32_OLD__) || defined(__TWIN32__)) && !defined(__CYGWIN10__))
#include <commctrl.h> #include <commctrl.h>
#else #else
#include "wx/msw/gnuwin32/extra.h" #include "wx/msw/gnuwin32/extra.h"

View File

@@ -50,10 +50,10 @@
#ifndef __TWIN32__ #ifndef __TWIN32__
#ifdef __GNUWIN32_OLD__ #if defined(__WIN95__) && !((defined(__GNUWIN32_OLD__) || defined(__TWIN32__)) && !defined(__CYGWIN10__))
#include "wx/msw/gnuwin32/extra.h"
#else
#include <commctrl.h> #include <commctrl.h>
#else
#include "wx/msw/gnuwin32/extra.h"
#endif #endif
#endif // __TWIN32__ #endif // __TWIN32__

View File

@@ -60,7 +60,7 @@
# include <fstream> # include <fstream>
#endif #endif
#if wxUSE_RICHEDIT && !defined(__GNUWIN32_OLD__) #if wxUSE_RICHEDIT && (!defined(__GNUWIN32_OLD__) || defined(__CYGWIN10__))
#include <richedit.h> #include <richedit.h>
#endif #endif

View File

@@ -32,7 +32,7 @@
#include "wx/tooltip.h" #include "wx/tooltip.h"
#include "wx/msw/private.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 <commctrl.h> #include <commctrl.h>
#endif #endif

View File

@@ -54,7 +54,7 @@
#include "wx/msw/gnuwin32/extra.h" #include "wx/msw/gnuwin32/extra.h"
#endif #endif
#if defined(__WIN95__) && !(defined(__GNUWIN32_OLD__) || defined(__TWIN32__)) #if defined(__WIN95__) && !((defined(__GNUWIN32_OLD__) || defined(__TWIN32__)) && !defined(__CYGWIN10__))
#include <commctrl.h> #include <commctrl.h>
#endif #endif

View File

@@ -31,7 +31,7 @@
#include <windows.h> #include <windows.h>
#include <windowsx.h> #include <windowsx.h>
#ifdef __GNUWIN32_OLD__ #if defined(__GNUWIN32_OLD__) && !defined(__CYGWIN10__)
#include "wx/msw/gnuwin32/extra.h" #include "wx/msw/gnuwin32/extra.h"
#else #else
#include <mmsystem.h> #include <mmsystem.h>

View File

@@ -84,7 +84,7 @@
#include <string.h> #include <string.h>
#ifndef __GNUWIN32_OLD__ #if !defined(__GNUWIN32_OLD__) || defined(__CYGWIN10__)
#include <shellapi.h> #include <shellapi.h>
#include <mmsystem.h> #include <mmsystem.h>
#endif #endif
@@ -93,7 +93,7 @@
#include <windowsx.h> #include <windowsx.h>
#endif #endif
#if !defined(__GNUWIN32_OLD__) && !defined(__TWIN32__) #if (!defined(__GNUWIN32_OLD__) && !defined(__TWIN32__)) || defined(__CYGWIN10__)
#ifdef __WIN95__ #ifdef __WIN95__
#include <commctrl.h> #include <commctrl.h>
#endif #endif