summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorXavier de Gaye <xdegaye@users.sourceforge.net>2016-12-22 09:40:44 (GMT)
committerXavier de Gaye <xdegaye@users.sourceforge.net>2016-12-22 09:40:44 (GMT)
commit507cbb0c0cc4d56065831a043aefe1571dce0c6f (patch)
treeee43ca40263668cb3e431b2bde80fb6e118d8690
parent62497d52d940c9e203c1bf5e5d41bba52577ec6a (diff)
parentbdf0d0f0392b2438a1424fb869937d769e5a4552 (diff)
downloadcpython-507cbb0c0cc4d56065831a043aefe1571dce0c6f.zip
cpython-507cbb0c0cc4d56065831a043aefe1571dce0c6f.tar.gz
cpython-507cbb0c0cc4d56065831a043aefe1571dce0c6f.tar.bz2
Issue #28762: Merge 3.6.
-rw-r--r--Misc/NEWS3
-rwxr-xr-xconfigure31
-rw-r--r--configure.ac11
-rw-r--r--pyconfig.h.in4
4 files changed, 45 insertions, 4 deletions
diff --git a/Misc/NEWS b/Misc/NEWS
index d4bad09..81e5043 100644
--- a/Misc/NEWS
+++ b/Misc/NEWS
@@ -581,6 +581,9 @@ Documentation
Build
-----
+- Issue #28762: lockf() is available on Android API level 24, but the F_LOCK
+ macro is not defined in android-ndk-r13.
+
- Issue #28538: Fix the compilation error that occurs because if_nameindex() is
available on Android API level 24, but the if_nameindex structure is not
defined.
diff --git a/configure b/configure
index c7207e7..6e9b0fa 100755
--- a/configure
+++ b/configure
@@ -11202,7 +11202,7 @@ for ac_func in alarm accept4 setitimer getitimer bind_textdomain_codeset chown \
futimens futimes gai_strerror getentropy \
getgrouplist getgroups getlogin getloadavg getpeername getpgid getpid \
getpriority getresuid getresgid getpwent getspnam getspent getsid getwd \
- initgroups kill killpg lchmod lchown lockf linkat lstat lutimes mmap \
+ initgroups kill killpg lchmod lchown linkat lstat lutimes mmap \
memrchr mbrtowc mkdirat mkfifo \
mkfifoat mknod mknodat mktime mremap nice openat pathconf pause pipe2 plock poll \
posix_fallocate posix_fadvise pread \
@@ -12694,6 +12694,35 @@ fi
rm -f core conftest.err conftest.$ac_objext \
conftest$ac_exeext conftest.$ac_ext
+# Issue #28762: lockf() is available on Android API level 24, but the F_LOCK
+# macro is not defined in android-ndk-r13.
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for lockf" >&5
+$as_echo_n "checking for lockf... " >&6; }
+cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+#include <unistd.h>
+int
+main ()
+{
+lockf(0, F_LOCK, 0);
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_c_try_link "$LINENO"; then :
+
+$as_echo "#define HAVE_LOCKF 1" >>confdefs.h
+
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
+$as_echo "yes" >&6; }
+else
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+
+fi
+rm -f core conftest.err conftest.$ac_objext \
+ conftest$ac_exeext conftest.$ac_ext
+
# On OSF/1 V5.1, getaddrinfo is available, but a define
# for [no]getaddrinfo in netdb.h.
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for getaddrinfo" >&5
diff --git a/configure.ac b/configure.ac
index 1a08af3..aa98027 100644
--- a/configure.ac
+++ b/configure.ac
@@ -3386,7 +3386,7 @@ AC_CHECK_FUNCS(alarm accept4 setitimer getitimer bind_textdomain_codeset chown \
futimens futimes gai_strerror getentropy \
getgrouplist getgroups getlogin getloadavg getpeername getpgid getpid \
getpriority getresuid getresgid getpwent getspnam getspent getsid getwd \
- initgroups kill killpg lchmod lchown lockf linkat lstat lutimes mmap \
+ initgroups kill killpg lchmod lchown linkat lstat lutimes mmap \
memrchr mbrtowc mkdirat mkfifo \
mkfifoat mknod mknodat mktime mremap nice openat pathconf pause pipe2 plock poll \
posix_fallocate posix_fadvise pread \
@@ -3763,6 +3763,15 @@ AC_LINK_IFELSE([AC_LANG_PROGRAM([[
[AC_MSG_RESULT(no)
])
+# Issue #28762: lockf() is available on Android API level 24, but the F_LOCK
+# macro is not defined in android-ndk-r13.
+AC_MSG_CHECKING(for lockf)
+AC_LINK_IFELSE([AC_LANG_PROGRAM([[#include <unistd.h> ]],[[lockf(0, F_LOCK, 0);]])],
+ [AC_DEFINE(HAVE_LOCKF, 1, Define to 1 if you have the 'lockf' function and the F_LOCK macro.)
+ AC_MSG_RESULT(yes)],
+ [AC_MSG_RESULT(no)
+])
+
# On OSF/1 V5.1, getaddrinfo is available, but a define
# for [no]getaddrinfo in netdb.h.
AC_MSG_CHECKING(for getaddrinfo)
diff --git a/pyconfig.h.in b/pyconfig.h.in
index 06bb248..21354a5 100644
--- a/pyconfig.h.in
+++ b/pyconfig.h.in
@@ -472,7 +472,7 @@
/* Define to 1 if you have the <ieeefp.h> header file. */
#undef HAVE_IEEEFP_H
-/* Define to 1 if you have the `if_nameindex' function. */
+/* Define to 1 if you have the 'if_nameindex' function. */
#undef HAVE_IF_NAMEINDEX
/* Define if you have the 'inet_aton' function. */
@@ -574,7 +574,7 @@
/* Define to 1 if you have the <linux/tipc.h> header file. */
#undef HAVE_LINUX_TIPC_H
-/* Define to 1 if you have the `lockf' function. */
+/* Define to 1 if you have the 'lockf' function and the F_LOCK macro. */
#undef HAVE_LOCKF
/* Define to 1 if you have the `log1p' function. */