same_x_server (const char *name1, const char *name2)
{
bool seen_colon = false;
- const char *system_name = SSDATA (Vsystem_name);
- ptrdiff_t system_name_length = SBYTES (Vsystem_name);
+ Lisp_Object sysname = Fsystem_name ();
+ const char *system_name = SSDATA (sysname);
+ ptrdiff_t system_name_length = SBYTES (sysname);
ptrdiff_t length_until_period = 0;
while (system_name[length_until_period] != 0
#endif
lim = min (PTRDIFF_MAX, SIZE_MAX) - sizeof "@";
- if (lim - SBYTES (Vinvocation_name) < SBYTES (Vsystem_name))
+ Lisp_Object system_name = Fsystem_name ();
+ if (lim - SBYTES (Vinvocation_name) < SBYTES (system_name))
memory_full (SIZE_MAX);
dpyinfo->x_id = ++x_display_id;
dpyinfo->x_id_name = xmalloc (SBYTES (Vinvocation_name)
- + SBYTES (Vsystem_name) + 2);
+ + SBYTES (system_name) + 2);
char *nametail = lispstpcpy (dpyinfo->x_id_name, Vinvocation_name);
*nametail++ = '@';
- lispstpcpy (nametail, Vsystem_name);
+ lispstpcpy (nametail, system_name);
/* Figure out which modifier bits mean what. */
x_find_modifier_meanings (dpyinfo);