From: Nick Ing-Simmons <nik@tiuk.ti.com>
Date: Sat, 7 Apr 2001 08:36:26 +0000 (+0000)
Subject: Allow PerlIOBase_pushed to ignore prefix on mode (e.g. sysopen's "#r")
X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=c5af4229019b04c7fa4be99300f8d9883c0bdf73;p=p5sagit%2Fp5-mst-13.2.git

Allow PerlIOBase_pushed to ignore prefix on mode (e.g. sysopen's "#r")
Else it complains and so crlf layer (say) does not get pushed.

p4raw-id: //depot/perlio@9601
---

diff --git a/perlio.c b/perlio.c
index 797b816..c82da9b 100644
--- a/perlio.c
+++ b/perlio.c
@@ -1470,6 +1470,8 @@ PerlIOBase_pushed(PerlIO *f, const char *mode, SV *arg)
   l->flags |= PERLIO_F_FASTGETS;
  if (mode)
   {
+   if (*mode == '#' || *mode == 'I')
+    mode++;
    switch (*mode++)
     {
      case 'r':