summaryrefslogtreecommitdiff
path: root/libstdc++-v3/testsuite/27_io/basic_filebuf/seekpos/char
diff options
context:
space:
mode:
authorBenjamin Kosnik <bkoz@gcc.gnu.org>2003-10-16 22:37:53 +0000
committerBenjamin Kosnik <bkoz@gcc.gnu.org>2003-10-16 22:37:53 +0000
commit4c4809c175d40cfe30020c00e31959147005b411 (patch)
treeace03b23724b8ff5b0ec175af9fd1e176033b3cd /libstdc++-v3/testsuite/27_io/basic_filebuf/seekpos/char
parentdc17fe76617d48a706bc27d96f1bcb138c1f7b8c (diff)
downloadgcc-4c4809c175d40cfe30020c00e31959147005b411.tar.gz
[multiple changes]
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. From-SVN: r72582
Diffstat (limited to 'libstdc++-v3/testsuite/27_io/basic_filebuf/seekpos/char')
-rw-r--r--libstdc++-v3/testsuite/27_io/basic_filebuf/seekpos/char/1-in.cc6
-rw-r--r--libstdc++-v3/testsuite/27_io/basic_filebuf/seekpos/char/1-io.cc6
-rw-r--r--libstdc++-v3/testsuite/27_io/basic_filebuf/seekpos/char/1-out.cc6
-rw-r--r--libstdc++-v3/testsuite/27_io/basic_filebuf/seekpos/char/2-in.cc6
-rw-r--r--libstdc++-v3/testsuite/27_io/basic_filebuf/seekpos/char/2-io.cc6
-rw-r--r--libstdc++-v3/testsuite/27_io/basic_filebuf/seekpos/char/2-out.cc6
6 files changed, 18 insertions, 18 deletions
diff --git a/libstdc++-v3/testsuite/27_io/basic_filebuf/seekpos/char/1-in.cc b/libstdc++-v3/testsuite/27_io/basic_filebuf/seekpos/char/1-in.cc
index 55345b9748a..bf7756b7a1c 100644
--- a/libstdc++-v3/testsuite/27_io/basic_filebuf/seekpos/char/1-in.cc
+++ b/libstdc++-v3/testsuite/27_io/basic_filebuf/seekpos/char/1-in.cc
@@ -63,7 +63,7 @@ void test05()
// beg
pt_1 = fb.pubseekoff(78, ios_base::beg);
- off_1 = pt_1;
+ off_1 = off_type(pt_1);
VERIFY( off_1 > 0 );
c1 = fb.snextc(); //current in pointer +1
VERIFY( c1 == 't' );
@@ -77,7 +77,7 @@ void test05()
c3 = fb.sgetc();
fb.pubsync(); //resets pointers
pt_2 = fb.pubseekpos(pt_1);
- off_2 = pt_2;
+ off_2 = off_type(pt_2);
VERIFY( off_1 == off_2 );
c3 = fb.snextc(); //current in pointer +1
VERIFY( c2 == traits_type::eof() );
@@ -85,7 +85,7 @@ void test05()
// end
pt_1 = fb.pubseekoff(0, ios_base::end);
- off_1 = pt_1;
+ off_1 = off_type(pt_1);
VERIFY( off_1 > off_2 );
fb.sputn("\nof the wonderful things he does!!\nok", 37);
fb.pubsync();
diff --git a/libstdc++-v3/testsuite/27_io/basic_filebuf/seekpos/char/1-io.cc b/libstdc++-v3/testsuite/27_io/basic_filebuf/seekpos/char/1-io.cc
index 23f663cda0a..eea3be8108f 100644
--- a/libstdc++-v3/testsuite/27_io/basic_filebuf/seekpos/char/1-io.cc
+++ b/libstdc++-v3/testsuite/27_io/basic_filebuf/seekpos/char/1-io.cc
@@ -63,7 +63,7 @@ void test05()
// beg
pt_1 = fb.pubseekoff(78, ios_base::beg);
- off_1 = pt_1;
+ off_1 = off_type(pt_1);
VERIFY( off_1 > 0 );
c1 = fb.snextc(); //current in pointer +1
VERIFY( c1 == 't' );
@@ -77,14 +77,14 @@ void test05()
c3 = fb.sgetc();
fb.pubsync(); //resets pointers
pt_2 = fb.pubseekpos(pt_1);
- off_2 = pt_2;
+ off_2 = off_type(pt_2);
VERIFY( off_1 == off_2 );
c3 = fb.snextc(); //current in pointer +1
VERIFY( c2 == c3 );
// end
pt_1 = fb.pubseekoff(0, ios_base::end);
- off_1 = pt_1;
+ off_1 = off_type(pt_1);
VERIFY( off_1 > off_2 );
fb.sputn("\nof the wonderful things he does!!\nok", 37);
fb.pubsync();
diff --git a/libstdc++-v3/testsuite/27_io/basic_filebuf/seekpos/char/1-out.cc b/libstdc++-v3/testsuite/27_io/basic_filebuf/seekpos/char/1-out.cc
index 8773f6e00bb..cc29a27204d 100644
--- a/libstdc++-v3/testsuite/27_io/basic_filebuf/seekpos/char/1-out.cc
+++ b/libstdc++-v3/testsuite/27_io/basic_filebuf/seekpos/char/1-out.cc
@@ -64,7 +64,7 @@ void test05()
// beg
pt_1 = fb.pubseekoff(78, ios_base::beg);
- off_1 = pt_1;
+ off_1 = off_type(pt_1);
VERIFY( off_1 > 0 );
c1 = fb.snextc(); //current in pointer +1
VERIFY( c1 == traits_type::eof() );
@@ -78,7 +78,7 @@ void test05()
c3 = fb.sgetc();
fb.pubsync(); //resets pointers
pt_2 = fb.pubseekpos(pt_1);
- off_2 = pt_2;
+ off_2 = off_type(pt_2);
VERIFY( off_1 == off_2 );
c3 = fb.snextc(); //current in pointer +1
VERIFY( c2 != c3 );
@@ -86,7 +86,7 @@ void test05()
// end
pt_1 = fb.pubseekoff(0, ios_base::end);
- off_1 = pt_1;
+ off_1 = off_type(pt_1);
VERIFY( off_1 > off_2 );
fb.sputn("\nof the wonderful things he does!!\nok", 37);
fb.pubsync();
diff --git a/libstdc++-v3/testsuite/27_io/basic_filebuf/seekpos/char/2-in.cc b/libstdc++-v3/testsuite/27_io/basic_filebuf/seekpos/char/2-in.cc
index cec2cdf748f..4bead04ca9b 100644
--- a/libstdc++-v3/testsuite/27_io/basic_filebuf/seekpos/char/2-in.cc
+++ b/libstdc++-v3/testsuite/27_io/basic_filebuf/seekpos/char/2-in.cc
@@ -64,7 +64,7 @@ void test05()
// beg
pt_1 = fb.pubseekoff(78, ios_base::beg);
- off_1 = pt_1;
+ off_1 = off_type(pt_1);
VERIFY( off_1 > 0 );
c1 = fb.snextc(); //current in pointer +1
VERIFY( c1 == 't' );
@@ -78,7 +78,7 @@ void test05()
c3 = fb.sgetc();
fb.pubsync(); //resets pointers
pt_2 = fb.pubseekpos(pt_1);
- off_2 = pt_2;
+ off_2 = off_type(pt_2);
VERIFY( off_1 == off_2 );
c3 = fb.snextc(); //current in pointer +1
VERIFY( c2 == traits_type::eof() );
@@ -86,7 +86,7 @@ void test05()
// end
pt_1 = fb.pubseekoff(0, ios_base::end);
- off_1 = pt_1;
+ off_1 = off_type(pt_1);
VERIFY( off_1 > off_2 );
fb.sputn("\nof the wonderful things he does!!\nok", 37);
fb.pubsync();
diff --git a/libstdc++-v3/testsuite/27_io/basic_filebuf/seekpos/char/2-io.cc b/libstdc++-v3/testsuite/27_io/basic_filebuf/seekpos/char/2-io.cc
index c564e1bda28..73fb8b55ff6 100644
--- a/libstdc++-v3/testsuite/27_io/basic_filebuf/seekpos/char/2-io.cc
+++ b/libstdc++-v3/testsuite/27_io/basic_filebuf/seekpos/char/2-io.cc
@@ -63,7 +63,7 @@ void test05()
// beg
pt_1 = fb.pubseekoff(78, ios_base::beg);
- off_1 = pt_1;
+ off_1 = off_type(pt_1);
VERIFY( off_1 > 0 );
c1 = fb.snextc(); //current in pointer +1
VERIFY( c1 == 't' );
@@ -77,14 +77,14 @@ void test05()
c3 = fb.sgetc();
fb.pubsync(); //resets pointers
pt_2 = fb.pubseekpos(pt_1);
- off_2 = pt_2;
+ off_2 = off_type(pt_2);
VERIFY( off_1 == off_2 );
c3 = fb.snextc(); //current in pointer +1
VERIFY( c2 == c3 );
// end
pt_1 = fb.pubseekoff(0, ios_base::end);
- off_1 = pt_1;
+ off_1 = off_type(pt_1);
VERIFY( off_1 > off_2 );
fb.sputn("\nof the wonderful things he does!!\nok", 37);
fb.pubsync();
diff --git a/libstdc++-v3/testsuite/27_io/basic_filebuf/seekpos/char/2-out.cc b/libstdc++-v3/testsuite/27_io/basic_filebuf/seekpos/char/2-out.cc
index a919f4fc32e..df145735df2 100644
--- a/libstdc++-v3/testsuite/27_io/basic_filebuf/seekpos/char/2-out.cc
+++ b/libstdc++-v3/testsuite/27_io/basic_filebuf/seekpos/char/2-out.cc
@@ -64,7 +64,7 @@ void test05()
// beg
pt_1 = fb.pubseekoff(78, ios_base::beg);
- off_1 = pt_1;
+ off_1 = off_type(pt_1);
VERIFY( off_1 > 0 );
c1 = fb.snextc(); //current in pointer +1
VERIFY( c1 == traits_type::eof() );
@@ -78,7 +78,7 @@ void test05()
c3 = fb.sgetc();
fb.pubsync(); //resets pointers
pt_2 = fb.pubseekpos(pt_1);
- off_2 = pt_2;
+ off_2 = off_type(pt_2);
VERIFY( off_1 == off_2 );
c3 = fb.snextc(); //current in pointer +1
VERIFY( c2 != c3 );
@@ -86,7 +86,7 @@ void test05()
// end
pt_1 = fb.pubseekoff(0, ios_base::end);
- off_1 = pt_1;
+ off_1 = off_type(pt_1);
VERIFY( off_1 > off_2 );
fb.sputn("\nof the wonderful things he does!!\nok", 37);
fb.pubsync();