Special case :crlf and :raw in dummy PerlIO_apply_layers
Nick Ing-Simmons [Sun, 19 Nov 2000 17:05:36 +0000 (17:05 +0000)]
p4raw-id: //depot/perlio@7751

perlio.c

index b386deb..ca05ac5 100644 (file)
--- a/perlio.c
+++ b/perlio.c
 int
 PerlIO_apply_layers(pTHX_ PerlIO *f, const char *mode, const char *names)
 {
+ if (!names || !*names || strEQ(names,":crlf") || strEQ(names,":raw"))
+  {
+   return 0;
+  } 
  Perl_croak(aTHX_ "Cannot apply \"%s\" in non-PerlIO perl",names);
  /* NOTREACHED */
  return -1;