Commit 9a56333e by Benjamin Kosnik Committed by Benjamin Kosnik

re PR libstdc++/7230 (<strstream> header file is missing (trunk))


2002-07-24  Benjamin Kosnik  <bkoz@redhat.com>

	PR libstdc++/7230
	* config/linker-map.gnu: Revert strstream patch from 2002-07-01.
	* include/Makefile.am (backward_headers): Use strstream, not
	strstream.h.
	* include/Makefile.in: Regenerate.
	* include/backward/strstream: Revert.
	* include/backward/strstream.h: Remove.
	* src/strstream.cc: Revert.
	* testsuite/backward/strstream_members.cc: Change include.

From-SVN: r55730
parent 8d1b7ba1
2002-07-24 Benjamin Kosnik <bkoz@redhat.com> 2002-07-24 Benjamin Kosnik <bkoz@redhat.com>
PR libstdc++/7230
* config/linker-map.gnu: Revert strstream patch from 2002-07-01.
* include/Makefile.am (backward_headers): Use strstream, not
strstream.h.
* include/Makefile.in: Regenerate.
* include/backward/strstream: Revert.
* include/backward/strstream.h: Remove.
* src/strstream.cc: Revert.
* testsuite/backward/strstream_members.cc: Change include.
2002-07-24 Benjamin Kosnik <bkoz@redhat.com>
PR libstdc++/7219 PR libstdc++/7219
* testsuite/27_io/ios_base_type.cc: New.
* include/bits/ios_base.h (ios_base::streampos): Add. * include/bits/ios_base.h (ios_base::streampos): Add.
(ios_base::streamoff): Add. (ios_base::streamoff): Add.
* testsuite/27_io/ios_base_type.cc: New.
2002-07-24 Benjamin Kosnik <bkoz@redhat.com> 2002-07-24 Benjamin Kosnik <bkoz@redhat.com>
PR libstdc++/7286 PR libstdc++/7286
......
dnl aclocal.m4 generated automatically by aclocal 1.4 dnl aclocal.m4 generated automatically by aclocal 1.4-p5
dnl Copyright (C) 1994, 1995-8, 1999 Free Software Foundation, Inc. dnl Copyright (C) 1994, 1995-8, 1999, 2001 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it, dnl gives unlimited permission to copy and/or distribute it,
dnl with or without modifications, as long as this notice is preserved. dnl with or without modifications, as long as this notice is preserved.
...@@ -2201,12 +2201,37 @@ AC_MSG_RESULT($enable_symvers) ...@@ -2201,12 +2201,37 @@ AC_MSG_RESULT($enable_symvers)
]) ])
# isc-posix.m4 serial 1 (gettext-0.10.40)
dnl Copyright (C) 1995-2002 Free Software Foundation, Inc.
dnl This file is free software, distributed under the terms of the GNU
dnl General Public License. As a special exception to the GNU General
dnl Public License, this file may be distributed as part of a program
dnl that contains a configuration script generated by Autoconf, under
dnl the same distribution terms as the rest of that program.
# This test replaces the one in autoconf.
# Currently this macro should have the same name as the autoconf macro
# because gettext's gettext.m4 (distributed in the automake package)
# still uses it. Otherwise, the use in gettext.m4 makes autoheader
# give these diagnostics:
# configure.in:556: AC_TRY_COMPILE was called before AC_ISC_POSIX
# configure.in:556: AC_TRY_RUN was called before AC_ISC_POSIX
undefine([AC_ISC_POSIX])
AC_DEFUN([AC_ISC_POSIX],
[
dnl This test replaces the obsolescent AC_ISC_POSIX kludge.
AC_CHECK_LIB(cposix, strerror, [LIBS="$LIBS -lcposix"])
]
)
# Add --enable-maintainer-mode option to configure. # Add --enable-maintainer-mode option to configure.
# From Jim Meyering # From Jim Meyering
# serial 1 # serial 1
AC_DEFUN(AM_MAINTAINER_MODE, AC_DEFUN([AM_MAINTAINER_MODE],
[AC_MSG_CHECKING([whether to enable maintainer-specific portions of Makefiles]) [AC_MSG_CHECKING([whether to enable maintainer-specific portions of Makefiles])
dnl maintainer-mode is disabled by default dnl maintainer-mode is disabled by default
AC_ARG_ENABLE(maintainer-mode, AC_ARG_ENABLE(maintainer-mode,
...@@ -2223,7 +2248,7 @@ AC_DEFUN(AM_MAINTAINER_MODE, ...@@ -2223,7 +2248,7 @@ AC_DEFUN(AM_MAINTAINER_MODE,
# Define a conditional. # Define a conditional.
AC_DEFUN(AM_CONDITIONAL, AC_DEFUN([AM_CONDITIONAL],
[AC_SUBST($1_TRUE) [AC_SUBST($1_TRUE)
AC_SUBST($1_FALSE) AC_SUBST($1_FALSE)
if $2; then if $2; then
...@@ -2243,7 +2268,7 @@ fi]) ...@@ -2243,7 +2268,7 @@ fi])
dnl Usage: dnl Usage:
dnl AM_INIT_AUTOMAKE(package,version, [no-define]) dnl AM_INIT_AUTOMAKE(package,version, [no-define])
AC_DEFUN(AM_INIT_AUTOMAKE, AC_DEFUN([AM_INIT_AUTOMAKE],
[AC_REQUIRE([AC_PROG_INSTALL]) [AC_REQUIRE([AC_PROG_INSTALL])
PACKAGE=[$1] PACKAGE=[$1]
AC_SUBST(PACKAGE) AC_SUBST(PACKAGE)
...@@ -2271,7 +2296,7 @@ AC_REQUIRE([AC_PROG_MAKE_SET])]) ...@@ -2271,7 +2296,7 @@ AC_REQUIRE([AC_PROG_MAKE_SET])])
# Check to make sure that the build environment is sane. # Check to make sure that the build environment is sane.
# #
AC_DEFUN(AM_SANITY_CHECK, AC_DEFUN([AM_SANITY_CHECK],
[AC_MSG_CHECKING([whether build environment is sane]) [AC_MSG_CHECKING([whether build environment is sane])
# Just in case # Just in case
sleep 1 sleep 1
...@@ -2312,7 +2337,7 @@ AC_MSG_RESULT(yes)]) ...@@ -2312,7 +2337,7 @@ AC_MSG_RESULT(yes)])
dnl AM_MISSING_PROG(NAME, PROGRAM, DIRECTORY) dnl AM_MISSING_PROG(NAME, PROGRAM, DIRECTORY)
dnl The program must properly implement --version. dnl The program must properly implement --version.
AC_DEFUN(AM_MISSING_PROG, AC_DEFUN([AM_MISSING_PROG],
[AC_MSG_CHECKING(for working $2) [AC_MSG_CHECKING(for working $2)
# Run test in a subshell; some versions of sh will print an error if # Run test in a subshell; some versions of sh will print an error if
# an executable is not found, even if stderr is redirected. # an executable is not found, even if stderr is redirected.
...@@ -2328,7 +2353,7 @@ AC_SUBST($1)]) ...@@ -2328,7 +2353,7 @@ AC_SUBST($1)])
# Like AC_CONFIG_HEADER, but automatically create stamp file. # Like AC_CONFIG_HEADER, but automatically create stamp file.
AC_DEFUN(AM_CONFIG_HEADER, AC_DEFUN([AM_CONFIG_HEADER],
[AC_PREREQ([2.12]) [AC_PREREQ([2.12])
AC_CONFIG_HEADER([$1]) AC_CONFIG_HEADER([$1])
dnl When config.status generates a header, we must update the stamp-h file. dnl When config.status generates a header, we must update the stamp-h file.
......
...@@ -38,11 +38,7 @@ GLIBCPP_3.1 { ...@@ -38,11 +38,7 @@ GLIBCPP_3.1 {
std::_S_bit_count; std::_S_bit_count;
std::_S_first_one; std::_S_first_one;
std::__default_alloc_template*; std::__default_alloc_template*;
std::__malloc_alloc_template*; std::__malloc_alloc_template*
strstreambuf::*;
istrstream::*;
ostrstream::*;
strstream::*
}; };
# Names not in an 'extern' block are mangled names. # Names not in an 'extern' block are mangled names.
......
This source diff could not be displayed because it is too large. You can view the blob instead.
...@@ -137,7 +137,7 @@ backward_headers = \ ...@@ -137,7 +137,7 @@ backward_headers = \
${backward_srcdir}/tree.h \ ${backward_srcdir}/tree.h \
${backward_srcdir}/vector.h \ ${backward_srcdir}/vector.h \
${backward_srcdir}/fstream.h \ ${backward_srcdir}/fstream.h \
${backward_srcdir}/strstream.h \ ${backward_srcdir}/strstream \
${backward_srcdir}/backward_warning.h ${backward_srcdir}/backward_warning.h
ext_srcdir = ${glibcpp_srcdir}/include/ext ext_srcdir = ${glibcpp_srcdir}/include/ext
......
// Backward-compat support -*- C++ -*- // Backward-compat support -*- C++ -*-
// Copyright (C) 2000, 2001, 2002 Free Software Foundation, Inc. // Copyright (C) 2001, 2002 Free Software Foundation, Inc.
// //
// This file is part of the GNU ISO C++ Library. This library is free // This file is part of the GNU ISO C++ Library. This library is free
// software; you can redistribute it and/or modify it under the // software; you can redistribute it and/or modify it under the
...@@ -45,8 +45,8 @@ ...@@ -45,8 +45,8 @@
// MAY BE REMOVED in a future standard revision. You should use the // MAY BE REMOVED in a future standard revision. You should use the
// header <sstream> instead. // header <sstream> instead.
#ifndef _CPP_BACKWARD_STRSTREAM_H #ifndef __SGI_STL_STRSTREAM
#define _CPP_BACKWARD_STRSTREAM_H 1 #define __SGI_STL_STRSTREAM
#include "backward_warning.h" #include "backward_warning.h"
#include <iosfwd> #include <iosfwd>
...@@ -55,120 +55,120 @@ ...@@ -55,120 +55,120 @@
#include <ostream> #include <ostream>
#include <string> #include <string>
// Class strstreambuf, a streambuf class that manages an array of char. namespace std
// Note that this class is not a template.
class strstreambuf : public std::basic_streambuf<char>
{ {
public: // Class strstreambuf, a streambuf class that manages an array of char.
// Types. // Note that this class is not a template.
typedef std::char_traits<char> _Traits; class strstreambuf : public basic_streambuf<char, char_traits<char> >
typedef std::basic_streambuf<char, _Traits> _Base; {
public:
public: // Types.
// Constructor, destructor typedef char_traits<char> _Traits;
explicit strstreambuf(std::streamsize __initial_capacity = 0); typedef basic_streambuf<char, _Traits> _Base;
strstreambuf(void* (*__alloc)(size_t), void (*__free)(void*));
public:
strstreambuf(char* __get, std::streamsize __n, char* __put = 0); // Constructor, destructor
strstreambuf(signed char* __get, std::streamsize __n, explicit strstreambuf(streamsize __initial_capacity = 0);
signed char* __put = 0); strstreambuf(void* (*__alloc)(size_t), void (*__free)(void*));
strstreambuf(unsigned char* __get, std::streamsize __n,
unsigned char* __put=0); strstreambuf(char* __get, streamsize __n, char* __put = 0);
strstreambuf(signed char* __get, streamsize __n, signed char* __put = 0);
strstreambuf(const char* __get, std::streamsize __n); strstreambuf(unsigned char* __get, streamsize __n, unsigned char* __put=0);
strstreambuf(const signed char* __get, std::streamsize __n);
strstreambuf(const unsigned char* __get, std::streamsize __n); strstreambuf(const char* __get, streamsize __n);
strstreambuf(const signed char* __get, streamsize __n);
virtual ~strstreambuf(); strstreambuf(const unsigned char* __get, streamsize __n);
public: virtual ~strstreambuf();
void freeze(bool = true);
char* str(); public:
int pcount() const; void freeze(bool = true);
char* str();
protected: int pcount() const;
virtual int_type overflow(int_type __c = _Traits::eof());
virtual int_type pbackfail(int_type __c = _Traits::eof()); protected:
virtual int_type underflow(); virtual int_type overflow(int_type __c = _Traits::eof());
virtual _Base* setbuf(char* __buf, std::streamsize __n); virtual int_type pbackfail(int_type __c = _Traits::eof());
virtual pos_type seekoff(off_type __off, std::ios_base::seekdir __dir, virtual int_type underflow();
std::ios_base::openmode __mode virtual _Base* setbuf(char* __buf, streamsize __n);
= std::ios_base::in | std::ios_base::out); virtual pos_type seekoff(off_type __off, ios_base::seekdir __dir,
virtual pos_type seekpos(pos_type __pos, std::ios_base::openmode __mode ios_base::openmode __mode
= std::ios_base::in | std::ios_base::out); = ios_base::in | ios_base::out);
virtual pos_type seekpos(pos_type __pos, ios_base::openmode __mode
private: = ios_base::in | ios_base::out);
// Dynamic allocation, possibly using _M_alloc_fun and _M_free_fun.
char* _M_alloc(size_t); private:
void _M_free(char*); // Dynamic allocation, possibly using _M_alloc_fun and _M_free_fun.
char* _M_alloc(size_t);
// Helper function used in constructors. void _M_free(char*);
void _M_setup(char* __get, char* __put, std::streamsize __n);
// Helper function used in constructors.
private: void _M_setup(char* __get, char* __put, streamsize __n);
// Data members.
void* (*_M_alloc_fun)(size_t); private:
void (*_M_free_fun)(void*); // Data members.
void* (*_M_alloc_fun)(size_t);
bool _M_dynamic : 1; void (*_M_free_fun)(void*);
bool _M_frozen : 1;
bool _M_constant : 1; bool _M_dynamic : 1;
}; bool _M_frozen : 1;
bool _M_constant : 1;
// Class istrstream, an istream that manages a strstreambuf. };
class istrstream : public std::basic_istream<char>
{ // Class istrstream, an istream that manages a strstreambuf.
public: class istrstream : public basic_istream<char>
explicit istrstream(char*); {
explicit istrstream(const char*); public:
istrstream(char* , std::streamsize); explicit istrstream(char*);
istrstream(const char*, std::streamsize); explicit istrstream(const char*);
virtual ~istrstream(); istrstream(char* , streamsize);
istrstream(const char*, streamsize);
strstreambuf* rdbuf() const; virtual ~istrstream();
char* str();
strstreambuf* rdbuf() const;
private: char* str();
strstreambuf _M_buf;
}; private:
strstreambuf _M_buf;
// Class ostrstream };
class ostrstream : public std::basic_ostream<char>
{ // Class ostrstream
public: class ostrstream : public basic_ostream<char>
ostrstream(); {
ostrstream(char*, int, std::ios_base::openmode = std::ios_base::out); public:
virtual ~ostrstream(); ostrstream();
ostrstream(char*, int, ios_base::openmode = ios_base::out);
strstreambuf* rdbuf() const; virtual ~ostrstream();
void freeze(bool = true);
char* str(); strstreambuf* rdbuf() const;
int pcount() const; void freeze(bool = true);
char* str();
private: int pcount() const;
strstreambuf _M_buf;
}; private:
strstreambuf _M_buf;
// Class strstream };
class strstream : public std::basic_iostream<char>
{ // Class strstream
public: class strstream : public basic_iostream<char>
typedef char char_type; {
typedef std::char_traits<char>::int_type int_type; public:
typedef std::char_traits<char>::pos_type pos_type; typedef char char_type;
typedef std::char_traits<char>::off_type off_type; typedef char_traits<char>::int_type int_type;
typedef char_traits<char>::pos_type pos_type;
strstream(); typedef char_traits<char>::off_type off_type;
strstream(char*, int,
std::ios_base::openmode = std::ios_base::in | std::ios_base::out); strstream();
virtual ~strstream(); strstream(char*, int, ios_base::openmode = ios_base::in | ios_base::out);
virtual ~strstream();
strstreambuf* rdbuf() const;
void freeze(bool = true); strstreambuf* rdbuf() const;
int pcount() const; void freeze(bool = true);
char* str(); int pcount() const;
char* str();
private:
strstreambuf _M_buf; private:
}; strstreambuf _M_buf;
};
} // namespace std
#endif #endif
...@@ -18,14 +18,14 @@ ...@@ -18,14 +18,14 @@
// backward strstream members // backward strstream members
#include <strstream.h> #include <strstream>
#include <testsuite_hooks.h> #include <testsuite_hooks.h>
// { dg-options "-Wno-deprecated" } // { dg-options "-Wno-deprecated" }
int test01() int test01()
{ {
strstream s; std::strstream s;
for (unsigned i=0 ; i!= 1000 ; ++i) for (unsigned i=0 ; i!= 1000 ; ++i)
s << i << std::endl; s << i << std::endl;
s << std::ends; s << std::ends;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment