From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Paul Eggert Newsgroups: gmane.emacs.bugs Subject: Re: Emacs current-time-string core dump on 64-bit hosts Date: Wed, 29 Mar 2006 23:57:33 -0800 Message-ID: <873bh074b6.fsf@penguin.cs.ucla.edu> References: <87k6arnqsx.fsf@penguin.cs.ucla.edu> <87fyle6luu.fsf@penguin.cs.ucla.edu> <877j6j1re8.fsf@penguin.cs.ucla.edu> <87y7yxsluy.fsf@penguin.cs.ucla.edu> <87d5g71ulb.fsf@penguin.cs.ucla.edu> NNTP-Posting-Host: main.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: sea.gmane.org 1143718957 19345 80.91.229.2 (30 Mar 2006 11:42:37 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Thu, 30 Mar 2006 11:42:37 +0000 (UTC) Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Thu Mar 30 13:42:34 2006 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by ciao.gmane.org with esmtp (Exim 4.43) id 1FOvXi-0001m5-5P for geb-bug-gnu-emacs@m.gmane.org; Thu, 30 Mar 2006 13:42:22 +0200 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1FOvXh-0003mu-Is for geb-bug-gnu-emacs@m.gmane.org; Thu, 30 Mar 2006 06:42:21 -0500 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1FOs2C-0002Jx-JU for bug-gnu-emacs@gnu.org; Thu, 30 Mar 2006 02:57:36 -0500 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1FOs2B-0002Jl-E5 for bug-gnu-emacs@gnu.org; Thu, 30 Mar 2006 02:57:36 -0500 Original-Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1FOs2B-0002Ji-B1 for bug-gnu-emacs@gnu.org; Thu, 30 Mar 2006 02:57:35 -0500 Original-Received: from [131.179.128.19] (helo=kiwi.cs.ucla.edu) by monty-python.gnu.org with esmtp (Exim 4.52) id 1FOs4I-00058A-U8 for bug-gnu-emacs@gnu.org; Thu, 30 Mar 2006 02:59:47 -0500 Original-Received: from penguin.cs.ucla.edu (Penguin.CS.UCLA.EDU [131.179.64.200]) by kiwi.cs.ucla.edu (8.11.7p1+Sun/8.11.7/UCLACS-5.2) with ESMTP id k2U7vY820775 for ; Wed, 29 Mar 2006 23:57:34 -0800 (PST) Original-Received: from eggert by penguin.cs.ucla.edu with local (Exim 4.50) id 1FOs29-0001NE-Rj for bug-gnu-emacs@gnu.org; Wed, 29 Mar 2006 23:57:33 -0800 Original-To: bug-gnu-emacs@gnu.org In-Reply-To: (Richard Stallman's message of "Tue, 28 Mar 2006 14:33:14 -0500") User-Agent: Gnus/5.1007 (Gnus v5.10.7) Emacs/21.4 (gnu/linux) X-Mailman-Approved-At: Thu, 30 Mar 2006 06:42:15 -0500 X-BeenThere: bug-gnu-emacs@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.bugs:15012 Archived-At: Richard Stallman writes: > +#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. Something like this, without the #ifdef? #define TM_YEAR_IN_ASCTIME_RANGE(tm_year) \ (ASCTIME_YEAR_MIN <= (tm_year) && (tm_year) <= ASCTIME_YEAR_MAX) We would have Autoconf deduce ASCTIME_YEAR_MIN and ASCTIME_YEAR_MAX by trying to run little test programs that crash, using binary search to deduce the min and max values. Yes, something like that should work, though it'd take some testing to make sure that the little test programs crash reliably. (I assume it's not that high of a priority, though.)