Commit 28861379 by Benjamin Kosnik Committed by Benjamin Kosnik

misc-inst.cc (std): Remove instantiations.


2000-07-26  Benjamin Kosnik  <bkoz@purist.soma.redhat.com>

	* src/misc-inst.cc (std): Remove instantiations.

	* acinclude.m4: Add forward-looking bits for autoconf.
	* aclocal.m4: Regenerate.

	* bits/ostream.tcc (ostream::operator<<): Fix const char* case.

From-SVN: r35267
parent 6a1fa5f9
2000-07-26 Benjamin Kosnik <bkoz@purist.soma.redhat.com>
* src/misc-inst.cc (std): Remove instantiations.
* acinclude.m4: Add forward-looking bits for autoconf.
* aclocal.m4: Regenerate.
* bits/ostream.tcc (ostream::operator<<): Fix const char* case.
2000-07-25 Benjamin Kosnik <bkoz@gnu.org> 2000-07-25 Benjamin Kosnik <bkoz@gnu.org>
* configure.in: Change AM_PROG_LIBTOOL to AC_PROG_LIBTOOL. Change * configure.in: Change AM_PROG_LIBTOOL to AC_PROG_LIBTOOL. Change
......
...@@ -30,6 +30,12 @@ AC_DEFUN(GLIBCPP_CONFIGURE, [ ...@@ -30,6 +30,12 @@ AC_DEFUN(GLIBCPP_CONFIGURE, [
AM_INIT_AUTOMAKE(libstdc++, 2.90.8) AM_INIT_AUTOMAKE(libstdc++, 2.90.8)
# Never versions of autoconf add an underscore to these functions.
# Prevent future problems ...
ifdef([AC_PROG_CC_G],[],[define([AC_PROG_CC_G],defn([_AC_PROG_CC_G]))])
ifdef([AC_PROG_CC_GNU],[],[define([AC_PROG_CC_GNU],defn([_AC_PROG_CC_GNU]))])
ifdef([AC_PROG_CXX_G],[],[define([AC_PROG_CXX_G],defn([_AC_PROG_CXX_G]))])
ifdef([AC_PROG_CXX_GNU],[],[define([AC_PROG_CXX_GNU],defn([_AC_PROG_CXX_GNU]))])
# AC_PROG_CC # AC_PROG_CC
...@@ -1515,7 +1521,7 @@ dnl Then, if any (well almost any) other make is called, and GNU make also ...@@ -1515,7 +1521,7 @@ dnl Then, if any (well almost any) other make is called, and GNU make also
dnl exists, then the other make wraps the GNU make. dnl exists, then the other make wraps the GNU make.
dnl dnl
dnl @author John Darrington <j.darrington@elvis.murdoch.edu.au> dnl @author John Darrington <j.darrington@elvis.murdoch.edu.au>
dnl @version $Id: acinclude.m4,v 1.46 2000/07/24 16:33:55 bkoz Exp $ dnl @version $Id: acinclude.m4,v 1.47 2000/07/26 06:51:37 bkoz Exp $
dnl dnl
dnl #### Changes for libstdc++-v3: reformatting and linewrapping; prepending dnl #### Changes for libstdc++-v3: reformatting and linewrapping; prepending
dnl #### GLIBCPP_ to the macro name; adding the :-make fallback in the dnl #### GLIBCPP_ to the macro name; adding the :-make fallback in the
......
...@@ -42,6 +42,12 @@ AC_DEFUN(GLIBCPP_CONFIGURE, [ ...@@ -42,6 +42,12 @@ AC_DEFUN(GLIBCPP_CONFIGURE, [
AM_INIT_AUTOMAKE(libstdc++, 2.90.8) AM_INIT_AUTOMAKE(libstdc++, 2.90.8)
# Never versions of autoconf add an underscore to these functions.
# Prevent future problems ...
ifdef([AC_PROG_CC_G],[],[define([AC_PROG_CC_G],defn([_AC_PROG_CC_G]))])
ifdef([AC_PROG_CC_GNU],[],[define([AC_PROG_CC_GNU],defn([_AC_PROG_CC_GNU]))])
ifdef([AC_PROG_CXX_G],[],[define([AC_PROG_CXX_G],defn([_AC_PROG_CXX_G]))])
ifdef([AC_PROG_CXX_GNU],[],[define([AC_PROG_CXX_GNU],defn([_AC_PROG_CXX_GNU]))])
# AC_PROG_CC # AC_PROG_CC
...@@ -1527,7 +1533,7 @@ dnl Then, if any (well almost any) other make is called, and GNU make also ...@@ -1527,7 +1533,7 @@ dnl Then, if any (well almost any) other make is called, and GNU make also
dnl exists, then the other make wraps the GNU make. dnl exists, then the other make wraps the GNU make.
dnl dnl
dnl @author John Darrington <j.darrington@elvis.murdoch.edu.au> dnl @author John Darrington <j.darrington@elvis.murdoch.edu.au>
dnl @version $Id: acinclude.m4,v 1.46 2000/07/24 16:33:55 bkoz Exp $ dnl @version $Id: acinclude.m4,v 1.47 2000/07/26 06:51:37 bkoz Exp $
dnl dnl
dnl #### Changes for libstdc++-v3: reformatting and linewrapping; prepending dnl #### Changes for libstdc++-v3: reformatting and linewrapping; prepending
dnl #### GLIBCPP_ to the macro name; adding the :-make fallback in the dnl #### GLIBCPP_ to the macro name; adding the :-make fallback in the
......
...@@ -196,7 +196,7 @@ namespace std { ...@@ -196,7 +196,7 @@ namespace std {
ios_base::fmtflags __fmt = this->flags() & ios_base::basefield; ios_base::fmtflags __fmt = this->flags() & ios_base::basefield;
if (__fmt & ios_base::oct || __fmt & ios_base::hex) if (__fmt & ios_base::oct || __fmt & ios_base::hex)
__f = _M_fnumput->put(*this, *this, this->fill(), __f = _M_fnumput->put(*this, *this, this->fill(),
static_cast<unsigned long long>(__n)).failed(); static_cast<unsigned long long>(__n)).failed();
else else
__f = _M_fnumput->put(*this, *this, this->fill(), __n).failed(); __f = _M_fnumput->put(*this, *this, this->fill(), __n).failed();
...@@ -585,36 +585,46 @@ namespace std { ...@@ -585,36 +585,46 @@ namespace std {
template<typename _CharT, typename _Traits> template<typename _CharT, typename _Traits>
basic_ostream<_CharT, _Traits>& basic_ostream<_CharT, _Traits>&
operator<<(basic_ostream<_CharT, _Traits>& __out, const char* /*__s*/) operator<<(basic_ostream<_CharT, _Traits>& __out, const char* __s)
{ {
#if 0 typedef basic_ostream<_CharT, _Traits> __ostream_type;
typedef basic_ostream<_CharT, _Traits> __ostream_type; #ifdef _GLIBCPP_RESOLVE_LIB_DEFECTS
typedef typename _Traits::state_type __state_type; // 167. Improper use of traits_type::length()
typedef codecvt<char, _CharT, __state_type> __codecvt_type; typedef char_traits<char> __ctraits_type;
typedef typename __ostream_type::char_type __char_type; #endif
__ostream_type::sentry __cerb(__out); __ostream_type::sentry __cerb(__out);
if (__cerb) if (__cerb)
{ {
const __codecvt_type* __fcvt = &use_facet<__codecvt_type>(__out.getloc()); size_t __clen = __ctraits_type::length(__s);
_CharT __ws[__clen + 1];
for (size_t __i = 0; __i <= __clen; ++__i)
__ws[__i] = __out.widen(__s[__i]);
_CharT* __str = __ws;
try { try {
streamsize __n = char_traits<char>::length(__s); streamsize __len = static_cast<streamsize>(__clen);
__char_type __conv[__n]; streamsize __w = __out.width();
__state_type __state_cur; _CharT __pads[__w];
__char_type __pbuf[__n];
__char_type* __pend; if (__w > __len)
char* __send; {
__fcvt->out(__state_cur, _S_pad_char(__out, __pads, __ws, __w, __len);
__pbuf, __pbuf + __n, __str = __pads;
const_cast<const __char_type*&>(__pend), __len = __w;
const_cast<char*>(__s), }
const_cast<char*>(__s + __n), __out.write(__str, __len);
__send); __out.width(0);
__out.write(__pbuf, __n); }
catch(exception& __fail){
// 27.6.1.2.1 Common requirements.
// Turn this on without causing an ios::failure to be thrown.
__out.setstate(ios_base::badbit);
if ((__out.exceptions() & ios_base::badbit) != 0)
throw;
} }
#endif
return __out;
} }
return __out;
}
// Partial specializationss // Partial specializationss
template<class _Traits> template<class _Traits>
......
This source diff could not be displayed because it is too large. You can view the blob instead.
...@@ -123,9 +123,6 @@ namespace std { ...@@ -123,9 +123,6 @@ namespace std {
template ostream& operator<<(ostream&, const char*); template ostream& operator<<(ostream&, const char*);
template ostream& operator<<(ostream&, const unsigned char*); template ostream& operator<<(ostream&, const unsigned char*);
template ostream& operator<<(ostream&, const signed char*); template ostream& operator<<(ostream&, const signed char*);
// template ostream& operator<<(ostream&, _Setfill<char>);
// template ostream& operator<<(ostream&, _Setw);
// template _Setfill<char> setfill(char);
#ifdef _GLIBCPP_USE_WCHAR_T #ifdef _GLIBCPP_USE_WCHAR_T
template class basic_ostream<wchar_t>; template class basic_ostream<wchar_t>;
template wostream& endl(wostream&); template wostream& endl(wostream&);
...@@ -135,9 +132,6 @@ namespace std { ...@@ -135,9 +132,6 @@ namespace std {
template wostream& operator<<(wostream&, char); template wostream& operator<<(wostream&, char);
template wostream& operator<<(wostream&, const wchar_t*); template wostream& operator<<(wostream&, const wchar_t*);
template wostream& operator<<(wostream&, const char*); template wostream& operator<<(wostream&, const char*);
// template wostream& operator<<(wostream&, _Setfill<wchar_t>);
// template wostream& operator<<(wostream&, _Setw);
// template _Setfill<wchar_t> setfill(wchar_t);
#endif #endif
......
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