123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250 |
- #if __GNUC__ >= 3
- @PRAGMA_SYSTEM_HEADER@
- #endif
- @PRAGMA_COLUMNS@
- #if (defined __need_time_t || defined __need_clock_t \
- || defined __need_timespec \
- || defined _@GUARD_PREFIX@_TIME_H)
- # @INCLUDE_NEXT@ @NEXT_TIME_H@
- #else
- # define _@GUARD_PREFIX@_TIME_H
- # @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>
- # undef asctime_r
- # undef ctime_r
- # undef gmtime_r
- # undef localtime_r
- # undef rand_r
- # undef strtok_r
- # 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 @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_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
- _GL_CXXALIASWARN (mktime);
- # 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_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_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
- _GL_WARN_ON_USE (asctime, "asctime_r can overrun buffers in some cases - "
- "better use strftime (or even sprintf) instead");
- # endif
- # if defined GNULIB_POSIXCHECK
- # undef ctime
- _GL_WARN_ON_USE (asctime, "ctime can overrun buffers in some cases - "
- "better use strftime (or even sprintf) instead");
- # endif
- # if defined GNULIB_POSIXCHECK
- # undef ctime_r
- _GL_WARN_ON_USE (asctime, "ctime_r can overrun buffers in some cases - "
- "better use strftime (or even sprintf) instead");
- # endif
- #endif
|