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.
-/* 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
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;
-/* 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
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;
}