From: Ken Brown <kbrown@cornell.edu>
To: Emacs <emacs-devel@gnu.org>
Subject: Cygwin patches
Date: Fri, 20 Nov 2009 15:00:34 -0500 [thread overview]
Message-ID: <4B06F562.8060504@cornell.edu> (raw)
[-- Attachment #1: Type: text/plain, Size: 800 bytes --]
Now that you're preparing for emacs 23.2, could you please apply the
cygwin patches that I submitted last June?
http://lists.gnu.org/archive/html/emacs-devel/2009-06/msg00041.html
http://lists.gnu.org/archive/html/emacs-devel/2009-06/msg00330.html
For your convenience, I've remade the patches against the current CVS
source and attached them to this message. I don't want to repeat the
rationale for the patches that was already made in the threads cited
above, but let me just add two comments:
1. The patches to browse-url.el and cygwin.h fix cygwin problems and
should have no impact on other systems.
2. I built the official cygwin emacs-23.1 package with these patches,
and there have been no reported problems after several months of use.
Thanks for your consideration.
Ken
[-- Attachment #2: browse-url.el.patch --]
[-- Type: text/plain, Size: 1389 bytes --]
--- origsrc/lisp/net/browse-url.el 2009-11-20 11:34:25.000000000 -0500
+++ src/lisp/net/browse-url.el 2009-11-20 11:35:28.000000000 -0500
@@ -693,7 +693,9 @@
(cond ((not (buffer-modified-p)))
(browse-url-save-file (save-buffer))
(t (message "%s modified since last save" file))))))
- (browse-url (browse-url-file-url file))
+ (if (eq system-type 'cygwin)
+ (shell-command (concat "cygstart " (shell-quote-argument file)))
+ (browse-url (browse-url-file-url file)))
(run-hooks 'browse-url-of-file-hook))
(defun browse-url-file-url (file)
@@ -830,11 +832,13 @@
(defun browse-url-default-windows-browser (url &optional new-window)
(interactive (browse-url-interactive-arg "URL: "))
- (if (eq system-type 'ms-dos)
- (if dos-windows-version
- (shell-command (concat "start " (shell-quote-argument url)))
- (error "Browsing URLs is not supported on this system"))
- (w32-shell-execute "open" url)))
+ (cond ((eq system-type 'ms-dos)
+ (if dos-windows-version
+ (shell-command (concat "start " (shell-quote-argument url)))
+ (error "Browsing URLs is not supported on this system")))
+ ((eq system-type 'cygwin)
+ (shell-command (concat "cygstart " (shell-quote-argument url))))
+ (t (w32-shell-execute "open" url))))
(defun browse-url-default-macosx-browser (url &optional new-window)
(interactive (browse-url-interactive-arg "URL: "))
[-- Attachment #3: PROBLEMS.patch --]
[-- Type: text/plain, Size: 2993 bytes --]
--- origsrc/etc/PROBLEMS 2009-11-20 11:34:12.000000000 -0500
+++ src/etc/PROBLEMS 2009-11-20 11:34:46.000000000 -0500
@@ -255,6 +255,18 @@
Cygwin malloc, the Cygwin memalign always returns ENOSYS. A fix for this
problem would be welcome.
+A workaround is to set G_SLICE=always-malloc before starting emacs.
+For example, in bash,
+
+ G_SLICE=always-malloc emacs
+
+or put
+
+ export G_SLICE=always-malloc
+
+in one of the bash startup files. This also has to be done before
+building emacs on Cygwin with Gtk+.
+
* General runtime problems
** Lisp problems
@@ -2207,34 +2219,6 @@
changes the keyboard layout depends on your Windows version; for XP,
in the Languages tab, click "Details" and then "Key Settings".)
-** Cygwin build of Emacs hangs after rebasing Cygwin DLLs
-
-Usually, on Cygwin, one needs to rebase the DLLs if an application
-aborts with a message like this:
-
- C:\cygwin\bin\python.exe: *** unable to remap C:\cygwin\bin\cygssl.dll to
- same address as parent(0xDF0000) != 0xE00000
-
-However, since Cygwin DLL 1.5.17 was released, after such rebasing,
-Emacs hangs.
-
-This was reported to happen for Emacs 21.2 and also for the pretest of
-Emacs 22.1 on Cygwin.
-
-To work around this, build Emacs like this:
-
- LDFLAGS='-Wl,--enable-auto-import -Wl,--enable-auto-image-base' ./configure
- make LD='$(CC)'
- make LD='$(CC)' install
-
-This produces an Emacs binary that is independent of rebasing.
-
-Note that you _must_ use LD='$(CC)' in the last two commands above, to
-prevent GCC from passing the "--image-base 0x20000000" option to the
-linker, which is what it does by default. That option produces an
-Emacs binary with the base address 0x20000000, which will cause Emacs
-to hang after Cygwin DLLs are rebased.
-
** Interrupting Cygwin port of Bash from Emacs doesn't work.
Cygwin 1.x builds of the ported Bash cannot be interrupted from the
@@ -2481,17 +2465,12 @@
(using the location of the 32-bit X libraries on your system).
-*** Building the Cygwin port for MS-Windows can fail with some GCC versions
+*** Building the Cygwin port of emacs requires GCC 4
-Building Emacs 22 with Cygwin builds of GCC 3.4.4-1 and 3.4.4-2 is
-reported to either fail or cause Emacs to segfault at run time. In
-addition, the Cygwin GCC 3.4.4-2 has problems with generating debug
-info. Cygwin users are advised not to use these versions of GCC for
-compiling Emacs. GCC versions 4.0.3, 4.0.4, 4.1.1, and 4.1.2
-reportedly build a working Cygwin binary of Emacs, so we recommend
-these GCC versions. Note that these versions of GCC, 4.0.3, 4.0.4,
-4.1.1, and 4.1.2, are currently the _only_ versions known to succeed
-in building Emacs (as of v22.1).
+As of Emacs 22.1, there have been problems with Cygwin builds of Emacs
+using GCC 3. Cygwin users are advised to use GCC 4. As far as we
+know, there have been no problems with Cygwin builds of Emacs using
+GCC 4.
*** Building the native MS-Windows port with Cygwin GCC can fail.
[-- Attachment #4: cygwin.h.patch --]
[-- Type: text/plain, Size: 606 bytes --]
--- origsrc/src/s/cygwin.h 2009-06-21 00:38:20.000000000 -0400
+++ src/src/s/cygwin.h 2009-11-20 11:41:27.281250000 -0500
@@ -105,11 +105,7 @@
#define SYSV_SYSTEM_DIR 1
#define UNEXEC unexcw.o
#define POSIX_SIGNALS 1
-/* force the emacs image to start high in memory, so dll relocation
- can put things in low memory without causing all sorts of grief for
- emacs lisp pointers */
-#define DATA_SEG_BITS 0x20000000
-#define LINKER $(CC) -Wl,--image-base,DATA_SEG_BITS
+#define LINKER $(CC)
/* Use terminfo instead of termcap. Fewer environment variables to
go wrong, more terminal types. */
next reply other threads:[~2009-11-20 20:00 UTC|newest]
Thread overview: 24+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-11-20 20:00 Ken Brown [this message]
2009-11-20 21:50 ` Cygwin patches Chong Yidong
2009-11-20 21:59 ` Lennart Borgman
2009-11-20 22:26 ` Ken Brown
2009-11-20 23:54 ` Lennart Borgman
2009-11-21 8:12 ` Eli Zaretskii
2009-11-21 12:12 ` Ken Brown
2009-11-21 12:16 ` Lennart Borgman
2009-11-21 12:42 ` Eli Zaretskii
2009-11-21 21:21 ` Ken Brown
2009-11-21 21:48 ` Eli Zaretskii
2009-11-22 5:25 ` Davis Herring
2009-11-22 12:59 ` Ken Brown
2009-11-22 23:03 ` Chong Yidong
2009-11-22 23:23 ` Ken Brown
2009-11-22 23:30 ` Lennart Borgman
2009-11-23 1:37 ` Ken Brown
2009-11-23 1:42 ` Lennart Borgman
2009-11-23 1:50 ` Chong Yidong
2009-11-23 2:09 ` Ken Brown
2009-11-23 19:50 ` Ken Brown
2009-11-23 20:59 ` Chong Yidong
-- strict thread matches above, loose matches on Subject: below --
2009-11-20 23:40 Angelo Graziosi
2009-11-21 4:50 ` Chong Yidong
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=4B06F562.8060504@cornell.edu \
--to=kbrown@cornell.edu \
--cc=emacs-devel@gnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this external index
https://git.savannah.gnu.org/cgit/emacs.git
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.