Change 20950 by [EMAIL PROTECTED] on 2003/08/30 06:49:31

        Something went wrong in change #20929;
        linux 2.4.18-bf2.4 didn't like it:
        http://www.xray.mpe.mpg.de/mailing-lists/perl5-porters/2003-08/msg01992.html
        and similar failure pattern also seen in Solaris 8.

Affected files ...

... //depot/perl/perlio.c#236 edit

Differences ...

==== //depot/perl/perlio.c#236 (text) ====
Index: perl/perlio.c
--- perl/perlio.c#235~20929~    Fri Aug 29 05:55:12 2003
+++ perl/perlio.c       Fri Aug 29 23:49:31 2003
@@ -2609,7 +2609,7 @@
     while (*mode) {
        *tmode++ = *mode++;
     }
-#if defined(PERLIO_USING_CRLF) || defined(__CYGWIN__)
+#ifdef PERLIO_USING_CRLF
     *tmode++ = 'b';
 #endif
     *tmode = '\0';
@@ -2710,28 +2710,25 @@
                fd = PerlLIO_open3(path, imode, perm);
            }
            else {
-                /* Append the 'b' - more correct for CRLF platforms
-                 * and Cygwin and should be harmless (since it's a
-                 * no-op) elsewhere. */
-                mode = PerlIOStdio_mode(mode, tmode);
-                {
-                     FILE *stdio = PerlSIO_fopen(path, mode);
-                     if (stdio) {
-                          PerlIOStdio *s;
-                          if (!f) {
-                               f = PerlIO_allocate(aTHX);
-                          }
-                          if ((f = PerlIO_push(aTHX_ f, self,
-                                               mode, PerlIOArg))) {
-                               s = PerlIOSelf(f, PerlIOStdio);
-                               s->stdio = stdio;
-                               PerlIOUnix_refcnt_inc(fileno(s->stdio));
-                         }
-                         return f;
-                     }
-                }
+               FILE *stdio = PerlSIO_fopen(path, mode);
+               if (stdio) {
+                   PerlIOStdio *s;
+                   if (!f) {
+                       f = PerlIO_allocate(aTHX);
+                   }
+                   if ((f = PerlIO_push(aTHX_ f, self,
+                                   (mode = PerlIOStdio_mode(mode, tmode)),
+                                   PerlIOArg))) {
+                       s = PerlIOSelf(f, PerlIOStdio);
+                       s->stdio = stdio;
+                       PerlIOUnix_refcnt_inc(fileno(s->stdio));
+                   }
+                   return f;
+               }
+               else {
+                   return NULL;
+               }
            }
-           return NULL;
        }
        if (fd >= 0) {
            FILE *stdio = NULL;
End of Patch.

Reply via email to