1 /* -*- buffer-read-only: t -*- vi: set ro: */
2 /* DO NOT EDIT! GENERATED AUTOMATICALLY! */
3 /* A more-standard <time.h>.
5 Copyright (C) 2007-2008 Free Software Foundation, Inc.
7 This program is free software; you can redistribute it and/or modify
8 it under the terms of the GNU General Public License as published by
9 the Free Software Foundation; either version 3, or (at your option)
12 This program is distributed in the hope that it will be useful,
13 but WITHOUT ANY WARRANTY; without even the implied warranty of
14 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15 GNU General Public License for more details.
17 You should have received a copy of the GNU General Public License
18 along with this program; if not, write to the Free Software Foundation,
19 Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */
22 @PRAGMA_SYSTEM_HEADER@
25 /* Don't get in the way of glibc when it includes time.h merely to
26 declare a few standard symbols, rather than to declare all the
27 symbols. Also, Solaris 8 <time.h> eventually includes itself
28 recursively; if that is happening, just include the system <time.h>
29 without adding our own declarations. */
30 #if (defined __need_time_t || defined __need_clock_t \
31 || defined __need_timespec \
32 || defined _GL_TIME_H)
34 # @INCLUDE_NEXT@ @NEXT_TIME_H@
40 # @INCLUDE_NEXT@ @NEXT_TIME_H@
46 /* Some systems don't define struct timespec (e.g., AIX 4.1, Ultrix 4.3).
47 Or they define it with the wrong member names or define it in <sys/time.h>
48 (e.g., FreeBSD circa 1997). */
49 # if ! @TIME_H_DEFINES_STRUCT_TIMESPEC@
50 # if @SYS_TIME_H_DEFINES_STRUCT_TIMESPEC@
51 # include <sys/time.h>
54 # define timespec rpl_timespec
63 /* Sleep for at least RQTP seconds unless interrupted, If interrupted,
64 return -1 and store the remaining time into RMTP. See
65 <http://www.opengroup.org/susv3xsh/nanosleep.html>. */
66 # if @REPLACE_NANOSLEEP@
67 # define nanosleep rpl_nanosleep
68 int nanosleep (struct timespec const *__rqtp, struct timespec *__rmtp);
71 /* Convert TIMER to RESULT, assuming local time and UTC respectively. See
72 <http://www.opengroup.org/susv3xsh/localtime_r.html> and
73 <http://www.opengroup.org/susv3xsh/gmtime_r.html>. */
74 # if @REPLACE_LOCALTIME_R@
76 # define localtime_r rpl_localtime_r
78 # define gmtime_r rpl_gmtime_r
79 struct tm *localtime_r (time_t const *restrict __timer,
80 struct tm *restrict __result);
81 struct tm *gmtime_r (time_t const *restrict __timer,
82 struct tm *restrict __result);
85 /* Parse BUF as a time stamp, assuming FORMAT specifies its layout, and store
86 the resulting broken-down time into TM. See
87 <http://www.opengroup.org/susv3xsh/strptime.html>. */
88 # if @REPLACE_STRPTIME@
90 # define strptime rpl_strptime
91 char *strptime (char const *restrict __buf, char const *restrict __format,
92 struct tm *restrict __tm);
95 /* Convert TM to a time_t value, assuming UTC. */
98 # define timegm rpl_timegm
99 time_t timegm (struct tm *__tm);
102 /* Encourage applications to avoid unsafe functions that can overrun
103 buffers when given outlandish struct tm values. Portable
104 applications should use strftime (or even sprintf) instead. */
105 # if GNULIB_PORTCHECK
107 # define asctime eschew_asctime
109 # define asctime_r eschew_asctime_r
111 # define ctime eschew_ctime
113 # define ctime_r eschew_ctime_r