libstdc++-v3/
* testsuite/lib/libstdc++.exp (check_v3_target_fileio): Test lseek.
From-SVN: r128772
+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>
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