summaryrefslogtreecommitdiff
path: root/lib/time.in.h
diff options
context:
space:
mode:
authorJörg Frings-Fürst <debian@jff.email>2026-03-10 13:24:07 +0100
committerJörg Frings-Fürst <debian@jff.email>2026-03-10 13:24:07 +0100
commitcfd1f17f1a85d95ea12bca8dae42add7dad1ad11 (patch)
tree8016486f8ee7157213f2d09ff2491bfa9c94638a /lib/time.in.h
parent14e4d584d0121031ec40e6c35869745f1747ff29 (diff)
parent1403307d6e2fb4e7b5d97a35f40d1e95134561ab (diff)
Merge branch 'release/debian/1.4.2-1'HEADdebian/1.4.2-1master
Diffstat (limited to 'lib/time.in.h')
-rw-r--r--lib/time.in.h29
1 files changed, 11 insertions, 18 deletions
diff --git a/lib/time.in.h b/lib/time.in.h
index 5dc03c89..5bbccf76 100644
--- a/lib/time.in.h
+++ b/lib/time.in.h
@@ -1,6 +1,6 @@
/* A more-standard <time.h>.
- Copyright (C) 2007-2024 Free Software Foundation, Inc.
+ Copyright (C) 2007-2026 Free Software Foundation, Inc.
This file is free software: you can redistribute it and/or modify
it under the terms of the GNU Lesser General Public License as
@@ -161,7 +161,6 @@ _GL_CXXALIAS_SYS (timespec_get, int, (struct timespec *ts, int base));
_GL_CXXALIASWARN (timespec_get);
# endif
# elif defined GNULIB_POSIXCHECK
-# undef timespec_get
# if HAVE_RAW_DECL_TIMESPEC_GET
_GL_WARN_ON_USE (timespec_get, "timespec_get is unportable - "
"use gnulib module timespec_get for portability");
@@ -186,9 +185,10 @@ _GL_FUNCDECL_SYS (timespec_getres, int, (struct timespec *ts, int base),
# endif
_GL_CXXALIAS_SYS (timespec_getres, int, (struct timespec *ts, int base));
# endif
+# if __GLIBC__ >= 2
_GL_CXXALIASWARN (timespec_getres);
+# endif
# elif defined GNULIB_POSIXCHECK
-# undef timespec_getres
# if HAVE_RAW_DECL_TIMESPEC_GETRES
_GL_WARN_ON_USE (timespec_getres, "timespec_getres is unportable - "
"use gnulib module timespec_getres for portability");
@@ -210,7 +210,6 @@ _GL_CXXALIAS_SYS (time, time_t, (time_t *__tp));
_GL_CXXALIASWARN (time);
# endif
# elif defined GNULIB_POSIXCHECK
-# undef time
# if HAVE_RAW_DECL_TIME
_GL_WARN_ON_USE (time, "time has consistency problems - "
"use gnulib module time for portability");
@@ -241,7 +240,6 @@ _GL_CXXALIAS_SYS (nanosleep, int,
# endif
_GL_CXXALIASWARN (nanosleep);
# elif defined GNULIB_POSIXCHECK
-# undef nanosleep
# if HAVE_RAW_DECL_NANOSLEEP
_GL_WARN_ON_USE (nanosleep, "nanosleep is unportable - "
"use gnulib module nanosleep for portability");
@@ -282,7 +280,6 @@ _GL_CXXALIAS_SYS (tzset, void, (void));
# endif
_GL_CXXALIASWARN (tzset);
# elif defined GNULIB_POSIXCHECK
-# undef tzset
# if HAVE_RAW_DECL_TZSET
_GL_WARN_ON_USE (tzset, "tzset has portability problems - "
"use gnulib module tzset for portability");
@@ -304,7 +301,6 @@ _GL_CXXALIAS_SYS (mktime, time_t, (struct tm *__tp));
_GL_CXXALIASWARN (mktime);
# endif
# elif defined GNULIB_POSIXCHECK
-# undef mktime
# if HAVE_RAW_DECL_MKTIME
_GL_WARN_ON_USE (mktime, "mktime has portability problems - "
"use gnulib module mktime for portability");
@@ -360,12 +356,10 @@ _GL_CXXALIAS_SYS (gmtime_r, struct tm *, (time_t const *restrict __timer,
_GL_CXXALIASWARN (gmtime_r);
# endif
# elif defined GNULIB_POSIXCHECK
-# undef localtime_r
# if HAVE_RAW_DECL_LOCALTIME_R
_GL_WARN_ON_USE (localtime_r, "localtime_r is unportable - "
"use gnulib module time_r for portability");
# endif
-# undef gmtime_r
# if HAVE_RAW_DECL_GMTIME_R
_GL_WARN_ON_USE (gmtime_r, "gmtime_r is unportable - "
"use gnulib module time_r for portability");
@@ -391,7 +385,6 @@ _GL_CXXALIAS_SYS (localtime, struct tm *, (time_t const *__timer));
_GL_CXXALIASWARN (localtime);
# endif
# elif defined GNULIB_POSIXCHECK
-# undef localtime
# if HAVE_RAW_DECL_LOCALTIME
_GL_WARN_ON_USE (localtime, "localtime has portability problems - "
"use gnulib module localtime for portability");
@@ -428,7 +421,6 @@ _GL_CXXALIAS_SYS (strptime, char *, (char const *restrict __buf,
struct tm *restrict __tm));
_GL_CXXALIASWARN (strptime);
# elif defined GNULIB_POSIXCHECK
-# undef strptime
# if HAVE_RAW_DECL_STRPTIME
_GL_WARN_ON_USE (strptime, "strptime is unportable - "
"use gnulib module strptime for portability");
@@ -481,7 +473,6 @@ _GL_CXXALIAS_SYS (strftime, size_t,
_GL_CXXALIASWARN (strftime);
# endif
# elif defined GNULIB_POSIXCHECK
-# undef strftime
# if HAVE_RAW_DECL_STRFTIME
_GL_WARN_ON_USE (strftime, "strftime has portability problems - "
"use gnulib module strftime-fixes for portability");
@@ -521,11 +512,18 @@ _GL_CXXALIAS_SYS (tzalloc, timezone_t, (char const *__name));
# endif
/* tzfree (tz)
- Frees a time zone object.
+ Free a time zone object, preserving errno.
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));
+# else
+# if !(defined __cplusplus && defined GNULIB_NAMESPACE)
+# undef tzfree
+# define tzfree rpl_tzfree
+# endif
+_GL_FUNCDECL_RPL (tzfree, void, (timezone_t __tz), );
+_GL_CXXALIAS_RPL (tzfree, void, (timezone_t __tz));
# endif
/* localtime_rz (tz, &t, &result)
@@ -609,7 +607,6 @@ _GL_CXXALIAS_SYS (timegm, time_t, (struct tm *__tm));
_GL_CXXALIASWARN (timegm);
# endif
# elif defined GNULIB_POSIXCHECK
-# undef timegm
# if HAVE_RAW_DECL_TIMEGM
_GL_WARN_ON_USE (timegm, "timegm is unportable - "
"use gnulib module timegm for portability");
@@ -620,28 +617,24 @@ _GL_WARN_ON_USE (timegm, "timegm is unportable - "
buffers when given outlandish struct tm values. Portable
applications should use strftime (or even sprintf) instead. */
# if defined GNULIB_POSIXCHECK
-# undef asctime
# if HAVE_RAW_DECL_ASCTIME
_GL_WARN_ON_USE (asctime, "asctime can overrun buffers in some cases - "
"better use strftime (or even sprintf) instead");
# endif
# endif
# if defined GNULIB_POSIXCHECK
-# undef asctime_r
# if HAVE_RAW_DECL_ASCTIME_R
_GL_WARN_ON_USE (asctime_r, "asctime_r can overrun buffers in some cases - "
"better use strftime (or even sprintf) instead");
# endif
# endif
# if defined GNULIB_POSIXCHECK
-# undef ctime
# if HAVE_RAW_DECL_CTIME
_GL_WARN_ON_USE (ctime, "ctime can overrun buffers in some cases - "
"better use strftime (or even sprintf) instead");
# endif
# endif
# if defined GNULIB_POSIXCHECK
-# undef ctime_r
# if HAVE_RAW_DECL_CTIME_R
_GL_WARN_ON_USE (ctime_r, "ctime_r can overrun buffers in some cases - "
"better use strftime (or even sprintf) instead");