summaryrefslogtreecommitdiff
path: root/sys
diff options
context:
space:
mode:
authorMichael Shalayeff <mickey@cvs.openbsd.org>1997-06-25 06:24:25 +0000
committerMichael Shalayeff <mickey@cvs.openbsd.org>1997-06-25 06:24:25 +0000
commiteb51828dafd060aca283723aefa09b27ede1e79b (patch)
tree1d2fd04f2cc4627e9703e2c7f358080414e54596 /sys
parent384b0c5d5e1c9e8d403e344af656b7d85ee9e542 (diff)
remove _STANDALONE
be carefull about leap years (;
Diffstat (limited to 'sys')
-rw-r--r--sys/arch/i386/isa/clock.c12
1 files changed, 2 insertions, 10 deletions
diff --git a/sys/arch/i386/isa/clock.c b/sys/arch/i386/isa/clock.c
index 9ed4839557c..fac9590dea0 100644
--- a/sys/arch/i386/isa/clock.c
+++ b/sys/arch/i386/isa/clock.c
@@ -171,8 +171,6 @@ startrtclock()
NVRAM_DIAG_BITS);
}
-#ifndef _STANDALONE
-
int
clockintr(arg)
void *arg;
@@ -197,7 +195,6 @@ rtcintr(arg)
}
return 0;
}
-#endif /* _STANDALONE */
int
gettick()
@@ -278,8 +275,6 @@ delay(n)
}
}
-#ifndef _STANDALONE
-
static int beeping;
void
@@ -323,7 +318,6 @@ sysbeep(pitch, period)
beeping = 1;
timeout(sysbeepstop, 0, period);
}
-#endif /* _STANDALONE */
unsigned int delaycount; /* calibrated loop variable (1 millisecond) */
@@ -350,8 +344,6 @@ findcpuspeed()
delaycount = (FIRST_GUESS * TIMER_DIV(1000)) / (0xffff-remainder);
}
-#ifndef _STANDALONE
-
#ifdef I586_CPU
void
calibrate_cyclecounter()
@@ -414,7 +406,8 @@ yeartoday(year)
int year;
{
- return ((year % 4) ? 365 : 366);
+ return (((year % 4) == 0 &&
+ ((year % 100) != 0 || (year % 400) == 0))? 366 : 365);
}
int
@@ -578,4 +571,3 @@ setstatclockrate(arg)
else
mc146818_write(NULL, MC_REGA, MC_BASE_32_KHz | MC_RATE_1024_Hz);
}
-#endif /* _STANDALONE */