From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: util-linux-owner@vger.kernel.org Received: from mout.gmx.net ([212.227.17.20]:57305 "EHLO mout.gmx.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1759789AbbBIPLN (ORCPT ); Mon, 9 Feb 2015 10:11:13 -0500 From: Ruediger Meier To: util-linux@vger.kernel.org Cc: Sami Kerola Subject: [PATCH 1/2] cal: use int64_t instead of long Date: Mon, 9 Feb 2015 16:11:01 +0100 Message-Id: <1423494662-2658-2-git-send-email-sweet_f_a@gmx.de> In-Reply-To: <1423494662-2658-1-git-send-email-sweet_f_a@gmx.de> References: <1423494662-2658-1-git-send-email-sweet_f_a@gmx.de> Sender: util-linux-owner@vger.kernel.org List-ID: From: Ruediger Meier Followup 26f3a386, bigyear test was broken on ppc. CC: Sami Kerola Signed-off-by: Ruediger Meier --- misc-utils/cal.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/misc-utils/cal.c b/misc-utils/cal.c index 593ab28..2311d01 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; } -- 1.8.4.5