Blame SOURCES/gcc34-pr21955.patch

6fdc0f
2005-07-22  Jakub Jelinek  <jakub@redhat.com>
6fdc0f
6fdc0f
	* src/sstream-inst.cc: Add .hidden directive for
6fdc0f
	streamsize basic_stringbuf<{char,wchar_t}>::showmanyc().
6fdc0f
	* src/sstream-inst-showmanyc.cc: New file.
6fdc0f
	* src/Makefile.am (libstdc++_nonshared.la): Add new library.
6fdc0f
	* src/Makefile.in: Rebuilt.
6fdc0f
	* testsuite/lib/libstdc++.exp: Append -lstdc++_nonshared for
6fdc0f
	testsuite executable linking.
6fdc0f
6fdc0f
2005-06-08  Benjamin Kosnik  <bkoz@redhat.com>
6fdc0f
6fdc0f
	PR libstdc++/21955
6fdc0f
	* include/std/std_sstream.h (basic_stringbuf::showmanyc): Add.
6fdc0f
	* testsuite/27_io/basic_streambuf/in_avail/char/1.cc: New, test
6fdc0f
	base class behavior.
6fdc0f
	* testsuite/27_io/basic_streambuf/in_avail/wchar_t/1.cc: Same.
6fdc0f
	* testsuite/27_io/basic_stringbuf/in_avail/char/21955.cc: New.
6fdc0f
	* testsuite/27_io/basic_stringbuf/in_avail/char/1.cc: Match
6fdc0f
	filebuf behavior.
6fdc0f
	* testsuite/27_io/basic_stringbuf/str/char/1.cc: Same.
6fdc0f
6fdc0f
--- libstdc++-v3/src/sstream-inst.cc.jj	2003-07-11 10:28:13.000000000 +0200
6fdc0f
+++ libstdc++-v3/src/sstream-inst.cc	2005-07-21 17:46:08.000000000 +0200
6fdc0f
@@ -60,3 +60,8 @@ namespace std
6fdc0f
   template class basic_stringstream<wchar_t>; 
6fdc0f
 #endif
6fdc0f
 } // namespace std
6fdc0f
+
6fdc0f
+#ifdef PIC
6fdc0f
+__asm (".hidden _ZNSt15basic_stringbufIcSt11char_traitsIcESaIcEE9showmanycEv");
6fdc0f
+__asm (".hidden _ZNSt15basic_stringbufIwSt11char_traitsIwESaIwEE9showmanycEv");
6fdc0f
+#endif
6fdc0f
--- libstdc++-v3/src/sstream-inst-showmanyc.cc.jj	2005-07-21 21:27:40.000000000 +0200
6fdc0f
+++ libstdc++-v3/src/sstream-inst-showmanyc.cc	2005-07-22 09:16:58.000000000 +0200
6fdc0f
@@ -0,0 +1,39 @@
6fdc0f
+// Explicit instantiation file.
6fdc0f
+
6fdc0f
+// Copyright (C) 2005
6fdc0f
+// Free Software Foundation, Inc.
6fdc0f
+//
6fdc0f
+// This file is part of the GNU ISO C++ Library.  This library is free
6fdc0f
+// software; you can redistribute it and/or modify it under the
6fdc0f
+// terms of the GNU General Public License as published by the
6fdc0f
+// Free Software Foundation; either version 2, or (at your option)
6fdc0f
+// any later version.
6fdc0f
+
6fdc0f
+// This library is distributed in the hope that it will be useful,
6fdc0f
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
6fdc0f
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
6fdc0f
+// GNU General Public License for more details.
6fdc0f
+
6fdc0f
+// You should have received a copy of the GNU General Public License along
6fdc0f
+// with this library; see the file COPYING.  If not, write to the Free
6fdc0f
+// Software Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307,
6fdc0f
+// USA.
6fdc0f
+
6fdc0f
+// As a special exception, you may use this file as part of a free software
6fdc0f
+// library without restriction.  Specifically, if other files instantiate
6fdc0f
+// templates or use macros or inline functions from this file, or you compile
6fdc0f
+// this file and link it with other files to produce an executable, this
6fdc0f
+// file does not by itself cause the resulting executable to be covered by
6fdc0f
+// the GNU General Public License.  This exception does not however
6fdc0f
+// invalidate any other reasons why the executable file might be covered by
6fdc0f
+// the GNU General Public License.
6fdc0f
+
6fdc0f
+#include <sstream>
6fdc0f
+
6fdc0f
+namespace std
6fdc0f
+{
6fdc0f
+  // These symbols are hidden in libstdc++.so, as it is undesirable to export
6fdc0f
+  // @@GLIBCXX_3.4.6
6fdc0f
+  template streamsize basic_stringbuf<char, char_traits<char>, allocator<char> >::showmanyc();
6fdc0f
+  template streamsize basic_stringbuf<wchar_t, char_traits<wchar_t>, allocator<wchar_t> >::showmanyc();
6fdc0f
+} // namespace std
6fdc0f
--- libstdc++-v3/src/Makefile.am.jj	2004-04-20 15:55:47.000000000 +0200
6fdc0f
+++ libstdc++-v3/src/Makefile.am	2005-07-22 09:00:32.000000000 +0200
6fdc0f
@@ -25,7 +25,7 @@
6fdc0f
 include $(top_srcdir)/fragment.am
6fdc0f
 
6fdc0f
 # Cross compiler support.
6fdc0f
-toolexeclib_LTLIBRARIES = libstdc++.la
6fdc0f
+toolexeclib_LTLIBRARIES = libstdc++.la libstdc++_nonshared.la
6fdc0f
 
6fdc0f
 # Symbol versioning for shared libraries.
6fdc0f
 if GLIBCXX_BUILD_VERSIONED_SHLIB
6fdc0f
@@ -150,6 +150,11 @@ libstdc___la_DEPENDENCIES = ${version_de
6fdc0f
 libstdc___la_LDFLAGS = \
6fdc0f
 	-version-info $(libtool_VERSION) ${version_arg} -lm 
6fdc0f
 
6fdc0f
+libstdc___nonshared_la_SOURCES = \
6fdc0f
+	sstream-inst-showmanyc.cc
6fdc0f
+libstdc___nonshared_la_LIBADD =
6fdc0f
+libstdc___nonshared_la_DEPENDENCIES = $(libstdc___nonshared_la_LIBADD)
6fdc0f
+libstdc___nonshared_la_LDFLAGS = -static
6fdc0f
 
6fdc0f
 # Use special rules for the deprecated source files so that they find
6fdc0f
 # deprecated include files.
6fdc0f
@@ -159,6 +164,14 @@ strstream.lo: strstream.cc
6fdc0f
 strstream.o: strstream.cc
6fdc0f
 	$(CXXCOMPILE) -I$(GLIBCXX_INCLUDE_DIR)/backward -Wno-deprecated -c $<
6fdc0f
 
6fdc0f
+# Use special rules for libstdc++_nonshared.la files, as -prefer-pic
6fdc0f
+# doesn't seem to work for some reason.
6fdc0f
+sstream-inst-showmanyc.lo: sstream-inst-showmanyc.cc
6fdc0f
+	$(LTCXXCOMPILE) -c $< \
6fdc0f
+	  && cp -f .libs/sstream-inst-showmanyc.o sstream-inst-showmanyc.o
6fdc0f
+sstream-inst-showmanyc.o: sstream-inst-showmanyc.cc
6fdc0f
+	$(CXXCOMPILE) -fPIC -DPIC -c $<
6fdc0f
+
6fdc0f
 # Use special rules for the concept-checking instantiations so that all
6fdc0f
 # the generated template functions are also instantiated.  Force the checks
6fdc0f
 # to be on so that the instantiations are actually seen.
6fdc0f
--- libstdc++-v3/src/Makefile.in.jj	2004-04-20 15:55:47.000000000 +0200
6fdc0f
+++ libstdc++-v3/src/Makefile.in	2005-07-22 09:06:15.000000000 +0200
6fdc0f
@@ -221,7 +221,7 @@ WARN_CXXFLAGS = \
6fdc0f
 AM_CPPFLAGS = $(GLIBCXX_INCLUDES)
6fdc0f
 
6fdc0f
 # Cross compiler support.
6fdc0f
-toolexeclib_LTLIBRARIES = libstdc++.la
6fdc0f
+toolexeclib_LTLIBRARIES = libstdc++.la libstdc++_nonshared.la
6fdc0f
 
6fdc0f
 # Symbol versioning for shared libraries.
6fdc0f
 @GLIBCXX_BUILD_VERSIONED_SHLIB_TRUE@version_arg = -Wl,--version-script=libstdc++-symbol.ver
6fdc0f
@@ -308,6 +308,13 @@ libstdc___la_LDFLAGS = \
6fdc0f
 	-version-info $(libtool_VERSION) ${version_arg} -lm 
6fdc0f
 
6fdc0f
 
6fdc0f
+libstdc___nonshared_la_SOURCES = \
6fdc0f
+	sstream-inst-showmanyc.cc
6fdc0f
+
6fdc0f
+libstdc___nonshared_la_LIBADD = 
6fdc0f
+libstdc___nonshared_la_DEPENDENCIES = $(libstdc___nonshared_la_LIBADD)
6fdc0f
+libstdc___nonshared_la_LDFLAGS = -static
6fdc0f
+
6fdc0f
 # Use special rules for the deprecated source files so that they find
6fdc0f
 # deprecated include files.
6fdc0f
 GLIBCXX_INCLUDE_DIR = $(glibcxx_builddir)/include
6fdc0f
@@ -379,6 +386,8 @@ am__objects_3 = allocator.lo codecvt.lo 
6fdc0f
 	$(am__objects_1) $(am__objects_2)
6fdc0f
 am_libstdc___la_OBJECTS = $(am__objects_3)
6fdc0f
 libstdc___la_OBJECTS = $(am_libstdc___la_OBJECTS)
6fdc0f
+am_libstdc___nonshared_la_OBJECTS = sstream-inst-showmanyc.lo
6fdc0f
+libstdc___nonshared_la_OBJECTS = $(am_libstdc___nonshared_la_OBJECTS)
6fdc0f
 
6fdc0f
 DEFAULT_INCLUDES =  -I. -I$(srcdir) -I$(top_builddir)
6fdc0f
 depcomp =
6fdc0f
@@ -386,10 +395,10 @@ am__depfiles_maybe =
6fdc0f
 CXXCOMPILE = $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \
6fdc0f
 	$(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS)
6fdc0f
 CXXLD = $(CXX)
6fdc0f
-DIST_SOURCES = $(libstdc___la_SOURCES)
6fdc0f
+DIST_SOURCES = $(libstdc___la_SOURCES) $(libstdc___nonshared_la_SOURCES)
6fdc0f
 DIST_COMMON = $(srcdir)/Makefile.in $(top_srcdir)/fragment.am \
6fdc0f
 	Makefile.am
6fdc0f
-SOURCES = $(libstdc___la_SOURCES)
6fdc0f
+SOURCES = $(libstdc___la_SOURCES) $(libstdc___nonshared_la_SOURCES)
6fdc0f
 
6fdc0f
 all: all-am
6fdc0f
 
6fdc0f
@@ -430,6 +439,8 @@ clean-toolexeclibLTLIBRARIES:
6fdc0f
 	done
6fdc0f
 libstdc++.la: $(libstdc___la_OBJECTS) $(libstdc___la_DEPENDENCIES) 
6fdc0f
 	$(CXXLINK) -rpath $(toolexeclibdir) $(libstdc___la_LDFLAGS) $(libstdc___la_OBJECTS) $(libstdc___la_LIBADD) $(LIBS)
6fdc0f
+libstdc++_nonshared.la: $(libstdc___nonshared_la_OBJECTS) $(libstdc___nonshared_la_DEPENDENCIES) 
6fdc0f
+	$(CXXLINK) -rpath $(toolexeclibdir) $(libstdc___nonshared_la_LDFLAGS) $(libstdc___nonshared_la_OBJECTS) $(libstdc___nonshared_la_LIBADD) $(LIBS)
6fdc0f
 
6fdc0f
 mostlyclean-compile:
6fdc0f
 	-rm -f *.$(OBJEXT) core *.core
6fdc0f
@@ -674,6 +685,14 @@ strstream.lo: strstream.cc
6fdc0f
 strstream.o: strstream.cc
6fdc0f
 	$(CXXCOMPILE) -I$(GLIBCXX_INCLUDE_DIR)/backward -Wno-deprecated -c $<
6fdc0f
 
6fdc0f
+# Use special rules for libstdc++_nonshared.la files, as -prefer-pic
6fdc0f
+# doesn't seem to work for some reason.
6fdc0f
+sstream-inst-showmanyc.lo: sstream-inst-showmanyc.cc
6fdc0f
+	$(LTCXXCOMPILE) -c $< \
6fdc0f
+	  && cp -f .libs/sstream-inst-showmanyc.o sstream-inst-showmanyc.o
6fdc0f
+sstream-inst-showmanyc.o: sstream-inst-showmanyc.cc
6fdc0f
+	$(CXXCOMPILE) -fPIC -DPIC -c $<
6fdc0f
+
6fdc0f
 # Use special rules for the concept-checking instantiations so that all
6fdc0f
 # the generated template functions are also instantiated.  Force the checks
6fdc0f
 # to be on so that the instantiations are actually seen.
6fdc0f
--- libstdc++-v3/include/std/std_sstream.h.jj	2004-10-04 14:58:25.000000000 +0200
6fdc0f
+++ libstdc++-v3/include/std/std_sstream.h	2005-07-21 17:17:16.000000000 +0200
6fdc0f
@@ -185,6 +185,18 @@ namespace std
6fdc0f
 	_M_sync(const_cast<char_type*>(_M_string.data()), 0, __len);
6fdc0f
       }
6fdc0f
 
6fdc0f
+      virtual streamsize
6fdc0f
+      showmanyc()
6fdc0f
+      {
6fdc0f
+	streamsize __ret = -1;
6fdc0f
+	if (_M_mode & ios_base::in)
6fdc0f
+	  {
6fdc0f
+	    _M_update_egptr();
6fdc0f
+	    __ret = this->egptr() - this->gptr();
6fdc0f
+	  }
6fdc0f
+	return __ret;
6fdc0f
+      }
6fdc0f
+
6fdc0f
       // [documentation is inherited]
6fdc0f
       virtual int_type
6fdc0f
       underflow();
6fdc0f
--- libstdc++-v3/testsuite/27_io/basic_stringbuf/str/char/1.cc.jj	2003-10-01 12:12:11.000000000 +0200
6fdc0f
+++ libstdc++-v3/testsuite/27_io/basic_stringbuf/str/char/1.cc	2005-07-22 01:22:15.000000000 +0200
6fdc0f
@@ -45,7 +45,7 @@ void test03() 
6fdc0f
   std::streamsize d1 = strb_01.in_avail();
6fdc0f
   std::streamsize d2 = strb_03.in_avail();
6fdc0f
   VERIFY( d1 ); // non-zero
6fdc0f
-  VERIFY( !d2 ); // zero, cuz ios_base::out
6fdc0f
+  VERIFY( d2 == -1 ); // -1, cuz ios_base::out
6fdc0f
   VERIFY( d1 != d2 ); //these should be the same
6fdc0f
   VERIFY( static_cast<std::streamsize>(str_01.length()) == d1 );  
6fdc0f
   VERIFY( strb_01.str() == strb_03.str() ); //ditto
6fdc0f
--- libstdc++-v3/testsuite/27_io/basic_stringbuf/in_avail/char/1.cc.jj	2003-10-01 12:12:10.000000000 +0200
6fdc0f
+++ libstdc++-v3/testsuite/27_io/basic_stringbuf/in_avail/char/1.cc	2005-07-22 01:22:04.000000000 +0200
6fdc0f
@@ -49,8 +49,8 @@ void test04() 
6fdc0f
   VERIFY( strmof_1 == static_cast<std::streamoff>(str_01.length()) );
6fdc0f
   VERIFY( strmof_2 == static_cast<std::streamoff>(str_02.length()) );
6fdc0f
   strmof_1 = strb_03.in_avail(); 
6fdc0f
-  // zero cuz write-only, or eof()? zero, from showmany
6fdc0f
-  VERIFY( strmof_1 == 0 ); 
6fdc0f
+  // zero cuz write-only, or eof() to match basic_filebuf
6fdc0f
+  VERIFY( strmof_1 == -1 ); 
6fdc0f
 }
6fdc0f
 
6fdc0f
 int main()
6fdc0f
--- libstdc++-v3/testsuite/27_io/basic_stringbuf/in_avail/char/21955.cc.jj	2005-07-22 01:22:04.000000000 +0200
6fdc0f
+++ libstdc++-v3/testsuite/27_io/basic_stringbuf/in_avail/char/21955.cc	2005-07-22 01:22:04.000000000 +0200
6fdc0f
@@ -0,0 +1,54 @@
6fdc0f
+// 2005-06-07 Benjamin Kosnik
6fdc0f
+
6fdc0f
+// Copyright (C) 2005
6fdc0f
+// Free Software Foundation, Inc.
6fdc0f
+//
6fdc0f
+// This file is part of the GNU ISO C++ Library.  This library is free
6fdc0f
+// software; you can redistribute it and/or modify it under the
6fdc0f
+// terms of the GNU General Public License as published by the
6fdc0f
+// Free Software Foundation; either version 2, or (at your option)
6fdc0f
+// any later version.
6fdc0f
+
6fdc0f
+// This library is distributed in the hope that it will be useful,
6fdc0f
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
6fdc0f
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
6fdc0f
+// GNU General Public License for more details.
6fdc0f
+
6fdc0f
+// You should have received a copy of the GNU General Public License along
6fdc0f
+// with this library; see the file COPYING.  If not, write to the Free
6fdc0f
+// Software Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307,
6fdc0f
+// USA.
6fdc0f
+
6fdc0f
+#include <sstream>
6fdc0f
+#include <testsuite_hooks.h>
6fdc0f
+#include <stdexcept>
6fdc0f
+
6fdc0f
+double  
6fdc0f
+test_stringstream()
6fdc0f
+{
6fdc0f
+  double result;
6fdc0f
+  char* source = "1918"; 
6fdc0f
+  std::stringstream s;
6fdc0f
+  s << source;
6fdc0f
+
6fdc0f
+  std::string tmp = s.str();
6fdc0f
+  std::streambuf* sb = s.rdbuf();
6fdc0f
+  int i = sb->in_avail();
6fdc0f
+
6fdc0f
+  if (i)
6fdc0f
+    {
6fdc0f
+      s >> result;
6fdc0f
+    }
6fdc0f
+  else
6fdc0f
+    {
6fdc0f
+      throw std::runtime_error("conversion failed");
6fdc0f
+    }
6fdc0f
+  return result;
6fdc0f
+}
6fdc0f
+
6fdc0f
+
6fdc0f
+int main ()
6fdc0f
+{
6fdc0f
+  test_stringstream();
6fdc0f
+  return 0;
6fdc0f
+}
6fdc0f
--- libstdc++-v3/testsuite/27_io/basic_streambuf/in_avail/char/1.cc.jj	2005-07-22 01:21:41.000000000 +0200
6fdc0f
+++ libstdc++-v3/testsuite/27_io/basic_streambuf/in_avail/char/1.cc	2005-07-22 01:21:41.000000000 +0200
6fdc0f
@@ -0,0 +1,54 @@
6fdc0f
+// 2005-06-07 Benjamin Kosnik  <bkoz@redhat.com>
6fdc0f
+
6fdc0f
+// Copyright (C) 2005 Free Software Foundation, Inc.
6fdc0f
+//
6fdc0f
+// This file is part of the GNU ISO C++ Library.  This library is free
6fdc0f
+// software; you can redistribute it and/or modify it under the
6fdc0f
+// terms of the GNU General Public License as published by the
6fdc0f
+// Free Software Foundation; either version 2, or (at your option)
6fdc0f
+// any later version.
6fdc0f
+
6fdc0f
+// This library is distributed in the hope that it will be useful,
6fdc0f
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
6fdc0f
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
6fdc0f
+// GNU General Public License for more details.
6fdc0f
+
6fdc0f
+// You should have received a copy of the GNU General Public License along
6fdc0f
+// with this library; see the file COPYING.  If not, write to the Free
6fdc0f
+// Software Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307,
6fdc0f
+// USA.
6fdc0f
+
6fdc0f
+// 27.8.1.4 Overridden virtual functions
6fdc0f
+
6fdc0f
+#include <fstream>
6fdc0f
+#include <testsuite_hooks.h>
6fdc0f
+
6fdc0f
+typedef std::basic_streambuf<char> 	streambuf_type;
6fdc0f
+
6fdc0f
+struct testbuf : streambuf_type
6fdc0f
+{
6fdc0f
+  testbuf() { }
6fdc0f
+};
6fdc0f
+
6fdc0f
+void test05() 
6fdc0f
+{
6fdc0f
+  typedef streambuf_type::int_type 	int_type;
6fdc0f
+  typedef streambuf_type::traits_type 	traits_type;
6fdc0f
+  typedef streambuf_type::pos_type 	pos_type;
6fdc0f
+  typedef streambuf_type::off_type 	off_type;
6fdc0f
+  typedef size_t 			size_type;
6fdc0f
+
6fdc0f
+  bool test __attribute__((unused)) = true;
6fdc0f
+  std::streamoff  			strmof_1, strmof_2;
6fdc0f
+  testbuf	sb01;
6fdc0f
+
6fdc0f
+  // int in_avail()
6fdc0f
+  strmof_1 = sb01.in_avail();
6fdc0f
+  VERIFY( strmof_1  == 0 ); 
6fdc0f
+}
6fdc0f
+
6fdc0f
+int main() 
6fdc0f
+{
6fdc0f
+  test05();
6fdc0f
+  return 0;
6fdc0f
+}
6fdc0f
--- libstdc++-v3/testsuite/27_io/basic_streambuf/in_avail/wchar_t/1.cc.jj	2005-07-22 01:21:41.000000000 +0200
6fdc0f
+++ libstdc++-v3/testsuite/27_io/basic_streambuf/in_avail/wchar_t/1.cc	2005-07-22 01:21:41.000000000 +0200
6fdc0f
@@ -0,0 +1,54 @@
6fdc0f
+// 2005-06-07 Benjamin Kosnik  <bkoz@redhat.com>
6fdc0f
+
6fdc0f
+// Copyright (C) 2005 Free Software Foundation, Inc.
6fdc0f
+//
6fdc0f
+// This file is part of the GNU ISO C++ Library.  This library is free
6fdc0f
+// software; you can redistribute it and/or modify it under the
6fdc0f
+// terms of the GNU General Public License as published by the
6fdc0f
+// Free Software Foundation; either version 2, or (at your option)
6fdc0f
+// any later version.
6fdc0f
+
6fdc0f
+// This library is distributed in the hope that it will be useful,
6fdc0f
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
6fdc0f
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
6fdc0f
+// GNU General Public License for more details.
6fdc0f
+
6fdc0f
+// You should have received a copy of the GNU General Public License along
6fdc0f
+// with this library; see the file COPYING.  If not, write to the Free
6fdc0f
+// Software Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307,
6fdc0f
+// USA.
6fdc0f
+
6fdc0f
+// 27.8.1.4 Overridden virtual functions
6fdc0f
+
6fdc0f
+#include <fstream>
6fdc0f
+#include <testsuite_hooks.h>
6fdc0f
+
6fdc0f
+typedef std::basic_streambuf<wchar_t> 	streambuf_type;
6fdc0f
+
6fdc0f
+struct testbuf : streambuf_type
6fdc0f
+{
6fdc0f
+  testbuf() { }
6fdc0f
+};
6fdc0f
+
6fdc0f
+void test05() 
6fdc0f
+{
6fdc0f
+  typedef streambuf_type::int_type 	int_type;
6fdc0f
+  typedef streambuf_type::traits_type 	traits_type;
6fdc0f
+  typedef streambuf_type::pos_type 	pos_type;
6fdc0f
+  typedef streambuf_type::off_type 	off_type;
6fdc0f
+  typedef size_t 			size_type;
6fdc0f
+
6fdc0f
+  bool test __attribute__((unused)) = true;
6fdc0f
+  std::streamoff  			strmof_1, strmof_2;
6fdc0f
+  testbuf	sb01;
6fdc0f
+
6fdc0f
+  // int in_avail()
6fdc0f
+  strmof_1 = sb01.in_avail();
6fdc0f
+  VERIFY( strmof_1  == 0 ); 
6fdc0f
+}
6fdc0f
+
6fdc0f
+int main() 
6fdc0f
+{
6fdc0f
+  test05();
6fdc0f
+  return 0;
6fdc0f
+}
6fdc0f
--- libstdc++-v3/testsuite/lib/libstdc++.exp.jj	2005-05-06 12:59:10.000000000 +0200
6fdc0f
+++ libstdc++-v3/testsuite/lib/libstdc++.exp	2005-07-22 10:03:52.000000000 +0200
6fdc0f
@@ -283,6 +283,7 @@ proc v3_target_compile { source dest typ
6fdc0f
     # Link the support objects into executables.
6fdc0f
     if { $type == "executable" } {
6fdc0f
 	set cxx_final [concat $cxx_final ${v3-test_objs}]
6fdc0f
+	lappend options "libs=-lstdc++_nonshared"
6fdc0f
     }
6fdc0f
 
6fdc0f
     lappend options "compiler=$cxx_final"