diff options
| author | Eli Zaretskii | 2013-06-03 21:06:09 +0200 |
|---|---|---|
| committer | Michael Albinus | 2013-06-03 21:06:09 +0200 |
| commit | 7f203aa1fde2bc9ec43aa05a939525cdab149832 (patch) | |
| tree | 43e175dbe784faa04b4f3b284b1c62a89c26822a | |
| parent | 55a87246bae97514b6e927b9401b2b79592b8b91 (diff) | |
| download | emacs-7f203aa1fde2bc9ec43aa05a939525cdab149832.tar.gz emacs-7f203aa1fde2bc9ec43aa05a939525cdab149832.zip | |
* configure.ac (HAVE_GFILENOTIFY): Do not change $LIBS.
(GFILENOTIFY_CFLAGS, GFILENOTIFY_LIBS): Substitute.
* nt/config.nt: Add HAVE_GFILENOTIFY, HAVE_W32NOTIFY and USE_FILE_NOTIFY.
* src/Makefile.in (GFILENOTIFY_CFLAGS, GFILENOTIFY_LIBS): New variables.
(ALL_CFLAGS): Add $(GFILENOTIFY_CFLAGS).
(LIBES): Add $(GFILENOTIFY_LIBS).
* src/w32inevt.c (handle_file_notifications): Add dummy implementation
for !HAVE_W32NOTIFY.
* src/w32term.c: Wrap code with HAVE_W32NOTIFY.
| -rw-r--r-- | ChangeLog | 5 | ||||
| -rw-r--r-- | configure.ac | 3 | ||||
| -rw-r--r-- | nt/ChangeLog | 4 | ||||
| -rw-r--r-- | nt/config.nt | 9 | ||||
| -rw-r--r-- | src/ChangeLog | 11 | ||||
| -rw-r--r-- | src/Makefile.in | 6 | ||||
| -rw-r--r-- | src/w32inevt.c | 8 | ||||
| -rw-r--r-- | src/w32term.c | 7 |
8 files changed, 48 insertions, 5 deletions
| @@ -1,3 +1,8 @@ | |||
| 1 | 2013-06-03 Eli Zaretskii <eliz@gnu.org> | ||
| 2 | |||
| 3 | * configure.ac (HAVE_GFILENOTIFY): Do not change $LIBS. | ||
| 4 | (GFILENOTIFY_CFLAGS, GFILENOTIFY_LIBS): Substitute. | ||
| 5 | |||
| 1 | 2013-06-03 Jan Djärv <jan.h.d@swipnet.se> | 6 | 2013-06-03 Jan Djärv <jan.h.d@swipnet.se> |
| 2 | 7 | ||
| 3 | * configure.ac (HAVE_GLIB): Add GLib check. Set XGSELOBJ if GLib is | 8 | * configure.ac (HAVE_GLIB): Add GLib check. Set XGSELOBJ if GLib is |
diff --git a/configure.ac b/configure.ac index c13f9d977e6..4e58cddf59e 100644 --- a/configure.ac +++ b/configure.ac | |||
| @@ -2329,7 +2329,6 @@ if test "${with_file_notification}" = "gfile"; then | |||
| 2329 | PKG_CHECK_MODULES(GFILENOTIFY, gio-2.0 >= 2.18, HAVE_GFILENOTIFY=yes, HAVE_GFILENOTIFY=no) | 2329 | PKG_CHECK_MODULES(GFILENOTIFY, gio-2.0 >= 2.18, HAVE_GFILENOTIFY=yes, HAVE_GFILENOTIFY=no) |
| 2330 | if test "$HAVE_GFILENOTIFY" = "yes"; then | 2330 | if test "$HAVE_GFILENOTIFY" = "yes"; then |
| 2331 | AC_DEFINE(HAVE_GFILENOTIFY, 1, [Define to 1 if using GFile.]) | 2331 | AC_DEFINE(HAVE_GFILENOTIFY, 1, [Define to 1 if using GFile.]) |
| 2332 | LIBS="$LIBS $GFILENOTIFY_LIBS" | ||
| 2333 | NOTIFY_OBJ=gfilenotify.o | 2332 | NOTIFY_OBJ=gfilenotify.o |
| 2334 | NOTIFY_SUMMARY="yes -lgio (gfile)" | 2333 | NOTIFY_SUMMARY="yes -lgio (gfile)" |
| 2335 | fi | 2334 | fi |
| @@ -2359,6 +2358,8 @@ if test -n "$NOTIFY_OBJ"; then | |||
| 2359 | AC_DEFINE(USE_FILE_NOTIFY, 1, [Define to 1 if using file notifications.]) | 2358 | AC_DEFINE(USE_FILE_NOTIFY, 1, [Define to 1 if using file notifications.]) |
| 2360 | fi | 2359 | fi |
| 2361 | AC_SUBST(NOTIFY_OBJ) | 2360 | AC_SUBST(NOTIFY_OBJ) |
| 2361 | AC_SUBST(GFILENOTIFY_CFLAGS) | ||
| 2362 | AC_SUBST(GFILENOTIFY_LIBS) | ||
| 2362 | 2363 | ||
| 2363 | dnl Do not put whitespace before the #include statements below. | 2364 | dnl Do not put whitespace before the #include statements below. |
| 2364 | dnl Older compilers (eg sunos4 cc) choke on it. | 2365 | dnl Older compilers (eg sunos4 cc) choke on it. |
diff --git a/nt/ChangeLog b/nt/ChangeLog index b5322f51030..41f6d81d592 100644 --- a/nt/ChangeLog +++ b/nt/ChangeLog | |||
| @@ -1,5 +1,9 @@ | |||
| 1 | 2013-06-03 Eli Zaretskii <eliz@gnu.org> | 1 | 2013-06-03 Eli Zaretskii <eliz@gnu.org> |
| 2 | 2 | ||
| 3 | * config.nt: Add HAVE_GFILENOTIFY, HAVE_W32NOTIFY and USE_FILE_NOTIFY. | ||
| 4 | |||
| 5 | 2013-06-03 Eli Zaretskii <eliz@gnu.org> | ||
| 6 | |||
| 3 | * inc/sys/time.h (struct timeval): Remove the _W64 guards. | 7 | * inc/sys/time.h (struct timeval): Remove the _W64 guards. |
| 4 | 8 | ||
| 5 | 2013-06-01 Eli Zaretskii <eliz@gnu.org> | 9 | 2013-06-01 Eli Zaretskii <eliz@gnu.org> |
diff --git a/nt/config.nt b/nt/config.nt index 4380f2b86c5..95b56f2dc64 100644 --- a/nt/config.nt +++ b/nt/config.nt | |||
| @@ -547,6 +547,9 @@ along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>. */ | |||
| 547 | /* Define to 1 if you have the `gettimeofday' function. */ | 547 | /* Define to 1 if you have the `gettimeofday' function. */ |
| 548 | #define HAVE_GETTIMEOFDAY 1 | 548 | #define HAVE_GETTIMEOFDAY 1 |
| 549 | 549 | ||
| 550 | /* Define to 1 if using GFile. */ | ||
| 551 | #undef HAVE_GFILENOTIFY | ||
| 552 | |||
| 550 | /* Define to 1 if you have the `get_current_dir_name' function. */ | 553 | /* Define to 1 if you have the `get_current_dir_name' function. */ |
| 551 | #undef HAVE_GET_CURRENT_DIR_NAME | 554 | #undef HAVE_GET_CURRENT_DIR_NAME |
| 552 | 555 | ||
| @@ -1141,6 +1144,9 @@ along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>. */ | |||
| 1141 | /* Define to 1 if you have the <vfork.h> header file. */ | 1144 | /* Define to 1 if you have the <vfork.h> header file. */ |
| 1142 | #undef HAVE_VFORK_H | 1145 | #undef HAVE_VFORK_H |
| 1143 | 1146 | ||
| 1147 | /* Define to 1 to use w32notify. */ | ||
| 1148 | #define HAVE_W32NOTIFY 1 | ||
| 1149 | |||
| 1144 | /* Define to 1 if you have the <wchar.h> header file. */ | 1150 | /* Define to 1 if you have the <wchar.h> header file. */ |
| 1145 | #undef HAVE_WCHAR_H | 1151 | #undef HAVE_WCHAR_H |
| 1146 | 1152 | ||
| @@ -1497,6 +1503,9 @@ along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>. */ | |||
| 1497 | /* Define to nonzero if you want access control list support. */ | 1503 | /* Define to nonzero if you want access control list support. */ |
| 1498 | #undef USE_ACL | 1504 | #undef USE_ACL |
| 1499 | 1505 | ||
| 1506 | /* Define to 1 if using file notifications. */ | ||
| 1507 | #define USE_FILE_NOTIFY 1 | ||
| 1508 | |||
| 1500 | /* Define to 1 if using GTK. */ | 1509 | /* Define to 1 if using GTK. */ |
| 1501 | #undef USE_GTK | 1510 | #undef USE_GTK |
| 1502 | 1511 | ||
diff --git a/src/ChangeLog b/src/ChangeLog index aeca77b2ba3..491e5c38617 100644 --- a/src/ChangeLog +++ b/src/ChangeLog | |||
| @@ -1,3 +1,14 @@ | |||
| 1 | 2013-06-03 Eli Zaretskii <eliz@gnu.org> | ||
| 2 | |||
| 3 | * Makefile.in (GFILENOTIFY_CFLAGS, GFILENOTIFY_LIBS): New variables. | ||
| 4 | (ALL_CFLAGS): Add $(GFILENOTIFY_CFLAGS). | ||
| 5 | (LIBES): Add $(GFILENOTIFY_LIBS). | ||
| 6 | |||
| 7 | * w32inevt.c (handle_file_notifications): Add dummy implementation | ||
| 8 | for !HAVE_W32NOTIFY. | ||
| 9 | |||
| 10 | * w32term.c: Wrap code with HAVE_W32NOTIFY. | ||
| 11 | |||
| 1 | 2013-06-03 Jan Djärv <jan.h.d@swipnet.se> | 12 | 2013-06-03 Jan Djärv <jan.h.d@swipnet.se> |
| 2 | 13 | ||
| 3 | * xgselect.c: Replace #if defined ... with #ifdef HAVE_GLIB. | 14 | * xgselect.c: Replace #if defined ... with #ifdef HAVE_GLIB. |
diff --git a/src/Makefile.in b/src/Makefile.in index 0e42f0ee6a0..9d7857e4ca2 100644 --- a/src/Makefile.in +++ b/src/Makefile.in | |||
| @@ -160,6 +160,8 @@ GTK_OBJ=@GTK_OBJ@ | |||
| 160 | ## inotify.o if HAVE_INOTIFY. | 160 | ## inotify.o if HAVE_INOTIFY. |
| 161 | ## w32notify.o if HAVE_W32NOTIFY. | 161 | ## w32notify.o if HAVE_W32NOTIFY. |
| 162 | NOTIFY_OBJ = @NOTIFY_OBJ@ | 162 | NOTIFY_OBJ = @NOTIFY_OBJ@ |
| 163 | GFILENOTIFY_CFLAGS = @GFILENOTIFY_CFLAGS@ | ||
| 164 | GFILENOTIFY_LIBS = @GFILENOTIFY_LIBS@ | ||
| 163 | 165 | ||
| 164 | ## -ltermcap, or -lncurses, or -lcurses, or "". | 166 | ## -ltermcap, or -lncurses, or -lcurses, or "". |
| 165 | LIBS_TERMCAP=@LIBS_TERMCAP@ | 167 | LIBS_TERMCAP=@LIBS_TERMCAP@ |
| @@ -345,7 +347,7 @@ ALL_CFLAGS=-Demacs $(MYCPPFLAGS) -I. -I$(srcdir) \ | |||
| 345 | $(LIBXML2_CFLAGS) $(DBUS_CFLAGS) $(XRANDR_CFLAGS) $(XINERAMA_CFLAGS) \ | 347 | $(LIBXML2_CFLAGS) $(DBUS_CFLAGS) $(XRANDR_CFLAGS) $(XINERAMA_CFLAGS) \ |
| 346 | $(SETTINGS_CFLAGS) $(FREETYPE_CFLAGS) $(FONTCONFIG_CFLAGS) \ | 348 | $(SETTINGS_CFLAGS) $(FREETYPE_CFLAGS) $(FONTCONFIG_CFLAGS) \ |
| 347 | $(LIBOTF_CFLAGS) $(M17N_FLT_CFLAGS) $(DEPFLAGS) \ | 349 | $(LIBOTF_CFLAGS) $(M17N_FLT_CFLAGS) $(DEPFLAGS) \ |
| 348 | $(LIBGNUTLS_CFLAGS) \ | 350 | $(LIBGNUTLS_CFLAGS) $(GFILENOTIFY_CFLAGS) \ |
| 349 | $(WARN_CFLAGS) $(WERROR_CFLAGS) $(CFLAGS) | 351 | $(WARN_CFLAGS) $(WERROR_CFLAGS) $(CFLAGS) |
| 350 | ALL_OBJC_CFLAGS=$(ALL_CFLAGS) $(GNU_OBJC_CFLAGS) | 352 | ALL_OBJC_CFLAGS=$(ALL_CFLAGS) $(GNU_OBJC_CFLAGS) |
| 351 | 353 | ||
| @@ -427,7 +429,7 @@ LIBES = $(LIBS) $(W32_LIBS) $(LIBS_GNUSTEP) $(LIBX_BASE) $(LIBIMAGE) \ | |||
| 427 | $(LIBS_TERMCAP) $(GETLOADAVG_LIBS) $(SETTINGS_LIBS) $(LIBSELINUX_LIBS) \ | 429 | $(LIBS_TERMCAP) $(GETLOADAVG_LIBS) $(SETTINGS_LIBS) $(LIBSELINUX_LIBS) \ |
| 428 | $(FREETYPE_LIBS) $(FONTCONFIG_LIBS) $(LIBOTF_LIBS) $(M17N_FLT_LIBS) \ | 430 | $(FREETYPE_LIBS) $(FONTCONFIG_LIBS) $(LIBOTF_LIBS) $(M17N_FLT_LIBS) \ |
| 429 | $(LIBGNUTLS_LIBS) $(LIB_PTHREAD) $(LIB_PTHREAD_SIGMASK) \ | 431 | $(LIBGNUTLS_LIBS) $(LIB_PTHREAD) $(LIB_PTHREAD_SIGMASK) \ |
| 430 | $(LIB_MATH) | 432 | $(GFILENOTIFY_LIBS) $(LIB_MATH) |
| 431 | 433 | ||
| 432 | all: emacs$(EXEEXT) $(OTHER_FILES) | 434 | all: emacs$(EXEEXT) $(OTHER_FILES) |
| 433 | .PHONY: all | 435 | .PHONY: all |
diff --git a/src/w32inevt.c b/src/w32inevt.c index 3c38cf806e8..88a3f9739cd 100644 --- a/src/w32inevt.c +++ b/src/w32inevt.c | |||
| @@ -577,6 +577,7 @@ maybe_generate_resize_event (void) | |||
| 577 | 0, 0, 0); | 577 | 0, 0, 0); |
| 578 | } | 578 | } |
| 579 | 579 | ||
| 580 | #if HAVE_W32NOTIFY | ||
| 580 | static int | 581 | static int |
| 581 | handle_file_notifications (struct input_event *hold_quit) | 582 | handle_file_notifications (struct input_event *hold_quit) |
| 582 | { | 583 | { |
| @@ -644,6 +645,13 @@ handle_file_notifications (struct input_event *hold_quit) | |||
| 644 | leave_crit (); | 645 | leave_crit (); |
| 645 | return nevents; | 646 | return nevents; |
| 646 | } | 647 | } |
| 648 | #else /* !HAVE_W32NOTIFY */ | ||
| 649 | static int | ||
| 650 | handle_file_notifications (struct input_event *hold_quit) | ||
| 651 | { | ||
| 652 | return 0; | ||
| 653 | } | ||
| 654 | #endif /* !HAVE_W32NOTIFY */ | ||
| 647 | 655 | ||
| 648 | /* Here's an overview of how Emacs input works in non-GUI sessions on | 656 | /* Here's an overview of how Emacs input works in non-GUI sessions on |
| 649 | MS-Windows. (For description of the GUI input, see the commentary | 657 | MS-Windows. (For description of the GUI input, see the commentary |
diff --git a/src/w32term.c b/src/w32term.c index 58b1d3ca308..617492e189f 100644 --- a/src/w32term.c +++ b/src/w32term.c | |||
| @@ -3210,6 +3210,8 @@ construct_drag_n_drop (struct input_event *result, W32Msg *msg, struct frame *f) | |||
| 3210 | } | 3210 | } |
| 3211 | 3211 | ||
| 3212 | 3212 | ||
| 3213 | #if HAVE_W32NOTIFY | ||
| 3214 | |||
| 3213 | /* File event notifications (see w32notify.c). */ | 3215 | /* File event notifications (see w32notify.c). */ |
| 3214 | 3216 | ||
| 3215 | Lisp_Object | 3217 | Lisp_Object |
| @@ -3325,7 +3327,8 @@ queue_notifications (struct input_event *event, W32Msg *msg, struct frame *f, | |||
| 3325 | /* We've stuffed all the events ourselves, so w32_read_socket shouldn't. */ | 3327 | /* We've stuffed all the events ourselves, so w32_read_socket shouldn't. */ |
| 3326 | event->kind = NO_EVENT; | 3328 | event->kind = NO_EVENT; |
| 3327 | } | 3329 | } |
| 3328 | #endif | 3330 | #endif /* WINDOWSNT */ |
| 3331 | #endif /* HAVE_W32NOTIFY */ | ||
| 3329 | 3332 | ||
| 3330 | 3333 | ||
| 3331 | /* Function to report a mouse movement to the mainstream Emacs code. | 3334 | /* Function to report a mouse movement to the mainstream Emacs code. |
| @@ -4968,7 +4971,7 @@ w32_read_socket (struct terminal *terminal, | |||
| 4968 | check_visibility = 1; | 4971 | check_visibility = 1; |
| 4969 | break; | 4972 | break; |
| 4970 | 4973 | ||
| 4971 | #ifdef WINDOWSNT | 4974 | #if HAVE_W32NOTIFY |
| 4972 | case WM_EMACS_FILENOTIFY: | 4975 | case WM_EMACS_FILENOTIFY: |
| 4973 | f = x_window_to_frame (dpyinfo, msg.msg.hwnd); | 4976 | f = x_window_to_frame (dpyinfo, msg.msg.hwnd); |
| 4974 | if (f) | 4977 | if (f) |