From 240355949e3d7b5ca944b057f6c21020b9ba5254 Mon Sep 17 00:00:00 2001 From: Po Lu Date: Wed, 5 Nov 2025 10:32:52 +0800 Subject: [PATCH] Fix the Android port * configure.ac (gl_cv_onwards_func_tzalloc): Don't disable on Android SDK 35. * src/conf_post.h (tzalloc): Don't override Gnulib-selected identifier on Android SDK 35. --- configure.ac | 5 ----- src/conf_post.h | 11 ----------- 2 files changed, 16 deletions(-) diff --git a/configure.ac b/configure.ac index 6bec1adf63f..44d9cae1e7e 100644 --- a/configure.ac +++ b/configure.ac @@ -49,11 +49,6 @@ if test "$XCONFIGURE" = "android"; then CFLAGS="$CFLAGS -D_FILE_OFFSET_BITS=32" enable_largefile=no enable_year2038=no]) - # Gnulib should not attempt not to reimplement tzalloc, as strftime - # attempts to link with symbols that are only present in the Gnulib - # replacement. - AS_IF([test "$ANDROID_SDK" -ge "35"], - [gl_cv_onwards_func_tzalloc="future OS version"]) fi dnl Set emacs_config_options to the options of 'configure', quoted for the shell, diff --git a/src/conf_post.h b/src/conf_post.h index cf2e6dca4e5..aaf4fb59ffb 100644 --- a/src/conf_post.h +++ b/src/conf_post.h @@ -396,14 +396,3 @@ extern int emacs_setenv_TZ (char const *); : S_ISCHR (mode) ? DT_CHR : S_ISFIFO (mode) ? DT_FIFO \ : S_ISSOCK (mode) ? DT_SOCK : DT_UNKNOWN) #endif /* MSDOS */ - -#if defined __ANDROID__ && __ANDROID_API__ >= 35 -#define _GL_TIME_H -#include -#undef _GL_TIME_H - -/* Redefine tzalloc so as not to conflict with its - system-provided version, which is incompatible. - Do not redefine tzfree, as Gnulib does that. */ -#define tzalloc rpl_tzalloc -#endif /* defined __ANDROID__ && __ANDROID_API__ >= 35 */