From a40ba78e55a277a4dc5b93f67ad4de0812163a2f Mon Sep 17 00:00:00 2001 From: Benjamin Kosnik Date: Sat, 23 Dec 2000 07:13:57 +0000 Subject: [PATCH] Makefile.am (CSTD_INCLUDES): Change from CSHADOW_INCLUDES. 2000-12-23 Benjamin Kosnik * src/Makefile.am (CSTD_INCLUDES): Change from CSHADOW_INCLUDES. (strstream.cc): Add special rule for deprecated files. * libsupc++/Makefile.am (INCLUDES): Sync. * acinclude.m4 (GLIBCPP_EXPORT_INCLUDES): And here. Reported by Fred Fish * include/backward/iomanip.h: Remove backward from include * include/backward/strstream.h: Same. * include/backward/stream.h: Same. * include/backward/ostream.h: Same. * include/backward/istream.h: Same. * src/strstream.cc: And here. Reported by Brad Garcia * src/string-inst.cc (_S_find): Use generic template. * include/bits/string.tcc (_S_find): Remove specializations From-SVN: r38477 --- libstdc++-v3/ChangeLog | 19 ++++++++++ libstdc++-v3/Makefile.in | 2 +- libstdc++-v3/acinclude.m4 | 4 +-- libstdc++-v3/aclocal.m4 | 4 +-- libstdc++-v3/configure | 4 +-- libstdc++-v3/include/backward/iomanip.h | 2 +- libstdc++-v3/include/backward/istream.h | 2 +- libstdc++-v3/include/backward/ostream.h | 2 +- libstdc++-v3/include/backward/stream.h | 2 +- libstdc++-v3/include/backward/strstream.h | 2 +- libstdc++-v3/include/bits/string.tcc | 14 -------- libstdc++-v3/libio/Makefile.in | 1 + libstdc++-v3/libmath/Makefile.in | 1 + libstdc++-v3/libsupc++/Makefile.am | 8 ++--- libstdc++-v3/libsupc++/Makefile.in | 6 ++-- libstdc++-v3/src/Makefile.am | 21 +++++++---- libstdc++-v3/src/Makefile.in | 15 +++++--- libstdc++-v3/src/string-inst.cc | 58 +++++++++---------------------- libstdc++-v3/src/strstream.cc | 2 +- 19 files changed, 84 insertions(+), 85 deletions(-) diff --git a/libstdc++-v3/ChangeLog b/libstdc++-v3/ChangeLog index d393cf7..a09e85f 100644 --- a/libstdc++-v3/ChangeLog +++ b/libstdc++-v3/ChangeLog @@ -1,3 +1,22 @@ +2000-12-23 Benjamin Kosnik + + * src/Makefile.am (CSTD_INCLUDES): Change from CSHADOW_INCLUDES. + (strstream.cc): Add special rule for deprecated files. + * libsupc++/Makefile.am (INCLUDES): Sync. + * acinclude.m4 (GLIBCPP_EXPORT_INCLUDES): And here. + + Reported by Fred Fish + * include/backward/iomanip.h: Remove backward from include + * include/backward/strstream.h: Same. + * include/backward/stream.h: Same. + * include/backward/ostream.h: Same. + * include/backward/istream.h: Same. + * src/strstream.cc: And here. + + Reported by Brad Garcia + * src/string-inst.cc (_S_find): Use generic template. + * include/bits/string.tcc (_S_find): Remove specializations + 2000-12-22 Benjamin Kosnik Attempt to make locale visible in gdb. diff --git a/libstdc++-v3/Makefile.in b/libstdc++-v3/Makefile.in index 5828c9a..8402499 100644 --- a/libstdc++-v3/Makefile.in +++ b/libstdc++-v3/Makefile.in @@ -68,7 +68,7 @@ AS = @AS@ CC = @CC@ CPP = @CPP@ CSHADOW_FLAGS = @CSHADOW_FLAGS@ -CSHADOW_INCLUDES = @CSHADOW_INCLUDES@ +CSTD_INCLUDES = @CSTD_INCLUDES@ CXX = @CXX@ CXXCPP = @CXXCPP@ CXX_libstdcxx = @CXX_libstdcxx@ diff --git a/libstdc++-v3/acinclude.m4 b/libstdc++-v3/acinclude.m4 index 1cdc893..74be392 100644 --- a/libstdc++-v3/acinclude.m4 +++ b/libstdc++-v3/acinclude.m4 @@ -1613,7 +1613,7 @@ AC_DEFUN(GLIBCPP_EXPORT_INCLUDES, [ # CSHADOW_INCLUDES='-I$(GLIBCPP_INCLUDE_DIR)/std -I$(C_INCLUDE_DIR) \ # -I$(top_blddir)/cshadow' #else - CSHADOW_INCLUDES='-I$(GLIBCPP_INCLUDE_DIR)/std -I$(C_INCLUDE_DIR)' + CSTD_INCLUDES='-I$(GLIBCPP_INCLUDE_DIR)/std -I$(C_INCLUDE_DIR)' #endif # Now, export this to all the little Makefiles.... @@ -1622,7 +1622,7 @@ AC_DEFUN(GLIBCPP_EXPORT_INCLUDES, [ AC_SUBST(LIBMATH_INCLUDES) AC_SUBST(LIBSUPCXX_INCLUDES) AC_SUBST(LIBIO_INCLUDES) - AC_SUBST(CSHADOW_INCLUDES) + AC_SUBST(CSTD_INCLUDES) ]) diff --git a/libstdc++-v3/aclocal.m4 b/libstdc++-v3/aclocal.m4 index ff65e71..4c57169 100644 --- a/libstdc++-v3/aclocal.m4 +++ b/libstdc++-v3/aclocal.m4 @@ -1625,7 +1625,7 @@ AC_DEFUN(GLIBCPP_EXPORT_INCLUDES, [ # CSHADOW_INCLUDES='-I$(GLIBCPP_INCLUDE_DIR)/std -I$(C_INCLUDE_DIR) \ # -I$(top_blddir)/cshadow' #else - CSHADOW_INCLUDES='-I$(GLIBCPP_INCLUDE_DIR)/std -I$(C_INCLUDE_DIR)' + CSTD_INCLUDES='-I$(GLIBCPP_INCLUDE_DIR)/std -I$(C_INCLUDE_DIR)' #endif # Now, export this to all the little Makefiles.... @@ -1634,7 +1634,7 @@ AC_DEFUN(GLIBCPP_EXPORT_INCLUDES, [ AC_SUBST(LIBMATH_INCLUDES) AC_SUBST(LIBSUPCXX_INCLUDES) AC_SUBST(LIBIO_INCLUDES) - AC_SUBST(CSHADOW_INCLUDES) + AC_SUBST(CSTD_INCLUDES) ]) diff --git a/libstdc++-v3/configure b/libstdc++-v3/configure index 0e87b07..6a5b9aa 100755 --- a/libstdc++-v3/configure +++ b/libstdc++-v3/configure @@ -19781,7 +19781,7 @@ gxx_target_include_dir='$(exec_prefix)/$(target_alias)/include/g++-$(libstdcxx_i # CSHADOW_INCLUDES='-I$(GLIBCPP_INCLUDE_DIR)/std -I$(C_INCLUDE_DIR) \ # -I$(top_blddir)/cshadow' #else - CSHADOW_INCLUDES='-I$(GLIBCPP_INCLUDE_DIR)/std -I$(C_INCLUDE_DIR)' + CSTD_INCLUDES='-I$(GLIBCPP_INCLUDE_DIR)/std -I$(C_INCLUDE_DIR)' #endif # Now, export this to all the little Makefiles.... @@ -20039,7 +20039,7 @@ s%@TOPLEVEL_INCLUDES@%$TOPLEVEL_INCLUDES%g s%@LIBMATH_INCLUDES@%$LIBMATH_INCLUDES%g s%@LIBSUPCXX_INCLUDES@%$LIBSUPCXX_INCLUDES%g s%@LIBIO_INCLUDES@%$LIBIO_INCLUDES%g -s%@CSHADOW_INCLUDES@%$CSHADOW_INCLUDES%g +s%@CSTD_INCLUDES@%$CSTD_INCLUDES%g s%@OPTIMIZE_CXXFLAGS@%$OPTIMIZE_CXXFLAGS%g s%@WARN_FLAGS@%$WARN_FLAGS%g diff --git a/libstdc++-v3/include/backward/iomanip.h b/libstdc++-v3/include/backward/iomanip.h index 76b209c..432252c 100644 --- a/libstdc++-v3/include/backward/iomanip.h +++ b/libstdc++-v3/include/backward/iomanip.h @@ -28,7 +28,7 @@ #ifndef _CPP_BACKWARD_IOMANIP_H #define _CPP_BACKWARD_IOMANIP_H 1 -#include +#include #include using std::resetiosflags; diff --git a/libstdc++-v3/include/backward/istream.h b/libstdc++-v3/include/backward/istream.h index c80c474..57ea07e 100644 --- a/libstdc++-v3/include/backward/istream.h +++ b/libstdc++-v3/include/backward/istream.h @@ -28,7 +28,7 @@ #ifndef _CPP_BACKWARD_ISTREAM_H #define _CPP_BACKWARD_ISTREAM_H 1 -#include +#include #endif diff --git a/libstdc++-v3/include/backward/ostream.h b/libstdc++-v3/include/backward/ostream.h index aa129b5..7b48785 100644 --- a/libstdc++-v3/include/backward/ostream.h +++ b/libstdc++-v3/include/backward/ostream.h @@ -28,7 +28,7 @@ #ifndef _CPP_BACKWARD_OSTREAM_H #define _CPP_BACKWARD_OSTREAM_H 1 -#include +#include #endif diff --git a/libstdc++-v3/include/backward/stream.h b/libstdc++-v3/include/backward/stream.h index 0207f69..15c32b8 100644 --- a/libstdc++-v3/include/backward/stream.h +++ b/libstdc++-v3/include/backward/stream.h @@ -28,7 +28,7 @@ #ifndef _CPP_BACKWARD_STREAM_H #define _CPP_BACKWARD_STREAM_H 1 -#include +#include #endif diff --git a/libstdc++-v3/include/backward/strstream.h b/libstdc++-v3/include/backward/strstream.h index 72fe529..3918141 100644 --- a/libstdc++-v3/include/backward/strstream.h +++ b/libstdc++-v3/include/backward/strstream.h @@ -30,7 +30,7 @@ #ifndef _CPP_BACKWARD_STRSTREAM_H #define _CPP_BACKWARD_STRSTREAM_H 1 -#include +#include using std::strstreambuf; using std::istrstream; diff --git a/libstdc++-v3/include/bits/string.tcc b/libstdc++-v3/include/bits/string.tcc index 386108d..da43ae1 100644 --- a/libstdc++-v3/include/bits/string.tcc +++ b/libstdc++-v3/include/bits/string.tcc @@ -576,8 +576,6 @@ namespace std } // String operations - // NB: This is specialized for the standard char_traits - // specialization to use the same optimizations as strchr. template const _CharT* basic_string<_CharT, _Traits, _Alloc>:: @@ -586,18 +584,6 @@ namespace std return find_if(__beg, __end, _Char_traits_match<_CharT, _Traits>(__c)); } - // Specialization for char, definitions in src/string-inst.cc. - template<> - const char* - string::_S_find(const char* __beg, const char* __end, char __c); - - // Specialization for wchar_t. -#ifdef _GLIBCPP_USE_WCHAR_T - template<> - const wchar_t* - wstring::_S_find(const wchar_t* __beg, const wchar_t* __end, wchar_t __c); -#endif - template basic_string<_CharT, _Traits, _Alloc>::size_type basic_string<_CharT, _Traits, _Alloc>:: diff --git a/libstdc++-v3/libio/Makefile.in b/libstdc++-v3/libio/Makefile.in index a80ad10..8a05d15 100644 --- a/libstdc++-v3/libio/Makefile.in +++ b/libstdc++-v3/libio/Makefile.in @@ -68,6 +68,7 @@ AS = @AS@ CC = @CC@ CPP = @CPP@ CSHADOW_FLAGS = @CSHADOW_FLAGS@ +CSTD_INCLUDES = @CSTD_INCLUDES@ CXX = @CXX@ CXXCPP = @CXXCPP@ CXX_libstdcxx = @CXX_libstdcxx@ diff --git a/libstdc++-v3/libmath/Makefile.in b/libstdc++-v3/libmath/Makefile.in index 648f7d5..88fd47d 100644 --- a/libstdc++-v3/libmath/Makefile.in +++ b/libstdc++-v3/libmath/Makefile.in @@ -68,6 +68,7 @@ AS = @AS@ CC = @CC@ CPP = @CPP@ CSHADOW_FLAGS = @CSHADOW_FLAGS@ +CSTD_INCLUDES = @CSTD_INCLUDES@ CXX = @CXX@ CXXCPP = @CXXCPP@ CXX_libstdcxx = @CXX_libstdcxx@ diff --git a/libstdc++-v3/libsupc++/Makefile.am b/libstdc++-v3/libsupc++/Makefile.am index 3238685..dfd8a6d 100644 --- a/libstdc++-v3/libsupc++/Makefile.am +++ b/libstdc++-v3/libsupc++/Makefile.am @@ -65,16 +65,16 @@ WARN_CXXFLAGS = \ # Use common includes from acinclude.m4/GLIBCPP_EXPORT_INCLUDES GLIBCPP_INCLUDE_DIR = @GLIBCPP_INCLUDE_DIR@ C_INCLUDE_DIR = @C_INCLUDE_DIR@ -TOPLEVEL_INCLUDES = @TOPLEVEL_INCLUDES@ +CSTD_INCLUDES = @CSTD_INCLUDES@ LIBMATH_INCLUDES = @LIBMATH_INCLUDES@ LIBSUPCXX_INCLUDES = @LIBSUPCXX_INCLUDES@ LIBIO_INCLUDES = @LIBIO_INCLUDES@ -CSHADOW_INCLUDES = @CSHADOW_INCLUDES@ +TOPLEVEL_INCLUDES = @TOPLEVEL_INCLUDES@ INCLUDES = \ -I$(top_srcdir)/../gcc -I$(top_srcdir)/../include \ - $(CSHADOW_INCLUDES) $(LIBSUPCXX_INCLUDES) -I$(GLIBCPP_INCLUDE_DIR) \ - $(CONFIG_INCLUDES) -I$(top_builddir)/include + -I$(GLIBCPP_INCLUDE_DIR) $(CSTD_INCLUDES) -I$(top_builddir)/include \ + $(LIBSUPCXX_INCLUDES) headers = \ cxxabi.h exception new typeinfo diff --git a/libstdc++-v3/libsupc++/Makefile.in b/libstdc++-v3/libsupc++/Makefile.in index 0c1bb57..b05feb9 100644 --- a/libstdc++-v3/libsupc++/Makefile.in +++ b/libstdc++-v3/libsupc++/Makefile.in @@ -143,13 +143,13 @@ WARN_CXXFLAGS = @WARN_FLAGS@ $(WERROR) @WFMT_FLAGS@ # Use common includes from acinclude.m4/GLIBCPP_EXPORT_INCLUDES GLIBCPP_INCLUDE_DIR = @GLIBCPP_INCLUDE_DIR@ C_INCLUDE_DIR = @C_INCLUDE_DIR@ -TOPLEVEL_INCLUDES = @TOPLEVEL_INCLUDES@ +CSTD_INCLUDES = @CSTD_INCLUDES@ LIBMATH_INCLUDES = @LIBMATH_INCLUDES@ LIBSUPCXX_INCLUDES = @LIBSUPCXX_INCLUDES@ LIBIO_INCLUDES = @LIBIO_INCLUDES@ -CSHADOW_INCLUDES = @CSHADOW_INCLUDES@ +TOPLEVEL_INCLUDES = @TOPLEVEL_INCLUDES@ -INCLUDES = -I$(top_srcdir)/../gcc -I$(top_srcdir)/../include $(CSHADOW_INCLUDES) $(LIBSUPCXX_INCLUDES) -I$(GLIBCPP_INCLUDE_DIR) $(CONFIG_INCLUDES) -I$(top_builddir)/include +INCLUDES = -I$(top_srcdir)/../gcc -I$(top_srcdir)/../include -I$(GLIBCPP_INCLUDE_DIR) $(CSTD_INCLUDES) -I$(top_builddir)/include $(LIBSUPCXX_INCLUDES) headers = cxxabi.h exception new typeinfo diff --git a/libstdc++-v3/src/Makefile.am b/libstdc++-v3/src/Makefile.am index 343f968..9809dd6 100644 --- a/libstdc++-v3/src/Makefile.am +++ b/libstdc++-v3/src/Makefile.am @@ -21,7 +21,7 @@ ## Software Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307, ## USA. -## $Id: Makefile.am,v 1.59 2000/12/18 18:03:08 bkoz Exp $ +## $Id: Makefile.am,v 1.60 2000/12/21 01:28:57 gdr Exp $ AUTOMAKE_OPTIONS = 1.3 gnits MAINT_CHARSET = latin1 @@ -62,16 +62,16 @@ WARN_CXXFLAGS = \ # Use common includes from acinclude.m4/GLIBCPP_EXPORT_INCLUDES GLIBCPP_INCLUDE_DIR = @GLIBCPP_INCLUDE_DIR@ C_INCLUDE_DIR = @C_INCLUDE_DIR@ -TOPLEVEL_INCLUDES = @TOPLEVEL_INCLUDES@ +CSTD_INCLUDES = @CSTD_INCLUDES@ LIBMATH_INCLUDES = @LIBMATH_INCLUDES@ LIBSUPCXX_INCLUDES = @LIBSUPCXX_INCLUDES@ LIBIO_INCLUDES = @LIBIO_INCLUDES@ -CSHADOW_INCLUDES = @CSHADOW_INCLUDES@ +TOPLEVEL_INCLUDES = @TOPLEVEL_INCLUDES@ INCLUDES = \ -nostdinc++ \ - $(CSHADOW_INCLUDES) $(LIBSUPCXX_INCLUDES) -I$(GLIBCPP_INCLUDE_DIR) \ - $(LIBIO_INCLUDES) $(LIBMATH_INCLUDES) -I$(top_builddir)/include \ + -I$(GLIBCPP_INCLUDE_DIR) $(CSTD_INCLUDES) -I$(top_builddir)/include \ + $(LIBSUPCXX_INCLUDES) $(LIBIO_INCLUDES) $(LIBMATH_INCLUDES) \ $(TOPLEVEL_INCLUDES) base_headers = \ @@ -297,6 +297,7 @@ myinstallheaders: done; \ fi; + # We have to handle misc-inst.cc and locale-inst.cc in a special way # since we cannot instantiate all classes due to missing definitions # for things like vptrs, type_info bits, etc. when using @@ -310,7 +311,14 @@ locale-inst.o: locale-inst.cc locale-inst.lo: locale-inst.cc $(LTCXXCOMPILE) -fimplicit-templates -c $< -# We have to instantiate wstring bits too. . . +# Use special rules for the deprecated source files so that they find +# deprecated include files. +strstream.lo: strstream.cc + $(LTCXXCOMPILE) -I$(GLIBCPP_INCLUDE_DIR)/backward -c $< +strstream.o: strstream.cc + $(CXXCOMPILE) -I$(GLIBCPP_INCLUDE_DIR)/backward -c $< + +# Make wstring-inst.cc from string-inst.cc wstring-inst.o: string-inst.cc $(CXXCOMPILE) -fimplicit-templates -c -DC=wchar_t $< -o $@ wstring-inst.lo: string-inst.cc @@ -330,6 +338,7 @@ libstdc++.INC: Makefile tmp-libstdc++.INC: Makefile echo $(INCLUDES) > $@ + # AM_CXXFLAGS needs to be in each subdirectory so that it can be # modified in a per-library or per-sub-library way. Need to manually # set this option because CONFIG_CXXFLAGS has to be after diff --git a/libstdc++-v3/src/Makefile.in b/libstdc++-v3/src/Makefile.in index c449a95..6b9cc03 100644 --- a/libstdc++-v3/src/Makefile.in +++ b/libstdc++-v3/src/Makefile.in @@ -139,13 +139,13 @@ WARN_CXXFLAGS = @WARN_FLAGS@ $(WERROR) @WFMT_FLAGS@ # Use common includes from acinclude.m4/GLIBCPP_EXPORT_INCLUDES GLIBCPP_INCLUDE_DIR = @GLIBCPP_INCLUDE_DIR@ C_INCLUDE_DIR = @C_INCLUDE_DIR@ -TOPLEVEL_INCLUDES = @TOPLEVEL_INCLUDES@ +CSTD_INCLUDES = @CSTD_INCLUDES@ LIBMATH_INCLUDES = @LIBMATH_INCLUDES@ LIBSUPCXX_INCLUDES = @LIBSUPCXX_INCLUDES@ LIBIO_INCLUDES = @LIBIO_INCLUDES@ -CSHADOW_INCLUDES = @CSHADOW_INCLUDES@ +TOPLEVEL_INCLUDES = @TOPLEVEL_INCLUDES@ -INCLUDES = -nostdinc++ $(CSHADOW_INCLUDES) $(LIBSUPCXX_INCLUDES) -I$(GLIBCPP_INCLUDE_DIR) $(LIBIO_INCLUDES) $(LIBMATH_INCLUDES) -I$(top_builddir)/include $(TOPLEVEL_INCLUDES) +INCLUDES = -nostdinc++ -I$(GLIBCPP_INCLUDE_DIR) $(CSTD_INCLUDES) -I$(top_builddir)/include $(LIBSUPCXX_INCLUDES) $(LIBIO_INCLUDES) $(LIBMATH_INCLUDES) $(TOPLEVEL_INCLUDES) base_headers = bits/cpp_type_traits.h bits/char_traits.h bits/codecvt.h bits/basic_string.h bits/std_string.h bits/string.tcc bits/generic_shadow.h bits/std_utility.h bits/std_complex.h bits/valarray_array.h bits/valarray_array.tcc bits/valarray_meta.h bits/std_valarray.h bits/mask_array.h bits/slice.h bits/slice_array.h bits/gslice.h bits/gslice_array.h bits/indirect_array.h bits/exception_support.h bits/std_fstream.h bits/std_iomanip.h bits/ios_base.h bits/fpos.h bits/basic_ios.h bits/basic_ios.tcc bits/std_ios.h bits/std_iosfwd.h bits/std_iostream.h bits/std_istream.h bits/istream.tcc bits/std_locale.h bits/fstream.tcc bits/ostream.tcc bits/sbuf_iter.h bits/sstream.tcc bits/std_ostream.h bits/std_sstream.h bits/std_streambuf.h bits/streambuf.tcc bits/basic_file.h bits/locale_facets.h bits/locale_facets.tcc bits/localefwd.h bits/stl_pthread_alloc.h bits/pthread_allocimpl.h bits/stl_threads.h bits/stl_iterator_base.h bits/std_bitset.h bits/std_deque.h bits/std_functional.h bits/std_iterator.h bits/std_list.h bits/std_map.h bits/std_memory.h bits/std_numeric.h bits/std_queue.h bits/std_set.h bits/std_stack.h bits/std_stdexcept.h bits/std_vector.h bits/stl_algo.h bits/stl_algobase.h bits/stl_alloc.h bits/stl_deque.h bits/stl_function.h bits/stl_heap.h bits/stl_iterator.h bits/stl_list.h bits/stl_map.h bits/stl_multimap.h bits/stl_multiset.h bits/stl_numeric.h bits/stl_pair.h bits/stl_queue.h bits/stl_raw_storage_iter.h bits/stl_relops.h bits/stl_set.h bits/stl_stack.h bits/stl_string_fwd.h bits/stl_tempbuf.h bits/stl_tree.h bits/stl_uninitialized.h bits/stl_vector.h bits/type_traits.h bits/stl_range_errors.h bits/std_algorithm.h bits/concept_checks.h bits/container_concepts.h bits/sequence_concepts.h bits/stl_config.h bits/stl_construct.h @@ -577,7 +577,14 @@ locale-inst.o: locale-inst.cc locale-inst.lo: locale-inst.cc $(LTCXXCOMPILE) -fimplicit-templates -c $< -# We have to instantiate wstring bits too. . . +# Use special rules for the deprecated source files so that they find +# deprecated include files. +strstream.lo: strstream.cc + $(LTCXXCOMPILE) -I$(GLIBCPP_INCLUDE_DIR)/backward -c $< +strstream.o: strstream.cc + $(CXXCOMPILE) -I$(GLIBCPP_INCLUDE_DIR)/backward -c $< + +# Make wstring-inst.cc from string-inst.cc wstring-inst.o: string-inst.cc $(CXXCOMPILE) -fimplicit-templates -c -DC=wchar_t $< -o $@ wstring-inst.lo: string-inst.cc diff --git a/libstdc++-v3/src/string-inst.cc b/libstdc++-v3/src/string-inst.cc index a7dc153..2555011 100644 --- a/libstdc++-v3/src/string-inst.cc +++ b/libstdc++-v3/src/string-inst.cc @@ -174,51 +174,28 @@ namespace std (S::iterator, S::iterator, const C*, const C*, forward_iterator_tag); template - S::size_type S::copy(C*, S::size_type, S::size_type) const; + S::size_type S::copy(C*, S::size_type, S::size_type) const; template - C* - S::_S_construct - (S::iterator, S::iterator, const allocator&); + C* S::_S_construct(S::iterator, S::iterator, + const allocator&); template - C* - S::_S_construct - (S::iterator, S::iterator, const allocator&, forward_iterator_tag); + C* S::_S_construct(S::iterator, S::iterator, + const allocator&, forward_iterator_tag); template - C* - S::_S_construct - (C*, C*, const allocator&, forward_iterator_tag); + C* S::_S_construct(C*, C*, const allocator&, forward_iterator_tag); template - C* - S::_S_construct - (const C*, const C*, const allocator&, forward_iterator_tag); + C* S::_S_construct(const C*, const C*, const allocator&, + forward_iterator_tag); template - C* - S::_S_construct(S::size_type, C, S::allocator_type const&); - - // These members are explicitly specialized, and can only be in one - // translation unit or else we get multiple copies. . . -#if _GLIBCPP_INSTANTIATING_CHAR - template<> - const char* - string::_S_find(const char* __beg, const char* __end, char __c) - { - const char* __ret = strchr(__beg, __c); - return (__ret ? __ret : __end); - } -#elif defined(_GLIBCPP_USE_WCHAR_T) - template<> - const wchar_t* - wstring::_S_find(const wchar_t* __beg, const wchar_t* __end, wchar_t __c) - { - return find_if(__beg, __end, - _Char_traits_match(__c)); - } -#endif + C* S::_S_construct(S::size_type, C, S::allocator_type const&); + + template + const C* S::_S_find(const C* __beg, const C* __end, C __c); template S::size_type S::find(C, S::size_type) const; @@ -236,12 +213,12 @@ namespace std S::size_type S::find_last_of(C const*, S::size_type, S::size_type) const; template - S::size_type S::find_first_not_of( - C const*, S::size_type, S::size_type) const; + S::size_type + S::find_first_not_of(C const*, S::size_type, S::size_type) const; template - S::size_type S::find_last_not_of( - C const*, S::size_type, S::size_type) const; + S::size_type + S::find_last_not_of(C const*, S::size_type, S::size_type) const; template S::size_type S::find_last_not_of(C, S::size_type) const; @@ -257,8 +234,7 @@ namespace std int S::compare(C const*) const; template - int S::compare( - S::size_type, S::size_type, C const*, S::size_type) const; + int S::compare(S::size_type, S::size_type, C const*, S::size_type) const; template S operator+(const C*, const S&); diff --git a/libstdc++-v3/src/strstream.cc b/libstdc++-v3/src/strstream.cc index 478bf10..5731017 100644 --- a/libstdc++-v3/src/strstream.cc +++ b/libstdc++-v3/src/strstream.cc @@ -17,7 +17,7 @@ // MAY BE REMOVED in a future standard revision. You should use the // header instead. -#include +#include #include #include #include -- 2.7.4