~drizzle-trunk/drizzle/development

« back to all changes in this revision

Viewing changes to gnulib/time.h

MergeĀ fromĀ trunk.

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
/* DO NOT EDIT! GENERATED AUTOMATICALLY! */
2
 
/* A more-standard <time.h>.
3
 
 
4
 
   Copyright (C) 2007 Free Software Foundation, Inc.
5
 
 
6
 
   This program is free software; you can redistribute it and/or modify
7
 
   it under the terms of the GNU Lesser General Public License as published by
8
 
   the Free Software Foundation; either version 2, or (at your option)
9
 
   any later version.
10
 
 
11
 
   This program is distributed in the hope that it will be useful,
12
 
   but WITHOUT ANY WARRANTY; without even the implied warranty of
13
 
   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
14
 
   GNU Lesser General Public License for more details.
15
 
 
16
 
   You should have received a copy of the GNU Lesser General Public License
17
 
   along with this program; if not, write to the Free Software Foundation,
18
 
   Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.  */
19
 
 
20
 
/* Don't get in the way of glibc when it includes time.h merely to
21
 
   declare a few standard symbols, rather than to declare all the
22
 
   symbols.  Also, Solaris 8 <time.h> eventually includes itself
23
 
   recursively; if that is happening, just include the system <time.h>
24
 
   without adding our own declarations.  */
25
 
#if (defined __need_time_t || defined __need_clock_t \
26
 
     || defined __need_timespec \
27
 
     || defined _GL_TIME_H)
28
 
 
29
 
# include_next <time.h>
30
 
 
31
 
#else
32
 
 
33
 
# define _GL_TIME_H
34
 
 
35
 
# include_next <time.h>
36
 
 
37
 
# ifdef __cplusplus
38
 
extern "C" {
39
 
# endif
40
 
 
41
 
/* Some systems don't define struct timespec (e.g., AIX 4.1, Ultrix 4.3).
42
 
   Or they define it with the wrong member names or define it in <sys/time.h>
43
 
   (e.g., FreeBSD circa 1997).  */
44
 
# if ! 1
45
 
#  if 0
46
 
#   include <sys/time.h>
47
 
#  else
48
 
#   undef timespec
49
 
#   define timespec rpl_timespec
50
 
struct timespec
51
 
{
52
 
  time_t tv_sec;
53
 
  long int tv_nsec;
54
 
};
55
 
#  endif
56
 
# endif
57
 
 
58
 
/* Sleep for at least RQTP seconds unless interrupted,  If interrupted,
59
 
   return -1 and store the remaining time into RMTP.  See
60
 
   <http://www.opengroup.org/susv3xsh/nanosleep.html>.  */
61
 
# if GNULIB_PORTCHECK
62
 
#  define nanosleep rpl_nanosleep
63
 
int nanosleep (struct timespec const *__rqtp, struct timespec *__rmtp);
64
 
# endif
65
 
 
66
 
/* Convert TIMER to RESULT, assuming local time and UTC respectively.  See
67
 
   <http://www.opengroup.org/susv3xsh/localtime_r.html> and
68
 
   <http://www.opengroup.org/susv3xsh/gmtime_r.html>.  */
69
 
# if 0
70
 
#  undef localtime_r
71
 
#  define localtime_r rpl_localtime_r
72
 
#  undef gmtime_r
73
 
#  define gmtime_r rpl_gmtime_r
74
 
struct tm *localtime_r (time_t const *restrict __timer,
75
 
                        struct tm *restrict __result);
76
 
struct tm *gmtime_r (time_t const *restrict __timer,
77
 
                     struct tm *restrict __result);
78
 
# endif
79
 
 
80
 
/* Parse BUF as a time stamp, assuming FORMAT specifies its layout, and store
81
 
   the resulting broken-down time into TM.  See
82
 
   <http://www.opengroup.org/susv3xsh/strptime.html>.  */
83
 
# if GNULIB_PORTCHECK
84
 
#  undef strptime
85
 
#  define strptime rpl_strptime
86
 
char *strptime (char const *restrict __buf, char const *restrict __format,
87
 
                struct tm *restrict __tm);
88
 
# endif
89
 
 
90
 
/* Convert TM to a time_t value, assuming UTC.  */
91
 
# if 0
92
 
#  undef timegm
93
 
#  define timegm rpl_timegm
94
 
time_t timegm (struct tm *__tm);
95
 
# endif
96
 
 
97
 
/* Encourage applications to avoid unsafe functions that can overrun
98
 
   buffers when given outlandish struct tm values.  Portable
99
 
   applications should use strftime (or even sprintf) instead.  */
100
 
# if GNULIB_PORTCHECK
101
 
#  undef asctime
102
 
#  define asctime eschew_asctime
103
 
#  undef asctime_r
104
 
#  define asctime_r eschew_asctime_r
105
 
#  undef ctime
106
 
#  define ctime eschew_ctime
107
 
#  undef ctime_r
108
 
#  define ctime_r eschew_ctime_r
109
 
# endif
110
 
 
111
 
# ifdef __cplusplus
112
 
}
113
 
# endif
114
 
 
115
 
#endif