com php-src: Rely on having unistd.h (which provides isatty function) rather than having the posix extension.: ext/standard/streamsfuncs.c
[email protected] (Remi Collet)
| Newsgroups | php.cvs |
|---|---|
| Message-ID | <[email protected]> |
Commit: 04fe5e968334913ab9d7f23df84d09c543b3a767 Author: Remi Collet <[email protected]> Wed, 12 Apr 2017 12:56:13 +0200 Parents: efeab78535008a4640896624a1ceb8af8615535d Branches: master Link: http://git.php.net/?p=php-src.git;a=commitdiff;h=04fe5e968334913ab9d7f23df84d09c543b3a767 Log: Rely on having unistd.h (which provides isatty function) rather than having the posix extension. Fix the tests when build with --disable-all Changed paths: M ext/standard/streamsfuncs.c Diff: diff --git a/ext/standard/streamsfuncs.c b/ext/standard/streamsfuncs.c index 85fa656..a9bf574 100644 --- a/ext/standard/streamsfuncs.c +++ b/ext/standard/streamsfuncs.c @@ -30,6 +30,9 @@ #include "streamsfuncs.h" #include "php_network.h" #include "php_string.h" +#if HAVE_UNISTD_H +#include <unistd.h> +#endif #ifndef PHP_WIN32 #define php_select(m, r, w, e, t) select(m, r, w, e, t) @@ -1645,7 +1648,7 @@ PHP_FUNCTION(stream_isatty) else { RETURN_FALSE; } -#elif HAVE_POSIX +#elif HAVE_UNISTD_H /* Check if the file descriptor identifier is a terminal */ if (isatty(fileno)) { RETURN_TRUE;