From: Wez Furlong Date: Wed, 21 May 2003 12:02:55 +0000 (+0000) Subject: Allow win32 people to fopen($filename, 'rt') to explicitly chose text-mode X-Git-Tag: php-4.3.2RC4~40 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=f41f376213e7f8c8d301cdf69336dc3e0833251c;p=php 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. --- 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;