diff options
author | Joshua Root <jmr@macports.org> | 2019-04-12 15:51:35 (GMT) |
---|---|---|
committer | Benjamin Peterson <benjamin@python.org> | 2019-04-12 15:51:35 (GMT) |
commit | 0fd5a7338cbaf7a61ab5bad270c1b0311047d0f9 (patch) | |
tree | b1f5d9aa3e72f268f566f60af13fbc891a173b1b | |
parent | 22de4ce498b656063e236350e8404981c13e1cd8 (diff) | |
download | cpython-0fd5a7338cbaf7a61ab5bad270c1b0311047d0f9.zip cpython-0fd5a7338cbaf7a61ab5bad270c1b0311047d0f9.tar.gz cpython-0fd5a7338cbaf7a61ab5bad270c1b0311047d0f9.tar.bz2 |
bpo-34652: Use AC_CHECK_FUNCS for lchmod. (GH-12799)
A fix for 69e96910153219b0b15a18323b917bd74336d229, which resulted in lchmod being disabled on all platforms, not just Linux.
(cherry picked from commit ed709d5699716bf7237856dc20aba321e2dfff6d)
-rwxr-xr-x | configure | 6 | ||||
-rw-r--r-- | configure.ac | 2 | ||||
-rw-r--r-- | pyconfig.h.in | 3 |
3 files changed, 10 insertions, 1 deletions
@@ -10632,10 +10632,16 @@ done # links. Some libc implementations have a stub lchmod implementation that always # returns an error. if test "$MACHDEP" != linux; then + for ac_func in lchmod +do : ac_fn_c_check_func "$LINENO" "lchmod" "ac_cv_func_lchmod" if test "x$ac_cv_func_lchmod" = xyes; then : + cat >>confdefs.h <<_ACEOF +#define HAVE_LCHMOD 1 +_ACEOF fi +done fi diff --git a/configure.ac b/configure.ac index 7396c1f..13b40f2 100644 --- a/configure.ac +++ b/configure.ac @@ -3138,7 +3138,7 @@ AC_CHECK_FUNCS(alarm setitimer getitimer bind_textdomain_codeset chown \ # links. Some libc implementations have a stub lchmod implementation that always # returns an error. if test "$MACHDEP" != linux; then - AC_CHECK_FUNC(lchmod) + AC_CHECK_FUNCS(lchmod) fi # For some functions, having a definition is not sufficient, since diff --git a/pyconfig.h.in b/pyconfig.h.in index f828677..11c4a66 100644 --- a/pyconfig.h.in +++ b/pyconfig.h.in @@ -439,6 +439,9 @@ /* Define to 1 if you have the 'lchflags' function. */ #undef HAVE_LCHFLAGS +/* Define to 1 if you have the `lchmod' function. */ +#undef HAVE_LCHMOD + /* Define to 1 if you have the `lchown' function. */ #undef HAVE_LCHOWN |