Skip to content

Commit

Permalink
perlio.c: Add comments
Browse files Browse the repository at this point in the history
The code is using '#ifdef EBCDIC' when it has nothing to do with EBCDIC;
but is a proxy for how things work on IBM boxes that use EBCDIC.  Note
this in the comments.
  • Loading branch information
khwilliamson committed Jun 17, 2021
1 parent 8817090 commit 8e4db03
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions perlio.c
Expand Up @@ -1991,7 +1991,9 @@ PerlIOBase_pushed(pTHX_ PerlIO *f, const char *mode, SV *arg, PerlIO_funcs *tab)
SETERRNO(EINVAL, LIB_INVARG);
return -1;
}
#ifdef EBCDIC
#ifdef EBCDIC /* Probably should refer to the affected OS's; the
character set is just a proxy for what these platforms have
in common */
{
/* The mode variable contains one positional parameter followed by
* optional keyword parameters. The positional parameters must be
Expand Down Expand Up @@ -2943,7 +2945,7 @@ PerlIO_importFILE(FILE *stdio, const char *mode)
{
dTHX;
PerlIO *f = NULL;
#ifdef EBCDIC
#ifdef EBCDIC /* Again, the character set is just a proxy for IBM-ese */
int rc;
char filename[FILENAME_MAX];
fldata_t fileinfo;
Expand Down Expand Up @@ -3000,7 +3002,7 @@ PerlIO_importFILE(FILE *stdio, const char *mode)
PerlIOUnix_refcnt_inc(fd0);
setfd_cloexec_or_inhexec_by_sysfdness(fd0);
}
#ifdef EBCDIC
#ifdef EBCDIC /* Again, the character set is just a proxy for IBM-ese */
else{
rc = fldata(stdio,filename,&fileinfo);
if(rc != 0){
Expand Down

0 comments on commit 8e4db03

Please sign in to comment.