@@ -2783,7 +2783,7 @@ window_setscrreg(VALUE obj, VALUE top, VALUE bottom)
27832783#endif
27842784}
27852785
2786- #if defined(USE_COLOR ) && (defined(HAVE_WCOLOR_SET ) || defined(HAVE_WATTR_SET ))
2786+ #if defined(USE_COLOR ) && (( defined(HAVE_WATTR_SET ) && defined( HAVE_WATTR_GET )) || defined(HAVE_WCOLOR_SET ))
27872787/*
27882788 * Document-method: Curses::Window.color_set
27892789 * call-seq: color_set(col)
@@ -2810,13 +2810,11 @@ window_color_set(VALUE obj, VALUE col)
28102810 return Qfalse ;
28112811 return (wattr_set (winp -> window , attrs , NUM2INT (col ), NULL ) == OK ) ? Qtrue : Qfalse ;
28122812 }
2813- #elif defined(HAVE_WATTR_SET )
2814- return (wattr_set (winp -> window , 0 , NUM2INT (col ), NULL ) == OK ) ? Qtrue : Qfalse ;
28152813#else
28162814 return (wcolor_set (winp -> window , NUM2INT (col ), NULL ) == OK ) ? Qtrue : Qfalse ;
28172815#endif
28182816}
2819- #endif /* defined(USE_COLOR) && (defined(HAVE_WCOLOR_SET) || defined(HAVE_WATTR_SET )) */
2817+ #endif /* defined(USE_COLOR) && (( defined(HAVE_WATTR_SET) && defined(HAVE_WATTR_GET)) || defined(HAVE_WCOLOR_SET )) */
28202818
28212819/*
28222820 * Document-method: Curses::Window.scroll
@@ -5344,9 +5342,9 @@ Init_curses(void)
53445342 rb_define_method (cWindow , "move" , window_move , 2 );
53455343 rb_define_method (cWindow , "move_relative" , window_move_relative , 2 );
53465344 rb_define_method (cWindow , "setpos" , window_setpos , 2 );
5347- #if defined(USE_COLOR ) && (defined(HAVE_WCOLOR_SET ) || defined(HAVE_WATTR_SET ))
5345+ #if defined(USE_COLOR ) && (( defined(HAVE_WATTR_SET ) && defined( HAVE_WATTR_GET )) || defined(HAVE_WCOLOR_SET ))
53485346 rb_define_method (cWindow , "color_set" , window_color_set , 1 );
5349- #endif /* USE_COLOR && (HAVE_WCOLOR_SET || HAVE_WATTR_SET) */
5347+ #endif
53505348 rb_define_method (cWindow , "cury" , window_cury , 0 );
53515349 rb_define_method (cWindow , "curx" , window_curx , 0 );
53525350 rb_define_method (cWindow , "maxy" , window_maxy , 0 );
0 commit comments