Initialize xgselect in function xg_select when gfds_size == 0 (rhbz#751154)

This commit is contained in:
Karel Klic 2011-11-25 16:36:04 +01:00
parent 782803e7d3
commit a2302b156d
2 changed files with 35 additions and 1 deletions

26
emacs-xgselect.patch Normal file
View File

@ -0,0 +1,26 @@
diff -up emacs-23.3/src/xgselect.c.xgselect emacs-23.3/src/xgselect.c
--- emacs-23.3/src/xgselect.c.xgselect 2011-11-25 14:05:03.963372281 +0100
+++ emacs-23.3/src/xgselect.c 2011-11-25 14:06:49.798049160 +0100
@@ -53,12 +53,17 @@ xg_select (max_fds, rfds, wfds, efds, ti
g_main_context_pending (context);
do {
- if (n_gfds > gfds_size)
+ if (n_gfds > gfds_size)
{
- while (n_gfds > gfds_size)
- gfds_size *= 2;
- xfree (gfds);
- gfds = xmalloc (sizeof (*gfds) * gfds_size);
+ if (gfds_size == 0)
+ xgselect_initialize ();
+ else
+ {
+ while (n_gfds > gfds_size)
+ gfds_size *= 2;
+ xfree (gfds);
+ gfds = xmalloc (sizeof (*gfds) * gfds_size);
+ }
}
n_gfds = g_main_context_query (context,

View File

@ -3,7 +3,7 @@ Summary: GNU Emacs text editor
Name: emacs Name: emacs
Epoch: 1 Epoch: 1
Version: 23.3 Version: 23.3
Release: 15%{?dist} Release: 16%{?dist}
License: GPLv3+ License: GPLv3+
URL: http://www.gnu.org/software/emacs/ URL: http://www.gnu.org/software/emacs/
Group: Applications/Editors Group: Applications/Editors
@ -35,6 +35,9 @@ Patch7: emacs-spellchecker.patch
# rhbz#711739 # rhbz#711739
# http://bzr.savannah.gnu.org/lh/emacs/trunk/revision/106247 # http://bzr.savannah.gnu.org/lh/emacs/trunk/revision/106247
Patch8: emacs-wm-state-hidden.patch Patch8: emacs-wm-state-hidden.patch
# rhbz#751154
Patch9: emacs-xgselect.patch
BuildRequires: atk-devel, cairo-devel, freetype-devel, fontconfig-devel, dbus-devel, giflib-devel, glibc-devel, gtk2-devel, libpng-devel BuildRequires: atk-devel, cairo-devel, freetype-devel, fontconfig-devel, dbus-devel, giflib-devel, glibc-devel, gtk2-devel, libpng-devel
BuildRequires: libjpeg-devel, libtiff-devel, libX11-devel, libXau-devel, libXdmcp-devel, libXrender-devel, libXt-devel BuildRequires: libjpeg-devel, libtiff-devel, libX11-devel, libXau-devel, libXdmcp-devel, libXrender-devel, libXt-devel
BuildRequires: libXpm-devel, ncurses-devel, xorg-x11-proto-devel, zlib-devel BuildRequires: libXpm-devel, ncurses-devel, xorg-x11-proto-devel, zlib-devel
@ -158,6 +161,7 @@ packages that add functionality to Emacs.
%patch6 -p0 -b .hideshow-comment %patch6 -p0 -b .hideshow-comment
%patch7 -p1 -b .spellchecker %patch7 -p1 -b .spellchecker
%patch8 -p1 -b .wm-state-hidden %patch8 -p1 -b .wm-state-hidden
%patch9 -p1 -b .xgselect
# Install site-lisp files # Install site-lisp files
cp %SOURCE7 %SOURCE10 site-lisp cp %SOURCE7 %SOURCE10 site-lisp
@ -437,6 +441,10 @@ update-desktop-database &> /dev/null || :
%dir %{_datadir}/emacs/site-lisp/site-start.d %dir %{_datadir}/emacs/site-lisp/site-start.d
%changelog %changelog
* Fri Nov 25 2011 Karel Klíč <kklic@redhat.com> - 1:23.3-16
- Initialize xgselect in function xg_select when
gfds_size == 0 (rhbz#751154)
* Wed Nov 23 2011 Karel Klíč <kklic@redhat.com> - 1:23.3-15 * Wed Nov 23 2011 Karel Klíč <kklic@redhat.com> - 1:23.3-15
- Check for _NET_WM_STATE_HIDDEN (rhbz#711739) - Check for _NET_WM_STATE_HIDDEN (rhbz#711739)