[PATCH 1/2] cal: use int64_t instead of long

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



From: Ruediger Meier <ruediger.meier@xxxxxxxxxxx>

Followup 26f3a386, bigyear test was broken on ppc.

CC: Sami Kerola <kerolasa@xxxxxx>
Signed-off-by: Ruediger Meier <ruediger.meier@xxxxxxxxxxx>
---
 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 <ctype.h>
 #include <getopt.h>
+#include <stdint.h>
 #include <stdio.h>
 #include <stdlib.h>
 #include <string.h>
@@ -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

--
To unsubscribe from this list: send the line "unsubscribe util-linux" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html




[Index of Archives]     [Netdev]     [Ethernet Bridging]     [Linux Wireless]     [Kernel Newbies]     [Security]     [Linux for Hams]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux RAID]     [Linux Admin]     [Samba]

  Powered by Linux