Change 20951 by [EMAIL PROTECTED] on 2003/08/30 06:51:09
Integrate:
[ 20950]
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/maint-5.8/perl/perlio.c#32 integrate
Differences ...
==== //depot/maint-5.8/perl/perlio.c#32 (text) ====
Index: perl/perlio.c
--- perl/perlio.c#31~20934~ Fri Aug 29 08:12:24 2003
+++ perl/perlio.c Fri Aug 29 23:51:09 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.