diff --git a/sapi/cgi/cgi_main.c b/sapi/cgi/cgi_main.c index 3759f24d45df8..3d7df7e283954 100644 --- a/sapi/cgi/cgi_main.c +++ b/sapi/cgi/cgi_main.c @@ -1779,9 +1779,9 @@ int main(int argc, char *argv[]) #ifdef PHP_WIN32 _fmode = _O_BINARY; /* sets default for file streams to binary */ - setmode(_fileno(stdin), O_BINARY); /* make the stdio mode be binary */ - setmode(_fileno(stdout), O_BINARY); /* make the stdio mode be binary */ - setmode(_fileno(stderr), O_BINARY); /* make the stdio mode be binary */ + _setmode(_fileno(stdin), O_BINARY); /* make the stdio mode be binary */ + _setmode(_fileno(stdout), O_BINARY); /* make the stdio mode be binary */ + _setmode(_fileno(stderr), O_BINARY); /* make the stdio mode be binary */ #endif if (!fastcgi) { diff --git a/sapi/cli/php_cli.c b/sapi/cli/php_cli.c index e107667828caa..0376ffe2e5dac 100644 --- a/sapi/cli/php_cli.c +++ b/sapi/cli/php_cli.c @@ -1240,9 +1240,9 @@ int main(int argc, char *argv[]) #ifdef PHP_WIN32 _fmode = _O_BINARY; /*sets default for file streams to binary */ - setmode(_fileno(stdin), O_BINARY); /* make the stdio mode be binary */ - setmode(_fileno(stdout), O_BINARY); /* make the stdio mode be binary */ - setmode(_fileno(stderr), O_BINARY); /* make the stdio mode be binary */ + _setmode(_fileno(stdin), O_BINARY); /* make the stdio mode be binary */ + _setmode(_fileno(stdout), O_BINARY); /* make the stdio mode be binary */ + _setmode(_fileno(stderr), O_BINARY); /* make the stdio mode be binary */ #endif php_ini_builder_init(&ini_builder); diff --git a/sapi/embed/php_embed.c b/sapi/embed/php_embed.c index 4626451f9f68a..33364d3e65334 100644 --- a/sapi/embed/php_embed.c +++ b/sapi/embed/php_embed.c @@ -194,9 +194,9 @@ EMBED_SAPI_API int php_embed_init(int argc, char **argv) #ifdef PHP_WIN32 _fmode = _O_BINARY; /*sets default for file streams to binary */ - setmode(_fileno(stdin), O_BINARY); /* make the stdio mode be binary */ - setmode(_fileno(stdout), O_BINARY); /* make the stdio mode be binary */ - setmode(_fileno(stderr), O_BINARY); /* make the stdio mode be binary */ + _setmode(_fileno(stdin), O_BINARY); /* make the stdio mode be binary */ + _setmode(_fileno(stdout), O_BINARY); /* make the stdio mode be binary */ + _setmode(_fileno(stderr), O_BINARY); /* make the stdio mode be binary */ #endif /* This hard-coded string of INI settings is parsed and read into PHP's diff --git a/sapi/phpdbg/phpdbg.c b/sapi/phpdbg/phpdbg.c index ffff7e2c219be..65745cd454eea 100644 --- a/sapi/phpdbg/phpdbg.c +++ b/sapi/phpdbg/phpdbg.c @@ -1154,9 +1154,9 @@ int main(int argc, char **argv) /* {{{ */ #ifdef PHP_WIN32 _fmode = _O_BINARY; /* sets default for file streams to binary */ - setmode(_fileno(stdin), O_BINARY); /* make the stdio mode be binary */ - setmode(_fileno(stdout), O_BINARY); /* make the stdio mode be binary */ - setmode(_fileno(stderr), O_BINARY); /* make the stdio mode be binary */ + _setmode(_fileno(stdin), O_BINARY); /* make the stdio mode be binary */ + _setmode(_fileno(stdout), O_BINARY); /* make the stdio mode be binary */ + _setmode(_fileno(stderr), O_BINARY); /* make the stdio mode be binary */ #else struct sigaction signal_struct; signal_struct.sa_sigaction = phpdbg_signal_handler;