From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED!not-for-mail From: Eli Zaretskii Newsgroups: gmane.emacs.bugs Subject: bug#32902: Add support for (TIMESTAMP . RESOLUTION) Lisp timestamps Date: Mon, 08 Oct 2018 05:44:30 +0300 Message-ID: <83va6dyx69.fsf@gnu.org> References: <83y3bh2gns.fsf@gnu.org> <13abcc70-0e5b-0d5f-fffc-9b146743a565@cs.ucla.edu> <83a7nt3dac.fsf@gnu.org> <8336th1w0l.fsf@gnu.org> NNTP-Posting-Host: blaine.gmane.org X-Trace: blaine.gmane.org 1538966590 20655 195.159.176.226 (8 Oct 2018 02:43:10 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Mon, 8 Oct 2018 02:43:10 +0000 (UTC) Cc: 32902@debbugs.gnu.org To: Paul Eggert Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Mon Oct 08 04:43:06 2018 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by blaine.gmane.org with esmtp (Exim 4.84_2) (envelope-from ) id 1g9LVi-0005Fm-8p for geb-bug-gnu-emacs@m.gmane.org; Mon, 08 Oct 2018 04:43:06 +0200 Original-Received: from localhost ([::1]:44211 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1g9LXo-0000Te-5p for geb-bug-gnu-emacs@m.gmane.org; Sun, 07 Oct 2018 22:45:16 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:56311) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1g9LXh-0000Qx-EC for bug-gnu-emacs@gnu.org; Sun, 07 Oct 2018 22:45:10 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1g9LXc-00035E-HI for bug-gnu-emacs@gnu.org; Sun, 07 Oct 2018 22:45:09 -0400 Original-Received: from debbugs.gnu.org ([208.118.235.43]:35542) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1g9LXa-00033J-NE for bug-gnu-emacs@gnu.org; Sun, 07 Oct 2018 22:45:04 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1g9LXa-0001OV-Ge for bug-gnu-emacs@gnu.org; Sun, 07 Oct 2018 22:45:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Eli Zaretskii Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Mon, 08 Oct 2018 02:45:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 32902 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: patch Original-Received: via spool by 32902-submit@debbugs.gnu.org id=B32902.15389666915324 (code B ref 32902); Mon, 08 Oct 2018 02:45:02 +0000 Original-Received: (at 32902) by debbugs.gnu.org; 8 Oct 2018 02:44:51 +0000 Original-Received: from localhost ([127.0.0.1]:39800 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1g9LXP-0001No-Dc for submit@debbugs.gnu.org; Sun, 07 Oct 2018 22:44:51 -0400 Original-Received: from eggs.gnu.org ([208.118.235.92]:46657) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1g9LXN-0001Nb-SJ for 32902@debbugs.gnu.org; Sun, 07 Oct 2018 22:44:50 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1g9LXD-00026S-UL for 32902@debbugs.gnu.org; Sun, 07 Oct 2018 22:44:44 -0400 Original-Received: from fencepost.gnu.org ([2001:4830:134:3::e]:53751) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1g9LXD-00025B-F6; Sun, 07 Oct 2018 22:44:39 -0400 Original-Received: from [176.228.60.248] (port=2856 helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_256_CBC_SHA1:256) (Exim 4.82) (envelope-from ) id 1g9LXD-0002ON-3D; Sun, 07 Oct 2018 22:44:39 -0400 In-reply-to: (message from Paul Eggert on Sun, 7 Oct 2018 13:05:58 -0700) X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 208.118.235.43 X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Original-Sender: "bug-gnu-emacs" Xref: news.gmane.org gmane.emacs.bugs:151000 Archived-At: > Cc: 32902@debbugs.gnu.org > From: Paul Eggert > Date: Sun, 7 Oct 2018 13:05:58 -0700 > > > I fixed it, but please take a look, perhaps there's a better fix for > > this situation. > > That's only a very partial fix, unfortunately. I looked into the matter briefly, > and was dismayed by how much work would be needed for a real fix, even if I > fixed only timefns.c. Can you point out a couple of such places? I'm not sure I understand the nature of the problem. The data width difference notwithstanding, the values should all fit in 32-bit time_t. > Wouldn't it be much better to remove the "#define _USE_32BIT_TIME_T" from > nt/inc/mingw_time.h? That is what's causing the problem that your fix attempted > to paper over. I will take a closer look, but I'm not sure we can do anything about that. Microsoft made an incompatible change in its runtime libraries around Windows Vista, and switched to 64-bit time_t even on 32-bit systems. Since we still try to support older Windows versions, we must use that kludge, and we must limit ourselves to 32-bit time_t in 32-bit builds. > A lot of code assumes that a struct timespec (and struct > timeval's) tv_sec component is of type time_t, and defining _USE_32BIT_TIME_T > violates that assumption; furthermore it means that MinGW Emacs stops working in > 2038 (and doesn't work even now for timestamps more than 20 years into the > future, something that is pretty routine for me and I imagine for other users). > > Whatever backward-compatibility mess that defining _USE_32BIT_TIME_T attempts to > work around, really needs to be worked around in a better way. The only way is to drop support for older Windows systems. Which we will have to do before the year 2038 (unless some other solution could be found, which I very much doubt).