ruby-changes:18986
From: kosaki <ko1@a...>
Date: Fri, 4 Mar 2011 22:02:53 +0900 (JST)
Subject: [ruby-changes:18986] Ruby:r31022 (trunk): * io.c (io_cntl): change 'cmd' type to int. ioctl and fcntl need to
kosaki 2011-03-04 22:02:45 +0900 (Fri, 04 Mar 2011) New Revision: 31022 http://svn.ruby-lang.org/cgi-bin/viewvc.cgi?view=rev&revision=31022 Log: * io.c (io_cntl): change 'cmd' type to int. ioctl and fcntl need to be passed int. * io.c (rb_io_ctl): ditto. Modified files: trunk/ChangeLog trunk/io.c Index: ChangeLog =================================================================== --- ChangeLog (revision 31021) +++ ChangeLog (revision 31022) @@ -1,3 +1,9 @@ +Fri Mar 4 22:01:14 2011 KOSAKI Motohiro <kosaki.motohiro@g...> + + * io.c (io_cntl): change 'cmd' type to int. ioctl and fcntl need to + be passed int. + * io.c (rb_io_ctl): ditto. + Fri Mar 4 21:10:40 2011 KOSAKI Motohiro <kosaki.motohiro@g...> * configure.in: save warnflags. the patch is created by Eric Wong. Index: io.c =================================================================== --- io.c (revision 31021) +++ io.c (revision 31022) @@ -7650,7 +7650,7 @@ } static int -io_cntl(int fd, unsigned long cmd, long narg, int io_p) +io_cntl(int fd, int cmd, long narg, int io_p) { int retval; @@ -7658,7 +7658,7 @@ # if defined(__CYGWIN__) retval = io_p?ioctl(fd, cmd, (void*)narg):fcntl(fd, cmd, narg); # else - retval = io_p?ioctl(fd, cmd, narg):fcntl(fd, (int)cmd, narg); + retval = io_p?ioctl(fd, cmd, narg):fcntl(fd, cmd, narg); # endif # if defined(F_DUPFD) if (!io_p && retval != -1 && cmd == F_DUPFD) { @@ -7677,7 +7677,7 @@ static VALUE rb_io_ctl(VALUE io, VALUE req, VALUE arg, int io_p) { - unsigned long cmd = NUM2ULONG(req); + int cmd = NUM2INT(req); rb_io_t *fptr; long len = 0; long narg = 0; -- ML: ruby-changes@q... Info: http://www.atdot.net/~ko1/quickml/