X-Git-Url: https://git.gag.com/?a=blobdiff_plain;f=lib%2Ftime.in.h;fp=lib%2Ftime.in.h;h=a2dca89340cf5d643961e1fddcdf4376019e02b4;hb=a8a88eddaa90432e6ec1b8d9d5c9842bc91afd1d;hp=865c114119680ca398343cc32d0be2f1ad2b0e28;hpb=20fcfc81ece044b8b0a6768ec6cf47be4e22a2e6;p=debian%2Fgzip diff --git a/lib/time.in.h b/lib/time.in.h index 865c114..a2dca89 100644 --- a/lib/time.in.h +++ b/lib/time.in.h @@ -1,6 +1,6 @@ /* A more-standard . - Copyright (C) 2007-2016 Free Software Foundation, Inc. + Copyright (C) 2007-2018 Free Software Foundation, Inc. This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by @@ -13,7 +13,7 @@ GNU General Public License for more details. You should have received a copy of the GNU General Public License - along with this program; if not, see . */ + along with this program; if not, see . */ #if __GNUC__ >= 3 @PRAGMA_SYSTEM_HEADER@ @@ -120,6 +120,24 @@ _GL_CXXALIAS_SYS (nanosleep, int, _GL_CXXALIASWARN (nanosleep); # endif +/* Initialize time conversion information. */ +# if @GNULIB_TZSET@ +# if @REPLACE_TZSET@ +# if !(defined __cplusplus && defined GNULIB_NAMESPACE) +# undef tzset +# define tzset rpl_tzset +# endif +_GL_FUNCDECL_RPL (tzset, void, (void)); +_GL_CXXALIAS_RPL (tzset, void, (void)); +# else +# if ! @HAVE_TZSET@ +_GL_FUNCDECL_SYS (tzset, void, (void)); +# endif +_GL_CXXALIAS_SYS (tzset, void, (void)); +# endif +_GL_CXXALIASWARN (tzset); +# endif + /* Return the 'time_t' representation of TP and normalize TP. */ # if @GNULIB_MKTIME@ # if @REPLACE_MKTIME@ @@ -187,7 +205,7 @@ _GL_CXXALIASWARN (gmtime_r); /* Convert TIMER to RESULT, assuming local time and UTC respectively. See and . */ -# if @GNULIB_GETTIMEOFDAY@ +# if @GNULIB_LOCALTIME@ || @REPLACE_LOCALTIME@ # if @REPLACE_LOCALTIME@ # if !(defined __cplusplus && defined GNULIB_NAMESPACE) # undef localtime @@ -202,7 +220,7 @@ _GL_CXXALIAS_SYS (localtime, struct tm *, (time_t const *__timer)); _GL_CXXALIASWARN (localtime); # endif -# if @GNULIB_GETTIMEOFDAY@ +# if 0 || @REPLACE_GMTIME@ # if @REPLACE_GMTIME@ # if !(defined __cplusplus && defined GNULIB_NAMESPACE) # undef gmtime @@ -217,7 +235,7 @@ _GL_CXXALIAS_SYS (gmtime, struct tm *, (time_t const *__timer)); _GL_CXXALIASWARN (gmtime); # endif -/* Parse BUF as a time stamp, assuming FORMAT specifies its layout, and store +/* Parse BUF as a timestamp, assuming FORMAT specifies its layout, and store the resulting broken-down time into TM. See . */ # if @GNULIB_STRPTIME@ @@ -233,6 +251,41 @@ _GL_CXXALIAS_SYS (strptime, char *, (char const *restrict __buf, _GL_CXXALIASWARN (strptime); # endif +/* Convert *TP to a date and time string. See + . */ +# if @GNULIB_CTIME@ +# if @REPLACE_CTIME@ +# if !(defined __cplusplus && defined GNULIB_NAMESPACE) +# define ctime rpl_ctime +# endif +_GL_FUNCDECL_RPL (ctime, char *, (time_t const *__tp) + _GL_ARG_NONNULL ((1))); +_GL_CXXALIAS_RPL (ctime, char *, (time_t const *__tp)); +# else +_GL_CXXALIAS_SYS (ctime, char *, (time_t const *__tp)); +# endif +_GL_CXXALIASWARN (ctime); +# endif + +/* Convert *TP to a date and time string. See + . */ +# if @GNULIB_STRFTIME@ +# if @REPLACE_STRFTIME@ +# if !(defined __cplusplus && defined GNULIB_NAMESPACE) +# define strftime rpl_strftime +# endif +_GL_FUNCDECL_RPL (strftime, size_t, (char *__buf, size_t __bufsize, + const char *__fmt, const struct tm *__tp) + _GL_ARG_NONNULL ((1, 3, 4))); +_GL_CXXALIAS_RPL (strftime, size_t, (char *__buf, size_t __bufsize, + const char *__fmt, const struct tm *__tp)); +# else +_GL_CXXALIAS_SYS (strftime, size_t, (char *__buf, size_t __bufsize, + const char *__fmt, const struct tm *__tp)); +# endif +_GL_CXXALIASWARN (strftime); +# endif + # if defined _GNU_SOURCE && @GNULIB_TIME_RZ@ && ! @HAVE_TIMEZONE_T@ typedef struct tm_zone *timezone_t; _GL_FUNCDECL_SYS (tzalloc, timezone_t, (char const *__name));