Mostly Mingw32/Cygwin corrections

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@5039 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Julian Smart
1999-12-20 19:04:48 +00:00
parent 83307f338d
commit c25a510b30
19 changed files with 65 additions and 23 deletions

View File

@@ -39,6 +39,9 @@
#if defined(SIZEOF_LONG) && (SIZEOF_LONG == 8) #if defined(SIZEOF_LONG) && (SIZEOF_LONG == 8)
#define wxLongLong_t long #define wxLongLong_t long
#define wxLongLongIsLong #define wxLongLongIsLong
#elif defined(__WIN16__)
#define wxLongLong_t long
#define wxLongLongIsLong
#elif defined(__VISUALC__) || defined( __VMS__ ) #elif defined(__VISUALC__) || defined( __VMS__ )
#define wxLongLong_t __int64 #define wxLongLong_t __int64
#elif defined(__GNUG__) #elif defined(__GNUG__)

View File

@@ -22,6 +22,7 @@
#endif #endif
#include <wx/image.h> #include <wx/image.h>
#include <wx/imagpng.h>
#include <wx/wxhtml.h> #include <wx/wxhtml.h>
// ---------------------------------------------------------------------------- // ----------------------------------------------------------------------------

View File

@@ -17,10 +17,10 @@
#endif #endif
#ifndef WX_PRECOMP #ifndef WX_PRECOMP
#include "wx.h" #include <wx/wx.h>
#endif #endif
#include "wx/msw/taskbar.h" #include <wx/msw/taskbar.h>
#include "tbtest.h" #include "tbtest.h"
// Declare two frames // Declare two frames

View File

@@ -79,6 +79,11 @@
#define WX_TIMEZONE timezone #define WX_TIMEZONE timezone
#endif #endif
// Is this right? Just a guess. (JACS)
#ifdef __MINGW32__
#define timezone _timezone
#endif
// ---------------------------------------------------------------------------- // ----------------------------------------------------------------------------
// constants // constants
// ---------------------------------------------------------------------------- // ----------------------------------------------------------------------------
@@ -114,7 +119,7 @@ static const int DAYS_PER_400_YEARS = 146097;
// a critical section is needed to protect GetTimeZone() static // a critical section is needed to protect GetTimeZone() static
// variable in MT case // variable in MT case
#ifdef wxUSE_THREADS #if wxUSE_THREADS
wxCriticalSection gs_critsectTimezone; wxCriticalSection gs_critsectTimezone;
#endif // wxUSE_THREADS #endif // wxUSE_THREADS

View File

@@ -107,7 +107,7 @@ extern const wxChar WXDLLEXPORT *wxEmptyString = &g_strEmpty.dummy;
// function wxVsnprintfA (A for ANSI), should also find one for Unicode // function wxVsnprintfA (A for ANSI), should also find one for Unicode
// strings in Unicode build // strings in Unicode build
#ifdef __WXMSW__ #ifdef __WXMSW__
#if defined(__VISUALC__) || defined(wxUSE_NORLANDER_HEADERS) #if (defined(__VISUALC__) || defined(wxUSE_NORLANDER_HEADERS)) && !defined(__MINGW32__)
#define wxVsnprintfA _vsnprintf #define wxVsnprintfA _vsnprintf
#endif #endif
#else // !Windows #else // !Windows

View File

@@ -7,7 +7,7 @@
# If using Cygwin, set this to 0. # If using Cygwin, set this to 0.
# If using Mingw32, set this to 1. # If using Mingw32, set this to 1.
MINGW32=0 MINGW32=1
# Set to the version you have # Set to the version you have
MINGW32VERSION=2.95 MINGW32VERSION=2.95

View File

@@ -10,7 +10,7 @@
# Use FINAL=1 argument to nmake to build final version with no debugging # Use FINAL=1 argument to nmake to build final version with no debugging
# info # info
# Set WXDIR for your system (hint, set an environment variable named WXWIN) # Set WXDIR for your system
WXDIR = $(WXWIN) WXDIR = $(WXWIN)
WXUSINGDLL=0 WXUSINGDLL=0

View File

@@ -38,12 +38,16 @@
#include "wx/event.h" #include "wx/event.h"
#endif #endif
#ifndef wxUSE_DYNLIB_CLASS
#error You need wxUSE_DYNLIB_CLASS to be 1 to compile dialup.cpp.
#endif
#include "wx/dynlib.h" #include "wx/dynlib.h"
#include "wx/dialup.h" #include "wx/dialup.h"
// Doesn't yet compile under BC++ nor with mingw: no wininet.h // Doesn't yet compile under BC++ nor with mingw: no wininet.h
#if !defined(__BORLANDC__) && !defined(__GNUWIN32_OLD__) #if !defined(__BORLANDC__) && !defined(__GNUWIN32_OLD__) && !defined(__GNUWIN32__)
#include <ras.h> #include <ras.h>
#include <raserror.h> #include <raserror.h>

View File

@@ -110,7 +110,9 @@ bool wxFontEnumeratorHelper::SetEncoding(wxFontEncoding encoding)
return TRUE; return TRUE;
} }
#ifdef __GNUWIN32_OLD__ // I've no idea what __GNUWIN32_OLD__ is. Anyway, I had to add the 2nd condition
// for Cygwin b20 (JACS)
#if (defined(__GNUWIN32_OLD__) || defined(__GNUWIN32__)) && !defined(__MINGW32__)
#define wxFONTENUMPROC int(*)(ENUMLOGFONTEX *, NEWTEXTMETRICEX*, int, LPARAM) #define wxFONTENUMPROC int(*)(ENUMLOGFONTEX *, NEWTEXTMETRICEX*, int, LPARAM)
#else #else
#define wxFONTENUMPROC FONTENUMPROC #define wxFONTENUMPROC FONTENUMPROC

View File

@@ -37,6 +37,7 @@
#include "wx/app.h" #include "wx/app.h"
#include "wx/msw/dib.h" #include "wx/msw/dib.h"
#include "wx/msw/bitmap.h"
#include "wx/msw/gdiimage.h" #include "wx/msw/gdiimage.h"
#ifdef __WIN16__ #ifdef __WIN16__

View File

@@ -38,7 +38,10 @@
#include "wx/msw/private.h" #include "wx/msw/private.h"
#if wxUSE_TOOLTIPS #if wxUSE_TOOLTIPS
#ifndef __GNUWIN32__
#include <commctrl.h> #include <commctrl.h>
#endif
#include "wx/tooltip.h" #include "wx/tooltip.h"
#endif // wxUSE_TOOLTIPS #endif // wxUSE_TOOLTIPS
@@ -52,7 +55,15 @@
// and allows tooltips to work with radioboxes, so there should be no // and allows tooltips to work with radioboxes, so there should be no
// reason to revert to the backward compatible behaviour - but I still // reason to revert to the backward compatible behaviour - but I still
// leave this possibility just in case. // leave this possibility just in case.
// For some reason, the background colour is set wrongly in WIN16 mode
// if we use the new method.
#ifdef __WIN16__
#define RADIOBTN_PARENT_IS_RADIOBOX 0
#else
#define RADIOBTN_PARENT_IS_RADIOBOX 1 #define RADIOBTN_PARENT_IS_RADIOBOX 1
#endif
// --------------------------------------------------------------------------- // ---------------------------------------------------------------------------
// private functions // private functions
@@ -746,7 +757,7 @@ LRESULT APIENTRY _EXPORT wxRadioBtnWndProc(HWND hwnd,
wxCHECK_MSG( radiobox, 0, wxT("radio button without radio box?") ); wxCHECK_MSG( radiobox, 0, wxT("radio button without radio box?") );
#if wxUSE_TOOLTIPS #if wxUSE_TOOLTIPS && !defined(__GNUWIN32__)
if ( msg == WM_NOTIFY ) if ( msg == WM_NOTIFY )
{ {
NMHDR* hdr = (NMHDR *)lParam; NMHDR* hdr = (NMHDR *)lParam;

View File

@@ -32,6 +32,9 @@
#if defined(__WIN95__) && !defined(__TWIN32__) #if defined(__WIN95__) && !defined(__TWIN32__)
#include <windows.h> #include <windows.h>
#include "wx/msw/winundef.h"
#include <string.h> #include <string.h>
#include "wx/msw/taskbar.h" #include "wx/msw/taskbar.h"
#include "wx/msw/private.h" #include "wx/msw/private.h"

View File

@@ -49,7 +49,10 @@
#ifndef __TWIN32__ #ifndef __TWIN32__
#ifdef __GNUWIN32_OLD__ // I don't know what _OLD_ refers to so I'm reinstating the old
// ifdef (JACS).
// #ifdef __GNUWIN32_OLD__
#if defined(__GNUWIN32__) && !defined(__MINGW32__)
#include "wx/msw/gnuwin32/extra.h" #include "wx/msw/gnuwin32/extra.h"
#else #else
#include <commctrl.h> #include <commctrl.h>
@@ -199,7 +202,10 @@ bool wxToolBar::Create(wxWindow *parent,
DWORD msflags = 0; // WS_VISIBLE | WS_CHILD always included DWORD msflags = 0; // WS_VISIBLE | WS_CHILD always included
if (style & wxBORDER) if (style & wxBORDER)
msflags |= WS_BORDER; msflags |= WS_BORDER;
#ifdef TBSTYLE_TOOLTIPS
msflags |= TBSTYLE_TOOLTIPS; msflags |= TBSTYLE_TOOLTIPS;
#endif
if (style & wxTB_FLAT) if (style & wxTB_FLAT)
{ {

View File

@@ -32,7 +32,7 @@
#include "wx/wx.h" #include "wx/wx.h"
#endif #endif
#if wxUSE_BUTTONBAR && wxUSE_TOOLBAR && !wxUSE_TOOLBAR_SIMPLE #if wxUSE_TOOLBAR && defined(__WIN16__)
#if !defined(__WIN32__) && !wxUSE_IMAGE_LOADING_IN_MSW #if !defined(__WIN32__) && !wxUSE_IMAGE_LOADING_IN_MSW
#error wxToolBar needs wxUSE_IMAGE_LOADING_IN_MSW under Win16 #error wxToolBar needs wxUSE_IMAGE_LOADING_IN_MSW under Win16
@@ -48,7 +48,7 @@
#include <stdlib.h> #include <stdlib.h>
#include "wx/tbarmsw.h" #include "wx/msw/tbarmsw.h"
#include "wx/event.h" #include "wx/event.h"
#include "wx/app.h" #include "wx/app.h"
#include "wx/bitmap.h" #include "wx/bitmap.h"
@@ -491,7 +491,7 @@ bool wxToolBar::DoInsertTool(size_t pos, wxToolBarToolBase *toolBase)
// TODO: use the mapping code from wxToolBar95 to get it right in this class // TODO: use the mapping code from wxToolBar95 to get it right in this class
#if !defined(__WIN32__) && !defined(__WIN386__) #if !defined(__WIN32__) && !defined(__WIN386__)
wxBitmap bitmap2; wxBitmap bitmap2;
if (toggle) if (tool->CanBeToggled())
{ {
HBITMAP hbmp = CreateMappedBitmap((WXHINSTANCE)wxGetInstance(), HBITMAP hbmp = CreateMappedBitmap((WXHINSTANCE)wxGetInstance(),
GetHbitmapOf(tool->GetBitmap1())); GetHbitmapOf(tool->GetBitmap1()));

View File

@@ -58,7 +58,9 @@
# include <fstream> # include <fstream>
#endif #endif
#if wxUSE_RICHEDIT // Why oh why did someone remove the tail of this line? Bizarre.
// It's needed for GNUWIN32 b20, at least.
#if wxUSE_RICHEDIT && (!defined(__GNUWIN32__) || defined(wxUSE_NORLANDER_HEADERS))
#include <richedit.h> #include <richedit.h>
#endif #endif

View File

@@ -521,6 +521,10 @@ bool wxThread::IsMain()
return ::GetCurrentThreadId() == gs_idMainThread; return ::GetCurrentThreadId() == gs_idMainThread;
} }
#ifdef Yield
#undef Yield
#endif
void wxThread::Yield() void wxThread::Yield()
{ {
// 0 argument to Sleep() is special and means to just give away the rest of // 0 argument to Sleep() is special and means to just give away the rest of

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__) #if defined(__WIN95__) && (!defined(__GNUWIN32__) || defined(__MINGW32__))
#include <commctrl.h> #include <commctrl.h>
#endif #endif

View File

@@ -399,10 +399,6 @@ SOURCE=.\common\tbarbase.cpp
# End Source File # End Source File
# Begin Source File # Begin Source File
SOURCE=.\common\tbarsmpl.cpp
# End Source File
# Begin Source File
SOURCE=.\common\textcmn.cpp SOURCE=.\common\textcmn.cpp
# End Source File # End Source File
# Begin Source File # Begin Source File
@@ -571,6 +567,10 @@ SOURCE=.\generic\tabg.cpp
# End Source File # End Source File
# Begin Source File # Begin Source File
SOURCE=.\generic\tbarsmpl.cpp
# End Source File
# Begin Source File
SOURCE=.\generic\textdlgg.cpp SOURCE=.\generic\textdlgg.cpp
# End Source File # End Source File
# Begin Source File # Begin Source File

View File

@@ -402,10 +402,6 @@ SOURCE=.\common\tbarbase.cpp
# End Source File # End Source File
# Begin Source File # Begin Source File
SOURCE=.\common\tbarsmpl.cpp
# End Source File
# Begin Source File
SOURCE=.\common\textcmn.cpp SOURCE=.\common\textcmn.cpp
# End Source File # End Source File
# Begin Source File # Begin Source File
@@ -565,6 +561,10 @@ SOURCE=.\generic\tabg.cpp
# End Source File # End Source File
# Begin Source File # Begin Source File
SOURCE=.\generic\tbarsmpl.cpp
# End Source File
# Begin Source File
SOURCE=.\generic\textdlgg.cpp SOURCE=.\generic\textdlgg.cpp
# End Source File # End Source File
# Begin Source File # Begin Source File