From: Ruediger Meier <sweet_f_a@gmx.de>
To: util-linux@vger.kernel.org
Cc: Sami Kerola <kerolasa@iki.fi>
Subject: [PATCH 1/2] cal: use int64_t instead of long
Date: Mon, 9 Feb 2015 16:11:01 +0100 [thread overview]
Message-ID: <1423494662-2658-2-git-send-email-sweet_f_a@gmx.de> (raw)
In-Reply-To: <1423494662-2658-1-git-send-email-sweet_f_a@gmx.de>
From: Ruediger Meier <ruediger.meier@ga-group.nl>
Followup 26f3a386, bigyear test was broken on ppc.
CC: Sami Kerola <kerolasa@iki.fi>
Signed-off-by: Ruediger Meier <ruediger.meier@ga-group.nl>
---
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
next prev parent reply other threads:[~2015-02-09 15:11 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-02-09 15:11 [PATCH 0/2] some ppc fixes for 2.26-rc2 Ruediger Meier
2015-02-09 15:11 ` Ruediger Meier [this message]
2015-02-09 15:11 ` [PATCH 2/2] setarch: fix typo (missing braces) for ppcle Ruediger Meier
2015-02-10 10:29 ` [PATCH 0/2] some ppc fixes for 2.26-rc2 Karel Zak
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1423494662-2658-2-git-send-email-sweet_f_a@gmx.de \
--to=sweet_f_a@gmx.de \
--cc=kerolasa@iki.fi \
--cc=util-linux@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox