tAppease the time_t monster. - plan9port - [fork] Plan 9 from user space
(HTM) git clone git://src.adamsgaard.dk/plan9port
(DIR) Log
(DIR) Files
(DIR) Refs
(DIR) README
(DIR) LICENSE
---
(DIR) commit 829e8223860ca6554c29749981dfa5c39f43ebfd
(DIR) parent c2070b2fc9d32d055104d55652d409a684f96881
(HTM) Author: wkj <devnull@localhost>
Date: Wed, 29 Dec 2004 01:25:41 +0000
Appease the time_t monster.
Diffstat:
M src/lib9/date.c | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
---
(DIR) diff --git a/src/lib9/date.c b/src/lib9/date.c
t@@ -68,20 +68,24 @@ Tm2tm(Tm *bigtm, struct tm *tm)
}
Tm*
-p9gmtime(long t)
+p9gmtime(long x)
{
+ time_t t;
struct tm tm;
+ t = (time_t)x;
tm = *gmtime(&t);
tm2Tm(&tm, &bigtm);
return &bigtm;
}
Tm*
-p9localtime(long t)
+p9localtime(long x)
{
+ time_t t;
struct tm tm;
+ t = (time_t)x;
tm = *localtime(&t);
tm2Tm(&tm, &bigtm);
return &bigtm;