X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=blobdiff_plain;f=doio.c;h=353e2a9182c1e2529ad79961d00e65bcbb72c8b4;hb=363c40c40eaf5d0cfd92f460a3f838c41f9756ad;hp=18d52544597f3d0d8518df4876c65b69b8541a2d;hpb=b35112e751727d4207068fd54bf0c9d77ad0ba97;p=p5sagit%2Fp5-mst-13.2.git diff --git a/doio.c b/doio.c index 18d5254..353e2a9 100644 --- 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