emacs-devel
[Top][All Lists]
Advanced

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

Re: master 326fff4: Improve w32notify notifications


From: Andy Moreton
Subject: Re: master 326fff4: Improve w32notify notifications
Date: Tue, 29 Mar 2016 15:31:38 +0100
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/25.0.92 (windows-nt)

On Mon 21 Mar 2016, Fabrice Popineau wrote:

> 2016-03-19 16:11 GMT+01:00 Michael Albinus <address@hidden>:
>>
>> I'm curious why you need the additional `read-event' calls. The
>> following `file-notify--wait-for-events' loops until the condition is
>> satisfied, calling `read-event' every iteration.
>>
> Oh ... sorry, yes, we should revert those read-event calls then.
> I added them mechanically, overlooking the macro.
>
> Fabrice

Hi Fabrice,

The master 326fff4 commit also broke the cygwin w32 (i.e. non-X11)
build. The following trivial patch fixes it.

    AndyM

diff --git a/src/w32xfns.c b/src/w32xfns.c
index 9b633c4..9a10bf3 100644
--- a/src/w32xfns.c
+++ b/src/w32xfns.c
@@ -48,6 +48,7 @@ init_crit (void)
      when the input queue is empty, so make it a manual reset event. */
   input_available = CreateEvent (NULL, TRUE, FALSE, NULL);
 
+#if HAVE_W32NOTIFY
   /* Initialize the linked list of notifications sets that will be
      used to communicate between the watching worker threads and the
      main thread.  */
@@ -60,6 +61,7 @@ init_crit (void)
     }
   else
     DebPrint(("Out of memory: can't initialize notifications sets."));
+#endif /* HAVE_W32NOTIFY */
 
 #ifdef WINDOWSNT
   keyboard_handle = input_available;
@@ -90,6 +92,7 @@ delete_crit (void)
       interrupt_handle = NULL;
     }
 
+#if HAVE_W32NOTIFY
   if (notifications_set_head)
     {
       /* Free any remaining notifications set that could be left over.  */
@@ -104,6 +107,7 @@ delete_crit (void)
        }
     }
   free (notifications_set_head);
+#endif /* HAVE_W32NOTIFY */
 }
 
 void





reply via email to

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