diff options
| author | Michael Albinus | 2016-01-22 19:56:09 +0100 |
|---|---|---|
| committer | Michael Albinus | 2016-01-22 19:56:09 +0100 |
| commit | 7bf54d01159eb09bae3c9cd86f2af0812d9afdf6 (patch) | |
| tree | f00e00ba1ed5a492ec94faf8d07a6ca2f857a9c5 /src/emacs.c | |
| parent | f7dc6d8b5bb318e02a4016d93f8b34de0716f4dc (diff) | |
| download | emacs-7bf54d01159eb09bae3c9cd86f2af0812d9afdf6.tar.gz emacs-7bf54d01159eb09bae3c9cd86f2af0812d9afdf6.zip | |
Backport kqueue integration from master
* configure.ac (--with-file-notification): Add kqueue.
(top): Remove special test for "${HAVE_NS}" and
${with_file_notification}, this is handled inside gfilenotify
tests. Add kqueue tests. Use NOTIFY_CFLAGS and NOTIFY_LIBS
instead of library specific variables. Add error message for
gfile on Nextstep.
* doc/lispref/os.texi (File Notifications): Add kqueue as backend.
Fix some glitches in the example.
* etc/NEWS: Mention kqueue.
* lisp/filenotify.el (file-notify--library)
(file-notify-descriptors, file-notify-callback)
(file-notify-add-watch, file-notify-rm-watch)
(file-notify-valid-p): Add kqueue support.
(file-notify--rm-descriptor): Remove WHAT arg.
* src/Makefile.in: Use NOTIFY_CFLAGS and NOTIFY_LIBS.
* src/emacs.c (main): Call globals_of_kqueue and syms_of_kqueue.
* src/inotify.c (inotifyevent_to_event): Extract file name from
watch_object if the event doesn't provide it.
(Finotify_add_watch): Add file name to watch_object.
* src/keyboard.c (make_lispy_event): Check also for HAVE_KQUEUE.
* src/kqueue.c: New file.
* src/lisp.h: Declare extern globals_of_kqueue and syms_of_kqueue.
* test/automated/file-notify-tests.el
(file-notify--test-expected-events): Remove.
(file-notify--test-cleanup): Do not set that variable.
(file-notify--test-timeout) Use different timeouts for
different libraries.
(file-notify--test-library): New defun.
(file-notify--test-event-test): Make stronger checks.
(file-notify--test-with-events): EVENTS can also be a list of
lists. Flush outstanding events before running the body.
Make timeout heuristically depend on the number of events.
(file-notify-test01-add-watch, file-notify-test02-events)
(file-notify-test04-file-validity, file-notify-test05-dir-validity):
Rewrite in order to call file monitors but directory monitors.
(file-notify-test02-events, file-notify-test04-file-validity): Do
not skip cygwin tests. Add additional test for file creation.
Adapt expected result for different backends.
(file-notify-test03-autorevert): Some of the tests don't work for
w32notify.
(file-notify-test06-many-events): New test.
Diffstat (limited to 'src/emacs.c')
| -rw-r--r-- | src/emacs.c | 16 |
1 files changed, 12 insertions, 4 deletions
diff --git a/src/emacs.c b/src/emacs.c index 6de0fffb904..ddaa82c1f64 100644 --- a/src/emacs.c +++ b/src/emacs.c | |||
| @@ -1360,6 +1360,10 @@ Using an Emacs configured with --with-x-toolkit=lucid does not have this problem | |||
| 1360 | tzset (); | 1360 | tzset (); |
| 1361 | #endif /* MSDOS */ | 1361 | #endif /* MSDOS */ |
| 1362 | 1362 | ||
| 1363 | #ifdef HAVE_KQUEUE | ||
| 1364 | globals_of_kqueue (); | ||
| 1365 | #endif | ||
| 1366 | |||
| 1363 | #ifdef HAVE_GFILENOTIFY | 1367 | #ifdef HAVE_GFILENOTIFY |
| 1364 | globals_of_gfilenotify (); | 1368 | globals_of_gfilenotify (); |
| 1365 | #endif | 1369 | #endif |
| @@ -1538,14 +1542,18 @@ Using an Emacs configured with --with-x-toolkit=lucid does not have this problem | |||
| 1538 | 1542 | ||
| 1539 | syms_of_gnutls (); | 1543 | syms_of_gnutls (); |
| 1540 | 1544 | ||
| 1541 | #ifdef HAVE_GFILENOTIFY | ||
| 1542 | syms_of_gfilenotify (); | ||
| 1543 | #endif /* HAVE_GFILENOTIFY */ | ||
| 1544 | |||
| 1545 | #ifdef HAVE_INOTIFY | 1545 | #ifdef HAVE_INOTIFY |
| 1546 | syms_of_inotify (); | 1546 | syms_of_inotify (); |
| 1547 | #endif /* HAVE_INOTIFY */ | 1547 | #endif /* HAVE_INOTIFY */ |
| 1548 | 1548 | ||
| 1549 | #ifdef HAVE_KQUEUE | ||
| 1550 | syms_of_kqueue (); | ||
| 1551 | #endif /* HAVE_KQUEUE */ | ||
| 1552 | |||
| 1553 | #ifdef HAVE_GFILENOTIFY | ||
| 1554 | syms_of_gfilenotify (); | ||
| 1555 | #endif /* HAVE_GFILENOTIFY */ | ||
| 1556 | |||
| 1549 | #ifdef HAVE_DBUS | 1557 | #ifdef HAVE_DBUS |
| 1550 | syms_of_dbusbind (); | 1558 | syms_of_dbusbind (); |
| 1551 | #endif /* HAVE_DBUS */ | 1559 | #endif /* HAVE_DBUS */ |