From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Eli Zaretskii Newsgroups: gmane.emacs.devel Subject: Re: Using glib's g_file_monitor_file and g_file_monitor_directory Date: Tue, 28 May 2013 18:29:11 +0300 Message-ID: <83fvx7p1h4.fsf@gnu.org> References: <87zjxxn6th.fsf@gmx.de> <87hajqpjn1.fsf@gmx.de> <8738t7pewc.fsf@gmx.de> Reply-To: Eli Zaretskii NNTP-Posting-Host: plane.gmane.org X-Trace: ger.gmane.org 1369755560 12401 80.91.229.3 (28 May 2013 15:39:20 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Tue, 28 May 2013 15:39:20 +0000 (UTC) Cc: monnier@iro.umontreal.ca, emacs-devel@gnu.org To: Michael Albinus Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Tue May 28 17:39:18 2013 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 1UhLzX-0003fD-1X for ged-emacs-devel@m.gmane.org; Tue, 28 May 2013 17:39:15 +0200 Original-Received: from localhost ([::1]:46237 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UhLzW-0002nF-LL for ged-emacs-devel@m.gmane.org; Tue, 28 May 2013 11:39:14 -0400 Original-Received: from eggs.gnu.org ([208.118.235.92]:42158) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UhLpv-0005RF-AN for emacs-devel@gnu.org; Tue, 28 May 2013 11:29:28 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1UhLpm-0007eQ-1p for emacs-devel@gnu.org; Tue, 28 May 2013 11:29:19 -0400 Original-Received: from mtaout20.012.net.il ([80.179.55.166]:47629) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UhLpl-0007dv-Q3 for emacs-devel@gnu.org; Tue, 28 May 2013 11:29:09 -0400 Original-Received: from conversion-daemon.a-mtaout20.012.net.il by a-mtaout20.012.net.il (HyperSendmail v2007.08) id <0MNI00000LLV0700@a-mtaout20.012.net.il> for emacs-devel@gnu.org; Tue, 28 May 2013 18:29:00 +0300 (IDT) Original-Received: from HOME-C4E4A596F7 ([87.69.4.28]) by a-mtaout20.012.net.il (HyperSendmail v2007.08) with ESMTPA id <0MNI00MOXLOBZX20@a-mtaout20.012.net.il>; Tue, 28 May 2013 18:29:00 +0300 (IDT) In-reply-to: <8738t7pewc.fsf@gmx.de> X-012-Sender: halo1@inter.net.il X-detected-operating-system: by eggs.gnu.org: Solaris 10 X-Received-From: 80.179.55.166 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:159857 Archived-At: > From: Michael Albinus > Date: Tue, 28 May 2013 12:39:15 +0200 > Cc: emacs-devel@gnu.org > > I've appended a patch which I have tested successfully under GNU/Linux. > There is a new gfilenotify.c, which uses glib's functionality. Thanks. > There is > also a new config option --with-file-notification=LIB, LIB can be "yes", > "no", "gfile" or "inotify". Default on non-w32 machines is "gfile" if > applicable. For w32 machines, this option is not taken into account yet, > emacs undonditionally links w32notify (maybe we want also support "no" > there?). I'd rather not special-case w32 unless really necessary. (The whole point of using the Posix configury was to remove as much w32-specific stuff as possible from the build process.) So yes, let's by all means support "no" for w32, although I'm not sure who'd want that. And please also include mingw32 in the same test harness where you test for gfilenotify and inotify, i.e. test for a header (windows.h will do), not the value of $opsys. Btw, glib is available for Windows as well, and AFAICT its gfilemonitor should work (it actually uses the same APIs as w32notify.c does). So "gfile" should not be precluded from the w32 build. > +if "${opsys}" = "mingw32"; then > + NOTIFY_OBJ=w32notify.o > + NOTIFY_SUMMARY="yes" > +fi See above: I'd prefer this to be a real test, based on windows.h presence. And if the user selected "gfile", let them have it, do not override with w32notify.o. > +#if defined (HAVE_GFILENOTIFY) || defined (HAVE_INOTIFY) || defined (HAVE_NTGUI) It sounds like a single symbol HAVE_FILE_NOTIFY, defined somewhere as the OR of these 3, should make the sources more readable.