From: Ruediger Meier Date: Mon, 9 Feb 2015 15:11:01 +0000 (+0100) Subject: cal: use int64_t instead of long X-Git-Tag: v2.26~47 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=a79735f69a9114715ff29e1c1b73eea7651e8e79;p=thirdparty%2Futil-linux.git cal: use int64_t instead of long Followup 26f3a386, bigyear test was broken on ppc. CC: Sami Kerola Signed-off-by: Ruediger Meier --- diff --git a/misc-utils/cal.c b/misc-utils/cal.c index 593ab28a9d..2311d01888 100644 --- a/misc-utils/cal.c +++ b/misc-utils/cal.c @@ -59,6 +59,7 @@ #include #include +#include #include #include #include @@ -808,7 +809,7 @@ static int day_in_week(int day, int month, int32_t year) if (REFORMATION_YEAR < year || (year == REFORMATION_YEAR && 9 < month) || (year == REFORMATION_YEAR && month == 9 && 13 < day)) { - long long_year = year; + int64_t long_year = year; return (long_year + (year / 4) - (year / 100) + (year / 400) + reform[month - 1] + day) % 7; }