diff --git a/docs/doxygen/mainpages/const_wxusedef.h b/docs/doxygen/mainpages/const_wxusedef.h index 78ed31250d..45ee54f022 100644 --- a/docs/doxygen/mainpages/const_wxusedef.h +++ b/docs/doxygen/mainpages/const_wxusedef.h @@ -330,7 +330,6 @@ library: @itemdef{wxUSE_MS_HTML_HELP, Use wxCHMHelpController class.} @itemdef{wxUSE_NO_MANIFEST, Can be predefined to disable inclusion of the 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_AUTOMATION, Enable OLE automation utilities.} @itemdef{wxUSE_OLE_CLIPBOARD, Use OLE clipboard.} diff --git a/include/wx/chartype.h b/include/wx/chartype.h index 6126320f82..d0b0ca77b9 100644 --- a/include/wx/chartype.h +++ b/include/wx/chartype.h @@ -123,37 +123,9 @@ /* signed/unsigned version of it which (a) makes sense to me (unlike */ /* char wchar_t is always unsigned) and (b) was how the previous */ /* definitions worked so keep it like this */ - - /* Sun's SunPro compiler supports the wchar_t type and wide character */ - /* functions, but does not define __WCHAR_TYPE__. Define it here to */ - /* 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__ */ + typedef wchar_t wxChar; + typedef wchar_t wxSChar; + typedef wchar_t wxUChar; #endif /* ASCII/Unicode */ /* ------------------------------------------------------------------------- */ diff --git a/include/wx/cpp.h b/include/wx/cpp.h index 1a786b71a8..19aa9bea52 100644 --- a/include/wx/cpp.h +++ b/include/wx/cpp.h @@ -118,7 +118,7 @@ #if (defined(__STDC_VERSION__) && __STDC_VERSION__ >= 199901L) || \ (defined(__cplusplus) && __cplusplus >= 201103L) #define HAVE_VARIADIC_MACROS 1 - #elif wxCHECK_GCC_VERSION(3,0) + #elif defined(__GNUC__) #define HAVE_VARIADIC_MACROS 1 #elif wxCHECK_VISUALC_VERSION(8) #define HAVE_VARIADIC_MACROS 1 diff --git a/include/wx/defs.h b/include/wx/defs.h index d5b7f407b6..6cf2bcae0e 100644 --- a/include/wx/defs.h +++ b/include/wx/defs.h @@ -234,9 +234,7 @@ typedef short int WXTYPE; #ifndef HAVE_EXPLICIT #if defined(__VISUALC__) #define HAVE_EXPLICIT - #elif ( defined(__MINGW32__) || defined(__CYGWIN32__) ) \ - && wxCHECK_GCC_VERSION(2, 95) - /* GCC 2.95 has explicit, what about earlier versions? */ + #elif defined(__GNUC__) #define HAVE_EXPLICIT #elif defined(__BORLANDC__) && (__BORLANDC__ >= 0x0520) /* BC++ 4.52 doesn't support explicit, CBuilder 1 does */ @@ -345,8 +343,7 @@ typedef short int WXTYPE; #ifndef HAVE_STD_WSTRING #if defined(__VISUALC__) #define HAVE_STD_WSTRING - #elif defined(__MINGW32__) && wxCHECK_GCC_VERSION(3, 3) - /* GCC 3.1 has std::wstring; 3.0 never was in MinGW, 2.95 hasn't it */ + #elif defined(__MINGW32__) #define HAVE_STD_WSTRING #endif #endif @@ -354,10 +351,7 @@ typedef short int WXTYPE; #ifndef HAVE_STD_STRING_COMPARE #if defined(__VISUALC__) #define HAVE_STD_STRING_COMPARE - #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 */ + #elif defined(__MINGW32__) || defined(__CYGWIN32__) #define HAVE_STD_STRING_COMPARE #endif #endif @@ -583,7 +577,7 @@ typedef short int WXTYPE; /* The basic compiler-specific construct to generate a deprecation warning. */ #ifdef __clang__ #define wxDEPRECATED_DECL __attribute__((deprecated)) -#elif wxCHECK_GCC_VERSION(3, 1) +#elif defined(__GNUC__) #define wxDEPRECATED_DECL __attribute__((deprecated)) #elif defined(__VISUALC__) #define wxDEPRECATED_DECL __declspec(deprecated) diff --git a/include/wx/dirdlg.h b/include/wx/dirdlg.h index e5bae293e4..fa4cd78d89 100644 --- a/include/wx/dirdlg.h +++ b/include/wx/dirdlg.h @@ -88,8 +88,7 @@ protected: #if defined(__WXUNIVERSAL__) #include "wx/generic/dirdlgg.h" #define wxDirDialog wxGenericDirDialog -#elif defined(__WXMSW__) && (!wxUSE_OLE || \ - (defined (__GNUWIN32__) && !wxUSE_NORLANDER_HEADERS)) +#elif defined(__WXMSW__) && !wxUSE_OLE #include "wx/generic/dirdlgg.h" #define wxDirDialog wxGenericDirDialog #elif defined(__WXMSW__) && defined(__WXWINCE__) && !defined(__HANDHELDPC__) diff --git a/include/wx/msw/chkconf.h b/include/wx/msw/chkconf.h index 67da7d51cc..d1bebed82b 100644 --- a/include/wx/msw/chkconf.h +++ b/include/wx/msw/chkconf.h @@ -119,15 +119,6 @@ * 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 * without it. @@ -180,12 +171,6 @@ # define wxUSE_DEBUG_NEW_ALWAYS 0 #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__) # undef wxUSE_CHECKLISTBOX # define wxUSE_CHECKLISTBOX 0 diff --git a/include/wx/msw/gccpriv.h b/include/wx/msw/gccpriv.h index c2d3b2ff15..265c9048d5 100644 --- a/include/wx/msw/gccpriv.h +++ b/include/wx/msw/gccpriv.h @@ -65,25 +65,6 @@ #define wxCHECK_W32API_VERSION( major, minor ) (0) #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 */ #if defined(__CYGWIN__) && ((__GNUC__==2) && (__GNUC_MINOR__==9)) #define __CYGWIN10__ diff --git a/include/wx/msw/private.h b/include/wx/msw/private.h index 8467bb06a7..eefc504485 100644 --- a/include/wx/msw/private.h +++ b/include/wx/msw/private.h @@ -72,7 +72,7 @@ WXDLLIMPEXP_BASE void wxSetInstance(HINSTANCE hInst); // define things missing from some compilers' headers // --------------------------------------------------------------------------- -#if defined(__WXWINCE__) || (defined(__GNUWIN32__) && !wxUSE_NORLANDER_HEADERS) +#if defined(__WXWINCE__) #ifndef ZeroMemory inline void ZeroMemory(void *buf, size_t len) { memset(buf, 0, len); } #endif diff --git a/src/msw/app.cpp b/src/msw/app.cpp index 8b0b20c33e..8cf191d9f4 100644 --- a/src/msw/app.cpp +++ b/src/msw/app.cpp @@ -61,14 +61,6 @@ #include "wx/tooltip.h" #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__) #include #include diff --git a/src/msw/dialup.cpp b/src/msw/dialup.cpp index 89d783b84d..c4bfc88185 100644 --- a/src/msw/dialup.cpp +++ b/src/msw/dialup.cpp @@ -49,7 +49,6 @@ wxDEFINE_EVENT( wxEVT_DIALUP_DISCONNECTED, wxDialUpEvent ); // Wine: no wininet.h #if (!defined(__BORLANDC__) || (__BORLANDC__>=0x550)) && \ (!defined(__GNUWIN32__) || wxCHECK_W32API_VERSION(0, 5)) && \ - !defined(__GNUWIN32_OLD__) && \ !defined(__WINE__) #include diff --git a/src/msw/dirdlg.cpp b/src/msw/dirdlg.cpp index 549adec9ba..b6a3360b67 100644 --- a/src/msw/dirdlg.cpp +++ b/src/msw/dirdlg.cpp @@ -25,7 +25,7 @@ #if wxUSE_DIRDLG -#if wxUSE_OLE && !defined(__GNUWIN32_OLD__) && (!defined(__WXWINCE__) || \ +#if wxUSE_OLE && (!defined(__WXWINCE__) || \ (defined(__HANDHELDPC__) && (_WIN32_WCE >= 500))) #include "wx/dirdlg.h" diff --git a/src/msw/fontenum.cpp b/src/msw/fontenum.cpp index 9b505cb4f1..22dc8ed677 100644 --- a/src/msw/fontenum.cpp +++ b/src/msw/fontenum.cpp @@ -146,12 +146,6 @@ bool wxFontEnumeratorHelper::SetEncoding(wxFontEncoding encoding) 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() { #ifndef __WXMICROWIN__ @@ -160,14 +154,14 @@ void wxFontEnumeratorHelper::DoEnumerate() #ifdef __WXWINCE__ ::EnumFontFamilies(hDC, m_facename.empty() ? NULL : wxMSW_CONV_LPCTSTR(m_facename), - (wxFONTENUMPROC)wxFontEnumeratorProc, + (FONTENUMPROC)wxFontEnumeratorProc, (LPARAM)this) ; #else // __WIN32__ LOGFONT lf; lf.lfCharSet = (BYTE)m_charset; wxStrlcpy(lf.lfFaceName, m_facename.c_str(), WXSIZEOF(lf.lfFaceName)); lf.lfPitchAndFamily = 0; - ::EnumFontFamiliesEx(hDC, &lf, (wxFONTENUMPROC)wxFontEnumeratorProc, + ::EnumFontFamiliesEx(hDC, &lf, (FONTENUMPROC)wxFontEnumeratorProc, (LPARAM)this, 0 /* reserved */) ; #endif // Win32/CE diff --git a/src/msw/joystick.cpp b/src/msw/joystick.cpp index 0ea52f7192..cad58c7c35 100644 --- a/src/msw/joystick.cpp +++ b/src/msw/joystick.cpp @@ -26,9 +26,7 @@ #include "wx/msw/private.h" -#if !defined(__GNUWIN32_OLD__) || defined(__CYGWIN10__) - #include -#endif +#include // Why doesn't BC++ have joyGetPosEx? #if !defined(__WIN32__) || defined(__BORLANDC__) diff --git a/src/msw/ole/access.cpp b/src/msw/ole/access.cpp index b6d1370a7a..00a5ac1002 100644 --- a/src/msw/ole/access.cpp +++ b/src/msw/ole/access.cpp @@ -33,11 +33,6 @@ #include "wx/log.h" #endif -// for some compilers, the entire ole2.h must be included, not only oleauto.h -#if wxUSE_NORLANDER_HEADERS - #include -#endif - #include #include diff --git a/src/msw/ole/dataobj.cpp b/src/msw/ole/dataobj.cpp index 527e321961..d3d8a9211b 100644 --- a/src/msw/ole/dataobj.cpp +++ b/src/msw/ole/dataobj.cpp @@ -32,7 +32,7 @@ #include "wx/dataobj.h" -#if wxUSE_OLE && defined(__WIN32__) && !defined(__GNUWIN32_OLD__) +#if wxUSE_OLE #include "wx/scopedarray.h" #include "wx/vector.h" @@ -42,11 +42,6 @@ #include #endif -// for some compilers, the entire ole2.h must be included, not only oleauto.h -#if wxUSE_NORLANDER_HEADERS || defined(__WXWINCE__) - #include -#endif - #include #include diff --git a/src/msw/ole/dropsrc.cpp b/src/msw/ole/dropsrc.cpp index bf74070286..171994a16b 100644 --- a/src/msw/ole/dropsrc.cpp +++ b/src/msw/ole/dropsrc.cpp @@ -34,11 +34,6 @@ #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 -#endif - #include #include "wx/msw/ole/oleutils.h" diff --git a/src/msw/ole/droptgt.cpp b/src/msw/ole/droptgt.cpp index 45b67c3c16..20ab046dc3 100644 --- a/src/msw/ole/droptgt.cpp +++ b/src/msw/ole/droptgt.cpp @@ -37,13 +37,7 @@ #include #endif -#ifdef __WIN32__ - #if !defined(__GNUWIN32__) || wxUSE_NORLANDER_HEADERS - #include // for DROPFILES structure - #endif -#else - #include -#endif +#include // for DROPFILES structure #include "wx/dnd.h" diff --git a/src/msw/registry.cpp b/src/msw/registry.cpp index e67bed9375..86a7e3a776 100644 --- a/src/msw/registry.cpp +++ b/src/msw/registry.cpp @@ -372,14 +372,7 @@ bool wxRegKey::GetKeyInfo(size_t *pnSubKeys, #define REG_PARAM(name) &dw##name #else // Win32 - // Old gcc headers incorrectly prototype RegQueryInfoKey() as taking - // 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 + #define REG_PARAM(name) (LPDWORD)(pn##name) #endif diff --git a/src/msw/textctrl.cpp b/src/msw/textctrl.cpp index 4c51afc68d..21e29a1a42 100644 --- a/src/msw/textctrl.cpp +++ b/src/msw/textctrl.cpp @@ -62,13 +62,7 @@ #endif #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 -#endif - #endif // wxUSE_RICHEDIT #include "wx/msw/missing.h" diff --git a/src/msw/utils.cpp b/src/msw/utils.cpp index 5120678521..d3f9aa7db1 100644 --- a/src/msw/utils.cpp +++ b/src/msw/utils.cpp @@ -50,7 +50,7 @@ #endif // 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 // used in wxGetFullHostName() with the old mingw32 versions #include diff --git a/src/msw/window.cpp b/src/msw/window.cpp index 5449e45f71..728074a674 100644 --- a/src/msw/window.cpp +++ b/src/msw/window.cpp @@ -106,7 +106,7 @@ #include -#if (!defined(__GNUWIN32_OLD__) && !defined(__WXMICROWIN__) /* && !defined(__WXWINCE__) */ ) || defined(__CYGWIN10__) +#if !defined(__WXMICROWIN__) #include #include #endif diff --git a/tests/benchmarks/tls.cpp b/tests/benchmarks/tls.cpp index 14d37fc6dc..aa21eeba7a 100644 --- a/tests/benchmarks/tls.cpp +++ b/tests/benchmarks/tls.cpp @@ -19,7 +19,7 @@ #include "wx/msw/wrapwin.h" #endif -#if wxCHECK_GCC_VERSION(3, 3) +#ifdef __GNUC__ #define HAVE_COMPILER_THREAD #define wxTHREAD_SPECIFIC __thread #elif defined(__VISUALC__)