OSDN Git Service

2003-02-17 Benjamin Kosnik <bkoz@redhat.com>
[pf3gnuchains/gcc-fork.git] / libstdc++-v3 / ChangeLog
index 5da889c..f3fb9fe 100644 (file)
@@ -1,3 +1,371 @@
+2003-02-17  Benjamin Kosnik  <bkoz@redhat.com>
+
+       * include/bits/basic_ios.tcc (copyfmt): Copy locale data as well.
+       * testsuite/27_io/ios_members.cc (test03): New.
+
+2003-02-17  Jerry Quinn  <jlquinn@optonline.net>
+
+       * include/bits/basic_ios.h (basic_ios::_M_cache_locale): Declare.
+       (basic_ios::_M_cache_facets): Move into above.
+       * include/bits/basic_ios.tcc (basic_ios::copyfmt): Rebuild locale
+       cache.
+       (basic_ios::imbue): Force locale cache to be built.
+       (basic_ios::_M_init): Create and initialize locale cache.
+       * include/bits/ios_base.h (__locale_cache_base): Declare.
+       (ios_base::_M_locale_cache): New.
+       (ios_base::_M_cache): Define.
+       * include/bits/locale_facets.h: (__num_base): Fix comment.  Add
+       _S_end.
+        (__locale_cache_base,__locale_cache<_CharT>):  New classes.
+       (__locale_cache<char>, __locale_cache<wchar_t>): New specializations.
+       * include/bits/locale_facets.tcc (num_put::_M_convert_int): Use locale
+       cache literal string, grouping flag, thousands separator.
+       (__locale_cache<_CharT>::__locale_cache): New.
+       (__locale_cache<_CharT>::_M_init): New.
+       (__locale_cache<_CharT>::_M_populate): New.
+       * src/ios.cc: Clear _M_locale_cache in constructor.
+       * src/locale-inst.cc (__locale_cache<char>, __locale_cache<_char_t>):
+       New.
+
+2003-02-17  Paolo Carlini  <pcarlini@unitus.it>
+
+       * src/locale-inst.cc: Do not include <cassert>.
+       * src/locale.cc: Likewise.
+
+2003-02-17  Paolo Carlini  <pcarlini@unitus.it>
+
+       PR libstdc++/9580
+       * include/std/std_fstream.h: Declare underflow and uflow
+       specializations, change generic definitions to do nothing.
+       * src/fstream.cc: Add underflow and uflow specializations.
+
+2003-02-17  Paolo Carlini  <pcarlini@unitus.it>
+
+       PR libstdc++/9169
+       * include/bits/fstream.tcc (_M_convert_to_external):
+       Deal correctly with noconv, as prescribed by 27.8.1.4,p8.
+       * testsuite/27_io/filebuf_virtuals.cc (test10): Add.
+
+2003-02-13  Benjamin Kosnik  <bkoz@redhat.com>
+
+       * include/bits/c++config (_GLIBCPP_EXTERN_TEMPLATE): Define.
+       * include/bits/basic_ios.tcc: Guard use of extern template.
+       * include/std/std_iomanip.h: Same.
+       * include/bits/streambuf.tcc: Same.
+       * include/bits/stl_alloc.h: Same.
+       * include/bits/locale_facets.tcc: Same.
+       * include/bits/ostream.tcc: Same.
+       * include/bits/istream.tcc: Same.
+       * include/bits/fstream.tcc: Same.
+       * include/bits/basic_string.tcc: Same.
+
+2003-02-13  Paolo Carlini  <pcarlini@unitus.it>
+
+       * include/bits/ostream.tcc (sentry::sentry): Improve
+       performance-wise the fix for libstdc++/9563.
+
+2003-02-12  Phil Edwards  <pme@gcc.gnu.org>
+
+       * config/cpu/generic/atomicity.h (_Atomic_add_mutex):  Fix declaration.
+       (_GLIBCPP_NEED_GENERIC_MUTEX):  Define for this file.
+       (_Atomic_add_mutex_once, __gthread_atomic_add_mutex_once):  Declare
+       when we don't have static mutex initialization.
+       (__exchange_and_add):  Use _Atomic_add_mutex_once.
+       * src/misc-inst.cc:  Definitions of all the above.
+
+2003-02-12  Paolo Carlini  <pcarlini@unitus.it>
+
+       PR libstdc++/9563
+       * include/bits/ostream.tcc (sentry::sentry): Check
+       the state of the stream after the preparation.
+       * testsuite/27_io/ostream_sentry.cc (test02): Add.
+
+2003-02-11  Benjamin Kosnik  <bkoz@redhat.com>
+
+       * include/Makefile.am (stamp-std-precompile): Add rule.
+       * include/Makefile.in: Regenerated.
+       
+2003-02-11 Jerry Quinn  <jlquinn@optonline.net>
+           Benjamin Kosnik  <benjamin@redhat.com>
+       
+       * include/bits/locale_facets.h (__num_base): Add _S_atoms_out.
+       Add indexes into this array.
+       (__num_base::_S_atoms): To _S_atoms_in.
+       (num_put::_M_insert): Rename to _M_pad.
+       (num_put::_M_convert_int): Adjust remove __mod, __modl arguments.
+       (num_put::_M_widen_int): Rename to _M_group_int.
+       (num_put::_M_widen_float): Rename to _M_group_float.    
+       * include/bits/locale_facets.tcc (__int_to_char): New inline
+       function and adapter functions.
+       (num_put::_M_group_int): Streamline.
+       (num_put::_M_group_float): Streamline.  
+       (num_put::_M_convert_int): Remove unused parameter names. Choose
+       large enough buffer for text.  Use __int_to_char instead of
+       __convert_from_v.  Formatted text is now at the end of the buffer.
+       (num_put::_M_convert_float): Preliminary fixups.
+       * src/locale-inst.cc (__convert_from_v<long long>): Add ifdef.
+       (__int_to_char<unsigned long long>): Same.
+       (__int_to_char<char, unsigned long>): New.
+       (__int_to_char<char, unsigned long long>): New.
+       (__int_to_char<wchar_t, unsigned long>): New.
+       (__int_to_char<wchar_t, unsigned long long>): New.
+       
+2003-02-11  Scott Snyder  <snyder@fnal.gov>
+
+       PR libstdc++/9659
+       * include/bits/fstream.tcc (seekoff): Avoid operator+
+       for pos_type.
+
+2003-02-11  Paolo Carlini  <pcarlini@unitus.it>
+
+       PR libstdc++/9320
+       * include/ext/stdio_filebuf.h
+       (stdio_filebuf(int, std::ios_base::openmode, bool, int_type),
+       stdio_filebuf(std::__c_file*, std::ios_base::openmode, int_type)):
+       Change to take a __size parameter of type size_t, not
+       of type (template parameter dependent) int_type.
+       * src/ios.cc (ios_base::Init::_S_ios_create): Change type of
+       size vars to size_t.
+       * testsuite/ext/stdio_filebuf.cc: Add.
+
+2003-02-11  Paolo Carlini  <pcarlini@unitus.it>
+            Petur Runolfsson  <peturr02@ru.is>
+
+       PR libstdc++/9318
+       * include/bits/streambuf.tcc (__copy_streambufs):
+       Don't conditionalize the copy to __testput.
+       * testsuite/27_io/streambuf_members.cc (test09, test10): Add.
+
+2002-02-11  DJ Delorie  <dj@redhat.com>
+
+       * acinclude.m4: Check for native targets that can't link at
+       this point in the build.
+       * aclocal.m4: Regenerate.
+       * configure: Regenerate.
+
+2003-02-08  John David Anglin  <dave.anglin@nrc-cnrc.gc.ca>
+
+       * hppa/atomicity.h (__Atomicity_lock<__inst>::_S_atomicity_lock):
+       Correct alignment.
+       (__exchange_and_add, __atomic_add): Use PA 2.0 ordered store to reset
+       lock.
+
+2003-02-07  Paolo Carlini  <pcarlini@unitus.it>
+
+       * testsuite/27_io/filebuf_virtuals.cc (test08): Fix for
+       unsigned char platforms.
+
+2003-02-06  Paolo Carlini  <pcarlini@unitus.it>
+
+       PR libstdc++/9562
+       * include/std/std_istream.h
+       (basic_istream::sentry::operator bool()): Make const.
+       * include/std/std_ostream.h
+       (basic_ostream::sentry::operator bool()): Likewise.
+       * testsuite/27_io/istream_sentry.cc (test03): Add.
+       * testsuite/27_io/ostream_sentry.cc: Add.
+
+2003-02-06  Paolo Carlini  <pcarlini@unitus.it>
+
+       PR libstdc++/9548
+       Implement resolution of DR 231 (Ready)
+       * include/bits/locale_facets.h (__num_base::_S_format_float):
+       Change declaration: return void, remove __prec parameter.
+       * src/locale.cc (__num_base::_S_format_float): Implement
+       resolution of DR 231.
+       * include/bits/locale_facets.tcc (num_put::_M_convert_float):
+       Tweak uses. Check for negative precision.
+       * testsuite/22_locale/num_put/put/char/6.cc: Add
+       * testsuite/22_locale/num_put/put/wchar_t/6.cc: Likewise.
+
+2003-02-06  Peter Soetens  <peter.soetens@mech.kuleuven.ac.be>
+
+       * config/io/basic_file_libio.h: Fixups.
+       * config/io/c_io_libio.h: Same.
+       * libio/Makefile.am: Same.
+       * libio/Makefile.in: Regenerated.
+       
+2003-02-06  Benjamin Kosnik  <bkoz@redhat.com>
+
+       * testsuite/22_locale/codecvt/encoding/wchar_t/1.cc (test01):
+       Explicitly use the "C" locale.
+       * testsuite/22_locale/codecvt/max_length/wchar_t/1.cc (test01): Same.
+       
+2003-02-06  Petur Runolfsson  <peturr02@ru.is>
+
+       DR 75
+       DR 305
+       PR libstdc++/9028 (partial)
+       PR libstdc++/9224
+       PR libstdc++/9246
+       PR libstdc++/9247
+
+       * src/codecvt.cc
+       (codecvt<wchar_t, char, mbstate_t>::do_encoding,
+       codecvt<wchar_t, char, mbstate_t>::do_length,
+       codecvt<wchar_t, char, mbstate_t>::do_max_length):
+       Move...
+       * config/locale/generic/codecvt_members.cc:  ...here.
+       * config/locale/gnu/codecvt_members.cc:  ...and here.
+
+       * config/locale/generic/codecvt_members.cc,
+       * config/locale/gnu/codecvt_members.cc
+       (codecvt<wchar_t, char, mbstate_t>::do_encoding
+       codecvt<wchar_t, char, mbstate_t>::do_in,
+       codecvt<wchar_t, char, mbstate_t>::do_length,
+       codecvt<wchar_t, char, mbstate_t>::do_max_length,
+       codecvt<wchar_t, char, mbstate_t>::do_out):
+       New implementation that handles stateless encodings,
+       including UTF-8.
+
+       * config/locale/generic/codecvt_members.cc,
+       * config/locale/gnu/codecvt_members.cc,
+       * config/locale/ieee_1003.1-2001/codecvt_specializations.h,
+       * include/bits/codecvt.h,
+       * src/codecvt.cc
+       (codecvt::length, codecvt::do_length):
+       Change type of first argument of length and do_length from
+       'const state_type&' to 'state_type&' according to DR 75.
+
+       * testsuite/22_locale/codecvt/always_noconv/wchar_t/1.cc:  Cleanup.
+       * testsuite/22_locale/codecvt/always_noconv/wchar_t/2.cc:  New test.
+       * testsuite/22_locale/codecvt/always_noconv/wchar_t/3.cc:  New test.
+       * testsuite/22_locale/codecvt/always_noconv/wchar_t/4.cc:  New test.
+       * testsuite/22_locale/codecvt/encoding/wchar_t/1.cc:
+       Cleanup and check for correct return value from encoding
+       for "C" locale.
+       * testsuite/22_locale/codecvt/encoding/wchar_t/2.cc:  New test.
+       * testsuite/22_locale/codecvt/encoding/wchar_t/3.cc:  New test.
+       * testsuite/22_locale/codecvt/encoding/wchar_t/4.cc:  New test.
+       * testsuite/22_locale/codecvt/in/wchar_t/1.cc:  Cleanup.
+       * testsuite/22_locale/codecvt/in/wchar_t/2.cc:  New test.
+       * testsuite/22_locale/codecvt/in/wchar_t/3.cc:  New test.
+       * testsuite/22_locale/codecvt/in/wchar_t/4.cc:  New test.
+       * testsuite/22_locale/codecvt/in/wchar_t/5.cc:  New test.
+       * testsuite/22_locale/codecvt/in/wchar_t/6.cc:  New test.
+       * testsuite/22_locale/codecvt/in/wchar_t/7.cc:  New test.
+       * testsuite/22_locale/codecvt/in/wchar_t/8.cc:  New test.
+       * testsuite/22_locale/codecvt/in/wchar_t/9.cc:  New test.
+       * testsuite/22_locale/codecvt/length/char/1.cc:  Cleanup.
+       * testsuite/22_locale/codecvt/length/char/2.cc:  New test.
+       * testsuite/22_locale/codecvt/length/wchar_t/1.cc:  Cleanup.
+       * testsuite/22_locale/codecvt/length/wchar_t/2.cc:  New test.
+       * testsuite/22_locale/codecvt/length/wchar_t/3.cc:  New test.
+       * testsuite/22_locale/codecvt/length/wchar_t/4.cc:  New test.
+       * testsuite/22_locale/codecvt/length/wchar_t/5.cc:  New test.
+       * testsuite/22_locale/codecvt/length/wchar_t/6.cc:  New test.
+       * testsuite/22_locale/codecvt/length/wchar_t/7.cc:  New test.
+       * testsuite/22_locale/codecvt/max_length/wchar_t/1.cc:  Cleanup.
+       * testsuite/22_locale/codecvt/max_length/wchar_t/2.cc:  New test.
+       * testsuite/22_locale/codecvt/max_length/wchar_t/3.cc:  New test.
+       * testsuite/22_locale/codecvt/max_length/wchar_t/4.cc:  New test.
+       * testsuite/22_locale/codecvt/out/wchar_t/1.cc:  Cleanup.
+       * testsuite/22_locale/codecvt/out/wchar_t/2.cc:  New test.
+       * testsuite/22_locale/codecvt/out/wchar_t/3.cc:  New test.
+       * testsuite/22_locale/codecvt/out/wchar_t/4.cc:  New test.
+       * testsuite/22_locale/codecvt/out/wchar_t/5.cc:  New test.
+       * testsuite/22_locale/codecvt/out/wchar_t/6.cc:  New test.
+       * testsuite/22_locale/codecvt/out/wchar_t/7.cc:  New test.
+       * testsuite/22_locale/codecvt/unicode/1.cc:  New test.
+       * testsuite/22_locale/codecvt/unshift/wchar_t/1.cc:  Cleanup.
+       * testsuite/22_locale/codecvt/unshift/wchar_t/2.cc:  New test.
+       * testsuite/22_locale/codecvt/unshift/wchar_t/3.cc:  New test.
+       * testsuite/22_locale/codecvt/unshfit/wchar_t/4.cc:  New test.
+
+2003-02-05  Benjamin Kosnik  <bkoz@redhat.com>
+
+       * include/bits/locale_facets.tcc (time_put::do_put): Use __write.
+       (money_put::do_put): Same.
+
+2003-02-05  Jerry Quinn  <jlquinn@optonline.net>
+
+       * include/bits/ios_base.h (ios_base): Document reserved storage.
+
+       * include/bits/locale_facets.h: (struct __pad): Comment on
+       implementation.
+       (__verify_grouping): Same.
+       (__add_grouping): Same.         
+       * include/bits/locale_facets.tcc (__verify_grouping): Move
+       comments to declaration.
+       (__add_grouping): Same.
+       
+       * include/bits/locale_facets.tcc: 
+       (__write<_CharT, _OutIter>): New function.
+       (__write<_CharT>): New function specialization.
+       (num_put::_M_insert): Remove explicit loop over iterator.  Use
+       __write.
+       (num_put::_M_widen_float): Remove __basefield. 
+       (num_put::_M_widen_int): Move __basefield to within grouping block.
+       
+       * include/bits/streambuf_iterator.h: Include <streambuf>.
+       (ostreambuf_iterator::_M_put): Add.
+
+2003-02-05  Paolo Carlini  <pcarlini@unitus.it>
+
+       * testsuite/26_numerics/valarray_name_lookup.cc: Fix typo.
+
+2003-02-04  Nathan Myers  <ncm@cantrip.org>
+
+       * testsuite/25_algorithms/min_max.cc (test02): Add.
+            
+2003-02-04  Paolo Carlini  <pcarlini@unitus.it>
+       
+       PR libstdc++/9439, PR libstdc++/9425
+       * config/io/basic_file_stdio.cc
+       (__basic_file<char>::seekoff, seekpos): Return -1L if
+       fseek fails.
+       * include/bits/fstream.tcc (basic_filebuf::seekoff):
+       Check _M_file.seekoff return value; always return
+       pos_type(off_type(-1)) in case of failure.
+       (basic_filebuf::pbackfail): Check this->seekoff return
+       value and return traits_type::eof() in case of failure.  
+       * testsuite/27_io/filebuf_virtuals.cc (test09): Add.
+
+2003-02-04  Jerry Quinn  <jlquinn@optonline.net>
+
+       * include/std/std_ostream.h (ostream::_M_write): Declare.       
+        * ostream.tcc (ostream::_M_write): Define.
+       (basic_ostream::write): Use it.
+       (operator<<(basic_ostream, _CharT)): Ditto.
+       (operator<<(basic_ostream, char)): Ditto.
+       (operator<<(basic_ostream, _CharT*)): Ditto.
+       (operator<<(basic_ostream, char*)): Ditto.
+       (operator<<(basic_ostream, basic_string)): Ditto.
+
+2003-02-04  Benjamin Kosnik  <bkoz@redhat.com>
+
+       * testsuite/26_numerics/valarray_name_lookup.cc: Fix.
+
+2002-02-04  Jonathan Wakely  <redi@gcc.gnu.org>
+
+       * docs/html/27_io/howto.html: Link to Dietmar Kuehl's IOStream page,
+       add HTML comment about updating links if numbering changes.
+
+2003-02-04  Paolo Carlini  <pcarlini@unitus.it>
+
+       PR libstdc++/9538
+       * include/bits/streambuf.tcc (sputbackc): Access
+       this->gptr()[-1] only if _M_in_beg < _M_in_cur.
+       * testsuite/27_io/filebuf_virtuals.cc (test08): Add.
+
+2003-02-04  Paolo Carlini  <pcarlini@unitus.it>
+
+       PR libstdc++/9507
+       * include/bits/fstream.tcc (open): If the 'ate' repositioning
+       operation fails, calls close _and_ returns a null pointer
+       to indicate failure (27.8.1.3,4).
+       * testsuite/27_io/filebuf_members.cc (test_06): Add.
+
+2003-02-04  Petur Runolfsson  <peturr02@ru.is>
+
+       * testsuite/27_io/filebuf_members.cc (test_04): Remove exit(0).
+
+2002-02-04  Jonathan Wakely  <redi@gcc.gnu.org>
+
+       * docs/html/27_io/howto.html: New section on stdio_filebuf.
+       * docs/html/ext/howto.html: Move stdio_filebuf notes to 27_io.
+       * docs/html/documentation.html: Regenerate.
+
 2003-02-04  Joseph S. Myers  <jsm@polyomino.org.uk>
 
        * docs/html/17_intro/porting.texi: Update to GFDL 1.2.
        * include/bits/valarray_before.h (_UnBase::operator[]): Apply unary
        operator.
 
-       * include/bits/valarray_before.h (__not_equal_to): Use != instead of ==.
+       * include/bits/valarray_before.h (__not_equal_to): Use != instead
+       of ==.
 
        * testsuite/26_numerics/valarray_operators.cc: New test.