Michael McConville
2016-02-17 17:05:22 UTC
Now that we have 64-bit time. Otherwise, all the people running Alpha in
2038 will yell at us.
Index: sys/arch/alpha/alpha/clock.c
===================================================================
RCS file: /cvs/src/sys/arch/alpha/alpha/clock.c,v
retrieving revision 1.21
diff -u -p -r1.21 clock.c
--- sys/arch/alpha/alpha/clock.c 23 Mar 2012 15:51:25 -0000 1.21
+++ sys/arch/alpha/alpha/clock.c 17 Feb 2016 16:59:22 -0000
@@ -212,9 +212,8 @@ inittodr(time_t base)
year = 1900 + UNIX_YEAR_OFFSET + ct.year;
if (year < 1970)
year += 100;
- /* simple sanity checks (2037 = time_t overflow) */
- if (year < MINYEAR || year > 2037 ||
- ct.mon < 1 || ct.mon > 12 || ct.day < 1 ||
+ /* simple sanity checks */
+ if (year < MINYEAR || ct.mon < 1 || ct.mon > 12 || ct.day < 1 ||
ct.day > 31 || ct.hour > 23 || ct.min > 59 || ct.sec > 59) {
/*
* Believe the time in the file system for lack of
2038 will yell at us.
Index: sys/arch/alpha/alpha/clock.c
===================================================================
RCS file: /cvs/src/sys/arch/alpha/alpha/clock.c,v
retrieving revision 1.21
diff -u -p -r1.21 clock.c
--- sys/arch/alpha/alpha/clock.c 23 Mar 2012 15:51:25 -0000 1.21
+++ sys/arch/alpha/alpha/clock.c 17 Feb 2016 16:59:22 -0000
@@ -212,9 +212,8 @@ inittodr(time_t base)
year = 1900 + UNIX_YEAR_OFFSET + ct.year;
if (year < 1970)
year += 100;
- /* simple sanity checks (2037 = time_t overflow) */
- if (year < MINYEAR || year > 2037 ||
- ct.mon < 1 || ct.mon > 12 || ct.day < 1 ||
+ /* simple sanity checks */
+ if (year < MINYEAR || ct.mon < 1 || ct.mon > 12 || ct.day < 1 ||
ct.day > 31 || ct.hour > 23 || ct.min > 59 || ct.sec > 59) {
/*
* Believe the time in the file system for lack of