mirror of
https://github.com/python/cpython.git
synced 2025-08-04 17:08:35 +00:00
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>
This commit is contained in:
parent
0d2fe6bab0
commit
c454e934d3
5 changed files with 14 additions and 4 deletions
6
configure
generated
vendored
6
configure
generated
vendored
|
@ -17225,6 +17225,12 @@ if test "x$ac_cv_func_clock" = xyes
|
|||
then :
|
||||
printf "%s\n" "#define HAVE_CLOCK 1" >>confdefs.h
|
||||
|
||||
fi
|
||||
ac_fn_c_check_func "$LINENO" "closefrom" "ac_cv_func_closefrom"
|
||||
if test "x$ac_cv_func_closefrom" = xyes
|
||||
then :
|
||||
printf "%s\n" "#define HAVE_CLOSEFROM 1" >>confdefs.h
|
||||
|
||||
fi
|
||||
ac_fn_c_check_func "$LINENO" "close_range" "ac_cv_func_close_range"
|
||||
if test "x$ac_cv_func_close_range" = xyes
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue