Skip to content

Commit 5ad7ef8

Browse files
authored
bpo-28538: Revert all the changes (now using Android Unified Headers) (GH-4479)
1 parent 1f15111 commit 5ad7ef8

File tree

3 files changed

+5
-83
lines changed

3 files changed

+5
-83
lines changed
Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
Revert the previous changes, the if_nameindex structure is defined by
2+
Unified Headers.

‎configure‎

Lines changed: 2 additions & 58 deletions
Original file line numberDiff line numberDiff line change
@@ -778,7 +778,6 @@ infodir
778778
docdir
779779
oldincludedir
780780
includedir
781-
runstatedir
782781
localstatedir
783782
sharedstatedir
784783
sysconfdir
@@ -890,7 +889,6 @@ datadir='${datarootdir}'
890889
sysconfdir='${prefix}/etc'
891890
sharedstatedir='${prefix}/com'
892891
localstatedir='${prefix}/var'
893-
runstatedir='${localstatedir}/run'
894892
includedir='${prefix}/include'
895893
oldincludedir='/usr/include'
896894
docdir='${datarootdir}/doc/${PACKAGE_TARNAME}'
@@ -1143,15 +1141,6 @@ do
11431141
| -silent | --silent | --silen | --sile | --sil)
11441142
silent=yes ;;
11451143

1146-
-runstatedir | --runstatedir | --runstatedi | --runstated \
1147-
| --runstate | --runstat | --runsta | --runst | --runs \
1148-
| --run | --ru | --r)
1149-
ac_prev=runstatedir ;;
1150-
-runstatedir=* | --runstatedir=* | --runstatedi=* | --runstated=* \
1151-
| --runstate=* | --runstat=* | --runsta=* | --runst=* | --runs=* \
1152-
| --run=* | --ru=* | --r=*)
1153-
runstatedir=$ac_optarg ;;
1154-
11551144
-sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
11561145
ac_prev=sbindir ;;
11571146
-sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
@@ -1289,7 +1278,7 @@ fi
12891278
for ac_var in exec_prefix prefix bindir sbindir libexecdir datarootdir \
12901279
datadir sysconfdir sharedstatedir localstatedir includedir \
12911280
oldincludedir docdir infodir htmldir dvidir pdfdir psdir \
1292-
libdir localedir mandir runstatedir
1281+
libdir localedir mandir
12931282
do
12941283
eval ac_val=\$$ac_var
12951284
# Remove trailing slashes.
@@ -1442,7 +1431,6 @@ Fine tuning of the installation directories:
14421431
--sysconfdir=DIR read-only single-machine data [PREFIX/etc]
14431432
--sharedstatedir=DIR modifiable architecture-independent data [PREFIX/com]
14441433
--localstatedir=DIR modifiable single-machine data [PREFIX/var]
1445-
--runstatedir=DIR modifiable per-process data [LOCALSTATEDIR/run]
14461434
--libdir=DIR object code libraries [EPREFIX/lib]
14471435
--includedir=DIR C header files [PREFIX/include]
14481436
--oldincludedir=DIR C header files for non-gcc [/usr/include]
@@ -11155,6 +11143,7 @@ for ac_func in alarm accept4 setitimer getitimer bind_textdomain_codeset chown \
1115511143
futimens futimes gai_strerror getentropy \
1115611144
getgrouplist getgroups getlogin getloadavg getpeername getpgid getpid \
1115711145
getpriority getresuid getresgid getpwent getspnam getspent getsid getwd \
11146+
if_nameindex \
1115811147
initgroups kill killpg lchmod lchown linkat lstat lutimes mmap \
1115911148
memrchr mbrtowc mkdirat mkfifo \
1116011149
mkfifoat mknod mknodat mktime mremap nice openat pathconf pause pipe2 plock poll \
@@ -12585,51 +12574,6 @@ else
1258512574
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
1258612575
$as_echo "no" >&6; }
1258712576

12588-
fi
12589-
rm -f core conftest.err conftest.$ac_objext \
12590-
conftest$ac_exeext conftest.$ac_ext
12591-
12592-
# On Android API level 24 with android-ndk-r13, if_nameindex() is available,
12593-
# but the if_nameindex structure is not defined.
12594-
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for if_nameindex" >&5
12595-
$as_echo_n "checking for if_nameindex... " >&6; }
12596-
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12597-
/* end confdefs.h. */
12598-
12599-
#include <stdio.h>
12600-
#ifdef STDC_HEADERS
12601-
# include <stdlib.h>
12602-
# include <stddef.h>
12603-
#else
12604-
# ifdef HAVE_STDLIB_H
12605-
# include <stdlib.h>
12606-
# endif
12607-
#endif
12608-
#ifdef HAVE_SYS_SOCKET_H
12609-
# include <sys/socket.h>
12610-
#endif
12611-
#ifdef HAVE_NET_IF_H
12612-
# include <net/if.h>
12613-
#endif
12614-
12615-
int
12616-
main ()
12617-
{
12618-
struct if_nameindex *ni = if_nameindex(); int x = ni[0].if_index;
12619-
;
12620-
return 0;
12621-
}
12622-
_ACEOF
12623-
if ac_fn_c_try_link "$LINENO"; then :
12624-
12625-
$as_echo "#define HAVE_IF_NAMEINDEX 1" >>confdefs.h
12626-
12627-
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
12628-
$as_echo "yes" >&6; }
12629-
else
12630-
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12631-
$as_echo "no" >&6; }
12632-
1263312577
fi
1263412578
rm -f core conftest.err conftest.$ac_objext \
1263512579
conftest$ac_exeext conftest.$ac_ext

‎configure.ac‎

Lines changed: 1 addition & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -3411,6 +3411,7 @@ AC_CHECK_FUNCS(alarm accept4 setitimer getitimer bind_textdomain_codeset chown \
34113411
futimens futimes gai_strerror getentropy \
34123412
getgrouplist getgroups getlogin getloadavg getpeername getpgid getpid \
34133413
getpriority getresuid getresgid getpwent getspnam getspent getsid getwd \
3414+
if_nameindex \
34143415
initgroups kill killpg lchmod lchown linkat lstat lutimes mmap \
34153416
memrchr mbrtowc mkdirat mkfifo \
34163417
mkfifoat mknod mknodat mktime mremap nice openat pathconf pause pipe2 plock poll \
@@ -3760,31 +3761,6 @@ AC_LINK_IFELSE([AC_LANG_PROGRAM([[
37603761
AC_MSG_RESULT(no)
37613762
])
37623763

3763-
# On Android API level 24 with android-ndk-r13, if_nameindex() is available,
3764-
# but the if_nameindex structure is not defined.
3765-
AC_MSG_CHECKING(for if_nameindex)
3766-
AC_LINK_IFELSE([AC_LANG_PROGRAM([[
3767-
#include <stdio.h>
3768-
#ifdef STDC_HEADERS
3769-
# include <stdlib.h>
3770-
# include <stddef.h>
3771-
#else
3772-
# ifdef HAVE_STDLIB_H
3773-
# include <stdlib.h>
3774-
# endif
3775-
#endif
3776-
#ifdef HAVE_SYS_SOCKET_H
3777-
# include <sys/socket.h>
3778-
#endif
3779-
#ifdef HAVE_NET_IF_H
3780-
# include <net/if.h>
3781-
#endif
3782-
]], [[struct if_nameindex *ni = if_nameindex(); int x = ni[0].if_index;]])],
3783-
[AC_DEFINE(HAVE_IF_NAMEINDEX, 1, Define to 1 if you have the 'if_nameindex' function.)
3784-
AC_MSG_RESULT(yes)],
3785-
[AC_MSG_RESULT(no)
3786-
])
3787-
37883764
# Issue #28762: lockf() is available on Android API level 24, but the F_LOCK
37893765
# macro is not defined in android-ndk-r13.
37903766
AC_MSG_CHECKING(for lockf)

0 commit comments

Comments
 (0)