From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Wolfgang Jenkner Newsgroups: gmane.emacs.devel Subject: Re: kqueue in Emacs 25.1? Date: Wed, 11 Nov 2015 16:11:38 +0100 Message-ID: <85h9ks4lg5.fsf@iznogoud.viz> References: <871tc315y3.fsf@lifelogs.com> <83k2pvqg0l.fsf@gnu.org> <87io5ddh7c.fsf_-_@gmx.de> <83d1vlq3g6.fsf@gnu.org> <87egg1dfnv.fsf@gmx.de> <83bnb5q19l.fsf@gnu.org> <87lha6yn2z.fsf@gmx.de> <85twourkly.fsf@iznogoud.viz> <87d1vhzz2w.fsf@gmx.de> <87y4e43gra.fsf@gmx.de> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain X-Trace: ger.gmane.org 1447254930 10166 80.91.229.3 (11 Nov 2015 15:15:30 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Wed, 11 Nov 2015 15:15:30 +0000 (UTC) Cc: emacs-devel@gnu.org To: Michael Albinus Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Wed Nov 11 16:15:20 2015 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 1ZwX7H-0002sN-FG for ged-emacs-devel@m.gmane.org; Wed, 11 Nov 2015 16:15:19 +0100 Original-Received: from localhost ([::1]:41162 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZwX7H-0000jP-62 for ged-emacs-devel@m.gmane.org; Wed, 11 Nov 2015 10:15:19 -0500 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:43861) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZwX6x-0000iy-SH for emacs-devel@gnu.org; Wed, 11 Nov 2015 10:15:00 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ZwX6t-0001MB-RM for emacs-devel@gnu.org; Wed, 11 Nov 2015 10:14:59 -0500 Original-Received: from b2bfep16.mx.upcmail.net ([62.179.121.61]:55328) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZwX6t-0001LE-Go for emacs-devel@gnu.org; Wed, 11 Nov 2015 10:14:55 -0500 Original-Received: from edge11.upcmail.net ([192.168.13.81]) by b2bfep16.mx.upcmail.net (InterMail vM.8.01.05.18 201-2260-151-151-20140610) with ESMTP id <20151111151451.LQZG9629.b2bfep16-int.chello.at@edge11.upcmail.net> for ; Wed, 11 Nov 2015 16:14:51 +0100 Original-Received: from iznogoud.viz ([85.127.84.226]) by edge11.upcmail.net with edge id gFEq1r01o4szaZx0BFEqD5; Wed, 11 Nov 2015 16:14:51 +0100 X-SourceIP: 85.127.84.226 Original-Received: from wolfgang by iznogoud.viz with local (Exim 4.86 (FreeBSD)) (envelope-from ) id 1ZwX6o-000E5e-98; Wed, 11 Nov 2015 16:14:50 +0100 Mail-Followup-To: Michael Albinus , emacs-devel@gnu.org User-Agent: Gnus/5.130014 (Ma Gnus v0.14) Emacs/25.0.50 (berkeley-unix) X-detected-operating-system: by eggs.gnu.org: GNU/Linux 3.x X-Received-From: 62.179.121.61 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:194065 Archived-At: On Wed, Nov 11 2015, Michael Albinus wrote: > I've pushed this branch to savannah. Thank you very much! > >> First of all, I would like to know whether it compiles and links under >> BSD the way I have changed it in configure.ac and src/Makefile.in. > > Could you, pls, check in your environment? Please, see the patch with trivial fixes below. > You could also play a little bit with `kqueue-add-watch', but be aware > that watching directories is not implemented yet. This must be emulated, > kqueue has no native support for watching directories. Doing the same tests as with julipedia: echo >foo (7 (attrib) "/tmp/foo") (7 (extend write) "/tmp/foo") echo >>foo (7 (extend write) "/tmp/foo") chmod a+x foo (7 (attrib) "/tmp/foo") rm foo (7 (delete) "/tmp/foo") -- >8 -- Subject: [PATCH] Build fixes for kqueue support. * src/kqueue.c (Fkqueue_add_watch): O_BINARY is not a POSIX open(3) flag. * configure.ac (HAVE_KQUEUE): There is no pkg-config module for native kqueue on *BSD. --- configure.ac | 7 +++++++ src/kqueue.c | 2 +- 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/configure.ac b/configure.ac index 9c6db56..f9274d7 100644 --- a/configure.ac +++ b/configure.ac @@ -2732,6 +2732,13 @@ case $with_file_notification,$NOTIFY_OBJ in NOTIFY_LIBS=$KQUEUE_LIBS NOTIFY_OBJ=kqueue.o NOTIFY_SUMMARY="yes -lkqueue" + else + AC_SEARCH_LIBS(kqueue, []) + if test "$ac_cv_search_kqueue" != no; then + AC_DEFINE(HAVE_KQUEUE, 1, [Define to 1 to use kqueue.]) + NOTIFY_OBJ=kqueue.o + NOTIFY_SUMMARY="yes (kqueue)" + fi fi ;; esac diff --git a/src/kqueue.c b/src/kqueue.c index c2e859f..d2f3d37 100644 --- a/src/kqueue.c +++ b/src/kqueue.c @@ -163,7 +163,7 @@ will be reported only in case of the `rename' event. */) /* Open file. */ file = ENCODE_FILE (file); - fd = emacs_open (SSDATA (file), O_NONBLOCK | O_BINARY | O_RDONLY, 0); + fd = emacs_open (SSDATA (file), O_NONBLOCK | O_RDONLY, 0); if (fd == -1) report_file_error ("File cannot be opened", file); -- 2.6.2