From: Benjamin Kosnik
Date: Tue, 25 Apr 2000 06:39:48 +0000 (+0000)
Subject: [multiple changes]
X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=5d89258ae5150ce2c0f947ee2c636e3cae1275da;p=gcc.git
[multiple changes]
2000-04-24 Nathan Myers
* src/string-inst.cc: More fixing.
2000-04-24 Benjamin Kosnik
* bits/stl_iterator.h: Pedantic fixing.
* bits/std_sstream.h: And here.
* bits/string.tcc: And here.
2000-04-24 Felix Natter
* docs/17_intro/howto.html: Add bits.
* docs/17_intro/porting-howto.html: New file.
2000-04-24 Branko Cibej
* acinclude.m4(GLIBCPP_CHECK_WCHAR_T_SUPPORT): Expand
@libinst_wstring_la@ to libinst-wstring.la when specializing for
wchar_t, to empty string otherwise.
* src/Makefile.am: (EXTRA_LTLIBRARIES): New.
(sources): Remove $(string_sources) and $(wstring_sources).
(libstdc___la_LIBADD): Add libinst-string.la and @libinst_wstring_la@.
(libstdc___la_DEPENDENCIES): New.
(libinst_string_la_SOURCES, libinst_wstring_la_SOURCES): New.
From-SVN: r33402
---
diff --git a/libstdc++-v3/ChangeLog b/libstdc++-v3/ChangeLog
index 104f41261fd..b832f40eb05 100644
--- a/libstdc++-v3/ChangeLog
+++ b/libstdc++-v3/ChangeLog
@@ -1,3 +1,29 @@
+2000-04-24 Nathan Myers
+
+ * src/string-inst.cc: More fixing.
+
+2000-04-24 Benjamin Kosnik
+
+ * bits/stl_iterator.h: Pedantic fixing.
+ * bits/std_sstream.h: And here.
+ * bits/string.tcc: And here.
+
+2000-04-24 Felix Natter
+
+ * docs/17_intro/howto.html: Add bits.
+ * docs/17_intro/porting-howto.html: New file.
+
+2000-04-24 Branko Cibej
+
+ * acinclude.m4(GLIBCPP_CHECK_WCHAR_T_SUPPORT): Expand
+ @libinst_wstring_la@ to libinst-wstring.la when specializing for
+ wchar_t, to empty string otherwise.
+ * src/Makefile.am: (EXTRA_LTLIBRARIES): New.
+ (sources): Remove $(string_sources) and $(wstring_sources).
+ (libstdc___la_LIBADD): Add libinst-string.la and @libinst_wstring_la@.
+ (libstdc___la_DEPENDENCIES): New.
+ (libinst_string_la_SOURCES, libinst_wstring_la_SOURCES): New.
+
2000-04-20 Benjamin Kosnik
* bits/std_sstream.h: Tweak formatting.
diff --git a/libstdc++-v3/Makefile.in b/libstdc++-v3/Makefile.in
index d8cdb513a49..861bcdc87ab 100644
--- a/libstdc++-v3/Makefile.in
+++ b/libstdc++-v3/Makefile.in
@@ -100,6 +100,7 @@ WERRORSUPPRESS = @WERRORSUPPRESS@
cpu_include_dir = @cpu_include_dir@
ctype_include_dir = @ctype_include_dir@
glibcpp_basedir = @glibcpp_basedir@
+libinst_wstring_la = @libinst_wstring_la@
AUTOMAKE_OPTIONS = 1.3 cygnus
MAINT_CHARSET = latin1
diff --git a/libstdc++-v3/acinclude.m4 b/libstdc++-v3/acinclude.m4
index 8b9a4547390..db89cb5603e 100644
--- a/libstdc++-v3/acinclude.m4
+++ b/libstdc++-v3/acinclude.m4
@@ -484,12 +484,15 @@ AC_DEFUN(GLIBCPP_CHECK_WCHAR_T_SUPPORT, [
dnl Tests for wide character functions.
AC_REPLACE_STRINGFUNCS(wcslen wmemchr wmemcmp wmemcpy wmemmove wmemset)
+ AC_SUBST(libinst_wstring_la)
AC_MSG_CHECKING([for wide character support])
if test $has_weof = "yes" && test $has_wchar_minmax = "yes"; then
+ libinst_wstring_la="libinst-wstring.la"
AC_DEFINE(_GLIBCPP_USE_WCHAR_T)
AC_MSG_RESULT(ok)
else
+ libinst_wstring_la=""
AC_MSG_RESULT("not specializing for wchar_t")
fi
],[
diff --git a/libstdc++-v3/aclocal.m4 b/libstdc++-v3/aclocal.m4
index 00ff575d40b..16bd938e82e 100644
--- a/libstdc++-v3/aclocal.m4
+++ b/libstdc++-v3/aclocal.m4
@@ -496,12 +496,15 @@ AC_DEFUN(GLIBCPP_CHECK_WCHAR_T_SUPPORT, [
dnl Tests for wide character functions.
AC_REPLACE_STRINGFUNCS(wcslen wmemchr wmemcmp wmemcpy wmemmove wmemset)
+ AC_SUBST(libinst_wstring_la)
AC_MSG_CHECKING([for wide character support])
if test $has_weof = "yes" && test $has_wchar_minmax = "yes"; then
+ libinst_wstring_la="libinst-wstring.la"
AC_DEFINE(_GLIBCPP_USE_WCHAR_T)
AC_MSG_RESULT(ok)
else
+ libinst_wstring_la=""
AC_MSG_RESULT("not specializing for wchar_t")
fi
],[
diff --git a/libstdc++-v3/bits/std_sstream.h b/libstdc++-v3/bits/std_sstream.h
index 68a36c22b44..126d86d1d36 100644
--- a/libstdc++-v3/bits/std_sstream.h
+++ b/libstdc++-v3/bits/std_sstream.h
@@ -52,7 +52,7 @@ namespace std {
// Non-standard types:
typedef basic_streambuf<_CharT, _Traits> __streambuf_type;
typedef basic_string<_CharT, _Traits, _Alloc> __string_type;
- typedef __string_type::size_type __size_type;
+ typedef typename __string_type::size_type __size_type;
private:
// Data Members:
diff --git a/libstdc++-v3/bits/stl_iterator.h b/libstdc++-v3/bits/stl_iterator.h
index 16b657e81b7..289cbe6ea05 100644
--- a/libstdc++-v3/bits/stl_iterator.h
+++ b/libstdc++-v3/bits/stl_iterator.h
@@ -969,79 +969,75 @@ class __normal_iterator
iterator_traits<_Iterator>::pointer,
iterator_traits<_Iterator>::reference>
{
-public:
+protected:
+ _Iterator _M_current;
+
+public:
typedef __normal_iterator<_Iterator, _Container> normal_iterator_type;
+ typedef iterator_traits<_Iterator> __traits_type;
+ typedef typename __traits_type::iterator_category iterator_category;
+ typedef typename __traits_type::value_type value_type;
+ typedef typename __traits_type::difference_type difference_type;
+ typedef typename __traits_type::pointer pointer;
+ typedef typename __traits_type::reference reference;
- inline __normal_iterator() : _M_current() { }
+ __normal_iterator() : _M_current(_Iterator()) { }
- inline explicit __normal_iterator(const _Iterator& __i)
- : _M_current(__i) { }
+ explicit __normal_iterator(const _Iterator& __i) : _M_current(__i) { }
// Allow iterator to const_iterator conversion
template
inline __normal_iterator(const __normal_iterator<_Iter, _Container>& __i)
: _M_current(__i.base()) { }
- // forward iterator requirements
-
- inline reference
- operator*() const
- { return *_M_current; }
+ // Forward iterator requirements
+ reference
+ operator*() const { return *_M_current; }
- inline pointer
- operator->() const
- { return _M_current; }
+ pointer
+ operator->() const { return _M_current; }
- inline normal_iterator_type&
- operator++()
- { ++_M_current; return *this; }
+ normal_iterator_type&
+ operator++() { ++_M_current; return *this; }
- inline normal_iterator_type
- operator++(int)
- { return __normal_iterator(_M_current++); }
+ normal_iterator_type
+ operator++(int) { return __normal_iterator(_M_current++); }
- // bidirectional iterator requirements
+ // Bidirectional iterator requirements
+ normal_iterator_type&
+ operator--() { --_M_current; return *this; }
- inline normal_iterator_type&
- operator--()
- { --_M_current; return *this; }
+ normal_iterator_type
+ operator--(int) { return __normal_iterator(_M_current--); }
- inline normal_iterator_type
- operator--(int)
- { return __normal_iterator(_M_current--); }
-
- // random access iterator requirements
-
- inline reference
+ // Random access iterator requirements
+ reference
operator[](const difference_type& __n) const
- { return _M_current[__n]; }
+ { return _M_current[__n]; }
- inline normal_iterator_type&
+ normal_iterator_type&
operator+=(const difference_type& __n)
- { _M_current += __n; return *this; }
+ { _M_current += __n; return *this; }
- inline normal_iterator_type
+ normal_iterator_type
operator+(const difference_type& __n) const
- { return __normal_iterator(_M_current + __n); }
+ { return __normal_iterator(_M_current + __n); }
- inline normal_iterator_type&
+ normal_iterator_type&
operator-=(const difference_type& __n)
- { _M_current -= __n; return *this; }
+ { _M_current -= __n; return *this; }
- inline normal_iterator_type
+ normal_iterator_type
operator-(const difference_type& __n) const
- { return __normal_iterator(_M_current - __n); }
+ { return __normal_iterator(_M_current - __n); }
- inline difference_type
+ difference_type
operator-(const normal_iterator_type& __i) const
- { return _M_current - __i._M_current; }
-
- const _Iterator& base() const
- { return _M_current; }
+ { return _M_current - __i._M_current; }
-protected:
- _Iterator _M_current;
+ const _Iterator&
+ base() const { return _M_current; }
};
// forward iterator requirements
diff --git a/libstdc++-v3/bits/string.tcc b/libstdc++-v3/bits/string.tcc
index 7ad2b5d0e8f..475a5d52f8b 100644
--- a/libstdc++-v3/bits/string.tcc
+++ b/libstdc++-v3/bits/string.tcc
@@ -518,7 +518,8 @@ namespace std
const basic_string<_CharT,_Traits,_Alloc>& __rhs)
{
typedef basic_string<_CharT,_Traits,_Alloc> __string_type;
- __string_type::size_type __len = _Traits::length(__lhs);
+ typedef typename __string_type::size_type __size_type;
+ __size_type __len = _Traits::length(__lhs);
__string_type __str;
__str.reserve(__len + __rhs.size());
__str.append(__lhs, __lhs + __len);
@@ -531,16 +532,15 @@ namespace std
operator+(_CharT __lhs, const basic_string<_CharT,_Traits,_Alloc>& __rhs)
{
typedef basic_string<_CharT,_Traits,_Alloc> __string_type;
+ typedef typename __string_type::size_type __size_type;
__string_type __str;
- __string_type::size_type __len = __rhs.size();
+ __size_type __len = __rhs.size();
__str.reserve(__len + 1);
__str.append(__string_type::size_type(1), __lhs);
__str.append(__rhs);
return __str;
}
-
-
template
basic_string<_CharT, _Traits, _Alloc>&
basic_string<_CharT, _Traits, _Alloc>::
@@ -556,7 +556,6 @@ namespace std
return *this;
}
-
template
basic_string<_CharT, _Traits, _Alloc>::size_type
basic_string<_CharT, _Traits, _Alloc>::
diff --git a/libstdc++-v3/configure b/libstdc++-v3/configure
index 7adb657d3f9..6057eca3c40 100755
--- a/libstdc++-v3/configure
+++ b/libstdc++-v3/configure
@@ -3350,16 +3350,19 @@ fi
done
+
echo $ac_n "checking for wide character support""... $ac_c" 1>&6
-echo "configure:3356: checking for wide character support" >&5
+echo "configure:3357: checking for wide character support" >&5
if test $has_weof = "yes" && test $has_wchar_minmax = "yes"; then
+ libinst_wstring_la="libinst-wstring.la"
cat >> confdefs.h <<\EOF
#define _GLIBCPP_USE_WCHAR_T 1
EOF
echo "$ac_t""ok" 1>&6
else
+ libinst_wstring_la=""
echo "$ac_t"""not specializing for wchar_t"" 1>&6
fi
@@ -3378,17 +3381,17 @@ fi
ac_safe=`echo "ctype.h" | sed 'y%./+-%__p_%'`
echo $ac_n "checking for ctype.h""... $ac_c" 1>&6
-echo "configure:3382: checking for ctype.h" >&5
+echo "configure:3385: checking for ctype.h" >&5
if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <
EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:3392: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:3395: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
if test -z "$ac_err"; then
rm -rf conftest*
@@ -3409,9 +3412,9 @@ if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
ctype_default=yes
echo $ac_n "checking for gnu-linux ""... $ac_c" 1>&6
-echo "configure:3413: checking for gnu-linux " >&5
+echo "configure:3416: checking for gnu-linux " >&5
cat > conftest.$ac_ext <
int main() {
@@ -3422,7 +3425,7 @@ int
+ __ctype_tolower[a] + __ctype_toupper[a] + __ctype_b[a];}
; return 0; }
EOF
-if { (eval echo configure:3426: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:3429: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
\
ctype_linux=yes
@@ -3441,9 +3444,9 @@ rm -f conftest*
if test $ctype_default = "yes"; then
echo $ac_n "checking for solaris 2.6 or 2.7 ""... $ac_c" 1>&6
-echo "configure:3445: checking for solaris 2.6 or 2.7 " >&5
+echo "configure:3448: checking for solaris 2.6 or 2.7 " >&5
cat > conftest.$ac_ext <
int main() {
@@ -3454,7 +3457,7 @@ int
+ __trans_lower[a] + __trans_upper[a] + __ctype_mask[a];}
; return 0; }
EOF
-if { (eval echo configure:3458: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:3461: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
\
ctype_solaris=yes
@@ -3469,7 +3472,7 @@ rm -f conftest*
if test $ctype_solaris = "yes"; then
echo $ac_n "checking for version""... $ac_c" 1>&6
-echo "configure:3473: checking for version" >&5
+echo "configure:3476: checking for version" >&5
ac_ext=C
# CXXFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
ac_cpp='$CXXCPP $CPPFLAGS'
@@ -3478,14 +3481,14 @@ ac_link='${CXX-g++} -o conftest${ac_exeext} $CXXFLAGS $CPPFLAGS $LDFLAGS conftes
cross_compiling=$ac_cv_prog_cxx_cross
cat > conftest.$ac_ext <
int main() {
typedef long* __to_type; __to_type const& _M_toupper = __trans_upper;
; return 0; }
EOF
-if { (eval echo configure:3489: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:3492: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
\
ctype_solaris26=yes
@@ -3517,9 +3520,9 @@ cross_compiling=$ac_cv_prog_cc_cross
if test $ctype_default = "yes"; then
echo $ac_n "checking for solaris 2.5.1 ""... $ac_c" 1>&6
-echo "configure:3521: checking for solaris 2.5.1 " >&5
+echo "configure:3524: checking for solaris 2.5.1 " >&5
cat > conftest.$ac_ext <
int main() {
@@ -3529,7 +3532,7 @@ int
+ __ctype[a];}
; return 0; }
EOF
-if { (eval echo configure:3533: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:3536: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
\
ctype_solaris25=yes
@@ -3549,9 +3552,9 @@ rm -f conftest*
if test $ctype_default = "yes"; then
echo $ac_n "checking for aix ""... $ac_c" 1>&6
-echo "configure:3553: checking for aix " >&5
+echo "configure:3556: checking for aix " >&5
cat > conftest.$ac_ext <
int main() {
@@ -3562,7 +3565,7 @@ int
+ _VALC('a') + _IS('c', 0);}
; return 0; }
EOF
-if { (eval echo configure:3566: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:3569: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
\
ctype_aix=yes
@@ -3582,9 +3585,9 @@ rm -f conftest*
if test $ctype_default = "yes"; then
echo $ac_n "checking for newlib ""... $ac_c" 1>&6
-echo "configure:3586: checking for newlib " >&5
+echo "configure:3589: checking for newlib " >&5
cat > conftest.$ac_ext <
int main() {
@@ -3594,7 +3597,7 @@ int
+ _ctype_[a];}
; return 0; }
EOF
-if { (eval echo configure:3598: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:3601: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
\
ctype_newlib=yes
@@ -3628,17 +3631,17 @@ fi
do
ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
-echo "configure:3632: checking for $ac_hdr" >&5
+echo "configure:3635: checking for $ac_hdr" >&5
if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <
EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:3642: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:3645: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
if test -z "$ac_err"; then
rm -rf conftest*
@@ -3667,12 +3670,12 @@ done
for ac_func in getpagesize
do
echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
-echo "configure:3671: checking for $ac_func" >&5
+echo "configure:3674: checking for $ac_func" >&5
if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:3702: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest*
eval "ac_cv_func_$ac_func=yes"
else
@@ -3720,7 +3723,7 @@ fi
done
echo $ac_n "checking for working mmap""... $ac_c" 1>&6
-echo "configure:3724: checking for working mmap" >&5
+echo "configure:3727: checking for working mmap" >&5
if eval "test \"`echo '$''{'ac_cv_func_mmap_fixed_mapped'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
@@ -3728,7 +3731,7 @@ else
ac_cv_func_mmap_fixed_mapped=no
else
cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
+if { (eval echo configure:3875: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
then
ac_cv_func_mmap_fixed_mapped=yes
else
@@ -3931,19 +3934,19 @@ fi
if test $ac_cv_header_locale_h = yes; then
echo $ac_n "checking for LC_MESSAGES""... $ac_c" 1>&6
-echo "configure:3935: checking for LC_MESSAGES" >&5
+echo "configure:3938: checking for LC_MESSAGES" >&5
if eval "test \"`echo '$''{'ac_cv_val_LC_MESSAGES'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <
int main() {
return LC_MESSAGES
; return 0; }
EOF
-if { (eval echo configure:3947: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:3950: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest*
ac_cv_val_LC_MESSAGES=yes
else
@@ -4187,6 +4190,7 @@ s%@ctype_include_dir@%$ctype_include_dir%g
s%@LIBMATHOBJS@%$LIBMATHOBJS%g
s%@USE_LONG_DOUBLE@%$USE_LONG_DOUBLE%g
s%@LIBSTRINGOBJS@%$LIBSTRINGOBJS%g
+s%@libinst_wstring_la@%$libinst_wstring_la%g
s%@CANADIAN_TRUE@%$CANADIAN_TRUE%g
s%@CANADIAN_FALSE@%$CANADIAN_FALSE%g
s%@NULL_TARGET_TRUE@%$NULL_TARGET_TRUE%g
diff --git a/libstdc++-v3/docs/17_intro/howto.html b/libstdc++-v3/docs/17_intro/howto.html
index d55c2868347..25642b1ba78 100644
--- a/libstdc++-v3/docs/17_intro/howto.html
+++ b/libstdc++-v3/docs/17_intro/howto.html
@@ -9,7 +9,7 @@
libstdc++-v3 HOWTO: Chapter 17
-
+
@@ -29,6 +29,7 @@
The Standard C++ header files
Thread-safety
<foo> vs <foo.h>
+ Porting-howto
@@ -146,7 +147,7 @@
Comments and suggestions are welcome, and may be sent to
Phil Edwards or
Gabriel Dos Reis .
- $Id: howto.html,v 1.10 2000/04/18 22:05:49 pme Exp $
+ $Id: howto.html,v 1.1 2000/04/21 20:33:31 bkoz Exp $
diff --git a/libstdc++-v3/libio/Makefile.in b/libstdc++-v3/libio/Makefile.in
index 80cbf5fed73..2ea9877e9f8 100644
--- a/libstdc++-v3/libio/Makefile.in
+++ b/libstdc++-v3/libio/Makefile.in
@@ -100,6 +100,7 @@ WERRORSUPPRESS = @WERRORSUPPRESS@
cpu_include_dir = @cpu_include_dir@
ctype_include_dir = @ctype_include_dir@
glibcpp_basedir = @glibcpp_basedir@
+libinst_wstring_la = @libinst_wstring_la@
AUTOMAKE_OPTIONS = 1.3 cygnus
diff --git a/libstdc++-v3/math/Makefile.in b/libstdc++-v3/math/Makefile.in
index 79f40e23eda..e2c4d2d305f 100644
--- a/libstdc++-v3/math/Makefile.in
+++ b/libstdc++-v3/math/Makefile.in
@@ -100,6 +100,7 @@ WERRORSUPPRESS = @WERRORSUPPRESS@
cpu_include_dir = @cpu_include_dir@
ctype_include_dir = @ctype_include_dir@
glibcpp_basedir = @glibcpp_basedir@
+libinst_wstring_la = @libinst_wstring_la@
AUTOMAKE_OPTIONS = 1.3 cygnus
diff --git a/libstdc++-v3/src/Makefile.am b/libstdc++-v3/src/Makefile.am
index 770c482acb1..7eb5a97e3ba 100644
--- a/libstdc++-v3/src/Makefile.am
+++ b/libstdc++-v3/src/Makefile.am
@@ -34,6 +34,7 @@ toolexeclibdir = $(toolexecdir)/lib$(MULTISUBDIR)
endif
toolexeclib_LTLIBRARIES = libstdc++.la
+EXTRA_LTLIBRARIES = libinst-string.la libinst-wstring.la
WERROR = -Werror
@@ -212,8 +213,7 @@ sources = \
complex.cc complexf.cc complexl.cc complex_io.cc \
stdexcept.cc ios.cc stdstreams.cc strstream.cc \
locale.cc localename.cc \
- locale-inst.cc stl-inst.cc misc-inst.cc valarray-inst.cc \
- $(string_sources) $(wstring_sources)
+ locale-inst.cc stl-inst.cc misc-inst.cc valarray-inst.cc
VPATH += $(top_srcdir) $(top_srcdir)/std $(top_srcdir)/src
VPATH += $(top_srcdir)/@ctype_include_dir@
@@ -224,10 +224,18 @@ EXTRA_sources = string-inst.cc
libstdc___la_SOURCES = $(sources)
-libstdc___la_LIBADD = ../math/libmath.la ../libio/libio.la
+libinst_string_la_SOURCES = $(string_sources)
+
+libinst_wstring_la_SOURCES = $(wstring_sources)
+
+libstdc___la_LIBADD = \
+ ../math/libmath.la ../libio/libio.la \
+ libinst-string.la @libinst_wstring_la@
libstdc___la_LDFLAGS = -version-info 3:0:0 -lm
+libstdc___la_DEPENDENCIES = $(libstdc___la_LIBADD)
+
# We cannot use the default rules to install headers since we cannot
# statically decide which headers to install. So we have our own special
diff --git a/libstdc++-v3/src/Makefile.in b/libstdc++-v3/src/Makefile.in
index 2536173ee4f..0ffa592659a 100644
--- a/libstdc++-v3/src/Makefile.in
+++ b/libstdc++-v3/src/Makefile.in
@@ -99,6 +99,7 @@ WERRORSUPPRESS = @WERRORSUPPRESS@
cpu_include_dir = @cpu_include_dir@
ctype_include_dir = @ctype_include_dir@
glibcpp_basedir = @glibcpp_basedir@
+libinst_wstring_la = @libinst_wstring_la@
AUTOMAKE_OPTIONS = 1.3 gnits
MAINT_CHARSET = latin1
@@ -110,6 +111,7 @@ MAINT_CHARSET = latin1
@USE_LIBDIR_FALSE@$(exec_prefix)/$(target_alias)
toolexeclib_LTLIBRARIES = libstdc++.la
+EXTRA_LTLIBRARIES = libinst-string.la libinst-wstring.la
WERROR = -Werror
# OPTIMIZE_CXXFLAGS = -O3 -fstrict-aliasing -fsquangle -fnew-exceptions \
@@ -295,8 +297,7 @@ sources = \
complex.cc complexf.cc complexl.cc complex_io.cc \
stdexcept.cc ios.cc stdstreams.cc strstream.cc \
locale.cc localename.cc \
- locale-inst.cc stl-inst.cc misc-inst.cc valarray-inst.cc \
- $(string_sources) $(wstring_sources)
+ locale-inst.cc stl-inst.cc misc-inst.cc valarray-inst.cc
VPATH = $(top_srcdir) $(top_srcdir)/std $(top_srcdir)/src $(top_srcdir)/@ctype_include_dir@
@@ -305,10 +306,19 @@ EXTRA_sources = string-inst.cc
libstdc___la_SOURCES = $(sources)
-libstdc___la_LIBADD = ../math/libmath.la ../libio/libio.la
+libinst_string_la_SOURCES = $(string_sources)
+
+libinst_wstring_la_SOURCES = $(wstring_sources)
+
+libstdc___la_LIBADD = \
+ ../math/libmath.la ../libio/libio.la \
+ libinst-string.la @libinst_wstring_la@
+
libstdc___la_LDFLAGS = -version-info 3:0:0 -lm
+libstdc___la_DEPENDENCIES = $(libstdc___la_LIBADD)
+
# We cannot use the default rules to install headers since we cannot
# statically decide which headers to install. So we have our own special
# installation routine here.
@@ -323,11 +333,9 @@ DEFS = @DEFS@ -I. -I$(srcdir) -I..
CPPFLAGS = @CPPFLAGS@
LDFLAGS = @LDFLAGS@
LIBS = @LIBS@
-libstdc___la_DEPENDENCIES = ../math/libmath.la ../libio/libio.la
-libstdc___la_OBJECTS = limitsMEMBERS.lo c++io.lo cmath.lo complex.lo \
-complexf.lo complexl.lo complex_io.lo stdexcept.lo ios.lo stdstreams.lo \
-strstream.lo locale.lo localename.lo locale-inst.lo stl-inst.lo \
-misc-inst.lo valarray-inst.lo stringMAIN.lo stringCTORNC.lo \
+libinst_string_la_LDFLAGS =
+libinst_string_la_LIBADD =
+libinst_string_la_OBJECTS = stringMAIN.lo stringCTORNC.lo \
stringCTORAL.lo stringCTORCPR.lo stringCTORCPRAL.lo stringCTORPRAL.lo \
stringCTORPAL.lo stringCTORDUPAL.lo stringCTORPP.lo stringCTORII.lo \
stringMUTATE.lo stringRESERVE.lo stringSWAP.lo stringSLOP.lo \
@@ -341,21 +349,28 @@ stringRFIND.lo stringRFINDC.lo stringFFO.lo stringFLO.lo stringFFNO.lo \
stringFLNO.lo stringFLNOC.lo stringCOMPARE.lo stringCOMPARE2.lo \
stringCOMPAREP.lo stringCOMPAREP2.lo stringADDPS.lo stringADDCS.lo \
stringEXTRACT.lo stringINSERT.lo stringGETLINE.lo stringSCOPY.lo \
-stringEQ.lo wstringMAIN.lo wstringCTORNC.lo wstringCTORAL.lo \
-wstringCTORCPR.lo wstringCTORCPRAL.lo wstringCTORPRAL.lo \
-wstringCTORPAL.lo wstringCTORDUPAL.lo wstringCTORPP.lo wstringCTORII.lo \
-wstringMUTATE.lo wstringRESERVE.lo wstringSWAP.lo wstringSLOP.lo \
-wstringRESIZE.lo wstringAPPCOPY.lo wstringAPPCPR.lo wstringAPPPR.lo \
-wstringAPPDUP.lo wstringAPPII.lo wstringASSCP.lo wstringASSII.lo \
-wstringINSII.lo wstringREPRR.lo wstringREPIIDUP.lo wstringREPII.lo \
-wstringREPIII.lo wstringREP4I.lo wstringREPIIPP.lo wstringREPIIPP2.lo \
-wstringCOPY.lo wstringCONII.lo wstringCONIIF.lo wstringCONPPF.lo \
-wstringCONPPF2.lo wstringCONSC.lo wstringFIND.lo wstringFINDC.lo \
-wstringRFIND.lo wstringRFINDC.lo wstringFFO.lo wstringFLO.lo \
-wstringFFNO.lo wstringFLNO.lo wstringFLNOC.lo wstringCOMPARE.lo \
-wstringCOMPARE2.lo wstringCOMPAREP.lo wstringCOMPAREP2.lo \
-wstringADDPS.lo wstringADDCS.lo wstringEXTRACT.lo wstringINSERT.lo \
-wstringGETLINE.lo wstringSCOPY.lo wstringEQ.lo
+stringEQ.lo
+libinst_wstring_la_LDFLAGS =
+libinst_wstring_la_LIBADD =
+libinst_wstring_la_OBJECTS = wstringMAIN.lo wstringCTORNC.lo \
+wstringCTORAL.lo wstringCTORCPR.lo wstringCTORCPRAL.lo \
+wstringCTORPRAL.lo wstringCTORPAL.lo wstringCTORDUPAL.lo \
+wstringCTORPP.lo wstringCTORII.lo wstringMUTATE.lo wstringRESERVE.lo \
+wstringSWAP.lo wstringSLOP.lo wstringRESIZE.lo wstringAPPCOPY.lo \
+wstringAPPCPR.lo wstringAPPPR.lo wstringAPPDUP.lo wstringAPPII.lo \
+wstringASSCP.lo wstringASSII.lo wstringINSII.lo wstringREPRR.lo \
+wstringREPIIDUP.lo wstringREPII.lo wstringREPIII.lo wstringREP4I.lo \
+wstringREPIIPP.lo wstringREPIIPP2.lo wstringCOPY.lo wstringCONII.lo \
+wstringCONIIF.lo wstringCONPPF.lo wstringCONPPF2.lo wstringCONSC.lo \
+wstringFIND.lo wstringFINDC.lo wstringRFIND.lo wstringRFINDC.lo \
+wstringFFO.lo wstringFLO.lo wstringFFNO.lo wstringFLNO.lo \
+wstringFLNOC.lo wstringCOMPARE.lo wstringCOMPARE2.lo wstringCOMPAREP.lo \
+wstringCOMPAREP2.lo wstringADDPS.lo wstringADDCS.lo wstringEXTRACT.lo \
+wstringINSERT.lo wstringGETLINE.lo wstringSCOPY.lo wstringEQ.lo
+libstdc___la_OBJECTS = limitsMEMBERS.lo c++io.lo cmath.lo complex.lo \
+complexf.lo complexl.lo complex_io.lo stdexcept.lo ios.lo stdstreams.lo \
+strstream.lo locale.lo localename.lo locale-inst.lo stl-inst.lo \
+misc-inst.lo valarray-inst.lo
CXXFLAGS = @CXXFLAGS@
CXXLD = $(CXX)
DIST_COMMON = Makefile.am Makefile.in
@@ -365,8 +380,8 @@ DISTFILES = $(DIST_COMMON) $(SOURCES) $(HEADERS) $(TEXINFOS) $(EXTRA_DIST)
TAR = gtar
GZIP_ENV = --best
-SOURCES = $(libstdc___la_SOURCES)
-OBJECTS = $(libstdc___la_OBJECTS)
+SOURCES = $(libinst_string_la_SOURCES) $(libinst_wstring_la_SOURCES) $(libstdc___la_SOURCES)
+OBJECTS = $(libinst_string_la_OBJECTS) $(libinst_wstring_la_OBJECTS) $(libstdc___la_OBJECTS)
all: all-redirect
.SUFFIXES:
@@ -442,6 +457,12 @@ distclean-libtool:
maintainer-clean-libtool:
+libinst-string.la: $(libinst_string_la_OBJECTS) $(libinst_string_la_DEPENDENCIES)
+ $(CXXLINK) $(libinst_string_la_LDFLAGS) $(libinst_string_la_OBJECTS) $(libinst_string_la_LIBADD) $(LIBS)
+
+libinst-wstring.la: $(libinst_wstring_la_OBJECTS) $(libinst_wstring_la_DEPENDENCIES)
+ $(CXXLINK) $(libinst_wstring_la_LDFLAGS) $(libinst_wstring_la_OBJECTS) $(libinst_wstring_la_LIBADD) $(LIBS)
+
libstdc++.la: $(libstdc___la_OBJECTS) $(libstdc___la_DEPENDENCIES)
$(CXXLINK) -rpath $(toolexeclibdir) $(libstdc___la_LDFLAGS) $(libstdc___la_OBJECTS) $(libstdc___la_LIBADD) $(LIBS)
.cc.o:
diff --git a/libstdc++-v3/src/string-inst.cc b/libstdc++-v3/src/string-inst.cc
index 451ffa50a83..28467ec85ef 100644
--- a/libstdc++-v3/src/string-inst.cc
+++ b/libstdc++-v3/src/string-inst.cc
@@ -280,8 +280,7 @@ namespace std
#ifdef CONSC
template
C*
- S::_S_construct
- (S::size_type, C, const allocator&);
+ S::_S_construct(S::size_type, C, S::allocator_type const&);
#endif
#ifdef FIND