|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
#if __GNUC__ >= 3 |
|
@PRAGMA_SYSTEM_HEADER@ |
|
#endif |
|
@PRAGMA_COLUMNS@ |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
#if (((defined __need_time_t || defined __need_clock_t \ |
|
|| defined __need_timespec) \ |
|
&& !defined __MINGW32__) \ |
|
|| defined _@GUARD_PREFIX@_TIME_H) |
|
|
|
# @INCLUDE_NEXT@ @NEXT_TIME_H@ |
|
|
|
#else |
|
|
|
# define _@GUARD_PREFIX@_TIME_H |
|
|
|
|
|
|
|
# if defined __MINGW32__ |
|
# include <unistd.h> |
|
# endif |
|
|
|
# @INCLUDE_NEXT@ @NEXT_TIME_H@ |
|
|
|
|
|
# include <stddef.h> |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
# if ! @TIME_H_DEFINES_STRUCT_TIMESPEC@ |
|
# if @SYS_TIME_H_DEFINES_STRUCT_TIMESPEC@ |
|
# 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 |
|
extern "C" { |
|
# endif |
|
|
|
# if !GNULIB_defined_struct_timespec |
|
# undef timespec |
|
# define timespec rpl_timespec |
|
struct timespec |
|
{ |
|
time_t tv_sec; |
|
long int tv_nsec; |
|
}; |
|
# define GNULIB_defined_struct_timespec 1 |
|
# endif |
|
|
|
# ifdef __cplusplus |
|
} |
|
# endif |
|
|
|
# endif |
|
# endif |
|
|
|
# if !GNULIB_defined_struct_time_t_must_be_integral |
|
|
|
|
|
|
|
|
|
|
|
struct __time_t_must_be_integral { |
|
unsigned int __floating_time_t_unsupported : (time_t) 1; |
|
}; |
|
# define GNULIB_defined_struct_time_t_must_be_integral 1 |
|
# endif |
|
|
|
|
|
# if ! @TIME_H_DEFINES_TIME_UTC@ |
|
# if !GNULIB_defined_TIME_UTC |
|
# define TIME_UTC 1 |
|
# define GNULIB_defined_TIME_UTC 1 |
|
# endif |
|
# endif |
|
|
|
|
|
|
|
# if @GNULIB_TIMESPEC_GET@ |
|
# if ! @HAVE_TIMESPEC_GET@ |
|
_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)); |
|
_GL_CXXALIASWARN (timespec_get); |
|
# endif |
|
|
|
|
|
|
|
# if @GNULIB_TIMESPEC_GETRES@ |
|
# if ! @HAVE_TIMESPEC_GETRES@ |
|
_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)); |
|
_GL_CXXALIASWARN (timespec_getres); |
|
# endif |
|
|
|
|
|
|
|
|
|
# if @GNULIB_NANOSLEEP@ |
|
# if @REPLACE_NANOSLEEP@ |
|
# if !(defined __cplusplus && defined GNULIB_NAMESPACE) |
|
# define nanosleep rpl_nanosleep |
|
# endif |
|
_GL_FUNCDECL_RPL (nanosleep, int, |
|
(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) |
|
_GL_ARG_NONNULL ((1))); |
|
# endif |
|
_GL_CXXALIAS_SYS (nanosleep, int, |
|
(struct timespec const *__rqtp, struct timespec *__rmtp)); |
|
# endif |
|
_GL_CXXALIASWARN (nanosleep); |
|
# endif |
|
|
|
|
|
# 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)); |
|
# elif defined _WIN32 && !defined __CYGWIN__ |
|
# if !(defined __cplusplus && defined GNULIB_NAMESPACE) |
|
# undef tzset |
|
# define tzset _tzset |
|
# endif |
|
_GL_CXXALIAS_MDA (tzset, void, (void)); |
|
# else |
|
_GL_CXXALIAS_SYS (tzset, void, (void)); |
|
# endif |
|
_GL_CXXALIASWARN (tzset); |
|
# elif @GNULIB_MDA_TZSET@ |
|
|
|
|
|
|
|
# if defined _WIN32 && !defined __CYGWIN__ |
|
# if !(defined __cplusplus && defined GNULIB_NAMESPACE) |
|
# undef tzset |
|
# define tzset _tzset |
|
# endif |
|
_GL_CXXALIAS_MDA (tzset, void, (void)); |
|
# else |
|
_GL_CXXALIAS_SYS (tzset, void, (void)); |
|
# endif |
|
_GL_CXXALIASWARN (tzset); |
|
# endif |
|
|
|
|
|
# if @GNULIB_MKTIME@ |
|
# if @REPLACE_MKTIME@ |
|
# 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_CXXALIAS_RPL (mktime, time_t, (struct tm *__tp)); |
|
# else |
|
_GL_CXXALIAS_SYS (mktime, time_t, (struct tm *__tp)); |
|
# endif |
|
# if __GLIBC__ >= 2 |
|
_GL_CXXALIASWARN (mktime); |
|
# endif |
|
# endif |
|
|
|
|
|
|
|
|
|
# if @GNULIB_TIME_R@ |
|
# if @REPLACE_LOCALTIME_R@ |
|
# if !(defined __cplusplus && defined GNULIB_NAMESPACE) |
|
# undef localtime_r |
|
# define localtime_r rpl_localtime_r |
|
# endif |
|
_GL_FUNCDECL_RPL (localtime_r, struct tm *, (time_t const *restrict __timer, |
|
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) |
|
_GL_ARG_NONNULL ((1, 2))); |
|
# endif |
|
_GL_CXXALIAS_SYS (localtime_r, struct tm *, (time_t const *restrict __timer, |
|
struct tm *restrict __result)); |
|
# endif |
|
# if @HAVE_DECL_LOCALTIME_R@ |
|
_GL_CXXALIASWARN (localtime_r); |
|
# endif |
|
# if @REPLACE_LOCALTIME_R@ |
|
# if !(defined __cplusplus && defined GNULIB_NAMESPACE) |
|
# undef gmtime_r |
|
# define gmtime_r rpl_gmtime_r |
|
# endif |
|
_GL_FUNCDECL_RPL (gmtime_r, struct tm *, (time_t const *restrict __timer, |
|
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) |
|
_GL_ARG_NONNULL ((1, 2))); |
|
# endif |
|
_GL_CXXALIAS_SYS (gmtime_r, struct tm *, (time_t const *restrict __timer, |
|
struct tm *restrict __result)); |
|
# endif |
|
# if @HAVE_DECL_LOCALTIME_R@ |
|
_GL_CXXALIASWARN (gmtime_r); |
|
# endif |
|
# endif |
|
|
|
|
|
|
|
|
|
# if @GNULIB_LOCALTIME@ || @REPLACE_LOCALTIME@ |
|
# if @REPLACE_LOCALTIME@ |
|
# if !(defined __cplusplus && defined GNULIB_NAMESPACE) |
|
# undef localtime |
|
# define localtime rpl_localtime |
|
# endif |
|
_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 |
|
_GL_CXXALIAS_SYS (localtime, struct tm *, (time_t const *__timer)); |
|
# endif |
|
# if __GLIBC__ >= 2 |
|
_GL_CXXALIASWARN (localtime); |
|
# endif |
|
# endif |
|
|
|
# if 0 || @REPLACE_GMTIME@ |
|
# if @REPLACE_GMTIME@ |
|
# if !(defined __cplusplus && defined GNULIB_NAMESPACE) |
|
# undef gmtime |
|
# define gmtime rpl_gmtime |
|
# endif |
|
_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 |
|
_GL_CXXALIAS_SYS (gmtime, struct tm *, (time_t const *__timer)); |
|
# endif |
|
_GL_CXXALIASWARN (gmtime); |
|
# endif |
|
|
|
|
|
|
|
|
|
# if @GNULIB_STRPTIME@ |
|
# if ! @HAVE_STRPTIME@ |
|
_GL_FUNCDECL_SYS (strptime, char *, (char const *restrict __buf, |
|
char const *restrict __format, |
|
struct tm *restrict __tm) |
|
_GL_ARG_NONNULL ((1, 2, 3))); |
|
# endif |
|
_GL_CXXALIAS_SYS (strptime, char *, (char const *restrict __buf, |
|
char const *restrict __format, |
|
struct tm *restrict __tm)); |
|
_GL_CXXALIASWARN (strptime); |
|
# endif |
|
|
|
|
|
|
|
# if @GNULIB_CTIME@ |
|
# if @REPLACE_CTIME@ |
|
# if !(defined __cplusplus && defined GNULIB_NAMESPACE) |
|
# define ctime rpl_ctime |
|
# endif |
|
_GL_ATTRIBUTE_DEPRECATED |
|
_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 |
|
# if __GLIBC__ >= 2 |
|
_GL_CXXALIASWARN (ctime); |
|
# endif |
|
# endif |
|
|
|
|
|
|
|
# if @GNULIB_STRFTIME@ |
|
# if @REPLACE_STRFTIME@ |
|
# if !(defined __cplusplus && defined GNULIB_NAMESPACE) |
|
# define strftime rpl_strftime |
|
# endif |
|
_GL_FUNCDECL_RPL (strftime, size_t, |
|
(char *restrict __buf, size_t __bufsize, |
|
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, |
|
const char *restrict __fmt, const struct tm *restrict __tp)); |
|
# else |
|
_GL_CXXALIAS_SYS (strftime, size_t, |
|
(char *restrict __buf, size_t __bufsize, |
|
const char *restrict __fmt, const struct tm *restrict __tp)); |
|
# endif |
|
# if __GLIBC__ >= 2 |
|
_GL_CXXALIASWARN (strftime); |
|
# endif |
|
# 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)); |
|
|
|
|
|
|
|
|
|
|
|
|
|
#if !(defined __cplusplus ) |
|
_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)); |
|
#endif |
|
|
|
|
|
|
|
|
|
|
|
#if !(defined __cplusplus ) |
|
_GL_FUNCDECL_SYS (mktime_z, time_t, |
|
(timezone_t __tz, struct tm *restrict __tm) |
|
_GL_ARG_NONNULL ((2))); |
|
_GL_CXXALIAS_SYS (mktime_z, time_t, |
|
(timezone_t __tz, struct tm *restrict __tm)); |
|
#endif |
|
|
|
|
|
|
|
|
|
|
|
|
|
# endif |
|
|
|
|
|
# if @GNULIB_TIMEGM@ |
|
# if @REPLACE_TIMEGM@ |
|
# if !(defined __cplusplus && defined GNULIB_NAMESPACE) |
|
# undef timegm |
|
# define timegm rpl_timegm |
|
# endif |
|
_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))); |
|
# endif |
|
_GL_CXXALIAS_SYS (timegm, time_t, (struct tm *__tm)); |
|
# endif |
|
_GL_CXXALIASWARN (timegm); |
|
# endif |
|
|
|
|
|
|
|
|
|
# if defined GNULIB_POSIXCHECK |
|
# undef asctime |
|
_GL_WARN_ON_USE (asctime, "asctime can overrun buffers in some cases - " |
|
"better use strftime (or even sprintf) instead"); |
|
# 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 |
|
_GL_WARN_ON_USE (ctime, "ctime can overrun buffers in some cases - " |
|
"better use strftime (or even sprintf) instead"); |
|
# 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"); |
|
# endif |
|
# endif |
|
|
|
#endif |
|
|