about summary refs log tree commit diff
path: root/libio/fileops.c
diff options
context:
space:
mode:
authorUlrich Drepper <drepper@redhat.com>2002-07-25 01:30:57 +0000
committerUlrich Drepper <drepper@redhat.com>2002-07-25 01:30:57 +0000
commit78ce5a3bbb6ce2ef0c43f5bd575708ff2c7715b9 (patch)
tree7d2ef4ff321a1ddd37f9a9a40399a60b5101bb94 /libio/fileops.c
parent66bff4092be47f02a6189f092b9dd1d8c6de2626 (diff)
downloadglibc-78ce5a3bbb6ce2ef0c43f5bd575708ff2c7715b9.tar.gz
glibc-78ce5a3bbb6ce2ef0c43f5bd575708ff2c7715b9.tar.xz
glibc-78ce5a3bbb6ce2ef0c43f5bd575708ff2c7715b9.zip
Update.
2002-07-24  Ulrich Drepper  <drepper@redhat.com>

	* libio/fileops.c (_IO_file_seekoff_mmap): Do use fp->_offset to
	compute current position.

	* stdio-common/tst-fseek.c (main): Improve error messages.

	* libio/tst-freopen.c (main): Remove unused variable.

	* libio/fileops.c (_IO_file_seekoff_mmap): Set fp->_offset after
	succesful seek call.  Simply error checking.

2002-07-25  Jakub Jelinek  <jakub@redhat.com>

	* config.h.in: Use __ASSEMBLER__ test macro not ASSEMBLER.
	* sysdeps/ia64/fpu/libm_support.h: Likewise.
Diffstat (limited to 'libio/fileops.c')
-rw-r--r--libio/fileops.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/libio/fileops.c b/libio/fileops.c
index c054d5e7d0..29412968db 100644
--- a/libio/fileops.c
+++ b/libio/fileops.c
@@ -932,8 +932,7 @@ _IO_file_seekoff_mmap (fp, offset, dir, mode)
      using a pushback buffer, but in the usual case has the same value as
      (fp->_IO_read_ptr - fp->_IO_buf_base).  */
   if (mode == 0)
-    return ((fp->_IO_buf_end - fp->_IO_buf_base)
-	    - (fp->_IO_read_end - fp->_IO_read_ptr));
+    return fp->_offset - (fp->_IO_read_end - fp->_IO_read_ptr);
 
   switch (dir)
     {