From: nobu.nokada@... Date: 2003-08-12T11:39:50+09:00 Subject: Re: ruby 1.8.0 preview5 Hi, At Wed, 30 Jul 2003 11:19:54 +0900, the_rev_dharma_roadkill wrote: > A warning due to _XOPEN_SOURCE_EXTENDED not set in curses.h, probably > not very important and dangerous to fix: > cc: Warning: curses.c, line 434: In this statement, "keyname(...)" of > type "int" > , is being converted to "pointer to const char". (cvtdiftypes) > name = keyname(NUM2INT(c)); > --^ Can you avoid the warnings with this patch? Index: ext/curses/curses.c =================================================================== RCS file: /cvs/ruby/src/ruby/ext/curses/curses.c,v retrieving revision 1.19 diff -u -2 -p -r1.19 curses.c --- ext/curses/curses.c 5 Jun 2003 09:36:30 -0000 1.19 +++ ext/curses/curses.c 11 Aug 2003 08:39:00 -0000 @@ -16,4 +16,8 @@ #include "ruby.h" +#include +#include "rubyio.h" + +#define _XOPEN_SOURCE_EXTENDED 1 #if defined(HAVE_NCURSES_H) # include @@ -48,7 +52,4 @@ #endif -#include -#include "rubyio.h" - static VALUE mCurses; static VALUE mKey; @@ -511,8 +512,8 @@ curses_bkgd(VALUE obj, VALUE ch) static VALUE -curses_resizeterm(VALUE obj, VALUE lines, VALUE columns) +curses_resizeterm(VALUE obj, VALUE lin, VALUE col) { #if defined(HAVE_RESIZETERM) - return (resizeterm(NUM2INT(lines),NUM2INT(columns)) == OK) ? Qtrue : Qfalse; + return (resizeterm(NUM2INT(lin),NUM2INT(col)) == OK) ? Qtrue : Qfalse; #else return Qnil; @@ -1200,5 +1201,5 @@ window_getbkgd(VALUE obj) static VALUE -window_resize(VALUE obj, VALUE lines, VALUE columns) +window_resize(VALUE obj, VALUE lin, VALUE col) { #if defined(HAVE_WRESIZE) @@ -1206,5 +1207,5 @@ window_resize(VALUE obj, VALUE lines, VA GetWINDOW(obj,winp); - return wresize(winp->window, NUM2INT(lines), NUM2INT(columns)) == OK ? Qtrue : Qfalse; + return wresize(winp->window, NUM2INT(lin), NUM2INT(col)) == OK ? Qtrue : Qfalse; #else return Qnil; -- Nobu Nakada