From: Maciej Marcin Piechotka <uzytkownik2@gmail.com>
To: 10631@debbugs.gnu.org
Subject: bug#10631: Update of patch
Date: Sat, 28 Jan 2012 18:46:51 +0000 [thread overview]
Message-ID: <1327776411.1921.25.camel@localhost.localdomain> (raw)
In-Reply-To: <1327767888.1934.14.camel@localhost.localdomain>
[-- Attachment #1: Type: text/plain, Size: 78 bytes --]
Ups. Sorry - I forgot to add one file to git index. Corrected patch
attached.
[-- Attachment #2: 0001-Fix-infinit-loop-when-emacs-is-compiled-with-GTK-sup.patch --]
[-- Type: text/x-patch, Size: 2016 bytes --]
From 3a06fc2b48eb7e55834d8e5e4adda1f2286758db Mon Sep 17 00:00:00 2001
From: Maciej Piechotka <uzytkownik2@gmail.com>
Date: Sat, 28 Jan 2012 16:12:45 +0000
Subject: [PATCH] Fix infinit loop when emacs is compiled with GTK+ support
and used in no-window mode
---
src/xgselect.c | 17 +++++------------
src/xgselect.h | 2 --
src/xterm.c | 2 --
3 files changed, 5 insertions(+), 16 deletions(-)
diff --git a/src/xgselect.c b/src/xgselect.c
index 333f7b1..4301eee 100644
--- a/src/xgselect.c
+++ b/src/xgselect.c
@@ -55,9 +55,11 @@ xg_select (max_fds, rfds, wfds, efds, timeout)
do {
if (n_gfds > gfds_size)
{
- while (n_gfds > gfds_size)
- gfds_size *= 2;
- xfree (gfds);
+ gfds_size = 1 << g_bit_storage (n_gfds);
+ if (gfds)
+ {
+ xfree (gfds);
+ }
gfds = xmalloc (sizeof (*gfds) * gfds_size);
}
@@ -152,14 +154,5 @@ xg_select (max_fds, rfds, wfds, efds, timeout)
}
#endif /* defined (USE_GTK) || defined (HAVE_GCONF) */
-void
-xgselect_initialize ()
-{
-#if defined (USE_GTK) || defined (HAVE_GCONF)
- gfds_size = 128;
- gfds = xmalloc (sizeof (*gfds)*gfds_size);
-#endif /* defined (USE_GTK) || defined (HAVE_GCONF) */
-}
-
/* arch-tag: c5873ee3-d1f6-44f9-9f3b-b14f70fd0e6a
(do not change this comment) */
diff --git a/src/xgselect.h b/src/xgselect.h
index 14488d6..3bb5428 100644
--- a/src/xgselect.h
+++ b/src/xgselect.h
@@ -30,8 +30,6 @@ extern int xg_select P_ ((int max_fds,
SELECT_TYPE *efds,
EMACS_TIME *timeout));
-extern void xgselect_initialize P_ ((void));
-
#endif /* XGSELECT_H */
/* arch-tag: 0c5392a8-3a41-41eb-839c-58e6595926f0
diff --git a/src/xterm.c b/src/xterm.c
index af8af50..83412ae 100644
--- a/src/xterm.c
+++ b/src/xterm.c
@@ -10989,8 +10989,6 @@ x_initialize ()
XSetIOErrorHandler (x_io_error_quitter);
signal (SIGPIPE, x_connection_signal);
-
- xgselect_initialize ();
}
--
1.7.8.4
next prev parent reply other threads:[~2012-01-28 18:46 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <1327767888.1934.14.camel@localhost.localdomain>
2012-01-28 17:01 ` bug#10629: Infinite loop in emacs 23 on terminal (-nw option) on xgselect.c:58-59 when compiled with gtk+ or gconf support Maciej Marcin Piechotka
2012-01-28 18:51 ` Glenn Morris
2012-01-28 18:46 ` Maciej Marcin Piechotka [this message]
2012-01-28 19:04 ` bug#10631: Update of patch Glenn Morris
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=1327776411.1921.25.camel@localhost.localdomain \
--to=uzytkownik2@gmail.com \
--cc=10631@debbugs.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.