diff options
| author | Jan Djärv | 2013-06-03 20:47:35 +0200 |
|---|---|---|
| committer | Jan Djärv | 2013-06-03 20:47:35 +0200 |
| commit | 55a87246bae97514b6e927b9401b2b79592b8b91 (patch) | |
| tree | a262392c54564b2a26bd639be1e58eea10b5102c /src | |
| parent | 3d5ee10aa258a500e0b70b5eabe9d58cb3ab051e (diff) | |
| download | emacs-55a87246bae97514b6e927b9401b2b79592b8b91.tar.gz emacs-55a87246bae97514b6e927b9401b2b79592b8b91.zip | |
Add HAVE_GLIB check instead of checking individual libraries that use GLib.
* configure.ac (HAVE_GLIB): Add GLib check. Set XGSELOBJ if GLib is
used. Remove xgselect.o from XOBJ.
* src/Makefile.in (XGSELOBJ): New, xgselect.o if GLib is used, or empty.
* src/process.c (wait_reading_process_output): Call xg_select if HAVE_GLIB.
* src/xgselect.c: Replace #if defined ... with #ifdef HAVE_GLIB.
Diffstat (limited to 'src')
| -rw-r--r-- | src/ChangeLog | 8 | ||||
| -rw-r--r-- | src/Makefile.in | 7 | ||||
| -rw-r--r-- | src/process.c | 2 | ||||
| -rw-r--r-- | src/xgselect.c | 4 |
4 files changed, 16 insertions, 5 deletions
diff --git a/src/ChangeLog b/src/ChangeLog index b3b6f4730f0..aeca77b2ba3 100644 --- a/src/ChangeLog +++ b/src/ChangeLog | |||
| @@ -1,3 +1,11 @@ | |||
| 1 | 2013-06-03 Jan Djärv <jan.h.d@swipnet.se> | ||
| 2 | |||
| 3 | * xgselect.c: Replace #if defined ... with #ifdef HAVE_GLIB. | ||
| 4 | |||
| 5 | * process.c (wait_reading_process_output): Call xg_select if HAVE_GLIB. | ||
| 6 | |||
| 7 | * Makefile.in (XGSELOBJ): New, xgselect.o if GLib is used, or empty. | ||
| 8 | |||
| 1 | 2013-06-03 Paul Eggert <eggert@cs.ucla.edu> | 9 | 2013-06-03 Paul Eggert <eggert@cs.ucla.edu> |
| 2 | 10 | ||
| 3 | Fix minor problems found by static checking. | 11 | Fix minor problems found by static checking. |
diff --git a/src/Makefile.in b/src/Makefile.in index 0556bae1ecd..0e42f0ee6a0 100644 --- a/src/Makefile.in +++ b/src/Makefile.in | |||
| @@ -205,10 +205,13 @@ LIBXMENU=@LIBXMENU@ | |||
| 205 | 205 | ||
| 206 | ## xmenu.o if HAVE_X_WINDOWS, else empty. | 206 | ## xmenu.o if HAVE_X_WINDOWS, else empty. |
| 207 | XMENU_OBJ=@XMENU_OBJ@ | 207 | XMENU_OBJ=@XMENU_OBJ@ |
| 208 | ## xterm.o xfns.o xselect.o xrdb.o xsmfns.o xsettings.o xgselect.o if | 208 | ## xterm.o xfns.o xselect.o xrdb.o xsmfns.o xsettings.o if |
| 209 | ## HAVE_X_WINDOWS, else empty. | 209 | ## HAVE_X_WINDOWS, else empty. |
| 210 | XOBJ=@XOBJ@ | 210 | XOBJ=@XOBJ@ |
| 211 | 211 | ||
| 212 | # xgselect.o if linking with GLib, else empty | ||
| 213 | XGSELOBJ=@XGSELOBJ@ | ||
| 214 | |||
| 212 | TOOLKIT_LIBW=@TOOLKIT_LIBW@ | 215 | TOOLKIT_LIBW=@TOOLKIT_LIBW@ |
| 213 | 216 | ||
| 214 | ## Only used if HAVE_X11, in LIBX_OTHER. | 217 | ## Only used if HAVE_X11, in LIBX_OTHER. |
| @@ -371,7 +374,7 @@ base_obj = dispnew.o frame.o scroll.o xdisp.o menu.o $(XMENU_OBJ) window.o \ | |||
| 371 | doprnt.o intervals.o textprop.o composite.o xml.o $(NOTIFY_OBJ) \ | 374 | doprnt.o intervals.o textprop.o composite.o xml.o $(NOTIFY_OBJ) \ |
| 372 | profiler.o \ | 375 | profiler.o \ |
| 373 | $(MSDOS_OBJ) $(MSDOS_X_OBJ) $(NS_OBJ) $(CYGWIN_OBJ) $(FONT_OBJ) \ | 376 | $(MSDOS_OBJ) $(MSDOS_X_OBJ) $(NS_OBJ) $(CYGWIN_OBJ) $(FONT_OBJ) \ |
| 374 | $(W32_OBJ) $(WINDOW_SYSTEM_OBJ) | 377 | $(W32_OBJ) $(WINDOW_SYSTEM_OBJ) $(XGSELOBJ) |
| 375 | obj = $(base_obj) $(NS_OBJC_OBJ) | 378 | obj = $(base_obj) $(NS_OBJC_OBJ) |
| 376 | 379 | ||
| 377 | ## Object files used on some machine or other. | 380 | ## Object files used on some machine or other. |
diff --git a/src/process.c b/src/process.c index 8c4199e5eed..33035078df9 100644 --- a/src/process.c +++ b/src/process.c | |||
| @@ -4528,7 +4528,7 @@ wait_reading_process_output (intmax_t time_limit, int nsecs, int read_kbd, | |||
| 4528 | } | 4528 | } |
| 4529 | #endif | 4529 | #endif |
| 4530 | 4530 | ||
| 4531 | #if defined (USE_GTK) || defined (HAVE_GCONF) || defined (HAVE_GSETTINGS) | 4531 | #if defined (HAVE_GLIB) |
| 4532 | nfds = xg_select | 4532 | nfds = xg_select |
| 4533 | #elif defined (HAVE_NS) | 4533 | #elif defined (HAVE_NS) |
| 4534 | nfds = ns_select | 4534 | nfds = ns_select |
diff --git a/src/xgselect.c b/src/xgselect.c index 0b5ad6ae70d..38b9705e976 100644 --- a/src/xgselect.c +++ b/src/xgselect.c | |||
| @@ -21,7 +21,7 @@ along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>. */ | |||
| 21 | 21 | ||
| 22 | #include "xgselect.h" | 22 | #include "xgselect.h" |
| 23 | 23 | ||
| 24 | #if defined (USE_GTK) || defined (HAVE_GCONF) || defined (HAVE_GSETTINGS) | 24 | #ifdef HAVE_GLIB |
| 25 | 25 | ||
| 26 | #include <glib.h> | 26 | #include <glib.h> |
| 27 | #include <errno.h> | 27 | #include <errno.h> |
| @@ -140,4 +140,4 @@ xg_select (int fds_lim, SELECT_TYPE *rfds, SELECT_TYPE *wfds, SELECT_TYPE *efds, | |||
| 140 | 140 | ||
| 141 | return retval; | 141 | return retval; |
| 142 | } | 142 | } |
| 143 | #endif /* USE_GTK || HAVE_GCONF || HAVE_GSETTINGS */ | 143 | #endif /* HAVE_GLIB */ |