summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCharles A. Roelli <charles@aurox.ch>2017-09-30 20:42:03 +0200
committerKyle Meyer <kyle@kyleam.com>2017-10-01 20:46:11 -0400
commit24ea1b136a87bd5726e9da73c9d3de7b657d4a50 (patch)
tree4368a96d87841008ba302186df1de21717e86c1a
parent5d3e17bf85aafe36ebbea12e7fa2b7e9f36062b7 (diff)
downloadorg-mode-24ea1b136a87bd5726e9da73c9d3de7b657d4a50.tar.gz
Backport commit bd49b6f1b from Emacs
* lisp/org-clock.el (org-clock--oldest-date): Only execute 'decode-time' on times later than year -2**31 under macOS 10.6. See Bug#27706. Workaround for faulty localtime() under macOS 10.6 bd49b6f1b39cffeaf6098bc7b0182552683b1c07 Charles A. Roelli Sun Oct 1 19:07:22 2017 +0200
-rw-r--r--lisp/org-clock.el12
1 files changed, 11 insertions, 1 deletions
diff --git a/lisp/org-clock.el b/lisp/org-clock.el
index 001930a..9dc5015 100644
--- a/lisp/org-clock.el
+++ b/lisp/org-clock.el
@@ -478,7 +478,17 @@ to add an effort property.")
(funcall dichotomy
most-negative-fixnum
0
- (lambda (m) (ignore-errors (decode-time (list m 0))))))
+ (lambda (m)
+ ;; libc in macOS 10.6 hangs when decoding times
+ ;; around year -2**31. Limit `high' not to go
+ ;; any earlier than that.
+ (unless (and (eq system-type 'darwin)
+ (string-match-p
+ "10\\.6\\.[[:digit:]]"
+ (shell-command-to-string
+ "sw_vers -productVersion"))
+ (<= m -1034058203136))
+ (ignore-errors (decode-time (list m 0)))))))
(low
(funcall dichotomy
most-negative-fixnum