[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Emacs-diffs] feature/gnus-select 520498d 091/218: Improve port to NetBS
From: |
Andrew G Cohen |
Subject: |
[Emacs-diffs] feature/gnus-select 520498d 091/218: Improve port to NetBSD tzalloc |
Date: |
Fri, 14 Dec 2018 03:35:08 -0500 (EST) |
branch: feature/gnus-select
commit 520498d2bce8eca8bb8d224bfd5e5aa8ac97c307
Author: Paul Eggert <address@hidden>
Commit: Andrew G Cohen <address@hidden>
Improve port to NetBSD tzalloc
Problem reported by Valery Ushakov (Bug#30738#13).
* src/editfns.c (tzlookup) [__NetBSD_Version__ < 700000000]:
If tzalloc fails for any reason other than memory exhaustion,
assume it’s because NetBSD 6 does not support tzalloc on
POSIX-format TZ strings, and fall back on tzdb if possible.
---
src/editfns.c | 12 ++++++++++++
1 file changed, 12 insertions(+)
diff --git a/src/editfns.c b/src/editfns.c
index 6ecc83f..d263194 100644
--- a/src/editfns.c
+++ b/src/editfns.c
@@ -204,6 +204,18 @@ tzlookup (Lisp_Object zone, bool settz)
invalid_time_zone_specification (zone);
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
+ && XINT (zone) % (60 * 60) == 0)
+ {
+ sprintf (tzbuf, "Etc/GMT%+"pI"d", - (XINT (zone) / (60 * 60)));
+ new_tz = tzalloc (zone_string);
+ }
+#endif
+
if (!new_tz)
{
if (errno == ENOMEM)
- [Emacs-diffs] feature/gnus-select c4bd17e 079/218: ; * test/README: Fix typo, (continued)
- [Emacs-diffs] feature/gnus-select c4bd17e 079/218: ; * test/README: Fix typo, Andrew G Cohen, 2018/12/14
- [Emacs-diffs] feature/gnus-select 4a6cf41 156/218: * doc/lispref/internals.texi (Writing Emacs Primitives): Fix grammar., Andrew G Cohen, 2018/12/14
- [Emacs-diffs] feature/gnus-select b4377a3 164/218: Handle possible classtype values in eieio-persistent-read, Andrew G Cohen, 2018/12/14
- [Emacs-diffs] feature/gnus-select ff16207 153/218: ; * autogen.sh: Comment., Andrew G Cohen, 2018/12/14
- [Emacs-diffs] feature/gnus-select 590166c 151/218: Firm up documentation of generalized variables, Andrew G Cohen, 2018/12/14
- [Emacs-diffs] feature/gnus-select a3e7de9 086/218: Fix mouse-set-point when line numbers are displayed, Andrew G Cohen, 2018/12/14
- [Emacs-diffs] feature/gnus-select 57200d8 084/218: Replace "carriage-return" by "carriage return" in manuals, Andrew G Cohen, 2018/12/14
- [Emacs-diffs] feature/gnus-select 620b63a 092/218: * lisp/progmodes/verilog-mode.el (verilog-mode): Quieten compilation., Andrew G Cohen, 2018/12/14
- [Emacs-diffs] feature/gnus-select 3ef9943 067/218: * lisp/obsolete/options.el: Remove file., Andrew G Cohen, 2018/12/14
- [Emacs-diffs] feature/gnus-select 2544299 076/218: Try to stop tramp test hangs on hydra, Andrew G Cohen, 2018/12/14
- [Emacs-diffs] feature/gnus-select 520498d 091/218: Improve port to NetBSD tzalloc,
Andrew G Cohen <=
- [Emacs-diffs] feature/gnus-select 02b297b 044/218: ; Revert "; Tracing for eieio-test random failure (Bug#24503)", Andrew G Cohen, 2018/12/14
- [Emacs-diffs] feature/gnus-select a381e7e 002/218: Define if-let* and derivatives as aliases for if-let etc, Andrew G Cohen, 2018/12/14
- [Emacs-diffs] feature/gnus-select a8e5163 070/218: Minor changes in mule.texi, Andrew G Cohen, 2018/12/14
- [Emacs-diffs] feature/gnus-select 03e7331 089/218: * lisp/pcomplete.el (pcomplete-here): Move before first reference., Andrew G Cohen, 2018/12/14
- [Emacs-diffs] feature/gnus-select 040f725 093/218: * lisp/emulation/cua-base.el (cua-paste): Quieten compilation., Andrew G Cohen, 2018/12/14
- [Emacs-diffs] feature/gnus-select f5219ae 094/218: Replace some obsolete uses of filter-buffer-substring-functions, Andrew G Cohen, 2018/12/14
- [Emacs-diffs] feature/gnus-select 25950c1 095/218: Suppress warnings about obsolete generics (bug#25556), Andrew G Cohen, 2018/12/14
- [Emacs-diffs] feature/gnus-select 965f4ec 100/218: * lisp/gnus/gnus-registry.el: Add missing compile-time requirement., Andrew G Cohen, 2018/12/14
- [Emacs-diffs] feature/gnus-select e2aebb9 090/218: * test/lisp/ses-tests.el: Quieten compilation., Andrew G Cohen, 2018/12/14
- [Emacs-diffs] feature/gnus-select c52e2e2 099/218: Fix 'posn-at-point' when line numbers are displayed, Andrew G Cohen, 2018/12/14