diff options
author | Roland McGrath <roland@gnu.org> | 1996-01-17 10:00:23 +0000 |
---|---|---|
committer | Roland McGrath <roland@gnu.org> | 1996-01-17 10:00:23 +0000 |
commit | b6e9b25ba8590f942fe4b485de57093c2c242211 (patch) | |
tree | f875c42f00f3e156f47852a41f7760a8b8513eef | |
parent | Sun Jan 14 17:51:09 1996 Andreas Schwab <schwab@issan.informatik.uni-dortmu... (diff) | |
download | glibc-b6e9b25ba8590f942fe4b485de57093c2c242211.tar.gz glibc-b6e9b25ba8590f942fe4b485de57093c2c242211.tar.bz2 glibc-b6e9b25ba8590f942fe4b485de57093c2c242211.zip |
* sysdeps/unix/seekdir.c: Don't modify POS before seeking.cvs/libc-960117
* sysdeps/unix/telldir.c: Fix position calculation to account for
buffered data properly.
-rw-r--r-- | ChangeLog | 4 | ||||
-rw-r--r-- | sysdeps/unix/seekdir.c | 3 | ||||
-rw-r--r-- | sysdeps/unix/telldir.c | 4 |
3 files changed, 7 insertions, 4 deletions
@@ -1,5 +1,9 @@ Tue Jan 16 17:37:39 1996 Roland McGrath <roland@churchy.gnu.ai.mit.edu> + * sysdeps/unix/seekdir.c: Don't modify POS before seeking. + * sysdeps/unix/telldir.c: Fix position calculation to account for + buffered data properly. + * sysdeps/m68k/Makefile (crypt): Don't define if building a shared library. diff --git a/sysdeps/unix/seekdir.c b/sysdeps/unix/seekdir.c index b0a6f5e9d7..018f697c21 100644 --- a/sysdeps/unix/seekdir.c +++ b/sysdeps/unix/seekdir.c @@ -1,4 +1,4 @@ -/* Copyright (C) 1991, 1995 Free Software Foundation, Inc. +/* Copyright (C) 1991, 1995, 1996 Free Software Foundation, Inc. This file is part of the GNU C Library. The GNU C Library is free software; you can redistribute it and/or @@ -27,7 +27,6 @@ Cambridge, MA 02139, USA. */ void DEFUN(seekdir, (dirp, pos), DIR *dirp AND __off_t pos) { - pos -= dirp->__size - dirp->__offset; (void) __lseek(dirp->__fd, pos, SEEK_SET); dirp->__size = 0; dirp->__offset = 0; diff --git a/sysdeps/unix/telldir.c b/sysdeps/unix/telldir.c index 5dbf1ca3c1..2b611b0fca 100644 --- a/sysdeps/unix/telldir.c +++ b/sysdeps/unix/telldir.c @@ -1,4 +1,4 @@ -/* Copyright (C) 1991, 1995 Free Software Foundation, Inc. +/* Copyright (C) 1991, 1995, 1996 Free Software Foundation, Inc. This file is part of the GNU C Library. The GNU C Library is free software; you can redistribute it and/or @@ -39,5 +39,5 @@ DEFUN(telldir, (dirp), DIR *dirp) pos = __lseek(dirp->__fd, (off_t) 0, SEEK_CUR); if (pos == (off_t) -1) return (off_t) -1; - return pos + (dirp->__size - dirp->__offset); + return pos + dirp->__size - dirp->__offset; } |