Change calls to setmode to _setmode (#14220)

setmode is the deprecated alias of _setmode [1].

[1] https://learn.microsoft.com/en-us/cpp/c-runtime-library/reference/posix-setmode?view=msvc-170
This commit is contained in:
Niels Dossche 2024-05-13 22:08:24 +02:00 committed by GitHub
parent 173f51365d
commit a95d001a8a
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
4 changed files with 12 additions and 12 deletions

View File

@ -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) {

View File

@ -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);

View File

@ -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

View File

@ -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;