diff options
author | Wez Furlong <wez@php.net> | 2002-10-21 22:54:37 +0000 |
---|---|---|
committer | Wez Furlong <wez@php.net> | 2002-10-21 22:54:37 +0000 |
commit | dabf1053cdbd1bf8cd9020d16b41eb6b7ca2013f (patch) | |
tree | 84cb33061e3e0e32ddec7c432b5d4b64c5c85233 /main/php_streams.h | |
parent | 102c94550126b9e004d22620300033f0fe9a2006 (diff) | |
download | php-git-dabf1053cdbd1bf8cd9020d16b41eb6b7ca2013f.tar.gz |
Refine stream_select() to work with streams that have data in their read
buffers.
When selecting for read, the streams are examined; if any of them have
pending read data, no actual select(2) call is performed; instead the
streams with buffered data are returned; just like a regular select
call.
Prevent erroneous warning in stream_select when obtaining the fd.
Diffstat (limited to 'main/php_streams.h')
-rwxr-xr-x | main/php_streams.h | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/main/php_streams.h b/main/php_streams.h index 6861671360..e3b07f785a 100755 --- a/main/php_streams.h +++ b/main/php_streams.h @@ -455,7 +455,8 @@ PHPAPI php_stream *_php_stream_fopen_temporary_file(const char *dir, const char /* try really, really hard to make sure the cast happens (socketpair) */ #define PHP_STREAM_CAST_TRY_HARD 0x80000000 #define PHP_STREAM_CAST_RELEASE 0x40000000 /* stream becomes invalid on success */ -#define PHP_STREAM_CAST_MASK (PHP_STREAM_CAST_TRY_HARD | PHP_STREAM_CAST_RELEASE) +#define PHP_STREAM_CAST_INTERNAL 0x20000000 /* stream cast for internal use */ +#define PHP_STREAM_CAST_MASK (PHP_STREAM_CAST_TRY_HARD | PHP_STREAM_CAST_RELEASE | PHP_STREAM_CAST_INTERNAL) PHPAPI int _php_stream_cast(php_stream *stream, int castas, void **ret, int show_err TSRMLS_DC); /* use this to check if a stream can be cast into another form */ #define php_stream_can_cast(stream, as) _php_stream_cast((stream), (as), NULL, 0 TSRMLS_CC) |