Remove checks for ancient gcc/MinGW versions.

Don't test for wxUSE_NORLANDER_HEADERS, this is always true since many, many
years.

Remove tests for gcc version < 3.3, notably 2.95: the minimal supported gcc
version is 3.4.

Closes #15727.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@76549 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Vadim Zeitlin
2014-05-16 13:01:35 +00:00
parent 8c7d31e615
commit e9f4d80887
22 changed files with 20 additions and 141 deletions

View File

@@ -330,7 +330,6 @@ library:
@itemdef{wxUSE_MS_HTML_HELP, Use wxCHMHelpController class.} @itemdef{wxUSE_MS_HTML_HELP, Use wxCHMHelpController class.}
@itemdef{wxUSE_NO_MANIFEST, Can be predefined to disable inclusion of the @itemdef{wxUSE_NO_MANIFEST, Can be predefined to disable inclusion of the
manifest from wxWidgets RC file. See also wxUSE_RC_MANIFEST.} manifest from wxWidgets RC file. See also wxUSE_RC_MANIFEST.}
@itemdef{wxUSE_NORLANDER_HEADERS, Using headers whose author is Anders Norlander.}
@itemdef{wxUSE_OLE, Enables OLE helper routines.} @itemdef{wxUSE_OLE, Enables OLE helper routines.}
@itemdef{wxUSE_OLE_AUTOMATION, Enable OLE automation utilities.} @itemdef{wxUSE_OLE_AUTOMATION, Enable OLE automation utilities.}
@itemdef{wxUSE_OLE_CLIPBOARD, Use OLE clipboard.} @itemdef{wxUSE_OLE_CLIPBOARD, Use OLE clipboard.}

View File

@@ -123,37 +123,9 @@
/* signed/unsigned version of it which (a) makes sense to me (unlike */ /* signed/unsigned version of it which (a) makes sense to me (unlike */
/* char wchar_t is always unsigned) and (b) was how the previous */ /* char wchar_t is always unsigned) and (b) was how the previous */
/* definitions worked so keep it like this */ /* definitions worked so keep it like this */
typedef wchar_t wxChar;
/* Sun's SunPro compiler supports the wchar_t type and wide character */ typedef wchar_t wxSChar;
/* functions, but does not define __WCHAR_TYPE__. Define it here to */ typedef wchar_t wxUChar;
/* allow unicode enabled builds. */
#if (defined(__SUNPRO_CC) || defined(__SUNPRO_C)) && !defined(__WCHAR_TYPE__)
#define __WCHAR_TYPE__ wxchar_t
#endif
/* GNU libc has __WCHAR_TYPE__ which requires special treatment, see */
/* comment below */
#if !defined(__WCHAR_TYPE__) || \
(!defined(__GNUC__) || wxCHECK_GCC_VERSION(2, 96))
/* standard case */
typedef wchar_t wxChar;
typedef wchar_t wxSChar;
typedef wchar_t wxUChar;
#else /* __WCHAR_TYPE__ and gcc < 2.96 */
/* VS: wxWidgets used to define wxChar as __WCHAR_TYPE__ here. */
/* However, this doesn't work with new GCC 3.x compilers because */
/* wchar_t is C++'s builtin type in the new standard. OTOH, old */
/* compilers (GCC 2.x) won't accept new definition of */
/* wx{S,U}CharType, so we have to define wxChar */
/* conditionally depending on detected compiler & compiler */
/* version. */
/* with old definition of wxChar. */
#define wchar_t __WCHAR_TYPE__
typedef __WCHAR_TYPE__ wxChar;
typedef __WCHAR_TYPE__ wxSChar;
typedef __WCHAR_TYPE__ wxUChar;
#endif /* __WCHAR_TYPE__ */
#endif /* ASCII/Unicode */ #endif /* ASCII/Unicode */
/* ------------------------------------------------------------------------- */ /* ------------------------------------------------------------------------- */

View File

@@ -118,7 +118,7 @@
#if (defined(__STDC_VERSION__) && __STDC_VERSION__ >= 199901L) || \ #if (defined(__STDC_VERSION__) && __STDC_VERSION__ >= 199901L) || \
(defined(__cplusplus) && __cplusplus >= 201103L) (defined(__cplusplus) && __cplusplus >= 201103L)
#define HAVE_VARIADIC_MACROS 1 #define HAVE_VARIADIC_MACROS 1
#elif wxCHECK_GCC_VERSION(3,0) #elif defined(__GNUC__)
#define HAVE_VARIADIC_MACROS 1 #define HAVE_VARIADIC_MACROS 1
#elif wxCHECK_VISUALC_VERSION(8) #elif wxCHECK_VISUALC_VERSION(8)
#define HAVE_VARIADIC_MACROS 1 #define HAVE_VARIADIC_MACROS 1

View File

@@ -234,9 +234,7 @@ typedef short int WXTYPE;
#ifndef HAVE_EXPLICIT #ifndef HAVE_EXPLICIT
#if defined(__VISUALC__) #if defined(__VISUALC__)
#define HAVE_EXPLICIT #define HAVE_EXPLICIT
#elif ( defined(__MINGW32__) || defined(__CYGWIN32__) ) \ #elif defined(__GNUC__)
&& wxCHECK_GCC_VERSION(2, 95)
/* GCC 2.95 has explicit, what about earlier versions? */
#define HAVE_EXPLICIT #define HAVE_EXPLICIT
#elif defined(__BORLANDC__) && (__BORLANDC__ >= 0x0520) #elif defined(__BORLANDC__) && (__BORLANDC__ >= 0x0520)
/* BC++ 4.52 doesn't support explicit, CBuilder 1 does */ /* BC++ 4.52 doesn't support explicit, CBuilder 1 does */
@@ -345,8 +343,7 @@ typedef short int WXTYPE;
#ifndef HAVE_STD_WSTRING #ifndef HAVE_STD_WSTRING
#if defined(__VISUALC__) #if defined(__VISUALC__)
#define HAVE_STD_WSTRING #define HAVE_STD_WSTRING
#elif defined(__MINGW32__) && wxCHECK_GCC_VERSION(3, 3) #elif defined(__MINGW32__)
/* GCC 3.1 has std::wstring; 3.0 never was in MinGW, 2.95 hasn't it */
#define HAVE_STD_WSTRING #define HAVE_STD_WSTRING
#endif #endif
#endif #endif
@@ -354,10 +351,7 @@ typedef short int WXTYPE;
#ifndef HAVE_STD_STRING_COMPARE #ifndef HAVE_STD_STRING_COMPARE
#if defined(__VISUALC__) #if defined(__VISUALC__)
#define HAVE_STD_STRING_COMPARE #define HAVE_STD_STRING_COMPARE
#elif ( defined(__MINGW32__) || defined(__CYGWIN32__) ) \ #elif defined(__MINGW32__) || defined(__CYGWIN32__)
&& wxCHECK_GCC_VERSION(3, 1)
/* GCC 3.1 has std::string::compare; */
/* 3.0 never was in MinGW, 2.95 hasn't it */
#define HAVE_STD_STRING_COMPARE #define HAVE_STD_STRING_COMPARE
#endif #endif
#endif #endif
@@ -583,7 +577,7 @@ typedef short int WXTYPE;
/* The basic compiler-specific construct to generate a deprecation warning. */ /* The basic compiler-specific construct to generate a deprecation warning. */
#ifdef __clang__ #ifdef __clang__
#define wxDEPRECATED_DECL __attribute__((deprecated)) #define wxDEPRECATED_DECL __attribute__((deprecated))
#elif wxCHECK_GCC_VERSION(3, 1) #elif defined(__GNUC__)
#define wxDEPRECATED_DECL __attribute__((deprecated)) #define wxDEPRECATED_DECL __attribute__((deprecated))
#elif defined(__VISUALC__) #elif defined(__VISUALC__)
#define wxDEPRECATED_DECL __declspec(deprecated) #define wxDEPRECATED_DECL __declspec(deprecated)

View File

@@ -88,8 +88,7 @@ protected:
#if defined(__WXUNIVERSAL__) #if defined(__WXUNIVERSAL__)
#include "wx/generic/dirdlgg.h" #include "wx/generic/dirdlgg.h"
#define wxDirDialog wxGenericDirDialog #define wxDirDialog wxGenericDirDialog
#elif defined(__WXMSW__) && (!wxUSE_OLE || \ #elif defined(__WXMSW__) && !wxUSE_OLE
(defined (__GNUWIN32__) && !wxUSE_NORLANDER_HEADERS))
#include "wx/generic/dirdlgg.h" #include "wx/generic/dirdlgg.h"
#define wxDirDialog wxGenericDirDialog #define wxDirDialog wxGenericDirDialog
#elif defined(__WXMSW__) && defined(__WXWINCE__) && !defined(__HANDHELDPC__) #elif defined(__WXMSW__) && defined(__WXWINCE__) && !defined(__HANDHELDPC__)

View File

@@ -119,15 +119,6 @@
* disable the settings which don't work for some compilers * disable the settings which don't work for some compilers
*/ */
#ifndef wxUSE_NORLANDER_HEADERS
# if ( defined(__WINE__) ) || \
((defined(__MINGW32__) || defined(__CYGWIN__)) && ((__GNUC__>2) ||((__GNUC__==2) && (__GNUC_MINOR__>=95))))
# define wxUSE_NORLANDER_HEADERS 1
# else
# define wxUSE_NORLANDER_HEADERS 0
# endif
#endif
/* /*
* All of the settings below require SEH support (__try/__catch) and can't work * All of the settings below require SEH support (__try/__catch) and can't work
* without it. * without it.
@@ -180,12 +171,6 @@
# define wxUSE_DEBUG_NEW_ALWAYS 0 # define wxUSE_DEBUG_NEW_ALWAYS 0
#endif /* wxUSE_MFC */ #endif /* wxUSE_MFC */
#if (defined(__GNUWIN32__) && !wxUSE_NORLANDER_HEADERS)
/* GnuWin32 doesn't have appropriate headers for e.g. IUnknown. */
# undef wxUSE_DRAG_AND_DROP
# define wxUSE_DRAG_AND_DROP 0
#endif
#if !wxUSE_OWNER_DRAWN && !defined(__WXUNIVERSAL__) #if !wxUSE_OWNER_DRAWN && !defined(__WXUNIVERSAL__)
# undef wxUSE_CHECKLISTBOX # undef wxUSE_CHECKLISTBOX
# define wxUSE_CHECKLISTBOX 0 # define wxUSE_CHECKLISTBOX 0

View File

@@ -65,25 +65,6 @@
#define wxCHECK_W32API_VERSION( major, minor ) (0) #define wxCHECK_W32API_VERSION( major, minor ) (0)
#endif #endif
/* 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__) || defined(__WINE__)) && ((__GNUC__>2) || ((__GNUC__==2) && (__GNUC_MINOR__>=95)))
#ifndef wxUSE_NORLANDER_HEADERS
#define wxUSE_NORLANDER_HEADERS 1
#endif
#else
#ifndef wxUSE_NORLANDER_HEADERS
#define wxUSE_NORLANDER_HEADERS 0
#endif
#endif
/* "old" GNUWIN32 is the one without Norlander's headers: it lacks the
standard Win32 headers and we define the used stuff ourselves for it
in wx/msw/gnuwin32/extra.h */
#if defined(__GNUC__) && !wxUSE_NORLANDER_HEADERS
#define __GNUWIN32_OLD__
#endif
/* Cygwin 1.0 */ /* Cygwin 1.0 */
#if defined(__CYGWIN__) && ((__GNUC__==2) && (__GNUC_MINOR__==9)) #if defined(__CYGWIN__) && ((__GNUC__==2) && (__GNUC_MINOR__==9))
#define __CYGWIN10__ #define __CYGWIN10__

View File

@@ -72,7 +72,7 @@ WXDLLIMPEXP_BASE void wxSetInstance(HINSTANCE hInst);
// define things missing from some compilers' headers // define things missing from some compilers' headers
// --------------------------------------------------------------------------- // ---------------------------------------------------------------------------
#if defined(__WXWINCE__) || (defined(__GNUWIN32__) && !wxUSE_NORLANDER_HEADERS) #if defined(__WXWINCE__)
#ifndef ZeroMemory #ifndef ZeroMemory
inline void ZeroMemory(void *buf, size_t len) { memset(buf, 0, len); } inline void ZeroMemory(void *buf, size_t len) { memset(buf, 0, len); }
#endif #endif

View File

@@ -61,14 +61,6 @@
#include "wx/tooltip.h" #include "wx/tooltip.h"
#endif // wxUSE_TOOLTIPS #endif // wxUSE_TOOLTIPS
// OLE is used for drag-and-drop, clipboard, OLE Automation..., but some
// compilers don't support it (missing headers, libs, ...)
#if defined(__GNUWIN32_OLD__) || defined(__SYMANTEC__)
#undef wxUSE_OLE
#define wxUSE_OLE 0
#endif // broken compilers
#if defined(__POCKETPC__) || defined(__SMARTPHONE__) #if defined(__POCKETPC__) || defined(__SMARTPHONE__)
#include <ole2.h> #include <ole2.h>
#include <aygshell.h> #include <aygshell.h>

View File

@@ -49,7 +49,6 @@ wxDEFINE_EVENT( wxEVT_DIALUP_DISCONNECTED, wxDialUpEvent );
// Wine: no wininet.h // Wine: no wininet.h
#if (!defined(__BORLANDC__) || (__BORLANDC__>=0x550)) && \ #if (!defined(__BORLANDC__) || (__BORLANDC__>=0x550)) && \
(!defined(__GNUWIN32__) || wxCHECK_W32API_VERSION(0, 5)) && \ (!defined(__GNUWIN32__) || wxCHECK_W32API_VERSION(0, 5)) && \
!defined(__GNUWIN32_OLD__) && \
!defined(__WINE__) !defined(__WINE__)
#include <ras.h> #include <ras.h>

View File

@@ -25,7 +25,7 @@
#if wxUSE_DIRDLG #if wxUSE_DIRDLG
#if wxUSE_OLE && !defined(__GNUWIN32_OLD__) && (!defined(__WXWINCE__) || \ #if wxUSE_OLE && (!defined(__WXWINCE__) || \
(defined(__HANDHELDPC__) && (_WIN32_WCE >= 500))) (defined(__HANDHELDPC__) && (_WIN32_WCE >= 500)))
#include "wx/dirdlg.h" #include "wx/dirdlg.h"

View File

@@ -146,12 +146,6 @@ bool wxFontEnumeratorHelper::SetEncoding(wxFontEncoding encoding)
return true; return true;
} }
#if defined(__GNUWIN32__) && !defined(__CYGWIN10__) && !wxCHECK_W32API_VERSION( 1, 1 ) && !wxUSE_NORLANDER_HEADERS
#define wxFONTENUMPROC int(*)(ENUMLOGFONTEX *, NEWTEXTMETRICEX*, int, LPARAM)
#else
#define wxFONTENUMPROC FONTENUMPROC
#endif
void wxFontEnumeratorHelper::DoEnumerate() void wxFontEnumeratorHelper::DoEnumerate()
{ {
#ifndef __WXMICROWIN__ #ifndef __WXMICROWIN__
@@ -160,14 +154,14 @@ void wxFontEnumeratorHelper::DoEnumerate()
#ifdef __WXWINCE__ #ifdef __WXWINCE__
::EnumFontFamilies(hDC, ::EnumFontFamilies(hDC,
m_facename.empty() ? NULL : wxMSW_CONV_LPCTSTR(m_facename), m_facename.empty() ? NULL : wxMSW_CONV_LPCTSTR(m_facename),
(wxFONTENUMPROC)wxFontEnumeratorProc, (FONTENUMPROC)wxFontEnumeratorProc,
(LPARAM)this) ; (LPARAM)this) ;
#else // __WIN32__ #else // __WIN32__
LOGFONT lf; LOGFONT lf;
lf.lfCharSet = (BYTE)m_charset; lf.lfCharSet = (BYTE)m_charset;
wxStrlcpy(lf.lfFaceName, m_facename.c_str(), WXSIZEOF(lf.lfFaceName)); wxStrlcpy(lf.lfFaceName, m_facename.c_str(), WXSIZEOF(lf.lfFaceName));
lf.lfPitchAndFamily = 0; lf.lfPitchAndFamily = 0;
::EnumFontFamiliesEx(hDC, &lf, (wxFONTENUMPROC)wxFontEnumeratorProc, ::EnumFontFamiliesEx(hDC, &lf, (FONTENUMPROC)wxFontEnumeratorProc,
(LPARAM)this, 0 /* reserved */) ; (LPARAM)this, 0 /* reserved */) ;
#endif // Win32/CE #endif // Win32/CE

View File

@@ -26,9 +26,7 @@
#include "wx/msw/private.h" #include "wx/msw/private.h"
#if !defined(__GNUWIN32_OLD__) || defined(__CYGWIN10__) #include <mmsystem.h>
#include <mmsystem.h>
#endif
// Why doesn't BC++ have joyGetPosEx? // Why doesn't BC++ have joyGetPosEx?
#if !defined(__WIN32__) || defined(__BORLANDC__) #if !defined(__WIN32__) || defined(__BORLANDC__)

View File

@@ -33,11 +33,6 @@
#include "wx/log.h" #include "wx/log.h"
#endif #endif
// for some compilers, the entire ole2.h must be included, not only oleauto.h
#if wxUSE_NORLANDER_HEADERS
#include <ole2.h>
#endif
#include <oleauto.h> #include <oleauto.h>
#include <oleacc.h> #include <oleacc.h>

View File

@@ -32,7 +32,7 @@
#include "wx/dataobj.h" #include "wx/dataobj.h"
#if wxUSE_OLE && defined(__WIN32__) && !defined(__GNUWIN32_OLD__) #if wxUSE_OLE
#include "wx/scopedarray.h" #include "wx/scopedarray.h"
#include "wx/vector.h" #include "wx/vector.h"
@@ -42,11 +42,6 @@
#include <winreg.h> #include <winreg.h>
#endif #endif
// for some compilers, the entire ole2.h must be included, not only oleauto.h
#if wxUSE_NORLANDER_HEADERS || defined(__WXWINCE__)
#include <ole2.h>
#endif
#include <oleauto.h> #include <oleauto.h>
#include <shlobj.h> #include <shlobj.h>

View File

@@ -34,11 +34,6 @@
#include "wx/msw/private.h" #include "wx/msw/private.h"
// for some compilers, the entire ole2.h must be included, not only oleauto.h
#if wxUSE_NORLANDER_HEADERS || defined(__WXWINCE__)
#include <ole2.h>
#endif
#include <oleauto.h> #include <oleauto.h>
#include "wx/msw/ole/oleutils.h" #include "wx/msw/ole/oleutils.h"

View File

@@ -37,13 +37,7 @@
#include <ole2.h> #include <ole2.h>
#endif #endif
#ifdef __WIN32__ #include <shlobj.h> // for DROPFILES structure
#if !defined(__GNUWIN32__) || wxUSE_NORLANDER_HEADERS
#include <shlobj.h> // for DROPFILES structure
#endif
#else
#include <shellapi.h>
#endif
#include "wx/dnd.h" #include "wx/dnd.h"

View File

@@ -372,14 +372,7 @@ bool wxRegKey::GetKeyInfo(size_t *pnSubKeys,
#define REG_PARAM(name) &dw##name #define REG_PARAM(name) &dw##name
#else // Win32 #else // Win32
// Old gcc headers incorrectly prototype RegQueryInfoKey() as taking #define REG_PARAM(name) (LPDWORD)(pn##name)
// size_t but normally we need a cast, even when sizeof(size_t) is the same
// as sizeof(DWORD).
#if defined(__GNUWIN32_OLD__) && !defined(__CYGWIN10__)
#define REG_PARAM(name) pn##name
#else
#define REG_PARAM(name) (LPDWORD)(pn##name)
#endif
#endif #endif

View File

@@ -62,13 +62,7 @@
#endif #endif
#if wxUSE_RICHEDIT #if wxUSE_RICHEDIT
// old mingw32 has richedit stuff directly in windows.h and doesn't have
// richedit.h at all
#if !defined(__GNUWIN32_OLD__) || defined(__CYGWIN10__)
#include <richedit.h> #include <richedit.h>
#endif
#endif // wxUSE_RICHEDIT #endif // wxUSE_RICHEDIT
#include "wx/msw/missing.h" #include "wx/msw/missing.h"

View File

@@ -50,7 +50,7 @@
#endif #endif
// Doesn't work with Cygwin at present // Doesn't work with Cygwin at present
#if wxUSE_SOCKETS && (defined(__GNUWIN32_OLD__) || defined(__WXWINCE__) || defined(__CYGWIN32__)) #if wxUSE_SOCKETS && (defined(__WXWINCE__) || defined(__CYGWIN32__))
// apparently we need to include winsock.h to get WSADATA and other stuff // apparently we need to include winsock.h to get WSADATA and other stuff
// used in wxGetFullHostName() with the old mingw32 versions // used in wxGetFullHostName() with the old mingw32 versions
#include <winsock.h> #include <winsock.h>

View File

@@ -106,7 +106,7 @@
#include <string.h> #include <string.h>
#if (!defined(__GNUWIN32_OLD__) && !defined(__WXMICROWIN__) /* && !defined(__WXWINCE__) */ ) || defined(__CYGWIN10__) #if !defined(__WXMICROWIN__)
#include <shellapi.h> #include <shellapi.h>
#include <mmsystem.h> #include <mmsystem.h>
#endif #endif

View File

@@ -19,7 +19,7 @@
#include "wx/msw/wrapwin.h" #include "wx/msw/wrapwin.h"
#endif #endif
#if wxCHECK_GCC_VERSION(3, 3) #ifdef __GNUC__
#define HAVE_COMPILER_THREAD #define HAVE_COMPILER_THREAD
#define wxTHREAD_SPECIFIC __thread #define wxTHREAD_SPECIFIC __thread
#elif defined(__VISUALC__) #elif defined(__VISUALC__)