Remove obsolete wxUSE_IOSTREAMH option

This is always 0 for any still supported compiler, so remove the option
and configure checks for it.

Still define it as 0 for compatibility, just in case it's used outside
of the library.
This commit is contained in:
Vadim Zeitlin 2019-10-21 20:46:21 +02:00
parent 416fc8582d
commit fc711f869f
24 changed files with 18 additions and 245 deletions

View File

@ -184,30 +184,6 @@ dnl ===========================================================================
dnl C++ features test
dnl ===========================================================================
dnl ---------------------------------------------------------------------------
dnl WX_CPP_NEW_HEADERS checks whether the compiler has "new" <iostream> header
dnl or only the old <iostream.h> one - it may be generally assumed that if
dnl <iostream> 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],

View File

@ -222,9 +222,6 @@
#define wxUSE_STD_STRING_CONV_IN_WXSTRING wxUSE_STL
#cmakedefine01 wxUSE_IOSTREAMH
#cmakedefine01 wxUSE_LONGLONG

38
configure vendored
View File

@ -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'

View File

@ -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++)

View File

@ -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.}

View File

@ -391,18 +391,6 @@
// wxWidgets.
#define wxUSE_STD_STRING_CONV_IN_WXSTRING wxUSE_STL
// VC++ 4.2 and above allows <iostream> and <iostream.h> but you can't mix
// them. Set this option to 1 to use <iostream.h>, 0 to use <iostream>.
//
// Note that newer compilers (including VC++ 7.1 and later) don't support
// wxUSE_IOSTREAMH == 1 and so <iostream> 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
// ----------------------------------------------------------------------------

View File

@ -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 <iostream> code. */
#if !wxUSE_IOSTREAMH && defined(__WXDEBUG__)
#if defined(__WXDEBUG__)
# undef wxUSE_DEBUG_NEW_ALWAYS
# define wxUSE_DEBUG_NEW_ALWAYS 0
#endif

View File

@ -392,18 +392,6 @@
// wxWidgets.
#define wxUSE_STD_STRING_CONV_IN_WXSTRING wxUSE_STL
// VC++ 4.2 and above allows <iostream> and <iostream.h> but you can't mix
// them. Set this option to 1 to use <iostream.h>, 0 to use <iostream>.
//
// Note that newer compilers (including VC++ 7.1 and later) don't support
// wxUSE_IOSTREAMH == 1 and so <iostream> 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
// ----------------------------------------------------------------------------

View File

@ -1,6 +1,6 @@
///////////////////////////////////////////////////////////////////////////////
// Name: wx/iosfwrap.h
// Purpose: includes the correct stream-related forward declarations
// Purpose: This file is obsolete, include <iosfwd> directly instead
// Author: Jan van Dijk <jan@etpmod.phys.tue.nl>
// 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 <iostream.h>
#else
# include <iosfwd>
#endif
#include <iosfwd>
#ifdef __WINDOWS__
# include "wx/msw/winundef.h"

View File

@ -1,6 +1,6 @@
///////////////////////////////////////////////////////////////////////////////
// Name: wx/ioswrap.h
// Purpose: includes the correct iostream headers for current compiler
// Purpose: This file is obsolete, include <iostream> directly instead.
// Author: Vadim Zeitlin
// Modified by:
// Created: 03.02.99
@ -12,11 +12,7 @@
#include "wx/beforestd.h"
#if wxUSE_IOSTREAMH
# include <iostream.h>
#else
# include <iostream>
#endif
#include <iostream>
#include "wx/afterstd.h"

View File

@ -392,18 +392,6 @@
// wxWidgets.
#define wxUSE_STD_STRING_CONV_IN_WXSTRING wxUSE_STL
// VC++ 4.2 and above allows <iostream> and <iostream.h> but you can't mix
// them. Set this option to 1 to use <iostream.h>, 0 to use <iostream>.
//
// Note that newer compilers (including VC++ 7.1 and later) don't support
// wxUSE_IOSTREAMH == 1 and so <iostream> 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
// ----------------------------------------------------------------------------

View File

@ -392,18 +392,6 @@
// wxWidgets.
#define wxUSE_STD_STRING_CONV_IN_WXSTRING wxUSE_STL
// VC++ 4.2 and above allows <iostream> and <iostream.h> but you can't mix
// them. Set this option to 1 to use <iostream.h>, 0 to use <iostream>.
//
// Note that newer compilers (including VC++ 7.1 and later) don't support
// wxUSE_IOSTREAMH == 1 and so <iostream> 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
// ----------------------------------------------------------------------------

View File

@ -398,18 +398,6 @@
// wxWidgets.
#define wxUSE_STD_STRING_CONV_IN_WXSTRING wxUSE_STL
// VC++ 4.2 and above allows <iostream> and <iostream.h> but you can't mix
// them. Set this option to 1 to use <iostream.h>, 0 to use <iostream>.
//
// Note that newer compilers (including VC++ 7.1 and later) don't support
// wxUSE_IOSTREAMH == 1 and so <iostream> 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
// ----------------------------------------------------------------------------

View File

@ -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 <iostream> 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 <iostream.h>) declare classes in the global namespace
while the new, standard ones (like <iostream>) 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???)

View File

@ -388,18 +388,6 @@
// wxWidgets.
#define wxUSE_STD_STRING_CONV_IN_WXSTRING wxUSE_STL
// VC++ 4.2 and above allows <iostream> and <iostream.h> but you can't mix
// them. Set this option to 1 to use <iostream.h>, 0 to use <iostream>.
//
// Note that newer compilers (including VC++ 7.1 and later) don't support
// wxUSE_IOSTREAMH == 1 and so <iostream> 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
// ----------------------------------------------------------------------------

View File

@ -391,18 +391,6 @@
// wxWidgets.
#define wxUSE_STD_STRING_CONV_IN_WXSTRING wxUSE_STL
// VC++ 4.2 and above allows <iostream> and <iostream.h> but you can't mix
// them. Set this option to 1 to use <iostream.h>, 0 to use <iostream>.
//
// Note that newer compilers (including VC++ 7.1 and later) don't support
// wxUSE_IOSTREAMH == 1 and so <iostream> 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
// ----------------------------------------------------------------------------

View File

@ -34,11 +34,7 @@
#include "wx/ioswrap.h"
#if wxUSE_IOSTREAMH
#include <fstream.h>
#else
#include <fstream>
#endif
#include <fstream>
#include "wx/wfstream.h"
#include "wx/datstrm.h"

View File

@ -222,9 +222,6 @@
#define wxUSE_STD_STRING_CONV_IN_WXSTRING wxUSE_STL
#define wxUSE_IOSTREAMH 0
#define wxUSE_LONGLONG 0

View File

@ -63,13 +63,9 @@
#include "wx/except.h"
#if wxUSE_STD_IOSTREAM
#include "wx/ioswrap.h"
#include "wx/beforestd.h"
#if wxUSE_IOSTREAMH
#include <fstream.h>
#else
#include <fstream>
#endif
#include <fstream>
#include <iostream>
#include "wx/afterstd.h"
#else
#include "wx/wfstream.h"

View File

@ -29,11 +29,7 @@
#endif
#if wxUSE_STD_IOSTREAM
#if wxUSE_IOSTREAMH
#include <fstream.h>
#else
#include <fstream>
#endif
#include <fstream>
#endif
#if wxUSE_STREAMS

View File

@ -34,11 +34,7 @@
#endif
#if wxUSE_STD_IOSTREAM
#if wxUSE_IOSTREAMH
#include <fstream.h>
#else
#include <fstream>
#endif
#include <fstream>
#endif
#include "wx/filefn.h"

View File

@ -34,11 +34,7 @@
#endif
#if wxUSE_STD_IOSTREAM
#if wxUSE_IOSTREAMH
#include <fstream.h>
#else
#include <fstream>
#endif
#include <fstream>
#endif
#include "wx/filefn.h"

View File

@ -34,11 +34,7 @@
#endif
#if wxUSE_STD_IOSTREAM
#if wxUSE_IOSTREAMH
#include <fstream.h>
#else
#include <fstream>
#endif
#include <fstream>
#endif
#include "wx/filefn.h"

View File

@ -34,11 +34,7 @@
#endif
#if wxUSE_STD_IOSTREAM
#if wxUSE_IOSTREAMH
#include <fstream.h>
#else
#include <fstream>
#endif
#include <fstream>
#endif
#include "wx/filefn.h"