[#3726] Fixnum#clone and Float#clone raise different exceptions — "David A. Black" <dblack@...>

Hi --

15 messages 2004/11/12
[#3749] Re: Fixnum#clone and Float#clone raise different exceptions — "David A. Black" <dblack@...> 2004/11/16

Hi --

[#3751] Re: Fixnum#clone and Float#clone raise different exceptions — Yukihiro Matsumoto <matz@...> 2004/11/16

Hi,

[#3752] Re: Fixnum#clone and Float#clone raise different exceptions — "David A. Black" <dblack@...> 2004/11/16

Hi --

[#3785] The latest 1.8.2 cvs prints parse error when starting extension compiling — Yukihiro Matsumoto <matz@...>

Hi,

13 messages 2004/11/23
[#3787] Re: The latest 1.8.2 cvs prints parse error when starting extension compiling — Johan Holmberg <holmberg@...> 2004/11/23

[ ruby-Bugs-1015 ] latest ruby cvs will not compile if old c compiler used.

From: noreply@...
Date: 2004-11-02 11:08:02 UTC
List: ruby-core #3681
Bugs item #1015, was opened at 2004-11-02 06:08
You can respond by visiting: 
http://rubyforge.org/tracker/?func=detail&atid=1698&aid=1015&group_id=426

Category: None
Group: None
Status: Open
Resolution: None
Priority: 5
Submitted By: Nobody (None)
Assigned to: Nobody (None)
Summary: latest ruby cvs will not compile if old c compiler used.

Initial Comment:
This is because you cannot introduce variables in mid of code.
Here is one way to fix it:


RCS file: /src/ruby/io.c,v
retrieving revision 1.246.2.37
diff -u -s -r1.246.2.37 io.c
--- io.c        1 Nov 2004 23:53:48 -0000       1.246.2.37
+++ io.c        2 Nov 2004 11:06:19 -0000
@@ -2591,8 +2591,14 @@
 {
     int modef = rb_io_mode_flags(mode);
     OpenFile *fptr;
-
-    if (!pname) pname = StringValuePtr(pstr);
+#ifdef _WIN32
+  int pid;
+    FILE *fpr, *fpw;
+#else
+ int pid, pr[2], pw[2];
+  volatile int doexec;
+#endif
+   if (!pname) pname = StringValuePtr(pstr);
 #if defined(DJGPP) || defined(__human68k__) || defined(__VMS)
     FILE *f = popen(pname, mode);
     
@@ -2615,9 +2621,6 @@
     }
 #else
 #ifdef _WIN32
-    int pid;
-    FILE *fpr, *fpw;
-
 retry:
     pid = pipe_exec(pname, rb_io_mode_modenum(mode), &fpr, &fpw);
     if (pid == -1) {           /* exec failed */
@@ -2647,9 +2650,6 @@
        return (VALUE)port;
     }
 #else
-    int pid, pr[2], pw[2];
-    volatile int doexec;
-
     if (((modef & FMODE_READABLE) && pipe(pr) == -1) ||
        ((modef & FMODE_WRITABLE) && pipe(pw) == -1))
        rb_sys_fail(pname);


----------------------------------------------------------------------

You can respond by visiting: 
http://rubyforge.org/tracker/?func=detail&atid=1698&aid=1015&group_id=426

In This Thread

Prev Next