summaryrefslogtreecommitdiffstats
path: root/misc-utils/cal.c
diff options
context:
space:
mode:
authorRuediger Meier2015-02-09 16:11:01 +0100
committerKarel Zak2015-02-10 11:18:51 +0100
commita79735f69a9114715ff29e1c1b73eea7651e8e79 (patch)
treebf89c5a274cb9a654ea48d43d0275d08bb6991cb /misc-utils/cal.c
parentFix "Script started" buffering race (diff)
downloadkernel-qcow2-util-linux-a79735f69a9114715ff29e1c1b73eea7651e8e79.tar.gz
kernel-qcow2-util-linux-a79735f69a9114715ff29e1c1b73eea7651e8e79.tar.xz
kernel-qcow2-util-linux-a79735f69a9114715ff29e1c1b73eea7651e8e79.zip
cal: use int64_t instead of long
Followup 26f3a386, bigyear test was broken on ppc. CC: Sami Kerola <kerolasa@iki.fi> Signed-off-by: Ruediger Meier <ruediger.meier@ga-group.nl>
Diffstat (limited to 'misc-utils/cal.c')
-rw-r--r--misc-utils/cal.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/misc-utils/cal.c b/misc-utils/cal.c
index 593ab28a9..2311d0188 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;
}