about summary refs log tree commit diff
path: root/stdlib/groupingwc.c
diff options
context:
space:
mode:
authorAdhemerval Zanella <adhemerval.zanella@linaro.org>2020-04-13 18:09:20 -0300
committerAdhemerval Zanella <adhemerval.zanella@linaro.org>2023-12-29 16:48:51 -0300
commit283cd0eca5b50a77372f2f201acd24cd223db310 (patch)
tree8dee2fbab353697c67f2fbdb6d4b7b2137414478 /stdlib/groupingwc.c
parent5c2728e451fa15b97b5161ffd20cf647b54f39e6 (diff)
downloadglibc-azanella/bz23960-dirent.tar.gz
glibc-azanella/bz23960-dirent.tar.xz
glibc-azanella/bz23960-dirent.zip
linux: Set internal DIR filepos as off64_t (BZ #23960, BZ #24050) azanella/bz23960-dirent
It allows to obtain the expected entry offset on telldir and set
it correctly on seekdir on platforms where long int is smaller
than off64_t.

On such cases opendir creates a map entry between the DIR d_off
offset and the returned long int (the telldir return value).
seekdir will then set the correct offset from the internal list
using the telldir as the list key.

It also removes the overflow check on readdir and the returned value
will be truncated by the non-LFS off_t size.  As Joseph has noted
in BZ #23960 comment #22, d_off is an opaque value and since
telldir/seekdir works regardless of the returned dirent d_off value.

Finally it removes the requirement to check for overflow values on
telldir (BZ #24050).

Checked on x86_64-linux-gnu, i686-linux-gnu, powerpc-linux-gnu,
and arm-linux-gnueabihf.
Diffstat (limited to 'stdlib/groupingwc.c')
0 files changed, 0 insertions, 0 deletions