summaryrefslogtreecommitdiff
path: root/ext/curses
diff options
context:
space:
mode:
authormatz <matz@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2005-02-09 15:55:36 +0000
committermatz <matz@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2005-02-09 15:55:36 +0000
commit03d887cadebf801c8b7695b14d1f0216097d77c3 (patch)
tree482bcfb90df8c4b1f0f1539622b60b20a123450a /ext/curses
parent9217b68b4a7be1ecb95eb424c9ae434c4287f2cc (diff)
* struct.c (make_struct): fixed: [ruby-core:04402]
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_8@7933 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'ext/curses')
-rw-r--r--ext/curses/curses.c8
-rw-r--r--ext/curses/extconf.rb2
2 files changed, 5 insertions, 5 deletions
diff --git a/ext/curses/curses.c b/ext/curses/curses.c
index d003f1d..636db31 100644
--- a/ext/curses/curses.c
+++ b/ext/curses/curses.c
@@ -561,7 +561,7 @@ curses_resizeterm(VALUE obj, VALUE lin, VALUE col)
#endif
}
-#ifdef USE_COLOR
+#if defined(USE_COLOR) && defined(HAVE_WCOLOR_SET)
static VALUE
curses_start_color(VALUE obj)
{
@@ -1195,7 +1195,7 @@ window_setscrreg(VALUE obj, VALUE top, VALUE bottom)
#endif
}
-#ifdef USE_COLOR
+#if defined(USE_COLOR) && defined(HAVE_WCOLOR_SET)
static VALUE
window_color_set(VALUE obj, VALUE col)
{
@@ -1485,9 +1485,9 @@ Init_curses()
rb_define_method(cWindow, "box", window_box, -1);
rb_define_method(cWindow, "move", window_move, 2);
rb_define_method(cWindow, "setpos", window_setpos, 2);
-#ifdef USE_COLOR
+#if defined(USE_COLOR) && defined(HAVE_WCOLOR_SET)
rb_define_method(cWindow, "color_set", window_color_set, 1);
-#endif /* USE_COLOR */
+#endif /* USE_COLOR && HAVE_WCOLOR_SET */
rb_define_method(cWindow, "cury", window_cury, 0);
rb_define_method(cWindow, "curx", window_curx, 0);
rb_define_method(cWindow, "maxy", window_maxy, 0);
diff --git a/ext/curses/extconf.rb b/ext/curses/extconf.rb
index 9b319ba..01fe971 100644
--- a/ext/curses/extconf.rb
+++ b/ext/curses/extconf.rb
@@ -19,7 +19,7 @@ elsif have_header(*curses=%w"curses.h") and have_library("curses", "initscr")
end
if make
- for f in %w(beep bkgd bkgdset curs_set deleteln doupdate flash getbkgd getnstr init isendwin keyname keypad resizeterm scrl set setscrreg ungetch wattroff wattron wattrset wbkgd wbkgdset wdeleteln wgetnstr wresize wscrl wsetscrreg def_prog_mode reset_prog_mode timeout wtimeout nodelay init_color)
+ for f in %w(beep bkgd bkgdset curs_set deleteln doupdate flash getbkgd getnstr init isendwin keyname keypad resizeterm scrl set setscrreg ungetch wattroff wattron wattrset wbkgd wbkgdset wdeleteln wgetnstr wresize wscrl wsetscrreg def_prog_mode reset_prog_mode timeout wtimeout nodelay init_color wcolor_set)
have_func(f)
end
flag = "-D_XOPEN_SOURCE_EXTENDED"