1
Fork 0
mirror of git://git.sv.gnu.org/emacs.git synced 2025-12-05 22:20:24 -08:00

; Update from Gnulib

* configure.ac:

* src/conf_post.h: Remove workarounds now rendered redundant by
Gnulib.
This commit is contained in:
Po Lu 2024-09-05 08:41:11 +08:00
parent a13eef1fae
commit 1a13c5e63e
57 changed files with 2048 additions and 925 deletions

View file

@ -147,12 +147,12 @@ extern
# undef timespec_get
# define timespec_get rpl_timespec_get
# endif
_GL_FUNCDECL_RPL (timespec_get, int, (struct timespec *ts, int base)
_GL_FUNCDECL_RPL (timespec_get, int, (struct timespec *ts, int base),
_GL_ARG_NONNULL ((1)));
_GL_CXXALIAS_RPL (timespec_get, int, (struct timespec *ts, int base));
# else
# if !@HAVE_TIMESPEC_GET@
_GL_FUNCDECL_SYS (timespec_get, int, (struct timespec *ts, int base)
_GL_FUNCDECL_SYS (timespec_get, int, (struct timespec *ts, int base),
_GL_ARG_NONNULL ((1)));
# endif
_GL_CXXALIAS_SYS (timespec_get, int, (struct timespec *ts, int base));
@ -176,12 +176,12 @@ _GL_WARN_ON_USE (timespec_get, "timespec_get is unportable - "
# undef timespec_getres
# define timespec_getres rpl_timespec_getres
# endif
_GL_FUNCDECL_RPL (timespec_getres, int, (struct timespec *ts, int base)
_GL_FUNCDECL_RPL (timespec_getres, int, (struct timespec *ts, int base),
_GL_ARG_NONNULL ((1)));
_GL_CXXALIAS_RPL (timespec_getres, int, (struct timespec *ts, int base));
# else
# if !@HAVE_TIMESPEC_GETRES@
_GL_FUNCDECL_SYS (timespec_getres, int, (struct timespec *ts, int base)
_GL_FUNCDECL_SYS (timespec_getres, int, (struct timespec *ts, int base),
_GL_ARG_NONNULL ((1)));
# endif
_GL_CXXALIAS_SYS (timespec_getres, int, (struct timespec *ts, int base));
@ -226,14 +226,14 @@ _GL_WARN_ON_USE (time, "time has consistency problems - "
# define nanosleep rpl_nanosleep
# endif
_GL_FUNCDECL_RPL (nanosleep, int,
(struct timespec const *__rqtp, struct timespec *__rmtp)
(struct timespec const *__rqtp, struct timespec *__rmtp),
_GL_ARG_NONNULL ((1)));
_GL_CXXALIAS_RPL (nanosleep, int,
(struct timespec const *__rqtp, struct timespec *__rmtp));
# else
# if ! @HAVE_NANOSLEEP@
_GL_FUNCDECL_SYS (nanosleep, int,
(struct timespec const *__rqtp, struct timespec *__rmtp)
(struct timespec const *__rqtp, struct timespec *__rmtp),
_GL_ARG_NONNULL ((1)));
# endif
_GL_CXXALIAS_SYS (nanosleep, int,
@ -295,7 +295,7 @@ _GL_WARN_ON_USE (tzset, "tzset has portability problems - "
# if !(defined __cplusplus && defined GNULIB_NAMESPACE)
# define mktime rpl_mktime
# endif
_GL_FUNCDECL_RPL (mktime, time_t, (struct tm *__tp) _GL_ARG_NONNULL ((1)));
_GL_FUNCDECL_RPL (mktime, time_t, (struct tm *__tp), _GL_ARG_NONNULL ((1)));
_GL_CXXALIAS_RPL (mktime, time_t, (struct tm *__tp));
# else
_GL_CXXALIAS_SYS (mktime, time_t, (struct tm *__tp));
@ -321,14 +321,14 @@ _GL_WARN_ON_USE (mktime, "mktime has portability problems - "
# define localtime_r rpl_localtime_r
# endif
_GL_FUNCDECL_RPL (localtime_r, struct tm *, (time_t const *restrict __timer,
struct tm *restrict __result)
struct tm *restrict __result),
_GL_ARG_NONNULL ((1, 2)));
_GL_CXXALIAS_RPL (localtime_r, struct tm *, (time_t const *restrict __timer,
struct tm *restrict __result));
# else
# if ! @HAVE_DECL_LOCALTIME_R@
_GL_FUNCDECL_SYS (localtime_r, struct tm *, (time_t const *restrict __timer,
struct tm *restrict __result)
struct tm *restrict __result),
_GL_ARG_NONNULL ((1, 2)));
# endif
_GL_CXXALIAS_SYS (localtime_r, struct tm *, (time_t const *restrict __timer,
@ -343,14 +343,14 @@ _GL_CXXALIASWARN (localtime_r);
# define gmtime_r rpl_gmtime_r
# endif
_GL_FUNCDECL_RPL (gmtime_r, struct tm *, (time_t const *restrict __timer,
struct tm *restrict __result)
struct tm *restrict __result),
_GL_ARG_NONNULL ((1, 2)));
_GL_CXXALIAS_RPL (gmtime_r, struct tm *, (time_t const *restrict __timer,
struct tm *restrict __result));
# else
# if ! @HAVE_DECL_LOCALTIME_R@
_GL_FUNCDECL_SYS (gmtime_r, struct tm *, (time_t const *restrict __timer,
struct tm *restrict __result)
struct tm *restrict __result),
_GL_ARG_NONNULL ((1, 2)));
# endif
_GL_CXXALIAS_SYS (gmtime_r, struct tm *, (time_t const *restrict __timer,
@ -381,7 +381,7 @@ _GL_WARN_ON_USE (gmtime_r, "gmtime_r is unportable - "
# undef localtime
# define localtime rpl_localtime
# endif
_GL_FUNCDECL_RPL (localtime, struct tm *, (time_t const *__timer)
_GL_FUNCDECL_RPL (localtime, struct tm *, (time_t const *__timer),
_GL_ARG_NONNULL ((1)));
_GL_CXXALIAS_RPL (localtime, struct tm *, (time_t const *__timer));
# else
@ -404,7 +404,7 @@ _GL_WARN_ON_USE (localtime, "localtime has portability problems - "
# undef gmtime
# define gmtime rpl_gmtime
# endif
_GL_FUNCDECL_RPL (gmtime, struct tm *, (time_t const *__timer)
_GL_FUNCDECL_RPL (gmtime, struct tm *, (time_t const *__timer),
_GL_ARG_NONNULL ((1)));
_GL_CXXALIAS_RPL (gmtime, struct tm *, (time_t const *__timer));
# else
@ -420,7 +420,7 @@ _GL_CXXALIASWARN (gmtime);
# if ! @HAVE_STRPTIME@
_GL_FUNCDECL_SYS (strptime, char *, (char const *restrict __buf,
char const *restrict __format,
struct tm *restrict __tm)
struct tm *restrict __tm),
_GL_ARG_NONNULL ((1, 2, 3)));
# endif
_GL_CXXALIAS_SYS (strptime, char *, (char const *restrict __buf,
@ -445,7 +445,7 @@ _GL_WARN_ON_USE (strptime, "strptime is unportable - "
# ifndef __cplusplus
_GL_ATTRIBUTE_DEPRECATED
# endif
_GL_FUNCDECL_RPL (ctime, char *, (time_t const *__tp)
_GL_FUNCDECL_RPL (ctime, char *, (time_t const *__tp),
_GL_ARG_NONNULL ((1)));
_GL_CXXALIAS_RPL (ctime, char *, (time_t const *__tp));
# else
@ -467,7 +467,7 @@ _GL_CXXALIASWARN (ctime);
# endif
_GL_FUNCDECL_RPL (strftime, size_t,
(char *restrict __buf, size_t __bufsize,
const char *restrict __fmt, const struct tm *restrict __tp)
const char *restrict __fmt, const struct tm *restrict __tp),
_GL_ARG_NONNULL ((1, 3, 4)));
_GL_CXXALIAS_RPL (strftime, size_t,
(char *restrict __buf, size_t __bufsize,
@ -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,37 +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)));
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. */
_GL_FUNCDECL_SYS (mktime_z, time_t,
(timezone_t __tz, struct tm *restrict __tm)
# 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
@ -552,11 +597,11 @@ _GL_CXXALIAS_SYS (mktime_z, time_t,
# undef timegm
# define timegm rpl_timegm
# endif
_GL_FUNCDECL_RPL (timegm, time_t, (struct tm *__tm) _GL_ARG_NONNULL ((1)));
_GL_FUNCDECL_RPL (timegm, time_t, (struct tm *__tm), _GL_ARG_NONNULL ((1)));
_GL_CXXALIAS_RPL (timegm, time_t, (struct tm *__tm));
# else
# if ! @HAVE_TIMEGM@
_GL_FUNCDECL_SYS (timegm, time_t, (struct tm *__tm) _GL_ARG_NONNULL ((1)));
_GL_FUNCDECL_SYS (timegm, time_t, (struct tm *__tm), _GL_ARG_NONNULL ((1)));
# endif
_GL_CXXALIAS_SYS (timegm, time_t, (struct tm *__tm));
# endif