diff options
author | Pawel Kowalski <p.kowalski2@partner.samsung.com> | 2018-06-15 11:24:08 +0200 |
---|---|---|
committer | Pawel Kowalski <p.kowalski2@partner.samsung.com> | 2018-06-15 11:26:09 +0200 |
commit | 5c7e0aaf17a296535495e3431db6a86ad64064b3 (patch) | |
tree | d7cca0250c60fbc69eb70a7039d0f9659f81b9d0 /gl/time.in.h | |
parent | 1701584f7841a79ae4e97699a8c4ac9f0a09c38f (diff) | |
parent | e527f54afdf27ab8ce73a22d05d69e5482f5e92b (diff) | |
download | libtasn1-5c7e0aaf17a296535495e3431db6a86ad64064b3.tar.gz libtasn1-5c7e0aaf17a296535495e3431db6a86ad64064b3.tar.bz2 libtasn1-5c7e0aaf17a296535495e3431db6a86ad64064b3.zip |
Merge branch 'upstream' into tizensubmit/tizen_5.0/20181101.000007submit/tizen/20180615.093304accepted/tizen/unified/20180620.131427accepted/tizen/5.0/unified/20181102.030257
Change-Id: I254f6095d312777427a57af3ed346986a28f3aaa
Diffstat (limited to 'gl/time.in.h')
-rw-r--r-- | gl/time.in.h | 33 |
1 files changed, 28 insertions, 5 deletions
diff --git a/gl/time.in.h b/gl/time.in.h index 81abdf4..fef8980 100644 --- a/gl/time.in.h +++ b/gl/time.in.h @@ -1,6 +1,6 @@ /* A more-standard <time.h>. - Copyright (C) 2007-2014 Free Software Foundation, Inc. + Copyright (C) 2007-2017 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 @@ -22,11 +22,13 @@ /* Don't get in the way of glibc when it includes time.h merely to declare a few standard symbols, rather than to declare all the - symbols. Also, Solaris 8 <time.h> eventually includes itself + symbols. (However, skip this for MinGW as it treats __need_time_t + incompatibly.) Also, Solaris 8 <time.h> eventually includes itself recursively; if that is happening, just include the system <time.h> without adding our own declarations. */ -#if (defined __need_time_t || defined __need_clock_t \ - || defined __need_timespec \ +#if (((defined __need_time_t || defined __need_clock_t \ + || defined __need_timespec) \ + && !defined __MINGW32__) \ || defined _@GUARD_PREFIX@_TIME_H) # @INCLUDE_NEXT@ @NEXT_TIME_H@ @@ -55,6 +57,8 @@ # include <sys/time.h> # elif @PTHREAD_H_DEFINES_STRUCT_TIMESPEC@ # include <pthread.h> +# elif @UNISTD_H_DEFINES_STRUCT_TIMESPEC@ +# include <unistd.h> # else # ifdef __cplusplus @@ -213,7 +217,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 <http://www.opengroup.org/susv3xsh/strptime.html>. */ # if @GNULIB_STRPTIME@ @@ -229,6 +233,25 @@ _GL_CXXALIAS_SYS (strptime, char *, (char const *restrict __buf, _GL_CXXALIASWARN (strptime); # 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)); +_GL_CXXALIAS_SYS (tzalloc, timezone_t, (char const *__name)); +_GL_FUNCDECL_SYS (tzfree, void, (timezone_t __tz)); +_GL_CXXALIAS_SYS (tzfree, void, (timezone_t __tz)); +_GL_FUNCDECL_SYS (localtime_rz, struct tm *, + (timezone_t __tz, time_t const *restrict __timer, + struct tm *restrict __result) _GL_ARG_NONNULL ((2, 3))); +_GL_CXXALIAS_SYS (localtime_rz, struct tm *, + (timezone_t __tz, time_t const *restrict __timer, + struct tm *restrict __result)); +_GL_FUNCDECL_SYS (mktime_z, time_t, + (timezone_t __tz, struct tm *restrict __result) + _GL_ARG_NONNULL ((2))); +_GL_CXXALIAS_SYS (mktime_z, time_t, + (timezone_t __tz, struct tm *restrict __result)); +# endif + /* Convert TM to a time_t value, assuming UTC. */ # if @GNULIB_TIMEGM@ # if @REPLACE_TIMEGM@ |