From 9921b78a4d0135347917d9cd9cc9f2df8dcc2a3d Mon Sep 17 00:00:00 2001 From: YAMAMOTO Mitsuharu Date: Sat, 27 Apr 2019 15:27:36 +0900 Subject: [PATCH] Fix --with-x-toolkit=no build breakage * oldXMenu/Create.c (XMenuCreate): Add const modifier to variable def_val. * oldXMenu/Create.c: * src/frame.h: Add const modifier to return type of x_get_resource_string. * src/frame.c (x_get_resource_string): Exempt x_get_string_resource from renaming generic x_* identifiers. --- oldXMenu/Create.c | 4 ++-- src/frame.c | 4 ++-- src/frame.h | 2 +- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/oldXMenu/Create.c b/oldXMenu/Create.c index 2ea84e921a1..58d17826623 100644 --- a/oldXMenu/Create.c +++ b/oldXMenu/Create.c @@ -87,7 +87,7 @@ along with this program. If not, see . */ #define XASSOC_TABLE_SIZE 64 -char *x_get_resource_string (char const *, char const *); +const char *x_get_resource_string (char const *, char const *); @@ -107,7 +107,7 @@ XMenuCreate(Display *display, Window parent, register char const *def_env) /* Window ID of the menu's parent window. */ /* X Defaults program environment name. */ { - register char *def_val; /* X Default value temp variable. */ + register const char *def_val; /* X Default value temp variable. */ register XMenu *menu; /* Pointer to the new menu. */ XMStyle menu_style; /* Menu display style. */ diff --git a/src/frame.c b/src/frame.c index 7f951b4f73b..03bbbfb4da2 100644 --- a/src/frame.c +++ b/src/frame.c @@ -5045,8 +5045,8 @@ x_get_resource_string (const char *attribute, const char *class) esprintf (name_key, "%s.%s", SSDATA (Vinvocation_name), attribute); sprintf (class_key, "%s.%s", EMACS_CLASS, class); - result = gui_display_get_resource (FRAME_DISPLAY_INFO (sf), - name_key, class_key); + result = x_get_string_resource (&FRAME_DISPLAY_INFO (sf)->rdb, + name_key, class_key); SAFE_FREE (); return result; } diff --git a/src/frame.h b/src/frame.h index 70597737d49..b8aed823afb 100644 --- a/src/frame.h +++ b/src/frame.h @@ -1588,7 +1588,7 @@ extern enum internal_border_part frame_internal_border_part (struct frame *f, in #if defined HAVE_X_WINDOWS extern void x_wm_set_icon_position (struct frame *, int, int); #if !defined USE_X_TOOLKIT -extern char *x_get_resource_string (const char *, const char *); +extern const char *x_get_resource_string (const char *, const char *); #endif extern void x_sync (struct frame *); #endif /* HAVE_X_WINDOWS */ -- 2.39.2