[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: kqueue in Emacs 25.1?
From: |
Wolfgang Jenkner |
Subject: |
Re: kqueue in Emacs 25.1? |
Date: |
Wed, 11 Nov 2015 16:11:38 +0100 |
User-agent: |
Gnus/5.130014 (Ma Gnus v0.14) Emacs/25.0.50 (berkeley-unix) |
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
- Re: Feature freezes and Emacs 25, (continued)
- Re: Feature freezes and Emacs 25, Phillip Lord, 2015/11/07
- kqueue in Emacs 25.1? (was: Feature freezes and Emacs 25), Michael Albinus, 2015/11/07
- Re: kqueue in Emacs 25.1? (was: Feature freezes and Emacs 25), Eli Zaretskii, 2015/11/07
- Re: kqueue in Emacs 25.1?, Michael Albinus, 2015/11/07
- Re: kqueue in Emacs 25.1?, Eli Zaretskii, 2015/11/07
- Re: kqueue in Emacs 25.1?, John Wiegley, 2015/11/09
- Re: kqueue in Emacs 25.1?, Michael Albinus, 2015/11/10
- Re: kqueue in Emacs 25.1?, Wolfgang Jenkner, 2015/11/10
- Re: kqueue in Emacs 25.1?, Michael Albinus, 2015/11/10
- Re: kqueue in Emacs 25.1?, Michael Albinus, 2015/11/11
- Re: kqueue in Emacs 25.1?,
Wolfgang Jenkner <=
- Re: kqueue in Emacs 25.1?, Michael Albinus, 2015/11/11
- Re: kqueue in Emacs 25.1?, Wolfgang Jenkner, 2015/11/11
- Re: kqueue in Emacs 25.1?, Michael Albinus, 2015/11/11
- Re: kqueue in Emacs 25.1?, Wolfgang Jenkner, 2015/11/11
- Re: kqueue in Emacs 25.1?, Michael Albinus, 2015/11/11
- Re: kqueue in Emacs 25.1?, Michael Albinus, 2015/11/12
- Re: kqueue in Emacs 25.1?, Wolfgang Jenkner, 2015/11/12
- Re: kqueue in Emacs 25.1?, Michael Albinus, 2015/11/13
- Re: kqueue in Emacs 25.1?, Wolfgang Jenkner, 2015/11/13
- Re: kqueue in Emacs 25.1?, Wolfgang Jenkner, 2015/11/13