Skip to content

Commit cd16fcd

Browse files
benjaminpjmroot
authored andcommitted
bpo-34652: Use AC_CHECK_FUNCS for lchmod
A fix for 69e9691, which resulted in lchmod being disabled on all platforms, not just Linux. (cherry picked from commit ed709d5)
1 parent 22de4ce commit cd16fcd

File tree

3 files changed

+10
-1
lines changed

3 files changed

+10
-1
lines changed

configure

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10632,10 +10632,16 @@ done
1063210632
# links. Some libc implementations have a stub lchmod implementation that always
1063310633
# returns an error.
1063410634
if test "$MACHDEP" != linux; then
10635+
for ac_func in lchmod
10636+
do :
1063510637
ac_fn_c_check_func "$LINENO" "lchmod" "ac_cv_func_lchmod"
1063610638
if test "x$ac_cv_func_lchmod" = xyes; then :
10639+
cat >>confdefs.h <<_ACEOF
10640+
#define HAVE_LCHMOD 1
10641+
_ACEOF
1063710642
1063810643
fi
10644+
done
1063910645
1064010646
fi
1064110647

configure.ac

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3138,7 +3138,7 @@ AC_CHECK_FUNCS(alarm setitimer getitimer bind_textdomain_codeset chown \
31383138
# links. Some libc implementations have a stub lchmod implementation that always
31393139
# returns an error.
31403140
if test "$MACHDEP" != linux; then
3141-
AC_CHECK_FUNC(lchmod)
3141+
AC_CHECK_FUNCS(lchmod)
31423142
fi
31433143

31443144
# For some functions, having a definition is not sufficient, since

pyconfig.h.in

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -439,6 +439,9 @@
439439
/* Define to 1 if you have the 'lchflags' function. */
440440
#undef HAVE_LCHFLAGS
441441

442+
/* Define to 1 if you have the `lchmod' function. */
443+
#undef HAVE_LCHMOD
444+
442445
/* Define to 1 if you have the `lchown' function. */
443446
#undef HAVE_LCHOWN
444447

0 commit comments

Comments
 (0)