Skip to content

Commit 507cbb0

Browse files
author
Xavier de Gaye
committed
Issue python#28762: Merge 3.6.
2 parents 62497d5 + bdf0d0f commit 507cbb0

4 files changed

Lines changed: 45 additions & 4 deletions

File tree

Misc/NEWS

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -581,6 +581,9 @@ Documentation
581581
Build
582582
-----
583583

584+
- Issue #28762: lockf() is available on Android API level 24, but the F_LOCK
585+
macro is not defined in android-ndk-r13.
586+
584587
- Issue #28538: Fix the compilation error that occurs because if_nameindex() is
585588
available on Android API level 24, but the if_nameindex structure is not
586589
defined.

configure

Lines changed: 30 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11202,7 +11202,7 @@ for ac_func in alarm accept4 setitimer getitimer bind_textdomain_codeset chown \
1120211202
futimens futimes gai_strerror getentropy \
1120311203
getgrouplist getgroups getlogin getloadavg getpeername getpgid getpid \
1120411204
getpriority getresuid getresgid getpwent getspnam getspent getsid getwd \
11205-
initgroups kill killpg lchmod lchown lockf linkat lstat lutimes mmap \
11205+
initgroups kill killpg lchmod lchown linkat lstat lutimes mmap \
1120611206
memrchr mbrtowc mkdirat mkfifo \
1120711207
mkfifoat mknod mknodat mktime mremap nice openat pathconf pause pipe2 plock poll \
1120811208
posix_fallocate posix_fadvise pread \
@@ -12690,6 +12690,35 @@ else
1269012690
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
1269112691
$as_echo "no" >&6; }
1269212692

12693+
fi
12694+
rm -f core conftest.err conftest.$ac_objext \
12695+
conftest$ac_exeext conftest.$ac_ext
12696+
12697+
# Issue #28762: lockf() is available on Android API level 24, but the F_LOCK
12698+
# macro is not defined in android-ndk-r13.
12699+
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for lockf" >&5
12700+
$as_echo_n "checking for lockf... " >&6; }
12701+
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12702+
/* end confdefs.h. */
12703+
#include <unistd.h>
12704+
int
12705+
main ()
12706+
{
12707+
lockf(0, F_LOCK, 0);
12708+
;
12709+
return 0;
12710+
}
12711+
_ACEOF
12712+
if ac_fn_c_try_link "$LINENO"; then :
12713+
12714+
$as_echo "#define HAVE_LOCKF 1" >>confdefs.h
12715+
12716+
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
12717+
$as_echo "yes" >&6; }
12718+
else
12719+
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12720+
$as_echo "no" >&6; }
12721+
1269312722
fi
1269412723
rm -f core conftest.err conftest.$ac_objext \
1269512724
conftest$ac_exeext conftest.$ac_ext

configure.ac

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3386,7 +3386,7 @@ AC_CHECK_FUNCS(alarm accept4 setitimer getitimer bind_textdomain_codeset chown \
33863386
futimens futimes gai_strerror getentropy \
33873387
getgrouplist getgroups getlogin getloadavg getpeername getpgid getpid \
33883388
getpriority getresuid getresgid getpwent getspnam getspent getsid getwd \
3389-
initgroups kill killpg lchmod lchown lockf linkat lstat lutimes mmap \
3389+
initgroups kill killpg lchmod lchown linkat lstat lutimes mmap \
33903390
memrchr mbrtowc mkdirat mkfifo \
33913391
mkfifoat mknod mknodat mktime mremap nice openat pathconf pause pipe2 plock poll \
33923392
posix_fallocate posix_fadvise pread \
@@ -3763,6 +3763,15 @@ AC_LINK_IFELSE([AC_LANG_PROGRAM([[
37633763
[AC_MSG_RESULT(no)
37643764
])
37653765

3766+
# Issue #28762: lockf() is available on Android API level 24, but the F_LOCK
3767+
# macro is not defined in android-ndk-r13.
3768+
AC_MSG_CHECKING(for lockf)
3769+
AC_LINK_IFELSE([AC_LANG_PROGRAM([[#include <unistd.h> ]],[[lockf(0, F_LOCK, 0);]])],
3770+
[AC_DEFINE(HAVE_LOCKF, 1, Define to 1 if you have the 'lockf' function and the F_LOCK macro.)
3771+
AC_MSG_RESULT(yes)],
3772+
[AC_MSG_RESULT(no)
3773+
])
3774+
37663775
# On OSF/1 V5.1, getaddrinfo is available, but a define
37673776
# for [no]getaddrinfo in netdb.h.
37683777
AC_MSG_CHECKING(for getaddrinfo)

pyconfig.h.in

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -472,7 +472,7 @@
472472
/* Define to 1 if you have the <ieeefp.h> header file. */
473473
#undef HAVE_IEEEFP_H
474474

475-
/* Define to 1 if you have the `if_nameindex' function. */
475+
/* Define to 1 if you have the 'if_nameindex' function. */
476476
#undef HAVE_IF_NAMEINDEX
477477

478478
/* Define if you have the 'inet_aton' function. */
@@ -574,7 +574,7 @@
574574
/* Define to 1 if you have the <linux/tipc.h> header file. */
575575
#undef HAVE_LINUX_TIPC_H
576576

577-
/* Define to 1 if you have the `lockf' function. */
577+
/* Define to 1 if you have the 'lockf' function and the F_LOCK macro. */
578578
#undef HAVE_LOCKF
579579

580580
/* Define to 1 if you have the `log1p' function. */

0 commit comments

Comments
 (0)