diff options
author | jilles <jilles@FreeBSD.org> | 2016-09-07 21:03:11 +0000 |
---|---|---|
committer | jilles <jilles@FreeBSD.org> | 2016-09-07 21:03:11 +0000 |
commit | f0d89c26193ca3c296ea081129d48e90906d5223 (patch) | |
tree | 9bef2b19eb421ab08e87c289826873233f6664e3 /lib/libc/stdio/fgets.c | |
parent | 3d6ef0e370cc6b7fa08ca5b6e64a863200a84501 (diff) | |
download | FreeBSD-src-f0d89c26193ca3c296ea081129d48e90906d5223.zip FreeBSD-src-f0d89c26193ca3c296ea081129d48e90906d5223.tar.gz |
MFC r305154: directory(3): Deprecate readdir_r(). Clarify dirent buffers.
In existing implementations including FreeBSD, there is no reason to use
readdir_r() in the common case where potentially multiple threads each list
their own directory. Code using readdir() is simpler.
What's more, although readdir_r() can safely be used on FreeBSD because
NAME_MAX is forced to 255, it cannot be used safely on systems where
{NAME_MAX} is not fixed. As a concrete example, FAT/NTFS filenames can be up
to 255 UTF-16 code units long, which can be up to 765 UTF-8 bytes.
Deprecating readdir_r() in POSIX has been proposed in
http://www.austingroupbugs.net/view.php?id=696
and glibc wants to deprecate it as well.
Diffstat (limited to 'lib/libc/stdio/fgets.c')
0 files changed, 0 insertions, 0 deletions