From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Andy Moreton Newsgroups: gmane.emacs.devel Subject: Re: master 326fff4: Improve w32notify notifications Date: Tue, 29 Mar 2016 15:31:38 +0100 Message-ID: References: <20160319124618.27869.30424@vcs.savannah.gnu.org> <87mvpu33kt.fsf@gmx.de> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain X-Trace: ger.gmane.org 1459261955 16466 80.91.229.3 (29 Mar 2016 14:32:35 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Tue, 29 Mar 2016 14:32:35 +0000 (UTC) To: emacs-devel@gnu.org Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Tue Mar 29 16:32:26 2016 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1akugz-0006TG-Kn for ged-emacs-devel@m.gmane.org; Tue, 29 Mar 2016 16:32:25 +0200 Original-Received: from localhost ([::1]:47442 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1akugw-00062Y-RM for ged-emacs-devel@m.gmane.org; Tue, 29 Mar 2016 10:32:22 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:55992) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1akugb-00062Q-4I for emacs-devel@gnu.org; Tue, 29 Mar 2016 10:32:05 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1akugX-0003QY-3g for emacs-devel@gnu.org; Tue, 29 Mar 2016 10:32:01 -0400 Original-Received: from plane.gmane.org ([80.91.229.3]:57789) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1akugW-0003QH-LO for emacs-devel@gnu.org; Tue, 29 Mar 2016 10:31:57 -0400 Original-Received: from list by plane.gmane.org with local (Exim 4.69) (envelope-from ) id 1akugM-0006Br-4q for emacs-devel@gnu.org; Tue, 29 Mar 2016 16:31:46 +0200 Original-Received: from uk.solarflare.com ([193.34.186.16]) by main.gmane.org with esmtp (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Tue, 29 Mar 2016 16:31:46 +0200 Original-Received: from andrewjmoreton by uk.solarflare.com with local (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Tue, 29 Mar 2016 16:31:46 +0200 X-Injected-Via-Gmane: http://gmane.org/ Original-Lines: 57 Original-X-Complaints-To: usenet@ger.gmane.org X-Gmane-NNTP-Posting-Host: uk.solarflare.com User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/25.0.92 (windows-nt) Cancel-Lock: sha1:aKYY3zsu3PrfpSmni4j2oA5Tyvc= X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 80.91.229.3 X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.devel:202386 Archived-At: On Mon 21 Mar 2016, Fabrice Popineau wrote: > 2016-03-19 16:11 GMT+01:00 Michael Albinus : >> >> 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