gcc/libstdc++-v3
Paolo Carlini 71b460210a Nathan C.
2003-06-24  Paolo Carlini  <pcarlini@unitus.it>
            Nathan C. Myers  <ncm-nospam@cantrip.org>

	* include/std/std_fstream.h (_M_filepos): Remove.
	(_M_reading, _M_writing): New, encode the various I/O modes:
	'read', 'write' and 'uncommitted'.
	(sync): If there is something to flush, do it, then go to
	'uncommitted' mode.
	* include/bits/fstream.tcc (_M_set_buffer): Overhaul to deal
	with three different cases: __off > 0 (upon underflow),
	__off == 0 (upon overflow), __off == -1 (upon open, setbuf,
	seekoff/pos).
	(_M_underflow): Don't call overflow, set _M_reading to true
	on success, tweak.
	(pbackfail): Set _M_reading to true on pback creation, tweak.
	(overflow): Don't seek, deal with overflow in 'uncommitted' mode,
	set _M_writing to true on success, tweak.
	(seekoff): Simplify, set _M_reading, _M_writing to false, call
	_M_set_buffer(-1) ('uncommitted').
	(open, close, setbuf): Set _M_reading, _M_writing to false and
	call _M_set_buffer(-1), tweak.
	(basic_filebuf): Don't set _M_buf_unified.
	(_M_destroy_internal_buffer): Don't call setg and setp.
	* include/ext/stdio_filebuf.h (stdio_filebuf): Use _M_reading,
	_M_writing and _M_set_buffer(-1).
	* include/std/std_streambuf.h (_M_move_out_cur, _M_move_in_cur,
	_M_out_lim, _M_buf_unified): Remove.
	(basic_streambuf): Don't set _M_out_lim and _M_buf_unified.
	(setp): Don't set _M_out_lim.
	* testsuite/27_io/basic_filebuf/sbumpc/char/1-io.cc: Fix for
	the new logic ('read', 'write' and 'uncommitted' modes): e.g.,
	upon open the mode is 'uncommitted' and therefore the put area
	pointers are null.
	* testsuite/27_io/basic_filebuf/sbumpc/char/1-out.cc: Ditto.
	* testsuite/27_io/basic_filebuf/seekoff/char/3-io.cc: Ditto.
	* testsuite/27_io/basic_filebuf/seekpos/char/3-io.cc: Ditto.
	* testsuite/27_io/basic_filebuf/setbuf/char/1.cc: Ditto.
	* testsuite/27_io/basic_filebuf/sgetc/char/1-io.cc: Ditto.
	* testsuite/27_io/basic_filebuf/sgetc/char/1-out.cc: Ditto.
	* testsuite/27_io/basic_filebuf/sgetn/char/1-io.cc: Ditto.
	* testsuite/27_io/basic_filebuf/sgetn/char/1-out.cc: Ditto.
	* testsuite/27_io/basic_filebuf/snextc/char/1-io.cc: Ditto.
	* testsuite/27_io/basic_filebuf/snextc/char/1-out.cc: Ditto.
	* testsuite/27_io/basic_filebuf/sputbackc/char/1-io.cc: Ditto.
	* testsuite/27_io/basic_filebuf/sputbackc/char/1-out.cc: Ditto.
	* testsuite/27_io/basic_filebuf/sputc/char/1-io.cc: Ditto.
	* testsuite/27_io/basic_filebuf/sputc/char/1-out.cc: Ditto.
	* testsuite/27_io/basic_filebuf/sputc/char/9701-2.cc: Ditto.
	* testsuite/27_io/basic_filebuf/sputn/char/1-io.cc: Ditto.
	* testsuite/27_io/basic_filebuf/sputn/char/1-out.cc: Ditto.
	* testsuite/27_io/basic_filebuf/sputn/char/9701-1.cc: Ditto.
	* testsuite/27_io/basic_filebuf/sungetc/char/1-io.cc: Ditto.
	* testsuite/27_io/basic_filebuf/sungetc/char/1-out.cc: Ditto.

	* include/bits/fstream.tcc (showmanyc): Use only the
	documented derivation interface to basic_streambuf (gptr(),
	setg(), etc.) to work right with user specializations.
	* include/bits/streambuf.tcc (sbumpc, sputbackc, sungetc,
	sputc, xsgetn, xsputn, __copy_streambufs): Likewise.
	* include/std/std_streambuf.h (in_avail, sgetc, uflow, stossc):
	Likewise.
	* include/std/std_fstream.h (_M_create_pback, _M_destroy_pback,
	xsgetn): Likewise.

Co-Authored-By: Nathan C. Myers <ncm-nospam@cantrip.org>

From-SVN: r68420
2003-06-24 13:48:11 +00:00
..
config configure.host (freebsd*): Set abi_baseline_pair. 2003-06-24 04:03:30 +00:00
docs libstdc++-assign.txt: Update address. 2003-06-23 20:31:31 +00:00
include Nathan C. 2003-06-24 13:48:11 +00:00
libmath acinclude.m4 (GLIBCPP_ENABLE_CSTDIO): Simplify. 2003-06-12 03:24:16 +00:00
libsupc++ acinclude.m4 (GLIBCPP_ENABLE_CSTDIO): Simplify. 2003-06-12 03:24:16 +00:00
po acinclude.m4 (GLIBCPP_ENABLE_CSTDIO): Simplify. 2003-06-12 03:24:16 +00:00
scripts testsuite_performance.h (time_counter): New. 2003-06-19 04:00:59 +00:00
src allocator-inst.cc: Explicitly instantiate. 2003-06-13 05:45:57 +00:00
testsuite Nathan C. 2003-06-24 13:48:11 +00:00
ChangeLog Nathan C. 2003-06-24 13:48:11 +00:00
ChangeLog-2000 ChangeLog, [...]: Fix spelling errors. 2001-11-23 16:29:02 +00:00
ChangeLog-2001 c_locale_gnu.cc: Same errno fixes as generic. 2002-01-31 02:05:17 +00:00
ChangeLog-2002 tables.html: Finished now. 2003-01-12 02:56:50 +00:00
Makefile.am scripts: New. 2003-06-18 01:52:08 +00:00
Makefile.in Makefile.am (new-abi-baseline): Create baseline directory. 2003-06-18 07:09:50 +02:00
README 002-03-05 Benjamin Kosnik <bkoz@redhat.com> 2002-03-05 21:14:20 +00:00
acconfig.h acconfig.h (_GLIBCPP_USE_NLS): New symbol. 2003-05-02 02:53:28 +00:00
acinclude.m4 Makefile.am (new-abi-baseline): Create baseline directory. 2003-06-18 07:09:50 +02:00
aclocal.m4 Makefile.am (new-abi-baseline): Create baseline directory. 2003-06-18 07:09:50 +02:00
config.h.in acinclude.m4 (GLIBCPP_ENABLE_CSTDIO): Simplify. 2003-06-12 03:24:16 +00:00
configure Makefile.am (extract_symvers): Revert accidental change. 2003-06-19 21:54:04 +02:00
configure.host configure.host (freebsd*): Set abi_baseline_pair. 2003-06-24 04:03:30 +00:00
configure.in Makefile.am (extract_symvers): Revert accidental change. 2003-06-19 21:54:04 +02:00

README

file: libstdc++-v3/README

New users may wish to point their web browsers to the file
documentation.html in the 'docs/html' subdirectory.  It contains brief
building instructions and notes on how to configure the library in
interesting ways.

Instructions for configuring and building appear in
docs/html/install.html.

This directory contains the files needed to create an ISO Standard C++
Library.

It has subdirectories:

  docs
    Files in HTML and text format that document usage, quirks of the
    implementation, and contributor checklists.

  include
    All header files for the C++ library are within this directory,
    modulo specific runtime-related files that are in the libsupc++
    directory.

    include/std
      Files meant to be found by #include <name> directives in
      standard-conforming user programs.  

    include/c
      Headers intended to directly include standard C headers. 
      [NB: this can be enabled via --enable-cheaders=c]

    include/c_std
      Headers intended to include standard C headers, and put select
      names into the std:: namespace.
      [NB: this is the default, and is the same as --enable-cheaders=c_std]

    include/c_shadow
      Headers intended to shadow standard C headers provided by an
      underlying OS or C library, and other headers depended on directly
      by C++ headers (e.g. unistd.h).  These are meant to wrap the names
      defined there into the _C_legacy namespace.
      [NB: this can be enabled via --enable-cheaders=c_shadow]

    include/bits
      Files included by standard headers and by other files in
      the bits directory. 

    include/backward
      Headers provided for backward compatibility, such as <iostream.h>.
      They are not used in this library.

    include/ext
      Headers that define extensions to the standard library.  No
      standard header refers to any of them.

  src
    Files that are used in constructing the library, but are not
    installed.

  testsuites/[thread, 17_* to 27_*]
    Test programs are here, and may be used to begin to exercise the 
    library.  Support for "make check" and "make check-install" is
    complete, and runs through all the subdirectories here when this
    command is issued from the build directory.  Please note that
    "make check" requires DejaGNU 1.4 or later to be installed.  Please
    note that "make check-script" calls the script mkcheck, which
    requires bash, and which may need the paths to bash adjusted to
    work properly, as /bin/bash is assumed.

Other subdirectories contain variant versions of certain files
that are meant to be copied or linked by the configure script.
Currently these are:

  config/cpu
  config/os
  config/io
  config/locale

In addition, three subdirectories are convenience libraries:

  libio
    Contains the subset of the GNU libio library needed for
    C++. Currently not used.

  libmath
    Support routines needed for C++ math. Only needed if the
    underlying "C" implementation is non-existent, in particular
    required or optimal long double, long long, and C99 functionality.

  libsupc++
    Contains the runtime library for C++, including exception
    handling and memory allocation and deallocation, RTTI, terminate
    handlers, etc.

Note that glibc also has a bits/ subdirectory.  We will either
need to be careful not to collide with names in its bits/
directory; or rename bits to (e.g.) cppbits/.

In files throughout the system, lines marked with an "XXX" indicate
a bug or incompletely-implemented feature.  Lines marked "XXX MT"
indicate a place that may require attention for multi-thread safety.