diff options
author | Ilya Zakharevich <ilya@math.berkeley.edu> | 2002-04-01 19:37:08 -0500 |
---|---|---|
committer | Jarkko Hietaniemi <jhi@iki.fi> | 2002-04-02 15:05:58 +0000 |
commit | 23b847786cf7d86c6da9c7a772a1aef6918eee65 (patch) | |
tree | 958280d566e8bbe4db873d1780b4db2f87fa5b9c /perlio.c | |
parent | bf15e14c329c58d53cd425c0a506d27028d00e38 (diff) | |
download | perl-23b847786cf7d86c6da9c7a772a1aef6918eee65.tar.gz |
ASCII vs BINARY on OS/2 in perlio
Message-ID: <20020402003708.A8648@math.ohio-state.edu>
p4raw-id: //depot/perl@15682
Diffstat (limited to 'perlio.c')
-rw-r--r-- | perlio.c | 17 |
1 files changed, 11 insertions, 6 deletions
@@ -2891,18 +2891,23 @@ PerlIOBuf_open(pTHX_ PerlIO_funcs *self, PerlIO_list_t *layers, return NULL; } else { fd = PerlIO_fileno(f); -#ifdef PERLIO_USING_CRLF - /* - * do something about failing setmode()? --jhi - */ - PerlLIO_setmode(fd, O_BINARY); -#endif if (init && fd == 2) { /* * Initial stderr is unbuffered */ PerlIOBase(f)->flags |= PERLIO_F_UNBUF; } +#ifdef PERLIO_USING_CRLF +# ifdef PERLIO_IS_BINMODE_FD + if (PERLIO_IS_BINMODE_FD(fd)) + PerlIO_binmode(f, '<'/*not used*/, O_BINARY, Nullch); + else +# endif + /* + * do something about failing setmode()? --jhi + */ + PerlLIO_setmode(fd, O_BINARY); +#endif } } } |