emacs-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Reading D-Bus messages


From: Michael Albinus
Subject: Re: Reading D-Bus messages
Date: Mon, 27 Sep 2010 23:23:58 +0200
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/24.0.50 (gnu/linux)

Ken Brown <address@hidden> writes:

> To finish off the Cygwin issue that started this thread, dbus now
> works fine in emacs-24 under Cygwin, but not in emacs-23.  Would
> anyone object if I were to apply the following patch to the emacs-23
> branch to fix the (Cygwin-specific) problem there?
>
> === modified file 'src/keyboard.c'
> --- src/keyboard.c      2010-07-05 17:16:59 +0000
> +++ src/keyboard.c      2010-09-27 19:33:05 +0000
> @@ -4107,7 +4107,7 @@
>          interrupt handlers have not read it, read it now.  */
>
>  /* Note SIGIO has been undef'd if FIONREAD is missing.  */
> -#ifdef SIGIO
> +#if defined (SIGIO) || defined (CYGWIN)
>        gobble_input (0);
>  #endif /* SIGIO */
>        if (kbd_fetch_ptr != kbd_store_ptr)

Likely it is sufficient to move the call of xd_read_queued_messages out
of gobble_input:

 --8<---------------cut here---------------start------------->8---
*** ~/src/emacs-23/src/keyboard.c.~100064~      2010-09-27 23:18:30.840864838 
+0200
--- ~/src/emacs-23/src/keyboard.c       2010-09-27 23:18:01.942112064 +0200
***************
*** 4106,4111 ****
--- 4106,4116 ----
        /* One way or another, wait until input is available; then, if
         interrupt handlers have not read it, read it now.  */
  
+ #ifdef HAVE_DBUS
+       /* Read D-Bus messages.  */
+       xd_read_queued_messages ();
+ #endif /* HAVE_DBUS */
+ 
  /* Note SIGIO has been undef'd if FIONREAD is missing.  */
  #ifdef SIGIO
        gobble_input (0);
***************
*** 7051,7061 ****
  gobble_input (expected)
       int expected;
  {
- #ifdef HAVE_DBUS
-   /* Read D-Bus messages.  */
-   xd_read_queued_messages ();
- #endif /* HAVE_DBUS */
- 
  #ifdef SIGIO
    if (interrupt_input)
      {
--- 7056,7061 ----
--8<---------------cut here---------------end--------------->8---

I haven't tested this, 'tho (just being kind of ill).

> If this is OK, I have one more question:  How do I guarantee that the
> patch doesn't propagate to the trunk?  Is it enough to say in the log
> message that it's for emacs-23 only?

I would say yes.

> Ken

Best regards, Michael.



reply via email to

[Prev in Thread] Current Thread [Next in Thread]