Change 19910 by [EMAIL PROTECTED] on 2003/07/01 11:18:27
Integrate from perlio:
[ 19909]
binmode() should affect IoOFP() as well as IoIFP() if it is
distinct (e.g. sockets).
Affected files ...
... //depot/perl/pp_sys.c#346 integrate
Differences ...
==== //depot/perl/pp_sys.c#346 (text) ====
Index: perl/pp_sys.c
--- perl/pp_sys.c#345~19836~ Sun Jun 22 08:55:13 2003
+++ perl/pp_sys.c Tue Jul 1 04:18:27 2003
@@ -742,6 +742,14 @@
PUTBACK;
if (PerlIO_binmode(aTHX_ fp,IoTYPE(io),mode_from_discipline(discp),
(discp) ? SvPV_nolen(discp) : Nullch)) {
+ if (IoOFP(io) && IoOFP(io) != IoIFP(io)) {
+ if (!PerlIO_binmode(aTHX_ IoOFP(io),IoTYPE(io),
+ mode_from_discipline(discp),
+ (discp) ? SvPV_nolen(discp) : Nullch)) {
+ SPAGAIN;
+ RETPUSHUNDEF;
+ }
+ }
SPAGAIN;
RETPUSHYES;
}
End of Patch.