From 599ad608ee3297bc1e2bb11656a97335e303877a Mon Sep 17 00:00:00 2001 From: Manuel Novoa III Date: Wed, 3 Jul 2002 17:24:17 +0000 Subject: Enable WCHAR support for C/POSIX stub locales. Implemented unformatted wide i/o functions. (ungetwc still needs testing) Fix a few bugs in wchar.c. Modifications for bcc/elks support. --- libc/misc/time/time.c | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) (limited to 'libc/misc/time') diff --git a/libc/misc/time/time.c b/libc/misc/time/time.c index 409be3247..e7e3b8414 100644 --- a/libc/misc/time/time.c +++ b/libc/misc/time/time.c @@ -94,14 +94,12 @@ #endif /* TODO - This stuff belongs in some include/bits/ file. */ -#ifndef __BCC__ #undef CLK_TCK #if (TARGET_ARCH == alpha) || (TARGET_ARCH == ia64) #define CLK_TCK 1024 #else #define CLK_TCK 100 #endif -#endif /* The era code is currently unfinished. */ /* #define ENABLE_ERA_CODE */ @@ -1855,9 +1853,8 @@ time_t _time_mktime(struct tm *timeptr, int store_on_success) } #ifdef __BCC__ - /* TODO - check */ d = p[5] - 1; - days = -719163L + d*365 + ((d/4) - (d/100) + (d/400) + p[3] + p[7]); + days = -719163L + ((long)d)*365 + ((d/4) - (d/100) + (d/400) + p[3] + p[7]); secs = p[0] + 60*( p[1] + 60*((long)(p[2])) ) + _time_tzinfo[timeptr->tm_isdst > 0].gmt_offset; if (secs < 0) { -- cgit v1.2.3