From 0c5683728fffef2e3a74c72f1ff9e7964b35e6ec Mon Sep 17 00:00:00 2001 From: Helmut Eller Date: Tue, 23 Apr 2024 08:23:04 +0200 Subject: [PATCH] Allow compilation with X. * src/igc: Turn the error about text conversion into a warning. (Figc_roots): Initialize the result. * src/gtkutil.c (xg_mark_data) * src/xselect.c (mark_xselect) * src/xterm.c (mark_xterm): Don't define marking functions when compiling with MPS. --- src/gtkutil.c | 2 ++ src/igc.c | 5 +++-- src/xselect.c | 2 ++ src/xterm.c | 2 ++ 4 files changed, 9 insertions(+), 2 deletions(-) diff --git a/src/gtkutil.c b/src/gtkutil.c index c067f7b53ac..a01b8a41d5d 100644 --- a/src/gtkutil.c +++ b/src/gtkutil.c @@ -3025,6 +3025,7 @@ unref_cl_data (xg_menu_cb_data *cl_data) /* Function that marks all lisp data during GC. */ +#ifndef HAVE_MPS void xg_mark_data (void) { @@ -3069,6 +3070,7 @@ xg_mark_data (void) } #endif } +#endif /* Callback called when a menu item is destroyed. Used to free data. W is the widget that is being destroyed (not used). diff --git a/src/igc.c b/src/igc.c index 680f1a5ccb6..8c250eb57e6 100644 --- a/src/igc.c +++ b/src/igc.c @@ -58,7 +58,8 @@ # error "HAVE_PDUMPER required" #endif #ifdef HAVE_TEXT_CONVERSION -# error "HAVE_TEXT_CONVERSION not supported" +//# error "HAVE_TEXT_CONVERSION not supported" +# warning "HAVE_TEXT_CONVERSION not supported" #endif /* Note: Emacs will call allocation functions whlle aborting. This leads @@ -2647,7 +2648,7 @@ DEFUN ("igc-roots", Figc_roots, Sigc_roots, 0, 0, 0, doc : /* */) (void) { struct igc *gc = global_igc; - Lisp_Object roots; + Lisp_Object roots = Qnil; for (igc_root_list *r = gc->roots; r; r = r->next) { diff --git a/src/xselect.c b/src/xselect.c index fd0f06eeed9..b93c2423f0e 100644 --- a/src/xselect.c +++ b/src/xselect.c @@ -3488,6 +3488,7 @@ syms_of_xselect_for_pdumper (void) property_change_reply = Fcons (Qnil, Qnil); } +#ifndef HAVE_MPS void mark_xselect (void) { @@ -3518,3 +3519,4 @@ mark_xselect (void) mark_object (cs->string); } } +#endif diff --git a/src/xterm.c b/src/xterm.c index e08ffd15b18..36f83a33244 100644 --- a/src/xterm.c +++ b/src/xterm.c @@ -32212,6 +32212,7 @@ init_xterm (void) #endif } +#ifndef HAVE_MPS void mark_xterm (void) { @@ -32263,6 +32264,7 @@ mark_xterm (void) } #endif } +#endif /* Error handling functions for Lisp functions that expose X protocol requests. They are mostly like `x_catch_errors' and friends, but -- 2.39.2