diff options
author | bkoz <bkoz@138bc75d-0d04-0410-961f-82ee72b054a4> | 2000-12-23 07:13:57 +0000 |
---|---|---|
committer | bkoz <bkoz@138bc75d-0d04-0410-961f-82ee72b054a4> | 2000-12-23 07:13:57 +0000 |
commit | 1e013ca5a1805023deab01a7072450c6865693e7 (patch) | |
tree | ffa1846d7c65367ce41a49c90f867e28eed685c6 /libstdc++-v3/src | |
parent | 00a3cf461459607fe2cb4b5322d7072d665f46dc (diff) | |
download | ppe42-gcc-1e013ca5a1805023deab01a7072450c6865693e7.tar.gz ppe42-gcc-1e013ca5a1805023deab01a7072450c6865693e7.zip |
2000-12-23 Benjamin Kosnik <bkoz@redhat.com>
* 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 <fnf@ninemoons.com>
* 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 <bgarcia@laurelnetworks.com>
* src/string-inst.cc (_S_find): Use generic template.
* include/bits/string.tcc (_S_find): Remove specializations
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@38477 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'libstdc++-v3/src')
-rw-r--r-- | libstdc++-v3/src/Makefile.am | 21 | ||||
-rw-r--r-- | libstdc++-v3/src/Makefile.in | 15 | ||||
-rw-r--r-- | libstdc++-v3/src/string-inst.cc | 58 | ||||
-rw-r--r-- | libstdc++-v3/src/strstream.cc | 2 |
4 files changed, 44 insertions, 52 deletions
diff --git a/libstdc++-v3/src/Makefile.am b/libstdc++-v3/src/Makefile.am index 343f968f7ae..9809dd6a201 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 c449a959907..6b9cc03882d 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 a7dc153a099..25550113ad9 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, S::iterator, const allocator<C>&); + C* S::_S_construct<S::iterator>(S::iterator, S::iterator, + const allocator<C>&); template - C* - S::_S_construct<S::iterator> - (S::iterator, S::iterator, const allocator<C>&, forward_iterator_tag); + C* S::_S_construct<S::iterator>(S::iterator, S::iterator, + const allocator<C>&, forward_iterator_tag); template - C* - S::_S_construct<C*> - (C*, C*, const allocator<C>&, forward_iterator_tag); + C* S::_S_construct<C*>(C*, C*, const allocator<C>&, forward_iterator_tag); template - C* - S::_S_construct<const C*> - (const C*, const C*, const allocator<C>&, forward_iterator_tag); + C* S::_S_construct<const C*>(const C*, const C*, const allocator<C>&, + 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<wchar_t, traits_type>(__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 478bf109b8f..57310177655 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 <sstream> instead. -#include <backward/strstream.h> +#include <strstream.h> #include <algorithm> #include <new> #include <stdlib.h> |