aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRichard Sandiford <rsandifo@nildram.co.uk>2007-09-25 21:18:11 +0000
committerRichard Sandiford <rsandifo@gcc.gnu.org>2007-09-25 21:18:11 +0000
commit23b72f17460354ac10b83db1ad1a4c854ea5edfd (patch)
treedef41e46a510e20b9fcb9c60b98e2eacc72a9ff2
parent0a86bcc9251e57dcb5dd33601171b456ef493cd5 (diff)
downloadgcc-23b72f17460354ac10b83db1ad1a4c854ea5edfd.zip
gcc-23b72f17460354ac10b83db1ad1a4c854ea5edfd.tar.gz
gcc-23b72f17460354ac10b83db1ad1a4c854ea5edfd.tar.bz2
libstdc++.exp (check_v3_target_fileio): Test lseek.
libstdc++-v3/ * testsuite/lib/libstdc++.exp (check_v3_target_fileio): Test lseek. From-SVN: r128772
-rw-r--r--libstdc++-v3/ChangeLog4
-rw-r--r--libstdc++-v3/testsuite/lib/libstdc++.exp9
2 files changed, 11 insertions, 2 deletions
diff --git a/libstdc++-v3/ChangeLog b/libstdc++-v3/ChangeLog
index 9a27bde..f274975 100644
--- a/libstdc++-v3/ChangeLog
+++ b/libstdc++-v3/ChangeLog
@@ -1,3 +1,7 @@
+2007-09-25 Richard Sandiford <rsandifo@nildram.co.uk>
+
+ * testsuite/lib/libstdc++.exp (check_v3_target_fileio): Test lseek.
+
2007-09-17 Benjamin Kosnik <bkoz@redhat.com>
Chalathip Thumkanon <chalathip@gmail.com>
diff --git a/libstdc++-v3/testsuite/lib/libstdc++.exp b/libstdc++-v3/testsuite/lib/libstdc++.exp
index 4ba9dc5..6603d71 100644
--- a/libstdc++-v3/testsuite/lib/libstdc++.exp
+++ b/libstdc++-v3/testsuite/lib/libstdc++.exp
@@ -599,15 +599,20 @@ proc check_v3_target_fileio { } {
puts $f "int main ()"
puts $f "{"
puts $f " int fd = open (\".\", O_RDONLY);"
+ puts $f " int ret = 0;"
puts $f " if (fd == -1)"
puts $f " {"
puts $f " int err = errno;"
puts $f " if (err == EIO || err == ENOSYS)"
- puts $f " return 1;"
+ puts $f " ret = 1;"
puts $f " }"
puts $f " else"
+ puts $f " {"
+ puts $f " if (lseek (fd, 0, SEEK_CUR) == -1)"
+ puts $f " ret = 1;"
puts $f " close (fd);"
- puts $f " return 0;"
+ puts $f " }"
+ puts $f " return ret;"
puts $f "}"
close $f