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)
#define wxLongLong_t long
#define wxLongLongIsLong
#elif defined(__WIN16__)
#define wxLongLong_t long
#define wxLongLongIsLong
#elif defined(__VISUALC__) || defined( __VMS__ )
#define wxLongLong_t __int64
#elif defined(__GNUG__)

View File

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

View File

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

View File

@ -79,6 +79,11 @@
#define WX_TIMEZONE timezone
#endif
// Is this right? Just a guess. (JACS)
#ifdef __MINGW32__
#define timezone _timezone
#endif
// ----------------------------------------------------------------------------
// constants
// ----------------------------------------------------------------------------
@ -114,7 +119,7 @@ static const int DAYS_PER_400_YEARS = 146097;
// a critical section is needed to protect GetTimeZone() static
// variable in MT case
#ifdef wxUSE_THREADS
#if wxUSE_THREADS
wxCriticalSection gs_critsectTimezone;
#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
// strings in Unicode build
#ifdef __WXMSW__
#if defined(__VISUALC__) || defined(wxUSE_NORLANDER_HEADERS)
#if (defined(__VISUALC__) || defined(wxUSE_NORLANDER_HEADERS)) && !defined(__MINGW32__)
#define wxVsnprintfA _vsnprintf
#endif
#else // !Windows

View File

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

View File

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

View File

@ -38,12 +38,16 @@
#include "wx/event.h"
#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/dialup.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 <raserror.h>

View File

@ -110,7 +110,9 @@ bool wxFontEnumeratorHelper::SetEncoding(wxFontEncoding encoding)
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)
#else
#define wxFONTENUMPROC FONTENUMPROC

View File

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

View File

@ -38,7 +38,10 @@
#include "wx/msw/private.h"
#if wxUSE_TOOLTIPS
#ifndef __GNUWIN32__
#include <commctrl.h>
#endif
#include "wx/tooltip.h"
#endif // wxUSE_TOOLTIPS
@ -52,7 +55,15 @@
// and allows tooltips to work with radioboxes, so there should be no
// reason to revert to the backward compatible behaviour - but I still
// 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
#endif
// ---------------------------------------------------------------------------
// private functions
@ -746,7 +757,7 @@ LRESULT APIENTRY _EXPORT wxRadioBtnWndProc(HWND hwnd,
wxCHECK_MSG( radiobox, 0, wxT("radio button without radio box?") );
#if wxUSE_TOOLTIPS
#if wxUSE_TOOLTIPS && !defined(__GNUWIN32__)
if ( msg == WM_NOTIFY )
{
NMHDR* hdr = (NMHDR *)lParam;

View File

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

View File

@ -49,7 +49,10 @@
#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"
#else
#include <commctrl.h>
@ -199,7 +202,10 @@ bool wxToolBar::Create(wxWindow *parent,
DWORD msflags = 0; // WS_VISIBLE | WS_CHILD always included
if (style & wxBORDER)
msflags |= WS_BORDER;
#ifdef TBSTYLE_TOOLTIPS
msflags |= TBSTYLE_TOOLTIPS;
#endif
if (style & wxTB_FLAT)
{

View File

@ -32,7 +32,7 @@
#include "wx/wx.h"
#endif
#if wxUSE_BUTTONBAR && wxUSE_TOOLBAR && !wxUSE_TOOLBAR_SIMPLE
#if wxUSE_TOOLBAR && defined(__WIN16__)
#if !defined(__WIN32__) && !wxUSE_IMAGE_LOADING_IN_MSW
#error wxToolBar needs wxUSE_IMAGE_LOADING_IN_MSW under Win16
@ -48,7 +48,7 @@
#include <stdlib.h>
#include "wx/tbarmsw.h"
#include "wx/msw/tbarmsw.h"
#include "wx/event.h"
#include "wx/app.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
#if !defined(__WIN32__) && !defined(__WIN386__)
wxBitmap bitmap2;
if (toggle)
if (tool->CanBeToggled())
{
HBITMAP hbmp = CreateMappedBitmap((WXHINSTANCE)wxGetInstance(),
GetHbitmapOf(tool->GetBitmap1()));

View File

@ -58,7 +58,9 @@
# include <fstream>
#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>
#endif

View File

@ -521,6 +521,10 @@ bool wxThread::IsMain()
return ::GetCurrentThreadId() == gs_idMainThread;
}
#ifdef Yield
#undef Yield
#endif
void wxThread::Yield()
{
// 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/msw/private.h"
#if defined(__WIN95__) && !defined(__GNUWIN32_OLD__)
#if defined(__WIN95__) && (!defined(__GNUWIN32__) || defined(__MINGW32__))
#include <commctrl.h>
#endif

View File

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

View File

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