aboutsummaryrefslogtreecommitdiff
path: root/libio
diff options
context:
space:
mode:
authorUlrich Drepper <drepper@redhat.com>2002-07-24 11:18:48 +0000
committerUlrich Drepper <drepper@redhat.com>2002-07-24 11:18:48 +0000
commit7a9a26813e387c4c6f73635bd04a005cfc0e2c08 (patch)
tree14e4d44f57fd9a2be87e294abf9cb8e754f0b1e9 /libio
parent405550bf78acc8ce8885e4b30986035533d08267 (diff)
downloadglibc-7a9a26813e387c4c6f73635bd04a005cfc0e2c08.tar
glibc-7a9a26813e387c4c6f73635bd04a005cfc0e2c08.tar.gz
glibc-7a9a26813e387c4c6f73635bd04a005cfc0e2c08.tar.bz2
glibc-7a9a26813e387c4c6f73635bd04a005cfc0e2c08.zip
Update.
2002-07-22 Philip Blundell <philb@gnu.org> * sysdeps/unix/sysv/linux/arm/errlist.c: Remove extra weak alias definiton of _old_sys_nerr. Define _old_sys_errlist as strong alias.
Diffstat (limited to 'libio')
-rw-r--r--libio/bug-fseek.c29
1 files changed, 29 insertions, 0 deletions
diff --git a/libio/bug-fseek.c b/libio/bug-fseek.c
index d8cd712f6a..1b60580b53 100644
--- a/libio/bug-fseek.c
+++ b/libio/bug-fseek.c
@@ -90,5 +90,34 @@ Got %d instead\n",
fclose (f);
+
+ if ((f = fopen (fname, "r+")) == (FILE *) NULL)
+ {
+ perror ("fopen(\"r+\")");
+ }
+
+ fread (buf, 3, 1, f);
+ if (ftell (f) != 3)
+ {
+ puts ("ftell failed");
+ return 1;
+ }
+ errno = 0;
+ if (fseek (f, -10, SEEK_CUR) == 0)
+ {
+ printf ("fseek() for r+ to before start of file worked!\n");
+ result = 1;
+ }
+ else if (errno != EINVAL)
+ {
+ printf ("\
+fseek() for r+ to before start of file did not set errno to EINVAL. \
+Got %d instead\n",
+ errno);
+ result = 1;
+ }
+
+ fclose (f);
+
return result;
}