summaryrefslogtreecommitdiff
path: root/libc/misc/time/time.c
diff options
context:
space:
mode:
authorManuel Novoa III <mjn3@codepoet.org>2002-07-03 17:24:17 +0000
committerManuel Novoa III <mjn3@codepoet.org>2002-07-03 17:24:17 +0000
commit599ad608ee3297bc1e2bb11656a97335e303877a (patch)
treec5b59cb5fa2c90f3b0c8b4d9831ae763f2825327 /libc/misc/time/time.c
parentab579e469c6787df9bd2252b3de8b1700d5097d8 (diff)
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.
Diffstat (limited to 'libc/misc/time/time.c')
-rw-r--r--libc/misc/time/time.c5
1 files changed, 1 insertions, 4 deletions
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) {