Unknown discipline ':utf8' w/ maint perl w/o perlio
[p5sagit/p5-mst-13.2.git] / doio.c
diff --git a/doio.c b/doio.c
index 18d5254..353e2a9 100644 (file)
--- a/doio.c
+++ b/doio.c
@@ -179,7 +179,7 @@ Perl_do_openn(pTHX_ GV *gv, register char *name, I32 len, int as_raw,
                 (ismodifying & (O_CREAT|appendtrunc)))
                  TAINT_PROPER("sysopen");
        }
-       mode[ix++] = '#'; /* Marker to openn to use numeric "sysopen" */
+       mode[ix++] = IoTYPE_NUMERIC; /* Marker to openn to use numeric "sysopen" */
 
 #if defined(USE_64_BIT_RAWIO) && defined(O_LARGEFILE)
        rawmode |= O_LARGEFILE; /* Transparently largefiley. */
@@ -674,8 +674,8 @@ Perl_do_openn(pTHX_ GV *gv, register char *name, I32 len, int as_raw,
        if (IoTYPE(io) == IoTYPE_SOCKET
            || (IoTYPE(io) == IoTYPE_WRONLY && fd >= 0 && S_ISCHR(PL_statbuf.st_mode)) ) {
            char *s = mode;
-           if (*s == 'I' || *s == '#')
-            s++;
+           if (*s == IoTYPE_IMPLICIT || *s == IoTYPE_NUMERIC)
+             s++;
            *s = 'w';
            if (!(IoOFP(io) = PerlIO_openn(aTHX_ type,s,fd,0,0,NULL,0,svp))) {
                PerlIO_close(fp);
@@ -1165,7 +1165,7 @@ fail_discipline:
                if (!end)
                    end = s+len;
 #ifndef PERLIO_LAYERS
-               Perl_croak(aTHX_ "Unknown discipline '%.*s'", end-s, s);
+               Perl_croak(aTHX_ "IO layers (like '%.*s') unavailable", end-s, s);
 #else
                s = end;
 #endif