diff src/keyboard.c @ 90066:fb79180b618d

Revision: miles@gnu.org--gnu-2004/emacs--unicode--0--patch-78 Merge from emacs--cvs-trunk--0 Patches applied: * miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-719 - miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-732 Update from CVS * miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-733 Update from CVS: man/calc.texi: Fix some TeX definitions. * miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-734 Merge from gnus--rel--5.10 * miles@gnu.org--gnu-2004/gnus--rel--5.10--patch-75 Merge from emacs--cvs-trunk--0 * miles@gnu.org--gnu-2004/gnus--rel--5.10--patch-76 - miles@gnu.org--gnu-2004/gnus--rel--5.10--patch-77 Update from CVS
author Miles Bader <miles@gnu.org>
date Tue, 14 Dec 2004 07:34:55 +0000
parents f2ebccfa87d4 cf6107ab7096
children eac554634bfa
line wrap: on
line diff
--- a/src/keyboard.c	Sat Dec 11 02:29:07 2004 +0000
+++ b/src/keyboard.c	Tue Dec 14 07:34:55 2004 +0000
@@ -6779,24 +6779,6 @@
 #ifdef BSD4_1
   extern int select_alarmed;
 #endif
-#if ! defined (SYSTEM_MALLOC) && defined (HAVE_GTK_AND_PTHREAD)
-  extern pthread_t main_thread;
-  if (pthread_self () != main_thread)
-    {
-      /* POSIX says any thread can receive the signal.  On GNU/Linux that is
-         not true, but for other systems (FreeBSD at least) it is.  So direct
-         the signal to the correct thread and block it from this thread.  */
-#ifdef SIGIO
-      sigset_t new_mask;
-
-      sigemptyset (&new_mask);
-      sigaddset (&new_mask, SIGIO);
-      pthread_sigmask (SIG_BLOCK, &new_mask, 0);
-      pthread_kill (main_thread, SIGIO);
-#endif
-      return;
-    }
-#endif
 
   interrupt_input_pending = 0;
 
@@ -6825,22 +6807,6 @@
 {
   /* Must preserve main program's value of errno.  */
   int old_errno = errno;
-#if ! defined (SYSTEM_MALLOC) && defined (HAVE_GTK_AND_PTHREAD)
-  extern pthread_t main_thread;
-  if (pthread_self () != main_thread)
-    {
-      /* POSIX says any thread can receive the signal.  On GNU/Linux that is
-         not true, but for other systems (FreeBSD at least) it is.  So direct
-         the signal to the correct thread and block it from this thread.  */
-      sigset_t new_mask;
-
-      sigemptyset (&new_mask);
-      sigaddset (&new_mask, SIGIO);
-      pthread_sigmask (SIG_BLOCK, &new_mask, 0);
-      pthread_kill (main_thread, SIGIO);
-      return;
-    }
-#endif /* HAVE_GTK_AND_PTHREAD */
 #if defined (USG) && !defined (POSIX_SIGNALS)
   /* USG systems forget handlers when they are used;
      must reestablish each time */
@@ -6857,6 +6823,24 @@
 #ifdef SYNC_INPUT
   interrupt_input_pending = 1;
 #else
+
+# if !defined (SYSTEM_MALLOC) && defined (HAVE_GTK_AND_PTHREAD)
+  extern pthread_t main_thread;
+  if (pthread_self () != main_thread)
+    {
+      /* POSIX says any thread can receive the signal.  On GNU/Linux that is
+         not true, but for other systems (FreeBSD at least) it is.  So direct
+         the signal to the correct thread and block it from this thread.  */
+      sigset_t new_mask;
+
+      sigemptyset (&new_mask);
+      sigaddset (&new_mask, SIGIO);
+      pthread_sigmask (SIG_BLOCK, &new_mask, 0);
+      pthread_kill (main_thread, SIGIO);
+      return;
+    }
+# endif /* HAVE_GTK_AND_PTHREAD */
+
   handle_async_input ();
 #endif