]> code.delx.au - gnu-emacs/commitdiff
* configure.in: Allow compiling Emacs with GTK on Cygwin.
authorChong Yidong <cyd@stupidchicken.com>
Wed, 9 Dec 2009 01:06:32 +0000 (01:06 +0000)
committerChong Yidong <cyd@stupidchicken.com>
Wed, 9 Dec 2009 01:06:32 +0000 (01:06 +0000)
* src/s/cygwin.h (G_SLICE_ALWAYS_MALLOC): New variable.

* src/emacs.c (main): Set the G_SLICE environment variable for Cygwin
GTK builds.

ChangeLog
configure.in
src/ChangeLog
src/emacs.c
src/s/cygwin.h

index 512ebd69e068d486a8bdce5d03969b376e2c8093..d864a925b70033e2f4275bbd9858ad24af097159 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,7 @@
+2009-12-09  Ken Brown  <kbrown@cornell.edu>  (tiny change)
+
+       * configure.in: Allow compiling Emacs with GTK on Cygwin.
+
 2009-12-01  Glenn Morris  <rgm@gnu.org>
 
        * make-dist: Add etc/images/mpc directory.
index 98e39cc007d6d9833d6149d8490557712b31efb9..34d5fd5ae42f5a5c01fb68a0bfe11c436297a8ed 100644 (file)
@@ -3026,16 +3026,6 @@ fi
 
 echo
 
-if test "$USE_X_TOOLKIT" = GTK; then
-  case "$canonical" in
-  *cygwin*)
-    echo "There are known problems with Emacs and Gtk+ on cygwin, so you
-  will probably get a crash on startup.  If this happens, please use another
-  toolkit for Emacs.  See etc/PROBLEMS for more information."
-  ;;
-  esac
-fi
-
 if test "$HAVE_NS" = "yes"; then
    echo
    echo "You must run \"make install\" in order to test the built application.
index 11d8127057e1979ac355cf335023a8ea378b2611..9f666aa649d5e994a8dd4ba29b8525a8b30b56c0 100644 (file)
@@ -1,3 +1,10 @@
+2009-12-09  Ken Brown  <kbrown@cornell.edu>  (tiny change)
+
+       * s/cygwin.h (G_SLICE_ALWAYS_MALLOC): New variable.
+
+       * emacs.c (main): Set the G_SLICE environment variable for Cygwin
+       GTK builds.
+
 2009-12-07  Andreas Schwab  <schwab@linux-m68k.org>
 
        * unexelf.c (unexec): Don't search for .data twice.
index d96b3a1daf14048f1c0cedb5d82af0633fc50989..8b88985969b2653e3043327282eca7851050da8f 100644 (file)
@@ -809,6 +809,11 @@ main (int argc, char **argv)
   stack_base = &dummy;
 #endif
 
+#if defined (USE_GTK) && defined (G_SLICE_ALWAYS_MALLOC)
+  /* This is used by the Cygwin build.  */
+  setenv ("G_SLICE", "always-malloc", 1);
+#endif
+
   if (!initialized)
     {
       extern char my_endbss[];
index 69b826ac93237f4b2c995ad30b0aeceb7e0e97a8..3dd73c0f6e1fac77cd70d3adfe4b8a27750a08f1 100644 (file)
@@ -126,6 +126,12 @@ along with GNU Emacs.  If not, see <http://www.gnu.org/licenses/>.  */
 /* Virtual addresses of pure and impure space can vary, as on Windows.  */
 #define VIRT_ADDR_VARIES
 
+/* Emacs supplies its own malloc, but glib (part of Gtk+) calls
+   memalign and on Cygwin, that becomes the Cygwin-supplied memalign.
+   As malloc is not the Cygwin malloc, the Cygwin memalign always
+   returns ENOSYS.  A workaround is to set G_SLICE=always-malloc. */
+#define G_SLICE_ALWAYS_MALLOC
+
 /* the end */
 
 /* arch-tag: 5ae7ba00-83b0-4ab3-806a-3e845779191b