libstdc++.exp (check_v3_target_fileio): Test lseek.

libstdc++-v3/
	* testsuite/lib/libstdc++.exp (check_v3_target_fileio): Test lseek.

From-SVN: r128772
This commit is contained in:
Richard Sandiford 2007-09-25 21:18:11 +00:00 committed by Richard Sandiford
parent 0a86bcc925
commit 23b72f1746
2 changed files with 11 additions and 2 deletions

View File

@ -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>

View File

@ -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