]> git.ipfire.org Git - thirdparty/Python/cpython.git/commitdiff
bpo-34652: Use AC_CHECK_FUNCS for lchmod. (GH-12799)
authorJoshua Root <jmr@macports.org>
Fri, 12 Apr 2019 15:51:35 +0000 (01:51 +1000)
committerBenjamin Peterson <benjamin@python.org>
Fri, 12 Apr 2019 15:51:35 +0000 (08:51 -0700)
A fix for 69e96910153219b0b15a18323b917bd74336d229, which resulted in lchmod being disabled on all platforms, not just Linux.

(cherry picked from commit ed709d5699716bf7237856dc20aba321e2dfff6d)

configure
configure.ac
pyconfig.h.in

index dd30c11ee1fad5e1447ebddc464b8de8c0237cdd..ced0a0043fb6d30e42746c6cdb6e5fadf62d6c4b 100755 (executable)
--- a/configure
+++ b/configure
@@ -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
 
index 7396c1f2ff45ac58950c01f0761983427c370b12..13b40f2edd8020ea1df566b266b0343d05ec95a0 100644 (file)
@@ -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
index f828677dda01d597cdc9b5d78c0250b22fa6a6b6..11c4a66873c11030dcf8142a79b3585eb4143ec9 100644 (file)
 /* 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