Skip to content

Commit

Permalink
2003-10-16 Petur Runolfsson <peturr02@ru.is>
Browse files Browse the repository at this point in the history
	PR libstdc++/8610
	PR libstdc++/11450
	PR libstdc++/11543
	PR libstdc++/12065
	* config/io/basic_file_stdio.cc (__basic_file::seekoff):
	Change return value from streampos to streamoff.
	(__basic_file::seekpos): Delete.
	* config/io/basic_file_stdio.h: Same.
	* config/io/c_io_stdio.h: Remove streamoff and wstreamsize typedefs.
	* include/Makefile.am (bits_headers): Add bits/postypes.h.
	* include/bits/char_traits.h: Include bits/postypes.h instead of
	bits/fpos.h.
	* include/bits/fstream.tcc (basic_filebuf::open,
	basic_filebuf::pbackfail): Don't use < or >= to compare pos_type
	values, use == and != instead.
	(basic_filebuf::_M_seek): Use explicit conversion from streamoff
	to pos_type.
	(basic_filebuf::imbue):  Don't use ! on pos_type values, use
	== instead. Don't use __check_facet(_M_codecvt) unless is_open().
	* include/bits/postypes.h: New file.
	Add __streamoff_base_type typedef, streamsize.
	(streamoff, streampos, wstreampos): Define typedefs, with
	streamoff defined as...
	(streamoff): New class. Document implementation defined
	aspects.
	(fpos): New implementation. Document implementation defined
	aspects.
	* include/bits/sstream.tcc (basic_stringbuf::seekpos): Use
	explicit conversion from pos_type to off_type.
	* include/std/std_iosfwd.h: Include bits/postypes.h instead
	of bits/fpos.h.
	* testsuite/27_io/basic_filebuf/seekoff/char/11543.cc: New test.
	* testsuite/27_io/basic_filebuf/seekoff/wchar_t/11543.cc: New test.
	* testsuite/27_io/fpos/11450.cc: New test.
	* testsuite/27_io/fpos/mbstate_t/12065.cc: New test.
	* testsuite/27_io/fpos/mbstate_t/4_neg.cc: New test.
	* testsuite/27_io/types/3.cc: New test.

2003-10-16  Benjamin Kosnik  <bkoz@redhat.com>

        * configure.host: Remove fpos_include_dir.
        * configure.ac: Remove FPOS_INC_SRCDIR.
        * configure: Regenerate.
        * acinclude.m4 (GLIBCXX_ENABLE_CSTDIO): Remove FPOS_H.
        * aclocal.m4: Regenerate.
        * include/Makefile.am (host_headers): Remove fpos.h.
        (bits_headers): Add postypes.h.
        * include/Makefile.in: Regenerate.
        * config/os/gnu-linux/fposh: Remove.
        * config/os/generic/fpos.h: Remove.

        * testsuite/27_io/basic_filebuf/seekoff/char/1-in.cc: Fixup.
        * testsuite/27_io/basic_filebuf/seekoff/char/1-io.cc: Same.
        * testsuite/27_io/basic_filebuf/seekoff/char/1-out.cc: Same.
        * testsuite/27_io/basic_filebuf/seekoff/char/2-in.cc: Same.
        * testsuite/27_io/basic_filebuf/seekoff/char/2-io.cc: Same.
        * testsuite/27_io/basic_filebuf/seekoff/char/2-out.cc: Same.
        * testsuite/27_io/basic_filebuf/seekpos/char/1-in.cc: Same.
        * testsuite/27_io/basic_filebuf/seekpos/char/1-io.cc: Same.
        * testsuite/27_io/basic_filebuf/seekpos/char/1-out.cc: Same.
        * testsuite/27_io/basic_filebuf/seekpos/char/2-in.cc: Same.
        * testsuite/27_io/basic_filebuf/seekpos/char/2-io.cc: Same.
        * testsuite/27_io/basic_filebuf/seekpos/char/2-out.cc: Same.
        * testsuite/27_io/basic_istream/seekg/char/2.cc: Same.
        * testsuite/27_io/basic_stringbuf/seekoff/char/1.cc: Same.
        * testsuite/27_io/basic_stringbuf/seekpos/char/1.cc: Same.
        * testsuite/27_io/fpos/mbstate_t/3.cc: Same.
        * testsuite/27_io/objects/char/10.cc: Same.


git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@72582 138bc75d-0d04-0410-961f-82ee72b054a4
  • Loading branch information
bkoz committed Oct 16, 2003
1 parent 487df8f commit b812c14
Show file tree
Hide file tree
Showing 41 changed files with 900 additions and 385 deletions.
71 changes: 71 additions & 0 deletions libstdc++-v3/ChangeLog
Original file line number Diff line number Diff line change
@@ -1,3 +1,74 @@
2003-10-16 Petur Runolfsson <peturr02@ru.is>

PR libstdc++/8610
PR libstdc++/11450
PR libstdc++/11543
PR libstdc++/12065
* config/io/basic_file_stdio.cc (__basic_file::seekoff):
Change return value from streampos to streamoff.
(__basic_file::seekpos): Delete.
* config/io/basic_file_stdio.h: Same.
* config/io/c_io_stdio.h: Remove streamoff and wstreamsize typedefs.
* include/Makefile.am (bits_headers): Add bits/postypes.h.
* include/bits/char_traits.h: Include bits/postypes.h instead of
bits/fpos.h.
* include/bits/fstream.tcc (basic_filebuf::open,
basic_filebuf::pbackfail): Don't use < or >= to compare pos_type
values, use == and != instead.
(basic_filebuf::_M_seek): Use explicit conversion from streamoff
to pos_type.
(basic_filebuf::imbue): Don't use ! on pos_type values, use
== instead. Don't use __check_facet(_M_codecvt) unless is_open().
* include/bits/postypes.h: New file.
Add __streamoff_base_type typedef, streamsize.
(streamoff, streampos, wstreampos): Define typedefs, with
streamoff defined as...
(streamoff): New class. Document implementation defined
aspects.
(fpos): New implementation. Document implementation defined
aspects.
* include/bits/sstream.tcc (basic_stringbuf::seekpos): Use
explicit conversion from pos_type to off_type.
* include/std/std_iosfwd.h: Include bits/postypes.h instead
of bits/fpos.h.
* testsuite/27_io/basic_filebuf/seekoff/char/11543.cc: New test.
* testsuite/27_io/basic_filebuf/seekoff/wchar_t/11543.cc: New test.
* testsuite/27_io/fpos/11450.cc: New test.
* testsuite/27_io/fpos/mbstate_t/12065.cc: New test.
* testsuite/27_io/fpos/mbstate_t/4_neg.cc: New test.
* testsuite/27_io/types/3.cc: New test.

2003-10-16 Benjamin Kosnik <bkoz@redhat.com>

* configure.host: Remove fpos_include_dir.
* configure.ac: Remove FPOS_INC_SRCDIR.
* configure: Regenerate.
* acinclude.m4 (GLIBCXX_ENABLE_CSTDIO): Remove FPOS_H.
* aclocal.m4: Regenerate.
* include/Makefile.am (host_headers): Remove fpos.h.
(bits_headers): Add postypes.h.
* include/Makefile.in: Regenerate.
* config/os/gnu-linux/fposh: Remove.
* config/os/generic/fpos.h: Remove.

* testsuite/27_io/basic_filebuf/seekoff/char/1-in.cc: Fixup.
* testsuite/27_io/basic_filebuf/seekoff/char/1-io.cc: Same.
* testsuite/27_io/basic_filebuf/seekoff/char/1-out.cc: Same.
* testsuite/27_io/basic_filebuf/seekoff/char/2-in.cc: Same.
* testsuite/27_io/basic_filebuf/seekoff/char/2-io.cc: Same.
* testsuite/27_io/basic_filebuf/seekoff/char/2-out.cc: Same.
* testsuite/27_io/basic_filebuf/seekpos/char/1-in.cc: Same.
* testsuite/27_io/basic_filebuf/seekpos/char/1-io.cc: Same.
* testsuite/27_io/basic_filebuf/seekpos/char/1-out.cc: Same.
* testsuite/27_io/basic_filebuf/seekpos/char/2-in.cc: Same.
* testsuite/27_io/basic_filebuf/seekpos/char/2-io.cc: Same.
* testsuite/27_io/basic_filebuf/seekpos/char/2-out.cc: Same.
* testsuite/27_io/basic_istream/seekg/char/2.cc: Same.
* testsuite/27_io/basic_stringbuf/seekoff/char/1.cc: Same.
* testsuite/27_io/basic_stringbuf/seekpos/char/1.cc: Same.
* testsuite/27_io/fpos/mbstate_t/3.cc: Same.
* testsuite/27_io/objects/char/10.cc: Same.

2003-10-16 Paolo Carlini <pcarlini@suse.de>

* src/locale.cc (locale::locale(const char*)): ... one
Expand Down
4 changes: 0 additions & 4 deletions libstdc++-v3/acinclude.m4
Original file line number Diff line number Diff line change
Expand Up @@ -1153,11 +1153,7 @@ AC_DEFUN(GLIBCXX_ENABLE_CSTDIO, [
;;
esac
dnl Set directory for fpos.h
FPOS_H=$fpos_include_dir
AC_SUBST(CSTDIO_H)
AC_SUBST(FPOS_H)
AC_SUBST(BASIC_FILE_H)
AC_SUBST(BASIC_FILE_CC)
])
Expand Down
4 changes: 0 additions & 4 deletions libstdc++-v3/aclocal.m4
Original file line number Diff line number Diff line change
Expand Up @@ -1166,11 +1166,7 @@ AC_DEFUN(GLIBCXX_ENABLE_CSTDIO, [
;;
esac
dnl Set directory for fpos.h
FPOS_H=$fpos_include_dir
AC_SUBST(CSTDIO_H)
AC_SUBST(FPOS_H)
AC_SUBST(BASIC_FILE_H)
AC_SUBST(BASIC_FILE_CC)
])
Expand Down
6 changes: 1 addition & 5 deletions libstdc++-v3/config/io/basic_file_stdio.cc
Original file line number Diff line number Diff line change
Expand Up @@ -260,14 +260,10 @@ namespace std
return __ret;
}

streampos
streamoff
__basic_file<char>::seekoff(streamoff __off, ios_base::seekdir __way)
{ return lseek(this->fd(), __off, __way); }

streampos
__basic_file<char>::seekpos(streampos __pos)
{ return lseek(this->fd(), __pos, ios_base::beg); }

int
__basic_file<char>::sync()
{ return fflush(_M_cfile); }
Expand Down
5 changes: 1 addition & 4 deletions libstdc++-v3/config/io/basic_file_stdio.h
Original file line number Diff line number Diff line change
Expand Up @@ -97,12 +97,9 @@ namespace std
streamsize
xsgetn(char* __s, streamsize __n);

streampos
streamoff
seekoff(streamoff __off, ios_base::seekdir __way);

streampos
seekpos(streampos __pos);

int
sync();

Expand Down
7 changes: 0 additions & 7 deletions libstdc++-v3/config/io/c_io_stdio.h
Original file line number Diff line number Diff line change
Expand Up @@ -38,13 +38,6 @@

namespace std
{
// for fpos.h
typedef long streamoff;
typedef ptrdiff_t streamsize; // Signed integral type
#if _GLIBCXX_USE_WCHAR_T
typedef ptrdiff_t wstreamsize;
#endif

typedef __gthread_mutex_t __c_lock;

// for basic_file.h
Expand Down
118 changes: 0 additions & 118 deletions libstdc++-v3/config/os/generic/fpos.h

This file was deleted.

Loading

0 comments on commit b812c14

Please sign in to comment.