Remove support for gcc < 4
We probably could drop support for some gcc 4.x versions too, but we definitely don't need to support gcc 3.x any longer and not doing it simplifies the code a bit, so just assume gcc >= 4. Closes https://github.com/wxWidgets/wxWidgets/pull/1943
This commit is contained in:
parent
39ac04b0d0
commit
617db49fda
@ -481,10 +481,9 @@ typedef short int WXTYPE;
|
|||||||
|
|
||||||
#ifndef HAVE_WOSTREAM
|
#ifndef HAVE_WOSTREAM
|
||||||
/*
|
/*
|
||||||
Mingw <= 3.4 and all versions of Cygwin don't have std::wostream
|
Cygwin is the only platform which doesn't have std::wostream
|
||||||
*/
|
*/
|
||||||
#if (!defined(__MINGW32__) || wxCHECK_GCC_VERSION(4, 0)) && \
|
#if !defined(__CYGWIN__)
|
||||||
!defined(__CYGWIN__)
|
|
||||||
#define HAVE_WOSTREAM
|
#define HAVE_WOSTREAM
|
||||||
#endif
|
#endif
|
||||||
#endif /* HAVE_WOSTREAM */
|
#endif /* HAVE_WOSTREAM */
|
||||||
@ -622,15 +621,11 @@ typedef short int WXTYPE;
|
|||||||
*/
|
*/
|
||||||
#define wxDEPRECATED(x) wxDEPRECATED_DECL x
|
#define wxDEPRECATED(x) wxDEPRECATED_DECL x
|
||||||
|
|
||||||
#if defined(__GNUC__) && !wxCHECK_GCC_VERSION(3, 4)
|
/*
|
||||||
/*
|
This macro used to be defined differently for gcc < 3.4, but we don't
|
||||||
We need to add dummy "inline" to allow gcc < 3.4 to handle the
|
support it any more, so it's just the same thing as wxDEPRECATED now.
|
||||||
deprecation attribute on the constructors.
|
*/
|
||||||
*/
|
#define wxDEPRECATED_CONSTRUCTOR(x) wxDEPRECATED(x)
|
||||||
#define wxDEPRECATED_CONSTRUCTOR(x) wxDEPRECATED( inline x)
|
|
||||||
#else
|
|
||||||
#define wxDEPRECATED_CONSTRUCTOR(x) wxDEPRECATED(x)
|
|
||||||
#endif
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
Macro which marks the function as being deprecated but also defines it
|
Macro which marks the function as being deprecated but also defines it
|
||||||
|
@ -460,20 +460,9 @@ WX_STRCMP_FUNC(wxStricmp, wxCRT_StricmpA, wxCRT_StricmpW, wxStricmp_String)
|
|||||||
|
|
||||||
#if defined(wxCRT_StrcollA) && defined(wxCRT_StrcollW)
|
#if defined(wxCRT_StrcollA) && defined(wxCRT_StrcollW)
|
||||||
|
|
||||||
// GCC 3.4 and other compilers have a bug that causes it to fail compilation if
|
|
||||||
// the template's implementation uses overloaded function declared later (see
|
|
||||||
// the wxStrcoll() call in wxStrcoll_String<T>()), so we have to
|
|
||||||
// forward-declare the template and implement it below WX_STRCMP_FUNC. OTOH,
|
|
||||||
// this causes problems with GCC visibility in newer GCC versions.
|
|
||||||
#if !(wxCHECK_GCC_VERSION(3,5) && !wxCHECK_GCC_VERSION(4,7)) || defined(__clang__)
|
|
||||||
#define wxNEEDS_DECL_BEFORE_TEMPLATE
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#ifdef wxNEEDS_DECL_BEFORE_TEMPLATE
|
|
||||||
template<typename T>
|
template<typename T>
|
||||||
inline int wxStrcoll_String(const wxString& s1, const T& s2);
|
inline int wxStrcoll_String(const wxString& s1, const T& s2);
|
||||||
WX_STRCMP_FUNC(wxStrcoll, wxCRT_StrcollA, wxCRT_StrcollW, wxStrcoll_String)
|
WX_STRCMP_FUNC(wxStrcoll, wxCRT_StrcollA, wxCRT_StrcollW, wxStrcoll_String)
|
||||||
#endif // wxNEEDS_DECL_BEFORE_TEMPLATE
|
|
||||||
|
|
||||||
template<typename T>
|
template<typename T>
|
||||||
inline int wxStrcoll_String(const wxString& s1, const T& s2)
|
inline int wxStrcoll_String(const wxString& s1, const T& s2)
|
||||||
@ -489,12 +478,6 @@ inline int wxStrcoll_String(const wxString& s1, const T& s2)
|
|||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
#ifndef wxNEEDS_DECL_BEFORE_TEMPLATE
|
|
||||||
// this is exactly the same WX_STRCMP_FUNC line as above, inside the
|
|
||||||
// wxNEEDS_DECL_BEFORE_TEMPLATE case
|
|
||||||
WX_STRCMP_FUNC(wxStrcoll, wxCRT_StrcollA, wxCRT_StrcollW, wxStrcoll_String)
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#endif // defined(wxCRT_Strcoll[AW])
|
#endif // defined(wxCRT_Strcoll[AW])
|
||||||
|
|
||||||
template<typename T>
|
template<typename T>
|
||||||
|
Loading…
Reference in New Issue
Block a user