cpython: 51b09b10d4f8 (original) (raw)
Mercurial > cpython
changeset 105781:51b09b10d4f8 3.6
Issue #28762: lockf() is available on Android API level 24, but the F_LOCK macro is not defined in android-ndk-r13. [#28762]
Xavier de Gaye xdegaye@users.sourceforge.net | |
---|---|
date | Thu, 22 Dec 2016 10:38:59 +0100 |
parents | cc61d1d45291 |
children | 146157d91283 20ef70c2b3d0 |
files | Misc/NEWS configure configure.ac pyconfig.h.in |
diffstat | 4 files changed, 45 insertions(+), 4 deletions(-)[+] [-] Misc/NEWS 3 configure 31 configure.ac 11 pyconfig.h.in 4 |
line wrap: on
line diff
--- a/Misc/NEWS +++ b/Misc/NEWS @@ -84,6 +84,9 @@ Tests Build ----- +- Issue #28762: lockf() is available on Android API level 24, but the F_LOCK
- 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.
--- a/configure +++ b/configure @@ -11198,7 +11198,7 @@ for ac_func in alarm accept4 setitimer g futimens futimes gai_strerror getentropy [](#l2.4) getgrouplist getgroups getlogin getloadavg getpeername getpgid getpid [](#l2.5) getpriority getresuid getresgid getpwent getspnam getspent getsid getwd [](#l2.6)
- initgroups kill killpg lchmod lchown lockf linkat lstat lutimes mmap [](#l2.7)
- initgroups kill killpg lchmod lchown linkat lstat lutimes mmap [](#l2.8) memrchr mbrtowc mkdirat mkfifo [](#l2.9) mkfifoat mknod mknodat mktime mremap nice openat pathconf pause pipe2 plock poll [](#l2.10) posix_fallocate posix_fadvise pread [](#l2.11) @@ -12690,6 +12690,35 @@ fi rm -f core conftest.err conftest.$ac_objext [](#l2.13) 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. +{ asecho"as_echo "asecho"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 +
- { asecho"as_echo "asecho"as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } +else
- { asecho"as_echo "asecho"as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } + +fi +rm -f core conftest.err conftest.$ac_objext [](#l2.42)
- conftest$ac_exeext conftest.$ac_ext
On OSF/1 V5.1, getaddrinfo is available, but a define
for [no]getaddrinfo in netdb.h.
{ asecho"as_echo "asecho"as_me:${as_lineno-$LINENO}: checking for getaddrinfo" >&5
--- a/configure.ac +++ b/configure.ac @@ -3384,7 +3384,7 @@ AC_CHECK_FUNCS(alarm accept4 setitimer g futimens futimes gai_strerror getentropy [](#l3.4) getgrouplist getgroups getlogin getloadavg getpeername getpgid getpid [](#l3.5) getpriority getresuid getresgid getpwent getspnam getspent getsid getwd [](#l3.6)
- initgroups kill killpg lchmod lchown lockf linkat lstat lutimes mmap [](#l3.7)
- initgroups kill killpg lchmod lchown linkat lstat lutimes mmap [](#l3.8) memrchr mbrtowc mkdirat mkfifo [](#l3.9) mkfifoat mknod mknodat mktime mremap nice openat pathconf pause pipe2 plock poll [](#l3.10) posix_fallocate posix_fadvise pread [](#l3.11) @@ -3761,6 +3761,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)
--- 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. */[](#l4.7) +/* Define to 1 if you have the 'if_nameindex' function. */[](#l4.8) #undef HAVE_IF_NAMEINDEX[](#l4.9) [](#l4.10) /* Define if you have the 'inet_aton' function. */[](#l4.11) @@ -574,7 +574,7 @@[](#l4.12) /* Define to 1 if you have the <linux/tipc.h> header file. */[](#l4.13) #undef HAVE_LINUX_TIPC_H[](#l4.14) [](#l4.15) -/* 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. */