[Top][All Lists]

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

Re: Emacs current-time-string core dump on 64-bit hosts

From: Richard Stallman
Subject: Re: Emacs current-time-string core dump on 64-bit hosts
Date: Sun, 19 Mar 2006 16:50:46 -0500

    If the input check would be "approximately January 2, 1001 through
    approximately December 30, 9998 AD" (to avoid time zone and leap
    second issues), then it would be somewhat tricky to write the code
    portably, since the numbers involved will exceed 2**32.  And this
    would reject a few valid inputs.

I think that is best.  It should be straightforward, too, if you first
use localtime to extract the year.

I think it is possible, even trivial, to fix ctime.  The largest year
value that can be represented in a 64-bit time-value is around 1
trillion, and that will fit in 12 digits.  Isn't this trivial to fix?
So why not just fix it in GNU libc, and report the bug for other
systems where it fails.

Fixing asctime as well, on systems where int is 64 bits, requires checking
for year numbers that are too big.  But it is not hard to do.

reply via email to

[Prev in Thread] Current Thread [Next in Thread]