bug-gnu-emacs
[Top][All Lists]
Advanced

[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: Tue, 28 Mar 2006 14:33:14 -0500

    +/* True if TM_YEAR is a struct tm's tm_year value that is acceptable
    +   to asctime.  Glibc asctime returns a useful string unless TM_YEAR
    +   is nearly INT_MAX, but the C Standard lets C libraries overrun a
    +   buffer if TM_YEAR needs more than 4 bytes.  */
    +#ifdef __GLIBC__
    +# define TM_YEAR_IN_ASCTIME_RANGE(tm_year) ((tm_year) <= INT_MAX - 1900)

In the future, we will want the condition to change.
So I think there should be a separate macro to control this.




reply via email to

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