mktime() did not work for 2-byte machines
authorceriel <none@none>
Tue, 5 Jun 1990 12:07:28 +0000 (12:07 +0000)
committerceriel <none@none>
Tue, 5 Jun 1990 12:07:28 +0000 (12:07 +0000)
lang/cem/libcc.ansi/time/mktime.c

index 597f104..9ea4ec6 100644 (file)
@@ -101,7 +101,7 @@ mktime(register struct tm *timep)
        timep->tm_yday = yday;
        timep->tm_wday = (day + 4) % 7;         /* day 0 was thursday (4) */
 
-       seconds = ((timep->tm_hour * 60) + timep->tm_min) * 60 + timep->tm_sec;
+       seconds = ((timep->tm_hour * 60L) + timep->tm_min) * 60L + timep->tm_sec;
 
        if ((TIME_MAX - seconds) / SECS_DAY < day) overflow++;
        seconds += day * SECS_DAY;