Hi Po Lu, > This new release of the Android NDK defines timezone_t in time.h whether > or not it defines the related tzalloc and localtime_rz extensions, which > being new APIs are controlled by __ANDROID_API__ as expected. > Consequently, when building for earlier Android releases with this NDK, > Emacs compilation reports: > > CC nproc.o > CC nstrftime.o > In file included from nstrftime.c:19: > ./strftime.c:1900:17: error: call to undeclared function 'mktime_z'; ISO C99 > and later do not support implicit function declarations > [-Wimplicit-function-declaration] > 1900 | t = mktime_z (tz, <m); > | ^ > ./strftime.c:1900:17: note: did you mean 'mktime'? > /opt/android/android-ndk-r27/toolchains/llvm/prebuilt/linux-x86_64/bin/../sysroot/usr/include/time.h:159:8: > note: 'mktime' declared here > 159 | time_t mktime(struct tm* _Nonnull __tm); > | ^ > 1 error generated.
Thanks for the report. The major mistake we've been doing here is to assume that the presence of timezone_t is equivalent to the presence of the functions tzalloc, tzfree, localtime_rz, mktime_z. The following patches should fix it. Tested only on glibc systems and NetBSD. If you could test it on Android, with CC="clang -target armv7a-unknown-linux-android34" and CC="clang -target armv7a-unknown-linux-android35" that would be welcome! Bruno 2024-09-04 Bruno Haible <br...@clisp.org> Resolve conflicts for functions introduced in Android API level 35. Reported by Po Lu <luang...@yahoo.com> in <https://lists.gnu.org/archive/html/bug-gnulib/2024-09/msg00024.html>. * lib/time.in.h (timezone_t, tzalloc, tzfree): Don't require _GNU_SOURCE to be defined. Define depending on HAVE_TZALLOC, not HAVE_TIMEZONE_T. (localtime_rz, mktime_z): Likewise. Override if REPLACE_LOCALTIME_RZ or REPLACE_MKTIME_Z is 1, respectively. * lib/time_rz.c: If NEED_TIMEZONE_NULL_SUPPORT, define only localtime_rz and mktime_z and only as wrappers around the system function. * m4/time_h.m4 (gl_TIME_H_DEFAULTS): Initialize HAVE_TZALLOC, REPLACE_LOCALTIME_RZ, REPLACE_MKTIME_Z. * m4/time_rz.m4 (gl_TIME_RZ): Conditionally set HAVE_TZALLOC, REPLACE_LOCALTIME_RZ, REPLACE_MKTIME_Z. Conditionally define NEED_TIMEZONE_NULL_SUPPORT. * modules/time-h (Makefile.am): Substitute HAVE_TZALLOC, REPLACE_LOCALTIME_RZ, REPLACE_MKTIME_Z. * modules/time_rz (Depends-on, configure.ac): Consider HAVE_TZALLOC, REPLACE_LOCALTIME_RZ, REPLACE_MKTIME_Z. Ignore HAVE_TIMEZONE_T. * m4/strerrorname_np.m4 (gl_FUNC_COPY_FILE_RANGE): Conditionally set REPLACE_STRERRORNAME_NP. (gl_CHECK_STRERRORNAME_NP): Test for strerrorname_np using gl_CHECK_FUNCS_ANDROID instead of AC_CHECK_FUNCS.
>From 2d4c7ab0df919665f787a15610b2b4daea5f1e19 Mon Sep 17 00:00:00 2001 From: Bruno Haible <br...@clisp.org> Date: Wed, 4 Sep 2024 10:34:04 +0200 Subject: [PATCH 1/2] Resolve conflicts for functions introduced in Android API level 35. * m4/strerrorname_np.m4 (gl_FUNC_COPY_FILE_RANGE): Conditionally set REPLACE_STRERRORNAME_NP. (gl_CHECK_STRERRORNAME_NP): Test for strerrorname_np using gl_CHECK_FUNCS_ANDROID instead of AC_CHECK_FUNCS. --- ChangeLog | 9 +++++++++ m4/strerrorname_np.m4 | 10 +++++++--- 2 files changed, 16 insertions(+), 3 deletions(-) diff --git a/ChangeLog b/ChangeLog index c4c34d2782..027ae99cfe 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,12 @@ +2024-09-04 Bruno Haible <br...@clisp.org> + + Resolve conflicts for functions introduced in Android API level 35. + + * m4/strerrorname_np.m4 (gl_FUNC_COPY_FILE_RANGE): Conditionally set + REPLACE_STRERRORNAME_NP. + (gl_CHECK_STRERRORNAME_NP): Test for strerrorname_np using + gl_CHECK_FUNCS_ANDROID instead of AC_CHECK_FUNCS. + 2024-09-04 Bruno Haible <br...@clisp.org> Doc regarding functions introduced in Android API level 35. diff --git a/m4/strerrorname_np.m4 b/m4/strerrorname_np.m4 index ac0211715a..3465df2a35 100644 --- a/m4/strerrorname_np.m4 +++ b/m4/strerrorname_np.m4 @@ -1,5 +1,5 @@ # strerrorname_np.m4 -# serial 6 +# serial 7 dnl Copyright (C) 2020-2024 Free Software Foundation, Inc. dnl This file is free software; the Free Software Foundation dnl gives unlimited permission to copy and/or distribute it, @@ -17,11 +17,15 @@ AC_DEFUN([gl_FUNC_STRERRORNAME_NP] esac else HAVE_STRERRORNAME_NP=0 + case "$gl_cv_onwards_func_strerrorname_np" in + future*) REPLACE_STRERRORNAME_NP=1 ;; + esac fi ]) # Check for a working strerrorname_np function. -# Sets ac_cv_func_strerrorname_np, gl_cv_func_strerrorname_np_works. +# Sets ac_cv_func_strerrorname_np, gl_cv_onwards_func_strerrorname_np, +# gl_cv_func_strerrorname_np_works. AC_DEFUN([gl_CHECK_STRERRORNAME_NP], [ dnl Persuade glibc <string.h> to declare strerrorname_np(). @@ -29,7 +33,7 @@ AC_DEFUN([gl_CHECK_STRERRORNAME_NP] AC_REQUIRE([AC_CANONICAL_HOST]) dnl for cross-compiles - AC_CHECK_FUNCS([strerrorname_np]) + gl_CHECK_FUNCS_ANDROID([strerrorname_np], [[#include <string.h>]]) if test $ac_cv_func_strerrorname_np = yes; then dnl In glibc 2.32, strerrorname_np returns English error descriptions, not dnl error names. -- 2.34.1
>From 6e95321249ae6986c3df764a6e539f8b5be13948 Mon Sep 17 00:00:00 2001 From: Bruno Haible <br...@clisp.org> Date: Wed, 4 Sep 2024 19:38:52 +0200 Subject: [PATCH 2/2] Resolve conflicts for functions introduced in Android API level 35. Reported by Po Lu <luang...@yahoo.com> in <https://lists.gnu.org/archive/html/bug-gnulib/2024-09/msg00024.html>. * lib/time.in.h (timezone_t, tzalloc, tzfree): Don't require _GNU_SOURCE to be defined. Define depending on HAVE_TZALLOC, not HAVE_TIMEZONE_T. (localtime_rz, mktime_z): Likewise. Override if REPLACE_LOCALTIME_RZ or REPLACE_MKTIME_Z is 1, respectively. * lib/time_rz.c: If NEED_TIMEZONE_NULL_SUPPORT, define only localtime_rz and mktime_z and only as wrappers around the system function. * m4/time_h.m4 (gl_TIME_H_DEFAULTS): Initialize HAVE_TZALLOC, REPLACE_LOCALTIME_RZ, REPLACE_MKTIME_Z. * m4/time_rz.m4 (gl_TIME_RZ): Conditionally set HAVE_TZALLOC, REPLACE_LOCALTIME_RZ, REPLACE_MKTIME_Z. Conditionally define NEED_TIMEZONE_NULL_SUPPORT. * modules/time-h (Makefile.am): Substitute HAVE_TZALLOC, REPLACE_LOCALTIME_RZ, REPLACE_MKTIME_Z. * modules/time_rz (Depends-on, configure.ac): Consider HAVE_TZALLOC, REPLACE_LOCALTIME_RZ, REPLACE_MKTIME_Z. Ignore HAVE_TIMEZONE_T. --- ChangeLog | 18 ++++++++++++++++ lib/time.in.h | 46 ++++++++++++++++++++++++++++++++++++++- lib/time_rz.c | 57 ++++++++++++++++++++++++++++++++++++------------- m4/time_h.m4 | 7 ++++-- m4/time_rz.m4 | 30 ++++++++++++++++++++++++-- modules/time-h | 3 +++ modules/time_rz | 19 +++++++++-------- 7 files changed, 151 insertions(+), 29 deletions(-) diff --git a/ChangeLog b/ChangeLog index 027ae99cfe..366aa8464c 100644 --- a/ChangeLog +++ b/ChangeLog @@ -2,6 +2,24 @@ Resolve conflicts for functions introduced in Android API level 35. + Reported by Po Lu <luang...@yahoo.com> in + <https://lists.gnu.org/archive/html/bug-gnulib/2024-09/msg00024.html>. + * lib/time.in.h (timezone_t, tzalloc, tzfree): Don't require _GNU_SOURCE + to be defined. Define depending on HAVE_TZALLOC, not HAVE_TIMEZONE_T. + (localtime_rz, mktime_z): Likewise. Override if REPLACE_LOCALTIME_RZ or + REPLACE_MKTIME_Z is 1, respectively. + * lib/time_rz.c: If NEED_TIMEZONE_NULL_SUPPORT, define only localtime_rz + and mktime_z and only as wrappers around the system function. + * m4/time_h.m4 (gl_TIME_H_DEFAULTS): Initialize HAVE_TZALLOC, + REPLACE_LOCALTIME_RZ, REPLACE_MKTIME_Z. + * m4/time_rz.m4 (gl_TIME_RZ): Conditionally set HAVE_TZALLOC, + REPLACE_LOCALTIME_RZ, REPLACE_MKTIME_Z. Conditionally define + NEED_TIMEZONE_NULL_SUPPORT. + * modules/time-h (Makefile.am): Substitute HAVE_TZALLOC, + REPLACE_LOCALTIME_RZ, REPLACE_MKTIME_Z. + * modules/time_rz (Depends-on, configure.ac): Consider HAVE_TZALLOC, + REPLACE_LOCALTIME_RZ, REPLACE_MKTIME_Z. Ignore HAVE_TIMEZONE_T. + * m4/strerrorname_np.m4 (gl_FUNC_COPY_FILE_RANGE): Conditionally set REPLACE_STRERRORNAME_NP. (gl_CHECK_STRERRORNAME_NP): Test for strerrorname_np using diff --git a/lib/time.in.h b/lib/time.in.h index eebc60d42c..097c509d3c 100644 --- a/lib/time.in.h +++ b/lib/time.in.h @@ -488,14 +488,24 @@ _GL_WARN_ON_USE (strftime, "strftime has portability problems - " # endif # endif -# if defined _GNU_SOURCE && @GNULIB_TIME_RZ@ && ! @HAVE_TIMEZONE_T@ +# if @GNULIB_TIME_RZ@ /* Functions that use a first-class time zone data type, instead of relying on an implicit global time zone. Inspired by NetBSD. */ /* Represents a time zone. (timezone_t) NULL stands for UTC. */ +# if !@HAVE_TZALLOC@ +# if !GNULIB_defined_timezone_t +# if !@HAVE_TIMEZONE_T@ typedef struct tm_zone *timezone_t; +# else +typedef struct tm_zone *rpl_timezone_t; +# define timezone_t rpl_timezone_t +# endif +# define GNULIB_defined_timezone_t 1 +# endif +# endif /* tzalloc (name) Returns a time zone object for the given time zone NAME. This object @@ -505,38 +515,72 @@ typedef struct tm_zone *timezone_t; would use it the TZ environment variable was unset. May return NULL if NAME is invalid (this is platform dependent) or upon memory allocation failure. */ +# if !@HAVE_TZALLOC@ _GL_FUNCDECL_SYS (tzalloc, timezone_t, (char const *__name)); _GL_CXXALIAS_SYS (tzalloc, timezone_t, (char const *__name)); +# endif /* tzfree (tz) Frees a time zone object. The argument must have been returned by tzalloc(). */ +# if !@HAVE_TZALLOC@ _GL_FUNCDECL_SYS (tzfree, void, (timezone_t __tz)); _GL_CXXALIAS_SYS (tzfree, void, (timezone_t __tz)); +# endif /* localtime_rz (tz, &t, &result) Converts an absolute time T to a broken-down time RESULT, assuming the time zone TZ. This function is like 'localtime_r', but relies on the argument TZ instead of an implicit global time zone. */ +# if @REPLACE_LOCALTIME_RZ@ +# if !(defined __cplusplus && defined GNULIB_NAMESPACE) +# undef localtime_rz +# define localtime_rz rpl_localtime_rz +# endif +_GL_FUNCDECL_RPL (localtime_rz, struct tm *, + (timezone_t __tz, time_t const *restrict __timer, + struct tm *restrict __result), + _GL_ARG_NONNULL ((2, 3))); +_GL_CXXALIAS_RPL (localtime_rz, struct tm *, + (timezone_t __tz, time_t const *restrict __timer, + struct tm *restrict __result)); +# else +# if !@HAVE_TZALLOC@ _GL_FUNCDECL_SYS (localtime_rz, struct tm *, (timezone_t __tz, time_t const *restrict __timer, struct tm *restrict __result), _GL_ARG_NONNULL ((2, 3))); +# endif _GL_CXXALIAS_SYS (localtime_rz, struct tm *, (timezone_t __tz, time_t const *restrict __timer, struct tm *restrict __result)); +# endif /* mktime_z (tz, &tm) Normalizes the broken-down time TM and converts it to an absolute time, assuming the time zone TZ. Returns the absolute time. This function is like 'mktime', but relies on the argument TZ instead of an implicit global time zone. */ +# if @REPLACE_MKTIME_Z@ +# if !(defined __cplusplus && defined GNULIB_NAMESPACE) +# undef mktime_z +# define mktime_z rpl_mktime_z +# endif +_GL_FUNCDECL_RPL (mktime_z, time_t, + (timezone_t __tz, struct tm *restrict __tm), + _GL_ARG_NONNULL ((2))); +_GL_CXXALIAS_RPL (mktime_z, time_t, + (timezone_t __tz, struct tm *restrict __tm)); +# else +# if !@HAVE_TZALLOC@ _GL_FUNCDECL_SYS (mktime_z, time_t, (timezone_t __tz, struct tm *restrict __tm), _GL_ARG_NONNULL ((2))); +# endif _GL_CXXALIAS_SYS (mktime_z, time_t, (timezone_t __tz, struct tm *restrict __tm)); +# endif /* Time zone abbreviation strings (returned by 'localtime_rz' or 'mktime_z' in the 'tm_zone' member of 'struct tm') are valid as long as diff --git a/lib/time_rz.c b/lib/time_rz.c index a6523e1285..14f43fd67a 100644 --- a/lib/time_rz.c +++ b/lib/time_rz.c @@ -24,16 +24,41 @@ #include <config.h> +/* Specification. */ #include <time.h> -#include <errno.h> -#include <stddef.h> -#include <stdlib.h> -#include <string.h> +#if NEED_TIMEZONE_NULL_SUPPORT /* Android API level >= 35 */ -#include "flexmember.h" -#include "idx.h" -#include "time-internal.h" +struct tm * +localtime_rz (timezone_t tz, time_t const *t, struct tm *tm) +# undef localtime_rz +{ + if (!tz) + return gmtime_r (t, tm); + else + return localtime_rz (tz, t, tm); +} + +time_t +mktime_z (timezone_t tz, struct tm *tm) +# undef mktime_z +{ + if (!tz) + return timegm (tm); + else + return mktime_z (tz, tm); +} + +#else + +# include <errno.h> +# include <stddef.h> +# include <stdlib.h> +# include <string.h> + +# include "flexmember.h" +# include "idx.h" +# include "time-internal.h" /* The approximate size to use for small allocation requests. This is the largest "small" request for the GNU C library malloc. */ @@ -79,7 +104,7 @@ tzalloc (char const *name) static bool save_abbr (timezone_t tz, struct tm *tm) { -#if HAVE_STRUCT_TM_TM_ZONE +# if HAVE_STRUCT_TM_TM_ZONE char const *zone = tm->tm_zone; char *zone_copy = (char *) ""; @@ -120,7 +145,7 @@ save_abbr (timezone_t tz, struct tm *tm) /* Replace the zone name so that its lifetime matches that of TZ. */ tm->tm_zone = zone_copy; -#endif +# endif return true; } @@ -141,21 +166,21 @@ tzfree (timezone_t tz) /* Get and set the TZ environment variable. These functions can be overridden by programs like Emacs that manage their own environment. */ -#ifndef getenv_TZ +# ifndef getenv_TZ static char * getenv_TZ (void) { return getenv ("TZ"); } -#endif +# endif -#ifndef setenv_TZ +# ifndef setenv_TZ static int setenv_TZ (char const *tz) { return tz ? setenv ("TZ", tz, 1) : unsetenv ("TZ"); } -#endif +# endif /* Change the environment to match the specified timezone_t value. Return true if successful, false (setting errno) otherwise. */ @@ -220,7 +245,7 @@ revert_tz (timezone_t tz) struct tm * localtime_rz (timezone_t tz, time_t const *t, struct tm *tm) { -#ifdef HAVE_LOCALTIME_INFLOOP_BUG +# ifdef HAVE_LOCALTIME_INFLOOP_BUG /* The -67768038400665599 comes from: https://lists.gnu.org/r/bug-gnulib/2017-07/msg00142.html On affected platforms the greatest POSIX-compatible time_t value @@ -233,7 +258,7 @@ localtime_rz (timezone_t tz, time_t const *t, struct tm *tm) errno = EOVERFLOW; return NULL; } -#endif +# endif if (!tz) return gmtime_r (t, tm); @@ -282,3 +307,5 @@ mktime_z (timezone_t tz, struct tm *tm) return -1; } } + +#endif diff --git a/m4/time_h.m4 b/m4/time_h.m4 index 4ca7305792..88c76c03c0 100644 --- a/m4/time_h.m4 +++ b/m4/time_h.m4 @@ -1,5 +1,5 @@ # time_h.m4 -# serial 26 +# serial 27 dnl Copyright (C) 2000-2001, 2003-2007, 2009-2024 Free Software Foundation, Inc. dnl This file is free software; the Free Software Foundation dnl gives unlimited permission to copy and/or distribute it, @@ -163,13 +163,16 @@ AC_DEFUN([gl_TIME_H_DEFAULTS] HAVE_TIMEGM=1; AC_SUBST([HAVE_TIMEGM]) HAVE_TIMESPEC_GET=1; AC_SUBST([HAVE_TIMESPEC_GET]) HAVE_TIMESPEC_GETRES=1; AC_SUBST([HAVE_TIMESPEC_GETRES]) - dnl Even GNU libc does not have timezone_t yet. + dnl Even GNU libc does not have timezone_t and tzalloc() yet. HAVE_TIMEZONE_T=0; AC_SUBST([HAVE_TIMEZONE_T]) + HAVE_TZALLOC=0; AC_SUBST([HAVE_TZALLOC]) REPLACE_CTIME=0; AC_SUBST([REPLACE_CTIME]) REPLACE_GMTIME=0; AC_SUBST([REPLACE_GMTIME]) REPLACE_LOCALTIME=0; AC_SUBST([REPLACE_LOCALTIME]) REPLACE_LOCALTIME_R=0; AC_SUBST([REPLACE_LOCALTIME_R]) + REPLACE_LOCALTIME_RZ=0; AC_SUBST([REPLACE_LOCALTIME_RZ]) REPLACE_MKTIME=0; AC_SUBST([REPLACE_MKTIME]) + REPLACE_MKTIME_Z=0; AC_SUBST([REPLACE_MKTIME_Z]) REPLACE_NANOSLEEP=0; AC_SUBST([REPLACE_NANOSLEEP]) REPLACE_STRFTIME=0; AC_SUBST([REPLACE_STRFTIME]) REPLACE_TIME=0; AC_SUBST([REPLACE_TIME]) diff --git a/m4/time_rz.m4 b/m4/time_rz.m4 index 9613597aca..1a3dd3befb 100644 --- a/m4/time_rz.m4 +++ b/m4/time_rz.m4 @@ -1,5 +1,5 @@ # time_rz.m4 -# serial 2 +# serial 3 dnl Copyright (C) 2015-2024 Free Software Foundation, Inc. dnl This file is free software; the Free Software Foundation dnl gives unlimited permission to copy and/or distribute it, @@ -11,8 +11,9 @@ AC_DEFUN([gl_TIME_RZ], [ - AC_REQUIRE([gl_USE_SYSTEM_EXTENSIONS]) AC_REQUIRE([gl_TIME_H_DEFAULTS]) + AC_REQUIRE([gl_USE_SYSTEM_EXTENSIONS]) + AC_REQUIRE([AC_CANONICAL_HOST]) # On Mac OS X 10.6, localtime loops forever with some time_t values. # See Bug#27706, Bug#27736, and @@ -51,4 +52,29 @@ AC_DEFUN([gl_TIME_RZ] if test "$ac_cv_type_timezone_t" = yes; then HAVE_TIMEZONE_T=1 fi + + gl_CHECK_FUNCS_ANDROID([tzalloc], [[#include <time.h>]]) + if test $ac_cv_func_tzalloc = yes; then + HAVE_TZALLOC=1 + fi + dnl Assume that tzalloc, localtime_rz, mktime_z are all defined together. + case "$gl_cv_onwards_func_tzalloc" in + yes) + case "$host_os" in + *-android*) + dnl The Android libc functions localtime_rz, mktime_z don't support + dnl a NULL timezone_t argument. + AC_DEFINE([NEED_TIMEZONE_NULL_SUPPORT], [1], + [Define to 1 if localtime_rz, mktime_z exist and can be used with + non-NULL timezone_t values.]) + REPLACE_LOCALTIME_RZ=1 + REPLACE_MKTIME_Z=1 + ;; + esac + ;; + future*) + REPLACE_LOCALTIME_RZ=1 + REPLACE_MKTIME_Z=1 + ;; + esac ]) diff --git a/modules/time-h b/modules/time-h index e84100bf93..76921979f0 100644 --- a/modules/time-h +++ b/modules/time-h @@ -54,11 +54,14 @@ time.h: time.in.h $(top_builddir)/config.status $(CXXDEFS_H) $(ARG_NONNULL_H) $( -e 's|@''HAVE_TIMESPEC_GET''@|$(HAVE_TIMESPEC_GET)|g' \ -e 's|@''HAVE_TIMESPEC_GETRES''@|$(HAVE_TIMESPEC_GETRES)|g' \ -e 's|@''HAVE_TIMEZONE_T''@|$(HAVE_TIMEZONE_T)|g' \ + -e 's|@''HAVE_TZALLOC''@|$(HAVE_TZALLOC)|g' \ -e 's|@''REPLACE_CTIME''@|$(REPLACE_CTIME)|g' \ -e 's|@''REPLACE_GMTIME''@|$(REPLACE_GMTIME)|g' \ -e 's|@''REPLACE_LOCALTIME''@|$(REPLACE_LOCALTIME)|g' \ -e 's|@''REPLACE_LOCALTIME_R''@|$(REPLACE_LOCALTIME_R)|g' \ + -e 's|@''REPLACE_LOCALTIME_RZ''@|$(REPLACE_LOCALTIME_RZ)|g' \ -e 's|@''REPLACE_MKTIME''@|$(REPLACE_MKTIME)|g' \ + -e 's|@''REPLACE_MKTIME_Z''@|$(REPLACE_MKTIME_Z)|g' \ -e 's|@''REPLACE_NANOSLEEP''@|$(REPLACE_NANOSLEEP)|g' \ -e 's|@''REPLACE_STRFTIME''@|$(REPLACE_STRFTIME)|g' \ -e 's|@''REPLACE_TIME''@|$(REPLACE_TIME)|g' \ diff --git a/modules/time_rz b/modules/time_rz index f487e24c6b..6111864ca2 100644 --- a/modules/time_rz +++ b/modules/time_rz @@ -10,18 +10,19 @@ Depends-on: c99 extensions time-h -flexmember [test $HAVE_TIMEZONE_T = 0] -idx [test $HAVE_TIMEZONE_T = 0] -setenv [test $HAVE_TIMEZONE_T = 0] -stdbool [test $HAVE_TIMEZONE_T = 0] -time_r [test $HAVE_TIMEZONE_T = 0] -timegm [test $HAVE_TIMEZONE_T = 0] -tzset [test $HAVE_TIMEZONE_T = 0] -unsetenv [test $HAVE_TIMEZONE_T = 0] +flexmember [test $HAVE_TZALLOC = 0 || test $REPLACE_LOCALTIME_RZ = 1 || test $REPLACE_MKTIME_Z = 1] +idx [test $HAVE_TZALLOC = 0 || test $REPLACE_LOCALTIME_RZ = 1 || test $REPLACE_MKTIME_Z = 1] +setenv [test $HAVE_TZALLOC = 0 || test $REPLACE_LOCALTIME_RZ = 1 || test $REPLACE_MKTIME_Z = 1] +stdbool [test $HAVE_TZALLOC = 0 || test $REPLACE_LOCALTIME_RZ = 1 || test $REPLACE_MKTIME_Z = 1] +time_r [test $HAVE_TZALLOC = 0 || test $REPLACE_LOCALTIME_RZ = 1 || test $REPLACE_MKTIME_Z = 1] +timegm [test $HAVE_TZALLOC = 0 || test $REPLACE_LOCALTIME_RZ = 1 || test $REPLACE_MKTIME_Z = 1] +tzset [test $HAVE_TZALLOC = 0 || test $REPLACE_LOCALTIME_RZ = 1 || test $REPLACE_MKTIME_Z = 1] +unsetenv [test $HAVE_TZALLOC = 0 || test $REPLACE_LOCALTIME_RZ = 1 || test $REPLACE_MKTIME_Z = 1] configure.ac: gl_TIME_RZ -gl_CONDITIONAL([GL_COND_OBJ_TIME_RZ], [test $HAVE_TIMEZONE_T = 0]) +gl_CONDITIONAL([GL_COND_OBJ_TIME_RZ], + [test $HAVE_TZALLOC = 0 || test $REPLACE_LOCALTIME_RZ = 1 || test $REPLACE_MKTIME_Z = 1]) gl_TIME_MODULE_INDICATOR([time_rz]) Makefile.am: -- 2.34.1