From: "NARUSE, Yui" Date: 2005-07-18T09:19:22+09:00 Subject: [ruby-dev:26562] compile error of ext/io/wait/wait.c 成瀬です。 MinGW32環境にてext/io/wait/wait.cのコンパイルに失敗します。 具体的には、 $ uname -a MINGW32_NT-5.1 SHADOW 1.0.10(0.46/3/2) 2004-03-15 07:17 i686 unknown にて下記のエラーが出ます。 パッチによってコンパイルは通るようになりましたが、 59行目と125行目のwarningは出るままですし、 rb_w32_is_socket()の引数がどうあるべきかもわからないので、 確認お願いします。 compiling io/wait make[1]: Entering directory `/c/home/naruse/src/ruby/ext/io/wait' gcc -g -O2 -I. -I../../.. -I../../../. -I../../.././ext/io/wait -DHAVE_RB_W32_IOCTLSOCKET -DHAVE_RB_W32_IS_SOCKET -c wait.c wait.c: In function `io_ready_p': wait.c:58: error: structure has no member named `fptr' wait.c:59: warning: passing arg 3 of `rb_w32_ioctlsocket' from incompatible pointer type wait.c: In function `io_wait': wait.c:112: error: structure has no member named `fptr' wait.c:120: error: `rd' undeclared (first use in this function) wait.c:120: error: (Each undeclared identifier is reported only once wait.c:120: error: for each function it appears in.) wait.c:120: error: `tp' undeclared (first use in this function) wait.c:122: error: syntax error before "if" wait.c:125: warning: passing arg 3 of `rb_w32_ioctlsocket' from incompatible pointer type make[1]: *** [wait.o] Error 1 make[1]: Leaving directory `/c/home/naruse/src/ruby/ext/io/wait' make: *** [all] Error 1 Index: ext/io/wait/wait.c =================================================================== RCS file: /src/ruby/ext/io/wait/wait.c,v retrieving revision 1.6 diff -u -r1.6 wait.c --- ext/io/wait/wait.c 17 Jul 2005 04:47:23 -0000 1.6 +++ ext/io/wait/wait.c 18 Jul 2005 00:15:14 -0000 @@ -22,7 +22,7 @@ #endif #ifdef HAVE_RB_W32_IS_SOCKET -#define FIONREAD_POSSIBLE_P(fd) rb_w32_is_socket(fptr->fd) +#define FIONREAD_POSSIBLE_P(fd) rb_w32_is_socket(fd) #else #define FIONREAD_POSSIBLE_P(fd) Qtrue #endif @@ -117,7 +117,7 @@ n = (int)rb_ensure(wait_readable, (VALUE)&arg, (VALUE (*)_((VALUE)))rb_fd_term, (VALUE)&arg.fds); #else - n = rb_thread_select(fd + 1, rb_fd_ptr(&rd), NULL, NULL, tp) + n = rb_thread_select(fd + 1, rb_fd_ptr(&arg.fds), NULL, NULL, arg.timeout); #endif if (n < 0) rb_sys_fail(0); -- NARUSE, Yui DBDB A476 FDBD 9450 02CD 0EFC BCE3 C388 472E C1EA