summaryrefslogtreecommitdiffstats
path: root/gl/time.in.h
diff options
context:
space:
mode:
Diffstat (limited to 'gl/time.in.h')
-rw-r--r--gl/time.in.h27
1 files changed, 9 insertions, 18 deletions
diff --git a/gl/time.in.h b/gl/time.in.h
index 3ff16e3b..5bbccf76 100644
--- a/gl/time.in.h
+++ b/gl/time.in.h
@@ -1,6 +1,6 @@
1/* A more-standard <time.h>. 1/* A more-standard <time.h>.
2 2
3 Copyright (C) 2007-2025 Free Software Foundation, Inc. 3 Copyright (C) 2007-2026 Free Software Foundation, Inc.
4 4
5 This file is free software: you can redistribute it and/or modify 5 This file is free software: you can redistribute it and/or modify
6 it under the terms of the GNU Lesser General Public License as 6 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));
161_GL_CXXALIASWARN (timespec_get); 161_GL_CXXALIASWARN (timespec_get);
162# endif 162# endif
163# elif defined GNULIB_POSIXCHECK 163# elif defined GNULIB_POSIXCHECK
164# undef timespec_get
165# if HAVE_RAW_DECL_TIMESPEC_GET 164# if HAVE_RAW_DECL_TIMESPEC_GET
166_GL_WARN_ON_USE (timespec_get, "timespec_get is unportable - " 165_GL_WARN_ON_USE (timespec_get, "timespec_get is unportable - "
167 "use gnulib module timespec_get for portability"); 166 "use gnulib module timespec_get for portability");
@@ -190,7 +189,6 @@ _GL_CXXALIAS_SYS (timespec_getres, int, (struct timespec *ts, int base));
190_GL_CXXALIASWARN (timespec_getres); 189_GL_CXXALIASWARN (timespec_getres);
191# endif 190# endif
192# elif defined GNULIB_POSIXCHECK 191# elif defined GNULIB_POSIXCHECK
193# undef timespec_getres
194# if HAVE_RAW_DECL_TIMESPEC_GETRES 192# if HAVE_RAW_DECL_TIMESPEC_GETRES
195_GL_WARN_ON_USE (timespec_getres, "timespec_getres is unportable - " 193_GL_WARN_ON_USE (timespec_getres, "timespec_getres is unportable - "
196 "use gnulib module timespec_getres for portability"); 194 "use gnulib module timespec_getres for portability");
@@ -212,7 +210,6 @@ _GL_CXXALIAS_SYS (time, time_t, (time_t *__tp));
212_GL_CXXALIASWARN (time); 210_GL_CXXALIASWARN (time);
213# endif 211# endif
214# elif defined GNULIB_POSIXCHECK 212# elif defined GNULIB_POSIXCHECK
215# undef time
216# if HAVE_RAW_DECL_TIME 213# if HAVE_RAW_DECL_TIME
217_GL_WARN_ON_USE (time, "time has consistency problems - " 214_GL_WARN_ON_USE (time, "time has consistency problems - "
218 "use gnulib module time for portability"); 215 "use gnulib module time for portability");
@@ -243,7 +240,6 @@ _GL_CXXALIAS_SYS (nanosleep, int,
243# endif 240# endif
244_GL_CXXALIASWARN (nanosleep); 241_GL_CXXALIASWARN (nanosleep);
245# elif defined GNULIB_POSIXCHECK 242# elif defined GNULIB_POSIXCHECK
246# undef nanosleep
247# if HAVE_RAW_DECL_NANOSLEEP 243# if HAVE_RAW_DECL_NANOSLEEP
248_GL_WARN_ON_USE (nanosleep, "nanosleep is unportable - " 244_GL_WARN_ON_USE (nanosleep, "nanosleep is unportable - "
249 "use gnulib module nanosleep for portability"); 245 "use gnulib module nanosleep for portability");
@@ -284,7 +280,6 @@ _GL_CXXALIAS_SYS (tzset, void, (void));
284# endif 280# endif
285_GL_CXXALIASWARN (tzset); 281_GL_CXXALIASWARN (tzset);
286# elif defined GNULIB_POSIXCHECK 282# elif defined GNULIB_POSIXCHECK
287# undef tzset
288# if HAVE_RAW_DECL_TZSET 283# if HAVE_RAW_DECL_TZSET
289_GL_WARN_ON_USE (tzset, "tzset has portability problems - " 284_GL_WARN_ON_USE (tzset, "tzset has portability problems - "
290 "use gnulib module tzset for portability"); 285 "use gnulib module tzset for portability");
@@ -306,7 +301,6 @@ _GL_CXXALIAS_SYS (mktime, time_t, (struct tm *__tp));
306_GL_CXXALIASWARN (mktime); 301_GL_CXXALIASWARN (mktime);
307# endif 302# endif
308# elif defined GNULIB_POSIXCHECK 303# elif defined GNULIB_POSIXCHECK
309# undef mktime
310# if HAVE_RAW_DECL_MKTIME 304# if HAVE_RAW_DECL_MKTIME
311_GL_WARN_ON_USE (mktime, "mktime has portability problems - " 305_GL_WARN_ON_USE (mktime, "mktime has portability problems - "
312 "use gnulib module mktime for portability"); 306 "use gnulib module mktime for portability");
@@ -362,12 +356,10 @@ _GL_CXXALIAS_SYS (gmtime_r, struct tm *, (time_t const *restrict __timer,
362_GL_CXXALIASWARN (gmtime_r); 356_GL_CXXALIASWARN (gmtime_r);
363# endif 357# endif
364# elif defined GNULIB_POSIXCHECK 358# elif defined GNULIB_POSIXCHECK
365# undef localtime_r
366# if HAVE_RAW_DECL_LOCALTIME_R 359# if HAVE_RAW_DECL_LOCALTIME_R
367_GL_WARN_ON_USE (localtime_r, "localtime_r is unportable - " 360_GL_WARN_ON_USE (localtime_r, "localtime_r is unportable - "
368 "use gnulib module time_r for portability"); 361 "use gnulib module time_r for portability");
369# endif 362# endif
370# undef gmtime_r
371# if HAVE_RAW_DECL_GMTIME_R 363# if HAVE_RAW_DECL_GMTIME_R
372_GL_WARN_ON_USE (gmtime_r, "gmtime_r is unportable - " 364_GL_WARN_ON_USE (gmtime_r, "gmtime_r is unportable - "
373 "use gnulib module time_r for portability"); 365 "use gnulib module time_r for portability");
@@ -393,7 +385,6 @@ _GL_CXXALIAS_SYS (localtime, struct tm *, (time_t const *__timer));
393_GL_CXXALIASWARN (localtime); 385_GL_CXXALIASWARN (localtime);
394# endif 386# endif
395# elif defined GNULIB_POSIXCHECK 387# elif defined GNULIB_POSIXCHECK
396# undef localtime
397# if HAVE_RAW_DECL_LOCALTIME 388# if HAVE_RAW_DECL_LOCALTIME
398_GL_WARN_ON_USE (localtime, "localtime has portability problems - " 389_GL_WARN_ON_USE (localtime, "localtime has portability problems - "
399 "use gnulib module localtime for portability"); 390 "use gnulib module localtime for portability");
@@ -430,7 +421,6 @@ _GL_CXXALIAS_SYS (strptime, char *, (char const *restrict __buf,
430 struct tm *restrict __tm)); 421 struct tm *restrict __tm));
431_GL_CXXALIASWARN (strptime); 422_GL_CXXALIASWARN (strptime);
432# elif defined GNULIB_POSIXCHECK 423# elif defined GNULIB_POSIXCHECK
433# undef strptime
434# if HAVE_RAW_DECL_STRPTIME 424# if HAVE_RAW_DECL_STRPTIME
435_GL_WARN_ON_USE (strptime, "strptime is unportable - " 425_GL_WARN_ON_USE (strptime, "strptime is unportable - "
436 "use gnulib module strptime for portability"); 426 "use gnulib module strptime for portability");
@@ -483,7 +473,6 @@ _GL_CXXALIAS_SYS (strftime, size_t,
483_GL_CXXALIASWARN (strftime); 473_GL_CXXALIASWARN (strftime);
484# endif 474# endif
485# elif defined GNULIB_POSIXCHECK 475# elif defined GNULIB_POSIXCHECK
486# undef strftime
487# if HAVE_RAW_DECL_STRFTIME 476# if HAVE_RAW_DECL_STRFTIME
488_GL_WARN_ON_USE (strftime, "strftime has portability problems - " 477_GL_WARN_ON_USE (strftime, "strftime has portability problems - "
489 "use gnulib module strftime-fixes for portability"); 478 "use gnulib module strftime-fixes for portability");
@@ -523,11 +512,18 @@ _GL_CXXALIAS_SYS (tzalloc, timezone_t, (char const *__name));
523# endif 512# endif
524 513
525/* tzfree (tz) 514/* tzfree (tz)
526 Frees a time zone object. 515 Free a time zone object, preserving errno.
527 The argument must have been returned by tzalloc(). */ 516 The argument must have been returned by tzalloc(). */
528# if !@HAVE_TZALLOC@ 517# if !@HAVE_TZALLOC@
529_GL_FUNCDECL_SYS (tzfree, void, (timezone_t __tz), ); 518_GL_FUNCDECL_SYS (tzfree, void, (timezone_t __tz), );
530_GL_CXXALIAS_SYS (tzfree, void, (timezone_t __tz)); 519_GL_CXXALIAS_SYS (tzfree, void, (timezone_t __tz));
520# else
521# if !(defined __cplusplus && defined GNULIB_NAMESPACE)
522# undef tzfree
523# define tzfree rpl_tzfree
524# endif
525_GL_FUNCDECL_RPL (tzfree, void, (timezone_t __tz), );
526_GL_CXXALIAS_RPL (tzfree, void, (timezone_t __tz));
531# endif 527# endif
532 528
533/* localtime_rz (tz, &t, &result) 529/* localtime_rz (tz, &t, &result)
@@ -611,7 +607,6 @@ _GL_CXXALIAS_SYS (timegm, time_t, (struct tm *__tm));
611_GL_CXXALIASWARN (timegm); 607_GL_CXXALIASWARN (timegm);
612# endif 608# endif
613# elif defined GNULIB_POSIXCHECK 609# elif defined GNULIB_POSIXCHECK
614# undef timegm
615# if HAVE_RAW_DECL_TIMEGM 610# if HAVE_RAW_DECL_TIMEGM
616_GL_WARN_ON_USE (timegm, "timegm is unportable - " 611_GL_WARN_ON_USE (timegm, "timegm is unportable - "
617 "use gnulib module timegm for portability"); 612 "use gnulib module timegm for portability");
@@ -622,28 +617,24 @@ _GL_WARN_ON_USE (timegm, "timegm is unportable - "
622 buffers when given outlandish struct tm values. Portable 617 buffers when given outlandish struct tm values. Portable
623 applications should use strftime (or even sprintf) instead. */ 618 applications should use strftime (or even sprintf) instead. */
624# if defined GNULIB_POSIXCHECK 619# if defined GNULIB_POSIXCHECK
625# undef asctime
626# if HAVE_RAW_DECL_ASCTIME 620# if HAVE_RAW_DECL_ASCTIME
627_GL_WARN_ON_USE (asctime, "asctime can overrun buffers in some cases - " 621_GL_WARN_ON_USE (asctime, "asctime can overrun buffers in some cases - "
628 "better use strftime (or even sprintf) instead"); 622 "better use strftime (or even sprintf) instead");
629# endif 623# endif
630# endif 624# endif
631# if defined GNULIB_POSIXCHECK 625# if defined GNULIB_POSIXCHECK
632# undef asctime_r
633# if HAVE_RAW_DECL_ASCTIME_R 626# if HAVE_RAW_DECL_ASCTIME_R
634_GL_WARN_ON_USE (asctime_r, "asctime_r can overrun buffers in some cases - " 627_GL_WARN_ON_USE (asctime_r, "asctime_r can overrun buffers in some cases - "
635 "better use strftime (or even sprintf) instead"); 628 "better use strftime (or even sprintf) instead");
636# endif 629# endif
637# endif 630# endif
638# if defined GNULIB_POSIXCHECK 631# if defined GNULIB_POSIXCHECK
639# undef ctime
640# if HAVE_RAW_DECL_CTIME 632# if HAVE_RAW_DECL_CTIME
641_GL_WARN_ON_USE (ctime, "ctime can overrun buffers in some cases - " 633_GL_WARN_ON_USE (ctime, "ctime can overrun buffers in some cases - "
642 "better use strftime (or even sprintf) instead"); 634 "better use strftime (or even sprintf) instead");
643# endif 635# endif
644# endif 636# endif
645# if defined GNULIB_POSIXCHECK 637# if defined GNULIB_POSIXCHECK
646# undef ctime_r
647# if HAVE_RAW_DECL_CTIME_R 638# if HAVE_RAW_DECL_CTIME_R
648_GL_WARN_ON_USE (ctime_r, "ctime_r can overrun buffers in some cases - " 639_GL_WARN_ON_USE (ctime_r, "ctime_r can overrun buffers in some cases - "
649 "better use strftime (or even sprintf) instead"); 640 "better use strftime (or even sprintf) instead");