diff --git a/src/androidterm.c b/src/androidterm.c index 4561f2d1df3..48627b08a7e 100644 --- a/src/androidterm.c +++ b/src/androidterm.c @@ -35,6 +35,8 @@ along with GNU Emacs. If not, see . */ #include "pdumper.h" #include "keymap.h" +#include "igc.h" + /* This is a chain of structures for all the X displays currently in use. */ @@ -6613,14 +6615,19 @@ android_create_terminal (struct android_display_info *dpyinfo) /* Initialize the Android terminal interface. The display connection has already been set up by the system at this point. */ +static Lisp_Object color_map; void android_term_init (void) { struct terminal *terminal; struct android_display_info *dpyinfo; - Lisp_Object color_file, color_map; + Lisp_Object color_file; +#ifdef HAVE_MPS + dpyinfo = igc_xzalloc_ambig (sizeof *dpyinfo); +#else dpyinfo = xzalloc (sizeof *dpyinfo); +#endif terminal = android_create_terminal (dpyinfo); terminal->kboard = allocate_kboard (Qandroid); terminal->kboard->reference_count++; @@ -6642,6 +6649,7 @@ android_term_init (void) fatal ("Could not read %s.\n", SDATA (color_file)); dpyinfo->color_map = color_map; + staticpro (&color_map); #ifndef ANDROID_STUBIFY dpyinfo->resx = android_pixel_density_x; @@ -6926,9 +6934,11 @@ for instance, `early-init.el', or they will be of no effect. */); DEFSYM (Qreturn, "return"); } +#ifndef HAVE_MPS void mark_androidterm (void) { if (x_display_list) mark_object (x_display_list->color_map); } +#endif diff --git a/src/sfntfont.c b/src/sfntfont.c index cb94a13642e..d969ed112d3 100644 --- a/src/sfntfont.c +++ b/src/sfntfont.c @@ -41,6 +41,8 @@ along with GNU Emacs. If not, see . */ /* For FRAME_FONT. */ #include TERM_HEADER +#include "igc.h" + /* Generic font driver for sfnt-based fonts (currently TrueType, but it would be easy to add CFF support in the future with a PostScript renderer.) @@ -989,7 +991,11 @@ sfnt_enum_font_1 (int fd, const char *file, char buffer[5]; /* Create the font desc and copy in the file name. */ +#ifdef HAVE_MPS + desc = igc_xzalloc_ambig (sizeof *desc + strlen (file) + 1); +#else desc = xzalloc (sizeof *desc + strlen (file) + 1); +#endif desc->path = (char *) (desc + 1); memcpy (desc->path, file, strlen (file) + 1); desc->offset = offset; @@ -4196,6 +4202,7 @@ are slow. */); sfnt_raster_glyphs_exactly = true; } +#ifndef HAVE_MPS void mark_sfntfont (void) { @@ -4214,6 +4221,7 @@ mark_sfntfont (void) mark_object (desc->designer); } } +#endif void init_sfntfont (void)