diff --git a/acinclude.m4 b/acinclude.m4 index a91268b5b8..97b4b26d1b 100644 --- a/acinclude.m4 +++ b/acinclude.m4 @@ -184,30 +184,6 @@ dnl =========================================================================== dnl C++ features test dnl =========================================================================== -dnl --------------------------------------------------------------------------- -dnl WX_CPP_NEW_HEADERS checks whether the compiler has "new" header -dnl or only the old one - it may be generally assumed that if -dnl exists, the other "new" headers (without .h) exist too. -dnl -dnl call WX_CPP_NEW_HEADERS(action-if-true, action-if-false) -dnl --------------------------------------------------------------------------- - -AC_DEFUN([WX_CPP_NEW_HEADERS], -[ - AC_LANG_SAVE - AC_LANG_CPLUSPLUS - - AC_CHECK_HEADERS([iostream],,, [ ]) - - if test "$ac_cv_header_iostream" = "yes" ; then - ifelse([$1], , :, [$1]) - else - ifelse([$2], , :, [$2]) - fi - - AC_LANG_RESTORE -]) - dnl --------------------------------------------------------------------------- dnl WX_CHECK_FUNCS(FUNCTIONS..., dnl [ACTION-IF-FOUND], diff --git a/build/cmake/setup.h.in b/build/cmake/setup.h.in index af4d7326d7..2ee13d6522 100644 --- a/build/cmake/setup.h.in +++ b/build/cmake/setup.h.in @@ -222,9 +222,6 @@ #define wxUSE_STD_STRING_CONV_IN_WXSTRING wxUSE_STL -#cmakedefine01 wxUSE_IOSTREAMH - - #cmakedefine01 wxUSE_LONGLONG diff --git a/configure b/configure index 7e83754c38..b20869091b 100755 --- a/configure +++ b/configure @@ -20210,44 +20210,6 @@ $as_echo "#define HAVE_TYPE_TRAITS 1" >>confdefs.h else - - - ac_ext=cpp -ac_cpp='$CXXCPP $CPPFLAGS' -ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5' -ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' -ac_compiler_gnu=$ac_cv_cxx_compiler_gnu - - - for ac_header in iostream -do : - ac_fn_cxx_check_header_compile "$LINENO" "iostream" "ac_cv_header_iostream" " -" -if test "x$ac_cv_header_iostream" = xyes; then : - cat >>confdefs.h <<_ACEOF -#define HAVE_IOSTREAM 1 -_ACEOF - -fi - -done - - - if test "$ac_cv_header_iostream" = "yes" ; then - : - else - $as_echo "#define wxUSE_IOSTREAMH 1" >>confdefs.h - - fi - - ac_ext=c -ac_cpp='$CPP $CPPFLAGS' -ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' -ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' -ac_compiler_gnu=$ac_cv_c_compiler_gnu - - - ac_ext=cpp ac_cpp='$CXXCPP $CPPFLAGS' ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5' diff --git a/configure.in b/configure.in index f361e85fda..7251023abf 100644 --- a/configure.in +++ b/configure.in @@ -1848,9 +1848,6 @@ AC_DEFINE(HAVE_TYPE_TRAITS) else dnl Not using C++11, so we do need to run the checks. -dnl check for iostream (as opposed to iostream.h) standard header -WX_CPP_NEW_HEADERS(, AC_DEFINE(wxUSE_IOSTREAMH)) - dnl the next few tests are all for C++ features and so need to be done using dnl C++ compiler AC_LANG_PUSH(C++) diff --git a/docs/doxygen/mainpages/const_wxusedef.h b/docs/doxygen/mainpages/const_wxusedef.h index ac407e9977..a34014a843 100644 --- a/docs/doxygen/mainpages/const_wxusedef.h +++ b/docs/doxygen/mainpages/const_wxusedef.h @@ -146,7 +146,6 @@ library: @itemdef{wxUSE_IMAGE, Use wxImage and related classes.} @itemdef{wxUSE_IMAGLIST, Use wxImageList class.} @itemdef{wxUSE_INTL, Use wxLocale and related classes.} -@itemdef{wxUSE_IOSTREAMH, Use header "iostream.h" instead of "iostream".} @itemdef{wxUSE_IPC, Use interprocess communication classes.} @itemdef{wxUSE_IPV6, Use experimental wxIPV6address and related classes.} @itemdef{wxUSE_JOYSTICK, Use wxJoystick class.} diff --git a/include/wx/android/setup.h b/include/wx/android/setup.h index 029987479f..0055c63e43 100644 --- a/include/wx/android/setup.h +++ b/include/wx/android/setup.h @@ -391,18 +391,6 @@ // wxWidgets. #define wxUSE_STD_STRING_CONV_IN_WXSTRING wxUSE_STL -// VC++ 4.2 and above allows and but you can't mix -// them. Set this option to 1 to use , 0 to use . -// -// Note that newer compilers (including VC++ 7.1 and later) don't support -// wxUSE_IOSTREAMH == 1 and so will be used anyhow. -// -// Default is 0. -// -// Recommended setting: 0, only set to 1 if you use a really old compiler -#define wxUSE_IOSTREAMH 0 - - // ---------------------------------------------------------------------------- // non GUI features selection // ---------------------------------------------------------------------------- diff --git a/include/wx/defs.h b/include/wx/defs.h index f35b9eea8a..a1c2ea5b15 100644 --- a/include/wx/defs.h +++ b/include/wx/defs.h @@ -460,21 +460,10 @@ typedef short int WXTYPE; /* Mingw <= 3.4 and all versions of Cygwin don't have std::wostream */ - #if (defined(__MINGW32__) && !wxCHECK_GCC_VERSION(4, 0)) || \ - defined(__CYGWIN__) - #define wxNO_WOSTREAM - #endif - - /* VC++ doesn't have it in the old iostream library */ - #if defined(__VISUALC__) && wxUSE_IOSTREAMH - #define wxNO_WOSTREAM - #endif - - #ifndef wxNO_WOSTREAM + #if (!defined(__MINGW32__) || wxCHECK_GCC_VERSION(4, 0)) && \ + !defined(__CYGWIN__) #define HAVE_WOSTREAM #endif - - #undef wxNO_WOSTREAM #endif /* HAVE_WOSTREAM */ /* ---------------------------------------------------------------------------- */ @@ -849,7 +838,7 @@ typedef short int WXTYPE; /* where should i put this? we need to make sure of this as it breaks */ /* the code. */ -#if !wxUSE_IOSTREAMH && defined(__WXDEBUG__) +#if defined(__WXDEBUG__) # undef wxUSE_DEBUG_NEW_ALWAYS # define wxUSE_DEBUG_NEW_ALWAYS 0 #endif diff --git a/include/wx/gtk/setup0.h b/include/wx/gtk/setup0.h index c581562c6b..715cea602a 100644 --- a/include/wx/gtk/setup0.h +++ b/include/wx/gtk/setup0.h @@ -392,18 +392,6 @@ // wxWidgets. #define wxUSE_STD_STRING_CONV_IN_WXSTRING wxUSE_STL -// VC++ 4.2 and above allows and but you can't mix -// them. Set this option to 1 to use , 0 to use . -// -// Note that newer compilers (including VC++ 7.1 and later) don't support -// wxUSE_IOSTREAMH == 1 and so will be used anyhow. -// -// Default is 0. -// -// Recommended setting: 0, only set to 1 if you use a really old compiler -#define wxUSE_IOSTREAMH 0 - - // ---------------------------------------------------------------------------- // non GUI features selection // ---------------------------------------------------------------------------- diff --git a/include/wx/iosfwrap.h b/include/wx/iosfwrap.h index 13fb1f7f89..7379e75ce7 100644 --- a/include/wx/iosfwrap.h +++ b/include/wx/iosfwrap.h @@ -1,6 +1,6 @@ /////////////////////////////////////////////////////////////////////////////// // Name: wx/iosfwrap.h -// Purpose: includes the correct stream-related forward declarations +// Purpose: This file is obsolete, include directly instead // Author: Jan van Dijk // Modified by: // Created: 18.12.2002 @@ -10,12 +10,7 @@ #if wxUSE_STD_IOSTREAM -#if wxUSE_IOSTREAMH - // There is no pre-ANSI iosfwd header so we include the full declarations. -# include -#else -# include -#endif +#include #ifdef __WINDOWS__ # include "wx/msw/winundef.h" diff --git a/include/wx/ioswrap.h b/include/wx/ioswrap.h index 5805588ead..7fad3b3d1b 100644 --- a/include/wx/ioswrap.h +++ b/include/wx/ioswrap.h @@ -1,6 +1,6 @@ /////////////////////////////////////////////////////////////////////////////// // Name: wx/ioswrap.h -// Purpose: includes the correct iostream headers for current compiler +// Purpose: This file is obsolete, include directly instead. // Author: Vadim Zeitlin // Modified by: // Created: 03.02.99 @@ -12,11 +12,7 @@ #include "wx/beforestd.h" -#if wxUSE_IOSTREAMH -# include -#else -# include -#endif +#include #include "wx/afterstd.h" diff --git a/include/wx/motif/setup0.h b/include/wx/motif/setup0.h index fc4c657c01..5a5e8137ad 100644 --- a/include/wx/motif/setup0.h +++ b/include/wx/motif/setup0.h @@ -392,18 +392,6 @@ // wxWidgets. #define wxUSE_STD_STRING_CONV_IN_WXSTRING wxUSE_STL -// VC++ 4.2 and above allows and but you can't mix -// them. Set this option to 1 to use , 0 to use . -// -// Note that newer compilers (including VC++ 7.1 and later) don't support -// wxUSE_IOSTREAMH == 1 and so will be used anyhow. -// -// Default is 0. -// -// Recommended setting: 0, only set to 1 if you use a really old compiler -#define wxUSE_IOSTREAMH 0 - - // ---------------------------------------------------------------------------- // non GUI features selection // ---------------------------------------------------------------------------- diff --git a/include/wx/msw/setup0.h b/include/wx/msw/setup0.h index 7b502ecbef..1d1890f6cb 100644 --- a/include/wx/msw/setup0.h +++ b/include/wx/msw/setup0.h @@ -392,18 +392,6 @@ // wxWidgets. #define wxUSE_STD_STRING_CONV_IN_WXSTRING wxUSE_STL -// VC++ 4.2 and above allows and but you can't mix -// them. Set this option to 1 to use , 0 to use . -// -// Note that newer compilers (including VC++ 7.1 and later) don't support -// wxUSE_IOSTREAMH == 1 and so will be used anyhow. -// -// Default is 0. -// -// Recommended setting: 0, only set to 1 if you use a really old compiler -#define wxUSE_IOSTREAMH 0 - - // ---------------------------------------------------------------------------- // non GUI features selection // ---------------------------------------------------------------------------- diff --git a/include/wx/osx/setup0.h b/include/wx/osx/setup0.h index 49bf354be5..a04f3fad08 100644 --- a/include/wx/osx/setup0.h +++ b/include/wx/osx/setup0.h @@ -398,18 +398,6 @@ // wxWidgets. #define wxUSE_STD_STRING_CONV_IN_WXSTRING wxUSE_STL -// VC++ 4.2 and above allows and but you can't mix -// them. Set this option to 1 to use , 0 to use . -// -// Note that newer compilers (including VC++ 7.1 and later) don't support -// wxUSE_IOSTREAMH == 1 and so will be used anyhow. -// -// Default is 0. -// -// Recommended setting: 0, only set to 1 if you use a really old compiler -#define wxUSE_IOSTREAMH 0 - - // ---------------------------------------------------------------------------- // non GUI features selection // ---------------------------------------------------------------------------- diff --git a/include/wx/platform.h b/include/wx/platform.h index d100c2b7ab..fccbedc0ae 100644 --- a/include/wx/platform.h +++ b/include/wx/platform.h @@ -529,32 +529,9 @@ #include "wx/chkconf.h" -/* - some compilers don't support iostream.h any longer, while some of theme - are not updated with yet, so override the users setting here - in such case. - */ -#if defined(_MSC_VER) && (_MSC_VER >= 1310) -# undef wxUSE_IOSTREAMH -# define wxUSE_IOSTREAMH 0 -#elif defined(__MINGW32__) -# undef wxUSE_IOSTREAMH -# define wxUSE_IOSTREAMH 0 -#endif /* compilers with/without iostream.h */ - -/* - old C++ headers (like ) declare classes in the global namespace - while the new, standard ones (like ) do it in std:: namespace, - unless it's an old gcc version. - - using this macro allows constuctions like "wxSTD iostream" to work in - either case - */ -#if !wxUSE_IOSTREAMH && (!defined(__GNUC__) || ( __GNUC__ > 2 ) || (__GNUC__ == 2 && __GNUC_MINOR__ >= 95)) -# define wxSTD std:: -#else -# define wxSTD -#endif +/* These macros exist only for compatibility, don't use them in the new code */ +#define wxUSE_IOSTREAMH 0 +#define wxSTD std:: /* On OpenVMS with the most recent HP C++ compiler some function (i.e. wscanf) * are only available in the std-namespace. (BUG???) diff --git a/include/wx/setup_inc.h b/include/wx/setup_inc.h index bece6430b8..4706597287 100644 --- a/include/wx/setup_inc.h +++ b/include/wx/setup_inc.h @@ -388,18 +388,6 @@ // wxWidgets. #define wxUSE_STD_STRING_CONV_IN_WXSTRING wxUSE_STL -// VC++ 4.2 and above allows and but you can't mix -// them. Set this option to 1 to use , 0 to use . -// -// Note that newer compilers (including VC++ 7.1 and later) don't support -// wxUSE_IOSTREAMH == 1 and so will be used anyhow. -// -// Default is 0. -// -// Recommended setting: 0, only set to 1 if you use a really old compiler -#define wxUSE_IOSTREAMH 0 - - // ---------------------------------------------------------------------------- // non GUI features selection // ---------------------------------------------------------------------------- diff --git a/include/wx/univ/setup0.h b/include/wx/univ/setup0.h index 0ebca727fd..c48db8d762 100644 --- a/include/wx/univ/setup0.h +++ b/include/wx/univ/setup0.h @@ -391,18 +391,6 @@ // wxWidgets. #define wxUSE_STD_STRING_CONV_IN_WXSTRING wxUSE_STL -// VC++ 4.2 and above allows and but you can't mix -// them. Set this option to 1 to use , 0 to use . -// -// Note that newer compilers (including VC++ 7.1 and later) don't support -// wxUSE_IOSTREAMH == 1 and so will be used anyhow. -// -// Default is 0. -// -// Recommended setting: 0, only set to 1 if you use a really old compiler -#define wxUSE_IOSTREAMH 0 - - // ---------------------------------------------------------------------------- // non GUI features selection // ---------------------------------------------------------------------------- diff --git a/samples/typetest/typetest.cpp b/samples/typetest/typetest.cpp index 63d3a87eed..69d7433e45 100644 --- a/samples/typetest/typetest.cpp +++ b/samples/typetest/typetest.cpp @@ -34,11 +34,7 @@ #include "wx/ioswrap.h" -#if wxUSE_IOSTREAMH - #include -#else - #include -#endif +#include #include "wx/wfstream.h" #include "wx/datstrm.h" diff --git a/setup.h.in b/setup.h.in index b33699b9c9..fad308dc54 100644 --- a/setup.h.in +++ b/setup.h.in @@ -222,9 +222,6 @@ #define wxUSE_STD_STRING_CONV_IN_WXSTRING wxUSE_STL -#define wxUSE_IOSTREAMH 0 - - #define wxUSE_LONGLONG 0 diff --git a/src/common/docview.cpp b/src/common/docview.cpp index 241fa2cf42..a42517465c 100644 --- a/src/common/docview.cpp +++ b/src/common/docview.cpp @@ -63,13 +63,9 @@ #include "wx/except.h" #if wxUSE_STD_IOSTREAM - #include "wx/ioswrap.h" #include "wx/beforestd.h" - #if wxUSE_IOSTREAMH - #include - #else - #include - #endif + #include + #include #include "wx/afterstd.h" #else #include "wx/wfstream.h" diff --git a/src/common/variant.cpp b/src/common/variant.cpp index e30516a1f2..0098b9a90e 100644 --- a/src/common/variant.cpp +++ b/src/common/variant.cpp @@ -29,11 +29,7 @@ #endif #if wxUSE_STD_IOSTREAM - #if wxUSE_IOSTREAMH - #include - #else - #include - #endif + #include #endif #if wxUSE_STREAMS diff --git a/src/osx/cocoa/textctrl.mm b/src/osx/cocoa/textctrl.mm index 27581dae19..c27e2eaf81 100644 --- a/src/osx/cocoa/textctrl.mm +++ b/src/osx/cocoa/textctrl.mm @@ -34,11 +34,7 @@ #endif #if wxUSE_STD_IOSTREAM - #if wxUSE_IOSTREAMH - #include - #else - #include - #endif + #include #endif #include "wx/filefn.h" diff --git a/src/osx/iphone/textctrl.mm b/src/osx/iphone/textctrl.mm index c3cfe7d596..190afe6a06 100644 --- a/src/osx/iphone/textctrl.mm +++ b/src/osx/iphone/textctrl.mm @@ -34,11 +34,7 @@ #endif #if wxUSE_STD_IOSTREAM - #if wxUSE_IOSTREAMH - #include - #else - #include - #endif + #include #endif #include "wx/filefn.h" diff --git a/src/osx/textctrl_osx.cpp b/src/osx/textctrl_osx.cpp index c00e462ae4..8fd8201d26 100644 --- a/src/osx/textctrl_osx.cpp +++ b/src/osx/textctrl_osx.cpp @@ -34,11 +34,7 @@ #endif #if wxUSE_STD_IOSTREAM - #if wxUSE_IOSTREAMH - #include - #else - #include - #endif + #include #endif #include "wx/filefn.h" diff --git a/src/osx/textentry_osx.cpp b/src/osx/textentry_osx.cpp index 54421bb598..f0b58ab524 100644 --- a/src/osx/textentry_osx.cpp +++ b/src/osx/textentry_osx.cpp @@ -34,11 +34,7 @@ #endif #if wxUSE_STD_IOSTREAM - #if wxUSE_IOSTREAMH - #include - #else - #include - #endif + #include #endif #include "wx/filefn.h"