]> git.ipfire.org Git - thirdparty/Python/cpython.git/commit
gh-112970: Detect and use closefrom() when available (#112969)
authorSam James <sam@gentoo.org>
Tue, 12 Dec 2023 10:25:27 +0000 (10:25 +0000)
committerGitHub <noreply@github.com>
Tue, 12 Dec 2023 10:25:27 +0000 (11:25 +0100)
commitc454e934d36193709aadba8e8e28739790086b95
treeab546e682c4bd2be964d8eea9ddbc9fa630850ab
parent0d2fe6bab01541301abe98a23ee15a16f493fe74
gh-112970: Detect and use closefrom() when available (#112969)

glibc-2.34 implements closefrom(3) using the same semantics as on BSD.
Check for closefrom() in configure and use the check result in
fileutils.c, rather than hardcoding a FreeBSD check.

Some implementations of closefrom() return an int. Explicitly discard
the return value by casting it to void, to avoid future compiler
warnings.

Signed-off-by: Sam James <sam@gentoo.org>
Misc/NEWS.d/next/Library/2023-12-11-16-13-15.gh-issue-112970.87jmKP.rst [new file with mode: 0644]
Python/fileutils.c
configure
configure.ac
pyconfig.h.in