永井@知能.九工大です. ruby_1_8 branch のコンパイルに失敗します. ------------------------------------------------------ $ make gcc -g -O2 -I. -I. -c io.c io.c: In function `pipe_open': io.c:2650: parse error before `int' io.c:2653: `pr' undeclared (first use in this function) io.c:2653: (Each undeclared identifier is reported only once io.c:2653: for each function it appears in.) io.c:2654: `pw' undeclared (first use in this function) io.c:2657: `doexec' undeclared (first use in this function) io.c:2665: `pid' undeclared (first use in this function) io.c:2667: warning: unreachable code at beginning of switch statement make: *** [io.o] エラー 1 $ gcc -v Reading specs from /usr/lib/gcc-lib/i386-redhat-linux/2.95.3/specs gcc version 2.95.3 20010315 (release) ------------------------------------------------------ こう↓でしょうか? Index: io.c =================================================================== RCS file: /var/cvs/src/ruby/io.c,v retrieving revision 1.246.2.37 diff -u -r1.246.2.37 io.c --- io.c 1 Nov 2004 23:53:48 -0000 1.246.2.37 +++ io.c 3 Nov 2004 02:39:08 -0000 @@ -2592,9 +2592,11 @@ int modef = rb_io_mode_flags(mode); OpenFile *fptr; - if (!pname) pname = StringValuePtr(pstr); #if defined(DJGPP) || defined(__human68k__) || defined(__VMS) - FILE *f = popen(pname, mode); + FILE *f; + + if (!pname) pname = StringValuePtr(pstr); + f = popen(pname, mode); if (!f) rb_sys_fail(pname); else { @@ -2618,6 +2620,8 @@ int pid; FILE *fpr, *fpw; + if (!pname) pname = StringValuePtr(pstr); + retry: pid = pipe_exec(pname, rb_io_mode_modenum(mode), &fpr, &fpw); if (pid == -1) { /* exec failed */ @@ -2649,6 +2653,8 @@ #else int pid, pr[2], pw[2]; volatile int doexec; + + if (!pname) pname = StringValuePtr(pstr); if (((modef & FMODE_READABLE) && pipe(pr) == -1) || ((modef & FMODE_WRITABLE) && pipe(pw) == -1)) -- 永井 秀利 (九工大 知能情報) nagai / ai.kyutech.ac.jp