[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Emacs-diffs] feature/gnus-select bda66bd 132/218: Improve port to NetBS
From: |
Andrew G Cohen |
Subject: |
[Emacs-diffs] feature/gnus-select bda66bd 132/218: Improve port to NetBSD tzalloc |
Date: |
Fri, 14 Dec 2018 03:35:16 -0500 (EST) |
branch: feature/gnus-select
commit bda66bd2aeaca2ec491cf8db1aa4e5bcc1e5e56a
Author: Paul Eggert <address@hidden>
Commit: Andrew G Cohen <address@hidden>
Improve port to NetBSD tzalloc
Problem reported by Valery Ushakov (Bug#30738#22).
* src/editfns.c (HAVE_TZALLOC_BUG): New macro.
(tzlookup): Use it. Compile on all platforms, not just on NetBSD.
---
src/editfns.c | 18 +++++++++++++-----
1 file changed, 13 insertions(+), 5 deletions(-)
diff --git a/src/editfns.c b/src/editfns.c
index cb7353a..7e35fe8 100644
--- a/src/editfns.c
+++ b/src/editfns.c
@@ -48,6 +48,16 @@ along with GNU Emacs. If not, see
<https://www.gnu.org/licenses/>. */
#include <float.h>
#include <limits.h>
+#ifdef HAVE_TIMEZONE_T
+# include <sys/param.h>
+# if defined __NetBSD_Version__ && __NetBSD_Version__ < 700000000
+# define HAVE_TZALLOC_BUG true
+# endif
+#endif
+#ifndef HAVE_TZALLOC_BUG
+# define HAVE_TZALLOC_BUG false
+#endif
+
#include <c-ctype.h>
#include <intprops.h>
#include <stdlib.h>
@@ -205,16 +215,14 @@ tzlookup (Lisp_Object zone, bool settz)
new_tz = tzalloc (zone_string);
-#if defined __NetBSD_Version__ && __NetBSD_Version__ < 700000000
- /* NetBSD 6 tzalloc mishandles POSIX TZ strings (Bug#30738).
- If possible, fall back on tzdb. */
- if (!new_tz && errno != ENOMEM && plain_integer
+ if (HAVE_TZALLOC_BUG && !new_tz && errno != ENOMEM && plain_integer
&& XINT (zone) % (60 * 60) == 0)
{
+ /* tzalloc mishandles POSIX strings; fall back on tzdb if
+ possible (Bug#30738). */
sprintf (tzbuf, "Etc/GMT%+"pI"d", - (XINT (zone) / (60 * 60)));
new_tz = tzalloc (zone_string);
}
-#endif
if (!new_tz)
{
- [Emacs-diffs] feature/gnus-select 77705ff 046/218: eshell-eval-using-options: Avoid compiler warning differently, (continued)
- [Emacs-diffs] feature/gnus-select 77705ff 046/218: eshell-eval-using-options: Avoid compiler warning differently, Andrew G Cohen, 2018/12/14
- [Emacs-diffs] feature/gnus-select 97e6ea5 033/218: * test/lisp/vc/vc-tests.el (w32-application-type): Fix declaration., Andrew G Cohen, 2018/12/14
- [Emacs-diffs] feature/gnus-select 8ea5938 083/218: Minor copyedits in mule.texi, Andrew G Cohen, 2018/12/14
- [Emacs-diffs] feature/gnus-select dca8b75 087/218: Support variable-unquoting syntax in bat-mode, Andrew G Cohen, 2018/12/14
- [Emacs-diffs] feature/gnus-select 5224b57 106/218: In frameset save pixel values with frame-resize-pixelwise non-nil (Bug#30141), Andrew G Cohen, 2018/12/14
- [Emacs-diffs] feature/gnus-select 23fb252 097/218: Optimize "make check" and "make check-maybe", Andrew G Cohen, 2018/12/14
- [Emacs-diffs] feature/gnus-select 537ed97 114/218: Pass json-readtable-error data as a list (bug#30489), Andrew G Cohen, 2018/12/14
- [Emacs-diffs] feature/gnus-select a684aeb 109/218: Add URL handler for file-name-directory (Bug#30444), Andrew G Cohen, 2018/12/14
- [Emacs-diffs] feature/gnus-select 73f9e1d 125/218: * doc/emacs/rmail.texi: Fix broken link., Andrew G Cohen, 2018/12/14
- [Emacs-diffs] feature/gnus-select 82efded 096/218: Call enchant-lsmod correctly when Enchant is installed with a suffix, Andrew G Cohen, 2018/12/14
- [Emacs-diffs] feature/gnus-select bda66bd 132/218: Improve port to NetBSD tzalloc,
Andrew G Cohen <=
- [Emacs-diffs] feature/gnus-select aa2ebec 141/218: Extend Tramp's UTF8 tests, Andrew G Cohen, 2018/12/14
- [Emacs-diffs] feature/gnus-select b2b31ae 134/218: ; Spelling fix, Andrew G Cohen, 2018/12/14
- [Emacs-diffs] feature/gnus-select 59a41b8 107/218: Optimize tramp-tests.el, Andrew G Cohen, 2018/12/14
- [Emacs-diffs] feature/gnus-select d74261f 158/218: * doc/lispref/windows.texi (Selecting Windows): Fix a typo., Andrew G Cohen, 2018/12/14
- [Emacs-diffs] feature/gnus-select 367ff81 120/218: More proofreading of the Emacs manual, Andrew G Cohen, 2018/12/14
- [Emacs-diffs] feature/gnus-select e2b6627 049/218: Improve and make use of 'image--get-image', Andrew G Cohen, 2018/12/14
- [Emacs-diffs] feature/gnus-select c8d9b5d 051/218: Unify documentation on 'save-some-buffers', Andrew G Cohen, 2018/12/14
- [Emacs-diffs] feature/gnus-select 958e0ff 037/218: Allow underline position variables be buffer-local, Andrew G Cohen, 2018/12/14
- [Emacs-diffs] feature/gnus-select 17d92f5 031/218: Quieten compilation of some test/lisp files, Andrew G Cohen, 2018/12/14
- [Emacs-diffs] feature/gnus-select 1731947 053/218: Document 'transpose-sentences' and 'transpose-paragraphs', Andrew G Cohen, 2018/12/14