The mode argument used to be just a placeholder but now that it means 
something we use it.  All t/lib/vms_stdio.t tests pass after this and 
Nick's core dump prevention patch.

I've also verified that calls to PerlIO_exportFILE are reversed via 
PerlIO_releaseFILE (not PerlIO_importFILE).

--- vms/ext/Stdio/Stdio.xs;-0   Sat Jun  1 12:03:52 2002
+++ vms/ext/Stdio/Stdio.xs      Thu Jul 11 10:42:10 2002
@@ -348,7 +348,7 @@
                break;
            }
            if (fp != Null(FILE*)) {
-             pio_fp = PerlIO_importFILE(fp,0);
+             pio_fp = PerlIO_importFILE(fp,mode);
              fh = newFH(pio_fp,(mode[1] ? '+' : (mode[0] == 'r' ? '<' : (mode[0] == 
'a' ? 'a' : '>'))));
             ST(0) = (fh ? sv_2mortal(fh) : &PL_sv_undef);
            }
@@ -408,7 +408,7 @@
            i = mode & 3;
            if (fd >= 0 &&
               ((fp = fdopen(fd, &("r\000w\000r+"[2*i]))) != Null(FILE*))) {
-             pio_fp = PerlIO_importFILE(fp,0);
+             pio_fp = PerlIO_importFILE(fp,&("r\000w\000r+"[2*i]));
              fh = newFH(pio_fp,"<>++"[i]);
             ST(0) = (fh ? sv_2mortal(fh) : &PL_sv_undef);
            }
[end of patch]
-- 
________________________________________
Craig A. Berry
mailto:[EMAIL PROTECTED]

"... getting out of a sonnet is much more
 difficult than getting in."
                 Brad Leithauser

Reply via email to