From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED!not-for-mail From: Paul Eggert Newsgroups: gmane.emacs.bugs Subject: bug#27736: OSX 10.6.8: Building from master branch fails. Date: Wed, 28 Mar 2018 15:08:03 -0700 Organization: UCLA Computer Science Department Message-ID: <685168ca-d136-89d7-f33b-0158f094c9ba__26560.9720409431$1522274842$gmane$org@cs.ucla.edu> References: <46d25462-4eb0-0bd0-f5ab-2b28bae98ee6@cs.ucla.edu> NNTP-Posting-Host: blaine.gmane.org Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="------------92D96E1B6E320320A2D74AE3" X-Trace: blaine.gmane.org 1522274842 20352 195.159.176.226 (28 Mar 2018 22:07:22 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Wed, 28 Mar 2018 22:07:22 +0000 (UTC) User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.6.0 Cc: "Charles A. Roelli" , Keith David Bershatsky , 27736@debbugs.gnu.org, emacs-org list , Noam Postavsky To: Glenn Morris Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Thu Mar 29 00:07:17 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 1f1JDu-00058Q-Ay for geb-bug-gnu-emacs@m.gmane.org; Thu, 29 Mar 2018 00:07:14 +0200 Original-Received: from localhost ([::1]:44800 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1f1JFw-0006Vn-7v for geb-bug-gnu-emacs@m.gmane.org; Wed, 28 Mar 2018 18:09:20 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:56737) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1f1JFj-0006Tp-Ha for bug-gnu-emacs@gnu.org; Wed, 28 Mar 2018 18:09:08 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1f1JFe-0006aS-Ep for bug-gnu-emacs@gnu.org; Wed, 28 Mar 2018 18:09:07 -0400 Original-Received: from debbugs.gnu.org ([208.118.235.43]:49834) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1f1JFe-0006aJ-Ai for bug-gnu-emacs@gnu.org; Wed, 28 Mar 2018 18:09:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1f1JFe-0002z7-5k for bug-gnu-emacs@gnu.org; Wed, 28 Mar 2018 18:09:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Paul Eggert Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Wed, 28 Mar 2018 22:09:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 27736 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: Original-Received: via spool by 27736-submit@debbugs.gnu.org id=B27736.152227489411423 (code B ref 27736); Wed, 28 Mar 2018 22:09:02 +0000 Original-Received: (at 27736) by debbugs.gnu.org; 28 Mar 2018 22:08:14 +0000 Original-Received: from localhost ([127.0.0.1]:57731 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1f1JEq-0002y9-Ej for submit@debbugs.gnu.org; Wed, 28 Mar 2018 18:08:12 -0400 Original-Received: from zimbra.cs.ucla.edu ([131.179.128.68]:39732) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1f1JEo-0002xw-FL for 27736@debbugs.gnu.org; Wed, 28 Mar 2018 18:08:11 -0400 Original-Received: from localhost (localhost [127.0.0.1]) by zimbra.cs.ucla.edu (Postfix) with ESMTP id 4458F16161C; Wed, 28 Mar 2018 15:08:04 -0700 (PDT) Original-Received: from zimbra.cs.ucla.edu ([127.0.0.1]) by localhost (zimbra.cs.ucla.edu [127.0.0.1]) (amavisd-new, port 10032) with ESMTP id saN1PyiDXW79; Wed, 28 Mar 2018 15:08:03 -0700 (PDT) Original-Received: from localhost (localhost [127.0.0.1]) by zimbra.cs.ucla.edu (Postfix) with ESMTP id 60C4F161623; Wed, 28 Mar 2018 15:08:03 -0700 (PDT) X-Virus-Scanned: amavisd-new at zimbra.cs.ucla.edu Original-Received: from zimbra.cs.ucla.edu ([127.0.0.1]) by localhost (zimbra.cs.ucla.edu [127.0.0.1]) (amavisd-new, port 10026) with ESMTP id VpeFrWTiMo46; Wed, 28 Mar 2018 15:08:03 -0700 (PDT) Original-Received: from Penguin.CS.UCLA.EDU (Penguin.CS.UCLA.EDU [131.179.64.200]) by zimbra.cs.ucla.edu (Postfix) with ESMTPSA id 3EE8916161C; Wed, 28 Mar 2018 15:08:03 -0700 (PDT) In-Reply-To: Content-Language: en-US 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:144675 Archived-At: This is a multi-part message in MIME format. --------------92D96E1B6E320320A2D74AE3 Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit On 03/28/2018 12:33 PM, Paul Eggert wrote: > Unfortunately the new org code contains the expression (encode-time 0 > 0 0 0 0 -50000), which won't work on Emacs platforms where time_t is > 32 bits or is unsigned, since such platforms cannot represent a time_t > value corresponding to the year -50000. I installed the attached patch into Emacs master to try to fix this. I'll CC: this to emacs-orgmode in the hopes that this won't get lost in the next merge to Emacs master. --------------92D96E1B6E320320A2D74AE3 Content-Type: text/x-patch; name="0001-Port-recent-org-clock-fix-to-POSIX-time_t.patch" Content-Transfer-Encoding: 7bit Content-Disposition: attachment; filename="0001-Port-recent-org-clock-fix-to-POSIX-time_t.patch" >From 43994e484fadac28682542e75548e80cbb80987d Mon Sep 17 00:00:00 2001 From: Paul Eggert Date: Wed, 28 Mar 2018 15:03:40 -0700 Subject: [PATCH] Port recent org-clock fix to POSIX time_t * lisp/org/org-clock.el (org-clock-special-range): Don't assume support for time_t values less than 0, or less than -2**31 for that matter (Bug#27736). --- lisp/org/org-clock.el | 14 ++++++++++++-- 1 file changed, 12 insertions(+), 2 deletions(-) diff --git a/lisp/org/org-clock.el b/lisp/org/org-clock.el index ff32e28d1e..9be0d5bc1f 100644 --- a/lisp/org/org-clock.el +++ b/lisp/org/org-clock.el @@ -2239,8 +2239,18 @@ org-clock-special-range (let* ((start (pcase key (`interactive (org-read-date nil t nil "Range start? ")) ;; In theory, all clocks started after the dawn of - ;; humanity. - (`untilnow (encode-time 0 0 0 0 0 -50000)) + ;; humanity. However, the platform's clock + ;; support might not go back that far. Choose the + ;; POSIX timestamp -2**41 (approximately 68,000 + ;; BCE) if that works, otherwise -2**31 (1901) if + ;; that works, otherwise 0 (1970). Going back + ;; billions of years would loop forever on Mac OS + ;; X 10.6 with Emacs 26 and earlier (Bug#27736). + (`untilnow + (let ((old 0)) + (dolist (older '((-32768 0) (-33554432 0)) old) + (when (ignore-errors (decode-time older)) + (setq old older))))) (_ (encode-time 0 m h d month y)))) (end (pcase key (`interactive (org-read-date nil t nil "Range end? ")) -- 2.14.3 --------------92D96E1B6E320320A2D74AE3--