peek fail is showing a real problem (multiple crlf layers
are getting pushed.)
p4raw-id: //depot/perlio@7843
}
}
}
- else if (O_BINARY != O_TEXT) {
+ else if (O_BINARY != O_TEXT && IoTYPE(io) != IoTYPE_STD) {
type = ":crlf";
}
}
PerlIO_get_base(f);
if (!ptr)
{
- ptr = ((c->nl) ? (c->nl+1) : b->end) - cnt;
+ if (c->nl)
+ ptr = c->nl+1;
+ else
+ {
+ ptr = b->end;
+ if (ptr > b->buf && ptr[-1] == 0xd)
+ ptr--;
+ }
+ ptr -= cnt;
}
else
{
- if (ptr != (((c->nl) ? (c->nl+1) : b->end) - cnt))
- abort();
+ /* Test code - delete when it works ... */
+ STDCHAR *chk;
+ if (c->nl)
+ chk = c->nl+1;
+ else
+ {
+ chk = b->end;
+ if (chk > b->buf && chk[-1] == 0xd)
+ chk--;
+ }
+ chk -= cnt;
+
+ if (ptr != chk)
+ {
+ dTHX;
+ Perl_croak(aTHX_ "ptr wrong %p != %p nl=%p e=%p for %d",
+ ptr, chk, c->nl, b->end, cnt);
+ }
}
if (c->nl)
{
# Options
#
-INCLUDES = -I$(COREDIR) -I.\include -I. -I..
+INCLUDES = -I.\include -I. -I.. -I$(COREDIR)
DEFINES = -DWIN32 $(CRYPT_FLAG)
LOCDEFS = -DPERLDLL -DPERL_CORE
SUBSYS = console