-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Update for test release of emacs-26.1.92-3
Add patch to disable timerfd on buggy cygwin releases (3.0.0 and 3.0.1).
- Loading branch information
Showing
3 changed files
with
87 additions
and
25 deletions.
There are no files selected for viewing
61 changes: 61 additions & 0 deletions
61
0001-Use-a-runtime-test-for-timerfd-on-Cygwin-Bug-34618.patch
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,61 @@ | ||
From fd6932c4c87a20ad3e019755c60e3fc1c322ef37 Mon Sep 17 00:00:00 2001 | ||
From: Ken Brown <[email protected]> | ||
Date: Sat, 9 Mar 2019 17:06:54 -0500 | ||
Subject: [PATCH] Use a runtime test for timerfd on Cygwin (Bug#34618) | ||
|
||
* src/atimer.c [HAVE_TIMERFD] (have_buggy_timerfd): New | ||
function. | ||
(init_atimer) Use it. | ||
--- | ||
src/atimer.c | 22 ++++++++++++++++++++-- | ||
1 file changed, 20 insertions(+), 2 deletions(-) | ||
|
||
diff --git a/src/atimer.c b/src/atimer.c | ||
index d36c4f1f5a..8387b8aa0e 100644 | ||
--- a/src/atimer.c | ||
+++ b/src/atimer.c | ||
@@ -28,7 +28,10 @@ along with GNU Emacs. If not, see <https://www.gnu.org/licenses/>. */ | ||
|
||
#ifdef HAVE_TIMERFD | ||
#include <errno.h> | ||
-# include <sys/timerfd.h> | ||
+#include <sys/timerfd.h> | ||
+# ifdef CYGWIN | ||
+# include <sys/utsname.h> | ||
+# endif | ||
#endif | ||
|
||
#ifdef MSDOS | ||
@@ -557,13 +560,28 @@ Return t if all self-tests are passed, nil otherwise. */) | ||
|
||
#endif /* ENABLE_CHECKING */ | ||
|
||
+/* Cygwin has the timerfd interface starting with release 3.0.0, but | ||
+ it is buggy until release 3.0.2. */ | ||
+#ifdef HAVE_TIMERFD | ||
+static bool | ||
+have_buggy_timerfd (void) | ||
+{ | ||
+# ifdef CYGWIN | ||
+ struct utsname name; | ||
+ return uname (&name) < 0 || strverscmp (name.release, "3.0.2") < 0; | ||
+# else | ||
+ return false; | ||
+# endif | ||
+} | ||
+#endif | ||
+ | ||
void | ||
init_atimer (void) | ||
{ | ||
#ifdef HAVE_ITIMERSPEC | ||
# ifdef HAVE_TIMERFD | ||
/* Until this feature is considered stable, you can ask to not use it. */ | ||
- timerfd = (egetenv ("EMACS_IGNORE_TIMERFD") ? -1 : | ||
+ timerfd = (egetenv ("EMACS_IGNORE_TIMERFD") || have_buggy_timerfd () ? -1 : | ||
timerfd_create (CLOCK_REALTIME, TFD_NONBLOCK | TFD_CLOEXEC)); | ||
# endif | ||
if (timerfd < 0) | ||
-- | ||
2.17.0 | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,26 +1,32 @@ | ||
From cygwin-announce-emacs-26.1-2 Mon May 28 13:43:41 2018 | ||
From cygwin-announce-emacs-26.1.92-3 Sun Mar 10 11:34:38 2019 | ||
From: Ken Brown <[email protected]> | ||
To: [email protected] | ||
Date: Mon, 28 May 2018 13:43:41 -0400 | ||
Message-Id: <20180528134341.968[email protected]> | ||
Subject: emacs 26.1-2 | ||
Date: Sun, 10 Mar 2019 11:34:38 -0400 | ||
Message-Id: <20190310113438.42921[email protected]> | ||
Subject: emacs 26.1.92-3 (TEST) | ||
|
||
The following packages have been uploaded to the Cygwin distribution: | ||
The following packages have been uploaded to the Cygwin distribution | ||
as test releases: | ||
|
||
* emacs-common-26.1-2 | ||
* emacs-26.1-2 | ||
* emacs-X11-26.1-2 | ||
* emacs-w32-26.1-2 | ||
* emacs-lucid-26.1-2 | ||
* emacs-26.1.92-3 | ||
* emacs-common-26.1.92-3 | ||
* emacs-X11-26.1.92-3 | ||
* emacs-w32-26.1.92-3 | ||
* emacs-lucid-26.1.92-3 | ||
|
||
Emacs is a powerful, customizable, self-documenting, modeless text | ||
editor. Emacs contains special code editing features, a scripting | ||
language (elisp), and the capability to read mail, news, and more | ||
without leaving the editor. | ||
|
||
This is an update to the latest upstream release. Browse the NEWS | ||
file ('C-h n' within emacs) for changes since the last release. | ||
This is a pretest for the upcoming release of emacs-26.2. Browse the | ||
NEWS file ('C-h n' within emacs) for changes since the last release, | ||
although this is not yet complete. | ||
|
||
This build uses the timerfd functions that were introduced in | ||
cygwin-3.0.0, so it will not run on earlier releases of Cygwin. And | ||
it will not run well on Cygwin releases prior to cygwin-3.0.3, which | ||
contains fixes for some timer-related bugs. | ||
|
||
CYGWIN NOTES | ||
============ | ||
|
@@ -83,4 +89,3 @@ CYGWIN NOTES | |
|
||
Ken Brown | ||
Cygwin's Emacs maintainer | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters