summaryrefslogtreecommitdiff
path: root/doio.c
diff options
context:
space:
mode:
authorJarkko Hietaniemi <jhi@iki.fi>2001-12-11 14:33:14 +0000
committerJarkko Hietaniemi <jhi@iki.fi>2001-12-11 14:33:14 +0000
commit6ce75a778d390cfc1b903c40f2566d0e560efcd8 (patch)
tree852095faac15bf2d497b71c3f3e0f8056eb91709 /doio.c
parentd2492938eb072e03ead75c841f11237d3b984c72 (diff)
downloadperl-6ce75a778d390cfc1b903c40f2566d0e560efcd8.tar.gz
Try to handle platforms that have O_TEXT != O_BINARY but
which are not DOSish, BeOS being one of such platforms. Ideally this should be a Configure test, not a hardwired cpp symbol test... p4raw-id: //depot/perl@13621
Diffstat (limited to 'doio.c')
-rw-r--r--doio.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/doio.c b/doio.c
index ed57c42ccc..2577b2f316 100644
--- a/doio.c
+++ b/doio.c
@@ -1107,7 +1107,11 @@ Perl_do_binmode(pTHX_ PerlIO *fp, int iotype, int mode)
/* The old body of this is now in non-LAYER part of perlio.c
* This is a stub for any XS code which might have been calling it.
*/
- char *name = (O_BINARY != O_TEXT && !(mode & O_BINARY)) ? ":crlf" : ":raw";
+ char *name = ":raw";
+#ifdef PERLIO_CRLF
+ if (!(mode & O_BINARY)))
+ name = ":crlf";
+#endif
return PerlIO_binmode(aTHX_ fp, iotype, mode, name);
}