This source file includes following definitions.
- __timegm64
- libc_hidden_def
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20 #ifndef _LIBC
21 # include <libc-config.h>
22 #endif
23
24 #include <time.h>
25 #include <errno.h>
26
27 #include "mktime-internal.h"
28
29 __time64_t
30 __timegm64 (struct tm *tmp)
31 {
32 static mktime_offset_t gmtime_offset;
33 tmp->tm_isdst = 0;
34 return __mktime_internal (tmp, __gmtime64_r, &gmtime_offset);
35 }
36
37 #if defined _LIBC && __TIMESIZE != 64
38
39 libc_hidden_def (__timegm64)
40
41 time_t
42 timegm (struct tm *tmp)
43 {
44 struct tm tm = *tmp;
45 __time64_t t = __timegm64 (&tm);
46 if (in_time_t_range (t))
47 {
48 *tmp = tm;
49 return t;
50 }
51 else
52 {
53 __set_errno (EOVERFLOW);
54 return -1;
55 }
56 }
57
58 #endif