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,
dnl recent, so we check for it specifically.
AC_CHECK_HEADERS([spawn.h])
AC_SUBST([HAVE_SPAWN_H])
-AC_CHECK_FUNCS([posix_spawn \
- posix_spawn_file_actions_addchdir \
- posix_spawn_file_actions_addchdir_np \
- posix_spawnattr_setflags])
+gl_CHECK_FUNCS_ANDROID([posix_spawn], [#include <spawn.h>])
+gl_CHECK_FUNCS_ANDROID([posix_spawn_file_actions_addchdir], [#include <spawn.h>])
+gl_CHECK_FUNCS_ANDROID([posix_spawn_file_actions_addchdir_np], [#include <spawn.h>])
+gl_CHECK_FUNCS_ANDROID([posix_spawnattr_setflags], [#include <spawn.h>])
AC_SUBST([HAVE_POSIX_SPAWN])
AC_SUBST([HAVE_POSIX_SPAWN_FILE_ACTIONS_ADDCHDIR])
AC_SUBST([HAVE_POSIX_SPAWN_FILE_ACTIONS_ADDCHDIR_NP])
: 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 <time.h>
+#undef _GL_TIME_H
+
+/* Redefine tzalloc and tzfree so as not to conflict with their
+ system-provided versions, which are incompatible. */
+#define tzalloc rpl_tzalloc
+#define tzfree rpl_tzfree
+#endif /* defined __ANDROID__ && __ANDROID_API__ >= 35 */