public inbox for util-linux@vger.kernel.org
 help / color / mirror / Atom feed
From: Karel Zak <kzak@redhat.com>
To: kerolasa@gmail.com
Cc: Mike Frysinger <vapier@gentoo.org>,
	util-linux <util-linux@vger.kernel.org>
Subject: Re: tests: cal/bigyear only works on 64bit (sizeof(long) == 8) systems
Date: Mon, 13 Jan 2014 13:02:52 +0100	[thread overview]
Message-ID: <20140113120252.GA12700@x2.net.home> (raw)
In-Reply-To: <CAG27Bk1ROQ51LMyx=qjxasgX4MLBKy=_NiQZkcHbdhkMRzoC5A@mail.gmail.com>

On Mon, Jan 06, 2014 at 11:21:03PM +0000, Sami Kerola wrote:
> On 6 January 2014 13:08, Karel Zak <kzak@redhat.com> wrote:
> > On Mon, Jan 06, 2014 at 12:55:08PM +0000, Sami Kerola wrote:
> >> Year was left signed because someone said it might be interesting to
> >> know pre-year-zero outputs. After a bit research the pre-zero year
> >> calendars are theoretical construct, mostly because agreement in
> >
> > but the code is:
> >
> >     #define SMALLEST_YEAR           1
> >
> >     if (ctl.req.year < SMALLEST_YEAR)
> >           errx(EXIT_FAILURE,  _("illegal year value: use positive integer"));
> 
> Hi Karel,
> 
> That is correct right now. If negative years are allowed to be used
> I'm sure bug reports will follow. The leap year printouts are
> obviously wrong.
> 
> >> Meanwhile the big year test is clearly broken. I recon there should be
> >> a version for various sizes of INT_MAX tests, and depending how large
> >> values are supported by system corresponding tests are ran.
> >
> >  INT_MAX is the same everywhere, all you need is to remove arch
> >  specific "long" from the code and use strtos32_or_err() to parse the
> >  year number.
> >
> >  (Well, I guess that 2147483647 years is enough :-)
> 
> Use of 32 bit int is indeed the easiest fix, and I'm all in favor of
> cutting the cal output there.

 OK, I'm going to wait for the patch :-)
 
    Karel


-- 
 Karel Zak  <kzak@redhat.com>
 http://karelzak.blogspot.com

      reply	other threads:[~2014-01-13 12:02 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-12-23  2:42 tests: cal/bigyear only works on 64bit (sizeof(long) == 8) systems Mike Frysinger
2014-01-06 12:30 ` Karel Zak
2014-01-06 12:55   ` Sami Kerola
2014-01-06 13:08     ` Karel Zak
2014-01-06 23:21       ` Sami Kerola
2014-01-13 12:02         ` Karel Zak [this message]

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=20140113120252.GA12700@x2.net.home \
    --to=kzak@redhat.com \
    --cc=kerolasa@gmail.com \
    --cc=util-linux@vger.kernel.org \
    --cc=vapier@gentoo.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