From 3895f882337ade7744cf7964d9bab5d79d4aa059 Mon Sep 17 00:00:00 2001 From: Po Lu Date: Mon, 14 Aug 2023 09:16:24 +0800 Subject: [PATCH] Remove workarounds for lib/boot-time.o failures * configure.ac (UTMP_H_DEFINES_BOOT_TIME): * src/conf_post.h [__ANDROID__]: Delete workarounds, now that Gnulib has been corrected. --- configure.ac | 23 ++--------------------- src/conf_post.h | 34 ---------------------------------- 2 files changed, 2 insertions(+), 55 deletions(-) diff --git a/configure.ac b/configure.ac index 46836073aa0..46347a12050 100644 --- a/configure.ac +++ b/configure.ac @@ -2710,27 +2710,8 @@ for Android, but all API calls need to be stubbed out]) # Check for some functions not always present in the NDK. AC_CHECK_DECLS([android_get_device_api_level]) - AC_CHECK_DECLS([endutent, sysinfo], [], [], - [[ -#include -#include -]]) - - # Establish if BOOT_TIME is defined in utmp.h. - AC_CACHE_CHECK([if utmp.h defines BOOT_TIME], - [emacs_cv_utmp_h_defines_boot_time], - [AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[ -#include -#ifndef BOOT_TIME -BOOT_TIME not defined -#endif /* BOOT_TIME */ -]], [[]])], [emacs_cv_utmp_h_defines_boot_time=yes], - [emacs_cv_utmp_h_defines_boot_time=no])]) - AS_IF([test x"$emacs_cv_utmp_h_defines_boot_time" = xyes], - [AC_DEFINE([UTMP_H_DEFINES_BOOT_TIME], [1], - [Define to 1 if building for Android and utmp.h declares BOOT_TIME])]) - - # Say this build is really for Android. + + # Mention this build is really for Android. REALLY_ANDROID=yes])]) AC_SUBST([ANDROID]) diff --git a/src/conf_post.h b/src/conf_post.h index 5f18e5ae4bb..f31e012dc6e 100644 --- a/src/conf_post.h +++ b/src/conf_post.h @@ -471,37 +471,3 @@ extern int emacs_setenv_TZ (char const *); #undef MB_CUR_MAX #define MB_CUR_MAX REPLACEMENT_MB_CUR_MAX #endif /* REPLACEMENT_MB_CUR_MAX */ - -#ifdef __ANDROID__ - -/* The Android NDK r10b omits the function `endutent' that is actually - defined in the C library and used by Gnulib. Define a prototype - for it here. */ - -#if !HAVE_DECL_ENDUTENT -extern void endutent (void); -#endif /* !HAVE_DECL_ENDUTENT */ - -/* Now define substitutes for BOOT_TIME if necessary. */ - -#ifndef UTMP_H_DEFINES_BOOT_TIME -#include - -#define BOOT_TIME 2 -#endif /* !UTMP_H_DEFINES_BOOT_TIME */ - -/* sysinfo is also absent from some versions of the NDK, yet is - present on API level 9 and above. */ - -#if !HAVE_DECL_SYSINFO -#include - -#if __ANDROID_API__ >= 9 -extern int sysinfo (struct sysinfo *info); -#else /* __ANDROID_API__ < 8 */ -/* Gnulib uses this function unconditionally. */ -#define sysinfo(ignored) ((void) ignored, (errno = ENOSYS), -1) -#endif /* __ANDROID_API >= 9 */ -#endif /* !HAVE_DECL_SYSINFO */ - -#endif /* __ANDROID__ */ -- 2.39.2