From 066a4c6b91d04c1b77c670c1dbd63ea036e3e411 Mon Sep 17 00:00:00 2001 From: Stefan Monnier Date: Fri, 9 Apr 2004 16:15:08 +0000 Subject: [PATCH] (face_color_supported_p): Fix compilation without X11. --- src/xfaces.c | 24 ++++++++++++++---------- 1 file changed, 14 insertions(+), 10 deletions(-) diff --git a/src/xfaces.c b/src/xfaces.c index d8034c1d5d7..b96dd18ec4d 100644 --- a/src/xfaces.c +++ b/src/xfaces.c @@ -1,5 +1,5 @@ /* xfaces.c -- "Face" primitives. - Copyright (C) 1993, 1994, 1998, 1999, 2000, 2001, 2002, 2003 + Copyright (C) 1993, 1994, 1998, 1999, 2000, 2001, 2002, 2003, 2004 Free Software Foundation. This file is part of GNU Emacs. @@ -1505,15 +1505,19 @@ face_color_supported_p (f, color_name, background_p) XColor not_used; XSETFRAME (frame, f); - return (FRAME_WINDOW_P (f) - ? (!NILP (Fxw_display_color_p (frame)) - || xstricmp (color_name, "black") == 0 - || xstricmp (color_name, "white") == 0 - || (background_p - && face_color_gray_p (f, color_name)) - || (!NILP (Fx_display_grayscale_p (frame)) - && face_color_gray_p (f, color_name))) - : tty_defined_color (f, color_name, ¬_used, 0)); + return +#ifdef HAVE_X_WINDOWS + FRAME_WINDOW_P (f) + ? (!NILP (Fxw_display_color_p (frame)) + || xstricmp (color_name, "black") == 0 + || xstricmp (color_name, "white") == 0 + || (background_p + && face_color_gray_p (f, color_name)) + || (!NILP (Fx_display_grayscale_p (frame)) + && face_color_gray_p (f, color_name))) + : +#endif + tty_defined_color (f, color_name, ¬_used, 0); } -- 2.39.5