From f41f376213e7f8c8d301cdf69336dc3e0833251c Mon Sep 17 00:00:00 2001 From: Wez Furlong Date: Wed, 21 May 2003 12:02:55 +0000 Subject: [PATCH] Allow win32 people to fopen($filename, 'rt') to explicitly chose text-mode files again. The functionality was accidentally dropped when we introduced our own fopen mode string parser. --- main/streams.c | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/main/streams.c b/main/streams.c index 357894ef69..4d68335eae 100755 --- a/main/streams.c +++ b/main/streams.c @@ -1916,6 +1916,11 @@ PHPAPI int php_stream_parse_fopen_modes(const char *mode, int *open_flags) flags |= O_BINARY; } #endif +#ifdef _O_TEXT + if (strchr(mode, 't')) { + flags |= _O_TEXT; + } +#endif *open_flags = flags; return SUCCESS; -- 2.50.1