summaryrefslogtreecommitdiff
path: root/doio.c
diff options
context:
space:
mode:
authorJarkko Hietaniemi <jhi@iki.fi>2003-08-30 18:47:02 +0000
committerJarkko Hietaniemi <jhi@iki.fi>2003-08-30 18:47:02 +0000
commit3b6c1aba8481917ec21730e293e339a1c561e02c (patch)
tree644bf6495a2288a41254929c3f9f68c9d0210a85 /doio.c
parentc2fcde81f9cb1a632422e27a9e967bc087d75ae7 (diff)
downloadperl-3b6c1aba8481917ec21730e293e339a1c561e02c.tar.gz
Fewer naked char constants.
p4raw-id: //depot/perl@20957
Diffstat (limited to 'doio.c')
-rw-r--r--doio.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/doio.c b/doio.c
index 18d5254459..da9cd80c39 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);